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

it235/office-ai-agent

Measured 26 October 2026, 16:59 UTC, at code version a5be0ab

Regression: 1 dimension fell since the last survey Test distribution: not measuredBoundary Type-Coupling: not measured

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

Test distribution is not measured: No automated tests.

Boundary Type-Coupling is not measured: Bounded contexts not declared.

CAI score 30out of 100 Weak
CriticalWeakAdequateStrongExemplary
Down 3 since the last survey

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

A medium codebase: 85,829 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 0.4 person-years · Weakest lens: Production Readiness, 15

Findings by how serious they are

256 critical 795 serious 39 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
26 October 2026, 16:59 UTC

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

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

44of 44 dimensions measured by tools.
1074of 1090 findings point to an exact file and line, so you can open each one in the code. The other 16 concern the repository as a whole, such as missing documentation.
44dimensions across 5 lenses, read from 85,829 lines of product code in 4 projects.
Chapters

Executive summary

it235/office-ai-agent falls short of our standard for production, in part because the project has no automated tests. It scores 30 out of 100 and is rated Weak, and four of its 256 critical findings are security problems.

Production Readiness, at 15, is the weakest lens and counts most in the score. The best first step is adding automated tests, worth about 12 points. Fixing the password or key in the code is another step, worth about 7 points. Raising Production Readiness to 70 would lift the score to about 43.

Two known security holes in the packages the code depends on can be used by attackers. One password or key in the code and one in the code's history are open to anyone who can read the repository, and 241 errors are caught and ignored, so failures can go unnoticed. Replacing each exposed password or key, updating the vulnerable packages and handling or logging the ignored errors would close these risks. The ten parts of the code nobody has worked on for a long time need someone to learn and document them before anyone changes them.

The product code is 85,829 lines, about €62,000 to rebuild.

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

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 15 · counts for 47%Code Health 16 · counts for 26%Maturity 55 · counts for 14%Security and Compliance 87 · counts for 8%Architecture 92 · counts for 4%

If Production Readiness rose from 15 to 70, the lowest score rated Strong, the score would rise from 30 to about 43.

Code composition: what the lines of code are
Product code 100%
New since the last survey: 140 findings

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

  • Cyclomatic Complexity · HostHotkeyChord.KeyFromText (cyclomatic 41) ShareRibbon/Controls/Services/HostHotkeyWatcher.vb
  • Cyclomatic Complexity · ExcelRunRestore.Replay (cyclomatic 26) ExcelAi/Undo/ExcelRunRestore.vb
  • Cyclomatic Complexity · AgentChangeLogRepository.SaveRun (cyclomatic 25) ShareRibbon/Storage/AgentChangeLogRepository.vb
  • Cyclomatic Complexity · AgentRunChangeLog.AddFromStep (cyclomatic 25) ShareRibbon/Agent/Execution/AgentChangeLog.vb
  • Cyclomatic Complexity · OfficeHarness.DecideAsync (cyclomatic 23) ShareRibbon/Agent/Harness/OfficeHarness.vb
  • Cyclomatic Complexity · ChatControl.ExecuteWordCommandsArrayWithToolResult (cyclomatic 23) WordAi/ChatControl.vb
  • Cyclomatic Complexity · ChatControl.ExecuteWordCommandWithToolResult (cyclomatic 23) WordAi/ChatControl.vb
  • Cyclomatic Complexity · agent-card.completeAgent (cyclomatic 23) ShareRibbon/Resources/js/agent-card.js
  • Cyclomatic Complexity · OfficeHarness.RunAsync (cyclomatic 21) ShareRibbon/Agent/Harness/OfficeHarness.vb
  • Cyclomatic Complexity · agent-card.renderAgentChangeSummary (cyclomatic 21) ShareRibbon/Resources/js/agent-card.js
  • Cyclomatic Complexity · TaskPackageCatalog.ParseVerifier (cyclomatic 20) ShareRibbon/Agent/TaskPackageCatalog.Parsing.vb
  • Cyclomatic Complexity · PowerPointRunRestore.Replay (cyclomatic 19) PowerPointAi/Undo/PowerPointRunRestore.vb
  • Cyclomatic Complexity · ChatControl.ExecuteJsonCommandWithToolResult (cyclomatic 18) PowerPointAi/ChatControl.vb
  • Cyclomatic Complexity · agent-card.setStepEditResult (cyclomatic 18) ShareRibbon/Resources/js/agent-card.js
  • Cyclomatic Complexity · TaskPackageOutcomeVerifier.CheckOne (cyclomatic 17) ShareRibbon/Agent/TaskPackageOutcomeVerifier.vb
  • Cyclomatic Complexity · ToolRegistry.ValidateBatchCommandEnvelope (cyclomatic 16) ShareRibbon/Agent/ToolRegistry.vb
  • Cyclomatic Complexity · BaseChatControl.HandleStartAgent (cyclomatic 16) ShareRibbon/Controls/BaseChatControl.vb
  • Cyclomatic Complexity · AgentKernelService.StartAgentAsync (cyclomatic 16) ShareRibbon/Controls/Services/AgentKernelService.vb
  • Cognitive Complexity · LoopEngine.ValidatePlannedImagePaths (cognitive 36) ShareRibbon/Agent/LoopEngine.Coverage.vb
  • Cognitive Complexity · AgentChangeLogRepository.SaveRun (cognitive 33) ShareRibbon/Storage/AgentChangeLogRepository.vb
  • Cognitive Complexity · LoopEngine.BuildCompletionMessage (cognitive 29) ShareRibbon/Agent/LoopEngine.vb
  • Cognitive Complexity · AgentRunChangeLog.AddFromStep (cognitive 29) ShareRibbon/Agent/Execution/AgentChangeLog.vb
  • Cognitive Complexity · _createTemplateCard (cognitive 28) ShareRibbon/Resources/js/markdown-renderer.js
  • Cognitive Complexity · TaskPackageCatalog.ParseVerifier (cognitive 27) ShareRibbon/Agent/TaskPackageCatalog.Parsing.vb
  • Cognitive Complexity · OfficeHarness.DecideAsync (cognitive 26) ShareRibbon/Agent/Harness/OfficeHarness.vb
  • Cognitive Complexity · ChatControl.ExecuteWordCommandWithToolResult (cognitive 24) WordAi/ChatControl.vb
  • Cognitive Complexity · ExcelRunRestore.Replay (cognitive 24) ExcelAi/Undo/ExcelRunRestore.vb
  • Cognitive Complexity · OfficeHarness.RunAsync (cognitive 23) ShareRibbon/Agent/Harness/OfficeHarness.vb
  • Cognitive Complexity · agent-card.setStepEditResult (cognitive 22) ShareRibbon/Resources/js/agent-card.js
  • Cognitive Complexity · check-entry-reachability.readVbArguments (cognitive 22) scripts/check-entry-reachability.js
  • Cognitive Complexity · renderAgentChangeSummary (cognitive 22) ShareRibbon/Resources/js/agent-card.js
  • Cognitive Complexity · ToolRegistry.ValidateBatchCommandEnvelope (cognitive 21) ShareRibbon/Agent/ToolRegistry.vb
  • Cognitive Complexity · LoopEngine.ValidateExecutionOutcome (cognitive 20) ShareRibbon/Agent/LoopEngine.Coverage.vb
  • Cognitive Complexity · AgentKernel.ExecuteAsync (cognitive 19) ShareRibbon/Agent/AgentKernel.vb
  • Cognitive Complexity · CodeExecutionService.ExecuteJsonCommandWithToolResult (cognitive 19) ShareRibbon/Controls/Services/CodeExecutionService.vb
  • Cognitive Complexity · ConfigManager.SaveConfig (cognitive 18) ShareRibbon/Config/ConfigManager.vb
  • Cognitive Complexity · TaskPackageOutcomeVerifier.CheckOne (cognitive 18) ShareRibbon/Agent/TaskPackageOutcomeVerifier.vb
  • Cognitive Complexity · AgentKernelService.StartAgentAsync (cognitive 18) ShareRibbon/Controls/Services/AgentKernelService.vb
  • Cognitive Complexity · PowerPointRunRestore.Replay (cognitive 18) PowerPointAi/Undo/PowerPointRunRestore.vb
  • Cognitive Complexity · OfficeAiDatabase.RunVersionedMigrations (cognitive 17) ShareRibbon/Storage/OfficeAiDatabase.vb
  • Cognitive Complexity · HistorySessionService.HandleGetSessionList (cognitive 17) ShareRibbon/Controls/Services/HistorySessionService.vb
  • Cognitive Complexity · ChatControl.ExecuteAddSpeakerNotes (cognitive 17) PowerPointAi/ChatControl.vb
  • Cognitive Complexity · BaseChatControl.InitializeWebView2 (cognitive 16) ShareRibbon/Controls/BaseChatControl.vb
  • Cognitive Complexity · BaseChatControl.HandleStartAgent (cognitive 16) ShareRibbon/Controls/BaseChatControl.vb
  • Cognitive Complexity · BaseChat.ExecuteVBACode (cognitive 16) ShareRibbon/Controls/BaseChat.vb
  • Cognitive Complexity · ChatControl.ExecuteJsonCommandWithToolResult (cognitive 16) PowerPointAi/ChatControl.vb
  • God Classes · TooManyMethods: LoopEngine ShareRibbon/Agent/LoopEngine.Coverage.vb
  • God Classes · FileTooLong: js/agent-card.js ShareRibbon/Resources/js/agent-card.js
  • God Classes · ClassTooLong: AgentKernelService ShareRibbon/Controls/Services/AgentKernelService.RunControl.vb
  • God Classes · ClassTooLong: OfficeHarness ShareRibbon/Agent/Harness/OfficeHarness.Approvals.vb
  • God Classes · MethodTooLong: ChatControl.ExecuteWordCommandWithToolResult WordAi/ChatControl.vb
  • God Classes · FileTooLong: Agent/LoopEngine.vb ShareRibbon/Agent/LoopEngine.vb
  • God Classes · MethodTooLong: ParagraphService.SetParagraphFormat WordAi/Services/ParagraphService.vb
  • God Classes · MethodTooLong: ChatControl.ExecuteWordCommandsArrayWithToolResult WordAi/ChatControl.vb
  • God Classes · ClassTooLong: TaskPackageCatalog ShareRibbon/Agent/TaskPackageCatalog.Parsing.vb
  • God Classes · FunctionTooLong: agent-card.showAgentPlanCard ShareRibbon/Resources/js/agent-card.js
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) ExcelAi/EnhancedPreviewAndConfirm.vb
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) PowerPointAi/ChatControl.vb
  • Code Duplication · Duplicated block (21 lines × 2) ExcelAi/ChatControl.vb
  • Code Duplication · Duplicated block (15 lines × 2) ExcelAi/ChatControl.vb
  • Code Duplication · Duplicated block (15 lines × 2) ShareRibbon/Config/ConfigApiForm.vb
  • Code Duplication · Duplicated block (14 lines × 3) ExcelAi/Ribbon1.vb
  • Code Duplication · Duplicated block (8 lines × 2) ExcelAi/ChatControl.vb
  • Code Duplication · Duplicated block (8 lines × 2) ShareRibbon/Controls/BaseChatControl.vb
  • Code Duplication · Duplicated block (7 lines × 2) ExcelAi/Undo/ExcelRunRestore.vb
  • Code Duplication · Duplicated block (9 lines × 3) ExcelAi/HostEntry/ExcelContextMenu.vb
  • Code Duplication · Duplicated block (6 lines × 2) ExcelAi/Undo/ExcelRunRestore.vb
  • Secret Scanning · REDACTED
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Resources/js/agent-card.js ShareRibbon/Resources/js/agent-card.js
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Agent/Harness/OfficeHarness.vb ShareRibbon/Agent/Harness/OfficeHarness.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Controls/Services/AgentKernelService.vb ShareRibbon/Controls/Services/AgentKernelService.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Agent/AgentKernel.vb ShareRibbon/Agent/AgentKernel.vb
  • Churn × Complexity Hotspots · Hotspot: PowerPointAi/ChatControl.vb PowerPointAi/ChatControl.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Config/ChatSettings.vb ShareRibbon/Config/ChatSettings.vb
  • Explicit Debt · EmptyCatchBlock ExcelAi/ChatControl.vb
  • Explicit Debt · EmptyCatchBlock ExcelAi/HostEntry/ExcelContextMenu.vb
  • Explicit Debt · EmptyCatchBlock PowerPointAi/ChatControl.vb
  • Explicit Debt · EmptyCatchBlock PowerPointAi/ChatControl.vb
  • Explicit Debt · EmptyCatchBlock PowerPointAi/ChatControl.vb
  • Explicit Debt · EmptyCatchBlock PowerPointAi/ChatControl.vb
  • Explicit Debt · EmptyCatchBlock PowerPointAi/ChatControl.vb
  • Explicit Debt · EmptyCatchBlock PowerPointAi/ChatControl.vb
  • Explicit Debt · EmptyCatchBlock PowerPointAi/HostEntry/PowerPointContextMenu.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Agent/HostContextMenu.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Agent/HostContextMenu.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Agent/LoopEngine.Coverage.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Agent/LoopEngine.Coverage.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Agent/LoopEngine.Coverage.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Agent/TaskPackageCatalog.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Agent/TaskPackageCatalog.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Controls/Services/AgentKernelService.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Storage/AgentChangeLogRepository.vb
  • Explicit Debt · EmptyCatchBlock WordAi/ChatControl.vb
  • Explicit Debt · EmptyCatchBlock WordAi/HostEntry/WordContextMenu.vb
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Knowledge Freshness · Orphaned knowledge PowerPointAi/Design/SlideComponentLibrary.vb
  • Knowledge Freshness · Orphaned knowledge PowerPointAi/Design/SlideComponentLibrary.Patterns.vb
  • Knowledge Freshness · Orphaned knowledge PowerPointAi/Design/ProfessionalDeckExecutor.Operations.vb
  • Knowledge Freshness · Orphaned knowledge PowerPointAi/Runtime/PowerPointApiCatalogProvider.vb

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

Fixed since the last survey: 50 findings

These 50 critical or serious findings were in the previous survey, on 12 October 2026, and are gone from this one.

  • Cyclomatic Complexity · LoopEngine.ValidateExecutionOutcome (cyclomatic 16) ShareRibbon/Agent/LoopEngine.Planning.vb
  • Cognitive Complexity · LoopEngine.ValidatePlannedImagePaths (cognitive 36) ShareRibbon/Agent/LoopEngine.Planning.vb
  • Cognitive Complexity · MarkdownStreamRenderer._createTemplateCard (cognitive 27) ShareRibbon/Resources/js/markdown-renderer.js
  • Cognitive Complexity · ConfigManager.LoadConfig (cognitive 24) ShareRibbon/Config/ConfigManager.vb
  • Cognitive Complexity · LoopEngine.ValidateExecutionOutcome (cognitive 20) ShareRibbon/Agent/LoopEngine.Planning.vb
  • Cognitive Complexity · ResourceExtractor.ExtractResources (cognitive 19) ShareRibbon/Resources/ResourceExtractor.vb
  • Cognitive Complexity · CodeExecutionService.ExecuteVBACode (cognitive 18) ShareRibbon/Controls/Services/CodeExecutionService.vb
  • God Classes · ClassTooLong: LoopEngine ShareRibbon/Agent/LoopEngine.Planning.vb
  • God Classes · FileTooLong: Agent/LoopEngine.Planning.vb ShareRibbon/Agent/LoopEngine.Planning.vb
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) ExcelAi/EnhancedPreviewAndConfirm.vb
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) PowerPointAi/ChatControl.vb
  • Code Duplication · Duplicated block (16 lines × 2) ExcelAi/ChatControl.vb
  • Code Duplication · Duplicated block (15 lines × 3) ExcelAi/Ribbon1.vb
  • Code Duplication · Duplicated block (14 lines × 2) ShareRibbon/Config/ConfigApiForm.vb
  • Code Duplication · Duplicated block (9 lines × 2) PowerPointAi/ChatControl.vb
  • Code Duplication · Duplicated block (5 lines × 2) ShareRibbon/Controls/BaseChatControl.vb
  • Code Duplication · Duplicated block (10 lines × 3) ExcelAi/ThisAddIn.vb
  • Code Duplication · Duplicated block (7 lines × 3) ExcelAi/ThisAddIn.vb
  • Code Duplication · Duplicated block (8 lines × 2) ExcelAi/ThisAddIn.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Storage/MemoryRepository.vb ShareRibbon/Storage/MemoryRepository.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Services/Reformat/SmartFormattingOrchestrator.vb ShareRibbon/Services/Reformat/SmartFormattingOrchestrator.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Resources/js/message-sender.js ShareRibbon/Resources/js/message-sender.js
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Controls/Services/ChatContextBuilder.vb ShareRibbon/Controls/Services/ChatContextBuilder.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Services/SkillsDirectoryService.vb ShareRibbon/Services/SkillsDirectoryService.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Controls/Services/HttpStreamService.vb ShareRibbon/Controls/Services/HttpStreamService.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Config/ConfigApiForm.vb ShareRibbon/Config/ConfigApiForm.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Controls/Services/IntentRecognitionService.vb ShareRibbon/Controls/Services/IntentRecognitionService.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Services/SkillsService.vb ShareRibbon/Services/SkillsService.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Services/Reformat/SemanticPromptBuilder.vb ShareRibbon/Services/Reformat/SemanticPromptBuilder.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Agent/PromptManager.vb ShareRibbon/Agent/PromptManager.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Controls/Services/CodeExecutionService.vb ShareRibbon/Controls/Services/CodeExecutionService.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Services/Reformat/TaggingValidator.vb ShareRibbon/Services/Reformat/TaggingValidator.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Config/ConfigManager.vb ShareRibbon/Config/ConfigManager.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Services/EmbeddingService.vb ShareRibbon/Services/EmbeddingService.vb
  • Churn × Complexity Hotspots · Hotspot: ShareRibbon/Services/Reformat/FormatMirrorService.vb ShareRibbon/Services/Reformat/FormatMirrorService.vb
  • Churn × Complexity Hotspots · Hotspot: PowerPointAi/DeepseekControl.vb PowerPointAi/DeepseekControl.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Agent/LoopEngine.Planning.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Agent/LoopEngine.Planning.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Agent/LoopEngine.Planning.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Resources/ResourceExtractor.vb
  • Explicit Debt · EmptyCatchBlock ShareRibbon/Resources/ResourceExtractor.vb
  • Code Duplication · Duplicated block (17 lines × 2 locations) ShareRibbon/Resources/js/markdown-renderer.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) ShareRibbon/Resources/js/mcp-manager.js
  • Code Duplication · Duplicated block (5 lines × 2 locations) ShareRibbon/Resources/js/agent-card.js
  • Cyclomatic Complexity · Complex function updateResourceTabUI (cyclomatic 14, cognitive 20) ShareRibbon/Resources/js/reformat-template.js
  • Cyclomatic Complexity · Complex function getFormulaDescription (cyclomatic 14, cognitive 13) ShareRibbon/Resources/js/code-handler.js
  • Large Files · ShareRibbon/Resources/js/code-handler.js: 1827 lines of code ShareRibbon/Resources/js/code-handler.js
  • Large Files · ShareRibbon/Resources/js/reformat-template.js: 1241 lines of code ShareRibbon/Resources/js/reformat-template.js
  • Large Files · ShareRibbon/Resources/js/agent-card.js: 495 lines of code ShareRibbon/Resources/js/agent-card.js
Rebuild cost: about €62,000 · Estimate
Cost to rebuild€21,000 to €100,000, for 344 to 1,091 hours of work, about 0.4 person-years for one engineer
Difficulty of the problemLow, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 30. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 85,829 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 1 No automated tests finding(s) in Code Coverage.
Raises the score by about 12 points · Low effort · Code Coverage
2
Resolve the 1 No tests found finding(s) in Test Distribution.
Raises the score by about 12 points · Low effort · Test Distribution
3
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
Raises the score by about 7 points · Low effort · Secret Scanning

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €62,000 to build again, about 0.4 person-years of work. Its weakest lens is Production Readiness, at 15 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No automated tests finding(s) in Code Coverage. Of all the actions in this report, it raises the score most for the work it takes: about 12 points for low effort, because it clears the 1 Code Coverage findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.2 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 4% to 10% on every change. The history of the code shows how much it changes: about 33,308 lines over the last 90 days, which is about 135,082 lines a year. At that pace, the extra work comes to an estimated 15.2 to 90.9 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch ExcelAi ExcelAi ShareRibbon ShareRibbon ExcelAi->ShareRibbon PowerPointAi PowerPointAi PowerPointAi->ShareRibbon WordAi WordAi WordAi->ShareRibbon

Architecture: which parts of the code depend on which

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

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

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 (global)2 ExcelAi.ExcelUndo3 ExcelAi.Extensions4 ExcelAi.Handlers5 ExcelAi.My6 PowerPointAi.Extensions7 PowerPointAi.Handlers8 PowerPointAi.My9 PowerPointAi.PowerPointUndo10 ShareRibbon.Agent.Context11 ShareRibbon.Agent.OfficeOperations12 ShareRibbon.Common13 ShareRibbon.Core14 ShareRibbon.My15 ShareRibbon.Resources16 ShareRibbon.Resources.js17 ShareRibbon.Resources.js.markdown-renderer18 ShareRibbon.Security19 ShareRibbon.Services.Reformat20 WordAi.My21 scripts22 scripts.check-agent-card-ui23 ExcelAi.Context24 PowerPointAi.Context25 ShareRibbon.Agent.Execution26 ShareRibbon.Extensions27 WordAi.Context28 ShareRibbon.Agent.Harness29 ShareRibbon30 ShareRibbon.Agent31 ExcelAi.HostEntry32 PowerPointAi.Design33 PowerPointAi.HostEntry34 PowerPointAi.OfficeRuntime35 WordAi.HostEntry36 WordAi.Selection37 WordAi.Services38 ExcelAi39 PowerPointAi40 WordAi
1 (global)
2 ExcelAi.ExcelUndo
3 ExcelAi.Extensions
4 ExcelAi.Handlers
5 ExcelAi.My
6 PowerPointAi.Extensions
7 PowerPointAi.Handlers
8 PowerPointAi.My
9 PowerPointAi.PowerPointUndo
10 ShareRibbon.Agent.Context
11 ShareRibbon.Agent.OfficeOperations
12 ShareRibbon.Common
13 ShareRibbon.Core
14 ShareRibbon.My
15 ShareRibbon.Resources
16 ShareRibbon.Resources.js
17 ShareRibbon.Resources.js.markdown-renderer
18 ShareRibbon.Security
19 ShareRibbon.Services.Reformat
20 WordAi.My
21 scripts
22 scripts.check-agent-card-ui
23 ExcelAi.Context2
24 PowerPointAi.Context2
25 ShareRibbon.Agent.Execution1
26 ShareRibbon.Extensions2
27 WordAi.Context2
28 ShareRibbon.Agent.Harness21111
29 ShareRibbon31222
30 ShareRibbon.Agent32218
31 ExcelAi.HostEntry3
32 PowerPointAi.Design2
33 PowerPointAi.HostEntry3
34 PowerPointAi.OfficeRuntime82
35 WordAi.HostEntry3
36 WordAi.Selection3
37 WordAi.Services121
38 ExcelAi11641
39 PowerPointAi12141
40 WordAi1474116
Uses a module listed above itPart of a loopThe module itself
1 (global)2 ExcelAi.ExcelUndo3 ExcelAi.Extensions4 ExcelAi.Handlers5 ExcelAi.My6 PowerPointAi.Extensions7 PowerPointAi.Handlers8 PowerPointAi.My9 PowerPointAi.PowerPointUndo10 ShareRibbon.Agent.Context11 ShareRibbon.Agent.OfficeOperations12 ShareRibbon.Common13 ShareRibbon.Core14 ShareRibbon.My15 ShareRibbon.Resources16 ShareRibbon.Resources.js17 ShareRibbon.Resources.js.markdown-renderer18 ShareRibbon.Security19 ShareRibbon.Services.Reformat20 WordAi.My21 scripts22 scripts.check-agent-card-ui23 ExcelAi.Context24 PowerPointAi.Context25 ShareRibbon.Agent.Execution26 ShareRibbon.Extensions27 WordAi.Context28 ShareRibbon.Agent.Harness29 ShareRibbon30 ShareRibbon.Agent31 ExcelAi.HostEntry32 PowerPointAi.Design33 PowerPointAi.HostEntry34 PowerPointAi.OfficeRuntime35 WordAi.HostEntry36 WordAi.Selection37 WordAi.Services38 ExcelAi39 PowerPointAi40 WordAi(global)1ExcelAi.ExcelUndo2ExcelAi.Extensions3ExcelAi.Handlers4ExcelAi.My5PowerPointAi.Extensions6PowerPointAi.Handlers7PowerPointAi.My8PowerPointAi.PowerPointUndo9ShareRibbon.Agent.Context10ShareRibbon.Agent.OfficeOperations11ShareRibbon.Common12ShareRibbon.Core13ShareRibbon.My14ShareRibbon.Resources15ShareRibbon.Resources.js16ShareRibbon.Resources.js.markdown-renderer17ShareRibbon.Security18ShareRibbon.Services.Reformat19WordAi.My20scripts21scripts.check-agent-card-ui22ExcelAi.Context23PowerPointAi.Context24ShareRibbon.Agent.Execution25ShareRibbon.Extensions26WordAi.Context27ShareRibbon.Agent.Harness28ShareRibbon29ShareRibbon.Agent30ExcelAi.HostEntry31PowerPointAi.Design32PowerPointAi.HostEntry33PowerPointAi.OfficeRuntime34WordAi.HostEntry35WordAi.Selection36WordAi.Services37ExcelAi38PowerPointAi39WordAi4022122211113122232218323823312111641121411474116+1 more modules (most-connected shown)

At a glance — Code Health · 16% · Critical · gated by D1, D2, R1, R2, R3, R7 ·

At a glance — Architecture · 92% · Exemplary ·

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

At a glance — Readiness · 15% · Critical · gated by D8, D9, R4, P1, P3 ·

At a glance — Security · 87% · 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
A07:2025 — Authentication Failures3High / Critical
A03:2025 — Software Supply Chain Failures2High / Critical

Roadmap

Begin by addressing the 241 empty catch blocks, prioritizing fixes in ChatControl.vb, SemanticRenderingEngine.vb, and ReformatCoordinator.vb to reduce explicit debt. Simultaneously, resolve the single leaked secret in REDACTED and establish a CI workflow to build and test every push. Finally, introduce automated tests to cover the identified gaps in code coverage and test distribution.

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

Do thisHelpsEffortDimension
Resolve the 1 No automated tests finding(s) in Code Coverage.+12.2 ptsLowCode Coverage
Resolve the 1 No tests found finding(s) in Test Distribution.+12.2 ptsLowTest Distribution
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.+6.9 ptsLowSecret Scanning
Resolve the 241 EmptyCatchBlock finding(s) in Explicit Debt — start with ChatControl.vb (52), SemanticRenderingEngine.vb (24), ReformatCoordinator.vb (20).+12.4 ptsHighExplicit Debt
Add a CI workflow that builds and runs the test suite on every push/PR.+3.0 ptsMediumCI/CD gates
Add tests that import the unreached modules (directly or through their public entry).+3.0 ptsMediumTest Coverage
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+2.9 ptsMediumArchitecture documentation
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+2.8 ptsMediumType Safety

File quality

Per-file score 0–10 — a quality signature. Of 180 files carrying findings, judged against the Production bar: 14% slop · 64% mixed · 22% near-clean.

FileScoreBandWorst signal
WordAi/ChatControl.vb2.2SlopExplicit Debt: EmptyCatchBlock
PowerPointAi/ChatControl.vb2.2SlopExplicit Debt: EmptyCatchBlock
ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb2.2SlopExplicit Debt: EmptyCatchBlock
ShareRibbon/Services/Reformat/ReformatCoordinator.vb2.2SlopExplicit Debt: EmptyCatchBlock
ShareRibbon/Controls/Services/HttpStreamService.vb2.2SlopExplicit Debt: EmptyCatchBlock
ExcelAi/ChatControl.vb2.2SlopExplicit Debt: EmptyCatchBlock
WordAi/OpenXmlWordTranslator.vb2.2SlopExplicit Debt: EmptyCatchBlock
PowerPointAi/PowerPointDocumentTranslateService.vb2.3SlopExplicit Debt: EmptyCatchBlock
ExcelAi/ExcelDirectOperationService.vb2.4SlopExplicit Debt: EmptyCatchBlock
ShareRibbon/Config/ReformatTemplateManager.vb2.5SlopExplicit Debt: EmptyCatchBlock
ExcelAi/EnhancedPreviewAndConfirm.vb2.6SlopExplicit Debt: EmptyCatchBlock
PowerPointAi/Runtime/PowerPointOperationExecutor.vb2.8SlopExplicit Debt: EmptyCatchBlock
ShareRibbon/Config/ConfigApiForm.vb2.8SlopExplicit Debt: EmptyCatchBlock
PowerPointAi/Runtime/PowerPointOperationObserver.vb2.9SlopExplicit Debt: EmptyCatchBlock
PowerPointAi/Runtime/PowerPointApiCatalogProvider.vb2.9SlopExplicit Debt: EmptyCatchBlock
ShareRibbon/Controls/Services/CodeExecutionService.vb3.0SlopExplicit Debt: EmptyCatchBlock
ExcelAi/Context/ExcelContextProvider.vb3.0SlopExplicit Debt: EmptyCatchBlock
PowerPointAi/Runtime/PowerPointObjectResolver.vb3.2SlopExplicit Debt: EmptyCatchBlock
ShareRibbon/Agent/LoopEngine.Coverage.vb3.2SlopExplicit Debt: EmptyCatchBlock
ShareRibbon/Agent/ToolRegistry.vb3.4SlopExplicit Debt: EmptyCatchBlock

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

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

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

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

Could not be resolved — 38

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

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

What we checked — 44 dimensions across the health lenses
D1D2D3D4D5D6D8D9D13D14D15D16D17D18D26D28D29D30D34D35D43AX10AX3AX4AX5AX6GD1M1M2M3M4P1P3P6P8R1R10R2R3R4R7R9S1X28

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, 1074 of 1090 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 measurement—◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a17927-2964-7eda-b777-75c3ae20ac88.

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.

  • 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. `dotnet list package` did not return usable output (restore or query failed); no outdated/vulnerable/deprecated data to assess. The tool said: error: MsBuild was unable to open Project 'OfficeAgent/OfficeAgent.vdproj'.
  • D17 Explicit Debt — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'ShareRibbon/ShareRibbon.vbproj' with message: 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 ..\packages\Microsoft.Web.WebView2.1.0.3240.44\build\Microsoft.Web.WebView2.targets。.
  • D18 Solution Shape — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. `dotnet build` reported 4 error(s). None of them is a .NET compiler diagnostic, which is the only signal this check reads as "the code does not compile", so the failure is recorded as a build-environment gap rather than a code defect. The usual causes are a project that targets a platform this run cannot build (a Windows-only target framework on a Linux worker) or a build step that shells out to a tool the image does not carry. Solution Shape is scored on structure and is NOT capped. Semantic analysis is independent of this build and covers every project that loaded — but a project whose restore did not complete has no resolved references, so treat its results as absent rather than clean. ★ The reach of that test, stated so this classification can be checked rather than taken on trust: it reads the C# (CS), Visual Basic (BC) and F# (FS) compiler series, and treats SDK, NuGet-restore and MSBuild codes (NETSDK, NU, MSB) as evidence that the build did not run rather than that the code is broken — read the diagnostics named above and judge for yourself. You can widen what we reach: if this build is meant to run off its own platform, without host tooling we do not carry, the diagnostics named above are what stopped it. If it is deliberately platform-bound — a Windows-only desktop product, say — there is nothing to do here: the note records our reach, not a defect in your build.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
  • D23 Boundary Type-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. Large codebase (85,829 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can 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 — 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. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
  • D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D30 Dependency Vulnerabilities — measured, with a gap in what it reached — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan. 1 of 2 declared ecosystem(s) (nuget REDACTED) WERE scanned and every vulnerability they reported is included in this result; nuget was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that nuget is free of known-vulnerable dependencies.
  • D39 IL Efficiency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. IL NOT MEASURED: the analyzer's own build of this repository failed for an ENVIRONMENT reason (exit 1) — MSBuild's engine or the CLR gave up, or our image does not carry the SDK band/targeting pack this repository needs. This is OUR limitation, not a defect in the repo, and it is not a statement that this repository fails to build. D18 owns the question of whether this repository builds; it was not answered here.
  • D44 Platform End-of-Life — 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 16 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • 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.
  • 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.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • 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.
  • 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.
  • 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.

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.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
  • 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.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • 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.

Dimensions

D1 · Cyclomatic Complexity3.7 / 10Weak✓ Tool-verified

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

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

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

201 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was MemoryRepository.GetRelevantMemories at 118. A further 20 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being ExcelDirectOperationService.ExecuteCommand at 48 — they are counted neither in the figure above nor in this dimension's score. 9 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: PowerPointAi/Design/SlideDesignModels.vb (SlideDesignSpec.NormalizeSlideType at 47), ShareRibbon/Services/Proofread/ProofreadJsonParser.vb (ProofreadJsonParser.ParseIssueType at 30), PowerPointAi/PowerPointJsonCommandSchema.vb (PowerPointJsonCommandSchema.ValidateCommand at 21), ShareRibbon/Services/Reformat/ReformatIntentRecognizer.vb (ReformatIntentRecognizer.ParseDocumentType at 21), ShareRibbon/Config/ReformatTemplateEditorForm.vb (ReformatTemplateEditorForm.ParseFontSize at 19), and 4 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

MemoryRepository.GetRelevantMemories (cyclomatic 118)ShareRibbon/Storage/MemoryRepository.vb:212
message-sender.showContextHints (cyclomatic 109)ShareRibbon/Resources/js/message-sender.js:619
LoopEngine.RunAsync (cyclomatic 78)ShareRibbon/Agent/LoopEngine.vb:55
ProfessionalDeckExecutor.ValidateSceneSpec (cyclomatic 65)PowerPointAi/Design/ProfessionalDeckExecutor.vb:259
showAgentExecutionExplanation (cyclomatic 61)ShareRibbon/Resources/js/agent-card.js:673

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

What to do

  1. Bring the 6 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with MemoryRepository.GetRelevantMemories (cyclomatic 118), message-sender.showContextHints (cyclomatic 109), showContextHints (cyclomatic 109). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 6 together lifts Cyclomatic Complexity from 3.7 to about 5.1/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Stand up a CI pipeline, then gate Cyclomatic Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

308 method(s) exceeded the cognitive complexity threshold of 15; the worst was LoopEngine.RunAsync at 159.

LoopEngine.RunAsync (cognitive 159)ShareRibbon/Agent/LoopEngine.vb:55
MemoryRepository.GetRelevantMemories (cognitive 154)ShareRibbon/Storage/MemoryRepository.vb:212
showContextHints (cognitive 126)ShareRibbon/Resources/js/message-sender.js:619
ChatContextBuilder.BuildMessages (cognitive 115)ShareRibbon/Controls/Services/ChatContextBuilder.vb:34
ChatControl.AppendCurrentSelectedContent (cognitive 109)PowerPointAi/ChatControl.vb:594

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

What to do

  1. Bring the 21 bodies over 60 down to 60 or less in Cognitive Complexity — start with LoopEngine.RunAsync (cognitive 159), MemoryRepository.GetRelevantMemories (cognitive 154), showContextHints (cognitive 126). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 21 together lifts Cognitive Complexity from 2.0 to about 3.6/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Stand up a CI pipeline, then gate Cognitive Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. 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 Classes6.6 / 10Adequate✓ Tool-verified

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

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

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

106 god class(es) detected.

MethodTooLong: OfficeAiDatabase.RunVersionedMigrations · ×40ShareRibbon/Storage/OfficeAiDatabase.vb:222
FileTooLong: WordAi/ChatControl.vb · ×29WordAi/ChatControl.vb
ClassTooLong: HttpStreamService · ×19ShareRibbon/Controls/Services/HttpStreamService.vb
TooManyMethods: BaseChatControl · ×16ShareRibbon/Controls/BaseChatControl.vb
FunctionTooLong: revision-manager.showComparison · ×2ShareRibbon/Resources/js/revision-manager.js:100

What to do

  1. Resolve the 40 MethodTooLong finding(s) in God Classes — start with ChatControl.vb (8), ConfigApiForm.vb (4), ReformatTemplateManager.vb (2). — One of this dimension's main actionable groups (40 warning-level).
  2. Resolve the 29 FileTooLong finding(s) in God Classes — start with ChatControl.vb (3), BaseChatControl.vb, ConfigApiForm.vb. — One of this dimension's main actionable groups (29 warning-level).
  3. Resolve the 19 ClassTooLong finding(s) in God Classes — start with HttpStreamService.vb, OfficeAiDatabase.vb, ProfessionalDeckExecutor.Operations.vb. — One of this dimension's main actionable groups (19 warning-level).
  4. Stand up a CI pipeline, then gate God Classes in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. 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.3 / 10Stronggated by 125 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.3 / 10 · rule-coverage 100% · ceiling Verified

121 duplicated block group(s) detected. A further 4 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) · ×9ShareRibbon/Config/ConfigApiForm.vb:1502
Duplicated block (9 lines × 2) · ×7PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:126
Duplicated block (6 lines × 2) · ×7ShareRibbon/Services/SkillsDirectoryService.vb:520
Duplicated block (16 lines × 2) · ×6WordAi/Services/ContentLocator.vb:151
Duplicated block (13 lines × 2) · ×5PowerPointAi/ChatControl.vb:2008

+ 59 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 ChatControl.vb (3), ConfigApiForm.vb, WordContinuationService.vb. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 7 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with PowerPointVisualVerifier.Rendered.vb, ExcelDirectOperationService.vb, SkillsService.vb. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 7 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with BaseChat.vb (2), SkillsDirectoryService.vb, ExcelDocumentTranslateService.vb. — One of this dimension's main actionable groups (7 warning-level).
  4. Stand up a CI pipeline, then gate Code Duplication in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. 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 · Coupling8.0 / 10Strong✓ 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 8.0 / 10 · rule-coverage 100% · ceiling Prevented

4 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).

Off the main sequence: ShareRibbonShareRibbon/ShareRibbon.vbproj:1

What to do

  1. Resolve the 1 Off the main sequence finding(s) in Coupling — start with ShareRibbon.vbproj. — One of this dimension's main actionable groups (1 warning-level).
  2. Stand up a CI pipeline, then gate Coupling in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. 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.8 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

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

2 of 125 classes have LCOM4 above 3.

Low cohesion: AboutForm (LCOM4 4) · ×2ShareRibbon/Config/AboutForm.vb:8

What to do

  1. Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with AboutForm.vb, ChatStateService.vb. — One of this dimension's main actionable groups (2 warning-level).
  2. Stand up a CI pipeline, then gate Cohesion (LCOM4) in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. 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.

D8 · Code Coverage0.0 / 10Critical✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

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

No automated tests — no test code was found in this repository.

No automated tests

What to do

  1. Resolve the 1 No automated tests finding(s) in Code Coverage. — One of this dimension's main actionable groups (1 issue-level).
  2. Stand up a CI pipeline, then gate Code Coverage in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D9 · Test Distribution0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

No test suite found.

No tests found

What to do

  1. Resolve the 1 No tests found finding(s) in Test Distribution. — One of this dimension's main actionable groups (1 recommendation-level).

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

D13 · Secret Scanning5.0 / 10Adequate✓ Tool-verified

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 5.0 / 10 · rule-coverage 100% · ceiling Prevented

1 secret(s) detected.

REDACTED

What to do

  1. Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Stand up a CI pipeline, then gate Secret Scanning in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

0 of 166 packages use a banned license. The depth of this set was not established for this repository: the graded packages are what this pass resolved, and no lockfile was read, so it is not certified to be the full transitive closure.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.3 / 10Stronggated by 10 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.3 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: ShareRibbon/Agent/LoopEngine.vb (6×78=468); ShareRibbon/Agent/ToolRegistry.vb (4×43=172); ShareRibbon/Controls/BaseChatControl.vb (7×21=147)

Hotspot: ShareRibbon/Agent/LoopEngine.vb · ×10ShareRibbon/Agent/LoopEngine.vb:55

What to do

  1. Resolve the 10 Hotspot finding(s) in Churn × Complexity Hotspots — start with ChatControl.vb (2), LoopEngine.vb, ToolRegistry.vb. — One of this dimension's main actionable groups (10 warning-level).

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

D16 · Bus Factor9.0 / 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.0 / 10 · rule-coverage 100% · ceiling Documented

25 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is ShareRibbon/Mcp/MCPConfigForm.vb. Counted over 247 of the 287 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
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 Debt4.5 / 10Weak✓ 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 4.5 / 10 · rule-coverage 100% · ceiling Prevented

241 deducted debt markers + unmeasured dead symbols across 85829 LoC in the .NET projects (2.7/KLoC) → score 4.5. Dead code not measured: the solution did not load cleanly, so the reference search was skipped.

EmptyCatchBlock · ×241ExcelAi/ChatControl.vb:176

What to do

  1. Resolve the 241 EmptyCatchBlock finding(s) in Explicit Debt — start with ChatControl.vb (52), SemanticRenderingEngine.vb (24), ReformatCoordinator.vb (20). — One of this dimension's main actionable groups (241 issue-level).
  2. Stand up a CI pipeline, then gate Explicit Debt in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. 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.

D18 · Solution Shape10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the solution is laid out in a sensible, conventional structure.

Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.

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

4 projects, 286 source files, 85829 hand-written lines of code (85829 production / 0 test — the split is derived per file: test is what its project, its own path, or a compile-guarded region marks as test, and a file carrying no test signal counts as production), plus 2535 generated (machine-written code — designer, scaffolded and tool-emitted files — excluded from quality), 3 inter-project edges (build NOT measured — `dotnet build` did not complete in the analyzer, so the build half of this dimension is unmeasured rather than failed: the score above rests on structure alone and is not capped. The diagnostics that stopped it are named under Limitations.)

✓ On the Gold path — maintain.

Detailed fixes: d18_recommendation.md.

D26 · Project Cohesion5.0 / 10Adequate✓ 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 5.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 4 projects flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

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

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

Method: 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 9.0 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)10.0 / 10Exemplary○ Nothing flagged

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 10.0 / 10 · rule-coverage 100% · ceiling Documented

semgrep found no security issues.

✓ On the Gold path — maintain.

Detailed fixes: d29_recommendation.md.

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

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

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

2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Partial dependency scan: 1 of 2 declared ecosystem(s) were scanned (nuget REDACTED), and the findings above are real and complete for them. nuget was not scanned (nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan), so this is not the whole dependency surface and the result is reported at reduced confidence.

REDACTED

What to do

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

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

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

30 of 247 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is PowerPointAi/Design/SlideComponentLibrary.vb. Counted over 247 of the 287 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×10PowerPointAi/Design/SlideComponentLibrary.vb:1
Orphaned file · ×20PowerPointAi/Runtime/PowerPointOperationObserver.vb:1
Further orphaned files (smaller)

What to do

  1. Resolve the 10 Orphaned knowledge finding(s) in Knowledge Freshness — start with SlideComponentLibrary.vb, SlideComponentLibrary.Patterns.vb, ProfessionalDeckExecutor.Operations.vb. — One of this dimension's main actionable groups (10 issue-level).
  2. Resolve the 20 Orphaned file finding(s) in Knowledge Freshness — start with PowerPointOperationObserver.vb, AiNativeRuntime.vb, ExcelContextProvider.vb. — One of this dimension's main actionable groups (20 recommendation-level).
  3. 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 Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

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

Frontend & cross-cutting dimensions

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

AX10 · Code composition9.1 / 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.

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

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

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

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

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

Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

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

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

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

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

What to do

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

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

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

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

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure6.0 / 10Adequate✓ 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.

  • Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
  • Only 1/4 projects share a common root namespace — the code's module identity is inconsistent.

What to do

  • Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
  • Adopt a consistent root-namespace convention (a shared prefix, e.g. Acme.*); short project-file/directory names are fine as long as the RootNamespace is uniform.
M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

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.

P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified

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.

  • No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.

What to do

  • Add a CI workflow that builds and runs the test suite on every push/PR.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add a Roslyn security analyzer package referenced from the project (the analyzer packages do analyse VB.NET), plus gitleaks for committed secrets — CodeQL has no VB.NET extractor, so its csharp pack would extract nothing from this tree and then report it clean — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Run what this repository's stack ships: a Roslyn security analyzer package referenced from the project (the analyzer packages do analyse VB.NET), plus gitleaks for committed secrets — CodeQL has no VB.NET extractor, so its csharp pack would extract nothing from this tree and then report it clean — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene5.0 / 10Adequate✓ 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.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
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.

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

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

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

  • 0 typed · 23 plain JS — the untyped files are ShareRibbon/Resources/js/agent-card.js, ShareRibbon/Resources/js/agent-protocol.js, ShareRibbon/Resources/js/autocomplete.js, ShareRibbon/Resources/js/chat-manager.js, ShareRibbon/Resources/js/code-handler.js, ShareRibbon/Resources/js/command-palette.js (+17 more).

What to do

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

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

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

  • ShareRibbon/Resources/js/code-handler.js:459 · ShareRibbon/Resources/js/code-handler.js:1089 — the two spans are one implementation copied and then locally edited — 354 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ShareRibbon/Resources/js/code-handler.js:459
  • scripts/check-agent-card-ui.js:13 · scripts/check-history-grouping-ui.js:14 — the two spans are one implementation copied and then locally edited — 392 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/check-agent-card-ui.js:13
  • ShareRibbon/Resources/js/revision-manager.js:191 · ShareRibbon/Resources/js/revision-manager.js: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. — ShareRibbon/Resources/js/revision-manager.js:191
  • ShareRibbon/Resources/js/markdown-renderer.js:248 · ShareRibbon/Resources/js/markdown-renderer.js:270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ShareRibbon/Resources/js/markdown-renderer.js:248
  • ShareRibbon/Resources/js/proofread-ui.js:102 · ShareRibbon/Resources/js/proofread-ui.js:122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ShareRibbon/Resources/js/proofread-ui.js:102
  • ShareRibbon/Resources/js/reformat-template.js:273 · ShareRibbon/Resources/js/reformat-template.js:682 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ShareRibbon/Resources/js/reformat-template.js:273
  • ShareRibbon/Resources/js/code-handler.js:920 · ShareRibbon/Resources/js/code-handler.js:964 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ShareRibbon/Resources/js/code-handler.js:920
  • ShareRibbon/Resources/js/reformat-template.js:231 · ShareRibbon/Resources/js/reformat-template.js:298 · ShareRibbon/Resources/js/reformat-template.js:707 — 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. — ShareRibbon/Resources/js/reformat-template.js:231
  • ShareRibbon/Resources/js/reformat-template.js:1275 · ShareRibbon/Resources/js/reformat-template.js:1367 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ShareRibbon/Resources/js/reformat-template.js:1275
  • ShareRibbon/Resources/js/code-handler.js:94 · ShareRibbon/Resources/js/code-handler.js:1325 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ShareRibbon/Resources/js/code-handler.js:94
  • ShareRibbon/Resources/js/agent-card.js:18 · ShareRibbon/Resources/js/agent-card.js:36 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ShareRibbon/Resources/js/agent-card.js:18
  • ShareRibbon/Resources/js/chat-manager.js:195 · ShareRibbon/Resources/js/chat-manager.js:207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ShareRibbon/Resources/js/chat-manager.js:195
  • ShareRibbon/Resources/js/history-manager.js:392 · ShareRibbon/Resources/js/message-sender.js:15 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ShareRibbon/Resources/js/history-manager.js:392
  • ShareRibbon/Resources/js/autocomplete.js:206 · ShareRibbon/Resources/js/proofread-ui.js:185 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — ShareRibbon/Resources/js/autocomplete.js:206
  • ShareRibbon/Resources/js/code-handler.js:1287 · ShareRibbon/Resources/js/code-handler.js:1350 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ShareRibbon/Resources/js/code-handler.js:1287
  • ShareRibbon/Resources/js/history-manager.js:121 · ShareRibbon/Resources/js/history-manager.js:137 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ShareRibbon/Resources/js/history-manager.js:121
  • ShareRibbon/Resources/js/agent-card.js:300 · ShareRibbon/Resources/js/agent-card.js:535 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ShareRibbon/Resources/js/agent-card.js:300
  • ShareRibbon/Resources/js/autocomplete.js:206 · ShareRibbon/Resources/js/proofread-ui.js:185 · ShareRibbon/Resources/js/reformat-chat.js:502 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ShareRibbon/Resources/js/autocomplete.js:206
  • ShareRibbon/Resources/js/chat-manager.js:202 · ShareRibbon/Resources/js/chat-manager.js:214 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ShareRibbon/Resources/js/chat-manager.js:202
  • ShareRibbon/Resources/js/chat-manager.js:404 · ShareRibbon/Resources/js/onboarding.js:76 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ShareRibbon/Resources/js/chat-manager.js:404
  • ShareRibbon/Resources/js/code-handler.js:126 · ShareRibbon/Resources/js/code-handler.js:1685 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ShareRibbon/Resources/js/code-handler.js:126
  • ShareRibbon/Resources/js/revision-manager.js:107 · ShareRibbon/Resources/js/revision-manager.js:395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ShareRibbon/Resources/js/revision-manager.js:107
  • ShareRibbon/Resources/js/agent-card.js:335 · ShareRibbon/Resources/js/agent-card.js:344 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ShareRibbon/Resources/js/agent-card.js:335
  • ShareRibbon/Resources/js/revision-manager.js:226 · ShareRibbon/Resources/js/revision-manager.js:343 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ShareRibbon/Resources/js/revision-manager.js:226
  • ShareRibbon/Resources/js/agent-card.js:463 · ShareRibbon/Resources/js/agent-card.js:497 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ShareRibbon/Resources/js/agent-card.js:463
  • ShareRibbon/Resources/js/code-handler.js:1441 · ShareRibbon/Resources/js/core.js:46 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ShareRibbon/Resources/js/code-handler.js:1441
  • scripts/check-agent-card-ui.js:428 · scripts/check-agent-card-ui.js:522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — scripts/check-agent-card-ui.js:428
  • ShareRibbon/Resources/js/agent-card.js:685 · ShareRibbon/Resources/js/agent-card.js:691 · ShareRibbon/Resources/js/agent-card.js:697 · ShareRibbon/Resources/js/message-sender.js:703 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — ShareRibbon/Resources/js/agent-card.js:685
  • ShareRibbon/Resources/js/agent-card.js:693 · ShareRibbon/Resources/js/agent-card.js:698 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ShareRibbon/Resources/js/agent-card.js:693
  • ShareRibbon/Resources/js/code-handler.js:2077 · ShareRibbon/Resources/js/history-manager.js:390 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — ShareRibbon/Resources/js/code-handler.js:2077
  • ShareRibbon/Resources/js/core.js:157 · ShareRibbon/Resources/js/core.js:174 — the two spans are one implementation copied and then locally edited — 52 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ShareRibbon/Resources/js/core.js:157

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R2 · Cyclomatic Complexity2.9 / 10Weak✓ Tool-verified

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

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

  • showContextHints has cyclomatic complexity 69 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/message-sender.js:619
  • showAgentExecutionExplanation has cyclomatic complexity 61 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/agent-card.js:673
  • showMappingPreview has cyclomatic complexity 28 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/reformat-template.js:1324
  • sendChatMessage has cyclomatic complexity 28 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/message-sender.js:29
  • parseJsonToPlan has cyclomatic complexity 25 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/code-handler.js:1507
  • showAgentPlanCard has cyclomatic complexity 24 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/agent-card.js:81
  • completeAgent has cyclomatic complexity 23 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/agent-card.js:865
  • showComparison has cyclomatic complexity 23 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/revision-manager.js:100
  • code has cyclomatic complexity 22 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/core.js:23
  • previewTemplate has cyclomatic complexity 22 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/reformat-template.js:828
  • handleSmartInputKeydown has cyclomatic complexity 21 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/autocomplete.js:106
  • (anonymous) has cyclomatic complexity 20 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/message-sender.js:701
  • executeCodeAutoMode has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/code-handler.js:1316
  • _createTemplateCard has cyclomatic complexity 18 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/markdown-renderer.js:117
  • setStepEditResult has cyclomatic complexity 18 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/agent-card.js:497
  • executeCode has cyclomatic complexity 18 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/code-handler.js:90
  • setChatMessages has cyclomatic complexity 16 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/chat-manager.js:297
  • (anonymous) has cyclomatic complexity 15 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/reformat-template.js:1275
  • renderAgentChangeSummary has cyclomatic complexity 15 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/agent-card.js:942
  • updateContinuationModeUI has cyclomatic complexity 14 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ShareRibbon/Resources/js/code-handler.js:668

What to do

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

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

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

  • ShareRibbon/Resources/js/code-handler.js has 1857 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ShareRibbon/Resources/js/code-handler.js:1
  • ShareRibbon/Resources/js/reformat-template.js has 1255 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ShareRibbon/Resources/js/reformat-template.js:1
  • ShareRibbon/Resources/js/agent-card.js has 1002 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ShareRibbon/Resources/js/agent-card.js:1
  • ShareRibbon/Resources/js/message-sender.js has 703 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ShareRibbon/Resources/js/message-sender.js:1
  • ShareRibbon/Resources/js/proofread-ui.js has 634 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ShareRibbon/Resources/js/proofread-ui.js:1
  • ShareRibbon/Resources/js/reformat-chat.js has 536 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ShareRibbon/Resources/js/reformat-chat.js:1
  • ShareRibbon/Resources/js/revision-manager.js has 435 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ShareRibbon/Resources/js/revision-manager.js:1
  • ShareRibbon/Resources/js/autocomplete.js has 413 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ShareRibbon/Resources/js/autocomplete.js:1
  • ShareRibbon/Resources/js/chat-manager.js has 402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ShareRibbon/Resources/js/chat-manager.js:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage0.0 / 10Critical✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

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

What to do

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

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

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

  • Unreachable from the 5 application, 0 tooling and 0 test entry point(s) detected in this repo. This repository declares no build, type-check or test script, so nothing here would fail on a wrong deletion — confirm by hand that nothing loads each file (including by a path built at runtime) before removing it. An undetected custom entry would make these reachable.
  • no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×18) — ShareRibbon/Resources/js/code-handler.js, ShareRibbon/Resources/js/reformat-template.js, ShareRibbon/Resources/js/message-sender.js, …

What to do

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

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

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

S1 · Web-Security Posture8.0 / 10Strong✓ Tool-verified

Other · Security — Only what this repository's own non-C# files could be read for was assessed — markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

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

  • `http://officeai.local/js/marked.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 23 such include(s) across the repository's markup. — ShareRibbon/Resources/chat-template-refactored.html:8

What to do

  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

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

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

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 Health16%Critical — gated by D1, D2, R1, R2, R3, R7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture92%ExemplaryStrongest area.
Maturity55%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness15%Critical — gated by D8, D9, R4, P1, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security87%StrongSolid.
Unscored — 3 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.

  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X10 Duplicated predicate — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 3 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 — 78 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 user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC7 A11y enforcement — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • 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 — No tests were found in the analyzed repository to assess for quality.
  • D11 Test Reliability — No test suite was found to re-run, so reliability couldn't be assessed. Two searches produced that zero and both came back empty: the classifier that reads the loaded workspace recognised no suite it could run, and a walk of the source on disk — which covers the JS/TS `*.test.*` and `*.spec.*` conventions and probes for a Pester suite — found no test source in any other ecosystem either. Neither search reaches a suite that is missing from the loaded workspace and carries no name either walk recognises, so this is 'no suite found by those two searches', not a verdict that the repository has none.
  • D12 Dependency Hygiene — Dependency hygiene not measured
  • D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D21 Naming Consistency — Naming consistency is measured on C# only; JavaScript, Python, Visual Basic, html not measured.
  • D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
  • D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
  • D24 Comment Value — 4341 of 4367 comment blocks were not judged (4127 in a non-Latin script, 214 in a language other than English): redundancy is judged by word overlap with the code's identifiers, which cannot be measured across languages.
  • 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.
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
  • 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 — IL not measured — the analyzer's build of the target did not succeed
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • 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
  • P12 CI test-gate honesty — no CI workflow found
  • P2 Observability — This repo is a library, not a deployed service — it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
  • P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (Cobertura — `dotnet test --collect:"XPlat Code Coverage"` with a `coverlet.collector` PackageReference) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for a BenchmarkDotNet reference in an .fsproj or .vbproj, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: allocation awareness is rated where code engineers for it — at least 400 production lines that ship benchmarks or already use allocation-aware idioms (8 or more). This repository's Visual Basic code has 99,010 production line(s), 0 such use(s) and no benchmarks, so there is no allocation work to rate. The card is reward-only: its absence costs nothing.
  • PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
  • R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
  • 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
  • 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.
  • 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
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 256 finding(s)
D17 · Explicit Debt · EmptyCatchBlock · ×241
  • EmptyCatchBlock ExcelAi/ChatControl.vb:176 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/ChatControl.vb:369 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/ChatControl.vb:1107 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/ChatControl.vb:1143 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/ChatControl.vb:1223 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/ChatControl.vb:1411 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/ChatControl.vb:1457 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/ChatControl.vb:1603 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/Context/ExcelContextProvider.vb:23 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/Context/ExcelContextProvider.vb:148 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/Context/ExcelContextProvider.vb:180 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/Context/ExcelContextProvider.vb:197 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/Context/ExcelContextProvider.vb:219 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/Context/ExcelContextProvider.vb:292 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/DeepseekControl.vb:170 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/EnhancedPreviewAndConfirm.vb:116 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/EnhancedPreviewAndConfirm.vb:124 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/EnhancedPreviewAndConfirm.vb:138 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/EnhancedPreviewAndConfirm.vb:441 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/ExcelDirectOperationService.vb:469 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/ExcelDirectOperationService.vb:518 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/ExcelDirectOperationService.vb:1619 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/ExcelDirectOperationService.vb:1712 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/ExcelDirectOperationService.vb:1967 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ExcelAi/HostEntry/ExcelContextMenu.vb:50 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • + 216 more in this group — see findings.md.
D34 · Knowledge Freshness · Orphaned knowledge · ×10
  • Orphaned knowledge PowerPointAi/Design/SlideComponentLibrary.vb:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge PowerPointAi/Design/SlideComponentLibrary.Patterns.vb:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge PowerPointAi/Design/ProfessionalDeckExecutor.Operations.vb:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge PowerPointAi/Runtime/PowerPointApiCatalogProvider.vb:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge PowerPointAi/Design/ProfessionalDeckExecutor.vb:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge WordAi/Services/WordFormattingAgent.vb:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge PowerPointAi/Design/PowerPointVisualVerifier.vb:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge PowerPointAi/Design/SlideDesignModels.vb:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge PowerPointAi/Design/PowerPointSceneRenderer.vb:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D30 · Dependency Vulnerabilities · High CVE · ×2
  • REDACTED
  • REDACTED
D13 · Secret Scanning · Leaked secret · ×1
  • REDACTED
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D8 · Code Coverage · No automated tests · ×1
  • No automated tests — No automated tests — no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (xUnit, NUnit or MSTest), and run it in CI so the gap cannot reopen.
Serious — 795 finding(s)
D3 · God Classes · MethodTooLong · ×40
  • MethodTooLong: OfficeAiDatabase.RunVersionedMigrations ShareRibbon/Storage/OfficeAiDatabase.vb:222 — MethodTooLong — RunVersionedMigrations runs 416 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 316 over it, 4.16× 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: LoopEngine.RunAsync ShareRibbon/Agent/LoopEngine.vb:55 — MethodTooLong — RunAsync runs 398 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 298 over it, 3.98× 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: ReformatTemplateManager.CreateAdministrativeTemplate ShareRibbon/Config/ReformatTemplateManager.vb:465 — MethodTooLong — CreateAdministrativeTemplate runs 267 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 167 over it, 2.67× 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: PresetProviders.GetCloudProviders ShareRibbon/Config/PresetProviders.vb:12 — MethodTooLong — GetCloudProviders runs 227 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: InstructionRegistry.Initialize ShareRibbon/Protocol/InstructionRegistry.vb:18 — MethodTooLong — Initialize runs 221 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 121 over it, 2.21× 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: ConfigApiForm.InitializeSkillsTab ShareRibbon/Config/ConfigApiForm.vb:513 — MethodTooLong — InitializeSkillsTab runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ChatContextBuilder.BuildMessages ShareRibbon/Controls/Services/ChatContextBuilder.vb:34 — MethodTooLong — BuildMessages runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ProfessionalDeckExecutor.ExecuteInternal PowerPointAi/Design/ProfessionalDeckExecutor.vb:47 — MethodTooLong — ExecuteInternal runs 194 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 94 over it, 1.94× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TranslateActionForm.InitializeControls ShareRibbon/Translate/TranslateActionForm.vb:88 — MethodTooLong — InitializeControls runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× 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: ToolRegistry.ExecuteToolAsync ShareRibbon/Agent/ToolRegistry.vb:689 — MethodTooLong — ExecuteToolAsync runs 180 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 80 over it, 1.80× 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: SkillsConfigForm.InitializeUI ShareRibbon/Config/SkillsConfigForm.vb:48 — MethodTooLong — InitializeUI runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ReformatTemplateManager.CreateGeneralOfficialTemplate ShareRibbon/Config/ReformatTemplateManager.vb:268 — MethodTooLong — CreateGeneralOfficialTemplate runs 170 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 70 over it, 1.70× 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: ExcelDirectOperationService.ExecuteCreateChart ExcelAi/ExcelDirectOperationService.vb:551 — MethodTooLong — ExecuteCreateChart runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× 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: HttpStreamService.SendToolResultForReActAsync ShareRibbon/Controls/Services/HttpStreamService.vb:1149 — MethodTooLong — SendToolResultForReActAsync runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× 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: ChatControl.AppendCurrentSelectedContent PowerPointAi/ChatControl.vb:594 — MethodTooLong — AppendCurrentSelectedContent runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PowerPointOperationExecutor.Execute PowerPointAi/Runtime/PowerPointOperationExecutor.vb:17 — MethodTooLong — Execute runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: OfficeHarness.RunAsync ShareRibbon/Agent/Harness/OfficeHarness.vb:41 — MethodTooLong — RunAsync runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ConfigApiForm.InitializeMemoryTab ShareRibbon/Config/ConfigApiForm.vb:1974 — MethodTooLong — InitializeMemoryTab runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SemanticPromptBuilder.BuildSemanticTaggingPrompt ShareRibbon/Services/Reformat/SemanticPromptBuilder.vb:28 — MethodTooLong — BuildSemanticTaggingPrompt runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ConfigApiForm.InitializeCloudTab ShareRibbon/Config/ConfigApiForm.vb:135 — MethodTooLong — InitializeCloudTab runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: HttpStreamService.SendStreamRequestAsync ShareRibbon/Controls/Services/HttpStreamService.vb:418 — MethodTooLong — SendStreamRequestAsync runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MemoryRepository.GetRelevantMemories ShareRibbon/Storage/MemoryRepository.vb:212 — MethodTooLong — GetRelevantMemories runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ConfigApiForm.InitializeLocalTab ShareRibbon/Config/ConfigApiForm.vb:308 — MethodTooLong — InitializeLocalTab runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× 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: ChatControl.ApplyReformatWithTemplate PowerPointAi/ChatControl.vb:93 — MethodTooLong — ApplyReformatWithTemplate runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× 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: ChatControl.ParseFile PowerPointAi/ChatControl.vb:454 — MethodTooLong — ParseFile runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 15 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×29
  • FileTooLong: WordAi/ChatControl.vb WordAi/ChatControl.vb — FileTooLong — 4287 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3787 over it, 8.57× 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: PowerPointAi/ChatControl.vb PowerPointAi/ChatControl.vb — FileTooLong — 2419 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1919 over it, 4.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Controls/BaseChatControl.vb ShareRibbon/Controls/BaseChatControl.vb — FileTooLong — 2407 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1907 over it, 4.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Config/ConfigApiForm.vb ShareRibbon/Config/ConfigApiForm.vb — FileTooLong — 1650 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1150 over it, 3.30× 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: ExcelAi/ExcelDirectOperationService.vb ExcelAi/ExcelDirectOperationService.vb — FileTooLong — 1480 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 980 over it, 2.96× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: js/code-handler.js ShareRibbon/Resources/js/code-handler.js — FileTooLong — 1250 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 750 over it, 2.50× 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: ExcelAi/ChatControl.vb ExcelAi/ChatControl.vb — FileTooLong — 1184 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 684 over it, 2.37× 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: Mcp/MCPConfigForm.vb ShareRibbon/Mcp/MCPConfigForm.vb — FileTooLong — 1131 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 631 over it, 2.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Services/HttpStreamService.vb ShareRibbon/Controls/Services/HttpStreamService.vb — FileTooLong — 1031 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 531 over it, 2.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Agent/ToolRegistry.vb ShareRibbon/Agent/ToolRegistry.vb — FileTooLong — 1005 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 505 over it, 2.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Storage/OfficeAiDatabase.vb ShareRibbon/Storage/OfficeAiDatabase.vb — FileTooLong — 909 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 409 over it, 1.82× 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: Reformat/SmartFormattingOrchestrator.vb ShareRibbon/Services/Reformat/SmartFormattingOrchestrator.vb — FileTooLong — 907 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 407 over it, 1.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Controls/ReformatTemplateEditorControl.vb ShareRibbon/Controls/ReformatTemplateEditorControl.vb — FileTooLong — 867 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 367 over it, 1.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Storage/AgentMemoryRepository.vb ShareRibbon/Storage/AgentMemoryRepository.vb — FileTooLong — 824 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 324 over it, 1.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Controls/BaseDataCapturePane.vb ShareRibbon/Controls/BaseDataCapturePane.vb — FileTooLong — 802 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 302 over it, 1.60× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: js/reformat-template.js ShareRibbon/Resources/js/reformat-template.js — FileTooLong — 794 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 294 over it, 1.59× 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: Services/IntentRecognitionService.vb ShareRibbon/Controls/Services/IntentRecognitionService.vb — FileTooLong — 753 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 253 over it, 1.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: js/agent-card.js ShareRibbon/Resources/js/agent-card.js — FileTooLong — 730 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 230 over it, 1.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Config/ConfigPromptForm.vb ShareRibbon/Config/ConfigPromptForm.vb — FileTooLong — 728 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 228 over it, 1.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Config/ReformatTemplateManager.vb ShareRibbon/Config/ReformatTemplateManager.vb — FileTooLong — 725 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 225 over it, 1.45× 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: Reformat/DocumentAnalyzer.vb ShareRibbon/Services/Reformat/DocumentAnalyzer.vb — FileTooLong — 709 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 209 over it, 1.42× 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: Storage/MemoryRepository.vb ShareRibbon/Storage/MemoryRepository.vb — FileTooLong — 641 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 141 over it, 1.28× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Config/ReformatTemplateEditorForm.vb ShareRibbon/Config/ReformatTemplateEditorForm.vb — FileTooLong — 634 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 134 over it, 1.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: WordAi/WebDataCapturePane.vb WordAi/WebDataCapturePane.vb — FileTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 61 over it, 1.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Agent/LoopEngine.vb ShareRibbon/Agent/LoopEngine.vb — FileTooLong — 551 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 51 over it, 1.10× 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.
  • + 4 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×19
  • ClassTooLong: HttpStreamService ShareRibbon/Controls/Services/HttpStreamService.vb — ClassTooLong — 1019 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 619 over it, 2.55× 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: OfficeAiDatabase ShareRibbon/Storage/OfficeAiDatabase.vb — ClassTooLong — 905 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 505 over it, 2.26× 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: ProfessionalDeckExecutor PowerPointAi/Design/ProfessionalDeckExecutor.Operations.vb — ClassTooLong — 804 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 404 over it, 2.01× 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: PowerPointVisualVerifier PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb — ClassTooLong — 727 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 327 over it, 1.82× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ReformatTemplateManager ShareRibbon/Config/ReformatTemplateManager.vb — ClassTooLong — 723 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 323 over it, 1.81× 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: DocumentAnalyzer ShareRibbon/Services/Reformat/DocumentAnalyzer.vb — ClassTooLong — 640 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 240 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.
  • ClassTooLong: ReformatTemplateEditorForm ShareRibbon/Config/ReformatTemplateEditorForm.vb — ClassTooLong — 630 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 230 over it, 1.58× 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: MemoryRepository ShareRibbon/Storage/MemoryRepository.vb — ClassTooLong — 584 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 184 over it, 1.46× 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: WebDataCapturePane WordAi/WebDataCapturePane.vb — ClassTooLong — 552 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 152 over it, 1.38× 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: AgentKernelService ShareRibbon/Controls/Services/AgentKernelService.RunControl.vb — ClassTooLong — 540 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 140 over it, 1.35× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: OfficeHarness ShareRibbon/Agent/Harness/OfficeHarness.Approvals.vb — ClassTooLong — 488 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 88 over it, 1.22× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PowerPointOperationExecutor PowerPointAi/Runtime/PowerPointOperationExecutor.vb — ClassTooLong — 461 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 61 over it, 1.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SkillsDirectoryService ShareRibbon/Services/SkillsDirectoryService.vb — ClassTooLong — 453 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 53 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ReformatService ShareRibbon/Controls/Services/ReformatService.vb — ClassTooLong — 440 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 40 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SemanticRenderingEngine ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb — ClassTooLong — 436 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 36 over it, 1.09× 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: ChatFormatterAgent ShareRibbon/Controls/Services/ChatFormatterAgent.vb — ClassTooLong — 426 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 26 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PowerPointApiCatalogProvider PowerPointAi/Runtime/PowerPointApiCatalogProvider.vb — ClassTooLong — 419 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 19 over it, 1.05× 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: TaskPackageCatalog ShareRibbon/Agent/TaskPackageCatalog.Parsing.vb — ClassTooLong — 410 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 10 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TranslateActionForm ShareRibbon/Translate/TranslateActionForm.vb — ClassTooLong — 405 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 5 over it, 1.01× 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 · TooManyMethods · ×16
  • TooManyMethods: BaseChatControl ShareRibbon/Controls/BaseChatControl.vb — TooManyMethods — 2388 significant lines (blank, comment-only and punctuation-only lines excluded), 166 methods. The bar is 30 methods; this is 136 over it, 5.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ChatControl WordAi/ChatControl.vb — TooManyMethods — 4259 significant lines (blank, comment-only and punctuation-only lines excluded), 160 methods. The bar is 30 methods; this is 130 over it, 5.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ChatControl PowerPointAi/ChatControl.vb — TooManyMethods — 2396 significant lines (blank, comment-only and punctuation-only lines excluded), 87 methods. The bar is 30 methods; this is 57 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ConfigApiForm ShareRibbon/Config/ConfigApiForm.vb — TooManyMethods — 1633 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 30 methods; this is 29 over it, 1.97× 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: ChatControl ExcelAi/ChatControl.vb — TooManyMethods — 1160 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 30 methods; this is 22 over it, 1.73× 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: LoopEngine ShareRibbon/Agent/LoopEngine.Coverage.vb — TooManyMethods — 1291 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BaseDataCapturePane ShareRibbon/Controls/BaseDataCapturePane.vb — TooManyMethods — 775 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ExcelDirectOperationService ExcelAi/ExcelDirectOperationService.vb — TooManyMethods — 1476 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SlideComponentLibrary PowerPointAi/Design/SlideComponentLibrary.Patterns.vb — TooManyMethods — 918 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AgentMemoryRepository ShareRibbon/Storage/AgentMemoryRepository.vb — TooManyMethods — 822 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ReformatTemplateEditorControl ShareRibbon/Controls/ReformatTemplateEditorControl.vb — TooManyMethods — 863 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ToolRegistry ShareRibbon/Agent/ToolRegistry.vb — TooManyMethods — 848 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SmartFormattingOrchestrator ShareRibbon/Services/Reformat/SmartFormattingOrchestrator.vb — TooManyMethods — 802 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MCPConfigForm ShareRibbon/Mcp/MCPConfigForm.vb — TooManyMethods — 1124 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ConfigPromptForm ShareRibbon/Config/ConfigPromptForm.vb — TooManyMethods — 723 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: IntentRecognitionService ShareRibbon/Controls/Services/IntentRecognitionService.vb — TooManyMethods — 698 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D15 · Churn × Complexity Hotspots · Hotspot · ×10
  • Hotspot: ShareRibbon/Agent/LoopEngine.vb ShareRibbon/Agent/LoopEngine.vb:55 — ShareRibbon/Agent/LoopEngine.vb changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in LoopEngine.RunAsync at line 55. 2 of those changes were fix/bug commits, and the other 4 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 22:07:20 +08:00' --until='2026-10-25 22:07:20 +08:00' --full-history --no-merges -- ShareRibbon/Agent/LoopEngine.vb`: 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: ShareRibbon/Agent/ToolRegistry.vb ShareRibbon/Agent/ToolRegistry.vb:689 — ShareRibbon/Agent/ToolRegistry.vb changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in ToolRegistry.ExecuteToolAsync at line 689. 2 of those changes were fix/bug commits, and the other 2 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 22:07:20 +08:00' --until='2026-10-25 22:07:20 +08:00' --full-history --no-merges -- ShareRibbon/Agent/ToolRegistry.vb`: 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: ShareRibbon/Controls/BaseChatControl.vb ShareRibbon/Controls/BaseChatControl.vb:2383 — ShareRibbon/Controls/BaseChatControl.vb changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in BaseChatControl.SendAndGetResponseAsync at line 2383. 2 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 22:07:20 +08:00' --until='2026-10-25 22:07:20 +08:00' --full-history --no-merges -- ShareRibbon/Controls/BaseChatControl.vb`: 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: ShareRibbon/Resources/js/agent-card.js ShareRibbon/Resources/js/agent-card.js:81 — ShareRibbon/Resources/js/agent-card.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in agent-card.showAgentPlanCard at line 81. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 22:07:20 +08:00' --until='2026-10-25 22:07:20 +08:00' --full-history --no-merges -- ShareRibbon/Resources/js/agent-card.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: ShareRibbon/Agent/Harness/OfficeHarness.vb ShareRibbon/Agent/Harness/OfficeHarness.vb:215 — ShareRibbon/Agent/Harness/OfficeHarness.vb changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in OfficeHarness.DecideAsync at line 215. 2 of those changes were fix/bug commits, and the other 2 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 22:07:20 +08:00' --until='2026-10-25 22:07:20 +08:00' --full-history --no-merges -- ShareRibbon/Agent/Harness/OfficeHarness.vb`: 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: ShareRibbon/Controls/Services/AgentKernelService.vb ShareRibbon/Controls/Services/AgentKernelService.vb:101 — ShareRibbon/Controls/Services/AgentKernelService.vb changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in AgentKernelService.StartAgentAsync at line 101. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 22:07:20 +08:00' --until='2026-10-25 22:07:20 +08:00' --full-history --no-merges -- ShareRibbon/Controls/Services/AgentKernelService.vb`: 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: ShareRibbon/Agent/AgentKernel.vb ShareRibbon/Agent/AgentKernel.vb:268 — ShareRibbon/Agent/AgentKernel.vb changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in AgentKernel.ExecuteAsync at line 268. 1 of those changes was a fix/bug commit, and the other 4 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 22:07:20 +08:00' --until='2026-10-25 22:07:20 +08:00' --full-history --no-merges -- ShareRibbon/Agent/AgentKernel.vb`: 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: PowerPointAi/ChatControl.vb PowerPointAi/ChatControl.vb:1333 — PowerPointAi/ChatControl.vb changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ChatControl.ExecuteJsonCommandWithToolResult at line 1333. 2 of those changes were fix/bug commits, and the other 2 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 22:07:20 +08:00' --until='2026-10-25 22:07:20 +08:00' --full-history --no-merges -- PowerPointAi/ChatControl.vb`: 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: WordAi/ChatControl.vb WordAi/ChatControl.vb:3773 — WordAi/ChatControl.vb changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in ChatControl.ExecuteWordCommandsArrayWithToolResult at line 3773. 1 of those changes was a fix/bug commit, and the other 2 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 22:07:20 +08:00' --until='2026-10-25 22:07:20 +08:00' --full-history --no-merges -- WordAi/ChatControl.vb`: 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: ShareRibbon/Config/ChatSettings.vb ShareRibbon/Config/ChatSettings.vb:145 — ShareRibbon/Config/ChatSettings.vb changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ChatSettings.LoadSettings at line 145. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 22:07:20 +08:00' --until='2026-10-25 22:07:20 +08:00' --full-history --no-merges -- ShareRibbon/Config/ChatSettings.vb`: 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×9
  • Duplicated block (8 lines × 2) ShareRibbon/Config/ConfigApiForm.vb:1502 — ShareRibbon/Config/ConfigApiForm.vb:1502-1509 | ShareRibbon/Config/ConfigApiForm.vb:1522-1529 — both copies are in the same file, so extract the 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) ExcelAi/ChatControl.vb:1260 — ExcelAi/ChatControl.vb:1260-1267 | PowerPointAi/ChatControl.vb:1390-1397 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) WordAi/WordContinuationService.vb:98 — WordAi/WordContinuationService.vb:98-105 | WordAi/WordContinuationService.vb:112-119 — both copies are in the same file, so extract the 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) ShareRibbon/Controls/BaseChatControl.vb:1773 — ShareRibbon/Controls/BaseChatControl.vb:1773-1780 | ShareRibbon/Controls/BaseChatControl.vb:2064-2071 — both copies are in the same file, so extract the 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) ShareRibbon/Mcp/StreamJsonRpcMCPClient.vb:225 — ShareRibbon/Mcp/StreamJsonRpcMCPClient.vb:225-232 | ShareRibbon/Mcp/StreamJsonRpcMCPClient.vb:486-494 — both copies are in the same file, so extract the 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) PowerPointAi/ChatControl.vb:825 — PowerPointAi/ChatControl.vb:825-832 | PowerPointAi/ChatControl.vb:2419-2426 — both copies are in the same file, so extract the 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) ExcelAi/ChatControl.vb:630 — ExcelAi/ChatControl.vb:630-637 | ExcelAi/ChatControl.vb:712-719 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ExcelAi/ChatControl.vb:712` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) ShareRibbon/Services/Reformat/ReformatCoordinator.vb:349 — ShareRibbon/Services/Reformat/ReformatCoordinator.vb:349-356 | ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:390-399 — 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) PowerPointAi/PowerPointJsonCommandSchema.vb:383 — PowerPointAi/PowerPointJsonCommandSchema.vb:383-390 | WordAi/WordJsonCommandSchema.vb:365-372 — before extracting anything, compare `PowerPointAi/PowerPointJsonCommandSchema.vb` and `WordAi/WordJsonCommandSchema.vb` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×7
  • Duplicated block (9 lines × 2) PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:126 — PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:126-134 | PowerPointAi/Design/PowerPointVisualVerifier.vb:90-98 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) ExcelAi/ExcelDirectOperationService.vb:804 — ExcelAi/ExcelDirectOperationService.vb:804-812 | ExcelAi/ExcelDirectOperationService.vb:846-854 — both copies are in the same file, so extract the 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) ShareRibbon/Services/SkillsService.vb:479 — ShareRibbon/Services/SkillsService.vb:479-487 | ShareRibbon/Services/SkillsService.vb:507-515 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ShareRibbon/Services/SkillsService.vb:488` calls `AppendLine` and `ShareRibbon/Services/SkillsService.vb:516` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) ShareRibbon/Security/SecureConfigManager.vb:61 — ShareRibbon/Security/SecureConfigManager.vb:61-69 | ShareRibbon/Security/SecureConfigManager.vb:263-271 — both copies are in the same file, so extract the 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) ShareRibbon/Controls/Services/McpService.vb:29 — ShareRibbon/Controls/Services/McpService.vb:29-37 | ShareRibbon/Controls/Services/McpService.vb:80-89 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) PowerPointAi/Design/DesignSystemCatalog.vb:124 — PowerPointAi/Design/DesignSystemCatalog.vb:124-132 | PowerPointAi/Design/PowerPointVisualVerifier.vb:141-149 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) ExcelAi/DeepseekControl.vb:130 — ExcelAi/DeepseekControl.vb:130-138 | ExcelAi/DoubaoChat.vb:101-109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×7
  • Duplicated block (6 lines × 2) ShareRibbon/Services/SkillsDirectoryService.vb:520 — ShareRibbon/Services/SkillsDirectoryService.vb:520-525 | ShareRibbon/Services/SkillsDirectoryService.vb:538-543 — both copies are in the same file, so extract the 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) ExcelAi/ExcelDocumentTranslateService.vb:346 — ExcelAi/ExcelDocumentTranslateService.vb:346-351 | ShareRibbon/Controls/Services/AutocompleteService.vb:159-164 — 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) ShareRibbon/Controls/Services/MemoryService.vb:175 — ShareRibbon/Controls/Services/MemoryService.vb:175-180 | ShareRibbon/Controls/Services/MemoryService.vb:187-192 — both copies are in the same file, so extract the 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) WordAi/Services/SmartFormatter.vb:260 — WordAi/Services/SmartFormatter.vb:260-265 | WordAi/Services/WordFormattingAgent.vb:495-500 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) ShareRibbon/Controls/BaseChat.vb:317 — ShareRibbon/Controls/BaseChat.vb:317-323 | ShareRibbon/Controls/BaseDeepseekChat.vb:263-268 — before extracting anything, compare `ShareRibbon/Controls/BaseChat.vb` and `ShareRibbon/Controls/BaseDeepseekChat.vb` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) ShareRibbon/Controls/BaseChat.vb:530 — ShareRibbon/Controls/BaseChat.vb:530-535 | ShareRibbon/Controls/BaseDeepseekChat.vb:766-771 — before extracting anything, compare `ShareRibbon/Controls/BaseChat.vb` and `ShareRibbon/Controls/BaseDeepseekChat.vb` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) ExcelAi/Undo/ExcelRunRestore.vb:269 — ExcelAi/Undo/ExcelRunRestore.vb:269-274 | PowerPointAi/Undo/PowerPointRunRestore.vb:258-263 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×6
  • Duplicated block (16 lines × 2) WordAi/Services/ContentLocator.vb:151 — WordAi/Services/ContentLocator.vb:151-166 | WordAi/Services/ContentLocator.vb:187-202 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) PowerPointAi/ChatControl.vb:1750 — PowerPointAi/ChatControl.vb:1750-1765 | WordAi/ChatControl.vb:4735-4750 — 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 (16 lines × 2) PowerPointAi/ChatControl.vb:1000 — PowerPointAi/ChatControl.vb:1000-1015 | WordAi/ChatControl.vb:3460-3475 — 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 (16 lines × 2) ShareRibbon/Controls/Services/IntentRecognitionService.vb:388 — ShareRibbon/Controls/Services/IntentRecognitionService.vb:388-403 | ShareRibbon/Controls/Services/IntentRecognitionService.vb:417-435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (16 lines × 2) WordAi/WordDocumentTranslateService.vb:49 — WordAi/WordDocumentTranslateService.vb:49-64 | WordAi/WordDocumentTranslateService.vb:71-86 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) PowerPointAi/PowerPointCompletionManager.vb:206 — PowerPointAi/PowerPointCompletionManager.vb:206-221 | WordAi/WordCompletionManager.vb:221-236 — before extracting anything, compare `PowerPointAi/PowerPointCompletionManager.vb` and `WordAi/WordCompletionManager.vb` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×5
  • Duplicated block (13 lines × 2) PowerPointAi/ChatControl.vb:2008 — PowerPointAi/ChatControl.vb:2008-2020 | WordAi/ChatControl.vb:4958-4970 — 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 (13 lines × 2) PowerPointAi/ThisAddIn.vb:76 — PowerPointAi/ThisAddIn.vb:76-88 | WordAi/ThisAddIn.vb:234-246 — `PowerPointAi/ThisAddIn.vb` and `WordAi/ThisAddIn.vb` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 40 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (13 lines × 2) PowerPointAi/PowerPointDocumentTranslateService.vb:502 — PowerPointAi/PowerPointDocumentTranslateService.vb:502-514 | WordAi/WordDocumentTranslateService.vb:151-163 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `WordAi/WordDocumentTranslateService.vb:166` calls `AppendLine`, `String` and `PowerPointAi/PowerPointDocumentTranslateService.vb:516` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) ExcelAi/ExcelJsonCommandSchema.vb:888 — ExcelAi/ExcelJsonCommandSchema.vb:888-900 | PowerPointAi/PowerPointJsonCommandSchema.vb:505-517 — before extracting anything, compare `ExcelAi/ExcelJsonCommandSchema.vb` and `PowerPointAi/PowerPointJsonCommandSchema.vb` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:415 — PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:415-427 | PowerPointAi/Design/SlideComponentLibrary.vb:380-392 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×5
  • Duplicated block (11 lines × 2) ShareRibbon/Services/Reformat/LegacyTemplateConverter.vb:132 — ShareRibbon/Services/Reformat/LegacyTemplateConverter.vb:132-142 | WordAi/Services/Reformat/WordTemplateParser.vb:516-526 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) ShareRibbon/Services/Reformat/OpenXmlReformatEngine.vb:83 — ShareRibbon/Services/Reformat/OpenXmlReformatEngine.vb:83-94 | ShareRibbon/Services/Reformat/OpenXmlReformatEngine.vb:213-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) WordAi/OpenXmlWordTranslator.vb:213 — WordAi/OpenXmlWordTranslator.vb:213-223 | WordAi/OpenXmlWordTranslator.vb:365-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) ExcelAi/ChatControl.vb:1019 — ExcelAi/ChatControl.vb:1019-1029 | ShareRibbon/Controls/Services/ExcelContextService.vb:474-484 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) ExcelAi/ThisAddIn.vb:312 — ExcelAi/ThisAddIn.vb:312-322 | PowerPointAi/ThisAddIn.vb:92-103 — `ExcelAi/ThisAddIn.vb` and `PowerPointAi/ThisAddIn.vb` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 39 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×5
  • Duplicated block (5 lines × 2) ExcelAi/ExcelDocumentTranslateService.vb:343 — ExcelAi/ExcelDocumentTranslateService.vb:343-347 | ShareRibbon/Translate/DocumentTranslateService.vb:424-428 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) ShareRibbon/Controls/BaseChatControl.vb:967 — ShareRibbon/Controls/BaseChatControl.vb:967-971 | ShareRibbon/Controls/BaseChatControl.vb:1057-1061 — both copies are in the same file, so extract the 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) PowerPointAi/ChatControl.vb:2496 — PowerPointAi/ChatControl.vb:2496-2500 | PowerPointAi/ChatControl.vb:2522-2526 — both copies are in the same file, so extract the 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) WordAi/Context/WordContextProvider.vb:121 — WordAi/Context/WordContextProvider.vb:121-125 | WordAi/Context/WordContextProvider.vb:136-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) WordAi/Ribbon1.vb:290 — WordAi/Ribbon1.vb:290-294 | WordAi/Ribbon1.vb:308-312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
R10 · Code Duplication · Duplicated block (8 lines × 2 locations) · ×5
  • Duplicated block (8 lines × 2 locations) ShareRibbon/Resources/js/agent-card.js:300 — ShareRibbon/Resources/js/agent-card.js:300 · ShareRibbon/Resources/js/agent-card.js:535 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (8 lines × 2 locations) ShareRibbon/Resources/js/chat-manager.js:202 — ShareRibbon/Resources/js/chat-manager.js:202 · ShareRibbon/Resources/js/chat-manager.js:214 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (8 lines × 2 locations) ShareRibbon/Resources/js/chat-manager.js:404 — ShareRibbon/Resources/js/chat-manager.js:404 · ShareRibbon/Resources/js/onboarding.js:76 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (8 lines × 2 locations) ShareRibbon/Resources/js/code-handler.js:126 — ShareRibbon/Resources/js/code-handler.js:126 · ShareRibbon/Resources/js/code-handler.js:1685 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (8 lines × 2 locations) ShareRibbon/Resources/js/revision-manager.js:107 — ShareRibbon/Resources/js/revision-manager.js:107 · ShareRibbon/Resources/js/revision-manager.js:395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×4
  • Duplicated block (15 lines × 2) ExcelAi/ChatControl.vb:1274 — ExcelAi/ChatControl.vb:1274-1288 | PowerPointAi/ChatControl.vb:1404-1418 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ExcelAi/ChatControl.vb:1274` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) ShareRibbon/Config/ConfigApiForm.vb:1418 — ShareRibbon/Config/ConfigApiForm.vb:1418-1432 | ShareRibbon/Config/ConfigApiForm.vb:1708-1722 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) ShareRibbon/Continuation/ContinuationService.vb:147 — ShareRibbon/Continuation/ContinuationService.vb:147-161 | ShareRibbon/Controls/BaseChatControl.vb:1024-1038 — 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) PowerPointAi/PowerPointCompletionManager.vb:342 — PowerPointAi/PowerPointCompletionManager.vb:342-356 | WordAi/WordCompletionManager.vb:357-371 — before extracting anything, compare `PowerPointAi/PowerPointCompletionManager.vb` and `WordAi/WordCompletionManager.vb` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×4
  • Duplicated block (10 lines × 2) ShareRibbon/Storage/MemoryRepository.vb:490 — ShareRibbon/Storage/MemoryRepository.vb:490-499 | ShareRibbon/Storage/OfficeAiDatabase.vb:1033-1042 — 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) ShareRibbon/Services/Reformat/ReformatCoordinator.vb:208 — ShareRibbon/Services/Reformat/ReformatCoordinator.vb:208-217 | ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:300-309 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:310` calls `rollback`, `CSng` and `ShareRibbon/Services/Reformat/ReformatCoordinator.vb:218` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) ExcelAi/ExcelDocumentTranslateService.vb:322 — ExcelAi/ExcelDocumentTranslateService.vb:322-331 | ShareRibbon/Translate/DocumentTranslateService.vb:401-410 — 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 (10 lines × 2) ExcelAi/ExcelDirectOperationService.vb:1421 — ExcelAi/ExcelDirectOperationService.vb:1421-1430 | ExcelAi/ExcelDirectOperationService.vb:1455-1464 — both copies are in the same file, so extract the 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) · ×4
  • Duplicated block (7 lines × 2) PowerPointAi/ChatControl.vb:2475 — PowerPointAi/ChatControl.vb:2475-2481 | WordAi/ChatControl.vb:5408-5414 — 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) ShareRibbon/Config/SemanticStyleMapping.vb:107 — ShareRibbon/Config/SemanticStyleMapping.vb:107-113 | ShareRibbon/Config/SemanticStyleMapping.vb:118-124 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) ExcelAi/Undo/ExcelRunRestore.vb:70 — ExcelAi/Undo/ExcelRunRestore.vb:70-76 | PowerPointAi/Undo/PowerPointRunRestore.vb:61-67 — 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) ShareRibbon/Controls/Services/ExecutionPlanRenderer.vb:237 — ShareRibbon/Controls/Services/ExecutionPlanRenderer.vb:237-246 | ShareRibbon/Controls/Services/ExecutionPlanRenderer.vb:266-272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShareRibbon/Controls/Services/ExecutionPlanRenderer.vb:237` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (4 members, 50+ identical tokens) ExcelAi/EnhancedPreviewAndConfirm.vb:357 — ExcelAi/EnhancedPreviewAndConfirm.vb:357-381 | ShareRibbon/Controls/BaseChat.vb:499-523 | ShareRibbon/Controls/BaseDeepseekChat.vb:735-759 | ShareRibbon/Controls/Services/CodeExecutionService.vb:399-423 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) ShareRibbon/Services/SkillScriptExecutor.vb:140 — ShareRibbon/Services/SkillScriptExecutor.vb:140-194 | ShareRibbon/Services/SkillScriptExecutor.vb:206-260 | ShareRibbon/Services/SkillScriptExecutor.vb:272-325 | ShareRibbon/Services/SkillScriptExecutor.vb:337-380 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) PowerPointAi/ChatControl.vb:797 — PowerPointAi/ChatControl.vb:797-852 | PowerPointAi/ChatControl.vb:857-931 | PowerPointAi/ChatControl.vb:2098-2125 | PowerPointAi/ChatControl.vb:2402-2445 — 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 (20 lines × 2) · ×3
  • Duplicated block (20 lines × 2) ShareRibbon/Controls/BaseDeepseekChat.vb:568 — ShareRibbon/Controls/BaseDeepseekChat.vb:568-587 | ShareRibbon/Controls/Services/CodeExecutionService.vb:466-485 — 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 (20 lines × 2) WordAi/Services/Reformat/WordTemplateParser.vb:76 — WordAi/Services/Reformat/WordTemplateParser.vb:76-97 | WordAi/Services/Reformat/WordTemplateParser.vb:107-126 — both copies are in the same file, so extract the 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 (20 lines × 2) PowerPointAi/Ribbon1.vb:158 — PowerPointAi/Ribbon1.vb:158-177 | WordAi/Ribbon1.vb:179-198 — `PowerPointAi/Ribbon1.vb` and `WordAi/Ribbon1.vb` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 59 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×3
  • Duplicated block (21 lines × 2) WordAi/ChatControl.vb:3523 — WordAi/ChatControl.vb:3523-3543 | WordAi/ChatControl.vb:3569-3589 — both copies are in the same file, so extract the 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 (21 lines × 2) PowerPointAi/ChatControl.vb:1063 — PowerPointAi/ChatControl.vb:1063-1083 | PowerPointAi/ChatControl.vb:1109-1129 — both copies are in the same file, so extract the 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 (21 lines × 2) ExcelAi/ChatControl.vb:1185 — ExcelAi/ChatControl.vb:1185-1205 | PowerPointAi/ChatControl.vb:1287-1307 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×3
  • Duplicated block (17 lines × 2) ShareRibbon/Services/Reformat/ReformatCoordinator.vb:218 — ShareRibbon/Services/Reformat/ReformatCoordinator.vb:218-234 | ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:311-327 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:309` calls `rollback`, `CSng` and `ShareRibbon/Services/Reformat/ReformatCoordinator.vb:216` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) ShareRibbon/Controls/ReformatTemplateEditorControl.vb:871 — ShareRibbon/Controls/ReformatTemplateEditorControl.vb:871-887 | ShareRibbon/Controls/ReformatTemplateEditorControl.vb:943-959 — both copies are in the same file, so extract the 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 (17 lines × 2) WordAi/WebDataCapturePane.vb:222 — WordAi/WebDataCapturePane.vb:222-238 | WordAi/WebDataCapturePane.vb:691-707 — both copies are in the same file, so extract the 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 (9 lines × 3) · ×3
  • Duplicated block (9 lines × 3) ShareRibbon/Mcp/MCPConfigForm.vb:511 — ShareRibbon/Mcp/MCPConfigForm.vb:511-519 | ShareRibbon/Mcp/MCPConfigForm.vb:700-708 | ShareRibbon/Mcp/MCPConfigForm.vb:751-759 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) ShareRibbon/Controls/BaseChat.vb:539 — ShareRibbon/Controls/BaseChat.vb:539-547 | ShareRibbon/Controls/BaseDeepseekChat.vb:775-783 | ShareRibbon/Controls/Services/CodeExecutionService.vb:442-450 — before extracting anything, compare `ShareRibbon/Controls/BaseChat.vb` and `ShareRibbon/Controls/BaseDeepseekChat.vb` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) ExcelAi/HostEntry/ExcelContextMenu.vb:46 — ExcelAi/HostEntry/ExcelContextMenu.vb:46-54 | PowerPointAi/HostEntry/PowerPointContextMenu.vb:46-54 | WordAi/HostEntry/WordContextMenu.vb:51-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
R10 · Code Duplication · Duplicated block (10 lines × 2 locations) · ×3
  • Duplicated block (10 lines × 2 locations) ShareRibbon/Resources/js/agent-card.js:18 — ShareRibbon/Resources/js/agent-card.js:18 · ShareRibbon/Resources/js/agent-card.js:36 — both copies are in the same file, so extract the 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 locations) ShareRibbon/Resources/js/chat-manager.js:195 — ShareRibbon/Resources/js/chat-manager.js:195 · ShareRibbon/Resources/js/chat-manager.js:207 — both copies are in the same file, so extract the 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 locations) ShareRibbon/Resources/js/history-manager.js:392 — ShareRibbon/Resources/js/history-manager.js:392 · ShareRibbon/Resources/js/message-sender.js:15 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (9 lines × 2 locations) · ×3
  • Duplicated block (9 lines × 2 locations) ShareRibbon/Resources/js/autocomplete.js:206 — ShareRibbon/Resources/js/autocomplete.js:206 · ShareRibbon/Resources/js/proofread-ui.js:185 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (9 lines × 2 locations) ShareRibbon/Resources/js/code-handler.js:1287 — ShareRibbon/Resources/js/code-handler.js:1287 · ShareRibbon/Resources/js/code-handler.js:1350 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (9 lines × 2 locations) ShareRibbon/Resources/js/history-manager.js:121 — ShareRibbon/Resources/js/history-manager.js:121 · ShareRibbon/Resources/js/history-manager.js:137 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (6 lines × 2 locations) · ×3
  • Duplicated block (6 lines × 2 locations) ShareRibbon/Resources/js/agent-card.js:463 — ShareRibbon/Resources/js/agent-card.js:463 · ShareRibbon/Resources/js/agent-card.js:497 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (6 lines × 2 locations) ShareRibbon/Resources/js/code-handler.js:1441 — ShareRibbon/Resources/js/code-handler.js:1441 · ShareRibbon/Resources/js/core.js:46 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (6 lines × 2 locations) scripts/check-agent-card-ui.js:428 — scripts/check-agent-card-ui.js:428 · scripts/check-agent-card-ui.js:522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D3 · God Classes · FunctionTooLong · ×2
  • FunctionTooLong: revision-manager.showComparison ShareRibbon/Resources/js/revision-manager.js:100 — FunctionTooLong — showComparison runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: agent-card.showAgentPlanCard ShareRibbon/Resources/js/agent-card.js:81 — FunctionTooLong — showAgentPlanCard runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×2
  • Duplicated block (32 lines × 2) ShareRibbon/Config/PromptManager.vb:670 — ShareRibbon/Config/PromptManager.vb:670-701 | ShareRibbon/Config/PromptManager.vb:794-825 — both copies are in the same file, so extract the 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 (32 lines × 2) PowerPointAi/PowerPointJsonCommandSchema.vb:225 — PowerPointAi/PowerPointJsonCommandSchema.vb:225-256 | WordAi/WordJsonCommandSchema.vb:221-252 — before extracting anything, compare `PowerPointAi/PowerPointJsonCommandSchema.vb` and `WordAi/WordJsonCommandSchema.vb` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 154 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 (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) ShareRibbon/Controls/BaseChat.vb:191 — ShareRibbon/Controls/BaseChat.vb:191-208 | ShareRibbon/Controls/BaseDeepseekChat.vb:143-160 — before extracting anything, compare `ShareRibbon/Controls/BaseChat.vb` and `ShareRibbon/Controls/BaseDeepseekChat.vb` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `ShareRibbon/Controls/BaseChat.vb:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShareRibbon/Controls/BaseChat.vb:189` calls `InjectLoginObserverSafe` and `ShareRibbon/Controls/BaseDeepseekChat.vb:141` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (18 lines × 2) ExcelAi/ExcelDocumentTranslateService.vb:298 — ExcelAi/ExcelDocumentTranslateService.vb:298-315 | ShareRibbon/Translate/DocumentTranslateService.vb:377-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.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×2
  • Duplicated block (14–15 lines × 2) WordAi/ChatControl.vb:4533 — WordAi/ChatControl.vb:4533-4547 | WordAi/ChatControl.vb:4593-4606 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (14–15 lines × 2) WordAi/WebDataCapturePane.vb:200 — WordAi/WebDataCapturePane.vb:200-214 | WordAi/WebDataCapturePane.vb:648-661 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WordAi/WebDataCapturePane.vb:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×2
  • Duplicated block (12 lines × 2) PowerPointAi/ChatControl.vb:1250 — PowerPointAi/ChatControl.vb:1250-1261 | WordAi/ChatControl.vb:3679-3690 — 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 (12 lines × 2) PowerPointAi/PowerPointCompletionManager.vb:63 — PowerPointAi/PowerPointCompletionManager.vb:63-74 | WordAi/WordCompletionManager.vb:63-74 — before extracting anything, compare `PowerPointAi/PowerPointCompletionManager.vb` and `WordAi/WordCompletionManager.vb` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×2
  • Duplicated block (10 lines × 3) ExcelAi/ThisAddIn.vb:108 — ExcelAi/ThisAddIn.vb:108-117 | PowerPointAi/ThisAddIn.vb:47-56 | WordAi/ThisAddIn.vb:104-113 — `ExcelAi/ThisAddIn.vb` and `PowerPointAi/ThisAddIn.vb` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 39 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (10 lines × 3) ExcelAi/ThisAddIn.vb:124 — ExcelAi/ThisAddIn.vb:124-133 | PowerPointAi/ThisAddIn.vb:63-72 | WordAi/ThisAddIn.vb:120-129 — `ExcelAi/ThisAddIn.vb` and `PowerPointAi/ThisAddIn.vb` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 39 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: AboutForm (LCOM4 4) ShareRibbon/Config/AboutForm.vb:8 — AboutForm's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ChatStateService (LCOM4 4) ShareRibbon/Controls/Services/ChatStateService.vb:9 — ChatStateService's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
R10 · Code Duplication · Duplicated block (16 lines × 2 locations) · ×2
  • Duplicated block (16 lines × 2 locations) ShareRibbon/Resources/js/proofread-ui.js:102 — ShareRibbon/Resources/js/proofread-ui.js:102 · ShareRibbon/Resources/js/proofread-ui.js:122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2 locations) ShareRibbon/Resources/js/reformat-template.js:273 — ShareRibbon/Resources/js/reformat-template.js:273 · ShareRibbon/Resources/js/reformat-template.js:682 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (7 lines × 2 locations) · ×2
  • Duplicated block (7 lines × 2 locations) ShareRibbon/Resources/js/agent-card.js:335 — ShareRibbon/Resources/js/agent-card.js:335 · ShareRibbon/Resources/js/agent-card.js:344 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (7 lines × 2 locations) ShareRibbon/Resources/js/revision-manager.js:226 — ShareRibbon/Resources/js/revision-manager.js:226 · ShareRibbon/Resources/js/revision-manager.js:343 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (5 lines × 2 locations) · ×2
  • Duplicated block (5 lines × 2 locations) ShareRibbon/Resources/js/agent-card.js:693 — ShareRibbon/Resources/js/agent-card.js:693 · ShareRibbon/Resources/js/agent-card.js:698 — both copies are in the same file, so extract the 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 locations) ShareRibbon/Resources/js/code-handler.js:2077 — ShareRibbon/Resources/js/code-handler.js:2077 · ShareRibbon/Resources/js/history-manager.js:390 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
D1 · Cyclomatic Complexity · MemoryRepository.GetRelevantMemories (cyclomatic 118) · ×1
  • MemoryRepository.GetRelevantMemories (cyclomatic 118) ShareRibbon/Storage/MemoryRepository.vb:212 — MemoryRepository.GetRelevantMemories has cyclomatic complexity 118 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · message-sender.showContextHints (cyclomatic 109) · ×1
  • message-sender.showContextHints (cyclomatic 109) ShareRibbon/Resources/js/message-sender.js:619 — message-sender.showContextHints has cyclomatic complexity 109 (threshold 15). Of this number, 69 points are the body's own statements and 40 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · LoopEngine.RunAsync (cyclomatic 78) · ×1
  • LoopEngine.RunAsync (cyclomatic 78) ShareRibbon/Agent/LoopEngine.vb:55 — LoopEngine.RunAsync has cyclomatic complexity 78 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ProfessionalDeckExecutor.ValidateSceneSpec (cyclomatic 65) · ×1
  • ProfessionalDeckExecutor.ValidateSceneSpec (cyclomatic 65) PowerPointAi/Design/ProfessionalDeckExecutor.vb:259 — ProfessionalDeckExecutor.ValidateSceneSpec has cyclomatic complexity 65 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · showAgentExecutionExplanation (cyclomatic 61) · ×1
  • showAgentExecutionExplanation (cyclomatic 61) ShareRibbon/Resources/js/agent-card.js:673 — showAgentExecutionExplanation has cyclomatic complexity 61 (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 · MemoryRepository.ListAtomicMemories (cyclomatic 49) · ×1
  • MemoryRepository.ListAtomicMemories (cyclomatic 49) ShareRibbon/Storage/MemoryRepository.vb:132 — MemoryRepository.ListAtomicMemories has cyclomatic complexity 49 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · HttpStreamService.SendToolResultForReActAsync (cyclomatic 48) · ×1
  • HttpStreamService.SendToolResultForReActAsync (cyclomatic 48) ShareRibbon/Controls/Services/HttpStreamService.vb:1149 — HttpStreamService.SendToolResultForReActAsync has cyclomatic complexity 48 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatContextBuilder.BuildMessages (cyclomatic 47) · ×1
  • ChatContextBuilder.BuildMessages (cyclomatic 47) ShareRibbon/Controls/Services/ChatContextBuilder.vb:34 — ChatContextBuilder.BuildMessages has cyclomatic complexity 47 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ExcelDirectOperationService.ExecuteFormatChart (cyclomatic 47) · ×1
  • ExcelDirectOperationService.ExecuteFormatChart (cyclomatic 47) ExcelAi/ExcelDirectOperationService.vb:432 — ExcelDirectOperationService.ExecuteFormatChart has cyclomatic complexity 47 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ExcelDirectOperationService.ExecuteCommand (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · DocumentAnalyzer.ScoreOfficialDocument (cyclomatic 45) · ×1
  • DocumentAnalyzer.ScoreOfficialDocument (cyclomatic 45) ShareRibbon/Services/Reformat/DocumentAnalyzer.vb:381 — DocumentAnalyzer.ScoreOfficialDocument has cyclomatic complexity 45 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · HttpStreamService.SendStreamRequestAsync (cyclomatic 45) · ×1
  • HttpStreamService.SendStreamRequestAsync (cyclomatic 45) ShareRibbon/Controls/Services/HttpStreamService.vb:418 — HttpStreamService.SendStreamRequestAsync has cyclomatic complexity 45 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SkillsDirectoryService.ParseFrontMatterLines (cyclomatic 45) · ×1
  • SkillsDirectoryService.ParseFrontMatterLines (cyclomatic 45) ShareRibbon/Services/SkillsDirectoryService.vb:498 — SkillsDirectoryService.ParseFrontMatterLines has cyclomatic complexity 45 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ToolRegistry.ExecuteToolAsync (cyclomatic 43) · ×1
  • ToolRegistry.ExecuteToolAsync (cyclomatic 43) ShareRibbon/Agent/ToolRegistry.vb:689 — ToolRegistry.ExecuteToolAsync has cyclomatic complexity 43 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · HostHotkeyChord.KeyFromText (cyclomatic 41) · ×1
  • HostHotkeyChord.KeyFromText (cyclomatic 41) ShareRibbon/Controls/Services/HostHotkeyWatcher.vb:65 — HostHotkeyChord.KeyFromText has cyclomatic complexity 41 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SmartFormattingOrchestrator.InferDefaultTag (cyclomatic 40) · ×1
  • SmartFormattingOrchestrator.InferDefaultTag (cyclomatic 40) ShareRibbon/Services/Reformat/SmartFormattingOrchestrator.vb:805 — SmartFormattingOrchestrator.InferDefaultTag has cyclomatic complexity 40 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ExcelDirectOperationService.ExecuteCreateChart (cyclomatic 40) · ×1
  • ExcelDirectOperationService.ExecuteCreateChart (cyclomatic 40) ExcelAi/ExcelDirectOperationService.vb:551 — ExcelDirectOperationService.ExecuteCreateChart has cyclomatic complexity 40 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ExcelDirectOperationService.ExecuteCommand (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ChatRoutingOrchestrator.RouteSmartModeAsync (cyclomatic 38) · ×1
  • ChatRoutingOrchestrator.RouteSmartModeAsync (cyclomatic 38) ShareRibbon/Controls/Services/ChatRoutingOrchestrator.vb:63 — ChatRoutingOrchestrator.RouteSmartModeAsync has cyclomatic complexity 38 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SkillsService.CalculateMatchScore (cyclomatic 38) · ×1
  • SkillsService.CalculateMatchScore (cyclomatic 38) ShareRibbon/Services/SkillsService.vb:193 — SkillsService.CalculateMatchScore has cyclomatic complexity 38 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · MCPConfigForm.GenerateParameterTemplate (cyclomatic 36) · ×1
  • MCPConfigForm.GenerateParameterTemplate (cyclomatic 36) ShareRibbon/Mcp/MCPConfigForm.vb:898 — MCPConfigForm.GenerateParameterTemplate has cyclomatic complexity 36 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · FileParserService.DetectFileEncoding (cyclomatic 35) · ×1
  • FileParserService.DetectFileEncoding (cyclomatic 35) ShareRibbon/Controls/Services/FileParserService.vb:152 — FileParserService.DetectFileEncoding has cyclomatic complexity 35 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ApplyFormattingToRange (cyclomatic 35) · ×1
  • ChatControl.ApplyFormattingToRange (cyclomatic 35) WordAi/ChatControl.vb:2883 — ChatControl.ApplyFormattingToRange has cyclomatic complexity 35 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · WordTemplateParser.MatchStyleToTag (cyclomatic 35) · ×1
  • WordTemplateParser.MatchStyleToTag (cyclomatic 35) WordAi/Services/Reformat/WordTemplateParser.vb:170 — WordTemplateParser.MatchStyleToTag has cyclomatic complexity 35 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · WordContextProvider.GetContext (cyclomatic 33) · ×1
  • WordContextProvider.GetContext (cyclomatic 33) WordAi/Context/WordContextProvider.vb:15 — WordContextProvider.GetContext has cyclomatic complexity 33 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.IsExplicitFormattingRequest (cyclomatic 32) · ×1
  • ChatControl.IsExplicitFormattingRequest (cyclomatic 32) WordAi/ChatControl.vb:1419 — ChatControl.IsExplicitFormattingRequest has cyclomatic complexity 32 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · WordTemplateParser.EnrichFromDocumentBody (cyclomatic 32) · ×1
  • WordTemplateParser.EnrichFromDocumentBody (cyclomatic 32) WordAi/Services/Reformat/WordTemplateParser.vb:256 — WordTemplateParser.EnrichFromDocumentBody has cyclomatic complexity 32 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.AppendCurrentSelectedContent (cyclomatic 32) · ×1
  • ChatControl.AppendCurrentSelectedContent (cyclomatic 32) PowerPointAi/ChatControl.vb:594 — ChatControl.AppendCurrentSelectedContent has cyclomatic complexity 32 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PowerPointObjectResolver.ResolvePath (cyclomatic 32) · ×1
  • PowerPointObjectResolver.ResolvePath (cyclomatic 32) PowerPointAi/Runtime/PowerPointObjectResolver.vb:110 — PowerPointObjectResolver.ResolvePath has cyclomatic complexity 32 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SmartFormattingOrchestrator.ApplyTweakToTags (cyclomatic 31) · ×1
  • SmartFormattingOrchestrator.ApplyTweakToTags (cyclomatic 31) ShareRibbon/Services/Reformat/SmartFormattingOrchestrator.vb:1112 — SmartFormattingOrchestrator.ApplyTweakToTags has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ProfessionalDeckExecutor.ExecuteInternal (cyclomatic 31) · ×1
  • ProfessionalDeckExecutor.ExecuteInternal (cyclomatic 31) PowerPointAi/Design/ProfessionalDeckExecutor.vb:47 — ProfessionalDeckExecutor.ExecuteInternal has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · message-sender.sendChatMessage (cyclomatic 31) · ×1
  • message-sender.sendChatMessage (cyclomatic 31) ShareRibbon/Resources/js/message-sender.js:29 — message-sender.sendChatMessage has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SmartFormattingOrchestrator.ParseUserIntent (cyclomatic 30) · ×1
  • SmartFormattingOrchestrator.ParseUserIntent (cyclomatic 30) ShareRibbon/Services/Reformat/SmartFormattingOrchestrator.vb:396 — SmartFormattingOrchestrator.ParseUserIntent has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SemanticPromptBuilder.BuildSemanticTaggingPrompt (cyclomatic 30) · ×1
  • SemanticPromptBuilder.BuildSemanticTaggingPrompt (cyclomatic 30) ShareRibbon/Services/Reformat/SemanticPromptBuilder.vb:28 — SemanticPromptBuilder.BuildSemanticTaggingPrompt has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · EmbeddingService.GetEmbeddingAsync (cyclomatic 30) · ×1
  • EmbeddingService.GetEmbeddingAsync (cyclomatic 30) ShareRibbon/Services/EmbeddingService.vb:90 — EmbeddingService.GetEmbeddingAsync has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ApplyTemplateToDocument (cyclomatic 30) · ×1
  • ChatControl.ApplyTemplateToDocument (cyclomatic 30) WordAi/ChatControl.vb:141 — ChatControl.ApplyTemplateToDocument has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SemanticRenderingEngine.ApplyParagraphConfig (cyclomatic 29) · ×1
  • SemanticRenderingEngine.ApplyParagraphConfig (cyclomatic 29) ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:456 — SemanticRenderingEngine.ApplyParagraphConfig has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ReformatCoordinator.BuildParagraphStyleInstruction (cyclomatic 29) · ×1
  • ReformatCoordinator.BuildParagraphStyleInstruction (cyclomatic 29) ShareRibbon/Services/Reformat/ReformatCoordinator.vb:194 — ReformatCoordinator.BuildParagraphStyleInstruction has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · AiNativeRuntime.BuildTaskSpec (cyclomatic 29) · ×1
  • AiNativeRuntime.BuildTaskSpec (cyclomatic 29) ShareRibbon/Agent/AiNativeRuntime.vb:113 — AiNativeRuntime.BuildTaskSpec has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SafetyGate.EvaluateOfficeOperation (cyclomatic 29) · ×1
  • SafetyGate.EvaluateOfficeOperation (cyclomatic 29) ShareRibbon/Agent/Execution/SafetyGate.vb:91 — SafetyGate.EvaluateOfficeOperation has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.CheckAndCompleteProcessingHook (cyclomatic 29) · ×1
  • ChatControl.CheckAndCompleteProcessingHook (cyclomatic 29) WordAi/ChatControl.vb:2487 — ChatControl.CheckAndCompleteProcessingHook has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ApplyReformatRules (cyclomatic 29) · ×1
  • ChatControl.ApplyReformatRules (cyclomatic 29) PowerPointAi/ChatControl.vb:2856 — ChatControl.ApplyReformatRules has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ThisAddIn.FindXllPath (cyclomatic 29) · ×1
  • ThisAddIn.FindXllPath (cyclomatic 29) ExcelAi/ThisAddIn.vb:165 — ThisAddIn.FindXllPath has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ApplyReformatRules (cyclomatic 28) · ×1
  • ChatControl.ApplyReformatRules (cyclomatic 28) WordAi/ChatControl.vb:2776 — ChatControl.ApplyReformatRules has cyclomatic complexity 28 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · reformat-template.previewTemplate (cyclomatic 28) · ×1
  • reformat-template.previewTemplate (cyclomatic 28) ShareRibbon/Resources/js/reformat-template.js:828 — reformat-template.previewTemplate has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · reformat-template.showMappingPreview (cyclomatic 28) · ×1
  • reformat-template.showMappingPreview (cyclomatic 28) ShareRibbon/Resources/js/reformat-template.js:1324 — reformat-template.showMappingPreview 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 · revision-manager.showComparison (cyclomatic 28) · ×1
  • revision-manager.showComparison (cyclomatic 28) ShareRibbon/Resources/js/revision-manager.js:100 — revision-manager.showComparison has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, 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 · MemoryRepository.GetUserProfile (cyclomatic 27) · ×1
  • MemoryRepository.GetUserProfile (cyclomatic 27) ShareRibbon/Storage/MemoryRepository.vb:422 — MemoryRepository.GetUserProfile has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · MemoryRepository.RecordPotentialConflictsForSession (cyclomatic 27) · ×1
  • MemoryRepository.RecordPotentialConflictsForSession (cyclomatic 27) ShareRibbon/Storage/MemoryRepository.vb:641 — MemoryRepository.RecordPotentialConflictsForSession has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · DocumentAnalyzer.DetectFormattingProblems (cyclomatic 27) · ×1
  • DocumentAnalyzer.DetectFormattingProblems (cyclomatic 27) ShareRibbon/Services/Reformat/DocumentAnalyzer.vb:940 — DocumentAnalyzer.DetectFormattingProblems has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · OpenXmlReformatEngine.ExecuteSetParagraphStyle (cyclomatic 27) · ×1
  • OpenXmlReformatEngine.ExecuteSetParagraphStyle (cyclomatic 27) ShareRibbon/Services/Reformat/OpenXmlReformatEngine.vb:79 — OpenXmlReformatEngine.ExecuteSetParagraphStyle has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · IntentRecognitionService.IdentifyIntentWithLLMAsync (cyclomatic 27) · ×1
  • IntentRecognitionService.IdentifyIntentWithLLMAsync (cyclomatic 27) ShareRibbon/Controls/Services/IntentRecognitionService.vb:503 — IntentRecognitionService.IdentifyIntentWithLLMAsync has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ParagraphService.SetParagraphFormat (cyclomatic 27) · ×1
  • ParagraphService.SetParagraphFormat (cyclomatic 27) WordAi/Services/ParagraphService.vb:156 — ParagraphService.SetParagraphFormat has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ApplyReformatWithTemplate (cyclomatic 27) · ×1
  • ChatControl.ApplyReformatWithTemplate (cyclomatic 27) PowerPointAi/ChatControl.vb:93 — ChatControl.ApplyReformatWithTemplate has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · MemoryRepository.GetSkillUsage (cyclomatic 26) · ×1
  • MemoryRepository.GetSkillUsage (cyclomatic 26) ShareRibbon/Storage/MemoryRepository.vb:732 — MemoryRepository.GetSkillUsage has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ExceptionClassifier.Classify (cyclomatic 26) · ×1
  • ExceptionClassifier.Classify (cyclomatic 26) ShareRibbon/Common/ExceptionClassifier.vb:52 — ExceptionClassifier.Classify has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ExcelRunRestore.Replay (cyclomatic 26) · ×1
  • ExcelRunRestore.Replay (cyclomatic 26) ExcelAi/Undo/ExcelRunRestore.vb:83 — ExcelRunRestore.Replay has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · agent-card.showAgentPlanCard (cyclomatic 26) · ×1
  • agent-card.showAgentPlanCard (cyclomatic 26) ShareRibbon/Resources/js/agent-card.js:81 — agent-card.showAgentPlanCard has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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 · AgentChangeLogRepository.SaveRun (cyclomatic 25) · ×1
  • AgentChangeLogRepository.SaveRun (cyclomatic 25) ShareRibbon/Storage/AgentChangeLogRepository.vb:12 — AgentChangeLogRepository.SaveRun has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · OpenXmlReformatEngine.ExecuteSetCharacterFormat (cyclomatic 25) · ×1
  • OpenXmlReformatEngine.ExecuteSetCharacterFormat (cyclomatic 25) ShareRibbon/Services/Reformat/OpenXmlReformatEngine.vb:209 — OpenXmlReformatEngine.ExecuteSetCharacterFormat has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · AgentRunChangeLog.AddFromStep (cyclomatic 25) · ×1
  • AgentRunChangeLog.AddFromStep (cyclomatic 25) ShareRibbon/Agent/Execution/AgentChangeLog.vb:227 — AgentRunChangeLog.AddFromStep has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SqliteNativeLoader.EnsureLoaded (cyclomatic 25) · ×1
  • SqliteNativeLoader.EnsureLoaded (cyclomatic 25) ShareRibbon/Config/SqliteNativeLoader.vb:20 — SqliteNativeLoader.EnsureLoaded has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PowerPointVisualVerifier.VerifyAndRepairRenderedSlide (cyclomatic 25) · ×1
  • PowerPointVisualVerifier.VerifyAndRepairRenderedSlide (cyclomatic 25) PowerPointAi/Design/PowerPointVisualVerifier.vb:256 — PowerPointVisualVerifier.VerifyAndRepairRenderedSlide has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · code-handler.parseJsonToPlan (cyclomatic 25) · ×1
  • code-handler.parseJsonToPlan (cyclomatic 25) ShareRibbon/Resources/js/code-handler.js:1507 — code-handler.parseJsonToPlan has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · FormatTemplateRepository.LoadTemplateElements (cyclomatic 24) · ×1
  • FormatTemplateRepository.LoadTemplateElements (cyclomatic 24) ShareRibbon/Storage/FormatTemplateRepository.vb:154 — FormatTemplateRepository.LoadTemplateElements has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · StyleGuideConverter.ParseAiResponse (cyclomatic 24) · ×1
  • StyleGuideConverter.ParseAiResponse (cyclomatic 24) ShareRibbon/Services/Reformat/StyleGuideConverter.vb:85 — StyleGuideConverter.ParseAiResponse has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PowerPointVisualVerifier.ScoreComposition (cyclomatic 24) · ×1
  • PowerPointVisualVerifier.ScoreComposition (cyclomatic 24) PowerPointAi/Design/PowerPointVisualVerifier.vb:164 — PowerPointVisualVerifier.ScoreComposition has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PowerPointOperationExecutor.ResolveSmartArtLayout (cyclomatic 24) · ×1
  • PowerPointOperationExecutor.ResolveSmartArtLayout (cyclomatic 24) PowerPointAi/Runtime/PowerPointOperationExecutor.vb:342 — PowerPointOperationExecutor.ResolveSmartArtLayout has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ExcelDirectOperationService.ExecuteFormatRange (cyclomatic 24) · ×1
  • ExcelDirectOperationService.ExecuteFormatRange (cyclomatic 24) ExcelAi/ExcelDirectOperationService.vb:328 — ExcelDirectOperationService.ExecuteFormatRange has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ExcelDirectOperationService.ExecuteCommand (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SemanticRenderingEngine.RestoreFormatSnapshot (cyclomatic 23) · ×1
  • SemanticRenderingEngine.RestoreFormatSnapshot (cyclomatic 23) ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:82 — SemanticRenderingEngine.RestoreFormatSnapshot has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · FormatMirrorService.ExtractFormattingFromDocument (cyclomatic 23) · ×1
  • FormatMirrorService.ExtractFormattingFromDocument (cyclomatic 23) ShareRibbon/Services/Reformat/FormatMirrorService.vb:36 — FormatMirrorService.ExtractFormattingFromDocument has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ReformatCoordinator.BuildCharacterFormatInstruction (cyclomatic 23) · ×1
  • ReformatCoordinator.BuildCharacterFormatInstruction (cyclomatic 23) ShareRibbon/Services/Reformat/ReformatCoordinator.vb:276 — ReformatCoordinator.BuildCharacterFormatInstruction has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · OfficeHarness.DecideAsync (cyclomatic 23) · ×1
  • OfficeHarness.DecideAsync (cyclomatic 23) ShareRibbon/Agent/Harness/OfficeHarness.vb:215 — OfficeHarness.DecideAsync has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ReformatTemplateEditorControl.LstLayoutElements_SelectedIndexChanged (cyclomatic 23) · ×1
  • ReformatTemplateEditorControl.LstLayoutElements_SelectedIndexChanged (cyclomatic 23) ShareRibbon/Controls/ReformatTemplateEditorControl.vb:559 — ReformatTemplateEditorControl.LstLayoutElements_SelectedIndexChanged has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ExecuteWordCommandsArrayWithToolResult (cyclomatic 23) · ×1
  • ChatControl.ExecuteWordCommandsArrayWithToolResult (cyclomatic 23) WordAi/ChatControl.vb:3773 — ChatControl.ExecuteWordCommandsArrayWithToolResult has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ExecuteWordCommandWithToolResult (cyclomatic 23) · ×1
  • ChatControl.ExecuteWordCommandWithToolResult (cyclomatic 23) WordAi/ChatControl.vb:3895 — ChatControl.ExecuteWordCommandWithToolResult has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · OpenXmlWordTranslator.ReplaceTextPreservingObjects (cyclomatic 23) · ×1
  • OpenXmlWordTranslator.ReplaceTextPreservingObjects (cyclomatic 23) WordAi/OpenXmlWordTranslator.vb:254 — OpenXmlWordTranslator.ReplaceTextPreservingObjects has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PowerPointOperationExecutor.Execute (cyclomatic 23) · ×1
  • PowerPointOperationExecutor.Execute (cyclomatic 23) PowerPointAi/Runtime/PowerPointOperationExecutor.vb:17 — PowerPointOperationExecutor.Execute has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · agent-card.completeAgent (cyclomatic 23) · ×1
  • agent-card.completeAgent (cyclomatic 23) ShareRibbon/Resources/js/agent-card.js:865 — agent-card.completeAgent has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChatSettings.LoadSettings (cyclomatic 22) · ×1
  • ChatSettings.LoadSettings (cyclomatic 22) ShareRibbon/Config/ChatSettings.vb:145 — ChatSettings.LoadSettings has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · MCPConfigForm.ShowToolDetails (cyclomatic 22) · ×1
  • MCPConfigForm.ShowToolDetails (cyclomatic 22) ShareRibbon/Mcp/MCPConfigForm.vb:558 — MCPConfigForm.ShowToolDetails has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · HttpStreamService.ProcessCompletedToolCallsAsync (cyclomatic 22) · ×1
  • HttpStreamService.ProcessCompletedToolCallsAsync (cyclomatic 22) ShareRibbon/Controls/Services/HttpStreamService.vb:1006 — HttpStreamService.ProcessCompletedToolCallsAsync has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · CodeExecutionService.ExecuteCodeWithToolResult (cyclomatic 22) · ×1
  • CodeExecutionService.ExecuteCodeWithToolResult (cyclomatic 22) ShareRibbon/Controls/Services/CodeExecutionService.vb:143 — CodeExecutionService.ExecuteCodeWithToolResult has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PreSendChecker.CheckAsync (cyclomatic 22) · ×1
  • PreSendChecker.CheckAsync (cyclomatic 22) ShareRibbon/Loop/Checkers/PreSendChecker.vb:15 — PreSendChecker.CheckAsync has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · OpenXmlWordTranslator.ScanInternal (cyclomatic 22) · ×1
  • OpenXmlWordTranslator.ScanInternal (cyclomatic 22) WordAi/OpenXmlWordTranslator.vb:50 — OpenXmlWordTranslator.ScanInternal has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PowerPointVisualVerifier.PreflightAndRepair (cyclomatic 22) · ×1
  • PowerPointVisualVerifier.PreflightAndRepair (cyclomatic 22) PowerPointAi/Design/PowerPointVisualVerifier.vb:15 — PowerPointVisualVerifier.PreflightAndRepair has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · core.renderer.code (cyclomatic 22) · ×1
  • core.renderer.code (cyclomatic 22) ShareRibbon/Resources/js/core.js:23 — core.renderer.code has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MarkdownStreamRenderer._createTemplateCard (cyclomatic 22) · ×1
  • MarkdownStreamRenderer._createTemplateCard (cyclomatic 22) ShareRibbon/Resources/js/markdown-renderer.js:117 — MarkdownStreamRenderer._createTemplateCard has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DocumentAnalyzer.DetectHeadingLevel (cyclomatic 21) · ×1
  • DocumentAnalyzer.DetectHeadingLevel (cyclomatic 21) ShareRibbon/Services/Reformat/DocumentAnalyzer.vb:796 — DocumentAnalyzer.DetectHeadingLevel has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · OfficeHarness.RunAsync (cyclomatic 21) · ×1
  • OfficeHarness.RunAsync (cyclomatic 21) ShareRibbon/Agent/Harness/OfficeHarness.vb:41 — OfficeHarness.RunAsync has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PromptManager.BuildSystemPrompt (cyclomatic 21) · ×1
  • PromptManager.BuildSystemPrompt (cyclomatic 21) ShareRibbon/Agent/PromptManager.vb:44 — PromptManager.BuildSystemPrompt has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · BaseChatControl.SendAndGetResponseAsync (cyclomatic 21) · ×1
  • BaseChatControl.SendAndGetResponseAsync (cyclomatic 21) ShareRibbon/Controls/BaseChatControl.vb:2383 — BaseChatControl.SendAndGetResponseAsync has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ReformatTemplateEditorControl.LstBodyStyles_SelectedIndexChanged (cyclomatic 21) · ×1
  • ReformatTemplateEditorControl.LstBodyStyles_SelectedIndexChanged (cyclomatic 21) ShareRibbon/Controls/ReformatTemplateEditorControl.vb:622 — ReformatTemplateEditorControl.LstBodyStyles_SelectedIndexChanged has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ApplySemanticTaggingResult (cyclomatic 21) · ×1
  • ChatControl.ApplySemanticTaggingResult (cyclomatic 21) WordAi/ChatControl.vb:3055 — ChatControl.ApplySemanticTaggingResult has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · WordCompletionManager.OnSelectionChange (cyclomatic 21) · ×1
  • WordCompletionManager.OnSelectionChange (cyclomatic 21) WordAi/WordCompletionManager.vb:111 — WordCompletionManager.OnSelectionChange has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PptGenerationHandler.ParseSlideContent (cyclomatic 21) · ×1
  • PptGenerationHandler.ParseSlideContent (cyclomatic 21) PowerPointAi/Handlers/PptGenerationHandler.vb:95 — PptGenerationHandler.ParseSlideContent has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PowerPointCompletionManager.OnSelectionChange (cyclomatic 21) · ×1
  • PowerPointCompletionManager.OnSelectionChange (cyclomatic 21) PowerPointAi/PowerPointCompletionManager.vb:111 — PowerPointCompletionManager.OnSelectionChange has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · agent-card.renderAgentChangeSummary (cyclomatic 21) · ×1
  • agent-card.renderAgentChangeSummary (cyclomatic 21) ShareRibbon/Resources/js/agent-card.js:942 — agent-card.renderAgentChangeSummary has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · autocomplete.handleSmartInputKeydown (cyclomatic 21) · ×1
  • autocomplete.handleSmartInputKeydown (cyclomatic 21) ShareRibbon/Resources/js/autocomplete.js:106 — autocomplete.handleSmartInputKeydown 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 · ConfigApiForm.CloudSaveButton_Click (cyclomatic 20) · ×1
  • ConfigApiForm.CloudSaveButton_Click (cyclomatic 20) ShareRibbon/Config/ConfigApiForm.vb:1344 — ConfigApiForm.CloudSaveButton_Click has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · DocumentAnalyzer.ScoreBusinessReport (cyclomatic 20) · ×1
  • DocumentAnalyzer.ScoreBusinessReport (cyclomatic 20) ShareRibbon/Services/Reformat/DocumentAnalyzer.vb:576 — DocumentAnalyzer.ScoreBusinessReport has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · AgentMemory.Search (cyclomatic 20) · ×1
  • AgentMemory.Search (cyclomatic 20) ShareRibbon/Agent/AgentMemory.vb:225 — AgentMemory.Search has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PromptManager.BuildPlanningPrompt (cyclomatic 20) · ×1
  • PromptManager.BuildPlanningPrompt (cyclomatic 20) ShareRibbon/Agent/PromptManager.vb:165 — PromptManager.BuildPlanningPrompt has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · TaskPackageCatalog.ParseVerifier (cyclomatic 20) · ×1
  • TaskPackageCatalog.ParseVerifier (cyclomatic 20) ShareRibbon/Agent/TaskPackageCatalog.Parsing.vb:115 — TaskPackageCatalog.ParseVerifier has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · MCPConfigForm.TestConnectionAsync (cyclomatic 20) · ×1
  • MCPConfigForm.TestConnectionAsync (cyclomatic 20) ShareRibbon/Mcp/MCPConfigForm.vb:1195 — MCPConfigForm.TestConnectionAsync has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SkillsDirectoryService.DiscoverSkillScripts (cyclomatic 20) · ×1
  • SkillsDirectoryService.DiscoverSkillScripts (cyclomatic 20) ShareRibbon/Services/SkillsDirectoryService.vb:361 — SkillsDirectoryService.DiscoverSkillScripts has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SkillsService.BuildSkillsCatalogMessage (cyclomatic 20) · ×1
  • SkillsService.BuildSkillsCatalogMessage (cyclomatic 20) ShareRibbon/Services/SkillsService.vb:455 — SkillsService.BuildSkillsCatalogMessage has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ApplyStylePreviewToSelection (cyclomatic 20) · ×1
  • ChatControl.ApplyStylePreviewToSelection (cyclomatic 20) WordAi/ChatControl.vb:2046 — ChatControl.ApplyStylePreviewToSelection has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SmartFormatter.ExecuteFormatAction (cyclomatic 20) · ×1
  • SmartFormatter.ExecuteFormatAction (cyclomatic 20) WordAi/Services/SmartFormatter.vb:54 — SmartFormatter.ExecuteFormatAction has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · Ribbon1.ExtractTemplateStructure (cyclomatic 20) · ×1
  • Ribbon1.ExtractTemplateStructure (cyclomatic 20) WordAi/Ribbon1.vb:265 — Ribbon1.ExtractTemplateStructure has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ThisAddIn.ApplyPlaceholderPreviewToDocument (cyclomatic 20) · ×1
  • ThisAddIn.ApplyPlaceholderPreviewToDocument (cyclomatic 20) WordAi/ThisAddIn.vb:376 — ThisAddIn.ApplyPlaceholderPreviewToDocument has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ParseFile (cyclomatic 20) · ×1
  • ChatControl.ParseFile (cyclomatic 20) PowerPointAi/ChatControl.vb:454 — ChatControl.ParseFile has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ChatControl.ExecutePPTCommand (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PowerPointVisualVerifier.VerifyRenderedPixels (cyclomatic 20) · ×1
  • PowerPointVisualVerifier.VerifyRenderedPixels (cyclomatic 20) PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:11 — PowerPointVisualVerifier.VerifyRenderedPixels has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PowerPointVisualVerifier.ScoreRenderedComposition (cyclomatic 20) · ×1
  • PowerPointVisualVerifier.ScoreRenderedComposition (cyclomatic 20) PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:165 — PowerPointVisualVerifier.ScoreRenderedComposition has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PowerPointOperationObserver.VerifyExpectedEffects (cyclomatic 20) · ×1
  • PowerPointOperationObserver.VerifyExpectedEffects (cyclomatic 20) PowerPointAi/Runtime/PowerPointOperationObserver.vb:113 — PowerPointOperationObserver.VerifyExpectedEffects has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ConfigApiForm.LocalSaveButton_Click (cyclomatic 19) · ×1
  • ConfigApiForm.LocalSaveButton_Click (cyclomatic 19) ShareRibbon/Config/ConfigApiForm.vb:1648 — ConfigApiForm.LocalSaveButton_Click has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · DocumentAnalyzer.ScoreResume (cyclomatic 19) · ×1
  • DocumentAnalyzer.ScoreResume (cyclomatic 19) ShareRibbon/Services/Reformat/DocumentAnalyzer.vb:661 — DocumentAnalyzer.ScoreResume has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · TaggingValidator.Validate (cyclomatic 19) · ×1
  • TaggingValidator.Validate (cyclomatic 19) ShareRibbon/Services/Reformat/TaggingValidator.vb:30 — TaggingValidator.Validate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ToolRegistry.ExecuteSkillScriptAsync (cyclomatic 19) · ×1
  • ToolRegistry.ExecuteSkillScriptAsync (cyclomatic 19) ShareRibbon/Agent/ToolRegistry.vb:1156 — ToolRegistry.ExecuteSkillScriptAsync has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · HttpStreamService.ProcessStreamChunkAsync (cyclomatic 19) · ×1
  • HttpStreamService.ProcessStreamChunkAsync (cyclomatic 19) ShareRibbon/Controls/Services/HttpStreamService.vb:814 — HttpStreamService.ProcessStreamChunkAsync has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SkillsDirectoryService.ParseSkillJsonFile (cyclomatic 19) · ×1
  • SkillsDirectoryService.ParseSkillJsonFile (cyclomatic 19) ShareRibbon/Services/SkillsDirectoryService.vb:616 — SkillsDirectoryService.ParseSkillJsonFile has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · UnifiedMemoryService.CalculateImportance (cyclomatic 19) · ×1
  • UnifiedMemoryService.CalculateImportance (cyclomatic 19) ShareRibbon/Services/UnifiedMemoryService.vb:12 — UnifiedMemoryService.CalculateImportance has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.HandleApplyDocumentPlanItem (cyclomatic 19) · ×1
  • ChatControl.HandleApplyDocumentPlanItem (cyclomatic 19) WordAi/ChatControl.vb:2689 — ChatControl.HandleApplyDocumentPlanItem has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · WordFormattingAgent.ResolveObservationRanges (cyclomatic 19) · ×1
  • WordFormattingAgent.ResolveObservationRanges (cyclomatic 19) WordAi/Services/WordFormattingAgent.vb:293 — WordFormattingAgent.ResolveObservationRanges has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · WordTemplateParser.ApplyParagraphPropertiesToConfig (cyclomatic 19) · ×1
  • WordTemplateParser.ApplyParagraphPropertiesToConfig (cyclomatic 19) WordAi/Services/Reformat/WordTemplateParser.vb:401 — WordTemplateParser.ApplyParagraphPropertiesToConfig has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · WordContinuationService.GetCursorContext (cyclomatic 19) · ×1
  • WordContinuationService.GetCursorContext (cyclomatic 19) WordAi/WordContinuationService.vb:43 — WordContinuationService.GetCursorContext has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ApplyFormattingToShape (cyclomatic 19) · ×1
  • ChatControl.ApplyFormattingToShape (cyclomatic 19) PowerPointAi/ChatControl.vb:2962 — ChatControl.ApplyFormattingToShape has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ChatControl.ExecutePPTCommand (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PowerPointContextProvider.GetContext (cyclomatic 19) · ×1
  • PowerPointContextProvider.GetContext (cyclomatic 19) PowerPointAi/Context/PowerPointContextProvider.vb:15 — PowerPointContextProvider.GetContext has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PowerPointRunRestore.Replay (cyclomatic 19) · ×1
  • PowerPointRunRestore.Replay (cyclomatic 19) PowerPointAi/Undo/PowerPointRunRestore.vb:74 — PowerPointRunRestore.Replay has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PowerPointApiCatalogProvider.ScoreEntry (cyclomatic 19) · ×1
  • PowerPointApiCatalogProvider.ScoreEntry (cyclomatic 19) PowerPointAi/Runtime/PowerPointApiCatalogProvider.vb:420 — PowerPointApiCatalogProvider.ScoreEntry has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: PowerPointApiCatalogProvider.BuildAliases (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PowerPointOperationExecutor.BuildResultRef (cyclomatic 19) · ×1
  • PowerPointOperationExecutor.BuildResultRef (cyclomatic 19) PowerPointAi/Runtime/PowerPointOperationExecutor.vb:422 — PowerPointOperationExecutor.BuildResultRef has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ExcelJsonCommandSchema.NormalizeParamNames (cyclomatic 19) · ×1
  • ExcelJsonCommandSchema.NormalizeParamNames (cyclomatic 19) ExcelAi/ExcelJsonCommandSchema.vb:295 — ExcelJsonCommandSchema.NormalizeParamNames has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ExcelJsonCommandSchema.ValidateCommand (cyclomatic 30) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · code-handler.executeCodeAutoMode (cyclomatic 19) · ×1
  • code-handler.executeCodeAutoMode (cyclomatic 19) ShareRibbon/Resources/js/code-handler.js:1316 — code-handler.executeCodeAutoMode has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DocumentAnalyzer.Analyze (cyclomatic 18) · ×1
  • DocumentAnalyzer.Analyze (cyclomatic 18) ShareRibbon/Services/Reformat/DocumentAnalyzer.vb:255 — DocumentAnalyzer.Analyze has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · LoopEngine.BuildExecutionExplanation (cyclomatic 18) · ×1
  • LoopEngine.BuildExecutionExplanation (cyclomatic 18) ShareRibbon/Agent/LoopEngine.Planning.vb:13 — LoopEngine.BuildExecutionExplanation has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · LoopEngine.SendRepairRequestAsync (cyclomatic 18) · ×1
  • LoopEngine.SendRepairRequestAsync (cyclomatic 18) ShareRibbon/Agent/LoopEngine.Planning.vb:428 — LoopEngine.SendRepairRequestAsync has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · LoopEngine.ValidateObservedOutcome (cyclomatic 18) · ×1
  • LoopEngine.ValidateObservedOutcome (cyclomatic 18) ShareRibbon/Agent/LoopEngine.Planning.vb:495 — LoopEngine.ValidateObservedOutcome has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · BaseChatControl.Send (cyclomatic 18) · ×1
  • BaseChatControl.Send (cyclomatic 18) ShareRibbon/Controls/BaseChatControl.vb:3042 — BaseChatControl.Send has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · AutocompleteService.EnrichContextForIntent (cyclomatic 18) · ×1
  • AutocompleteService.EnrichContextForIntent (cyclomatic 18) ShareRibbon/Controls/Services/AutocompleteService.vb:70 — AutocompleteService.EnrichContextForIntent has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ParseFile (cyclomatic 18) · ×1
  • ChatControl.ParseFile (cyclomatic 18) WordAi/ChatControl.vb:2212 — ChatControl.ParseFile has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ExecuteJsonCommandWithToolResult (cyclomatic 18) · ×1
  • ChatControl.ExecuteJsonCommandWithToolResult (cyclomatic 18) PowerPointAi/ChatControl.vb:1333 — ChatControl.ExecuteJsonCommandWithToolResult has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ChatControl.ExecutePPTCommand (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ProfessionalDeckExecutor.ValidateChartSpec (cyclomatic 18) · ×1
  • ProfessionalDeckExecutor.ValidateChartSpec (cyclomatic 18) PowerPointAi/Design/ProfessionalDeckExecutor.vb:362 — ProfessionalDeckExecutor.ValidateChartSpec has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PowerPointOperationExecutor.ConvertArgument (cyclomatic 18) · ×1
  • PowerPointOperationExecutor.ConvertArgument (cyclomatic 18) PowerPointAi/Runtime/PowerPointOperationExecutor.vb:309 — PowerPointOperationExecutor.ConvertArgument has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · agent-card.setStepEditResult (cyclomatic 18) · ×1
  • agent-card.setStepEditResult (cyclomatic 18) ShareRibbon/Resources/js/agent-card.js:497 — agent-card.setStepEditResult has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · code-handler.executeCode (cyclomatic 18) · ×1
  • code-handler.executeCode (cyclomatic 18) ShareRibbon/Resources/js/code-handler.js:90 — code-handler.executeCode has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · reformat-template.buildDocxMappingPreviewHtml (cyclomatic 18) · ×1
  • reformat-template.buildDocxMappingPreviewHtml (cyclomatic 18) ShareRibbon/Resources/js/reformat-template.js:1273 — reformat-template.buildDocxMappingPreviewHtml has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 1275). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · AgentMemoryRepository.ReadMemoryItem (cyclomatic 17) · ×1
  • AgentMemoryRepository.ReadMemoryItem (cyclomatic 17) ShareRibbon/Storage/AgentMemoryRepository.vb:49 — AgentMemoryRepository.ReadMemoryItem has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · AgentMemoryRepository.RetrieveMemoryItemsByVector (cyclomatic 17) · ×1
  • AgentMemoryRepository.RetrieveMemoryItemsByVector (cyclomatic 17) ShareRibbon/Storage/AgentMemoryRepository.vb:451 — AgentMemoryRepository.RetrieveMemoryItemsByVector has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · MemoryRepository.InsertMemory (cyclomatic 17) · ×1
  • MemoryRepository.InsertMemory (cyclomatic 17) ShareRibbon/Storage/MemoryRepository.vb:505 — MemoryRepository.InsertMemory has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SkillsConfigForm.ListSelectionChanged (cyclomatic 17) · ×1
  • SkillsConfigForm.ListSelectionChanged (cyclomatic 17) ShareRibbon/Config/SkillsConfigForm.vb:296 — SkillsConfigForm.ListSelectionChanged has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · DocumentAnalyzer.AnalyzeStructure (cyclomatic 17) · ×1
  • DocumentAnalyzer.AnalyzeStructure (cyclomatic 17) ShareRibbon/Services/Reformat/DocumentAnalyzer.vb:712 — DocumentAnalyzer.AnalyzeStructure has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · TaskPackageOutcomeVerifier.CheckOne (cyclomatic 17) · ×1
  • TaskPackageOutcomeVerifier.CheckOne (cyclomatic 17) ShareRibbon/Agent/TaskPackageOutcomeVerifier.vb:38 — TaskPackageOutcomeVerifier.CheckOne has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ReformatTemplateEditorControl.SaveCurrentLayoutElement (cyclomatic 17) · ×1
  • ReformatTemplateEditorControl.SaveCurrentLayoutElement (cyclomatic 17) ShareRibbon/Controls/ReformatTemplateEditorControl.vb:899 — ReformatTemplateEditorControl.SaveCurrentLayoutElement has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ReformatTemplateEditorControl.ParseFontSize (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ReformatTemplateEditorControl.SaveCurrentBodyStyle (cyclomatic 17) · ×1
  • ReformatTemplateEditorControl.SaveCurrentBodyStyle (cyclomatic 17) ShareRibbon/Controls/ReformatTemplateEditorControl.vb:939 — ReformatTemplateEditorControl.SaveCurrentBodyStyle has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ReformatTemplateEditorControl.ParseFontSize (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PostFlushValidator.FindFirstCompleteJsonEnd (cyclomatic 17) · ×1
  • PostFlushValidator.FindFirstCompleteJsonEnd (cyclomatic 17) ShareRibbon/Loop/Validators/PostFlushValidator.vb:230 — PostFlushValidator.FindFirstCompleteJsonEnd has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.HandleApplyRevisionSegment (cyclomatic 17) · ×1
  • ChatControl.HandleApplyRevisionSegment (cyclomatic 17) WordAi/ChatControl.vb:2360 — ChatControl.HandleApplyRevisionSegment has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · WordTemplateParser.ExtractPageSetup (cyclomatic 17) · ×1
  • WordTemplateParser.ExtractPageSetup (cyclomatic 17) WordAi/Services/Reformat/WordTemplateParser.vb:458 — WordTemplateParser.ExtractPageSetup has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.GetSelectionContent (cyclomatic 17) · ×1
  • ChatControl.GetSelectionContent (cyclomatic 17) PowerPointAi/ChatControl.vb:292 — ChatControl.GetSelectionContent has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ChatControl.ExecutePPTCommand (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · DoubaoChat.AppendCurrentSelectedContent (cyclomatic 17) · ×1
  • DoubaoChat.AppendCurrentSelectedContent (cyclomatic 17) PowerPointAi/DoubaoChat.vb:46 — DoubaoChat.AppendCurrentSelectedContent has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PowerPointDocumentTranslateService.ApplyImmersiveMode (cyclomatic 17) · ×1
  • PowerPointDocumentTranslateService.ApplyImmersiveMode (cyclomatic 17) PowerPointAi/PowerPointDocumentTranslateService.vb:243 — PowerPointDocumentTranslateService.ApplyImmersiveMode has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SlideComponentLibrary.BuildTableContent (cyclomatic 17) · ×1
  • SlideComponentLibrary.BuildTableContent (cyclomatic 17) PowerPointAi/Design/SlideComponentLibrary.vb:290 — SlideComponentLibrary.BuildTableContent has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ExcelDirectOperationService.ExecuteWriteData (cyclomatic 17) · ×1
  • ExcelDirectOperationService.ExecuteWriteData (cyclomatic 17) ExcelAi/ExcelDirectOperationService.vb:123 — ExcelDirectOperationService.ExecuteWriteData has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ExcelDirectOperationService.ExecuteCommand (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · FormatTemplateRepository.ReadTemplateFromReader (cyclomatic 16) · ×1
  • FormatTemplateRepository.ReadTemplateFromReader (cyclomatic 16) ShareRibbon/Storage/FormatTemplateRepository.vb:127 — FormatTemplateRepository.ReadTemplateFromReader has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SemanticRenderingEngine.ApplySemanticFormatting (cyclomatic 16) · ×1
  • SemanticRenderingEngine.ApplySemanticFormatting (cyclomatic 16) ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:188 — SemanticRenderingEngine.ApplySemanticFormatting has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SemanticPromptBuilder.GetExamplesByDocumentType (cyclomatic 16) · ×1
  • SemanticPromptBuilder.GetExamplesByDocumentType (cyclomatic 16) ShareRibbon/Services/Reformat/SemanticPromptBuilder.vb:212 — SemanticPromptBuilder.GetExamplesByDocumentType has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ToolRegistry.ValidateBatchCommandEnvelope (cyclomatic 16) · ×1
  • ToolRegistry.ValidateBatchCommandEnvelope (cyclomatic 16) ShareRibbon/Agent/ToolRegistry.vb:925 — ToolRegistry.ValidateBatchCommandEnvelope has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · BaseChatControl.HandleSendMessage (cyclomatic 16) · ×1
  • BaseChatControl.HandleSendMessage (cyclomatic 16) ShareRibbon/Controls/BaseChatControl.vb:1413 — BaseChatControl.HandleSendMessage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · BaseChatControl.HandleStartAgent (cyclomatic 16) · ×1
  • BaseChatControl.HandleStartAgent (cyclomatic 16) ShareRibbon/Controls/BaseChatControl.vb:1852 — BaseChatControl.HandleStartAgent has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ReformatTemplateEditorControl.SaveLayoutElementAt (cyclomatic 16) · ×1
  • ReformatTemplateEditorControl.SaveLayoutElementAt (cyclomatic 16) ShareRibbon/Controls/ReformatTemplateEditorControl.vb:826 — ReformatTemplateEditorControl.SaveLayoutElementAt has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ReformatTemplateEditorControl.ParseFontSize (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ReformatTemplateEditorControl.SaveBodyStyleAt (cyclomatic 16) · ×1
  • ReformatTemplateEditorControl.SaveBodyStyleAt (cyclomatic 16) ShareRibbon/Controls/ReformatTemplateEditorControl.vb:867 — ReformatTemplateEditorControl.SaveBodyStyleAt has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ReformatTemplateEditorControl.ParseFontSize (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MCPConfigForm.AdvancedButton_Click (cyclomatic 16) · ×1
  • MCPConfigForm.AdvancedButton_Click (cyclomatic 16) ShareRibbon/Mcp/MCPConfigForm.vb:406 — MCPConfigForm.AdvancedButton_Click has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · MCPConfigForm.SaveButton_Click (cyclomatic 16) · ×1
  • MCPConfigForm.SaveButton_Click (cyclomatic 16) ShareRibbon/Mcp/MCPConfigForm.vb:1480 — MCPConfigForm.SaveButton_Click has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · AgentKernelService.StartAgentAsync (cyclomatic 16) · ×1
  • AgentKernelService.StartAgentAsync (cyclomatic 16) ShareRibbon/Controls/Services/AgentKernelService.vb:101 — AgentKernelService.StartAgentAsync has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ExecutionPlanRenderer.GetFormulaDescription (cyclomatic 16) · ×1
  • ExecutionPlanRenderer.GetFormulaDescription (cyclomatic 16) ShareRibbon/Controls/Services/ExecutionPlanRenderer.vb:321 — ExecutionPlanRenderer.GetFormulaDescription has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ExecutionPlanRenderer.ParseJsonToExecutionPlan (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ChatControl.MergePreviewPlanTags (cyclomatic 16) · ×1
  • ChatControl.MergePreviewPlanTags (cyclomatic 16) WordAi/ChatControl.vb:3011 — ChatControl.MergePreviewPlanTags has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ExecuteDslCommand (cyclomatic 16) · ×1
  • ChatControl.ExecuteDslCommand (cyclomatic 16) WordAi/ChatControl.vb:4430 — ChatControl.ExecuteDslCommand has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · FormattingIntentPlan.OperationToText (cyclomatic 16) · ×1
  • FormattingIntentPlan.OperationToText (cyclomatic 16) WordAi/Services/FormattingIntentCompiler.vb:117 — FormattingIntentPlan.OperationToText has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: FormattingIntentCompiler.NamedFontSizeToPoint (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · WebDataCapturePane.HandleMediaContainerContent (cyclomatic 16) · ×1
  • WebDataCapturePane.HandleMediaContainerContent (cyclomatic 16) WordAi/WebDataCapturePane.vb:490 — WebDataCapturePane.HandleMediaContainerContent has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.GetSlideContent (cyclomatic 16) · ×1
  • ChatControl.GetSlideContent (cyclomatic 16) PowerPointAi/ChatControl.vb:856 — ChatControl.GetSlideContent has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ChatControl.ExecutePPTCommand (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ProfessionalDeckExecutor.ValidateVariant (cyclomatic 16) · ×1
  • ProfessionalDeckExecutor.ValidateVariant (cyclomatic 16) PowerPointAi/Design/ProfessionalDeckExecutor.vb:342 — ProfessionalDeckExecutor.ValidateVariant has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChatControl.ExecuteCommandsArray (cyclomatic 16) · ×1
  • ChatControl.ExecuteCommandsArray (cyclomatic 16) ExcelAi/ChatControl.vb:599 — ChatControl.ExecuteCommandsArray has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ExcelContextProvider.BuildColumnTypeSummary (cyclomatic 16) · ×1
  • ExcelContextProvider.BuildColumnTypeSummary (cyclomatic 16) ExcelAi/Context/ExcelContextProvider.vb:153 — ExcelContextProvider.BuildColumnTypeSummary has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · chat-manager.setChatMessages (cyclomatic 16) · ×1
  • chat-manager.setChatMessages (cyclomatic 16) ShareRibbon/Resources/js/chat-manager.js:297 — chat-manager.setChatMessages 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 · revision-manager.showRevisions (cyclomatic 16) · ×1
  • revision-manager.showRevisions (cyclomatic 16) ShareRibbon/Resources/js/revision-manager.js:383 — revision-manager.showRevisions has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LoopEngine.RunAsync (cognitive 159) · ×1
  • LoopEngine.RunAsync (cognitive 159) ShareRibbon/Agent/LoopEngine.vb:55 — LoopEngine.RunAsync has cognitive complexity 159 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MemoryRepository.GetRelevantMemories (cognitive 154) · ×1
  • MemoryRepository.GetRelevantMemories (cognitive 154) ShareRibbon/Storage/MemoryRepository.vb:212 — MemoryRepository.GetRelevantMemories has cognitive complexity 154 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · showContextHints (cognitive 126) · ×1
  • showContextHints (cognitive 126) ShareRibbon/Resources/js/message-sender.js:619 — showContextHints has cognitive complexity 126 (threshold 15). Drivers by points: ternaries 26 (63 pts), boolean chains 41, if/else 14 (21 pts), error handling 1 (nesting depth added 44). Of this number, 81 points are the body's own statements and 45 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatContextBuilder.BuildMessages (cognitive 115) · ×1
  • ChatContextBuilder.BuildMessages (cognitive 115) ShareRibbon/Controls/Services/ChatContextBuilder.vb:34 — ChatContextBuilder.BuildMessages has cognitive complexity 115 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.AppendCurrentSelectedContent (cognitive 109) · ×1
  • ChatControl.AppendCurrentSelectedContent (cognitive 109) PowerPointAi/ChatControl.vb:594 — ChatControl.AppendCurrentSelectedContent has cognitive complexity 109 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SkillsService.CalculateMatchScore (cognitive 93) · ×1
  • SkillsService.CalculateMatchScore (cognitive 93) ShareRibbon/Services/SkillsService.vb:193 — SkillsService.CalculateMatchScore has cognitive complexity 93 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelDirectOperationService.ExecuteFormatChart (cognitive 93) · ×1
  • ExcelDirectOperationService.ExecuteFormatChart (cognitive 93) ExcelAi/ExcelDirectOperationService.vb:432 — ExcelDirectOperationService.ExecuteFormatChart has cognitive complexity 93 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelDirectOperationService.ExecuteCreateChart (cognitive 90) · ×1
  • ExcelDirectOperationService.ExecuteCreateChart (cognitive 90) ExcelAi/ExcelDirectOperationService.vb:551 — ExcelDirectOperationService.ExecuteCreateChart has cognitive complexity 90 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MCPConfigForm.GenerateParameterTemplate (cognitive 84) · ×1
  • MCPConfigForm.GenerateParameterTemplate (cognitive 84) ShareRibbon/Mcp/MCPConfigForm.vb:898 — MCPConfigForm.GenerateParameterTemplate has cognitive complexity 84 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ProfessionalDeckExecutor.ValidateSceneSpec (cognitive 82) · ×1
  • ProfessionalDeckExecutor.ValidateSceneSpec (cognitive 82) PowerPointAi/Design/ProfessionalDeckExecutor.vb:259 — ProfessionalDeckExecutor.ValidateSceneSpec has cognitive complexity 82 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · WordTemplateParser.EnrichFromDocumentBody (cognitive 81) · ×1
  • WordTemplateParser.EnrichFromDocumentBody (cognitive 81) WordAi/Services/Reformat/WordTemplateParser.vb:256 — WordTemplateParser.EnrichFromDocumentBody has cognitive complexity 81 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · WordContextProvider.GetContext (cognitive 77) · ×1
  • WordContextProvider.GetContext (cognitive 77) WordAi/Context/WordContextProvider.vb:15 — WordContextProvider.GetContext has cognitive complexity 77 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SmartFormattingOrchestrator.InferDefaultTag (cognitive 76) · ×1
  • SmartFormattingOrchestrator.InferDefaultTag (cognitive 76) ShareRibbon/Services/Reformat/SmartFormattingOrchestrator.vb:805 — SmartFormattingOrchestrator.InferDefaultTag has cognitive complexity 76 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MCPConfigForm.ShowToolDetails (cognitive 73) · ×1
  • MCPConfigForm.ShowToolDetails (cognitive 73) ShareRibbon/Mcp/MCPConfigForm.vb:558 — MCPConfigForm.ShowToolDetails has cognitive complexity 73 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ApplyTemplateToDocument (cognitive 73) · ×1
  • ChatControl.ApplyTemplateToDocument (cognitive 73) WordAi/ChatControl.vb:141 — ChatControl.ApplyTemplateToDocument has cognitive complexity 73 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · StyleGuideConverter.ParseAiResponse (cognitive 68) · ×1
  • StyleGuideConverter.ParseAiResponse (cognitive 68) ShareRibbon/Services/Reformat/StyleGuideConverter.vb:85 — StyleGuideConverter.ParseAiResponse has cognitive complexity 68 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointObjectResolver.ResolvePath (cognitive 64) · ×1
  • PowerPointObjectResolver.ResolvePath (cognitive 64) PowerPointAi/Runtime/PowerPointObjectResolver.vb:110 — PowerPointObjectResolver.ResolvePath has cognitive complexity 64 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ReformatCoordinator.BuildParagraphStyleInstruction (cognitive 63) · ×1
  • ReformatCoordinator.BuildParagraphStyleInstruction (cognitive 63) ShareRibbon/Services/Reformat/ReformatCoordinator.vb:194 — ReformatCoordinator.BuildParagraphStyleInstruction has cognitive complexity 63 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ToolRegistry.ExecuteToolAsync (cognitive 61) · ×1
  • ToolRegistry.ExecuteToolAsync (cognitive 61) ShareRibbon/Agent/ToolRegistry.vb:689 — ToolRegistry.ExecuteToolAsync has cognitive complexity 61 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · HttpStreamService.SendToolResultForReActAsync (cognitive 61) · ×1
  • HttpStreamService.SendToolResultForReActAsync (cognitive 61) ShareRibbon/Controls/Services/HttpStreamService.vb:1149 — HttpStreamService.SendToolResultForReActAsync has cognitive complexity 61 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · OpenXmlWordTranslator.ScanInternal (cognitive 60) · ×1
  • OpenXmlWordTranslator.ScanInternal (cognitive 60) WordAi/OpenXmlWordTranslator.vb:50 — OpenXmlWordTranslator.ScanInternal has cognitive complexity 60 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointContextProvider.GetContext (cognitive 60) · ×1
  • PowerPointContextProvider.GetContext (cognitive 60) PowerPointAi/Context/PowerPointContextProvider.vb:15 — PowerPointContextProvider.GetContext has cognitive complexity 60 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MemoryRepository.ListAtomicMemories (cognitive 59) · ×1
  • MemoryRepository.ListAtomicMemories (cognitive 59) ShareRibbon/Storage/MemoryRepository.vb:132 — MemoryRepository.ListAtomicMemories has cognitive complexity 59 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · HttpStreamService.SendStreamRequestAsync (cognitive 58) · ×1
  • HttpStreamService.SendStreamRequestAsync (cognitive 58) ShareRibbon/Controls/Services/HttpStreamService.vb:418 — HttpStreamService.SendStreamRequestAsync has cognitive complexity 58 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ApplyFormattingToRange (cognitive 58) · ×1
  • ChatControl.ApplyFormattingToRange (cognitive 58) WordAi/ChatControl.vb:2883 — ChatControl.ApplyFormattingToRange has cognitive complexity 58 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ParseFile (cognitive 58) · ×1
  • ChatControl.ParseFile (cognitive 58) PowerPointAi/ChatControl.vb:454 — ChatControl.ParseFile has cognitive complexity 58 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ReformatCoordinator.BuildCharacterFormatInstruction (cognitive 56) · ×1
  • ReformatCoordinator.BuildCharacterFormatInstruction (cognitive 56) ShareRibbon/Services/Reformat/ReformatCoordinator.vb:276 — ReformatCoordinator.BuildCharacterFormatInstruction has cognitive complexity 56 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · OpenXmlReformatEngine.ExecuteSetCharacterFormat (cognitive 54) · ×1
  • OpenXmlReformatEngine.ExecuteSetCharacterFormat (cognitive 54) ShareRibbon/Services/Reformat/OpenXmlReformatEngine.vb:209 — OpenXmlReformatEngine.ExecuteSetCharacterFormat has cognitive complexity 54 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ApplyReformatRules (cognitive 54) · ×1
  • ChatControl.ApplyReformatRules (cognitive 54) PowerPointAi/ChatControl.vb:2856 — ChatControl.ApplyReformatRules has cognitive complexity 54 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.CheckAndCompleteProcessingHook (cognitive 53) · ×1
  • ChatControl.CheckAndCompleteProcessingHook (cognitive 53) WordAi/ChatControl.vb:2487 — ChatControl.CheckAndCompleteProcessingHook has cognitive complexity 53 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ProfessionalDeckExecutor.ExecuteInternal (cognitive 50) · ×1
  • ProfessionalDeckExecutor.ExecuteInternal (cognitive 50) PowerPointAi/Design/ProfessionalDeckExecutor.vb:47 — ProfessionalDeckExecutor.ExecuteInternal has cognitive complexity 50 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SkillsDirectoryService.DiscoverSkillScripts (cognitive 49) · ×1
  • SkillsDirectoryService.DiscoverSkillScripts (cognitive 49) ShareRibbon/Services/SkillsDirectoryService.vb:361 — SkillsDirectoryService.DiscoverSkillScripts has cognitive complexity 49 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SkillsDirectoryService.ParseFrontMatterLines (cognitive 49) · ×1
  • SkillsDirectoryService.ParseFrontMatterLines (cognitive 49) ShareRibbon/Services/SkillsDirectoryService.vb:498 — SkillsDirectoryService.ParseFrontMatterLines has cognitive complexity 49 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SmartFormattingOrchestrator.ApplyTweakToTags (cognitive 48) · ×1
  • SmartFormattingOrchestrator.ApplyTweakToTags (cognitive 48) ShareRibbon/Services/Reformat/SmartFormattingOrchestrator.vb:1112 — SmartFormattingOrchestrator.ApplyTweakToTags has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AiNativeRuntime.BuildTaskSpec (cognitive 48) · ×1
  • AiNativeRuntime.BuildTaskSpec (cognitive 48) ShareRibbon/Agent/AiNativeRuntime.vb:113 — AiNativeRuntime.BuildTaskSpec has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ThisAddIn.FindXllPath (cognitive 48) · ×1
  • ThisAddIn.FindXllPath (cognitive 48) ExcelAi/ThisAddIn.vb:165 — ThisAddIn.FindXllPath has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ApplyReformatRules (cognitive 47) · ×1
  • ChatControl.ApplyReformatRules (cognitive 47) WordAi/ChatControl.vb:2776 — ChatControl.ApplyReformatRules has cognitive complexity 47 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DoubaoChat.AppendCurrentSelectedContent (cognitive 47) · ×1
  • DoubaoChat.AppendCurrentSelectedContent (cognitive 47) PowerPointAi/DoubaoChat.vb:46 — DoubaoChat.AppendCurrentSelectedContent has cognitive complexity 47 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SemanticPromptBuilder.BuildSemanticTaggingPrompt (cognitive 46) · ×1
  • SemanticPromptBuilder.BuildSemanticTaggingPrompt (cognitive 46) ShareRibbon/Services/Reformat/SemanticPromptBuilder.vb:28 — SemanticPromptBuilder.BuildSemanticTaggingPrompt has cognitive complexity 46 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · HttpStreamService.ProcessCompletedToolCallsAsync (cognitive 46) · ×1
  • HttpStreamService.ProcessCompletedToolCallsAsync (cognitive 46) ShareRibbon/Controls/Services/HttpStreamService.vb:1006 — HttpStreamService.ProcessCompletedToolCallsAsync has cognitive complexity 46 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointVisualVerifier.VerifyAndRepairRenderedSlide (cognitive 46) · ×1
  • PowerPointVisualVerifier.VerifyAndRepairRenderedSlide (cognitive 46) PowerPointAi/Design/PowerPointVisualVerifier.vb:256 — PowerPointVisualVerifier.VerifyAndRepairRenderedSlide has cognitive complexity 46 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SemanticRenderingEngine.RestoreFormatSnapshot (cognitive 44) · ×1
  • SemanticRenderingEngine.RestoreFormatSnapshot (cognitive 44) ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:82 — SemanticRenderingEngine.RestoreFormatSnapshot has cognitive complexity 44 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatRoutingOrchestrator.RouteSmartModeAsync (cognitive 44) · ×1
  • ChatRoutingOrchestrator.RouteSmartModeAsync (cognitive 44) ShareRibbon/Controls/Services/ChatRoutingOrchestrator.vb:63 — ChatRoutingOrchestrator.RouteSmartModeAsync has cognitive complexity 44 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · sendChatMessage (cognitive 43) · ×1
  • sendChatMessage (cognitive 43) ShareRibbon/Resources/js/message-sender.js:29 — sendChatMessage has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (34 pts), boolean chains 8, ternaries 1 (nesting depth added 12). Of this number, 40 points are the body's own statements and 3 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatSettings.LoadSettings (cognitive 42) · ×1
  • ChatSettings.LoadSettings (cognitive 42) ShareRibbon/Config/ChatSettings.vb:145 — ChatSettings.LoadSettings has cognitive complexity 42 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SmartFormattingOrchestrator.ParseUserIntent (cognitive 42) · ×1
  • SmartFormattingOrchestrator.ParseUserIntent (cognitive 42) ShareRibbon/Services/Reformat/SmartFormattingOrchestrator.vb:396 — SmartFormattingOrchestrator.ParseUserIntent has cognitive complexity 42 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · showMappingPreview (cognitive 42) · ×1
  • showMappingPreview (cognitive 42) ShareRibbon/Resources/js/reformat-template.js:1324 — showMappingPreview has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (29 pts), ternaries 3 (6 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatControl.GetSelectionContent (cognitive 41) · ×1
  • ChatControl.GetSelectionContent (cognitive 41) PowerPointAi/ChatControl.vb:292 — ChatControl.GetSelectionContent has cognitive complexity 41 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointOperationExecutor.Execute (cognitive 41) · ×1
  • PowerPointOperationExecutor.Execute (cognitive 41) PowerPointAi/Runtime/PowerPointOperationExecutor.vb:17 — PowerPointOperationExecutor.Execute has cognitive complexity 41 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · showAgentExecutionExplanation (cognitive 41) · ×1
  • showAgentExecutionExplanation (cognitive 41) ShareRibbon/Resources/js/agent-card.js:673 — showAgentExecutionExplanation has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 17, ternaries 17, if/else 3, other 3, error handling 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ChatControl.ApplyReformatWithTemplate (cognitive 40) · ×1
  • ChatControl.ApplyReformatWithTemplate (cognitive 40) PowerPointAi/ChatControl.vb:93 — ChatControl.ApplyReformatWithTemplate has cognitive complexity 40 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointDocumentTranslateService.ApplyTranslationToSlide (cognitive 40) · ×1
  • PowerPointDocumentTranslateService.ApplyTranslationToSlide (cognitive 40) PowerPointAi/PowerPointDocumentTranslateService.vb:333 — PowerPointDocumentTranslateService.ApplyTranslationToSlide has cognitive complexity 40 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DocumentAnalyzer.DetectFormattingProblems (cognitive 39) · ×1
  • DocumentAnalyzer.DetectFormattingProblems (cognitive 39) ShareRibbon/Services/Reformat/DocumentAnalyzer.vb:940 — DocumentAnalyzer.DetectFormattingProblems has cognitive complexity 39 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SemanticRenderingEngine.ApplyParagraphConfig (cognitive 39) · ×1
  • SemanticRenderingEngine.ApplyParagraphConfig (cognitive 39) ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:456 — SemanticRenderingEngine.ApplyParagraphConfig has cognitive complexity 39 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ParseFile (cognitive 39) · ×1
  • ChatControl.ParseFile (cognitive 39) WordAi/ChatControl.vb:2212 — ChatControl.ParseFile has cognitive complexity 39 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ExecuteCommandsArray (cognitive 39) · ×1
  • ChatControl.ExecuteCommandsArray (cognitive 39) ExcelAi/ChatControl.vb:599 — ChatControl.ExecuteCommandsArray has cognitive complexity 39 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MemoryRepository.GetUserProfile (cognitive 38) · ×1
  • MemoryRepository.GetUserProfile (cognitive 38) ShareRibbon/Storage/MemoryRepository.vb:422 — MemoryRepository.GetUserProfile has cognitive complexity 38 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · IntentRecognitionService.IdentifyIntentWithLLMAsync (cognitive 38) · ×1
  • IntentRecognitionService.IdentifyIntentWithLLMAsync (cognitive 38) ShareRibbon/Controls/Services/IntentRecognitionService.vb:503 — IntentRecognitionService.IdentifyIntentWithLLMAsync has cognitive complexity 38 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointOperationObserver.VerifyExpectedEffects (cognitive 38) · ×1
  • PowerPointOperationObserver.VerifyExpectedEffects (cognitive 38) PowerPointAi/Runtime/PowerPointOperationObserver.vb:113 — PowerPointOperationObserver.VerifyExpectedEffects has cognitive complexity 38 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.GetContextSnapshot (cognitive 38) · ×1
  • ChatControl.GetContextSnapshot (cognitive 38) ExcelAi/ChatControl.vb:1094 — ChatControl.GetContextSnapshot has cognitive complexity 38 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · completeAgent (cognitive 38) · ×1
  • completeAgent (cognitive 38) ShareRibbon/Resources/js/agent-card.js:865 — completeAgent has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 8 (20 pts), if/else 9 (13 pts), boolean chains 4, error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemoryRepository.RecordPotentialConflictsForSession (cognitive 37) · ×1
  • MemoryRepository.RecordPotentialConflictsForSession (cognitive 37) ShareRibbon/Storage/MemoryRepository.vb:641 — MemoryRepository.RecordPotentialConflictsForSession has cognitive complexity 37 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · OpenXmlReformatEngine.ExecuteSetParagraphStyle (cognitive 37) · ×1
  • OpenXmlReformatEngine.ExecuteSetParagraphStyle (cognitive 37) ShareRibbon/Services/Reformat/OpenXmlReformatEngine.vb:79 — OpenXmlReformatEngine.ExecuteSetParagraphStyle has cognitive complexity 37 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PromptManager.BuildSystemPrompt (cognitive 37) · ×1
  • PromptManager.BuildSystemPrompt (cognitive 37) ShareRibbon/Agent/PromptManager.vb:44 — PromptManager.BuildSystemPrompt has cognitive complexity 37 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · LoopEngine.ValidatePlannedImagePaths (cognitive 36) · ×1
  • LoopEngine.ValidatePlannedImagePaths (cognitive 36) ShareRibbon/Agent/LoopEngine.Coverage.vb:45 — LoopEngine.ValidatePlannedImagePaths has cognitive complexity 36 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MCPConfigForm.AdvancedButton_Click (cognitive 36) · ×1
  • MCPConfigForm.AdvancedButton_Click (cognitive 36) ShareRibbon/Mcp/MCPConfigForm.vb:406 — MCPConfigForm.AdvancedButton_Click has cognitive complexity 36 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · Ribbon1.ExtractTemplateStructure (cognitive 36) · ×1
  • Ribbon1.ExtractTemplateStructure (cognitive 36) WordAi/Ribbon1.vb:265 — Ribbon1.ExtractTemplateStructure has cognitive complexity 36 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · HttpStreamService.ConvertToAnthropicFormatNonStreaming (cognitive 35) · ×1
  • HttpStreamService.ConvertToAnthropicFormatNonStreaming (cognitive 35) ShareRibbon/Controls/Services/HttpStreamService.vb:243 — HttpStreamService.ConvertToAnthropicFormatNonStreaming has cognitive complexity 35 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. This shape REPEATS in the file: one other method here (HttpStreamService.ConvertToAnthropicFormat) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · HttpStreamService.ConvertToAnthropicFormat (cognitive 35) · ×1
  • HttpStreamService.ConvertToAnthropicFormat (cognitive 35) ShareRibbon/Controls/Services/HttpStreamService.vb:587 — HttpStreamService.ConvertToAnthropicFormat has cognitive complexity 35 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. This shape REPEATS in the file: one other method here (HttpStreamService.ConvertToAnthropicFormatNonStreaming) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · HttpStreamService.ProcessStreamChunkAsync (cognitive 35) · ×1
  • HttpStreamService.ProcessStreamChunkAsync (cognitive 35) ShareRibbon/Controls/Services/HttpStreamService.vb:814 — HttpStreamService.ProcessStreamChunkAsync has cognitive complexity 35 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · FormatMirrorService.ExtractFormattingFromDocument (cognitive 34) · ×1
  • FormatMirrorService.ExtractFormattingFromDocument (cognitive 34) ShareRibbon/Services/Reformat/FormatMirrorService.vb:36 — FormatMirrorService.ExtractFormattingFromDocument has cognitive complexity 34 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SqliteNativeLoader.EnsureLoaded (cognitive 34) · ×1
  • SqliteNativeLoader.EnsureLoaded (cognitive 34) ShareRibbon/Config/SqliteNativeLoader.vb:20 — SqliteNativeLoader.EnsureLoaded has cognitive complexity 34 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AutocompleteService.EnrichContextForIntent (cognitive 34) · ×1
  • AutocompleteService.EnrichContextForIntent (cognitive 34) ShareRibbon/Controls/Services/AutocompleteService.vb:70 — AutocompleteService.EnrichContextForIntent has cognitive complexity 34 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ConfigApiForm.CloudSaveButton_Click (cognitive 33) · ×1
  • ConfigApiForm.CloudSaveButton_Click (cognitive 33) ShareRibbon/Config/ConfigApiForm.vb:1344 — ConfigApiForm.CloudSaveButton_Click has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AgentChangeLogRepository.SaveRun (cognitive 33) · ×1
  • AgentChangeLogRepository.SaveRun (cognitive 33) ShareRibbon/Storage/AgentChangeLogRepository.vb:12 — AgentChangeLogRepository.SaveRun has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · FormatTemplateRepository.LoadTemplateElements (cognitive 33) · ×1
  • FormatTemplateRepository.LoadTemplateElements (cognitive 33) ShareRibbon/Storage/FormatTemplateRepository.vb:154 — FormatTemplateRepository.LoadTemplateElements has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ApplySemanticTaggingResult (cognitive 33) · ×1
  • ChatControl.ApplySemanticTaggingResult (cognitive 33) WordAi/ChatControl.vb:3055 — ChatControl.ApplySemanticTaggingResult has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ConfigApiForm.LoadAndShowSkillDirectoryFiles (cognitive 32) · ×1
  • ConfigApiForm.LoadAndShowSkillDirectoryFiles (cognitive 32) ShareRibbon/Config/ConfigApiForm.vb:961 — ConfigApiForm.LoadAndShowSkillDirectoryFiles has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DocumentAnalyzer.ScoreOfficialDocument (cognitive 32) · ×1
  • DocumentAnalyzer.ScoreOfficialDocument (cognitive 32) ShareRibbon/Services/Reformat/DocumentAnalyzer.vb:381 — DocumentAnalyzer.ScoreOfficialDocument has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · TaggingValidator.Validate (cognitive 32) · ×1
  • TaggingValidator.Validate (cognitive 32) ShareRibbon/Services/Reformat/TaggingValidator.vb:30 — TaggingValidator.Validate has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ReformatTemplateEditorControl.LstBodyStyles_SelectedIndexChanged (cognitive 32) · ×1
  • ReformatTemplateEditorControl.LstBodyStyles_SelectedIndexChanged (cognitive 32) ShareRibbon/Controls/ReformatTemplateEditorControl.vb:622 — ReformatTemplateEditorControl.LstBodyStyles_SelectedIndexChanged has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointVisualVerifier.PreflightAndRepair (cognitive 32) · ×1
  • PowerPointVisualVerifier.PreflightAndRepair (cognitive 32) PowerPointAi/Design/PowerPointVisualVerifier.vb:15 — PowerPointVisualVerifier.PreflightAndRepair has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelDirectOperationService.ExecuteFormatRange (cognitive 32) · ×1
  • ExcelDirectOperationService.ExecuteFormatRange (cognitive 32) ExcelAi/ExcelDirectOperationService.vb:328 — ExcelDirectOperationService.ExecuteFormatRange has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · showAgentPlanCard (cognitive 32) · ×1
  • showAgentPlanCard (cognitive 32) ShareRibbon/Resources/js/agent-card.js:81 — showAgentPlanCard has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 7, ternaries 5 (7 pts), error handling 1 (nesting depth added 7). Of this number, 31 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConfigManager.MergeConfigurations (cognitive 31) · ×1
  • ConfigManager.MergeConfigurations (cognitive 31) ShareRibbon/Config/ConfigManager.vb:80 — ConfigManager.MergeConfigurations has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MemoryRepository.GetSkillUsage (cognitive 31) · ×1
  • MemoryRepository.GetSkillUsage (cognitive 31) ShareRibbon/Storage/MemoryRepository.vb:732 — MemoryRepository.GetSkillUsage has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SkillsService.BuildSkillsCatalogMessage (cognitive 31) · ×1
  • SkillsService.BuildSkillsCatalogMessage (cognitive 31) ShareRibbon/Services/SkillsService.vb:455 — SkillsService.BuildSkillsCatalogMessage has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · WordTemplateParser.ApplyParagraphPropertiesToConfig (cognitive 31) · ×1
  • WordTemplateParser.ApplyParagraphPropertiesToConfig (cognitive 31) WordAi/Services/Reformat/WordTemplateParser.vb:401 — WordTemplateParser.ApplyParagraphPropertiesToConfig has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SlideComponentLibrary.BuildTableContent (cognitive 31) · ×1
  • SlideComponentLibrary.BuildTableContent (cognitive 31) PowerPointAi/Design/SlideComponentLibrary.vb:290 — SlideComponentLibrary.BuildTableContent has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · Ribbon1.ExtractPresentationStructure (cognitive 31) · ×1
  • Ribbon1.ExtractPresentationStructure (cognitive 31) PowerPointAi/Ribbon1.vb:243 — Ribbon1.ExtractPresentationStructure has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · showComparison (cognitive 31) · ×1
  • showComparison (cognitive 31) ShareRibbon/Resources/js/revision-manager.js:100 — showComparison has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 10, error handling 3 (4 pts), ternaries 2 (nesting depth added 5). Of this number, 26 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ReformatTemplateEditorControl.LstLayoutElements_SelectedIndexChanged (cognitive 30) · ×1
  • ReformatTemplateEditorControl.LstLayoutElements_SelectedIndexChanged (cognitive 30) ShareRibbon/Controls/ReformatTemplateEditorControl.vb:559 — ReformatTemplateEditorControl.LstLayoutElements_SelectedIndexChanged has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · EmbeddingService.GetEmbeddingAsync (cognitive 30) · ×1
  • EmbeddingService.GetEmbeddingAsync (cognitive 30) ShareRibbon/Services/EmbeddingService.vb:90 — EmbeddingService.GetEmbeddingAsync has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SkillsDirectoryService.ParseSkillJsonFile (cognitive 30) · ×1
  • SkillsDirectoryService.ParseSkillJsonFile (cognitive 30) ShareRibbon/Services/SkillsDirectoryService.vb:616 — SkillsDirectoryService.ParseSkillJsonFile has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PptGenerationHandler.ParseSlideContent (cognitive 30) · ×1
  • PptGenerationHandler.ParseSlideContent (cognitive 30) PowerPointAi/Handlers/PptGenerationHandler.vb:95 — PptGenerationHandler.ParseSlideContent has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · EnhancedPreviewAndConfirm.CompareWorkbookStates (cognitive 30) · ×1
  • EnhancedPreviewAndConfirm.CompareWorkbookStates (cognitive 30) ExcelAi/EnhancedPreviewAndConfirm.vb:472 — EnhancedPreviewAndConfirm.CompareWorkbookStates has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelContextProvider.BuildColumnTypeSummary (cognitive 30) · ×1
  • ExcelContextProvider.BuildColumnTypeSummary (cognitive 30) ExcelAi/Context/ExcelContextProvider.vb:153 — ExcelContextProvider.BuildColumnTypeSummary has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ConfigApiForm.LocalSaveButton_Click (cognitive 29) · ×1
  • ConfigApiForm.LocalSaveButton_Click (cognitive 29) ShareRibbon/Config/ConfigApiForm.vb:1648 — ConfigApiForm.LocalSaveButton_Click has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · LoopEngine.BuildCompletionMessage (cognitive 29) · ×1
  • LoopEngine.BuildCompletionMessage (cognitive 29) ShareRibbon/Agent/LoopEngine.vb:627 — LoopEngine.BuildCompletionMessage has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AgentMemory.Search (cognitive 29) · ×1
  • AgentMemory.Search (cognitive 29) ShareRibbon/Agent/AgentMemory.vb:225 — AgentMemory.Search has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AgentRunChangeLog.AddFromStep (cognitive 29) · ×1
  • AgentRunChangeLog.AddFromStep (cognitive 29) ShareRibbon/Agent/Execution/AgentChangeLog.vb:227 — AgentRunChangeLog.AddFromStep has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ExecuteWordCommandsArrayWithToolResult (cognitive 29) · ×1
  • ChatControl.ExecuteWordCommandsArrayWithToolResult (cognitive 29) WordAi/ChatControl.vb:3773 — ChatControl.ExecuteWordCommandsArrayWithToolResult has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · WebDataCapturePane.HandleMediaContainerContent (cognitive 29) · ×1
  • WebDataCapturePane.HandleMediaContainerContent (cognitive 29) WordAi/WebDataCapturePane.vb:490 — WebDataCapturePane.HandleMediaContainerContent has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · OpenXmlWordTranslator.ReplaceTextPreservingObjects (cognitive 29) · ×1
  • OpenXmlWordTranslator.ReplaceTextPreservingObjects (cognitive 29) WordAi/OpenXmlWordTranslator.vb:254 — OpenXmlWordTranslator.ReplaceTextPreservingObjects has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointDocumentTranslateService.ApplyImmersiveMode (cognitive 29) · ×1
  • PowerPointDocumentTranslateService.ApplyImmersiveMode (cognitive 29) PowerPointAi/PowerPointDocumentTranslateService.vb:243 — PowerPointDocumentTranslateService.ApplyImmersiveMode has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · autocomplete.handleSmartInputKeydown (cognitive 29) · ×1
  • autocomplete.handleSmartInputKeydown (cognitive 29) ShareRibbon/Resources/js/autocomplete.js:106 — autocomplete.handleSmartInputKeydown has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent 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 · PromptManager.BuildPlanningPrompt (cognitive 28) · ×1
  • PromptManager.BuildPlanningPrompt (cognitive 28) ShareRibbon/Agent/PromptManager.vb:165 — PromptManager.BuildPlanningPrompt has cognitive complexity 28 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MCPConfigForm.SaveButton_Click (cognitive 28) · ×1
  • MCPConfigForm.SaveButton_Click (cognitive 28) ShareRibbon/Mcp/MCPConfigForm.vb:1480 — MCPConfigForm.SaveButton_Click has cognitive complexity 28 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · WordTemplateParser.ExtractPageSetup (cognitive 28) · ×1
  • WordTemplateParser.ExtractPageSetup (cognitive 28) WordAi/Services/Reformat/WordTemplateParser.vb:458 — WordTemplateParser.ExtractPageSetup has cognitive complexity 28 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ParseFile (cognitive 28) · ×1
  • ChatControl.ParseFile (cognitive 28) ExcelAi/ChatControl.vb:927 — ChatControl.ParseFile has cognitive complexity 28 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · _createTemplateCard (cognitive 28) · ×1
  • _createTemplateCard (cognitive 28) ShareRibbon/Resources/js/markdown-renderer.js:117 — _createTemplateCard has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 8, ternaries 4 (7 pts) (nesting depth added 7). Of this number, 23 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticRenderingEngine.BuildSetCharacterFormatInstruction (cognitive 27) · ×1
  • SemanticRenderingEngine.BuildSetCharacterFormatInstruction (cognitive 27) ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:339 — SemanticRenderingEngine.BuildSetCharacterFormatInstruction has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ToolRegistry.ExecuteSkillScriptAsync (cognitive 27) · ×1
  • ToolRegistry.ExecuteSkillScriptAsync (cognitive 27) ShareRibbon/Agent/ToolRegistry.vb:1156 — ToolRegistry.ExecuteSkillScriptAsync has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · TaskPackageCatalog.ParseVerifier (cognitive 27) · ×1
  • TaskPackageCatalog.ParseVerifier (cognitive 27) ShareRibbon/Agent/TaskPackageCatalog.Parsing.vb:115 — TaskPackageCatalog.ParseVerifier has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SkillsService.TokenizeQuery (cognitive 27) · ×1
  • SkillsService.TokenizeQuery (cognitive 27) ShareRibbon/Services/SkillsService.vb:158 — SkillsService.TokenizeQuery has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · WordFormattingAgent.ResolveObservationRanges (cognitive 27) · ×1
  • WordFormattingAgent.ResolveObservationRanges (cognitive 27) WordAi/Services/WordFormattingAgent.vb:293 — WordFormattingAgent.ResolveObservationRanges has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ParagraphService.SetParagraphFormat (cognitive 27) · ×1
  • ParagraphService.SetParagraphFormat (cognitive 27) WordAi/Services/ParagraphService.vb:156 — ParagraphService.SetParagraphFormat has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.GetSlideContent (cognitive 27) · ×1
  • ChatControl.GetSlideContent (cognitive 27) PowerPointAi/ChatControl.vb:856 — ChatControl.GetSlideContent has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointOperationExecutor.ResolveSmartArtLayout (cognitive 27) · ×1
  • PowerPointOperationExecutor.ResolveSmartArtLayout (cognitive 27) PowerPointAi/Runtime/PowerPointOperationExecutor.vb:342 — PowerPointOperationExecutor.ResolveSmartArtLayout has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.EvaluateFormula (cognitive 27) · ×1
  • ChatControl.EvaluateFormula (cognitive 27) ExcelAi/ChatControl.vb:154 — ChatControl.EvaluateFormula has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DeepseekControl.EvaluateFormula (cognitive 27) · ×1
  • DeepseekControl.EvaluateFormula (cognitive 27) ExcelAi/DeepseekControl.vb:148 — DeepseekControl.EvaluateFormula has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DocumentAnalyzer.AnalyzeStructure (cognitive 26) · ×1
  • DocumentAnalyzer.AnalyzeStructure (cognitive 26) ShareRibbon/Services/Reformat/DocumentAnalyzer.vb:712 — DocumentAnalyzer.AnalyzeStructure has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SemanticRenderingEngine.ApplySemanticFormatting (cognitive 26) · ×1
  • SemanticRenderingEngine.ApplySemanticFormatting (cognitive 26) ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:188 — SemanticRenderingEngine.ApplySemanticFormatting has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · OfficeHarness.DecideAsync (cognitive 26) · ×1
  • OfficeHarness.DecideAsync (cognitive 26) ShareRibbon/Agent/Harness/OfficeHarness.vb:215 — OfficeHarness.DecideAsync has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · BaseChatControl.SendAndGetResponseAsync (cognitive 26) · ×1
  • BaseChatControl.SendAndGetResponseAsync (cognitive 26) ShareRibbon/Controls/BaseChatControl.vb:2383 — BaseChatControl.SendAndGetResponseAsync has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MCPConfigForm.LoadToolsFromConnection (cognitive 26) · ×1
  • MCPConfigForm.LoadToolsFromConnection (cognitive 26) ShareRibbon/Mcp/MCPConfigForm.vb:306 — MCPConfigForm.LoadToolsFromConnection has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MCPConfigForm.TestConnectionAsync (cognitive 26) · ×1
  • MCPConfigForm.TestConnectionAsync (cognitive 26) ShareRibbon/Mcp/MCPConfigForm.vb:1195 — MCPConfigForm.TestConnectionAsync has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · HttpStreamService.ProcessAnthropicChunk (cognitive 26) · ×1
  • HttpStreamService.ProcessAnthropicChunk (cognitive 26) ShareRibbon/Controls/Services/HttpStreamService.vb:700 — HttpStreamService.ProcessAnthropicChunk has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · HttpStreamService.FlushBufferAsync (cognitive 26) · ×1
  • HttpStreamService.FlushBufferAsync (cognitive 26) ShareRibbon/Controls/Services/HttpStreamService.vb:892 — HttpStreamService.FlushBufferAsync has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AiGateway.ConvertToAnthropicRequest (cognitive 26) · ×1
  • AiGateway.ConvertToAnthropicRequest (cognitive 26) ShareRibbon/Services/Ai/AiGateway.vb:212 — AiGateway.ConvertToAnthropicRequest has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ThisAddIn.ApplyPlaceholderPreviewToDocument (cognitive 26) · ×1
  • ThisAddIn.ApplyPlaceholderPreviewToDocument (cognitive 26) WordAi/ThisAddIn.vb:376 — ThisAddIn.ApplyPlaceholderPreviewToDocument has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · WordContinuationService.GetCursorContext (cognitive 26) · ×1
  • WordContinuationService.GetCursorContext (cognitive 26) WordAi/WordContinuationService.vb:43 — WordContinuationService.GetCursorContext has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PptGenerationHandler.CreateSlide (cognitive 26) · ×1
  • PptGenerationHandler.CreateSlide (cognitive 26) PowerPointAi/Handlers/PptGenerationHandler.vb:167 — PptGenerationHandler.CreateSlide has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelDirectOperationService.ExecuteWriteData (cognitive 26) · ×1
  • ExcelDirectOperationService.ExecuteWriteData (cognitive 26) ExcelAi/ExcelDirectOperationService.vb:123 — ExcelDirectOperationService.ExecuteWriteData has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · code-handler.updateContinuationModeUI (cognitive 26) · ×1
  • code-handler.updateContinuationModeUI (cognitive 26) ShareRibbon/Resources/js/code-handler.js:668 — code-handler.updateContinuationModeUI has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (26 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 · code (cognitive 26) · ×1
  • code (cognitive 26) ShareRibbon/Resources/js/core.js:23 — code has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 5 (8 pts), error handling 1 (3 pts), ternaries 1 (nesting depth added 5). 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 · DocumentAnalyzer.Analyze (cognitive 25) · ×1
  • DocumentAnalyzer.Analyze (cognitive 25) ShareRibbon/Services/Reformat/DocumentAnalyzer.vb:255 — DocumentAnalyzer.Analyze has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SkillsDirectoryService.ParseFrontMatterAndContent (cognitive 25) · ×1
  • SkillsDirectoryService.ParseFrontMatterAndContent (cognitive 25) ShareRibbon/Services/SkillsDirectoryService.vb:437 — SkillsDirectoryService.ParseFrontMatterAndContent has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PreSendChecker.CheckAsync (cognitive 25) · ×1
  • PreSendChecker.CheckAsync (cognitive 25) ShareRibbon/Loop/Checkers/PreSendChecker.vb:15 — PreSendChecker.CheckAsync has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.StartSemanticReformatPipeline (cognitive 25) · ×1
  • ChatControl.StartSemanticReformatPipeline (cognitive 25) WordAi/ChatControl.vb:450 — ChatControl.StartSemanticReformatPipeline has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointDocumentTranslateService.ExtractTextFromShape (cognitive 25) · ×1
  • PowerPointDocumentTranslateService.ExtractTextFromShape (cognitive 25) PowerPointAi/PowerPointDocumentTranslateService.vb:66 — PowerPointDocumentTranslateService.ExtractTextFromShape has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · reformat-template.previewTemplate (cognitive 25) · ×1
  • reformat-template.previewTemplate (cognitive 25) ShareRibbon/Resources/js/reformat-template.js:828 — reformat-template.previewTemplate has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 16, if/else 8 (9 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CodeExecutionService.ExecuteCodeWithToolResult (cognitive 24) · ×1
  • CodeExecutionService.ExecuteCodeWithToolResult (cognitive 24) ShareRibbon/Controls/Services/CodeExecutionService.vb:143 — CodeExecutionService.ExecuteCodeWithToolResult has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PostFlushValidator.ValidateDslJson (cognitive 24) · ×1
  • PostFlushValidator.ValidateDslJson (cognitive 24) ShareRibbon/Loop/Validators/PostFlushValidator.vb:118 — PostFlushValidator.ValidateDslJson has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.GetSelectionContent (cognitive 24) · ×1
  • ChatControl.GetSelectionContent (cognitive 24) WordAi/ChatControl.vb:1920 — ChatControl.GetSelectionContent has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.MergePreviewPlanTags (cognitive 24) · ×1
  • ChatControl.MergePreviewPlanTags (cognitive 24) WordAi/ChatControl.vb:3011 — ChatControl.MergePreviewPlanTags has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ExecuteWordCommandWithToolResult (cognitive 24) · ×1
  • ChatControl.ExecuteWordCommandWithToolResult (cognitive 24) WordAi/ChatControl.vb:3895 — ChatControl.ExecuteWordCommandWithToolResult has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ApplyFormattingToShape (cognitive 24) · ×1
  • ChatControl.ApplyFormattingToShape (cognitive 24) PowerPointAi/ChatControl.vb:2962 — ChatControl.ApplyFormattingToShape has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelRunRestore.Replay (cognitive 24) · ×1
  • ExcelRunRestore.Replay (cognitive 24) ExcelAi/Undo/ExcelRunRestore.vb:83 — ExcelRunRestore.Replay has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · reformat-template.buildDocxMappingPreviewHtml (cognitive 24) · ×1
  • reformat-template.buildDocxMappingPreviewHtml (cognitive 24) ShareRibbon/Resources/js/reformat-template.js:1273 — reformat-template.buildDocxMappingPreviewHtml has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, ternaries 3 (nesting depth added 7). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 1275). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · OpenXmlReformatEngine.ExecuteSetPageSetup (cognitive 23) · ×1
  • OpenXmlReformatEngine.ExecuteSetPageSetup (cognitive 23) ShareRibbon/Services/Reformat/OpenXmlReformatEngine.vb:317 — OpenXmlReformatEngine.ExecuteSetPageSetup has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ReformatCoordinator.BuildInstructions (cognitive 23) · ×1
  • ReformatCoordinator.BuildInstructions (cognitive 23) ShareRibbon/Services/Reformat/ReformatCoordinator.vb:140 — ReformatCoordinator.BuildInstructions has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · OfficeHarness.RunAsync (cognitive 23) · ×1
  • OfficeHarness.RunAsync (cognitive 23) ShareRibbon/Agent/Harness/OfficeHarness.vb:41 — OfficeHarness.RunAsync has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · StdioConfigForm.CollectEnvironmentVariables (cognitive 23) · ×1
  • StdioConfigForm.CollectEnvironmentVariables (cognitive 23) ShareRibbon/Mcp/StdioConfigForm.vb:137 — StdioConfigForm.CollectEnvironmentVariables has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ExecuteAddAnimation (cognitive 23) · ×1
  • ChatControl.ExecuteAddAnimation (cognitive 23) PowerPointAi/ChatControl.vb:2180 — ChatControl.ExecuteAddAnimation has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ProfessionalDeckExecutor.ValidateChartSpec (cognitive 23) · ×1
  • ProfessionalDeckExecutor.ValidateChartSpec (cognitive 23) PowerPointAi/Design/ProfessionalDeckExecutor.vb:362 — ProfessionalDeckExecutor.ValidateChartSpec has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointOperationExecutor.BuildResultRef (cognitive 23) · ×1
  • PowerPointOperationExecutor.BuildResultRef (cognitive 23) PowerPointAi/Runtime/PowerPointOperationExecutor.vb:422 — PowerPointOperationExecutor.BuildResultRef has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SkillsConfigForm.ListSelectionChanged (cognitive 22) · ×1
  • SkillsConfigForm.ListSelectionChanged (cognitive 22) ShareRibbon/Config/SkillsConfigForm.vb:296 — SkillsConfigForm.ListSelectionChanged has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · BaseChatControl.HandleUndoReformat (cognitive 22) · ×1
  • BaseChatControl.HandleUndoReformat (cognitive 22) ShareRibbon/Controls/BaseChatControl.vb:3399 — BaseChatControl.HandleUndoReformat has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MCPConfigForm.ExecuteTestAsync (cognitive 22) · ×1
  • MCPConfigForm.ExecuteTestAsync (cognitive 22) ShareRibbon/Mcp/MCPConfigForm.vb:1324 — MCPConfigForm.ExecuteTestAsync has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · HttpStreamService.ProcessNonStreamingResponseAsync (cognitive 22) · ×1
  • HttpStreamService.ProcessNonStreamingResponseAsync (cognitive 22) ShareRibbon/Controls/Services/HttpStreamService.vb:356 — HttpStreamService.ProcessNonStreamingResponseAsync has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.IsExplicitFormattingRequest (cognitive 22) · ×1
  • ChatControl.IsExplicitFormattingRequest (cognitive 22) WordAi/ChatControl.vb:1419 — ChatControl.IsExplicitFormattingRequest has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · OpenXmlWordTranslator.ApplyImmersiveMode (cognitive 22) · ×1
  • OpenXmlWordTranslator.ApplyImmersiveMode (cognitive 22) WordAi/OpenXmlWordTranslator.vb:361 — OpenXmlWordTranslator.ApplyImmersiveMode has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · WordCompletionManager.OnSelectionChange (cognitive 22) · ×1
  • WordCompletionManager.OnSelectionChange (cognitive 22) WordAi/WordCompletionManager.vb:111 — WordCompletionManager.OnSelectionChange has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointCompletionManager.OnSelectionChange (cognitive 22) · ×1
  • PowerPointCompletionManager.OnSelectionChange (cognitive 22) PowerPointAi/PowerPointCompletionManager.vb:111 — PowerPointCompletionManager.OnSelectionChange has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelJsonCommandSchema.NormalizeParamNames (cognitive 22) · ×1
  • ExcelJsonCommandSchema.NormalizeParamNames (cognitive 22) ExcelAi/ExcelJsonCommandSchema.vb:295 — ExcelJsonCommandSchema.NormalizeParamNames has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · agent-card.setStepEditResult (cognitive 22) · ×1
  • agent-card.setStepEditResult (cognitive 22) ShareRibbon/Resources/js/agent-card.js:497 — agent-card.setStepEditResult has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, ternaries 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · check-entry-reachability.readVbArguments (cognitive 22) · ×1
  • check-entry-reachability.readVbArguments (cognitive 22) scripts/check-entry-reachability.js:71 — check-entry-reachability.readVbArguments has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderAgentChangeSummary (cognitive 22) · ×1
  • renderAgentChangeSummary (cognitive 22) ShareRibbon/Resources/js/agent-card.js:942 — renderAgentChangeSummary has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7, ternaries 3 (4 pts) (nesting depth added 3). Of this number, 13 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · TaggingValidator.StripMarkdownCodeBlock (cognitive 21) · ×1
  • TaggingValidator.StripMarkdownCodeBlock (cognitive 21) ShareRibbon/Services/Reformat/TaggingValidator.vb:183 — TaggingValidator.StripMarkdownCodeBlock has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ToolRegistry.LoadSkillScriptsAsTools (cognitive 21) · ×1
  • ToolRegistry.LoadSkillScriptsAsTools (cognitive 21) ShareRibbon/Agent/ToolRegistry.vb:408 — ToolRegistry.LoadSkillScriptsAsTools has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ToolRegistry.ConvertMcpToDescriptor (cognitive 21) · ×1
  • ToolRegistry.ConvertMcpToDescriptor (cognitive 21) ShareRibbon/Agent/ToolRegistry.vb:622 — ToolRegistry.ConvertMcpToDescriptor has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ToolRegistry.ValidateBatchCommandEnvelope (cognitive 21) · ×1
  • ToolRegistry.ValidateBatchCommandEnvelope (cognitive 21) ShareRibbon/Agent/ToolRegistry.vb:925 — ToolRegistry.ValidateBatchCommandEnvelope has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · BaseChatControl.Send (cognitive 21) · ×1
  • BaseChatControl.Send (cognitive 21) ShareRibbon/Controls/BaseChatControl.vb:3042 — BaseChatControl.Send has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExceptionClassifier.Classify (cognitive 21) · ×1
  • ExceptionClassifier.Classify (cognitive 21) ShareRibbon/Common/ExceptionClassifier.vb:52 — ExceptionClassifier.Classify has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MCPConnectionManager.SaveConnections (cognitive 21) · ×1
  • MCPConnectionManager.SaveConnections (cognitive 21) ShareRibbon/Mcp/MCPConnectionConfig.vb:393 — MCPConnectionManager.SaveConnections has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · FileParserService.DetectFileEncoding (cognitive 21) · ×1
  • FileParserService.DetectFileEncoding (cognitive 21) ShareRibbon/Controls/Services/FileParserService.vb:152 — FileParserService.DetectFileEncoding has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ApplyStylePreviewToSelection (cognitive 21) · ×1
  • ChatControl.ApplyStylePreviewToSelection (cognitive 21) WordAi/ChatControl.vb:2046 — ChatControl.ApplyStylePreviewToSelection has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.HandleApplyRevisionSegment (cognitive 21) · ×1
  • ChatControl.HandleApplyRevisionSegment (cognitive 21) WordAi/ChatControl.vb:2360 — ChatControl.HandleApplyRevisionSegment has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ExecuteDslCommand (cognitive 21) · ×1
  • ChatControl.ExecuteDslCommand (cognitive 21) WordAi/ChatControl.vb:4430 — ChatControl.ExecuteDslCommand has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DeepseekControl.AppendCurrentSelectedContent (cognitive 21) · ×1
  • DeepseekControl.AppendCurrentSelectedContent (cognitive 21) PowerPointAi/DeepseekControl.vb:48 — DeepseekControl.AppendCurrentSelectedContent has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointVisualVerifier.ScoreComposition (cognitive 21) · ×1
  • PowerPointVisualVerifier.ScoreComposition (cognitive 21) PowerPointAi/Design/PowerPointVisualVerifier.vb:164 — PowerPointVisualVerifier.ScoreComposition has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SemanticRenderingEngine.BuildSetParagraphStyleInstruction (cognitive 20) · ×1
  • SemanticRenderingEngine.BuildSetParagraphStyleInstruction (cognitive 20) ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:291 — SemanticRenderingEngine.BuildSetParagraphStyleInstruction has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ScenarioManager.BuildIdentificationPatternsText (cognitive 20) · ×1
  • ScenarioManager.BuildIdentificationPatternsText (cognitive 20) ShareRibbon/Services/Reformat/ScenarioManager.vb:166 — ScenarioManager.BuildIdentificationPatternsText has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · LoopEngine.ValidateExecutionOutcome (cognitive 20) · ×1
  • LoopEngine.ValidateExecutionOutcome (cognitive 20) ShareRibbon/Agent/LoopEngine.Coverage.vb:162 — LoopEngine.ValidateExecutionOutcome has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SkillRegistry.MatchSkill (cognitive 20) · ×1
  • SkillRegistry.MatchSkill (cognitive 20) ShareRibbon/Agent/SkillRegistry.vb:48 — SkillRegistry.MatchSkill has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · BaseChatControl.HandleSendMessage (cognitive 20) · ×1
  • BaseChatControl.HandleSendMessage (cognitive 20) ShareRibbon/Controls/BaseChatControl.vb:1413 — BaseChatControl.HandleSendMessage has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · BaseChatControl.CheckAndCompleteProcessingHook (cognitive 20) · ×1
  • BaseChatControl.CheckAndCompleteProcessingHook (cognitive 20) ShareRibbon/Controls/BaseChatControl.vb:3176 — BaseChatControl.CheckAndCompleteProcessingHook has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SkillsIndexService.IndexInstalledSkillsAsync (cognitive 20) · ×1
  • SkillsIndexService.IndexInstalledSkillsAsync (cognitive 20) ShareRibbon/Services/Memory/SkillsIndexService.vb:39 — SkillsIndexService.IndexInstalledSkillsAsync has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PostFlushValidator.FindFirstCompleteJsonEnd (cognitive 20) · ×1
  • PostFlushValidator.FindFirstCompleteJsonEnd (cognitive 20) ShareRibbon/Loop/Validators/PostFlushValidator.vb:230 — PostFlushValidator.FindFirstCompleteJsonEnd has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointVisualVerifier.VerifyRenderedPixels (cognitive 20) · ×1
  • PowerPointVisualVerifier.VerifyRenderedPixels (cognitive 20) PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:11 — PowerPointVisualVerifier.VerifyRenderedPixels has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointApiCatalogProvider.ScoreEntry (cognitive 20) · ×1
  • PowerPointApiCatalogProvider.ScoreEntry (cognitive 20) PowerPointAi/Runtime/PowerPointApiCatalogProvider.vb:420 — PowerPointApiCatalogProvider.ScoreEntry has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelDocumentTranslateService.PrepareOutputSpace (cognitive 20) · ×1
  • ExcelDocumentTranslateService.PrepareOutputSpace (cognitive 20) ExcelAi/ExcelDocumentTranslateService.vb:198 — ExcelDocumentTranslateService.PrepareOutputSpace has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · reformat-template.updateResourceTabUI (cognitive 20) · ×1
  • reformat-template.updateResourceTabUI (cognitive 20) ShareRibbon/Resources/js/reformat-template.js:153 — reformat-template.updateResourceTabUI has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 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 · FormatTemplateRepository.LoadTemplateStyleRules (cognitive 19) · ×1
  • FormatTemplateRepository.LoadTemplateStyleRules (cognitive 19) ShareRibbon/Storage/FormatTemplateRepository.vb:187 — FormatTemplateRepository.LoadTemplateStyleRules has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AgentKernel.ExecuteAsync (cognitive 19) · ×1
  • AgentKernel.ExecuteAsync (cognitive 19) ShareRibbon/Agent/AgentKernel.vb:268 — AgentKernel.ExecuteAsync has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MCPConfigForm.ConvertToolToLLMFunction (cognitive 19) · ×1
  • MCPConfigForm.ConvertToolToLLMFunction (cognitive 19) ShareRibbon/Mcp/MCPConfigForm.vb:1023 — MCPConfigForm.ConvertToolToLLMFunction has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · CodeExecutionService.ExecuteJsonCommandWithToolResult (cognitive 19) · ×1
  • CodeExecutionService.ExecuteJsonCommandWithToolResult (cognitive 19) ShareRibbon/Controls/Services/CodeExecutionService.vb:226 — CodeExecutionService.ExecuteJsonCommandWithToolResult has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ExecuteFormatText (cognitive 19) · ×1
  • ChatControl.ExecuteFormatText (cognitive 19) WordAi/ChatControl.vb:4858 — ChatControl.ExecuteFormatText has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · WordTemplateParser.MatchStyleToTag (cognitive 19) · ×1
  • WordTemplateParser.MatchStyleToTag (cognitive 19) WordAi/Services/Reformat/WordTemplateParser.vb:170 — WordTemplateParser.MatchStyleToTag has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · WordJsonCommandSchema.ValidateJsonStructure (cognitive 19) · ×1
  • WordJsonCommandSchema.ValidateJsonStructure (cognitive 19) WordAi/WordJsonCommandSchema.vb:137 — WordJsonCommandSchema.ValidateJsonStructure has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointJsonCommandSchema.ValidateJsonStructure (cognitive 19) · ×1
  • PowerPointJsonCommandSchema.ValidateJsonStructure (cognitive 19) PowerPointAi/PowerPointJsonCommandSchema.vb:141 — PowerPointJsonCommandSchema.ValidateJsonStructure has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointOperationObserver.CaptureState (cognitive 19) · ×1
  • PowerPointOperationObserver.CaptureState (cognitive 19) PowerPointAi/Runtime/PowerPointOperationObserver.vb:15 — PowerPointOperationObserver.CaptureState has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointOperationExecutor.ConvertArgument (cognitive 19) · ×1
  • PowerPointOperationExecutor.ConvertArgument (cognitive 19) PowerPointAi/Runtime/PowerPointOperationExecutor.vb:309 — PowerPointOperationExecutor.ConvertArgument has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelDirectOperationService.ExecuteApplyFormulaFlexible (cognitive 19) · ×1
  • ExcelDirectOperationService.ExecuteApplyFormulaFlexible (cognitive 19) ExcelAi/ExcelDirectOperationService.vb:221 — ExcelDirectOperationService.ExecuteApplyFormulaFlexible has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelDirectOperationService.ExecuteCleanData (cognitive 19) · ×1
  • ExcelDirectOperationService.ExecuteCleanData (cognitive 19) ExcelAi/ExcelDirectOperationService.vb:735 — ExcelDirectOperationService.ExecuteCleanData has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelJsonCommandSchema.ValidateJsonStructure (cognitive 19) · ×1
  • ExcelJsonCommandSchema.ValidateJsonStructure (cognitive 19) ExcelAi/ExcelJsonCommandSchema.vb:166 — ExcelJsonCommandSchema.ValidateJsonStructure has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · chat-manager.createChatSection (cognitive 19) · ×1
  • chat-manager.createChatSection (cognitive 19) ShareRibbon/Resources/js/chat-manager.js:7 — chat-manager.createChatSection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · executeCode (cognitive 19) · ×1
  • executeCode (cognitive 19) ShareRibbon/Resources/js/code-handler.js:90 — executeCode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · ConfigManager.SaveConfig (cognitive 18) · ×1
  • ConfigManager.SaveConfig (cognitive 18) ShareRibbon/Config/ConfigManager.vb:154 — ConfigManager.SaveConfig has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DocumentAnalyzer.ScoreResume (cognitive 18) · ×1
  • DocumentAnalyzer.ScoreResume (cognitive 18) ShareRibbon/Services/Reformat/DocumentAnalyzer.vb:661 — DocumentAnalyzer.ScoreResume has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · TranslateActionForm.LoadSettings (cognitive 18) · ×1
  • TranslateActionForm.LoadSettings (cognitive 18) ShareRibbon/Translate/TranslateActionForm.vb:354 — TranslateActionForm.LoadSettings has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · TaskPackageOutcomeVerifier.CheckOne (cognitive 18) · ×1
  • TaskPackageOutcomeVerifier.CheckOne (cognitive 18) ShareRibbon/Agent/TaskPackageOutcomeVerifier.vb:38 — TaskPackageOutcomeVerifier.CheckOne has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ReformatTemplateEditorControl.SaveCurrentLayoutElement (cognitive 18) · ×1
  • ReformatTemplateEditorControl.SaveCurrentLayoutElement (cognitive 18) ShareRibbon/Controls/ReformatTemplateEditorControl.vb:899 — ReformatTemplateEditorControl.SaveCurrentLayoutElement has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MCPConnectionManager.ImportAndMergeConfig (cognitive 18) · ×1
  • MCPConnectionManager.ImportAndMergeConfig (cognitive 18) ShareRibbon/Mcp/MCPConnectionConfig.vb:293 — MCPConnectionManager.ImportAndMergeConfig has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · HttpStreamService.BuildToolsArray (cognitive 18) · ×1
  • HttpStreamService.BuildToolsArray (cognitive 18) ShareRibbon/Controls/Services/HttpStreamService.vb:1405 — HttpStreamService.BuildToolsArray has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · CodeExecutionService.FixMissingQuotes (cognitive 18) · ×1
  • CodeExecutionService.FixMissingQuotes (cognitive 18) ShareRibbon/Controls/Services/CodeExecutionService.vb:70 — CodeExecutionService.FixMissingQuotes has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AutocompleteService.AddCompletionsFromMessage (cognitive 18) · ×1
  • AutocompleteService.AddCompletionsFromMessage (cognitive 18) ShareRibbon/Controls/Services/AutocompleteService.vb:237 — AutocompleteService.AddCompletionsFromMessage has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AgentKernelService.StartAgentAsync (cognitive 18) · ×1
  • AgentKernelService.StartAgentAsync (cognitive 18) ShareRibbon/Controls/Services/AgentKernelService.vb:101 — AgentKernelService.StartAgentAsync has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelContextService.DetectDataStructure (cognitive 18) · ×1
  • ExcelContextService.DetectDataStructure (cognitive 18) ShareRibbon/Controls/Services/ExcelContextService.vb:208 — ExcelContextService.DetectDataStructure has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SkillsService.ApplyRegistryUsageStats (cognitive 18) · ×1
  • SkillsService.ApplyRegistryUsageStats (cognitive 18) ShareRibbon/Services/SkillsService.vb:104 — SkillsService.ApplyRegistryUsageStats has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · Instruction.ParseInstructions (cognitive 18) · ×1
  • Instruction.ParseInstructions (cognitive 18) ShareRibbon/Protocol/Instruction.vb:77 — Instruction.ParseInstructions has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.HandleApplyDocumentPlanItem (cognitive 18) · ×1
  • ChatControl.HandleApplyDocumentPlanItem (cognitive 18) WordAi/ChatControl.vb:2689 — ChatControl.HandleApplyDocumentPlanItem has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ContentLocator.FindHeading (cognitive 18) · ×1
  • ContentLocator.FindHeading (cognitive 18) WordAi/Services/ContentLocator.vb:81 — ContentLocator.FindHeading has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SmartFormatter.ResolveTargetRanges (cognitive 18) · ×1
  • SmartFormatter.ResolveTargetRanges (cognitive 18) WordAi/Services/SmartFormatter.vb:297 — SmartFormatter.ResolveTargetRanges has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · OpenXmlWordTranslator.ApplyReplaceMode (cognitive 18) · ×1
  • OpenXmlWordTranslator.ApplyReplaceMode (cognitive 18) WordAi/OpenXmlWordTranslator.vb:209 — OpenXmlWordTranslator.ApplyReplaceMode has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.GetSlideTitle (cognitive 18) · ×1
  • ChatControl.GetSlideTitle (cognitive 18) PowerPointAi/ChatControl.vb:796 — ChatControl.GetSlideTitle has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.BeautifySingleSlide (cognitive 18) · ×1
  • ChatControl.BeautifySingleSlide (cognitive 18) PowerPointAi/ChatControl.vb:2401 — ChatControl.BeautifySingleSlide has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointRunRestore.Replay (cognitive 18) · ×1
  • PowerPointRunRestore.Replay (cognitive 18) PowerPointAi/Undo/PowerPointRunRestore.vb:74 — PowerPointRunRestore.Replay has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DeckDesignSpec.Parse (cognitive 18) · ×1
  • DeckDesignSpec.Parse (cognitive 18) PowerPointAi/Design/SlideDesignModels.vb:11 — DeckDesignSpec.Parse has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ProfessionalDeckExecutor.ExecutePreview (cognitive 18) · ×1
  • ProfessionalDeckExecutor.ExecutePreview (cognitive 18) PowerPointAi/Design/ProfessionalDeckExecutor.Operations.vb:46 — ProfessionalDeckExecutor.ExecutePreview has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ExecuteSingleCommand (cognitive 18) · ×1
  • ChatControl.ExecuteSingleCommand (cognitive 18) ExcelAi/ChatControl.vb:806 — ChatControl.ExecuteSingleCommand has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · Ribbon1.BatchDataGenButton_Click (cognitive 18) · ×1
  • Ribbon1.BatchDataGenButton_Click (cognitive 18) ExcelAi/Ribbon1.vb:78 — Ribbon1.BatchDataGenButton_Click has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · chat-manager.setChatMessages (cognitive 18) · ×1
  • chat-manager.setChatMessages (cognitive 18) ShareRibbon/Resources/js/chat-manager.js:297 — chat-manager.setChatMessages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · code-handler.executeCodeAutoMode (cognitive 18) · ×1
  • code-handler.executeCodeAutoMode (cognitive 18) ShareRibbon/Resources/js/code-handler.js:1316 — code-handler.executeCodeAutoMode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, error handling 2 (4 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · code-handler.parseJsonToPlan (cognitive 18) · ×1
  • code-handler.parseJsonToPlan (cognitive 18) ShareRibbon/Resources/js/code-handler.js:1507 — code-handler.parseJsonToPlan 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 · OfficeAiDatabase.RunVersionedMigrations (cognitive 17) · ×1
  • OfficeAiDatabase.RunVersionedMigrations (cognitive 17) ShareRibbon/Storage/OfficeAiDatabase.vb:222 — OfficeAiDatabase.RunVersionedMigrations has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · OfficeAiDatabase.MigrateLegacySkillUsageJson (cognitive 17) · ×1
  • OfficeAiDatabase.MigrateLegacySkillUsageJson (cognitive 17) ShareRibbon/Storage/OfficeAiDatabase.vb:878 — OfficeAiDatabase.MigrateLegacySkillUsageJson has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AgentMemoryRepository.RetrieveMemoryItemsByVector (cognitive 17) · ×1
  • AgentMemoryRepository.RetrieveMemoryItemsByVector (cognitive 17) ShareRibbon/Storage/AgentMemoryRepository.vb:451 — AgentMemoryRepository.RetrieveMemoryItemsByVector has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MemoryRepository.RecordSkillUsage (cognitive 17) · ×1
  • MemoryRepository.RecordSkillUsage (cognitive 17) ShareRibbon/Storage/MemoryRepository.vb:760 — MemoryRepository.RecordSkillUsage has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ReformatTemplateManager.MigrateFromJson (cognitive 17) · ×1
  • ReformatTemplateManager.MigrateFromJson (cognitive 17) ShareRibbon/Config/ReformatTemplateManager.vb:60 — ReformatTemplateManager.MigrateFromJson has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SemanticPromptBuilder.GetExamplesByDocumentType (cognitive 17) · ×1
  • SemanticPromptBuilder.GetExamplesByDocumentType (cognitive 17) ShareRibbon/Services/Reformat/SemanticPromptBuilder.vb:212 — SemanticPromptBuilder.GetExamplesByDocumentType has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DocumentTranslateService.TranslateBatchAsync (cognitive 17) · ×1
  • DocumentTranslateService.TranslateBatchAsync (cognitive 17) ShareRibbon/Translate/DocumentTranslateService.vb:183 — DocumentTranslateService.TranslateBatchAsync has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · LoopEngine.BuildExecutionExplanation (cognitive 17) · ×1
  • LoopEngine.BuildExecutionExplanation (cognitive 17) ShareRibbon/Agent/LoopEngine.Planning.vb:13 — LoopEngine.BuildExecutionExplanation has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ToolRegistry.RegisterOrMergeTool (cognitive 17) · ×1
  • ToolRegistry.RegisterOrMergeTool (cognitive 17) ShareRibbon/Agent/ToolRegistry.vb:370 — ToolRegistry.RegisterOrMergeTool has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ReformatTemplateEditorControl.SaveCurrentBodyStyle (cognitive 17) · ×1
  • ReformatTemplateEditorControl.SaveCurrentBodyStyle (cognitive 17) ShareRibbon/Controls/ReformatTemplateEditorControl.vb:939 — ReformatTemplateEditorControl.SaveCurrentBodyStyle has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · HistorySessionService.HandleGetSessionList (cognitive 17) · ×1
  • HistorySessionService.HandleGetSessionList (cognitive 17) ShareRibbon/Controls/Services/HistorySessionService.vb:48 — HistorySessionService.HandleGetSessionList has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExecutionPlanRenderer.GetFormulaDescription (cognitive 17) · ×1
  • ExecutionPlanRenderer.GetFormulaDescription (cognitive 17) ShareRibbon/Controls/Services/ExecutionPlanRenderer.vb:321 — ExecutionPlanRenderer.GetFormulaDescription has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SkillsIndexService.SelectSkillDefinitions (cognitive 17) · ×1
  • SkillsIndexService.SelectSkillDefinitions (cognitive 17) ShareRibbon/Services/Memory/SkillsIndexService.vb:79 — SkillsIndexService.SelectSkillDefinitions has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.HandleChatDrivenReformat (cognitive 17) · ×1
  • ChatControl.HandleChatDrivenReformat (cognitive 17) WordAi/ChatControl.vb:1464 — ChatControl.HandleChatDrivenReformat has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SmartFormatter.ExecuteFormatAction (cognitive 17) · ×1
  • SmartFormatter.ExecuteFormatAction (cognitive 17) WordAi/Services/SmartFormatter.vb:54 — SmartFormatter.ExecuteFormatAction has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ExecuteAddSpeakerNotes (cognitive 17) · ×1
  • ChatControl.ExecuteAddSpeakerNotes (cognitive 17) PowerPointAi/ChatControl.vb:2749 — ChatControl.ExecuteAddSpeakerNotes has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointDocumentTranslateService.CollectTextItemsFromShape (cognitive 17) · ×1
  • PowerPointDocumentTranslateService.CollectTextItemsFromShape (cognitive 17) PowerPointAi/PowerPointDocumentTranslateService.vb:442 — PowerPointDocumentTranslateService.CollectTextItemsFromShape has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.GetSelectionContentExcel (cognitive 17) · ×1
  • ChatControl.GetSelectionContentExcel (cognitive 17) ExcelAi/ChatControl.vb:57 — ChatControl.GetSelectionContentExcel has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DoubaoChat.AppendCurrentSelectedContent (cognitive 17) · ×1
  • DoubaoChat.AppendCurrentSelectedContent (cognitive 17) ExcelAi/DoubaoChat.vb:46 — DoubaoChat.AppendCurrentSelectedContent has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · EnhancedPreviewAndConfirm.GenerateSummary (cognitive 17) · ×1
  • EnhancedPreviewAndConfirm.GenerateSummary (cognitive 17) ExcelAi/EnhancedPreviewAndConfirm.vb:312 — EnhancedPreviewAndConfirm.GenerateSummary has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelDirectOperationService.GroupByAnalysis (cognitive 17) · ×1
  • ExcelDirectOperationService.GroupByAnalysis (cognitive 17) ExcelAi/ExcelDirectOperationService.vb:1779 — ExcelDirectOperationService.GroupByAnalysis has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExcelDirectOperationService.ResolveExcelRange (cognitive 17) · ×1
  • ExcelDirectOperationService.ResolveExcelRange (cognitive 17) ExcelAi/ExcelDirectOperationService.vb:1904 — ExcelDirectOperationService.ResolveExcelRange has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · JsonPreviewDialog.PopulateSummary (cognitive 17) · ×1
  • JsonPreviewDialog.PopulateSummary (cognitive 17) ExcelAi/JsonPreviewDialog.vb:150 — JsonPreviewDialog.PopulateSummary has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · toggleCodeViewFromRenderer (cognitive 17) · ×1
  • toggleCodeViewFromRenderer (cognitive 17) ShareRibbon/Resources/js/code-handler.js:1713 — toggleCodeViewFromRenderer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (4 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · showRevisions (cognitive 17) · ×1
  • showRevisions (cognitive 17) ShareRibbon/Resources/js/revision-manager.js:383 — showRevisions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, error handling 3 (4 pts), boolean chains 3, ternaries 2 (nesting depth added 1). Of this number, 12 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AgentMemoryRepository.ReadMemoryItem (cognitive 16) · ×1
  • AgentMemoryRepository.ReadMemoryItem (cognitive 16) ShareRibbon/Storage/AgentMemoryRepository.vb:49 — AgentMemoryRepository.ReadMemoryItem has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MemoryRepository.InsertMemory (cognitive 16) · ×1
  • MemoryRepository.InsertMemory (cognitive 16) ShareRibbon/Storage/MemoryRepository.vb:505 — MemoryRepository.InsertMemory has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · FormattingStandardRegistry.SelectBest (cognitive 16) · ×1
  • FormattingStandardRegistry.SelectBest (cognitive 16) ShareRibbon/Services/Reformat/FormattingStandardRegistry.vb:65 — FormattingStandardRegistry.SelectBest has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · OfficeOperationValidation.ValidateBatch (cognitive 16) · ×1
  • OfficeOperationValidation.ValidateBatch (cognitive 16) ShareRibbon/Agent/OfficeOperations/OfficeOperationValidation.vb:44 — OfficeOperationValidation.ValidateBatch has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SafetyGate.EvaluateOfficeOperation (cognitive 16) · ×1
  • SafetyGate.EvaluateOfficeOperation (cognitive 16) ShareRibbon/Agent/Execution/SafetyGate.vb:91 — SafetyGate.EvaluateOfficeOperation has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · BaseChatControl.InitializeWebView2 (cognitive 16) · ×1
  • BaseChatControl.InitializeWebView2 (cognitive 16) ShareRibbon/Controls/BaseChatControl.vb:473 — BaseChatControl.InitializeWebView2 has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · BaseChatControl.HandleStartAgent (cognitive 16) · ×1
  • BaseChatControl.HandleStartAgent (cognitive 16) ShareRibbon/Controls/BaseChatControl.vb:1852 — BaseChatControl.HandleStartAgent has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ReformatTemplateEditorControl.SaveLayoutElementAt (cognitive 16) · ×1
  • ReformatTemplateEditorControl.SaveLayoutElementAt (cognitive 16) ShareRibbon/Controls/ReformatTemplateEditorControl.vb:826 — ReformatTemplateEditorControl.SaveLayoutElementAt has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · BaseChat.ExecuteVBACode (cognitive 16) · ×1
  • BaseChat.ExecuteVBACode (cognitive 16) ShareRibbon/Controls/BaseChat.vb:379 — BaseChat.ExecuteVBACode has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · CommandPreviewForm.GetCommandDescription (cognitive 16) · ×1
  • CommandPreviewForm.GetCommandDescription (cognitive 16) ShareRibbon/Controls/CommandPreviewForm.vb:152 — CommandPreviewForm.GetCommandDescription has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · StreamJsonRpcMCPClient.ListPromptsAsync (cognitive 16) · ×1
  • StreamJsonRpcMCPClient.ListPromptsAsync (cognitive 16) ShareRibbon/Mcp/StreamJsonRpcMCPClient.vb:709 — StreamJsonRpcMCPClient.ListPromptsAsync has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · HttpStreamService.HandleMcpToolCallAsync (cognitive 16) · ×1
  • HttpStreamService.HandleMcpToolCallAsync (cognitive 16) ShareRibbon/Controls/Services/HttpStreamService.vb:1108 — HttpStreamService.HandleMcpToolCallAsync has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · UnifiedMemoryService.CalculateImportance (cognitive 16) · ×1
  • UnifiedMemoryService.CalculateImportance (cognitive 16) ShareRibbon/Services/UnifiedMemoryService.vb:12 — UnifiedMemoryService.CalculateImportance has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ApplyDslParagraphStyle (cognitive 16) · ×1
  • ChatControl.ApplyDslParagraphStyle (cognitive 16) WordAi/ChatControl.vb:4532 — ChatControl.ApplyDslParagraphStyle has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ApplyDslCharacterFormat (cognitive 16) · ×1
  • ChatControl.ApplyDslCharacterFormat (cognitive 16) WordAi/ChatControl.vb:4592 — ChatControl.ApplyDslCharacterFormat has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · FormattingIntentCompiler.AddFontSizeOperations (cognitive 16) · ×1
  • FormattingIntentCompiler.AddFontSizeOperations (cognitive 16) WordAi/Services/FormattingIntentCompiler.vb:214 — FormattingIntentCompiler.AddFontSizeOperations has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.GetContextSnapshot (cognitive 16) · ×1
  • ChatControl.GetContextSnapshot (cognitive 16) PowerPointAi/ChatControl.vb:1148 — ChatControl.GetContextSnapshot has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ExecuteJsonCommandWithToolResult (cognitive 16) · ×1
  • ChatControl.ExecuteJsonCommandWithToolResult (cognitive 16) PowerPointAi/ChatControl.vb:1333 — ChatControl.ExecuteJsonCommandWithToolResult has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.ExecuteInsertTable (cognitive 16) · ×1
  • ChatControl.ExecuteInsertTable (cognitive 16) PowerPointAi/ChatControl.vb:1991 — ChatControl.ExecuteInsertTable has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointContinuationService.GetTextSelectionContext (cognitive 16) · ×1
  • PowerPointContinuationService.GetTextSelectionContext (cognitive 16) PowerPointAi/PowerPointContinuationService.vb:91 — PowerPointContinuationService.GetTextSelectionContext has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointContinuationService.GetShapeSelectionContext (cognitive 16) · ×1
  • PowerPointContinuationService.GetShapeSelectionContext (cognitive 16) PowerPointAi/PowerPointContinuationService.vb:164 — PowerPointContinuationService.GetShapeSelectionContext has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SlideComponentLibrary.BuildComparison (cognitive 16) · ×1
  • SlideComponentLibrary.BuildComparison (cognitive 16) PowerPointAi/Design/SlideComponentLibrary.Patterns.vb:106 — SlideComponentLibrary.BuildComparison has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerPointVisualVerifier.ScoreRenderedComposition (cognitive 16) · ×1
  • PowerPointVisualVerifier.ScoreRenderedComposition (cognitive 16) PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:165 — PowerPointVisualVerifier.ScoreRenderedComposition has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ProfessionalDeckExecutor.ValidateVariant (cognitive 16) · ×1
  • ProfessionalDeckExecutor.ValidateVariant (cognitive 16) PowerPointAi/Design/ProfessionalDeckExecutor.vb:342 — ProfessionalDeckExecutor.ValidateVariant has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ChatControl.AppendCurrentSelectedContent (cognitive 16) · ×1
  • ChatControl.AppendCurrentSelectedContent (cognitive 16) ExcelAi/ChatControl.vb:441 — ChatControl.AppendCurrentSelectedContent has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D4 · Code Duplication · Near-duplicate member family (4 members, 20 shared lines) · ×1
  • Near-duplicate member family (4 members, 20 shared lines) PowerPointAi/ChatControl.vb:1057 — PowerPointAi/ChatControl.vb:1057-1096 | PowerPointAi/ChatControl.vb:1103-1142 | WordAi/ChatControl.vb:3517-3556 | WordAi/ChatControl.vb:3563-3602 — These 4 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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 (100–111 lines × 2) · ×1
  • Duplicated block (100–111 lines × 2) ShareRibbon/Config/ReformatTemplateManager.vb:355 — ShareRibbon/Config/ReformatTemplateManager.vb:355-454 | ShareRibbon/Config/ReformatTemplateManager.vb:642-752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShareRibbon/Config/ReformatTemplateManager.vb:355` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (77 lines × 3) · ×1
  • Duplicated block (77 lines × 3) ExcelAi/ExcelJsonCommandSchema.vb:167 — ExcelAi/ExcelJsonCommandSchema.vb:167-243 | PowerPointAi/PowerPointJsonCommandSchema.vb:142-218 | WordAi/WordJsonCommandSchema.vb:138-214 — before extracting anything, compare `ExcelAi/ExcelJsonCommandSchema.vb` and `PowerPointAi/PowerPointJsonCommandSchema.vb` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 143 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 (77 lines × 2) · ×1
  • Duplicated block (77 lines × 2) ExcelAi/ChatControl.vb:155 — ExcelAi/ChatControl.vb:155-231 | ExcelAi/DeepseekControl.vb:149-225 — before extracting anything, compare `ExcelAi/ChatControl.vb` and `ExcelAi/DeepseekControl.vb` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 94 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 (67 lines × 2) · ×1
  • Duplicated block (67 lines × 2) ShareRibbon/Config/ReformatTemplateManager.vb:269 — ShareRibbon/Config/ReformatTemplateManager.vb:269-335 | ShareRibbon/Config/ReformatTemplateManager.vb:466-532 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShareRibbon/Config/ReformatTemplateManager.vb:269` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (61 lines × 5) · ×1
  • Duplicated block (61 lines × 5) ShareRibbon/Config/ReformatTemplateManager.vb:281 — ShareRibbon/Config/ReformatTemplateManager.vb:281-345 | ShareRibbon/Config/ReformatTemplateManager.vb:355-416 | ShareRibbon/Config/ReformatTemplateManager.vb:478-542 | ShareRibbon/Config/ReformatTemplateManager.vb:552-612 | ShareRibbon/Config/ReformatTemplateManager.vb:622-690 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShareRibbon/Config/ReformatTemplateManager.vb:281` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) ShareRibbon/Controls/BaseChatControl.vb:1489 — ShareRibbon/Controls/BaseChatControl.vb:1489-1538 | ShareRibbon/Controls/BaseChatControl.vb:1933-1982 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShareRibbon/Controls/BaseChatControl.vb:1489` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShareRibbon/Controls/BaseChatControl.vb:1488` calls `List` and `ShareRibbon/Controls/BaseChatControl.vb:1932` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15–47 lines × 2) · ×1
  • Duplicated block (15–47 lines × 2) ShareRibbon/Config/ReformatTemplateEditorForm.vb:453 — ShareRibbon/Config/ReformatTemplateEditorForm.vb:453-499 | ShareRibbon/Controls/ReformatTemplateEditorControl.vb:451-465 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×1
  • Duplicated block (42 lines × 2) ExcelAi/ExcelDirectOperationService.vb:444 — ExcelAi/ExcelDirectOperationService.vb:444-485 | ExcelAi/ExcelDirectOperationService.vb:493-534 — both copies are in the same file, so extract the 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 (42–43 lines × 2) · ×1
  • Duplicated block (42–43 lines × 2) ShareRibbon/Controls/BaseChat.vb:79 — ShareRibbon/Controls/BaseChat.vb:79-120 | ShareRibbon/Controls/BaseDoubaoChat.vb:40-82 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ShareRibbon/Controls/BaseChat.vb:79` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×1
  • Duplicated block (38 lines × 2) PowerPointAi/ChatControl.vb:2857 — PowerPointAi/ChatControl.vb:2857-2894 | WordAi/ChatControl.vb:2777-2814 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (29 lines × 4) · ×1
  • Duplicated block (29 lines × 4) ShareRibbon/Services/SkillScriptExecutor.vb:161 — ShareRibbon/Services/SkillScriptExecutor.vb:161-189 | ShareRibbon/Services/SkillScriptExecutor.vb:227-255 | ShareRibbon/Services/SkillScriptExecutor.vb:292-320 | ShareRibbon/Services/SkillScriptExecutor.vb:347-375 — 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 (27–30 lines × 2) · ×1
  • Duplicated block (27–30 lines × 2) ExcelAi/ExcelJsonCommandSchema.vb:347 — ExcelAi/ExcelJsonCommandSchema.vb:347-376 | PowerPointAi/PowerPointJsonCommandSchema.vb:263-289 — before extracting anything, compare `ExcelAi/ExcelJsonCommandSchema.vb` and `PowerPointAi/PowerPointJsonCommandSchema.vb` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 143 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 (26–28 lines × 3) · ×1
  • Duplicated block (26–28 lines × 3) ShareRibbon/Controls/BaseChat.vb:106 — ShareRibbon/Controls/BaseChat.vb:106-131 | ShareRibbon/Controls/BaseDeepseekChat.vb:62-89 | ShareRibbon/Controls/BaseDoubaoChat.vb:67-93 — before extracting anything, compare `ShareRibbon/Controls/BaseChat.vb` and `ShareRibbon/Controls/BaseDeepseekChat.vb` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 184 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShareRibbon/Controls/BaseChat.vb:103` calls `BringToFront` and `ShareRibbon/Controls/BaseDeepseekChat.vb:59` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) PowerPointAi/Ribbon1.vb:109 — PowerPointAi/Ribbon1.vb:109-133 | WordAi/Ribbon1.vb:126-150 — `PowerPointAi/Ribbon1.vb` and `WordAi/Ribbon1.vb` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 59 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×1
  • Duplicated block (25–26 lines × 2) ShareRibbon/Controls/BaseChatControl.vb:1557 — ShareRibbon/Controls/BaseChatControl.vb:1557-1582 | ShareRibbon/Controls/BaseChatControl.vb:2000-2024 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShareRibbon/Controls/BaseChatControl.vb:1557` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShareRibbon/Controls/BaseChatControl.vb:1556` calls `Add` and `ShareRibbon/Controls/BaseChatControl.vb:1999` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (25 lines × 4) · ×1
  • Duplicated block (25 lines × 4) ExcelAi/EnhancedPreviewAndConfirm.vb:357 — ExcelAi/EnhancedPreviewAndConfirm.vb:357-381 | ShareRibbon/Controls/BaseChat.vb:499-523 | ShareRibbon/Controls/BaseDeepseekChat.vb:735-759 | ShareRibbon/Controls/Services/CodeExecutionService.vb:399-423 — before extracting anything, compare `ShareRibbon/Controls/BaseChat.vb` and `ShareRibbon/Controls/BaseDeepseekChat.vb` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 184 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 (21–25 lines × 2) · ×1
  • Duplicated block (21–25 lines × 2) ShareRibbon/Config/ReformatTemplateEditorForm.vb:845 — ShareRibbon/Config/ReformatTemplateEditorForm.vb:845-869 | ShareRibbon/Controls/ReformatTemplateEditorControl.vb:1038-1058 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) ShareRibbon/Controls/ReformatTemplateEditorControl.vb:830 — ShareRibbon/Controls/ReformatTemplateEditorControl.vb:830-852 | ShareRibbon/Controls/ReformatTemplateEditorControl.vb:903-925 — both copies are in the same file, so extract the 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 (21–23 lines × 3) · ×1
  • Duplicated block (21–23 lines × 3) ExcelAi/ExcelJsonCommandSchema.vb:257 — ExcelAi/ExcelJsonCommandSchema.vb:257-279 | PowerPointAi/PowerPointJsonCommandSchema.vb:228-248 | WordAi/WordJsonCommandSchema.vb:224-244 — before extracting anything, compare `ExcelAi/ExcelJsonCommandSchema.vb` and `PowerPointAi/PowerPointJsonCommandSchema.vb` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 143 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 (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) ShareRibbon/Services/Reformat/ReformatCoordinator.vb:290 — ShareRibbon/Services/Reformat/ReformatCoordinator.vb:290-311 | ShareRibbon/Services/Reformat/SemanticRenderingEngine.vb:348-369 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) WordAi/ChatControl.vb:2375 — WordAi/ChatControl.vb:2375-2395 | WordAi/ChatControl.vb:2724-2743 — both copies are in the same file, so extract the 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 × 4) · ×1
  • Duplicated block (15 lines × 4) PowerPointAi/ChatControl.vb:1069 — PowerPointAi/ChatControl.vb:1069-1083 | PowerPointAi/ChatControl.vb:1115-1129 | WordAi/ChatControl.vb:3529-3543 | WordAi/ChatControl.vb:3575-3589 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) ShareRibbon/Config/ReformatTemplateEditorForm.vb:849 — ShareRibbon/Config/ReformatTemplateEditorForm.vb:849-864 | ShareRibbon/Controls/ReformatTemplateEditorControl.vb:1040-1055 | WordAi/Services/FormattingIntentCompiler.vb:353-368 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:99 — PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:99-114 | PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:142-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `PowerPointAi/Design/PowerPointVisualVerifier.Rendered.vb:99` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) ExcelAi/BatchDataGenerationForm.vb:228 — ExcelAi/BatchDataGenerationForm.vb:228-242 | ShareRibbon/Mcp/StdioConfigForm.vb:89-104 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (13–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) WordAi/ChatControl.vb:869 — WordAi/ChatControl.vb:869-884 | WordAi/ChatControl.vb:925-937 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12–15 lines × 2) · ×1
  • Duplicated block (12–15 lines × 2) ShareRibbon/Services/Reformat/SmartFormattingOrchestrator.vb:656 — ShareRibbon/Services/Reformat/SmartFormattingOrchestrator.vb:656-670 | ShareRibbon/Services/Reformat/SmartFormattingOrchestrator.vb:726-737 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) ExcelAi/Ribbon1.vb:230 — ExcelAi/Ribbon1.vb:230-243 | PowerPointAi/Ribbon1.vb:417-430 | WordAi/Ribbon1.vb:461-474 — `PowerPointAi/Ribbon1.vb` and `WordAi/Ribbon1.vb` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 59 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) WordAi/ChatControl.vb:2986 — WordAi/ChatControl.vb:2986-2999 | WordAi/ChatControl.vb:4880-4892 — both copies are in the same file, so extract the 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) PowerPointAi/PowerPointJsonCommandSchema.vb:342 — PowerPointAi/PowerPointJsonCommandSchema.vb:342-355 | WordAi/WordJsonCommandSchema.vb:323-336 — before extracting anything, compare `PowerPointAi/PowerPointJsonCommandSchema.vb` and `WordAi/WordJsonCommandSchema.vb` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) ExcelAi/ChatControl.vb:582 — ExcelAi/ChatControl.vb:582-593 | PowerPointAi/ChatControl.vb:1267-1278 | WordAi/ChatControl.vb:3696-3707 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) ShareRibbon/Config/ConfigApiForm.vb:1354 — ShareRibbon/Config/ConfigApiForm.vb:1354-1364 | ShareRibbon/Config/ConfigApiForm.vb:1652-1661 — both copies are in the same file, so extract the 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 (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) WordAi/ChatControl.vb:2599 — WordAi/ChatControl.vb:2599-2608 | WordAi/ChatControl.vb:2616-2624 — both copies are in the same file, so extract the 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 (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) PowerPointAi/ChatControl.vb:799 — PowerPointAi/ChatControl.vb:799-807 | PowerPointAi/ChatControl.vb:863-872 | PowerPointAi/ChatControl.vb:2100-2108 | PowerPointAi/ChatControl.vb:2418-2426 — 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 (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) WordAi/ChatControl.vb:4561 — WordAi/ChatControl.vb:4561-4568 | WordAi/ChatControl.vb:4621-4629 — both copies are in the same file, so extract the 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 × 4) · ×1
  • Duplicated block (5 lines × 4) PowerPointAi/ChatControl.vb:1057 — PowerPointAi/ChatControl.vb:1057-1061 | PowerPointAi/ChatControl.vb:1103-1107 | WordAi/ChatControl.vb:3517-3521 | WordAi/ChatControl.vb:3563-3567 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) ExcelAi/ExcelDocumentTranslateService.vb:344 — ExcelAi/ExcelDocumentTranslateService.vb:344-349 | ShareRibbon/Controls/Services/AutocompleteService.vb:157-162 | ShareRibbon/Translate/DocumentTranslateService.vb:425-430 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) ShareRibbon/Controls/BaseChat.vb:218 — ShareRibbon/Controls/BaseChat.vb:218-247 | ShareRibbon/Controls/BaseDeepseekChat.vb:166-195 — before extracting anything, compare `ShareRibbon/Controls/BaseChat.vb` and `ShareRibbon/Controls/BaseDeepseekChat.vb` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 184 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 (61 lines × 2) · ×1
  • Duplicated block (61 lines × 2) ShareRibbon/Controls/BaseChat.vb:252 — ShareRibbon/Controls/BaseChat.vb:252-312 | ShareRibbon/Controls/BaseDeepseekChat.vb:199-259 — before extracting anything, compare `ShareRibbon/Controls/BaseChat.vb` and `ShareRibbon/Controls/BaseDeepseekChat.vb` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 184 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 (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) WordAi/ChatControl.vb:427 — WordAi/ChatControl.vb:427-431 | WordAi/Services/FormattingIntentCompiler.vb:318-322 | WordAi/Services/ProofreadIntentCompiler.vb:131-135 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) ExcelAi/ChatControl.vb:110 — ExcelAi/ChatControl.vb:110-116 | ExcelAi/DeepseekControl.vb:105-111 | PowerPointAi/ChatControl.vb:370-376 | PowerPointAi/DeepseekControl.vb:111-117 | WordAi/DeepseekControl.vb:65-71 — before extracting anything, compare `ExcelAi/ChatControl.vb` and `ExcelAi/DeepseekControl.vb` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 94 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 (10 lines × 8) · ×1
  • Duplicated block (10 lines × 8) ExcelAi/ChatControl.vb:120 — ExcelAi/ChatControl.vb:120-129 | ExcelAi/DeepseekControl.vb:115-124 | ExcelAi/DoubaoChat.vb:114-123 | PowerPointAi/ChatControl.vb:380-389 | PowerPointAi/DeepseekControl.vb:121-130 | PowerPointAi/DoubaoChat.vb:131-140 | WordAi/DeepseekControl.vb:75-84 | WordAi/DoubaoChat.vb:93-102 — before extracting anything, compare `ExcelAi/ChatControl.vb` and `ExcelAi/DeepseekControl.vb` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) ExcelAi/ThisAddIn.vb:369 — ExcelAi/ThisAddIn.vb:369-375 | PowerPointAi/ThisAddIn.vb:192-198 | WordAi/ThisAddIn.vb:224-230 — `ExcelAi/ThisAddIn.vb` and `PowerPointAi/ThisAddIn.vb` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 39 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: ShareRibbon ShareRibbon/ShareRibbon.vbproj:1 — ShareRibbon: abstractness 0.05, instability 0.00, distance 0.95 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
P1 · CI/CD gates · No CI pipeline · ×1
  • No CI pipeline — No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 23 plain JS — the untyped files are ShareRibbon/Resources/js/agent-card.js, ShareRibbon/Resources/js/agent-protocol.js, ShareRibbon/Resources/js/autocomplete.js, ShareRibbon/Resources/js/chat-manager.js, ShareRibbon/Resources/js/code-handler.js, ShareRibbon/Resources/js/command-palette.js (+17 more).
R10 · Code Duplication · Duplicated block with local edits (54 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (54 matched lines × 2 locations) ShareRibbon/Resources/js/code-handler.js:459 — ShareRibbon/Resources/js/code-handler.js:459 · ShareRibbon/Resources/js/code-handler.js:1089 — the two spans are one implementation copied and then locally edited — 354 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (49 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (49 matched lines × 2 locations) scripts/check-agent-card-ui.js:13 — scripts/check-agent-card-ui.js:13 · scripts/check-history-grouping-ui.js:14 — the two spans are one implementation copied and then locally edited — 392 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (22 lines × 2 locations) · ×1
  • Duplicated block (22 lines × 2 locations) ShareRibbon/Resources/js/revision-manager.js:191 — ShareRibbon/Resources/js/revision-manager.js:191 · ShareRibbon/Resources/js/revision-manager.js: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.
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×1
  • Duplicated block (17 lines × 2 locations) ShareRibbon/Resources/js/markdown-renderer.js:248 — ShareRibbon/Resources/js/markdown-renderer.js:248 · ShareRibbon/Resources/js/markdown-renderer.js:270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (13 lines × 2 locations) · ×1
  • Duplicated block (13 lines × 2 locations) ShareRibbon/Resources/js/code-handler.js:920 — ShareRibbon/Resources/js/code-handler.js:920 · ShareRibbon/Resources/js/code-handler.js:964 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (12 lines × 3 locations) · ×1
  • Duplicated block (12 lines × 3 locations) ShareRibbon/Resources/js/reformat-template.js:231 — ShareRibbon/Resources/js/reformat-template.js:231 · ShareRibbon/Resources/js/reformat-template.js:298 · ShareRibbon/Resources/js/reformat-template.js:707 — 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.
R10 · Code Duplication · Duplicated block (12 lines × 2 locations) · ×1
  • Duplicated block (12 lines × 2 locations) ShareRibbon/Resources/js/reformat-template.js:1275 — ShareRibbon/Resources/js/reformat-template.js:1275 · ShareRibbon/Resources/js/reformat-template.js:1367 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (11 lines × 2 locations) · ×1
  • Duplicated block (11 lines × 2 locations) ShareRibbon/Resources/js/code-handler.js:94 — ShareRibbon/Resources/js/code-handler.js:94 · ShareRibbon/Resources/js/code-handler.js:1325 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (8 lines × 3 locations) · ×1
  • Duplicated block (8 lines × 3 locations) ShareRibbon/Resources/js/autocomplete.js:206 — ShareRibbon/Resources/js/autocomplete.js:206 · ShareRibbon/Resources/js/proofread-ui.js:185 · ShareRibbon/Resources/js/reformat-chat.js:502 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (5 lines × 4 locations) · ×1
  • Duplicated block (5 lines × 4 locations) ShareRibbon/Resources/js/agent-card.js:685 — ShareRibbon/Resources/js/agent-card.js:685 · ShareRibbon/Resources/js/agent-card.js:691 · ShareRibbon/Resources/js/agent-card.js:697 · ShareRibbon/Resources/js/message-sender.js:703 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (5 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (5 matched lines × 2 locations) ShareRibbon/Resources/js/core.js:157 — ShareRibbon/Resources/js/core.js:157 · ShareRibbon/Resources/js/core.js:174 — the two spans are one implementation copied and then locally edited — 52 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R2 · Cyclomatic Complexity · Complex function showContextHints (cyclomatic 69, cognitive 81) · ×1
  • Complex function showContextHints (cyclomatic 69, cognitive 81) ShareRibbon/Resources/js/message-sender.js:619 — showContextHints has cyclomatic complexity 69 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function showAgentExecutionExplanation (cyclomatic 61, cognitive 41) · ×1
  • Complex function showAgentExecutionExplanation (cyclomatic 61, cognitive 41) ShareRibbon/Resources/js/agent-card.js:673 — showAgentExecutionExplanation has cyclomatic complexity 61 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function showMappingPreview (cyclomatic 28, cognitive 42) · ×1
  • Complex function showMappingPreview (cyclomatic 28, cognitive 42) ShareRibbon/Resources/js/reformat-template.js:1324 — showMappingPreview has cyclomatic complexity 28 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function sendChatMessage (cyclomatic 28, cognitive 40) · ×1
  • Complex function sendChatMessage (cyclomatic 28, cognitive 40) ShareRibbon/Resources/js/message-sender.js:29 — sendChatMessage has cyclomatic complexity 28 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseJsonToPlan (cyclomatic 25, cognitive 18) · ×1
  • Complex function parseJsonToPlan (cyclomatic 25, cognitive 18) ShareRibbon/Resources/js/code-handler.js:1507 — parseJsonToPlan has cyclomatic complexity 25 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function showAgentPlanCard (cyclomatic 24, cognitive 31) · ×1
  • Complex function showAgentPlanCard (cyclomatic 24, cognitive 31) ShareRibbon/Resources/js/agent-card.js:81 — showAgentPlanCard has cyclomatic complexity 24 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function completeAgent (cyclomatic 23, cognitive 38) · ×1
  • Complex function completeAgent (cyclomatic 23, cognitive 38) ShareRibbon/Resources/js/agent-card.js:865 — completeAgent has cyclomatic complexity 23 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function showComparison (cyclomatic 23, cognitive 26) · ×1
  • Complex function showComparison (cyclomatic 23, cognitive 26) ShareRibbon/Resources/js/revision-manager.js:100 — showComparison has cyclomatic complexity 23 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function code (cyclomatic 22, cognitive 26) · ×1
  • Complex function code (cyclomatic 22, cognitive 26) ShareRibbon/Resources/js/core.js:23 — code has cyclomatic complexity 22 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function previewTemplate (cyclomatic 22, cognitive 17) · ×1
  • Complex function previewTemplate (cyclomatic 22, cognitive 17) ShareRibbon/Resources/js/reformat-template.js:828 — previewTemplate has cyclomatic complexity 22 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleSmartInputKeydown (cyclomatic 21, cognitive 29) · ×1
  • Complex function handleSmartInputKeydown (cyclomatic 21, cognitive 29) ShareRibbon/Resources/js/autocomplete.js:106 — handleSmartInputKeydown has cyclomatic complexity 21 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 20, cognitive 16) · ×1
  • Complex function (anonymous) (cyclomatic 20, cognitive 16) ShareRibbon/Resources/js/message-sender.js:701 — (anonymous) has cyclomatic complexity 20 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function executeCodeAutoMode (cyclomatic 19, cognitive 18) · ×1
  • Complex function executeCodeAutoMode (cyclomatic 19, cognitive 18) ShareRibbon/Resources/js/code-handler.js:1316 — executeCodeAutoMode has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _createTemplateCard (cyclomatic 18, cognitive 23) · ×1
  • Complex function _createTemplateCard (cyclomatic 18, cognitive 23) ShareRibbon/Resources/js/markdown-renderer.js:117 — _createTemplateCard has cyclomatic complexity 18 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function setStepEditResult (cyclomatic 18, cognitive 22) · ×1
  • Complex function setStepEditResult (cyclomatic 18, cognitive 22) ShareRibbon/Resources/js/agent-card.js:497 — setStepEditResult has cyclomatic complexity 18 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function executeCode (cyclomatic 18, cognitive 19) · ×1
  • Complex function executeCode (cyclomatic 18, cognitive 19) ShareRibbon/Resources/js/code-handler.js:90 — executeCode has cyclomatic complexity 18 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function setChatMessages (cyclomatic 16, cognitive 18) · ×1
  • Complex function setChatMessages (cyclomatic 16, cognitive 18) ShareRibbon/Resources/js/chat-manager.js:297 — setChatMessages has cyclomatic complexity 16 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 15, cognitive 20) · ×1
  • Complex function (anonymous) (cyclomatic 15, cognitive 20) ShareRibbon/Resources/js/reformat-template.js:1275 — (anonymous) has cyclomatic complexity 15 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function renderAgentChangeSummary (cyclomatic 15, cognitive 13) · ×1
  • Complex function renderAgentChangeSummary (cyclomatic 15, cognitive 13) ShareRibbon/Resources/js/agent-card.js:942 — renderAgentChangeSummary has cyclomatic complexity 15 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function updateContinuationModeUI (cyclomatic 14, cognitive 26) · ×1
  • Complex function updateContinuationModeUI (cyclomatic 14, cognitive 26) ShareRibbon/Resources/js/code-handler.js:668 — updateContinuationModeUI has cyclomatic complexity 14 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · ShareRibbon/Resources/js/code-handler.js · ×1
  • ShareRibbon/Resources/js/code-handler.js: 1857 lines of code ShareRibbon/Resources/js/code-handler.js:1 — ShareRibbon/Resources/js/code-handler.js has 1857 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ShareRibbon/Resources/js/reformat-template.js · ×1
  • ShareRibbon/Resources/js/reformat-template.js: 1255 lines of code ShareRibbon/Resources/js/reformat-template.js:1 — ShareRibbon/Resources/js/reformat-template.js has 1255 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ShareRibbon/Resources/js/agent-card.js · ×1
  • ShareRibbon/Resources/js/agent-card.js: 1002 lines of code ShareRibbon/Resources/js/agent-card.js:1 — ShareRibbon/Resources/js/agent-card.js has 1002 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ShareRibbon/Resources/js/message-sender.js · ×1
  • ShareRibbon/Resources/js/message-sender.js: 703 lines of code ShareRibbon/Resources/js/message-sender.js:1 — ShareRibbon/Resources/js/message-sender.js has 703 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ShareRibbon/Resources/js/proofread-ui.js · ×1
  • ShareRibbon/Resources/js/proofread-ui.js: 634 lines of code ShareRibbon/Resources/js/proofread-ui.js:1 — ShareRibbon/Resources/js/proofread-ui.js has 634 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ShareRibbon/Resources/js/reformat-chat.js · ×1
  • ShareRibbon/Resources/js/reformat-chat.js: 536 lines of code ShareRibbon/Resources/js/reformat-chat.js:1 — ShareRibbon/Resources/js/reformat-chat.js has 536 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ShareRibbon/Resources/js/revision-manager.js · ×1
  • ShareRibbon/Resources/js/revision-manager.js: 435 lines of code ShareRibbon/Resources/js/revision-manager.js:1 — ShareRibbon/Resources/js/revision-manager.js has 435 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ShareRibbon/Resources/js/autocomplete.js · ×1
  • ShareRibbon/Resources/js/autocomplete.js: 413 lines of code ShareRibbon/Resources/js/autocomplete.js:1 — ShareRibbon/Resources/js/autocomplete.js has 413 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ShareRibbon/Resources/js/chat-manager.js · ×1
  • ShareRibbon/Resources/js/chat-manager.js: 402 lines of code ShareRibbon/Resources/js/chat-manager.js:1 — ShareRibbon/Resources/js/chat-manager.js has 402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R4 · Test Coverage · Test Coverage · ×1
  • Test Coverage — 0% of 23 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
R7 · Dead Code · Dead file (~2108 LoC) · ×1
  • Dead file (~2108 LoC) ShareRibbon/Resources/js/code-handler.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~1448 LoC) · ×1
  • Dead file (~1448 LoC) ShareRibbon/Resources/js/reformat-template.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~802 LoC) · ×1
  • Dead file (~802 LoC) ShareRibbon/Resources/js/message-sender.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~676 LoC) · ×1
  • Dead file (~676 LoC) ShareRibbon/Resources/js/proofread-ui.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~564 LoC) · ×1
  • Dead file (~564 LoC) ShareRibbon/Resources/js/reformat-chat.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~509 LoC) · ×1
  • Dead file (~509 LoC) ShareRibbon/Resources/js/revision-manager.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~498 LoC) · ×1
  • Dead file (~498 LoC) ShareRibbon/Resources/js/autocomplete.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~467 LoC) · ×1
  • Dead file (~467 LoC) ShareRibbon/Resources/js/chat-manager.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~419 LoC) · ×1
  • Dead file (~419 LoC) scripts/check-entry-reachability.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~331 LoC) · ×1
  • Dead file (~331 LoC) ShareRibbon/Resources/js/markdown-renderer.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~265 LoC) · ×1
  • Dead file (~265 LoC) ShareRibbon/Resources/js/onboarding.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~219 LoC) · ×1
  • Dead file (~219 LoC) ShareRibbon/Resources/js/command-palette.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~201 LoC) · ×1
  • Dead file (~201 LoC) ShareRibbon/Resources/js/core.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~165 LoC) · ×1
  • Dead file (~165 LoC) ShareRibbon/Resources/js/mcp-manager.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~158 LoC) · ×1
  • Dead file (~158 LoC) ShareRibbon/Resources/js/utils.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~93 LoC) · ×1
  • Dead file (~93 LoC) ShareRibbon/Resources/js/settings-manager.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~62 LoC) · ×1
  • Dead file (~62 LoC) ShareRibbon/Resources/js/model-switcher.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~49 LoC) · ×1
  • Dead file (~49 LoC) ShareRibbon/Resources/js/office-ai-bridge.js — no import path from any entry point (5 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity ShareRibbon/Resources/chat-template-refactored.html:8 — `http://officeai.local/js/marked.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 23 such include(s) across the repository's markup.
SC1 · Supply-chain hygiene · NuGet dependencies are not locked · ×1
  • NuGet dependencies are not locked — No packages.lock.json and no central package management — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
Minor — 39 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×20
  • Orphaned file PowerPointAi/Runtime/PowerPointOperationObserver.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ShareRibbon/Agent/AiNativeRuntime.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ExcelAi/Context/ExcelContextProvider.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file PowerPointAi/Runtime/PowerPointObjectResolver.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ShareRibbon/Controls/Services/ChatRoutingOrchestrator.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file PowerPointAi/Design/DesignSystemCatalog.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file WordAi/Services/WordNumberingAgent.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ShareRibbon/Agent/PromptProfileService.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file PowerPointAi/Design/ScenePlanPreviewRenderer.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file WordAi/Services/WordCapabilityRegistry.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ShareRibbon/Agent/Harness/RunTraceStore.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ShareRibbon/Agent/OfficeOperations/OfficeOperationValidation.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ShareRibbon/Agent/Context/ContextPack.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file WordAi/Services/ProofreadIntentCompiler.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ShareRibbon/Log/AppLogger.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ShareRibbon/Agent/Harness/HostCapabilityRunRecorder.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ShareRibbon/Agent/OfficeOperations/OfficeObjectRef.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ExcelAi/BatchDataService.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ShareRibbon/Common/SyncOverAsync.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ShareRibbon/Agent/Harness/HarnessModels.vb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
X10 · Duplicated predicate · Duplicated predicate · ×5
  • Duplicated predicate ShareRibbon/Resources/js/code-handler.js:1445 — `(trimmed.startsWith('{') && trimmed.endsWith('}')) || (trimmed.startsWith('[') && trimmed.endsWith(']'))` appears character-identically in 2 files — ShareRibbon/Resources/js/code-handler.js, ShareRibbon/Resources/js/core.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ShareRibbon/Resources/js/autocomplete.js:138 — `key === 'ArrowDown' || key === 'ArrowUp'` appears character-identically in 2 files — ShareRibbon/Resources/js/autocomplete.js, ShareRibbon/Resources/js/command-palette.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ShareRibbon/Resources/js/code-handler.js:2077 — `window.officeAi && typeof window.officeAi.post === 'function'` appears character-identically in 5 files — ShareRibbon/Resources/js/code-handler.js, ShareRibbon/Resources/js/history-manager.js, ShareRibbon/Resources/js/message-sender.js, ShareRibbon/Resources/js/reformat-chat.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ShareRibbon/Resources/js/code-handler.js:1243 — `window.templateModeActive && window.currentTemplateContext` appears character-identically in 2 files — ShareRibbon/Resources/js/code-handler.js, ShareRibbon/Resources/js/message-sender.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ShareRibbon/Resources/js/autocomplete.js:208 — `window.vsto && typeof window.vsto.postMessage === 'function'` appears character-identically in 4 files — ShareRibbon/Resources/js/autocomplete.js, ShareRibbon/Resources/js/core.js, ShareRibbon/Resources/js/proofread-ui.js, ShareRibbon/Resources/js/reformat-chat.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×3
  • Hand-rolled JSON/XML parsing via regex scripts/check-history-grouping-ui.js:197 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex scripts/check-history-grouping-ui.js:202 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex scripts/check-history-grouping-ui.js:216 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 23 significant file(s) lose their only recent owner: ShareRibbon/Mcp/MCPConfigForm.vb, ShareRibbon/Storage/OfficeAiDatabase.vb, ShareRibbon/Storage/AgentMemoryRepository.vb, ShareRibbon/Services/Reformat/DocumentAnalyzer.vb, ShareRibbon/Config/ReformatTemplateManager.vb, ShareRibbon/Config/PromptManager.vb, PowerPointAi/Runtime/PowerPointOperationExecutor.vb, ShareRibbon/Translate/TranslateActionForm.vb (+15 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (25 single-owned of 247 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 247 of the 287 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: WordAi/Services/FormattingIntentCompiler.vb, WordAi/Services/WordActionHarness.vb.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 4 project(s) overshoot their size bounds, lowering Project Cohesion to 5.0/10. The most over is `ShareRibbon` (55311 LoC, 409 public types across 11 namespaces). Review these for cohesion — draw the boundary inside the assembly first (group each responsibility into its own namespace/folder and keep the cross-boundary members internal), since splitting a published assembly moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 20 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: PowerPointAi/Runtime/PowerPointOperationObserver.vb, ShareRibbon/Agent/AiNativeRuntime.vb, ExcelAi/Context/ExcelContextProvider.vb, PowerPointAi/Runtime/PowerPointObjectResolver.vb, ShareRibbon/Controls/Services/ChatRoutingOrchestrator.vb, PowerPointAi/Design/DesignSystemCatalog.vb, WordAi/Services/WordNumberingAgent.vb, ShareRibbon/Agent/PromptProfileService.vb (and 12 more) (30 orphaned of 247 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 247 of the 287 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.
D9 · Test Distribution · No tests found · ×1
  • No tests found — No test suite could be collected — no discoverable tests to count. If this repository does test, wiring the suite to a framework a runner can collect (xUnit, NUnit or MSTest) is what makes it countable here; a pipeline step that invokes a runner is not evidence on its own, because a runner over an empty suite passes. Tests written as plain executables or shell/PowerShell harnesses are not collectible this way and are not scored here.
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.
M3 · Folder & project structure · No src/ separation · ×1
  • No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
M3 · Folder & project structure · Inconsistent root namespaces · ×1
  • Inconsistent root namespaces — Only 1/4 projects share a common root namespace — the code's module identity is inconsistent.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add a Roslyn security analyzer package referenced from the project (the analyzer packages do analyse VB.NET), plus gitleaks for committed secrets — CodeQL has no VB.NET extractor, so its csharp pack would extract nothing from this tree and then report it clean — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

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-d86c059cc416476aa3dd7ee46ca25290/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-d86c059cc416476aa3dd7ee46ca25290/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 --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .0artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnuget—nuget: not applicable — nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan0—
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .2artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy: 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—
D36 · Supply-chain Provenance & Signingprovenance—provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a17927-2964-7eda-b777-75c3ae20ac88 · 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