Public report of JetBrains/koog, published 13 November 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.11.4). Assert 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, 13 November 2026, 20:34 UTC · Survey ID cd_4c048baf70234faca813d369033ebc51

JetBrains/koog

Measured 13 November 2026, 20:33 UTC, at code version 709079e

Test reliability is not measured: The suite could not be re-run, but the repository declares tests of its own unreliable.

CAI score 68out of 100 At risk Up 9 since the last survey

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

A large codebase: 131,240 lines of product code in 96 projects, tests not counted · Estimated rebuild effort: about 2.6 person-years · Weakest lens: Production Readiness, 63

Findings by how serious they are

178 critical 462 serious 675 minor

16 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look 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

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 20:33 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 the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. We work 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 ▸

60of 60 dimensions measured by tools.
882of 1315 findings point to an exact file and line, so you can open each one in the code. The other 433 concern the repository as a whole, such as missing documentation.
60dimensions across 6 lenses, read from 131,240 lines of product code in 96 projects.
Chapters

Executive summary

JetBrains/koog is rated At risk because critical security findings are open, most of them in the build pipeline. It scores 68 out of 100, which the At risk rating leaves unchanged.

Production Readiness, at 63, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the package under a licence on your banned list, worth about 3 points. Adding automated security scanning would lift Production Readiness itself, worth about 4 points. Raising Production Readiness to 70 would lift the score to about 71.

Ninety-two pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Forty-six known security holes in the packages the code depends on can be used by attackers, and five secrets can leak from the build pipeline. Pinning each tool to an exact version, updating the vulnerable packages and limiting each secret to its own step would close these risks. Fixing the weaknesses the scanner points to would fix the three security weaknesses in the code, and setting a waiting period for automatic updates would deal with the automatic dependency update that takes a new release at once. The 14 tests the project itself marks as unreliable need fixing or deleting.

The product code is 131,240 lines, about €370,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 63 · counts for 46%Security and Compliance 67 · counts for 25%Maturity 77 · counts for 14%Code Health 78 · counts for 8%Performance 85 · counts for 4%Architecture 88 · counts for 2%

If Production Readiness rose from 63 to 70, the lowest score rated Strong, the score would rise from 68 to about 71.

Code composition: what the lines of code are
Product code 53%Tests 47%
New since the last survey: 295 findings

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

  • Code Duplication · Near-duplicate member pair (90 shared lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Near-duplicate member pair (42 shared lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt
  • Code Duplication · Edited copy of a member (73 corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/inferenceSpan.kt
  • Code Duplication · Edited copy of a member (59 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAILLMClient.kt
  • Code Duplication · Edited copy of a member (63 corresponding lines) http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt
  • Code Duplication · Edited copy of a member (57 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/ContextualPromptExecutor.kt
  • Code Duplication · Edited copies of one member (4 members, 56+ corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt
  • Code Duplication · Edited copy of a member (38 corresponding lines) http-client/http-client-spring-webclient/src/main/kotlin/ai/koog/http/client/spring/SpringWebClientKoogHttpClient.kt
  • Code Duplication · Edited copy of a member (35 corresponding lines) agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt
  • Code Duplication · Edited copy of a member (19 corresponding lines) agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/augmentation/SystemPromptAugmenter.kt
  • Code Duplication · Edited copies of one member (5 members, 24+ corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeLLMClient.kt
  • Code Duplication · Edited copy of a member (24 corresponding lines) agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/ExposedPersistencyStorageProvider.kt
  • Code Duplication · Edited copy of a member (24 corresponding lines) rag/rag-base/src/jvmMain/kotlin/ai/koog/rag/base/files/JVMFileSystemProvider.kt
  • Code Duplication · Edited copy of a member (22 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt
  • Code Duplication · Edited copy of a member (22 corresponding lines) agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/JdbcChatHistoryProvider.kt
  • Code Duplication · Edited copy of a member (17 corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/histogramMetricEvents.kt
  • Code Duplication · Edited copy of a member (29 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAILLMClient.kt
  • Code Duplication · Edited copy of a member (22 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/modelfamilies/amazon/BedrockAmazonNovaSerialization.kt
  • Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/nodeExecuteSpan.kt
  • Code Duplication · Edited copy of a member (23 corresponding lines) koog-ktor/src/commonMain/kotlin/ai/koog/ktor/utils/LLMModelParser.kt
  • Code Duplication · Edited copy of a member (18 corresponding lines) http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt
  • Code Duplication · Edited copy of a member (9 corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/MetricFactory.kt
  • Code Duplication · Edited copy of a member (20 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-ollama-client/src/commonMain/kotlin/ai/koog/prompt/executor/ollama/client/OllamaClient.kt
  • Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt
  • Code Duplication · Edited copy of a member (14 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/BedrockLLMClient.kt
  • Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/counterMetricEvents.kt
  • Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/JdbcChatHistoryProvider.kt
  • Code Duplication · Edited copy of a member (12 corresponding lines) http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt
  • Code Duplication · Edited copy of a member (8 corresponding lines) agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/entity/AIAgentNode.kt
  • Code Duplication · Edited copy of a member (23 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt
  • Code Duplication · Edited copy of a member (11 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/dsl/extension/AIAgentNodes.kt
  • Code Duplication · Edited copies of one member (4 members, 20+ corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt
  • Code Duplication · Edited copy of a member (20 corresponding lines) koog-ktor/src/commonMain/kotlin/ai/koog/ktor/utils/LLMModelParser.kt
  • Code Duplication · Edited copy of a member (18 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt
  • Code Duplication · Edited copy of a member (19 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/ext/agent/AIAgentSubgraphExt.kt
  • Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/model/Serialization.kt
  • Code Duplication · Edited copy of a member (16 corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt
  • Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/dsl/AgentcoreLongTermMemoryDsl.kt
  • Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/executeToolSpan.kt
  • Code Duplication · Edited copy of a member (16 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt
  • Code Duplication · Edited copies of one member (6 members, 16+ corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt
  • Code Duplication · Edited copy of a member (16 corresponding lines) koog-ktor/src/commonMain/kotlin/ai/koog/ktor/KoogAgentsConfig.kt
  • Code Duplication · Edited copies of one member (5 members, 17+ corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt
  • Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt
  • Code Duplication · Edited copies of one member (6 members, 8+ corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt
  • Code Duplication · Edited copies of one member (5 members, 10+ corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt
  • Code Duplication · Edited copy of a member (12 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt
  • Code Duplication · Edited copy of a member (13 corresponding lines) agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/entity/AgentEdgeBuilder.kt
  • Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt
  • Code Duplication · Edited copy of a member (13 corresponding lines) agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/ExposedPersistencyStorageProvider.kt
  • Code Duplication · Edited copy of a member (11 corresponding lines) agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/entity/AgentEdgeBuilder.kt
  • Code Duplication · Edited copy of a member (14 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/dsl/builder/AIAgentParallelNodesMergeContext.kt
  • Code Duplication · Edited copy of a member (13 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseParams.kt
  • Code Duplication · Edited copy of a member (12 corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgentBuilder.kt
  • Code Duplication · Edited copy of a member (12 corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgentBuilder.kt
  • Code Duplication · Edited copy of a member (11 corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/createAgentSpan.kt
  • Code Duplication · Edited copy of a member (40 corresponding lines) agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/H2PersistencyStorageProvider.kt
  • Code Duplication · Edited copy of a member (10 corresponding lines) prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/MultiLLMPromptExecutor.kt
  • Code Duplication · Edited copy of a member (11 corresponding lines) prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/PromptBuilder.kt
  • Code Duplication · Edited copy of a member (19 corresponding lines) agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/MySQLJdbcChatHistorySchemaMigrator.kt
  • Code Duplication · Edited copy of a member (7 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentFactory.kt
  • Code Duplication · Edited copy of a member (7 corresponding lines) agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/providers/file/FilePersistenceStorageProvider.kt
  • Code Duplication · Edited copy of a member (4 corresponding lines) koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt
  • Code Duplication · Edited copy of a member (9 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentFactory.kt
  • Code Duplication · Edited copy of a member (6 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt
  • Code Duplication · Edited copy of a member (6 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt
  • Code Duplication · Edited copy of a member (7 corresponding lines) agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/providers/file/FilePersistenceStorageProvider.kt
  • Code Duplication · Edited copy of a member (4 corresponding lines) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt
  • Code Duplication · Edited copy of a member (6 corresponding lines) prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/ContentPartsBuilderBase.kt
  • Code Duplication · Edited copy of a member (8 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/context/AIAgentFunctionalContextBaseCommon.kt
  • Code Duplication · Edited copy of a member (4 corresponding lines) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt
  • Code Duplication · Duplicated block (94 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (62 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (56 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt
  • Code Duplication · Duplicated block (45 lines × 2) agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence/jdbc/H2JdbcPersistenceSchemaMigrator.kt
  • Code Duplication · Duplicated block (45 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt
  • Code Duplication · Duplicated block (37 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (37 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt
  • Code Duplication · Duplicated block (35 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (33 lines × 2) agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/H2JdbcChatHistorySchemaMigrator.kt
  • Code Duplication · Duplicated block (33 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (32 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt
  • Code Duplication · Duplicated block (32 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt
  • Code Duplication · Duplicated block (29–30 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt
  • Code Duplication · Duplicated block (29 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt
  • Code Duplication · Duplicated block (26 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/FunctionalAIAgent.kt
  • Code Duplication · Duplicated block (24 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatHistoryProvider.kt
  • Code Duplication · Duplicated block (23 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt
  • Code Duplication · Duplicated block (21 lines × 3) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt
  • Code Duplication · Duplicated block (19–21 lines × 2) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/inferenceSpan.kt
  • Code Duplication · Duplicated block (21 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt
  • Code Duplication · Duplicated block (15–20 lines × 2) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/inferenceSpan.kt
  • Code Duplication · Duplicated block (20 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (20 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt
  • Code Duplication · Duplicated block (17–20 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt
  • Code Duplication · Duplicated block (18–19 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (19 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatModelProviderDetector.kt
  • Code Duplication · Duplicated block (18 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt

We compare 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: 147 findings

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

  • Code Duplication · Near-duplicate member pair (129 shared lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Near-duplicate member pair (90 shared lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Near-duplicate member pair (42 shared lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt
  • Code Duplication · Duplicated block (94 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (62 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (56 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt
  • Code Duplication · Duplicated block (45 lines × 2) agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence/jdbc/H2JdbcPersistenceSchemaMigrator.kt
  • Code Duplication · Duplicated block (45 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt
  • Code Duplication · Duplicated block (37 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (37 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt
  • Code Duplication · Duplicated block (35 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (33 lines × 2) agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/H2JdbcChatHistorySchemaMigrator.kt
  • Code Duplication · Duplicated block (33 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (32 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt
  • Code Duplication · Duplicated block (32 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt
  • Code Duplication · Duplicated block (29–30 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt
  • Code Duplication · Duplicated block (29 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt
  • Code Duplication · Duplicated block (26 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/FunctionalAIAgent.kt
  • Code Duplication · Duplicated block (24 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatHistoryProvider.kt
  • Code Duplication · Duplicated block (23 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt
  • Code Duplication · Duplicated block (23 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt
  • Code Duplication · Duplicated block (23 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterParams.kt
  • Code Duplication · Duplicated block (22 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt
  • Code Duplication · Duplicated block (19–21 lines × 2) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/inferenceSpan.kt
  • Code Duplication · Duplicated block (21 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt
  • Code Duplication · Duplicated block (15–20 lines × 2) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/inferenceSpan.kt
  • Code Duplication · Duplicated block (20 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (20 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt
  • Code Duplication · Duplicated block (17–20 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt
  • Code Duplication · Duplicated block (18–19 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (19 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatModelProviderDetector.kt
  • Code Duplication · Duplicated block (18 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (18 lines × 2) agents/agents-tools/src/jvmCommonMain/kotlin/ai/koog/agents/core/tools/schema/SchemaGenerator.jvmCommon.kt
  • Code Duplication · Duplicated block (18 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt
  • Code Duplication · Duplicated block (17 lines × 2) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt
  • Code Duplication · Duplicated block (14–17 lines × 2) agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt
  • Code Duplication · Duplicated block (17 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt
  • Code Duplication · Duplicated block (12–17 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt
  • Code Duplication · Duplicated block (17 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAIParams.kt
  • Code Duplication · Duplicated block (12–16 lines × 2) agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt
  • Code Duplication · Duplicated block (16 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt
  • Code Duplication · Duplicated block (13–16 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt
  • Code Duplication · Duplicated block (14–16 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt
  • Code Duplication · Duplicated block (15 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt
  • Code Duplication · Duplicated block (15 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt
  • Code Duplication · Duplicated block (14–15 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt
  • Code Duplication · Duplicated block (15 lines × 2) serialization/serialization-core/src/jvmCommonMain/kotlin/ai/koog/serialization/kotlinx/KotlinxSerializer.jvmCommon.kt
  • Code Duplication · Duplicated block (9–14 lines × 4) agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt
  • Code Duplication · Duplicated block (14 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/FunctionalAIAgent.kt
  • Code Duplication · Duplicated block (14 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (14 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (14 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (14 lines × 2) agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt
  • Code Duplication · Duplicated block (14 lines × 2) agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt
  • Code Duplication · Duplicated block (14 lines × 2) http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt
  • Code Duplication · Duplicated block (14 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt
  • Code Duplication · Duplicated block (13 lines × 2) a2a/a2a-server/src/commonMain/kotlin/ai/koog/a2a/server/A2AServer.kt
  • Code Duplication · Duplicated block (13 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (13 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (13 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (13 lines × 2) agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/JdbcChatHistoryProvider.kt
  • Code Duplication · Duplicated block (13 lines × 2) http-client/http-client-okhttp/src/main/kotlin/ai/koog/http/client/okhttp/OkHttpKoogHttpClient.kt
  • Code Duplication · Duplicated block (13 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt
  • Code Duplication · Duplicated block (13 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicBasicJsonSchemaGenerator.kt
  • Code Duplication · Duplicated block (12 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (12 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (12 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (12 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt
  • Code Duplication · Duplicated block (11 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (11 lines × 2) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/histogramMetricEvents.kt
  • Code Duplication · Duplicated block (11 lines × 2) http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt
  • Code Duplication · Duplicated block (11 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekLLMClient.kt
  • Code Duplication · Duplicated block (10–11 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt
  • Code Duplication · Duplicated block (9–10 lines × 3) prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeLLMClient.kt
  • Code Duplication · Duplicated block (10 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (10 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (10 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (10 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatHistoryProvider.kt
  • Code Duplication · Duplicated block (10 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt
  • Code Duplication · Duplicated block (9 lines × 3) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (9 lines × 3) agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt
  • Code Duplication · Duplicated block (9 lines × 3) prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt
  • Code Duplication · Duplicated block (9 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (9 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (9 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (6–9 lines × 2) agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/ExposedPersistencyStorageProvider.kt
  • Code Duplication · Duplicated block (9 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt
  • Code Duplication · Duplicated block (9 lines × 2) rag/rag-base/src/jvmMain/kotlin/ai/koog/rag/base/files/JVMFileSystemProvider.kt
  • Code Duplication · Duplicated block (7–8 lines × 10) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt
  • Code Duplication · Duplicated block (8 lines × 6) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt
  • Code Duplication · Duplicated block (8 lines × 3) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (7 lines × 3) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt
  • Code Duplication · Duplicated block (7 lines × 2) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/integration/weave/WeaveSpanAdapter.kt
  • Code Duplication · Duplicated block (7 lines × 2) agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt
  • Code Duplication · Duplicated block (24 lines × 2) agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/AIAgentBuilder.kt
  • Code Duplication · Duplicated block (23 lines × 2) agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/AIAgentService.kt
  • Code Duplication · Duplicated block (35 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/conditions/OnPropertyNotEmptyCondition.kt
  • Code Duplication · Duplicated block (58 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatMemoryAutoConfiguration.kt
  • Code Duplication · Duplicated block (56 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiEmbeddingAutoConfiguration.kt
Rebuild cost: about €370,000 · Estimate
Cost to rebuild€120,000 to €620,000, for 2,065 to 6,552 hours of work, about 2.6 person-years for 1 to 5 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×1.0 at a score of 68. 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.
SizeLarge: 131,240 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: We price 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 Banned license finding(s) in License Compliance.
Raises the score by about 3 points · Low effort · License Compliance
2
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Raises the score by about 4 points · Medium effort · Security & performance tooling
3
Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).
Raises the score by about 4 points · Medium effort · Outbound HTTP resilience

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 €370,000 to build again, about 2.6 person-years of work. Its weakest lens is Production Readiness, at 63 (Adequate). 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 Banned license finding(s) in License Compliance. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 1 License Compliance findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

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 koog:agents:agents-core koog:agents:agents-core koog:agents:agents-test koog:agents:agents-test koog:agents:agents-core->koog:agents:agents-test koog:agents:agents-tools koog:agents:agents-tools koog:agents:agents-core->koog:agents:agents-tools koog:integration-tests koog:integration-tests koog:agents:agents-core->koog:integration-tests koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-openai-client koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-openai-client koog:agents:agents-core->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-openai-client koog:prompt:prompt-executor:prompt-executor-llms-all koog:prompt:prompt-executor:prompt-executor-llms-all koog:agents:agents-core->koog:prompt:prompt-executor:prompt-executor-llms-all koog:prompt:prompt-executor:prompt-executor-model koog:prompt:prompt-executor:prompt-executor-model koog:agents:agents-core->koog:prompt:prompt-executor:prompt-executor-model koog:prompt:prompt-llm koog:prompt:prompt-llm koog:agents:agents-core->koog:prompt:prompt-llm koog:test-utils koog:test-utils koog:agents:agents-core->koog:test-utils koog:utils koog:utils koog:agents:agents-core->koog:utils koog:agents:agents-ext koog:agents:agents-ext koog:agents:agents-ext->koog:agents:agents-core koog:agents:agents-ext->koog:agents:agents-tools koog:agents:agents-ext->koog:prompt:prompt-executor:prompt-executor-llms-all koog:agents:agents-ext->koog:test-utils koog:agents:agents-features:agents-features-snapshot koog:agents:agents-features:agents-features-snapshot koog:agents:agents-features:agents-features-snapshot->koog:agents:agents-core koog:agents:agents-features:agents-features-snapshot->koog:agents:agents-ext koog:agents:agents-features:agents-features-snapshot->koog:agents:agents-test koog:agents:agents-features:agents-features-snapshot->koog:test-utils koog:agents:agents-mcp koog:agents:agents-mcp koog:agents:agents-mcp->koog:agents:agents-core koog:agents:agents-mcp->koog:agents:agents-test koog:agents:agents-mcp->koog:agents:agents-tools koog:agents:agents-mcp->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-openai-client koog:agents:agents-mcp->koog:prompt:prompt-executor:prompt-executor-llms-all koog:agents:agents-mcp->koog:prompt:prompt-executor:prompt-executor-model koog:prompt:prompt-model koog:prompt:prompt-model koog:agents:agents-mcp->koog:prompt:prompt-model koog:agents:agents-mcp->koog:test-utils koog:agents:agents-mcp->koog:utils koog:agents:agents-test->koog:agents:agents-ext koog:agents:agents-test->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-openai-client koog:agents:agents-test->koog:prompt:prompt-executor:prompt-executor-llms-all koog:agents:agents-test->koog:test-utils koog:agents:agents-tools->koog:prompt:prompt-model koog:docs koog:docs koog:docs->koog:agents:agents-ext koog:docs->koog:agents:agents-test koog:http-client:http-client-ktor koog:http-client:http-client-ktor koog:http-client:http-client-ktor->koog:utils koog:integration-tests->koog:agents:agents-ext koog:integration-tests->koog:agents:agents-features:agents-features-snapshot koog:integration-tests->koog:agents:agents-mcp koog:integration-tests->koog:agents:agents-test koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-anthropic-client koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-anthropic-client koog:integration-tests->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-anthropic-client koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-google-client koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-google-client koog:integration-tests->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-google-client koog:integration-tests->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-openai-client koog:integration-tests->koog:prompt:prompt-executor:prompt-executor-llms-all koog:integration-tests->koog:test-utils koog:prompt:prompt-executor:prompt-executor-clients koog:prompt:prompt-executor:prompt-executor-clients koog:prompt:prompt-executor:prompt-executor-clients->koog:agents:agents-tools koog:prompt:prompt-executor:prompt-executor-clients->koog:prompt:prompt-model koog:prompt:prompt-executor:prompt-executor-clients->koog:test-utils koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-anthropic-client->koog:agents:agents-tools koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-anthropic-client->koog:http-client:http-client-ktor koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-anthropic-client->koog:prompt:prompt-executor:prompt-executor-clients koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-anthropic-client->koog:prompt:prompt-llm koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-anthropic-client->koog:prompt:prompt-model koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-anthropic-client->koog:test-utils koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-anthropic-client->koog:utils koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-google-client->koog:agents:agents-tools koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-google-client->koog:http-client:http-client-ktor koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-google-client->koog:prompt:prompt-executor:prompt-executor-clients koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-google-client->koog:prompt:prompt-llm koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-google-client->koog:prompt:prompt-model koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-google-client->koog:test-utils koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-google-client->koog:utils koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-ollama-client koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-ollama-client koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-ollama-client->koog:agents:agents-core koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-ollama-client->koog:http-client:http-client-ktor koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-ollama-client->koog:prompt:prompt-executor:prompt-executor-clients koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-ollama-client->koog:prompt:prompt-llm koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-ollama-client->koog:prompt:prompt-model koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-ollama-client->koog:test-utils koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-openai-client->koog:http-client:http-client-ktor koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-openai-client->koog:test-utils koog:prompt:prompt-executor:prompt-executor-llms-all->koog:agents:agents-tools koog:prompt:prompt-executor:prompt-executor-llms-all->koog:http-client:http-client-ktor koog:prompt:prompt-executor:prompt-executor-llms-all->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-anthropic-client koog:prompt:prompt-executor:prompt-executor-llms-all->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-google-client koog:prompt:prompt-executor:prompt-executor-llms-all->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-ollama-client koog:prompt:prompt-executor:prompt-executor-llms-all->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-openai-client koog:prompt:prompt-executor:prompt-executor-llms-all->koog:prompt:prompt-executor:prompt-executor-model koog:prompt:prompt-executor:prompt-executor-llms-all->koog:prompt:prompt-llm koog:prompt:prompt-executor:prompt-executor-llms-all->koog:prompt:prompt-model koog:prompt:prompt-executor:prompt-executor-model->koog:agents:agents-test koog:prompt:prompt-executor:prompt-executor-model->koog:agents:agents-tools koog:prompt:prompt-executor:prompt-executor-model->koog:prompt:prompt-executor:prompt-executor-clients koog:prompt:prompt-executor:prompt-executor-model->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-anthropic-client koog:prompt:prompt-executor:prompt-executor-model->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-google-client koog:prompt:prompt-executor:prompt-executor-model->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-ollama-client koog:prompt:prompt-executor:prompt-executor-model->koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-openai-client koog:prompt:prompt-executor:prompt-executor-model->koog:prompt:prompt-llm koog:prompt:prompt-executor:prompt-executor-model->koog:prompt:prompt-model koog:prompt:prompt-executor:prompt-executor-model->koog:test-utils koog:prompt:prompt-model->koog:prompt:prompt-llm koog:prompt:prompt-model->koog:test-utils koog:prompt:prompt-model->koog:utils koog:test-utils->koog:utils __more__ +76 more projects

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.

696 modules, with 1627 dependencies between them. 27 loops run through 90 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 656 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 a2a.model2 agents.core.agent.execution3 http.client.KoogHttpClient4 prompt.executor.clients.openai.base.models5 prompt.llm6 prompt.params7 serialization8 utils.time9 prompt.executor.clients.openai.models10 prompt.message.Message11 prompt.message12 agents.core.tools13 prompt14 prompt.streaming15 agents.core.environment16 prompt.dsl17 prompt.executor.clients18 prompt.executor.clients.anthropic19 prompt.executor.clients.bedrock20 prompt.executor.clients.google21 prompt.executor.clients.openai.base22 prompt.executor.ollama.client23 prompt.executor.clients.openai24 prompt.executor.model25 prompt.processor26 spring.ai.chat27 agents.core.agent.config28 agents.core.feature.pipeline29 agents.core.agent.session30 agents.core.dsl.builder31 agents.core.dsl.extension32 agents.ext.agent33 agents.core.agent.entity34 agents.core.planner35 agents.core.agent36 agents.core.agent.context37 agents.core.feature38 agents.snapshot.feature39 agents.cli.CliAIAgent40 agents.cli
1 a2a.model
2 agents.core.agent.execution
3 http.client.KoogHttpClient
4 prompt.executor.clients.openai.base.models
5 prompt.llm
6 prompt.params
7 serialization
8 utils.time
9 prompt.executor.clients.openai.models25
10 prompt.message.Message8
11 prompt.message4
12 agents.core.tools71
13 prompt11
14 prompt.streaming12
15 agents.core.environment15171
16 prompt.dsl2262
17 prompt.executor.clients611111
18 prompt.executor.clients.anthropic15211121113
19 prompt.executor.clients.bedrock711111113
20 prompt.executor.clients.google14111121113
21 prompt.executor.clients.openai.base17211113112
22 prompt.executor.ollama.client1711112133
23 prompt.executor.clients.openai19431101111123
24 prompt.executor.model1713232321111
25 prompt.processor444843
26 spring.ai.chat62222312231
27 agents.core.agent.config211131
28 agents.core.feature.pipeline931583633338123911
29 agents.core.agent.session412394243644111
30 agents.core.dsl.builder1335113112710
31 agents.core.dsl.extension21493142172
32 agents.ext.agent315411114142
33 agents.core.agent.entity11192124119222215
34 agents.core.planner1111111115
35 agents.core.agent137121712143164418456
36 agents.core.agent.context87572141121102349521217111
37 agents.core.feature11111111311
38 agents.snapshot.feature116122226
39 agents.cli.CliAIAgent3111111116
40 agents.cli1432122213123
Uses a module listed above itPart of a loopThe module itself
1 a2a.model2 agents.core.agent.execution3 http.client.KoogHttpClient4 prompt.executor.clients.openai.base.models5 prompt.llm6 prompt.params7 serialization8 utils.time9 prompt.executor.clients.openai.models10 prompt.message.Message11 prompt.message12 agents.core.tools13 prompt14 prompt.streaming15 agents.core.environment16 prompt.dsl17 prompt.executor.clients18 prompt.executor.clients.anthropic19 prompt.executor.clients.bedrock20 prompt.executor.clients.google21 prompt.executor.clients.openai.base22 prompt.executor.ollama.client23 prompt.executor.clients.openai24 prompt.executor.model25 prompt.processor26 spring.ai.chat27 agents.core.agent.config28 agents.core.feature.pipeline29 agents.core.agent.session30 agents.core.dsl.builder31 agents.core.dsl.extension32 agents.ext.agent33 agents.core.agent.entity34 agents.core.planner35 agents.core.agent36 agents.core.agent.context37 agents.core.feature38 agents.snapshot.feature39 agents.cli.CliAIAgent40 agents.clia2a.model1agents.core.agent.execution2http.client.KoogHttpClient3prompt.executor.clients.openai.base.models4prompt.llm5prompt.params6serialization7utils.time8prompt.executor.clients.openai.models9prompt.message.Message10prompt.message11agents.core.tools12prompt13prompt.streaming14agents.core.environment15prompt.dsl16prompt.executor.clients17prompt.executor.clients.anthropic18prompt.executor.clients.bedrock19prompt.executor.clients.google20prompt.executor.clients.openai.base21prompt.executor.ollama.client22prompt.executor.clients.openai23prompt.executor.model24prompt.processor25spring.ai.chat26agents.core.agent.config27agents.core.feature.pipeline28agents.core.agent.session29agents.core.dsl.builder30agents.core.dsl.extension31agents.ext.agent32agents.core.agent.entity33agents.core.planner34agents.core.agent35agents.core.agent.context36agents.core.feature37agents.snapshot.feature38agents.cli.CliAIAgent39agents.cli402584711112151712262611111152111211137111111131411112111317211113112171111213319431101111123171323232111144484362222312231211131931583633338123911412394243644111133511311271021493142172315411114142111921241192222151111111115137121712143164418456875721411211023495212171111111111131111612222631111111161432122213123+656 more modules (most-connected shown)

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

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

At a glance — Maturity · 77% · Strong ·

At a glance — Readiness · 63% · Adequate · gated by P3, P7 ·

At a glance — Security · 67% · Checked 5 of 11 · gated by D29, D36 ·

At a glance — Performance · 85% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection107High / Critical
A03:2025 — Software Supply Chain Failures80High / Critical
A02:2025 — Security Misconfiguration2High / Critical

Roadmap

Top priorities: Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing; Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry); Resolve the 1 Banned license finding(s) in License Compliance.

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

Do thisHelpsEffortDimension
Resolve the 1 Banned license finding(s) in License Compliance.+3.4 ptsLowLicense Compliance
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+4.1 ptsMediumSecurity & performance tooling
Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).+4.1 ptsMediumOutbound HTTP resilience
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle.kts.+1.0 ptsLowADR Quality
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED.+0.7 ptsLowStatic Analysis (SAST)
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3).+0.7 ptsLowStatic Analysis (SAST)
Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED.+0.7 ptsLowIaC & Container Security
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED.+0.6 ptsLowSupply-chain Provenance & Signing

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED2.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED

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

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

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

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

Could not be resolved — 16

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

This survey 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. All 60 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two 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. 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.

What we checked — 60 dimensions across the health lenses
D1D2D3D4D5D6D12D13D14D15D16D17D19D20D21D26D27D28D29D30D31D34D35D36D43D44AX1AX10AX2AX3AX5AX7AX8M1M2M3M4P1P10P2P3P4P6P7PF3X1X12X13X16X17X18X2X21X23X25X27X29X3X4X5

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, 882 of 1315 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 or a scanner, 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
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1d69d-8bc8-750c-b740-c0131c19aaa5.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.kt, .java) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
  • D11 Test Reliability — not measured this run — We 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 repository declares 14 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.kt, .java), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
  • D12 Dependency Hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. Currency was graded against Maven Central, but whether an artifact is DEPRECATED is not: Maven Central publishes no deprecation marker, exactly as rubygems.org does not. Whether one is UNMAINTAINED is not graded either — no registry publishes a maintenance status, and release age does not stand in for one. Two of this dimension's four signals are therefore unread on a Maven tree, and its score reflects currency alone.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape 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. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We 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.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We 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. `a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/model/AgentCard.kt`, `a2a/a2a-server/src/commonMain/kotlin/ai/koog/a2a/server/session/SessionEventProcessor.kt`, `agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgentBuilderBase.kt`, `agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliConfig.kt`, `agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CustomCliAgentBuilder.kt`, … (+52 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX1 Captive dependencies — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. This repository also uses Koin, whose singleton and shorter-lived bindings can capture one another the same way, but this check does not read them yet. That is a gap in this analyzer's language reach — not a finding that those bindings are free of it.
  • AX6 Interface segregation — not measured this run — We 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's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (examples/koog-agentcore-runtime/Dockerfile). docker build failed (exit 1) — -------------------- 2 | RUN addgroup -S app && adduser -S app -G app 3 | WORKDIR /app 4 | >>> COPY build/libs/app.jar app.jar 5 | RUN chown app:app /app/app.jar 6 | USER app -------------------- ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 214fdb74-e305-4eb7-979f-3c98065a7ed3::vbbm5i4igfpp0x35bv5fy2x7h: "/build/libs/app.jar": not found; runtime evidence skipped.
  • C1 Data Protection — not measured this run — We 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. 'org.jetbrains.exposed' is imported (agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/CheckpointsTable.kt:3), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C2 Access Controls — not measured this run — We 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 — We 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. 'org.jetbrains.exposed' is imported (agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/CheckpointsTable.kt:3), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C4 Data Retention — not measured this run — We 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. 'org.jetbrains.exposed' is imported (agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/CheckpointsTable.kt:3), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C5 Data-Subject Rights — not measured this run — We 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. 'org.jetbrains.exposed' is imported (agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/CheckpointsTable.kt:3), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • ED5 Idempotency — not measured this run — We 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 decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Java, Kotlin, Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Kotlin, Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we 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), and artefact counts an order of magnitude off. 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.
  • P8 Schema migrations — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.

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

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do 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.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • 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.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity8.6 / 10Strong✓ 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 8.6 / 10 · rule-coverage 100% · ceiling Prevented

10 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was process_api_links._build_navigation_map at 26. A further 3 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 BedrockConverseConverters.transformConverseStreamChunks at 21 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: agents/agents-features/agents-features-acp/src/jvmMain/kotlin/ai/koog/agents/features/acp/MessageConverters.kt (MessageConvertersKt.toAcpContentBlock at 17), prompt/prompt-structure/src/commonMain/kotlin/ai/koog/prompt/structure/json/generator/GenericJsonSchemaGenerator.kt (GenericJsonSchemaGenerator.process at 17). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

process_api_links._build_navigation_map (cyclomatic 26)docs/hooks/process_api_links.py:46
OpenAILLMClient.convertPromptToResponsesMessages (cyclomatic 24)prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:770
DefaultMcpToolDescriptorParser.parseParameterType (cyclomatic 23)agents/agents-mcp/src/commonMain/kotlin/ai/koog/agents/mcp/McpToolDefinitionParser.kt:64
SchemaGeneratorKt.toToolParameter (cyclomatic 23)agents/agents-tools/src/commonMain/kotlin/ai/koog/agents/core/tools/schema/SchemaGenerator.kt:114
ItemPolymorphicSerializer.selectDeserializer (cyclomatic 23)prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/models/OpenAIResponsesAPI.kt:2313

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

What to do

  1. Bring the 10 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with process_api_links._build_navigation_map (cyclomatic 26), OpenAILLMClient.convertPromptToResponsesMessages (cyclomatic 24), DefaultMcpToolDescriptorParser.parseParameterType (cyclomatic 23). — 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 10 together lifts Cyclomatic Complexity from 8.6 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

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

D2 · Cognitive Complexity7.2 / 10Strong✓ 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 7.2 / 10 · rule-coverage 100% · ceiling Prevented

18 method(s) exceeded the cognitive complexity threshold of 15; the worst was OpenAILLMClient.convertPromptToResponsesMessages at 54.

GoogleLLMClient.toGoogleContent (cognitive 25) · ×2prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:417
OpenAILLMClient.convertPromptToResponsesMessages (cognitive 54)prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:770
process_api_links._build_navigation_map (cognitive 47)docs/hooks/process_api_links.py:46
DefaultMcpToolDescriptorParser.parseParameterType (cognitive 32)agents/agents-mcp/src/commonMain/kotlin/ai/koog/agents/mcp/McpToolDefinitionParser.kt:64
JVMDocumentProvider.convertLineSeparators (cognitive 32)rag/rag-base/src/jvmMain/kotlin/ai/koog/rag/base/files/JVMDocumentProvider.kt:83

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

What to do

  1. Bring the 18 bodies over 15 down to 15 or less in Cognitive Complexity — start with OpenAILLMClient.convertPromptToResponsesMessages (cognitive 54), process_api_links._build_navigation_map (cognitive 47), DefaultMcpToolDescriptorParser.parseParameterType (cognitive 32). — 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 18 together lifts Cognitive Complexity from 7.2 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

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

D3 · God Classes9.3 / 10Stronggated by 28 serious findings✓ Tool-verified

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

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

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

28 god class(es) detected.

FileTooLong: models/OpenAIResponsesAPI.kt · ×10prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/models/OpenAIResponsesAPI.kt
MethodTooLong: Feature.installCommon · ×7agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/feature/OpenTelemetry.kt:289
ClassTooLong: OpenAILLMClient · ×6prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:107
TooManyMethods: AIAgentPipelineImpl · ×5agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:59

What to do

  1. Resolve the 10 FileTooLong finding(s) in God Classes — start with OpenAIResponsesAPI.kt, OpenAILLMClient.kt, OpenAIModels.kt. — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 7 MethodTooLong finding(s) in God Classes — start with OpenTelemetry.kt (2), Persistence.kt, Tracing.kt. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 6 ClassTooLong finding(s) in God Classes — start with OpenAILLMClient.kt, AIAgentPipelineImpl.kt, OpenTelemetry.kt. — One of this dimension's main actionable groups (6 warning-level).

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

D4 · Code Duplication7.2 / 10Strong✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

147 duplicated block group(s) detected. 7.1 % of the production lines (9,285 of 131,240) are in a reported copy. A further 103 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 67 of the 250 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (13 lines × 2) · ×10a2a/a2a-server/src/commonMain/kotlin/ai/koog/a2a/server/A2AServer.kt:404
Duplicated block (14 lines × 2) · ×9agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt:112
Duplicated block (12 lines × 2) · ×7agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/counterMetricEvents.kt:21
Duplicated block (11 lines × 2) · ×6agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/histogramMetricEvents.kt:61
Duplicated block (10 lines × 2) · ×6prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:315

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

What to do

  1. Resolve the 10 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with Debugger.kt (2), A2AServer.kt, JdbcChatHistoryProvider.kt. — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 9 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with Debugger.kt (3), ClaudeAgentBuilder.kt, FunctionalAIAgent.kt. — One of this dimension's main actionable groups (9 warning-level).
  3. Resolve the 7 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with counterMetricEvents.kt, Converters.kt, SpringAiKoogVectorStore.kt. — One of this dimension's main actionable groups (7 warning-level).

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

D5 · Coupling0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Prevented

96 production modules (Gradle), 5 dependency cycle(s), 4 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 15 module(s) off the main sequence, with abstractness counted on 89 of the 96 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Circular dependency · ×5
Off the main sequence: koog:agents:agents-mcp-metadata · ×13
Unstable project koog:agents:agents-features:agents-features-longterm-memory · ×4
Off the main sequence: koog:koog-spring-ai-v2:koog-spring-ai-v2-common · ×2

What to do

  1. Resolve the 13 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (13 warning-level).
  2. Resolve the 5 Circular dependency finding(s) in Coupling. — One of this dimension's main actionable groups (5 issue-level).
  3. Resolve the 4 Unstable project koog finding(s) in Coupling. — One of this dimension's main actionable groups (4 warning-level).

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

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 3 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

3 of 217 classes have LCOM4 above 3.

Low cohesion: EventHandlerConfigCommon (LCOM4 22) · ×3agents/agents-features/agents-features-event-handler/src/commonMain/kotlin/ai/koog/agents/features/eventHandler/feature/EventHandlerConfigCommon.kt:31

What to do

  1. Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with EventHandlerConfigCommon.kt, TerminalClientOperations.kt, AcpTerminalClient.kt. — One of this dimension's main actionable groups (3 warning-level).

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

D12 · Dependency Hygiene8.0 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

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

389 outdated artifact(s) of 419 resolved by the build, graded against Maven Central. The poms themselves state a version for only 213 of 275 declaration(s) — the rest are parent- or BOM-managed, which is why this is read from the resolved graph rather than from the manifests. Whether any of these is DEPRECATED is not graded — Maven Central publishes no deprecation marker, exactly as rubygems.org does not. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Known CVEs in this graph are D30's question, read from the manifest there.

Outdated (compile): org.springframework.ai:spring-ai-model · ×295
Outdated (runtime): com.squareup.okhttp3:okhttp · ×38
Outdated (test): net.minidev:json-smart · ×26
Outdated (compile -- module io.ktor.client.apache5 [auto]): io.ktor:ktor-client-apache5-jvm
Outdated (compile -- module io.ktor.client.core [auto]): io.ktor:ktor-client-core-jvm

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

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

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

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

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

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

Secret scan ran and found no leaked secrets. 1 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance8.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

1 of 150 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 138 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. 62 further coordinate(s) are declared with no version at the declaration site — inherited from a parent POM, a BOM or an unresolved Gradle version reference — and are NOT graded: this verdict covers what the checkout pins, not the full transitive graph. A further 15 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's JVM dependencies and nothing else. The repository also declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

Banned license: com.mysql:mysql-connector-j

What to do

  1. Resolve the 1 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (1 issue-level).

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

D15 · Churn × Complexity Hotspots10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

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

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

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

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

27 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/model/AgentCard.kt. Counted over 520 of the 1039 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

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

✓ On the Gold path — maintain.

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

D17 · Explicit Debt9.9 / 10Stronggated by 76 serious findings✓ Tool-verified

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

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

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

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

TodoComment · ×58serialization/serialization-core/src/commonMain/kotlin/ai/koog/serialization/TypeToken.kt:41
FixmeComment · ×18prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/Prompt.kt:23

What to do

  1. Resolve the 58 TodoComment finding(s) in Explicit Debt — start with KoogAgentService.java (6), PromptBuilderTest.kt (3), Message.kt (3). — One of this dimension's main actionable groups (58 warning-level).
  2. Resolve the 18 FixmeComment finding(s) in Explicit Debt — start with SpringAiLLMClientV2IntegrationTest.kt (3), SchemaGenerator.jvmCommon.kt (3), AbstractOpenAILLMClient.kt (2). — One of this dimension's main actionable groups (18 warning-level).

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

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

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

1 of 1 documentation facets pass in full. 91 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

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

No architecture decision records were found.

No ADRs foundbuild.gradle.kts:1

What to do

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

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

D21 · Naming Consistency8.6 / 10Strong✓ Tool-verified

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

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

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

2 naming inconsistencies among 139 declarations measured against a convention their peers follow.

`nextToolAgentID` spells `ID` where 318 names in the project spell it `Id`agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentTool.kt:78
`KoogLlmClientProperties` spells `Llm` where 12 names in the project spell it `LLM`koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/KoogLlmClientProperties.kt:15

What to do

  1. Resolve the 1 `nextToolAgentID` spells `ID` where 318 names in the project spell it… finding(s) in Naming Consistency — start with AIAgentTool.kt. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `KoogLlmClientProperties` spells `Llm` where 12 names in the project… finding(s) in Naming Consistency — start with KoogLlmClientProperties.kt. — One of this dimension's main actionable groups (1 recommendation-level).

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

D26 · Project Cohesion9.5 / 10Exemplary✓ 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.

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

2 of 88 build units (Gradle) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

✓ On the Gold path — maintain.

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

D27 · Navigability8.7 / 10Strong✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

54 % of calls cross a namespace and 27 % go through an interface, but 100 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

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

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

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

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

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

107 finding(s): 0 critical, 103 high, 3 medium, 1 low. 92 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 19 file(s) — `docs/overrides/partials/header.html` (lines 25–30), `examples/acp-agent/gradlew` (line 74, line 180), `examples/code-agent/step-01-minimal-agent/gradlew` (line 74, line 180), `examples/code-agent/step-02-add-execution-tool/gradlew` (line 74, line 180), `examples/code-agent/step-03-add-observability/gradlew` (line 74, line 180), … (+14 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 5 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
  3. No action in Static Analysis (SAST) — all 91 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (91 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities10.0 / 10Adequategated by 46 critical findings○ Nothing flagged

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. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

71 finding(s): 10 critical, 36 high, 18 medium, 7 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

D31 · IaC & Container Security9.6 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D34 · Knowledge Freshness5.7 / 10Adequate✓ 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 5.7 / 10 · rule-coverage 100% · ceiling Documented

221 of 520 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt. Counted over 520 of the 1039 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×3agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:1
Orphaned file · ×218prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/models/OpenAIChatCompletion.kt:1
Further orphaned files (smaller)

What to do

  1. Resolve the 218 Orphaned file finding(s) in Knowledge Freshness — start with Converters.kt (2), OpenTelemetryConfig.kt (2), SpringAiChatAutoConfiguration.kt (2). — One of this dimension's main actionable groups (218 recommendation-level).
  2. Resolve the 3 Orphaned knowledge finding(s) in Knowledge Freshness — start with CliAIAgent.kt, AgentcoreAutoDiscoveryDsl.kt, FactRetrievalHistoryCompressionStrategy.kt. — One of this dimension's main actionable groups (3 issue-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 Coupling9.9 / 10Stronggated by 4 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: Tracing.kt↔traceMessageFormat.kt 80%; AnthropicModels.kt↔BedrockModels.kt 61%; ContextualPromptExecutor.kt↔AIAgentPipeline.kt 50%

Change coupling: Tracing.kt ↔ traceMessageFormat.kt · ×4agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:1

What to do

  1. Resolve the 4 Change coupling finding(s) in Change Coupling — start with Tracing.kt, AnthropicModels.kt, ContextualPromptExecutor.kt. — One of this dimension's main actionable groups (4 warning-level).

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported 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. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX1 · Captive dependencies10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.

Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.

AX10 · Code composition7.9 / 10Strong✓ 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.

AX2 · Stateful singletons10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

AX3 · Project dependency cycles6.8 / 10Adequate✓ 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.

  • The projects koog:test-utils → koog:utils → koog:test-utils form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
  • The projects koog:a2a:a2a-client → koog:a2a:a2a-test → koog:a2a:a2a-client form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
  • The projects koog:serialization:serialization-core → koog:serialization:serialization-jackson → koog:serialization:serialization-core (one cycle inside a mutually-dependent group of 3 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
  • The projects koog:prompt:prompt-markdown → koog:prompt:prompt-model → koog:prompt:prompt-markdown form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
  • The projects koog:agents:agents-cli → koog:agents:agents-core → koog:integration-tests → koog:agents:agents-cli (one cycle inside a mutually-dependent group of 32 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.

What to do

  • Break project reference cycles by extracting shared abstractions into a separate project; keep the graph a DAG.
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.

AX7 · Slice cohesion10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether feature slices stay independent (no direct cross-slice references) — the discipline that makes vertical-slice architecture pay off.

Method: Roslyn scan (vertical-slice gated): feature slices resolved from namespaces (.Features.*, .Slices.*) or project names; cross-slice type references detected. Deterministic, traceable.

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

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

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

M1 · Documentation (README)8.7 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

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

M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

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

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

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

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

P10 · Library API & versioning10.0 / 10Exemplary✓ Tool-verified

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

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

  • 1 public type in `ai.koog.agents.core.agent.entity` is marked as implementation by its own namespace, folder or name: `SimpleAIAgentNodeImpl` (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/entity/AIAgentNode.kt:170, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/entity/AIAgentNode.kt:170
  • 2 public types in `ai.koog.agents.core.feature.pipeline` are marked as implementation by their own namespace, folder or name: `AIAgentPipelineImpl` (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:59, name ends in `Impl`), `AIAgentPlannerPipelineImpl` (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPlannerPipelineImpl.kt:22, name ends in `Impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:59

What to do

  • Hide `ai.koog.agents.core.agent.entity` (`SimpleAIAgentNodeImpl`) (Java: package-private (no modifier), or leave its package out of `module-info` exports; Kotlin: `internal`): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `ai.koog.agents.core.feature.pipeline` (`AIAgentPipelineImpl`, `AIAgentPlannerPipelineImpl`) (Java: package-private (no modifier), or leave its package out of `module-info` exports; Kotlin: `internal`): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
P2 · Observability9.8 / 10Exemplary✓ Tool-verified

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

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

  • Only 50/53 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `a2a/a2a-transport/a2a-transport-server-jsonrpc-http`, `agents/agents-features/agents-features-a2a-client`, `agents/agents-mcp-server`.

What to do

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

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

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

  • No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 21 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. — REDACTED:7
  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, `uv`, `maven`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — REDACTED:2

What to do

  • Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `npm`, `uv`, `maven` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `HttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×10) — a2a/a2a-client/src/commonMain/kotlin/ai/koog/a2a/client/AgentCardResolver.kt:41, a2a/a2a-transport/a2a-transport-client-jsonrpc-http/src/commonMain/kotlin/ai/koog/a2a/transport/client/jsonrpc/http/HttpJSONRPCClientTransport.kt:36, agents/agents-mcp/src/commonMain/kotlin/ai/koog/agents/mcp/McpToolRegistryProvider.kt:125, …
  • `HttpClient {` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — agents/agents-mcp/src/commonMain/kotlin/ai/koog/agents/mcp/McpToolRegistryProvider.kt:104
  • `HttpClient.newHttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:398

What to do

  • Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).
PF3 · Async & latency hygiene8.5 / 10Strong✓ Tool-verified

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

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

  • `main` is async and calls Thread.sleep — a blocking call inside async code stalls the coroutine's thread, and every coroutine dispatched to it for as long as it runs. — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/mcp/GoogleMapsMcpClient.kt:21

What to do

  • Kotlin: call the suspend function directly instead of wrapping it in runBlocking, use delay() instead of Thread.sleep, and move unavoidable blocking I/O into withContext(Dispatchers.IO).
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

  • `countElements` is public and takes its `JsonElement` receiver from its caller, and it calls itself at line 184 with a piece of its receiver (and at line 185) — the function is not `tailrec`, so every call is a real frame — and nowhere in `countElements` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25; Android's threads are smaller). kotlinx.serialization's `parseToJsonElement` accepts nested arrays to any depth and Android's built-in `org.json` sets no limit, while Jackson 2.15+ stops at 1,000 — on a cold JVM past the point the walk fails; Gson 2.12+ and Moshi stop at 255. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (e: Exception)` around the call does not stop it, and on Android an uncaught one ends the process. Thread a depth argument through `countElements` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`. — prompt/prompt-structure/src/commonMain/kotlin/ai/koog/prompt/structure/json/generator/JsonSchemaGenerator.kt:184
  • `JsonDocumentConverters.convertToDocument` is public and takes `element: JsonElement` from its caller, and it calls itself at line 38 with a piece of `element` (and at line 40) — the function is not `tailrec`, so every call is a real frame — and nowhere in `JsonDocumentConverters.convertToDocument` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25; Android's threads are smaller). kotlinx.serialization's `parseToJsonElement` accepts nested arrays to any depth and Android's built-in `org.json` sets no limit, while Jackson 2.15+ stops at 1,000 — on a cold JVM past the point the walk fails; Gson 2.12+ and Moshi stop at 255. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (e: Exception)` around the call does not stop it, and on Android an uncaught one ends the process. Thread a depth argument through `JsonDocumentConverters.convertToDocument` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`. — prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/util/JsonDocumentConverters.kt:38

What to do

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

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

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

X2 · Cancellation propagation8.8 / 10Strong✓ Tool-verified

Other · Code Health — Whether suspend functions that make a cancellable request accept or pass on the coroutine's cancellation (adoption curve).

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

  • Only 8/10 suspend functions that make a cancellable request (Ktor, OkHttp newCall, URL streams) accept the coroutine's cancellation or pass one on, so a request keeps running after whatever wanted it has given up — a screen navigated away from, a disposed widget, a superseded search. In a suspend function, make the request with a call that suspends — Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` that cancels the `Call` — not a blocking `execute()`: `withContext(Dispatchers.IO)` moves the call off the caller's thread but does not make it cancellable; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `get` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`. — http-client/http-client-okhttp/src/main/kotlin/ai/koog/http/client/okhttp/OkHttpKoogHttpClient.kt:101
  • `post` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`. — http-client/http-client-okhttp/src/main/kotlin/ai/koog/http/client/okhttp/OkHttpKoogHttpClient.kt:119

What to do

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

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

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

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

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

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

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

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

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

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

Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen.

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

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

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

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

X3 · Exception handling7.0 / 10Strong✓ Tool-verified

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

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

  • `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×7) — agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:503, agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/providers/file/FilePersistenceStorageProvider.kt:72, agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:362, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×2) — agents/agents-cli/src/jvmCommonMain/kotlin/ai/koog/agents/cli/transport/ProcessCliTransport.kt:122, a2a/a2a-server/src/commonMain/kotlin/ai/koog/a2a/server/session/SessionManager.kt:104

What to do

  • Swallowed exception (caught, then discarded)
X4 · Structured logging6.1 / 10Adequate✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `info` at line 60 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. (×2) — koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/openrouter/OpenRouterLLMAutoConfiguration.kt:60, koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/ollama/OllamaLLMAutoConfiguration.kt:60
  • `info` at line 68 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. (×3) — koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/openai/OpenAILLMAutoConfiguration.kt:68, koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/mistralai/MistralAILLMAutoConfiguration.kt:68, koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/google/GoogleLLMAutoConfiguration.kt:68
  • `info` at line 72 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/deepseek/DeepSeekLLMAutoConfiguration.kt:72
  • `info` at line 66 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/anthropic/AnthropicLLMAutoConfiguration.kt:66
  • `info` at line 91 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. (×2) — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiEmbeddingAutoConfiguration.kt:91, koog-spring-ai/koog-spring-ai-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiEmbeddingAutoConfiguration.kt:91
  • `info` at line 105 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. (×4) — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:105, koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:105, koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:105, …
  • `info` at line 181 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. (×2) — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:181, koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:181
  • `info` at line 90 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. (×2) — koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatMemoryAutoConfiguration.kt:90, koog-spring-ai/koog-spring-ai-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatMemoryAutoConfiguration.kt:90
  • `info` at line 108 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. (×2) — koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:108, koog-spring-ai/koog-spring-ai-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:108
  • `info` at line 116 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. (×2) — koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:116, koog-spring-ai/koog-spring-ai-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:116
  • `info` at line 119 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. (×2) — koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:119, koog-spring-ai/koog-spring-ai-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:119
  • `error` at line 577 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — koog-bedrock-agentcore-runtime/src/main/kotlin/ai/koog/agentcore/runtime/AgentCoreRuntime.kt:577
  • `error` at line 581 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — koog-bedrock-agentcore-runtime/src/main/kotlin/ai/koog/agentcore/runtime/AgentCoreRuntime.kt:581
  • `warn` at line 110 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/AgentcoreSearchStorage.kt:110
  • `debug` at line 156 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/AgentcoreSearchStorage.kt:156
  • `debug` at line 158 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/AgentcoreSearchStorage.kt:158
  • `debug` at line 175 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/AgentcoreSearchStorage.kt:175
  • `debug` at line 177 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/AgentcoreSearchStorage.kt:177
  • `debug` at line 90 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — agents/agents-features/agents-features-chat-history-aws/src/jvmMain/kotlin/ai/koog/agents/features/chathistory/aws/AgentcoreChatHistoryProvider.kt:90
  • `debug` at line 92 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — agents/agents-features/agents-features-chat-history-aws/src/jvmMain/kotlin/ai/koog/agents/features/chathistory/aws/AgentcoreChatHistoryProvider.kt:92
  • `debug` at line 104 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — agents/agents-features/agents-features-chat-history-aws/src/jvmMain/kotlin/ai/koog/agents/features/chathistory/aws/AgentcoreChatHistoryProvider.kt:104
  • `debug` at line 106 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — agents/agents-features/agents-features-chat-history-aws/src/jvmMain/kotlin/ai/koog/agents/features/chathistory/aws/AgentcoreChatHistoryProvider.kt:106

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types9.9 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether Kotlin's null safety is not undermined by not-null assertions — `String` cannot hold null and `String?` must be checked before use in every Kotlin module, and each `!!` is a run-time `NullPointerException` the author has told the compiler cannot happen.

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

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 Health78%StrongSolid.
Architecture88%Adequate — gated by D5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity77%StrongSolid.
Readiness63%Adequate — gated by P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security67%Checked 5 of 11Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance85%StrongStrongest area.
Unscored — 4 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.

  • D11 Test Reliability — 14 observation(s) recorded · This repository declares 14 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.kt, .java), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
  • SC1 Supply-chain hygiene — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: this repository stores data through 'org.jetbrains.exposed' (agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/CheckpointsTable.kt:3) but declares no persisted model this check reads (Room/JPA/Spring Data/MongoDB @Entity and Realm classes, Exposed and Ktorm table columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQLDelight files). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
  • C4 Data Retention — Not assessed: this repository stores data through 'org.jetbrains.exposed' (agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/CheckpointsTable.kt:3) but declares no persisted model this check reads (Room/JPA/Spring Data/MongoDB @Entity and Realm classes, Exposed and Ktorm table columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQLDelight files). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
  • C5 Data-Subject Rights — Not assessed: this repository stores data through 'org.jetbrains.exposed' (agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/CheckpointsTable.kt:3) but declares no persisted model this check reads (Room/JPA/Spring Data/MongoDB @Entity and Realm classes, Exposed and Ktorm table columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQLDelight files). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 50 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX4 Dependency direction — not applicable to a vertical-slice + CQRS architecture (the inward-dependency rule is for layered/clean styles)
  • AX6 Interface segregation — AX6 reached only 3% of this repository's production lines — kotlin (126,341 lines), python (530 lines), swift (18 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — -------------------- 2 | RUN addgroup -S app && adduser -S app -G app 3 | WORKDIR /app 4 | >>> COPY build/libs/app.jar app.jar 5 | RUN chown app:app /app/app.jar 6 | USER app -------------------- ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 214fdb74-e305-4eb7-979f-3c98065a7ed3::vbbm5i4igfpp0x35bv5fy2x7h: "/build/libs/app.jar": not found; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: this repository stores data through 'org.jetbrains.exposed' (agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/CheckpointsTable.kt:3) but declares no persisted model this check reads (Room/JPA/Spring Data/MongoDB @Entity and Realm classes, Exposed and Ktorm table columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQLDelight files). Personal data may be written through raw SQL or a hosted backend, so the absence of a personal-data field here is not evidence that none is stored, and encryption at rest is not scored over a subject that could not be established.
  • 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 — ~115333 lines of test source are present (.kt, .java) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Java, Kotlin surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .java, .kt, .py, .swift source were not judged.
  • D25 ADR Conformance — no ADRs to check
  • D32 Data Compliance (PII/GDPR) — 57 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • 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.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — applicable but not scored (3 signals for this style, 3 needed — the count is met but a required primary signal is absent): 2 aggregate root(s) (entities that raise its domain events); 635 value object(s); 18 domain event(s); no aggregate is declared and no domain structure surrounds the state-guarding types: not claimed as DDD
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED5 Idempotency — Not assessed, and this one is on us: 2 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — Exposed is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a REDACTED, Gradle or sbt build, 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 scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 178 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 66 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · High CVE · ×36
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 11 more in this group — see findings.md.
D11 · Test Reliability · Test declared unreliable · ×14
  • Test declared unreliable: setup a2a/a2a-server/src/jvmTest/kotlin/ai/koog/a2a/server/jsonrpc/A2AServerJsonRpcIntegrationTest.kt:47 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Flaky test". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: a2a/a2a-server/src/jvmTest/kotlin/ai/koog/a2a/server/jsonrpc/A2AServerJsonRpcIntegrationTest.kt a2a/a2a-server/src/jvmTest/kotlin/ai/koog/a2a/server/jsonrpc/A2AServerJsonRpcIntegrationTest.kt:83 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Flaky test, needs investigation". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: cleanup agents/agents-core/src/jvmTest/kotlin/ai/koog/agents/core/feature/AIAgentPipelineJvmTest.kt:45 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Flaky, see #1223". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: cleanup agents/agents-core/src/jvmTest/kotlin/ai/koog/agents/core/system/feature/DebuggerConfigTest.kt:38 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Flaky, see #1124". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: testGraphStrategyStartingEvent agents/agents-core/src/jvmTest/kotlin/ai/koog/agents/core/system/feature/DebuggerStrategyEventsTest.kt:38 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Flaky, see #1124". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: agents/agents-core/src/jvmTest/kotlin/ai/koog/agents/core/system/feature/DebuggerStreamingTest.kt agents/agents-core/src/jvmTest/kotlin/ai/koog/agents/core/system/feature/DebuggerStreamingTest.kt:61 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Flaky, see #1124". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: agents/agents-core/src/jvmTest/kotlin/ai/koog/agents/core/system/feature/DebuggerSubgraphTest.kt agents/agents-core/src/jvmTest/kotlin/ai/koog/agents/core/system/feature/DebuggerSubgraphTest.kt:45 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Flaky, see #1124". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: agents/agents-core/src/jvmTest/kotlin/ai/koog/agents/core/system/feature/DebuggerTest.kt agents/agents-core/src/jvmTest/kotlin/ai/koog/agents/core/system/feature/DebuggerTest.kt:75 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Flaky, see #1124". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: agents/agents-features/agents-features-opentelemetry/src/jvmTest/kotlin/ai/koog/agents/features/opentelemetry/feature/span/OpenTelemetrySpanTest.kt agents/agents-features/agents-features-opentelemetry/src/jvmTest/kotlin/ai/koog/agents/features/opentelemetry/feature/span/OpenTelemetrySpanTest.kt:46 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Flaky test". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: get agents/agents-features/agents-features-trace/src/jvmTest/kotlin/ai/koog/agents/features/tracing/writer/TraceFeatureMessageRemoteWriterTest.kt:86 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Flaky, see #1252". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: tool agents/agents-test/src/jvmTest/kotlin/ai/koog/agents/test/TokenCountTest.kt:211 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "This test is flaky, need to investigate: https://youtrack.jetbrains.com/issue/KG-585/Investigate-flaky-TokenCountTest.test-token-counts-mixed-responses". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: prompt/prompt-cache/prompt-cache-files/src/jvmTest/kotlin/ai/koog/prompt/cache/files/FilePromptCacheTest.kt prompt/prompt-cache/prompt-cache-files/src/jvmTest/kotlin/ai/koog/prompt/cache/files/FilePromptCacheTest.kt:60 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "This test is flaky". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: prompt/prompt-cache/prompt-cache-files/src/jvmTest/kotlin/ai/koog/prompt/cache/files/FilePromptCacheTest.kt prompt/prompt-cache/prompt-cache-files/src/jvmTest/kotlin/ai/koog/prompt/cache/files/FilePromptCacheTest.kt:78 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "This test is flaky". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: utils/src/jvmTest/kotlin/ai/koog/utils/concurrency/ReentrantCoroutinesUtilsTest.kt utils/src/jvmTest/kotlin/ai/koog/utils/concurrency/ReentrantCoroutinesUtilsTest.kt:19 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Flaky test". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
D30 · Dependency Vulnerabilities · Critical CVE · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AX3 · Project dependency cycles · Project dependency cycle · ×5
  • Project dependency cycle — The projects koog:test-utils → koog:utils → koog:test-utils form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
  • Project dependency cycle — The projects koog:a2a:a2a-client → koog:a2a:a2a-test → koog:a2a:a2a-client form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
  • Project dependency cycle — The projects koog:serialization:serialization-core → koog:serialization:serialization-jackson → koog:serialization:serialization-core (one cycle inside a mutually-dependent group of 3 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
  • Project dependency cycle — The projects koog:prompt:prompt-markdown → koog:prompt:prompt-model → koog:prompt:prompt-markdown form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
  • Project dependency cycle — The projects koog:agents:agents-cli → koog:agents:agents-core → koog:integration-tests → koog:agents:agents-cli (one cycle inside a mutually-dependent group of 32 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
D5 · Coupling · Circular dependency · ×5
  • Circular dependency — koog:test-utils → koog:utils → koog:test-utils
  • Circular dependency — koog:a2a:a2a-client → koog:a2a:a2a-test → koog:a2a:a2a-client
  • Circular dependency — koog:prompt:prompt-markdown → koog:prompt:prompt-model → koog:prompt:prompt-markdown
  • Circular dependency — koog:serialization:serialization-core → koog:serialization:serialization-jackson → koog:serialization:serialization-core (one cycle inside a mutually-dependent group of 3 modules)
  • Circular dependency — koog:agents:agents-cli → koog:agents:agents-core → koog:integration-tests → koog:agents:agents-cli (one cycle inside a mutually-dependent group of 32 modules)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×3
  • Orphaned knowledge agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt: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 agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/dsl/AgentcoreAutoDiscoveryDsl.kt: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 agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/dsl/extension/FactRetrievalHistoryCompressionStrategy.kt: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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D14 · License Compliance · Banned license · ×1
  • Banned license: com.mysql:mysql-connector-j — `com.mysql:mysql-connector-j` 9.6.0 is published on Maven Central under `GPL-2.0`, which this policy bans, and this repository declares it in a Maven or Gradle manifest. The licence was read from the artifact's POM `<licenses>` block — following `<parent>` where the POM inherits them — and normalised to SPDX before it was judged, because Maven publishes the name as free text (`GNU Affero General Public License v3` is AGPL-3.0). Where a POM lists several licences they are read as a CHOICE, per Maven's own documentation, so this is charged only because EVERY listed licence is banned. Replace the dependency, or record an accepted exception.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · High IaC · ×1
  • REDACTED
Serious — 462 finding(s)
D17 · Explicit Debt · TodoComment · ×58
  • TodoComment serialization/serialization-core/src/commonMain/kotlin/ai/koog/serialization/TypeToken.kt:41 — // TODO finalize the migration and remove — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment rag/rag-base/src/commonMain/kotlin/ai/koog/rag/base/storage/FilteringDeletionStorage.kt:18 — // TODO: it's unsafe, switch to FilterExpressionBuilder in the next PR — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment rag/rag-base/src/commonMain/kotlin/ai/koog/rag/base/storage/search/SearchRequest.kt:42 — // TODO: it's unsafe, switch to FilterExpressionBuilder in the next PR — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment prompt/prompt-model/src/commonTest/kotlin/ai/koog/prompt/dsl/PromptBuilderTest.kt:290 — // ToDo KG-504 Prompt ending with the markdown br() block is built into empty content parts
  • TodoComment prompt/prompt-model/src/commonTest/kotlin/ai/koog/prompt/dsl/PromptBuilderTest.kt:877 — // ToDo KG-504 Prompt ending with the markdown br() block is built into empty content parts
  • TodoComment prompt/prompt-model/src/commonTest/kotlin/ai/koog/prompt/dsl/PromptBuilderTest.kt:847 — // ToDo KG-504 Prompt ending with the markdown line break block is built into empty content parts
  • TodoComment prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/message/Message.kt:173 — // TODO: replace with JSONObject? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/message/Message.kt:358 — // TODO: replace with JSONObject? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/message/Message.kt:440 — // TODO: replace with JSONObject? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment prompt/prompt-executor/prompt-executor-model/src/jvmTest/java/ai/koog/prompt/executor/llms/ExecutorsTest.java:86 — // TODO FIX — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:886 — // TODO: implement — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:1061 — // TODO: create a separate Azure Client — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIModels.kt:60 — // TODO: support thinking tokens — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIModels.kt:784 — // ToDo add Batch endpoint as well, see KG-719
  • TodoComment prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:432 — // TODO replace exception with if — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:436 — // TODO: Improve exception messages — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:450 — // TODO: implement attachments in assistant messages — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/jvmTest/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicCacheControlTest.kt:170 — // TODO: FIX ME, Assistant can not have a chache point — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/jvmTest/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicCacheControlTest.kt:191 — // TODO: FIX ME, Assistant can not have a chache point — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/conditions/OnPropertyNotEmptyCondition.kt:10 — // TODO: The code below was copied from koog-spring-boot-starter. Move it to some shared module. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment koog-spring-ai/koog-spring-ai-common/src/main/kotlin/ai/koog/spring/ai/common/conditions/OnPropertyNotEmptyCondition.kt:10 — // TODO: The code below was copied from koog-spring-boot-starter. Move it to some shared module. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment integration-tests/src/jvmTest/kotlin/ai/koog/integration/tests/utils/Models.kt:191 — // Todo: remove the method an the assumption after fixing the KG-743
  • TodoComment examples/spring-io-2026/kotlin/src/main/kotlin/org/example/koog/spring/kotlin/agents/BankingAgentService.kt:143 — // TODO: Unused example node -- feel free to put anywhere in the strategy — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/agents/BankingAgentService.java:199 — // TODO: Unused example node -- feel free to put anywhere in the strategy — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:251 — // TODO: Unused example node -- feel free to put anywhere in the strategy — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 33 more in this group — see findings.md.
D17 · Explicit Debt · FixmeComment · ×18
  • FixmeComment prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/Prompt.kt:23 — // FIXME move it from dsl package up to the module root package? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/AbstractOpenAILLMClient.kt:321 — // FIXME: how to handle multiple reasoning messages — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/AbstractOpenAILLMClient.kt:488 — // FIXME: clarify format from response — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/modelfamilies/BedrockToolSerialization.kt:55 — // FIXME this is hack, represent union types properly in ToolDescriptor — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt:787 — // FIXME this is hack, represent union types properly in ToolDescriptor — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment agents/agents-tools/src/commonMain/kotlin/ai/koog/agents/core/tools/ToolDescriptors.kt:132 — // FIXME this is hack, represent union types properly in ToolDescriptor — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment integration-tests/src/jvmTest/kotlin/ai/koog/integration/tests/executor/SpringAiLLMClientV2IntegrationTest.kt:156 — // FIXME Doesn't work with Google model for some reason — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment integration-tests/src/jvmTest/kotlin/ai/koog/integration/tests/executor/SpringAiLLMClientV2IntegrationTest.kt:246 — // FIXME Google integration: Function call is missing a thought_signature in functionCall parts — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment integration-tests/src/jvmTest/kotlin/ai/koog/integration/tests/executor/SpringAiLLMClientV2IntegrationTest.kt:255 — // FIXME Google integration: Function call is missing a thought_signature in functionCall parts — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment agents/agents-tools/src/jvmCommonMain/kotlin/ai/koog/agents/core/tools/schema/SchemaGenerator.jvmCommon.kt:30 — // FIXME don't require Json — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment agents/agents-tools/src/jvmCommonMain/kotlin/ai/koog/agents/core/tools/schema/SchemaGenerator.jvmCommon.kt:38 — // FIXME don't require Json — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment agents/agents-tools/src/jvmCommonMain/kotlin/ai/koog/agents/core/tools/schema/SchemaGenerator.jvmCommon.kt:40 — // FIXME provide convenience constructor FunctionCallingSchemaConfig(jsonSchemaConfig) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment agents/agents-tools/src/commonMain/kotlin/ai/koog/agents/core/tools/ToolDescriptors.kt:106 — // FIXME ToolParameterDescriptor.name in types array is actually always ignored when the schema is constructed. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment agents/agents-core/src/commonMain/kotlin/ai/koog/agents/ext/agent/AIAgentStrategies.kt:23 — // FIXME improve this strategy to use Message.Assistant to chat, it works better than tools — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentRunSessionImpl.kt:92 — // FIXME! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment a2a/a2a-transport/a2a-transport-client-jsonrpc-http/src/commonTest/kotlin/ai/koog/a2a/transport/client/jsonrpc/http/HttpJSONRPCClientTransportTest.kt:174 — // FIXME Can't test it, MockEngine doesn't support SSE capability — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment a2a/a2a-transport/a2a-transport-client-jsonrpc-http/src/commonTest/kotlin/ai/koog/a2a/transport/client/jsonrpc/http/HttpJSONRPCClientTransportTest.kt:261 — // FIXME Can't test it, MockEngine doesn't support SSE capability — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/utils/ResultUtils.kt:6 — // FIXME copied from agents-core module, because a2a does not depend on other Koog modules. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D30 · Dependency Vulnerabilities · Medium CVE · ×18
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D5 · Coupling · Off the main sequence · ×13
  • Off the main sequence: koog:agents:agents-mcp-metadata — koog:agents:agents-mcp-metadata: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: koog:koog-agents — koog:koog-agents: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: koog:koog-agents-additions — koog:koog-agents-additions: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: koog:serialization:serialization-jackson — koog:serialization:serialization-jackson: abstractness 0.00, instability 0.13, distance 0.88 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
  • Off the main sequence: koog:prompt:prompt-markdown — koog:prompt:prompt-markdown: abstractness 0.00, instability 0.14, distance 0.86 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
  • Off the main sequence: koog:prompt:prompt-llm — koog:prompt:prompt-llm: abstractness 0.12, instability 0.08, distance 0.80 — zone of pain — concrete and depended on by 11 project(s), so it's rigid to change.
  • Off the main sequence: koog:a2a:a2a-transport:a2a-transport-client-jsonrpc-http — koog:a2a:a2a-transport:a2a-transport-client-jsonrpc-http: abstractness 0.00, instability 0.20, distance 0.80 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
  • Off the main sequence: koog:utils — koog:utils: abstractness 0.15, instability 0.07, distance 0.79 — zone of pain — concrete and depended on by 14 project(s), so it's rigid to change.
  • Off the main sequence: koog:http-client:http-client-ktor — koog:http-client:http-client-ktor: abstractness 0.00, instability 0.21, distance 0.79 — zone of pain — concrete and depended on by 11 project(s), so it's rigid to change.
  • Off the main sequence: koog:a2a:a2a-transport:a2a-transport-server-jsonrpc-http — koog:a2a:a2a-transport:a2a-transport-server-jsonrpc-http: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: koog:http-client:http-client-core — koog:http-client:http-client-core: abstractness 0.25, instability 0.00, distance 0.75 — zone of pain — concrete and depended on by 10 project(s), so it's rigid to change.
  • Off the main sequence: koog:a2a:a2a-core — koog:a2a:a2a-core: abstractness 0.14, instability 0.14, distance 0.71 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
  • Off the main sequence: koog:agents:agents-utils — koog:agents:agents-utils: abstractness 0.17, instability 0.13, distance 0.71 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×12
  • Outbound HTTP without resilience a2a/a2a-client/src/commonMain/kotlin/ai/koog/a2a/client/AgentCardResolver.kt:41 — `HttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience a2a/a2a-transport/a2a-transport-client-jsonrpc-http/src/commonMain/kotlin/ai/koog/a2a/transport/client/jsonrpc/http/HttpJSONRPCClientTransport.kt:36 — `HttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience agents/agents-mcp/src/commonMain/kotlin/ai/koog/agents/mcp/McpToolRegistryProvider.kt:104 — `HttpClient {` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience agents/agents-mcp/src/commonMain/kotlin/ai/koog/agents/mcp/McpToolRegistryProvider.kt:125 — `HttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:398 — `HttpClient.newHttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience koog-ktor/src/commonMain/kotlin/ai/koog/ktor/KoogAgentsConfig.kt:509 — `HttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience koog-ktor/src/commonMain/kotlin/ai/koog/ktor/KoogAgentsConfig.kt:593 — `HttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience koog-ktor/src/commonMain/kotlin/ai/koog/ktor/KoogAgentsConfig.kt:651 — `HttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience koog-ktor/src/commonMain/kotlin/ai/koog/ktor/KoogAgentsConfig.kt:735 — `HttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience koog-ktor/src/commonMain/kotlin/ai/koog/ktor/KoogAgentsConfig.kt:794 — `HttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience koog-ktor/src/commonMain/kotlin/ai/koog/ktor/KoogAgentsConfig.kt:847 — `HttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience koog-ktor/src/commonMain/kotlin/ai/koog/ktor/KoogAgentsConfig.kt:899 — `HttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D3 · God Classes · FileTooLong · ×10
  • FileTooLong: models/OpenAIResponsesAPI.kt prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/models/OpenAIResponsesAPI.kt — FileTooLong — 1061 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 561 over it, 2.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: openai/OpenAILLMClient.kt prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt — FileTooLong — 715 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: OpenAILLMClient (107-1088). The bar is 500 significant lines; this is 215 over it, 1.43× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: openai/OpenAIModels.kt prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIModels.kt — FileTooLong — 672 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 172 over it, 1.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: pipeline/AIAgentPipelineImpl.kt agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt — FileTooLong — 605 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: AIAgentPipelineImpl (59-987). The bar is 500 significant lines; this is 105 over it, 1.21× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: feature/OpenTelemetry.kt agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/feature/OpenTelemetry.kt — FileTooLong — 597 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: OpenTelemetry (62-945). The bar is 500 significant lines; this is 97 over it, 1.19× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: openrouter/OpenRouterModels.kt prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterModels.kt — FileTooLong — 584 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 84 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: google/GoogleLLMClient.kt prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt — FileTooLong — 546 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: GoogleLLMClient (96-929). The bar is 500 significant lines; this is 46 over it, 1.09× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: converse/BedrockConverseConverters.kt prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt — FileTooLong — 529 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 29 over it, 1.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: anthropic/AnthropicLLMClient.kt prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt — FileTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: AnthropicLLMClient (95-854). The bar is 500 significant lines; this is 28 over it, 1.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: bedrock/BedrockLLMClient.kt prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/BedrockLLMClient.kt — FileTooLong — 520 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: BedrockLLMClient (135-870). The bar is 500 significant lines; this is 20 over it, 1.04× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×10
  • Duplicated block (13 lines × 2) a2a/a2a-server/src/commonMain/kotlin/ai/koog/a2a/server/A2AServer.kt:404 — a2a/a2a-server/src/commonMain/kotlin/ai/koog/a2a/server/A2AServer.kt:404-416 | a2a/a2a-server/src/commonMain/kotlin/ai/koog/a2a/server/A2AServer.kt:546-558 — both copies are in the same file, so extract the 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 `a2a/a2a-server/src/commonMain/kotlin/ai/koog/a2a/server/A2AServer.kt:404` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:429 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:429-441 | agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:209-221 — before extracting anything, compare `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt` and `agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:429` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:488 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:488-500 | agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:267-279 — before extracting anything, compare `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt` and `agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:488` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/JdbcChatHistoryProvider.kt:127 — agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/JdbcChatHistoryProvider.kt:127-139 | agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence/jdbc/JdbcPersistenceStorageProvider.kt:193-205 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) http-client/http-client-okhttp/src/main/kotlin/ai/koog/http/client/okhttp/OkHttpKoogHttpClient.kt:127 — http-client/http-client-okhttp/src/main/kotlin/ai/koog/http/client/okhttp/OkHttpKoogHttpClient.kt:127-139 | http-client/http-client-okhttp/src/main/kotlin/ai/koog/http/client/okhttp/OkHttpKoogHttpClient.kt:234-246 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt:315 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt:315-327 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/modelfamilies/anthropic/BedrockAnthropicClaudeSerialization.kt:297-309 — 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 `prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt:315` 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, `prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/modelfamilies/anthropic/BedrockAnthropicClaudeSerialization.kt:294` calls `tryEmitPendingToolCall` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt:312` 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) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicBasicJsonSchemaGenerator.kt:29 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicBasicJsonSchemaGenerator.kt:29-41 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/structure/OpenAIBasicJsonSchemaGenerator.kt:28-40 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:803 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:803-818 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/modelfamilies/anthropic/BedrockAnthropicClaudeSerialization.kt:118-130 — 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 `prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:803` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/DocumentWithMetadata.kt:42 — koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/DocumentWithMetadata.kt:42-54 | koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/DocumentWithMetadata.kt:42-54 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/DocumentWithMetadata.kt` and `koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/DocumentWithMetadata.kt` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:33 — examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:33-45 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/AcpTerminalClient.kt:33-45 — before extracting anything, compare `examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt` and `examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/AcpTerminalClient.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 130 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×9
  • Duplicated block (14 lines × 2) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt:112 — agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt:112-125 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt:162-175 — both copies are in the same file, so extract the 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 `agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt:112` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/FunctionalAIAgent.kt:82 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/FunctionalAIAgent.kt:82-95 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/planner/PlannerAIAgent.kt:79-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (14 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:452 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:452-465 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:510-523 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:452` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:467 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:467-480 | agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:246-259 — before extracting anything, compare `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt` and `agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:467` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:525 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:525-538 | agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:304-317 — before extracting anything, compare `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt` and `agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:525` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:370 — agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:370-383 | agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:426-439 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:370` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:231 — agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:231-244 | agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:289-302 — both copies are in the same file, so extract the 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 `agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:231` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:141 — http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:141-154 | http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:264-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:158 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:158-171 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:157-170 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:158` 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.
D3 · God Classes · MethodTooLong · ×7
  • MethodTooLong: Feature.installCommon agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/feature/OpenTelemetry.kt:289 — MethodTooLong — installCommon runs 322 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 222 over it, 3.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PersistenceKt.runBlockingOnStrategy agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:56 — MethodTooLong — runBlockingOnStrategy runs 278 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 178 over it, 2.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Feature.install agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:113 — MethodTooLong — install runs 264 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 164 over it, 2.64× 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: Feature.installCommon agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:178 — MethodTooLong — installCommon runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Feature.install agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/feature/OpenTelemetry.kt:82 — MethodTooLong — install runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GenericAgentEnvironment.processToolCall agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/environment/GenericAgentEnvironment.kt:53 — MethodTooLong — processToolCall runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AnthropicLLMClient.executeStreaming prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt:182 — MethodTooLong — executeStreaming runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×7
  • Duplicated block (12 lines × 2) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/counterMetricEvents.kt:21 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/counterMetricEvents.kt:21-32 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/counterMetricEvents.kt:43-54 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/counterMetricEvents.kt:21` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:188 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:188-199 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:186-197 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:188` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:112 — koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:112-123 | koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:112-123 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt` and `koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 134 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatHistoryProvider.kt:108 — koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatHistoryProvider.kt:108-119 | koog-spring-ai/koog-spring-ai-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatHistoryProvider.kt:108-119 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatHistoryProvider.kt` and `koog-spring-ai/koog-spring-ai-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatHistoryProvider.kt` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt:97 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt:97-108 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt:97-108 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/feature/OpenTelemetry.kt:556 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/feature/OpenTelemetry.kt:556-567 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/feature/OpenTelemetry.kt:633-644 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:82 — examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:82-93 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/AcpTerminalClient.kt:82-93 — before extracting anything, compare `examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt` and `examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/AcpTerminalClient.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 130 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×7
  • Swallowed exception (caught, then discarded) agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:503 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/providers/file/FilePersistenceStorageProvider.kt:72 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:362 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:565 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/feature/OpenTelemetry.kt:801 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:574 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/dsl/extension/AIAgentEdges.kt:106 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D3 · God Classes · ClassTooLong · ×6
  • ClassTooLong: OpenAILLMClient prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:107 — 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: AIAgentPipelineImpl agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:59 — ClassTooLong — 552 significant lines (blank, comment-only and punctuation-only lines excluded), 57 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: OpenTelemetry agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/feature/OpenTelemetry.kt:62 — ClassTooLong — 543 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 143 over it, 1.36× 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: GoogleLLMClient prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:96 — ClassTooLong — 469 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 69 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.
  • ClassTooLong: AnthropicLLMClient prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt:95 — ClassTooLong — 459 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 59 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: BedrockLLMClient prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/BedrockLLMClient.kt:135 — ClassTooLong — 443 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 43 over it, 1.11× 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×6
  • Duplicated block (11 lines × 2) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/histogramMetricEvents.kt:61 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/histogramMetricEvents.kt:61-71 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/histogramMetricEvents.kt:103-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/histogramMetricEvents.kt:61` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:61 — http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:61-71 | http-client/http-client-okhttp/src/main/kotlin/ai/koog/http/client/okhttp/OkHttpKoogHttpClient.kt:62-72 — 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 `http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekLLMClient.kt:196 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekLLMClient.kt:196-206 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAILLMClient.kt:184-194 — 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 `prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekLLMClient.kt:196` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekLLMClient.kt:209` calls `isNotBlank`, `emitReasoningDelta` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAILLMClient.kt:196` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:122 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:122-132 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:121-131 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt:120 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt:120-130 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt:120-130 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) agents/agents-features/agents-features-chat-memory-sql/src/jvmMain/kotlin/ai/koog/agents/features/chatmemory/sql/H2ChatHistoryProvider.kt:72 — agents/agents-features/agents-features-chat-memory-sql/src/jvmMain/kotlin/ai/koog/agents/features/chatmemory/sql/H2ChatHistoryProvider.kt:72-82 | agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/H2PersistencyStorageProvider.kt:65-75 — 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 `agents/agents-features/agents-features-chat-memory-sql/src/jvmMain/kotlin/ai/koog/agents/features/chatmemory/sql/H2ChatHistoryProvider.kt:72` 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 (10 lines × 2) · ×6
  • Duplicated block (10 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:315 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:315-324 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:346-355 — both copies are in the same file, so extract the 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 `prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:315` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/MultiLLMPromptExecutor.kt:187 — prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/MultiLLMPromptExecutor.kt:187-196 | prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/RoutingLLMPromptExecutor.kt:166-175 — 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 `prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/MultiLLMPromptExecutor.kt:187` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 2) agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/JdbcChatHistoryProvider.kt:141 — agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/JdbcChatHistoryProvider.kt:141-150 | agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence/jdbc/JdbcPersistenceStorageProvider.kt:219-228 — 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) http-client/http-client-spring-webclient/src/main/kotlin/ai/koog/http/client/spring/SpringWebClientKoogHttpClient.kt:105 — http-client/http-client-spring-webclient/src/main/kotlin/ai/koog/http/client/spring/SpringWebClientKoogHttpClient.kt:105-114 | http-client/http-client-spring-webclient/src/main/kotlin/ai/koog/http/client/spring/SpringWebClientKoogHttpClient.kt:160-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `http-client/http-client-spring-webclient/src/main/kotlin/ai/koog/http/client/spring/SpringWebClientKoogHttpClient.kt:105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/weather/OpenMeteoClient.kt:34 — examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/weather/OpenMeteoClient.kt:34-43 | examples/trip-planning-example/src/main/kotlin/ai/koog/agents/examples/tripplanning/api/OpenMeteoClient.kt:34-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:110 — examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:110-119 | examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/knowledgebase/KnowledgeBaseService.java:30-39 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D3 · God Classes · TooManyMethods · ×5
  • TooManyMethods: AIAgentPipelineImpl agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:59 — TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. Most of these members implement pipeline.AIAgentPipelineAPI (43 of 54 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: AIAgentPipeline agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:62 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. Most of these members implement pipeline.AIAgentPipelineAPI (43 of 44 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: EventHandlerConfigCommon agents/agents-features/agents-features-event-handler/src/commonMain/kotlin/ai/koog/agents/features/eventHandler/feature/EventHandlerConfigCommon.kt:31 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× 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: AIAgentLLMWriteSessionCommon agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/session/AIAgentLLMWriteSessionCommon.kt:44 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AIAgentFunctionalContextBaseCommon agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/context/AIAgentFunctionalContextBaseCommon.kt:53 — TooManyMethods — 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.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×5
  • Edited copy of a member (12 corresponding lines) http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:120 — http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:120-131 | http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:140-159 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:161 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:161-172 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:250-263 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgentBuilder.kt:50 — agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgentBuilder.kt:50-61 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilderCommon.kt:60-75 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgentBuilder.kt:18 — agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgentBuilder.kt:18-29 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilderCommon.kt:86-101 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/subgraphwithtask/ProjectGeneratorTools.kt:31 — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/subgraphwithtask/ProjectGeneratorTools.kt:31-44 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/subgraphwithtask/ProjectGeneratorTools.kt:159-170 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×5
  • Duplicated block (9 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:230 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:230-238 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:262-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. Read the line range as the matched WINDOW rather than a finished unit: at `prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:230` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekLLMClient.kt:205 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekLLMClient.kt:205-213 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:302-310 — 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 `prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekLLMClient.kt:205` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) rag/rag-base/src/jvmMain/kotlin/ai/koog/rag/base/files/JVMFileSystemProvider.kt:402 — rag/rag-base/src/jvmMain/kotlin/ai/koog/rag/base/files/JVMFileSystemProvider.kt:402-410 | rag/rag-base/src/jvmMain/kotlin/ai/koog/rag/base/files/JVMFileSystemProvider.kt:439-447 — both copies are in the same file, so extract the 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 `rag/rag-base/src/jvmMain/kotlin/ai/koog/rag/base/files/JVMFileSystemProvider.kt:402` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/utils/ResultUtils.kt:12 — a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/utils/ResultUtils.kt:12-20 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/utils/ResultUtils.kt:8-16 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:187 — koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:187-195 | koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:187-195 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt` and `koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 134 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.
D35 · Change Coupling · Change coupling · ×4
  • Change coupling: Tracing.kt ↔ traceMessageFormat.kt agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:1 — `agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt` and `agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/writer/traceMessageFormat.kt` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `c5e45950` fix(agents): KG-844. Add missing LLMCallFailedEvent agent remote even…; `6d05aae3` KG-480. Return JSON element for input and output in Agent events; `da61ef4d` KG-437 Use structured ModelInfo instead of 'provider:model' string (#… — run `git show` on any of them.
  • Change coupling: AnthropicModels.kt ↔ BedrockModels.kt prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicModels.kt:1 — `prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicModels.kt` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/BedrockModels.kt` change together 61% of the time (11 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `46e944cd` fix(agents): Add newest models to all LLM providers (#2230); `e4e9e407` feat: Add support for Anthropic Claude Fable 5 model (#2130); `7a8e8faa` feat: add Opus 4.7 profile (#1861) — run `git show` on any of them.
  • Change coupling: ContextualPromptExecutor.kt ↔ AIAgentPipeline.kt agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/ContextualPromptExecutor.kt:1 — `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/ContextualPromptExecutor.kt` and `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `42e78b26` KG-178. Add execution info in AIAgentPipeline; `d400f50b` Creating correlation between LLMCall events (#1054) (at that commit the file was still `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/PromptExecutorProxy.kt`); `d30268be` JBAI-14524. Rename sessionId to runId (at that commit the files were still `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/PromptExecutorProxy.kt` and `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt`) — run `git show` on any of them.
  • Change coupling: OllamaClient.kt ↔ OllamaConverters.kt prompt/prompt-executor/prompt-executor-clients/prompt-executor-ollama-client/src/commonMain/kotlin/ai/koog/prompt/executor/ollama/client/OllamaClient.kt:1 — `prompt/prompt-executor/prompt-executor-clients/prompt-executor-ollama-client/src/commonMain/kotlin/ai/koog/prompt/executor/ollama/client/OllamaClient.kt` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-ollama-client/src/commonMain/kotlin/ai/koog/prompt/executor/ollama/client/dto/OllamaConverters.kt` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `3d1fd3d3` Add extension point for custom tool schemas (#1158); `f83d41ac` Allow adjusting context window sizes for Ollama dynamically (#883); `dfae0388` [prompt] Improve attachments (former media content) support in prompt… — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×4
  • Edited copy of a member (18 corresponding lines) http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:58 — http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:58-75 | http-client/http-client-okhttp/src/main/kotlin/ai/koog/http/client/okhttp/OkHttpKoogHttpClient.kt:59-76 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:833 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:833-850 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:868-889 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/weather/WeatherTools.kt:334 — examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/weather/WeatherTools.kt:334-353 | examples/trip-planning-example/src/main/kotlin/ai/koog/agents/examples/tripplanning/api/OpenMeteoClient.kt:157-174 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/screens/agentdemo/AgentDemoScreen.kt:419 — examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/screens/agentdemo/AgentDemoScreen.kt:419-438 | examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/screens/agentdemo/AgentDemoScreen.kt:442-459 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×4
  • Edited copy of a member (9 corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/MetricFactory.kt:23 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/MetricFactory.kt:23-32 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/MetricFactory.kt:70-78 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentFactory.kt:76 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentFactory.kt:76-84 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentServiceFactory.kt:157-167 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) examples/devoxx-belgium-2025/src/main/kotlin/ai/koog/spring/sandwich/tools/RollbackTools.kt:11 — examples/devoxx-belgium-2025/src/main/kotlin/ai/koog/spring/sandwich/tools/RollbackTools.kt:11-19 | examples/devoxx-belgium-2025/src/main/kotlin/ai/koog/spring/sandwich/tools/UserTools.kt:27-36 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) examples/spring-ai-kotlin/src/main/kotlin/com/example/spring_ai_kotlin/controller/ChatController.kt:24 — examples/spring-ai-kotlin/src/main/kotlin/com/example/spring_ai_kotlin/controller/ChatController.kt:24-34 | examples/spring-boot-kotlin/src/main/kotlin/com/example/agent/controller/ChatController.kt:17-25 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×4
  • Edited copy of a member (11 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/dsl/extension/AIAgentNodes.kt:320 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/dsl/extension/AIAgentNodes.kt:320-330 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/dsl/extension/AIAgentNodes.kt:347-360 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/entity/AgentEdgeBuilder.kt:194 — agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/entity/AgentEdgeBuilder.kt:194-204 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/dsl/builder/AIAgentEdgeBuilderIntermediate.kt:99-111 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/createAgentSpan.kt:106 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/createAgentSpan.kt:106-116 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/strategySpan.kt:82-92 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/PromptBuilder.kt:252 — prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/PromptBuilder.kt:252-264 | prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/ResponseMessagePartsBuilder.kt:36-46 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×4
  • Edited copy of a member (16 corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:234 — agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:234-249 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:523-539 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt:107 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt:107-125 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt:101-116 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) koog-ktor/src/commonMain/kotlin/ai/koog/ktor/KoogAgentsConfig.kt:1027 — koog-ktor/src/commonMain/kotlin/ai/koog/ktor/KoogAgentsConfig.kt:1027-1042 | koog-ktor/src/commonMain/kotlin/ai/koog/ktor/KoogAgentsConfig.kt:1050-1065 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) examples/code-agent/step-01-minimal-agent/src/main/kotlin/Main.kt:41 — examples/code-agent/step-01-minimal-agent/src/main/kotlin/Main.kt:41-56 | examples/code-agent/step-05-history/src/main/kotlin/Main.kt:71-86 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×4
  • Duplicated block (15 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt:95 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt:95-109 | koog-spring-ai/koog-spring-ai-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt:95-109 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt` and `koog-spring-ai/koog-spring-ai-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt:95` 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) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt:125 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt:125-139 | koog-spring-ai/koog-spring-ai-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt:125-139 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt` and `koog-spring-ai/koog-spring-ai-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiLLMEmbeddingProvider.kt:125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) serialization/serialization-core/src/jvmCommonMain/kotlin/ai/koog/serialization/kotlinx/KotlinxSerializer.jvmCommon.kt:16 — serialization/serialization-core/src/jvmCommonMain/kotlin/ai/koog/serialization/kotlinx/KotlinxSerializer.jvmCommon.kt:16-30 | serialization/serialization-core/src/nonJvmCommonMain/kotlin/ai/koog/serialization/kotlinx/KotlinxSerializer.nonJvmCommon.kt:14-28 — before extracting anything, compare `serialization/serialization-core/src/jvmCommonMain/kotlin/ai/koog/serialization/kotlinx/KotlinxSerializer.jvmCommon.kt` and `serialization/serialization-core/src/nonJvmCommonMain/kotlin/ai/koog/serialization/kotlinx/KotlinxSerializer.nonJvmCommon.kt` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `serialization/serialization-core/src/jvmCommonMain/kotlin/ai/koog/serialization/kotlinx/KotlinxSerializer.jvmCommon.kt:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chatmemory/ChatMemoryExample.kt:36 — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chatmemory/ChatMemoryExample.kt:36-50 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chatmemory/ChatMemoryWindowedExample.kt:38-52 — 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 `examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chatmemory/ChatMemoryExample.kt:36` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×4
  • Duplicated block (7 lines × 2) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/integration/weave/WeaveSpanAdapter.kt:97 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/integration/weave/WeaveSpanAdapter.kt:97-103 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/integration/weave/WeaveSpanAdapter.kt:125-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/integration/weave/WeaveSpanAdapter.kt:97` 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, `agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/integration/weave/WeaveSpanAdapter.kt:123` calls `applyCompletionAttributes`, `when` and `agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/integration/weave/WeaveSpanAdapter.kt:95` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:214 — agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:214-220 | agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:227-233 — both copies are in the same file, so extract the 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 `agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:214` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/MultiLLMPromptExecutor.kt:226 — prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/MultiLLMPromptExecutor.kt:226-234 | prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/RoutingLLMPromptExecutor.kt:206-212 — 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 `prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/MultiLLMPromptExecutor.kt:226` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/MultiLLMPromptExecutor.kt:261 — prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/MultiLLMPromptExecutor.kt:261-267 | prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/RoutingLLMPromptExecutor.kt:240-249 — 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 `prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/MultiLLMPromptExecutor.kt:261` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D5 · Coupling · Unstable project koog · ×4
  • Unstable project koog:agents:agents-features:agents-features-longterm-memory — koog:agents:agents-features:agents-features-longterm-memory has instability 0.83 with 1 dependents.
  • Unstable project koog:agents:agents-features:agents-features-opentelemetry — koog:agents:agents-features:agents-features-opentelemetry has instability 0.83 with 1 dependents.
  • Unstable project koog:integration-tests — koog:integration-tests has instability 0.96 with 1 dependents.
  • Unstable project koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-bedrock-client — koog:prompt:prompt-executor:prompt-executor-clients:prompt-executor-bedrock-client has instability 0.88 with 1 dependents.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×3
  • Edited copy of a member (19 corresponding lines) agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/augmentation/SystemPromptAugmenter.kt:81 — agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/augmentation/SystemPromptAugmenter.kt:81-99 | agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/augmentation/UserPromptAugmenter.kt:81-99 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/ext/agent/AIAgentSubgraphExt.kt:275 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/ext/agent/AIAgentSubgraphExt.kt:275-295 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/ext/agent/AIAgentSubgraphExt.kt:365-383 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/MySQLJdbcChatHistorySchemaMigrator.kt:21 — agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/MySQLJdbcChatHistorySchemaMigrator.kt:21-39 | agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence/jdbc/MySQLJdbcPersistenceSchemaMigrator.kt:21-43 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×3
  • Edited copy of a member (22 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:310 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:310-331 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:341-362 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/JdbcChatHistoryProvider.kt:83 — agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/JdbcChatHistoryProvider.kt:83-104 | agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence/jdbc/JdbcPersistenceStorageProvider.kt:136-158 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/modelfamilies/amazon/BedrockAmazonNovaSerialization.kt:95 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/modelfamilies/amazon/BedrockAmazonNovaSerialization.kt:95-116 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/modelfamilies/amazon/BedrockAmazonNovaSerialization.kt:119-141 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×3
  • Edited copy of a member (23 corresponding lines) koog-ktor/src/commonMain/kotlin/ai/koog/ktor/utils/LLMModelParser.kt:148 — koog-ktor/src/commonMain/kotlin/ai/koog/ktor/utils/LLMModelParser.kt:148-170 | koog-ktor/src/commonMain/kotlin/ai/koog/ktor/utils/LLMModelParser.kt:190-212 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:157 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:157-180 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:413-435 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) examples/trip-planning-example/src/main/kotlin/ai/koog/agents/examples/tripplanning/tools/WeatherTools.kt:177 — examples/trip-planning-example/src/main/kotlin/ai/koog/agents/examples/tripplanning/tools/WeatherTools.kt:177-202 | examples/trip-planning-example/src/main/kotlin/ai/koog/agents/examples/tripplanning/tools/WeatherTools.kt:204-226 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×3
  • Edited copy of a member (20 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-ollama-client/src/commonMain/kotlin/ai/koog/prompt/executor/ollama/client/OllamaClient.kt:430 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-ollama-client/src/commonMain/kotlin/ai/koog/prompt/executor/ollama/client/OllamaClient.kt:430-449 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-ollama-client/src/commonMain/kotlin/ai/koog/prompt/executor/ollama/client/OllamaClient.kt:520-541 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) koog-ktor/src/commonMain/kotlin/ai/koog/ktor/utils/LLMModelParser.kt:88 — koog-ktor/src/commonMain/kotlin/ai/koog/ktor/utils/LLMModelParser.kt:88-107 | koog-ktor/src/commonMain/kotlin/ai/koog/ktor/utils/LLMModelParser.kt:109-128 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/screens/agentdemo/AgentDemoScreen.kt:165 — examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/screens/agentdemo/AgentDemoScreen.kt:165-184 | examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/screens/agentdemo/AgentDemoScreen.kt:187-206 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×3
  • Edited copy of a member (14 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/BedrockLLMClient.kt:244 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/BedrockLLMClient.kt:244-257 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/BedrockLLMClient.kt:364-377 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/dsl/builder/AIAgentParallelNodesMergeContext.kt:65 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/dsl/builder/AIAgentParallelNodesMergeContext.kt:65-78 | agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/DummyAIAgentContext.kt:140-153 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) examples/acp-agent/src/main/kotlin/ai/coding/agent/KoogAgentSupport.kt:167 — examples/acp-agent/src/main/kotlin/ai/coding/agent/KoogAgentSupport.kt:167-182 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/KoogAgentSupport.kt:154-167 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×3
  • Edited copy of a member (8 corresponding lines) agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/entity/AIAgentNode.kt:206 — agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/entity/AIAgentNode.kt:206-213 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/entity/AIAgentNode.kt:428-438 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/context/AIAgentFunctionalContextBaseCommon.kt:441 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/context/AIAgentFunctionalContextBaseCommon.kt:441-448 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/ext/llm/choice/AIAgentNodesWithChoiceExt.kt:19-29 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:98 — examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:98-105 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/AcpTerminalClient.kt:98-105 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×3
  • Edited copy of a member (13 corresponding lines) agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/entity/AgentEdgeBuilder.kt:142 — agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/entity/AgentEdgeBuilder.kt:142-154 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/dsl/builder/AIAgentEdgeBuilderIntermediate.kt:54-68 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/ExposedPersistencyStorageProvider.kt:104 — agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/ExposedPersistencyStorageProvider.kt:104-120 | agents/agents-features/agents-features-chat-memory-sql/src/jvmMain/kotlin/ai/koog/agents/features/chatmemory/sql/ExposedChatHistoryProvider.kt:60-72 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseParams.kt:101 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseParams.kt:101-115 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleParams.kt:83-95 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×3
  • Edited copy of a member (10 corresponding lines) prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/MultiLLMPromptExecutor.kt:151 — prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/MultiLLMPromptExecutor.kt:151-160 | prompt/prompt-executor/prompt-executor-model/src/commonMain/kotlin/ai/koog/prompt/executor/llms/RoutingLLMPromptExecutor.kt:129-138 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) examples/devoxx-belgium-2025/src/main/kotlin/ai/koog/spring/sandwich/tools/OrderTools.kt:40 — examples/devoxx-belgium-2025/src/main/kotlin/ai/koog/spring/sandwich/tools/OrderTools.kt:40-49 | examples/devoxx-belgium-2025/src/main/kotlin/ai/koog/spring/sandwich/tools/RollbackTools.kt:53-67 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) examples/acp-agent/src/main/kotlin/ai/coding/agent/KoogAgentSupport.kt:185 — examples/acp-agent/src/main/kotlin/ai/coding/agent/KoogAgentSupport.kt:185-195 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/KoogAgentSupport.kt:170-179 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×3
  • Edited copy of a member (7 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentFactory.kt:187 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentFactory.kt:187-195 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentServiceFactory.kt:125-131 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/providers/file/FilePersistenceStorageProvider.kt:33 — agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/providers/file/FilePersistenceStorageProvider.kt:33-39 | rag/rag-vector/src/commonMain/kotlin/ai/koog/rag/vector/backend/FileVectorStorageBackend.kt:38-44 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/providers/file/FilePersistenceStorageProvider.kt:44 — agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/providers/file/FilePersistenceStorageProvider.kt:44-51 | rag/rag-vector/src/commonMain/kotlin/ai/koog/rag/vector/backend/FileVectorStorageBackend.kt:49-55 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×3
  • Edited copy of a member (4 corresponding lines) koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:69 — koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:69-72 | koog-spring-ai/koog-spring-ai-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:69-72 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:137 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:137-140 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:137-140 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:149 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:149-152 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:148-151 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×3
  • Edited copy of a member (6 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:304 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:304-309 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPlannerPipelineImpl.kt:58-63 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:397 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:397-402 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPlannerPipelineImpl.kt:127-132 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/ContentPartsBuilderBase.kt:68 — prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/ContentPartsBuilderBase.kt:68-73 | prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/ResponseMessagePartsBuilder.kt:14-19 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (56 lines × 2) · ×3
  • Duplicated block (56 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:194 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:194-249 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:193-248 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:194` 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 (56 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiEmbeddingAutoConfiguration.kt:66 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiEmbeddingAutoConfiguration.kt:66-121 | koog-spring-ai/koog-spring-ai-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiEmbeddingAutoConfiguration.kt:66-121 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiEmbeddingAutoConfiguration.kt` and `koog-spring-ai/koog-spring-ai-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiEmbeddingAutoConfiguration.kt` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiEmbeddingAutoConfiguration.kt:66` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (56 lines × 2) examples/code-agent/step-04-add-subagent/src/main/kotlin/FindAgent.kt:46 — examples/code-agent/step-04-add-subagent/src/main/kotlin/FindAgent.kt:46-101 | examples/code-agent/step-05-history/src/main/kotlin/FindAgent.kt:46-101 — before extracting anything, compare `examples/code-agent/step-04-add-subagent/src/main/kotlin/FindAgent.kt` and `examples/code-agent/step-05-history/src/main/kotlin/FindAgent.kt` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×3
  • Duplicated block (35 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:410 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:410-444 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:407-441 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (35 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/conditions/OnPropertyNotEmptyCondition.kt:33 — koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/conditions/OnPropertyNotEmptyCondition.kt:33-67 | koog-spring-ai/koog-spring-ai-common/src/main/kotlin/ai/koog/spring/ai/common/conditions/OnPropertyNotEmptyCondition.kt:33-67 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/conditions/OnPropertyNotEmptyCondition.kt` and `koog-spring-ai/koog-spring-ai-common/src/main/kotlin/ai/koog/spring/ai/common/conditions/OnPropertyNotEmptyCondition.kt` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/conditions/OnPropertyNotEmptyCondition.kt:33` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (35 lines × 2) examples/javaone-2026/src/main/java/org/example/koog/java/endpoints/ApiController.java:1 — examples/javaone-2026/src/main/java/org/example/koog/java/endpoints/ApiController.java:1-35 | examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/endpoints/ApiController.java:1-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples/javaone-2026/src/main/java/org/example/koog/java/endpoints/ApiController.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×3
  • Duplicated block (24 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatHistoryProvider.kt:75 — koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatHistoryProvider.kt:75-98 | koog-spring-ai/koog-spring-ai-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatHistoryProvider.kt:75-98 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatHistoryProvider.kt` and `koog-spring-ai/koog-spring-ai-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatHistoryProvider.kt` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (24 lines × 2) agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/AIAgentBuilder.kt:13 — agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/AIAgentBuilder.kt:13-58 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/AIAgentServiceBuilder.kt:11-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (24 lines × 2) examples/javaone-2026/src/main/java/org/example/koog/java/tools/AccountWriteTools.java:12 — examples/javaone-2026/src/main/java/org/example/koog/java/tools/AccountWriteTools.java:12-35 | examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/tools/AccountWriteUtils.java:12-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `Transaction` names `org.example.koog.java.structs.Transaction` in one and `org.example.koog.spring.java.structs.Transaction` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×3
  • Duplicated block (21 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:172 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:172-192 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:172-192 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt:112 — examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt:112-132 | examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/weather/WeatherAgentProvider.kt:120-140 — before extracting anything, compare `examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt` and `examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/weather/WeatherAgentProvider.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt:112` 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 (21 lines × 2) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/AdvancedWithStandardSchema.kt:40 — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/AdvancedWithStandardSchema.kt:40-60 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/AdvancedWithStandardSchemaAndTools.kt:40-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×3
  • Duplicated block (20 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:222 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:222-241 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:219-238 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:29 — koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:29-48 | koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:29-48 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt` and `koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 134 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chess/Chess.kt:17 — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chess/Chess.kt:17-36 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chess/choice/ChessChoiceExecutor.kt:27-46 — 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 (5 lines × 2) · ×3
  • Duplicated block (5 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:149 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:149-153 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:149-153 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:295 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:295-299 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:294-298 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:295` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:118 — examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:118-122 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/AcpTerminalClient.kt:118-122 — before extracting anything, compare `examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt` and `examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/AcpTerminalClient.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D6 · Cohesion (LCOM4) · Low cohesion · ×3
  • Low cohesion: EventHandlerConfigCommon (LCOM4 22) agents/agents-features/agents-features-event-handler/src/commonMain/kotlin/ai/koog/agents/features/eventHandler/feature/EventHandlerConfigCommon.kt:31 — EventHandlerConfigCommon's methods fall into 22 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 22 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: TerminalClientSessionOperations (LCOM4 5) examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:25 — TerminalClientSessionOperations's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TerminalClientSessionOperations (LCOM4 5) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/AcpTerminalClient.kt:25 — TerminalClientSessionOperations's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D2 · Cognitive Complexity · GoogleLLMClient.toGoogleContent (cognitive 25) · ×2
  • GoogleLLMClient.toGoogleContent (cognitive 25) prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:417 — GoogleLLMClient.toGoogleContent has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 8 (20 pts), if/else 5 (nesting depth added 12). 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. This shape REPEATS in the file: one other method here (GoogleLLMClient.toGoogleContent) 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.
  • GoogleLLMClient.toGoogleContent (cognitive 25) prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:485 — GoogleLLMClient.toGoogleContent has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 8 (20 pts), if/else 5 (nesting depth added 12). 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. This shape REPEATS in the file: one other method here (GoogleLLMClient.toGoogleContent) 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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×2
  • Edited copy of a member (38 corresponding lines) http-client/http-client-spring-webclient/src/main/kotlin/ai/koog/http/client/spring/SpringWebClientKoogHttpClient.kt:105 — http-client/http-client-spring-webclient/src/main/kotlin/ai/koog/http/client/spring/SpringWebClientKoogHttpClient.kt:105-152 | http-client/http-client-spring-webclient/src/main/kotlin/ai/koog/http/client/spring/SpringWebClientKoogHttpClient.kt:160-197 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/mcp/GoogleMapsMcpClient.kt:21 — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/mcp/GoogleMapsMcpClient.kt:21-67 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/mcp/IntellijMcpClient.kt:19-56 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×2
  • Edited copy of a member (24 corresponding lines) agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/ExposedPersistencyStorageProvider.kt:123 — agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/ExposedPersistencyStorageProvider.kt:123-146 | agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/ExposedPersistencyStorageProvider.kt:164-194 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) rag/rag-base/src/jvmMain/kotlin/ai/koog/rag/base/files/JVMFileSystemProvider.kt:398 — rag/rag-base/src/jvmMain/kotlin/ai/koog/rag/base/files/JVMFileSystemProvider.kt:398-421 | rag/rag-base/src/jvmMain/kotlin/ai/koog/rag/base/files/JVMFileSystemProvider.kt:435-462 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 15+ corresponding lines) agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/JdbcChatHistoryProvider.kt:106 — agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/JdbcChatHistoryProvider.kt:106-124 | agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/JdbcChatHistoryProvider.kt:152-166 | agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence/jdbc/JdbcPersistenceStorageProvider.kt:230-245 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/executeToolSpan.kt:148 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/executeToolSpan.kt:148-163 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/nodeExecuteSpan.kt:93-107 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/subgraphExecuteSpan.kt:93-107 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×2
  • Edited copy of a member (40 corresponding lines) agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/H2PersistencyStorageProvider.kt:117 — agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/H2PersistencyStorageProvider.kt:117-156 | agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/PostgresPersistencyStorageProvider.kt:118-157 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (40 corresponding lines) examples/simple-examples-java/src/main/java/ai/koog/agents/example/chatmemory/ChatMemoryJdbcExample.java:46 — examples/simple-examples-java/src/main/java/ai/koog/agents/example/chatmemory/ChatMemoryJdbcExample.java:46-95 | examples/simple-examples-java/src/main/java/ai/koog/agents/example/snapshot/PersistenceJdbcExample.java:48-87 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (94 lines × 2) · ×2
  • Duplicated block (94 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:306 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:306-399 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:303-396 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (94 lines × 2) examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:148 — examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:148-241 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/AcpTerminalClient.kt:148-241 — before extracting anything, compare `examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt` and `examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/AcpTerminalClient.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:148` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×2
  • Duplicated block (45 lines × 2) agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence/jdbc/H2JdbcPersistenceSchemaMigrator.kt:21 — agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence/jdbc/H2JdbcPersistenceSchemaMigrator.kt:21-65 | agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence/jdbc/PostgresJdbcPersistenceSchemaMigrator.kt:21-65 — before extracting anything, compare `agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence/jdbc/H2JdbcPersistenceSchemaMigrator.kt` and `agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence/jdbc/PostgresJdbcPersistenceSchemaMigrator.kt` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (45 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:129 — koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:129-173 | koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:129-173 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt` and `koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 134 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×2
  • Duplicated block (37 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:255 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:255-291 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:252-288 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:255` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (37 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt:77 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt:77-113 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/structure/OpenAIStandardJsonSchemaGenerator.kt:113-149 — before extracting anything, compare `prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/structure/OpenAIStandardJsonSchemaGenerator.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×2
  • Duplicated block (33 lines × 2) agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/H2JdbcChatHistorySchemaMigrator.kt:21 — agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/H2JdbcChatHistorySchemaMigrator.kt:21-53 | agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/PostgresJdbcChatHistorySchemaMigrator.kt:21-53 — before extracting anything, compare `agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/H2JdbcChatHistorySchemaMigrator.kt` and `agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory/jdbc/PostgresJdbcChatHistorySchemaMigrator.kt` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (33 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:138 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:138-170 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:138-170 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×2
  • Duplicated block (32 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:254 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:254-285 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:253-284 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiLLMClient.kt:254` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (32 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:54 — koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:54-85 | koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:54-85 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt` and `koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 134 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×2
  • Duplicated block (26 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/FunctionalAIAgent.kt:111 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/FunctionalAIAgent.kt:111-136 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/planner/PlannerAIAgent.kt:108-133 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/FunctionalAIAgent.kt:111` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (26 lines × 2) examples/acp-agent/src/main/kotlin/ai/coding/agent/KoogAgentSupport.kt:117 — examples/acp-agent/src/main/kotlin/ai/coding/agent/KoogAgentSupport.kt:117-142 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/KoogAgentSupport.kt:108-133 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×2
  • Duplicated block (23 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:102 — koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:102-124 | koog-spring-ai/koog-spring-ai-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:102-124 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt` and `koog-spring-ai/koog-spring-ai-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (23 lines × 2) agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/AIAgentService.kt:54 — agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/AIAgentService.kt:54-148 | agents/agents-core/src/nonJvmCommonMain/kotlin/ai/koog/agents/core/agent/AIAgentService.kt:36-58 — before extracting anything, compare `agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/AIAgentService.kt` and `agents/agents-core/src/nonJvmCommonMain/kotlin/ai/koog/agents/core/agent/AIAgentService.kt` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/AIAgentService.kt:54` 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 (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatModelProviderDetector.kt:52 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatModelProviderDetector.kt:52-70 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatModelProviderDetector.kt:52-70 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatModelProviderDetector.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatModelProviderDetector.kt` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:218 — agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:218-236 | agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:352-370 — both copies are in the same file, so extract the 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 `agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:218` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `tool` to `Tool<Args, *>` in one and `Tool<Args` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:504 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:504-521 | agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:283-300 — before extracting anything, compare `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt` and `agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:504` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) agents/agents-tools/src/jvmCommonMain/kotlin/ai/koog/agents/core/tools/schema/SchemaGenerator.jvmCommon.kt:141 — agents/agents-tools/src/jvmCommonMain/kotlin/ai/koog/agents/core/tools/schema/SchemaGenerator.jvmCommon.kt:141-158 | agents/agents-tools/src/nonJvmCommonMain/kotlin/ai/koog/agents/core/tools/schema/SchemaGenerator.nonJvmCommon.kt:33-50 — 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 `agents/agents-tools/src/jvmCommonMain/kotlin/ai/koog/agents/core/tools/schema/SchemaGenerator.jvmCommon.kt:141` 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 (16 lines × 2) · ×2
  • Duplicated block (16 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:91 — koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:91-106 | koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:91-106 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt` and `koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 134 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) examples/javaone-2026/src/main/java/org/example/koog/java/agents/examples/FunctionalAgentExample.java:16 — examples/javaone-2026/src/main/java/org/example/koog/java/agents/examples/FunctionalAgentExample.java:16-31 | examples/javaone-2026/src/main/java/org/example/koog/java/agents/examples/SimpleGraphAgentExample.java:17-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt:158 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt:158-166 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:238-246 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterParams.kt:216-224 — before extracting anything, compare `prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterParams.kt` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeLLMClient.kt:123 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeLLMClient.kt:123-131 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekLLMClient.kt:174-182 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:270-278 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:259 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:259-265 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:256-262 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-litert-client/src/androidMain/kotlin/ai/koog/prompt/executor/clients/litert/LiteRTMessageConverters.kt:251-257 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:259` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/attribute/GenAIAttributes.kt:643 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/attribute/GenAIAttributes.kt:643-649 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/attribute/GenAIAttributes.kt:652-658 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/attribute/GenAIAttributes.kt:661-667 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/attribute/GenAIAttributes.kt:641` calls `when` and `agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/attribute/GenAIAttributes.kt:649` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×2
  • Duplicated block (6 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:103 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:103-108 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:103-108 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:100 — examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:100-105 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/AcpTerminalClient.kt:100-105 — before extracting anything, compare `examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt` and `examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/AcpTerminalClient.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:100` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×2
  • Duplicated block (8 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt:555 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt:555-567 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt:628-635 — both copies are in the same file, so extract the 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) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chess/choice/ChessChoiceExecutor.kt:48 — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chess/choice/ChessChoiceExecutor.kt:48-55 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chess/choice/ChessChoiceNodes.kt:33-40 — before extracting anything, compare `examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chess/choice/ChessChoiceExecutor.kt` and `examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chess/choice/ChessChoiceNodes.kt` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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–23 lines × 2) · ×2
  • Duplicated block (21–23 lines × 2) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/AdvancedWithStandardSchema.kt:90 — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/AdvancedWithStandardSchema.kt:90-110 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/SimpleExample.kt:200-222 — 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 `examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/AdvancedWithStandardSchema.kt:90` 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 (21–23 lines × 2) examples/simple-examples-java/src/main/java/ai/koog/agents/example/chatmemory/ChatMemoryJdbcExample.java:73 — examples/simple-examples-java/src/main/java/ai/koog/agents/example/chatmemory/ChatMemoryJdbcExample.java:73-95 | examples/simple-examples-java/src/main/java/ai/koog/agents/example/snapshot/PersistenceJdbcExample.java:67-87 — 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 `examples/simple-examples-java/src/main/java/ai/koog/agents/example/chatmemory/ChatMemoryJdbcExample.java:73` 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.
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×2
  • JavaScript dependencies are not locked examples/koog-js-example/demo/package.json:12 — examples/koog-js-example/demo/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked examples/koog-js-example/package.json:5 — examples/koog-js-example/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×2
  • Recursive walk over a caller-supplied document has no depth cap prompt/prompt-structure/src/commonMain/kotlin/ai/koog/prompt/structure/json/generator/JsonSchemaGenerator.kt:184 — `countElements` is public and takes its `JsonElement` receiver from its caller, and it calls itself at line 184 with a piece of its receiver (and at line 185) — the function is not `tailrec`, so every call is a real frame — and nowhere in `countElements` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25; Android's threads are smaller). kotlinx.serialization's `parseToJsonElement` accepts nested arrays to any depth and Android's built-in `org.json` sets no limit, while Jackson 2.15+ stops at 1,000 — on a cold JVM past the point the walk fails; Gson 2.12+ and Moshi stop at 255. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (e: Exception)` around the call does not stop it, and on Android an uncaught one ends the process. Thread a depth argument through `countElements` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`.
  • Recursive walk over a caller-supplied document has no depth cap prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/util/JsonDocumentConverters.kt:38 — `JsonDocumentConverters.convertToDocument` is public and takes `element: JsonElement` from its caller, and it calls itself at line 38 with a piece of `element` (and at line 40) — the function is not `tailrec`, so every call is a real frame — and nowhere in `JsonDocumentConverters.convertToDocument` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25; Android's threads are smaller). kotlinx.serialization's `parseToJsonElement` accepts nested arrays to any depth and Android's built-in `org.json` sets no limit, while Jackson 2.15+ stops at 1,000 — on a cold JVM past the point the walk fails; Gson 2.12+ and Moshi stop at 255. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (e: Exception)` around the call does not stop it, and on Android an uncaught one ends the process. Thread a depth argument through `JsonDocumentConverters.convertToDocument` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`.
X2 · Cancellation propagation · Suspend function with a blocking request · ×2
  • Suspend function with a blocking request: get http-client/http-client-okhttp/src/main/kotlin/ai/koog/http/client/okhttp/OkHttpKoogHttpClient.kt:101 — `get` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`.
  • Suspend function with a blocking request: post http-client/http-client-okhttp/src/main/kotlin/ai/koog/http/client/okhttp/OkHttpKoogHttpClient.kt:119 — `post` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`.
X3 · Exception handling · Swallowed exception (empty catch) · ×2
  • Swallowed exception (empty catch) agents/agents-cli/src/jvmCommonMain/kotlin/ai/koog/agents/cli/transport/ProcessCliTransport.kt:122 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) a2a/a2a-server/src/commonMain/kotlin/ai/koog/a2a/server/session/SessionManager.kt:104 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D1 · Cyclomatic Complexity · process_api_links._build_navigation_map (cyclomatic 26) · ×1
  • process_api_links._build_navigation_map (cyclomatic 26) docs/hooks/process_api_links.py:46 — process_api_links._build_navigation_map has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OpenAILLMClient.convertPromptToResponsesMessages (cyclomatic 24) · ×1
  • OpenAILLMClient.convertPromptToResponsesMessages (cyclomatic 24) prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:770 — OpenAILLMClient.convertPromptToResponsesMessages has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefaultMcpToolDescriptorParser.parseParameterType (cyclomatic 23) · ×1
  • DefaultMcpToolDescriptorParser.parseParameterType (cyclomatic 23) agents/agents-mcp/src/commonMain/kotlin/ai/koog/agents/mcp/McpToolDefinitionParser.kt:64 — DefaultMcpToolDescriptorParser.parseParameterType 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 · SchemaGeneratorKt.toToolParameter (cyclomatic 23) · ×1
  • SchemaGeneratorKt.toToolParameter (cyclomatic 23) agents/agents-tools/src/commonMain/kotlin/ai/koog/agents/core/tools/schema/SchemaGenerator.kt:114 — SchemaGeneratorKt.toToolParameter has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ItemPolymorphicSerializer.selectDeserializer (cyclomatic 23) · ×1
  • ItemPolymorphicSerializer.selectDeserializer (cyclomatic 23) prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/models/OpenAIResponsesAPI.kt:2313 — ItemPolymorphicSerializer.selectDeserializer has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · JavaSdkAttributesKt.toJavaSdkAttribute (cyclomatic 20) · ×1
  • JavaSdkAttributesKt.toJavaSdkAttribute (cyclomatic 20) agents/agents-features/agents-features-opentelemetry/src/jvmCommonMain/kotlin/ai/koog/agents/features/opentelemetry/attribute/javaSdkAttributes.kt:21 — JavaSdkAttributesKt.toJavaSdkAttribute has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AnthropicLLMClient.executeStreaming (cyclomatic 20) · ×1
  • AnthropicLLMClient.executeStreaming (cyclomatic 20) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt:182 — AnthropicLLMClient.executeStreaming has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · BedrockConverseConverters.toConverseContentBlock (cyclomatic 19) · ×1
  • BedrockConverseConverters.toConverseContentBlock (cyclomatic 19) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:539 — BedrockConverseConverters.toConverseContentBlock has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (BedrockConverseConverters.toToolResultContentBlock) 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. This is NOT this file's highest cyclomatic complexity: BedrockConverseConverters.transformConverseStreamChunks (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 · BedrockConverseConverters.toToolResultContentBlock (cyclomatic 19) · ×1
  • BedrockConverseConverters.toToolResultContentBlock (cyclomatic 19) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:630 — BedrockConverseConverters.toToolResultContentBlock has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (BedrockConverseConverters.toConverseContentBlock) 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. This is NOT this file's highest cyclomatic complexity: BedrockConverseConverters.transformConverseStreamChunks (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 · EnvConfigLoaderKt.loadAgentsConfig (cyclomatic 16) · ×1
  • EnvConfigLoaderKt.loadAgentsConfig (cyclomatic 16) koog-ktor/src/commonMain/kotlin/ai/koog/ktor/utils/EnvConfigLoader.kt:18 — EnvConfigLoaderKt.loadAgentsConfig has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D2 · Cognitive Complexity · OpenAILLMClient.convertPromptToResponsesMessages (cognitive 54) · ×1
  • OpenAILLMClient.convertPromptToResponsesMessages (cognitive 54) prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:770 — OpenAILLMClient.convertPromptToResponsesMessages has cognitive complexity 54 (threshold 15). Drivers by points: match/switch 7 (27 pts), if/else 13 (26 pts), boolean chains 1 (nesting depth added 33). 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 · process_api_links._build_navigation_map (cognitive 47) · ×1
  • process_api_links._build_navigation_map (cognitive 47) docs/hooks/process_api_links.py:46 — process_api_links._build_navigation_map has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (32 pts), error handling 5 (7 pts), ternaries 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultMcpToolDescriptorParser.parseParameterType (cognitive 32) · ×1
  • DefaultMcpToolDescriptorParser.parseParameterType (cognitive 32) agents/agents-mcp/src/commonMain/kotlin/ai/koog/agents/mcp/McpToolDefinitionParser.kt:64 — DefaultMcpToolDescriptorParser.parseParameterType has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (23 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JVMDocumentProvider.convertLineSeparators (cognitive 32) · ×1
  • JVMDocumentProvider.convertLineSeparators (cognitive 32) rag/rag-base/src/jvmMain/kotlin/ai/koog/rag/base/files/JVMDocumentProvider.kt:83 — JVMDocumentProvider.convertLineSeparators has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SchemaGeneratorKt.toToolParameter (cognitive 21) · ×1
  • SchemaGeneratorKt.toToolParameter (cognitive 21) agents/agents-tools/src/commonMain/kotlin/ai/koog/agents/core/tools/schema/SchemaGenerator.kt:114 — SchemaGeneratorKt.toToolParameter has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 6 (7 pts), boolean chains 2 (nesting depth added 8). 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 · AIAgentPlanner.execute (cognitive 20) · ×1
  • AIAgentPlanner.execute (cognitive 20) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/planner/AIAgentPlanner.kt:93 — AIAgentPlanner.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SkillsDiscoveryKt.discoverSkills (cognitive 19) · ×1
  • SkillsDiscoveryKt.discoverSkills (cognitive 19) skills/src/commonMain/kotlin/ai/koog/skills/discovery/SkillsDiscovery.kt:51 — SkillsDiscoveryKt.discoverSkills has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JavaSdkAttributesKt.toJavaSdkAttribute (cognitive 19) · ×1
  • JavaSdkAttributesKt.toJavaSdkAttribute (cognitive 19) agents/agents-features/agents-features-opentelemetry/src/jvmCommonMain/kotlin/ai/koog/agents/features/opentelemetry/attribute/javaSdkAttributes.kt:21 — JavaSdkAttributesKt.toJavaSdkAttribute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1, 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 · ListDirectoryUtilKt.buildNode (cognitive 18) · ×1
  • ListDirectoryUtilKt.buildNode (cognitive 18) agents/agents-ext/src/commonMain/kotlin/ai/koog/agents/ext/tool/file/ListDirectoryUtil.kt:41 — ListDirectoryUtilKt.buildNode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LiteRTMessageConvertersKt.toLitertMessage (cognitive 17) · ×1
  • LiteRTMessageConvertersKt.toLitertMessage (cognitive 17) prompt/prompt-executor/prompt-executor-clients/prompt-executor-litert-client/src/androidMain/kotlin/ai/koog/prompt/executor/clients/litert/LiteRTMessageConverters.kt:128 — LiteRTMessageConvertersKt.toLitertMessage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (4 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SkillsDiscoveryKt.parseFrontmatter (cognitive 16) · ×1
  • SkillsDiscoveryKt.parseFrontmatter (cognitive 16) skills/src/commonMain/kotlin/ai/koog/skills/discovery/SkillsDiscovery.kt:185 — SkillsDiscoveryKt.parseFrontmatter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5 (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 · RegexSearchTool.searchByRegex (cognitive 16) · ×1
  • RegexSearchTool.searchByRegex (cognitive 16) agents/agents-ext/src/commonMain/kotlin/ai/koog/agents/ext/tool/search/RegexSearchTool.kt:138 — RegexSearchTool.searchByRegex has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 3 (5 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · GenericJsonSchemaGenerator.processObject (cognitive 16) · ×1
  • GenericJsonSchemaGenerator.processObject (cognitive 16) prompt/prompt-structure/src/commonMain/kotlin/ai/koog/prompt/structure/json/generator/GenericJsonSchemaGenerator.kt:153 — GenericJsonSchemaGenerator.processObject has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XmlContentBuilder.tag (cognitive 16) · ×1
  • XmlContentBuilder.tag (cognitive 16) prompt/prompt-xml/src/commonMain/kotlin/ai/koog/prompt/xml/Xml.kt:29 — XmlContentBuilder.tag has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractOpenAILLMClient.toOpenAIContentPart (cognitive 16) · ×1
  • AbstractOpenAILLMClient.toOpenAIContentPart (cognitive 16) prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/AbstractOpenAILLMClient.kt:350 — AbstractOpenAILLMClient.toOpenAIContentPart has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 4 (nesting depth added 7). 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 · OpenAILLMClient.toResponsesMessageContent (cognitive 16) · ×1
  • OpenAILLMClient.toResponsesMessageContent (cognitive 16) prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:931 — OpenAILLMClient.toResponsesMessageContent has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 4 (nesting depth added 7). 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (90 shared lines) · ×1
  • Near-duplicate member pair (90 shared lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:424 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:424-543 | agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:116-488 — These two members are variants of one another: 90 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (42 shared lines) · ×1
  • Near-duplicate member pair (42 shared lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:539 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:539-623 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:630-689 — These two members are variants of one another: 42 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:176 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:176-196 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseParams.kt:150-170 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt:168-191 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt:153-171 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleParams.kt:126-141 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAIParams.kt:159-179 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:233-259 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:486-511 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterParams.kt:211-237 | prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/params/LLMParams.kt:155-167 — These 10 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 10 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 10 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:157 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:157-174 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt:148-166 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAIParams.kt:140-157 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:208-231 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:462-484 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterParams.kt:186-209 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt:223 — agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt:223-270 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/modelfamilies/BedrockToolSerialization.kt:36-71 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:614-673 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/OpenAICompatibleToolDescriptorSchemaGenerator.kt:40-82 — 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 · Edited copy of a member (73 corresponding lines) · ×1
  • Edited copy of a member (73 corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/inferenceSpan.kt:73 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/inferenceSpan.kt:73-145 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/invokeAgentSpan.kt:74-151 — These two members are one piece of code written twice and then edited apart: 73 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (59 corresponding lines) · ×1
  • Edited copy of a member (59 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAILLMClient.kt:274 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAILLMClient.kt:274-332 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:555-626 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (63 corresponding lines) · ×1
  • Edited copy of a member (63 corresponding lines) http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:263 — http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt:263-325 | http-client/http-client-okhttp/src/main/kotlin/ai/koog/http/client/okhttp/OkHttpKoogHttpClient.kt:233-298 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (57 corresponding lines) · ×1
  • Edited copy of a member (57 corresponding lines) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/ContextualPromptExecutor.kt:43 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/ContextualPromptExecutor.kt:43-99 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/ContextualPromptExecutor.kt:218-275 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 56+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 56+ corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:124 — agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:124-180 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/FunctionalAIAgent.kt:81-136 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/GraphAIAgent.kt:103-163 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/planner/PlannerAIAgent.kt:78-133 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 56 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:359 — agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:359-393 | agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt:414-450 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 24+ corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeLLMClient.kt:141 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeLLMClient.kt:141-164 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekLLMClient.kt:192-219 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAILLMClient.kt:180-211 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:288-316 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterLLMClient.kt:183-207 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×1
  • Edited copy of a member (17 corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/histogramMetricEvents.kt:55 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/histogramMetricEvents.kt:55-71 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/histogramMetricEvents.kt:97-113 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAILLMClient.kt:236 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAILLMClient.kt:236-264 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterLLMClient.kt:239-272 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/nodeExecuteSpan.kt:45 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/nodeExecuteSpan.kt:45-65 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/strategySpan.kt:43-58 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/subgraphExecuteSpan.kt:45-65 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 25+ corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:274 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:274-299 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:524-548 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterParams.kt:250-275 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/counterMetricEvents.kt:16 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/counterMetricEvents.kt:16-32 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/counterMetricEvents.kt:38-54 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/histogramMetricEvents.kt:35-48 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 20+ corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:286 — agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:286-309 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:348-372 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:465-484 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:578-602 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 11+ corresponding lines) a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/model/Serialization.kt:27 — a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/model/Serialization.kt:27-37 | a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/model/Serialization.kt:53-64 | a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/model/Serialization.kt:81-91 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/dsl/AgentcoreLongTermMemoryDsl.kt:122 — agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/dsl/AgentcoreLongTermMemoryDsl.kt:122-133 | agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/dsl/AgentcoreLongTermMemoryDsl.kt:145-156 | agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/dsl/AgentcoreLongTermMemoryDsl.kt:188-199 | agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/dsl/AgentcoreLongTermMemoryDsl.kt:210-221 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 16+ corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt:111 — agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt:111-129 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt:161-179 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilderCommon.kt:108-124 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilderCommon.kt:194-211 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/codex/CodexAgentBuilder.kt:62-77 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/codex/CodexAgentBuilder.kt:109-127 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 17+ corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:208 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:208-227 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseParams.kt:180-196 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt:203-223 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt:182-199 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAIParams.kt:191-210 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 17+ corresponding lines) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt:88 — agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt:88-104 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilderCommon.kt:171-187 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/codex/CodexAgentBuilder.kt:39-55 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 8+ corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt:193 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt:193-201 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt:173-180 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAIParams.kt:181-189 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:261-272 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:513-522 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterParams.kt:239-248 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 10+ corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt:794 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt:794-805 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekLLMClient.kt:243-254 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAILLMClient.kt:341-350 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt:634-645 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterLLMClient.kt:220-229 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 6+ corresponding lines) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:198 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:198-206 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseParams.kt:172-177 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleParams.kt:143-149 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (62 lines × 2) · ×1
  • Duplicated block (62 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:47 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:47-108 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:47-108 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (29–30 lines × 2) · ×1
  • Duplicated block (29–30 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt:42 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt:42-70 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/structure/OpenAIStandardJsonSchemaGenerator.kt:42-71 — before extracting anything, compare `prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/structure/OpenAIStandardJsonSchemaGenerator.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt:59 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt:59-87 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt:59-87 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiToolCallAssembler.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:289 — agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:289-309 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:352-372 | agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:582-602 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgent.kt:289` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/inferenceSpan.kt:127 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/inferenceSpan.kt:127-145 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/invokeAgentSpan.kt:131-151 — 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 `agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/inferenceSpan.kt:127` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (15–20 lines × 2) · ×1
  • Duplicated block (15–20 lines × 2) agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/inferenceSpan.kt:91 — agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/inferenceSpan.kt:91-110 | agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/invokeAgentSpan.kt:97-111 — 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 `agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/inferenceSpan.kt:91` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (17–20 lines × 2) · ×1
  • Duplicated block (17–20 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:604 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:604-623 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:673-689 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:604` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:445 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:445-463 | agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:225-242 — before extracting anything, compare `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt` and `agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:445` 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 (14–17 lines × 2) · ×1
  • Duplicated block (14–17 lines × 2) agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt:229 — agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt:229-245 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/OpenAICompatibleToolDescriptorSchemaGenerator.kt:44-57 — before extracting anything, compare `agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/OpenAICompatibleToolDescriptorSchemaGenerator.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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–17 lines × 2) · ×1
  • Duplicated block (12–17 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:555 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:555-571 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:640-651 — both copies are in the same file, so extract the 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 (12–16 lines × 2) · ×1
  • Duplicated block (12–16 lines × 2) agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt:253 — agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt:253-268 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/OpenAICompatibleToolDescriptorSchemaGenerator.kt:59-70 — before extracting anything, compare `agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/OpenAICompatibleToolDescriptorSchemaGenerator.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt:253` 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 (13–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:581 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:581-596 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:657-669 — both copies are in the same file, so extract the 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 `prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt:581` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 6) · ×1
  • Duplicated block (15 lines × 6) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:160 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:160-174 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt:152-166 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAIParams.kt:143-157 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:217-231 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:470-484 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterParams.kt:195-209 — before extracting anything, compare `prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterParams.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:160` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–14 lines × 4) · ×1
  • Duplicated block (9–14 lines × 4) agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt:224 — agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt:224-237 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/modelfamilies/BedrockToolSerialization.kt:37-45 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:618-630 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/OpenAICompatibleToolDescriptorSchemaGenerator.kt:41-49 — before extracting anything, compare `agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/OpenAICompatibleToolDescriptorSchemaGenerator.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-mcp-server/src/commonMain/kotlin/ai/koog/agents/mcp/server/McpServer.kt:224` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt:160 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt:160-170 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterParams.kt:218-227 — before extracting anything, compare `prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterParams.kt` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:274 — agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:274-283 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:305-314 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:344-353 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt:274` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–10 lines × 4) · ×1
  • Duplicated block (6–10 lines × 4) agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:327 — agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:327-336 | agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:372-381 | agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:385-394 | agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:397-402 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt:327` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeLLMClient.kt:141 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeLLMClient.kt:141-149 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekLLMClient.kt:192-201 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAILLMClient.kt:180-189 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeLLMClient.kt:141` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–9 lines × 2) · ×1
  • Duplicated block (6–9 lines × 2) agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/ExposedPersistencyStorageProvider.kt:124 — agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/ExposedPersistencyStorageProvider.kt:124-129 | agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/ExposedPersistencyStorageProvider.kt:165-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/ExposedPersistencyStorageProvider.kt:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–8 lines × 10) · ×1
  • Duplicated block (7–8 lines × 10) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:180 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:180-186 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseParams.kt:157-163 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt:174-180 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt:157-163 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleParams.kt:130-136 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/mistralai/MistralAIParams.kt:163-169 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:237-243 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAIParams.kt:490-496 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterParams.kt:215-221 | prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/params/LLMParams.kt:159-166 — before extracting anything, compare `prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/deepseek/DeepSeekParams.kt` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseParams.kt:156` calls `Suppress` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicParams.kt:179` 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 (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:252 — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:252-259 | koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:249-256 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-ollama-client/src/commonMain/kotlin/ai/koog/prompt/executor/ollama/tools/json/OllamaToolDescriptorSchemaGenerator.kt:39-46 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` and `koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:252` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (58 lines × 2) · ×1
  • Duplicated block (58 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatMemoryAutoConfiguration.kt:63 — koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatMemoryAutoConfiguration.kt:63-120 | koog-spring-ai/koog-spring-ai-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatMemoryAutoConfiguration.kt:63-120 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatMemoryAutoConfiguration.kt` and `koog-spring-ai/koog-spring-ai-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatMemoryAutoConfiguration.kt` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatMemoryAutoConfiguration.kt:63` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×1
  • Duplicated block (57 lines × 2) koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiVectorStoreAutoConfiguration.kt:82 — koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiVectorStoreAutoConfiguration.kt:82-138 | koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiVectorStoreAutoConfiguration.kt:82-138 — before extracting anything, compare `koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiVectorStoreAutoConfiguration.kt` and `koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiVectorStoreAutoConfiguration.kt` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiVectorStoreAutoConfiguration.kt:82` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (70 lines × 2) · ×1
  • Duplicated block (70 lines × 2) prompt/prompt-executor/prompt-executor-clients/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/LLMClient.kt:43 — prompt/prompt-executor/prompt-executor-clients/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/LLMClient.kt:43-112 | prompt/prompt-executor/prompt-executor-model/src/jvmMain/kotlin/ai/koog/prompt/executor/model/PromptExecutor.kt:39-235 — 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 `prompt/prompt-executor/prompt-executor-clients/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/LLMClient.kt:43` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `prompt/prompt-executor/prompt-executor-model/src/jvmMain/kotlin/ai/koog/prompt/executor/model/PromptExecutor.kt:235` calls `builder`, `PromptExecutorBuilder` and `prompt/prompt-executor/prompt-executor-clients/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/LLMClient.kt:112` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentGraphPipeline.kt:29 — agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentGraphPipeline.kt:29-37 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPlannerPipeline.kt:37-45 | agents/agents-core/src/nonJvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentGraphPipeline.kt:22-30 | agents/agents-core/src/nonJvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPlannerPipeline.kt:27-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentGraphPipeline.kt:29` 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 (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) agents/agents-features/agents-features-chat-memory-sql/src/jvmMain/kotlin/ai/koog/agents/features/chatmemory/sql/H2ChatHistoryProvider.kt:100 — agents/agents-features/agents-features-chat-memory-sql/src/jvmMain/kotlin/ai/koog/agents/features/chatmemory/sql/H2ChatHistoryProvider.kt:100-127 | agents/agents-features/agents-features-chat-memory-sql/src/jvmMain/kotlin/ai/koog/agents/features/chatmemory/sql/PostgresChatHistoryProvider.kt:108-135 — 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 (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt:115 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt:115-119 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/structure/GoogleStandardJsonSchemaGenerator.kt:46-50 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/structure/OpenAIStandardJsonSchemaGenerator.kt:151-155 — before extracting anything, compare `prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt` and `prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/structure/OpenAIStandardJsonSchemaGenerator.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/AIAgentCliContext.kt:51 — agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/AIAgentCliContext.kt:51-64 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/context/AIAgentFunctionalContext.kt:89-102 | agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/context/AIAgentPlannerContext.kt:87-100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/AIAgentCliContext.kt:51` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 23) · ×1
  • Duplicated block (8 lines × 23) agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:79 — agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:79-86 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:104-111 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:129-136 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:154-161 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:179-186 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:204-211 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:229-236 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:254-261 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:280-287 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:305-312 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:330-337 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:355-362 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:380-387 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:405-412 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:430-437 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:455-462 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt:480-487 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPlannerPipeline.kt:59-66 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPlannerPipeline.kt:78-85 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPlannerPipeline.kt:103-110 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPlannerPipeline.kt:128-135 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPlannerPipeline.kt:147-154 | agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPlannerPipeline.kt:172-179 — there are 23 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 23 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt: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. Note first that the copies are not typed on the same thing: the declarations holding them bind `handle` to `Interceptor<AgentStartingContext>` in one and `Interceptor<AgentCompletedContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:502 — prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:502-514 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:521-533 | prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:540-552 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt:502` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:248 — agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:248-268 | agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:279-299 | agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:313-335 | agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:383-405 | agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:428-450 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (103 corresponding lines) · ×1
  • Edited copy of a member (103 corresponding lines) examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:227 — examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:227-329 | examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/agents/BankingAgentService.java:175-277 — These two members are one piece of code written twice and then edited apart: 103 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (108 corresponding lines) · ×1
  • Edited copy of a member (108 corresponding lines) examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:134 — examples/acp-agent/src/main/kotlin/ai/coding/client/TerminalClientOperations.kt:134-241 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/AcpTerminalClient.kt:134-241 — These two members are one piece of code written twice and then edited apart: 108 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (106 corresponding lines) · ×1
  • Edited copy of a member (106 corresponding lines) examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt:34 — examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt:34-139 | examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/weather/WeatherAgentProvider.kt:36-147 — These two members are one piece of code written twice and then edited apart: 106 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (101 corresponding lines) · ×1
  • Edited copy of a member (101 corresponding lines) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/AdvancedWithStandardSchema.kt:34 — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/AdvancedWithStandardSchema.kt:34-139 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/AdvancedWithStandardSchemaAndTools.kt:34-134 — These two members are one piece of code written twice and then edited apart: 101 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:166 — examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:166-221 | examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/agents/BankingAgentService.java:103-169 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) examples/acp-agent/src/main/kotlin/ai/coding/app/PipeApp.kt:21 — examples/acp-agent/src/main/kotlin/ai/coding/app/PipeApp.kt:21-65 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/KoogAcpApp.kt:17-59 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) examples/acp-agent/src/main/kotlin/ai/coding/agent/KoogAgentSupport.kt:63 — examples/acp-agent/src/main/kotlin/ai/coding/agent/KoogAgentSupport.kt:63-103 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/KoogAgentSupport.kt:68-101 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/markdown/MarkdownStreamingDataExample.kt:13 — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/markdown/MarkdownStreamingDataExample.kt:13-51 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/markdown/MarkdownStreamingWithToolsExample.kt:16-67 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) examples/acp-agent/src/main/kotlin/ai/coding/client/util.kt:6 — examples/acp-agent/src/main/kotlin/ai/coding/client/util.kt:6-47 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/util.kt:6-47 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 30+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 30+ corresponding lines) examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/screens/agentdemo/AgentDemoScreen.kt:225 — examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/screens/agentdemo/AgentDemoScreen.kt:225-254 | examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/screens/agentdemo/AgentDemoScreen.kt:257-286 | examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/screens/agentdemo/AgentDemoScreen.kt:289-318 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chatmemory/ChatMemoryExample.kt:20 — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chatmemory/ChatMemoryExample.kt:20-50 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/chatmemory/ChatMemoryWindowedExample.kt:20-52 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) examples/koog-js-example/koogelis/src/commonMain/kotlin/ai/koog/koogelis/KoogAgent.kt:148 — examples/koog-js-example/koogelis/src/commonMain/kotlin/ai/koog/koogelis/KoogAgent.kt:148-175 | examples/spring-boot-kotlin/src/main/kotlin/com/example/agent/service/ToolRegistryProvider.kt:16-40 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 16+ corresponding lines) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/subgraphwithtask/ProjectGeneratorTools.kt:66 — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/subgraphwithtask/ProjectGeneratorTools.kt:66-92 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/subgraphwithtask/ProjectGeneratorTools.kt:114-140 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/subgraphwithtask/ProjectGeneratorTools.kt:189-206 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/subgraphwithtask/ProjectGeneratorTools.kt:224-239 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/guesser/NumberGuessingAgent.kt:14 — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/guesser/NumberGuessingAgent.kt:14-55 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/simpleapi/BasicAgentWithTools.kt:9-36 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (61 lines × 2) · ×1
  • Duplicated block (61 lines × 2) examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt:45 — examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt:45-105 | examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/weather/WeatherAgentProvider.kt:46-106 — before extracting anything, compare `examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt` and `examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/weather/WeatherAgentProvider.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt:45` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (45–46 lines × 2) · ×1
  • Duplicated block (45–46 lines × 2) examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/AdvancedWithBasicSchema.kt:195 — examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/AdvancedWithBasicSchema.kt:195-240 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/AdvancedWithStandardSchema.kt:64-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples/simple-examples/src/main/kotlin/ai/koog/agents/example/structuredoutput/AdvancedWithBasicSchema.kt:195` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) examples/acp-agent/src/main/kotlin/ai/coding/app/PipeApp.kt:26 — examples/acp-agent/src/main/kotlin/ai/coding/app/PipeApp.kt:26-52 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/KoogAcpApp.kt:20-46 — 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 `examples/acp-agent/src/main/kotlin/ai/coding/app/PipeApp.kt:26` 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 (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) examples/acp-agent/src/main/kotlin/ai/coding/client/util.kt:7 — examples/acp-agent/src/main/kotlin/ai/coding/client/util.kt:7-31 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/util.kt:7-31 — before extracting anything, compare `examples/acp-agent/src/main/kotlin/ai/coding/client/util.kt` and `examples/simple-examples/src/main/kotlin/ai/koog/agents/example/acp/util.kt` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/acp-agent/src/main/kotlin/ai/coding/client/util.kt:7` 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 (24–25 lines × 2) · ×1
  • Duplicated block (24–25 lines × 2) examples/koog-js-example/koogelis/src/commonMain/kotlin/ai/koog/koogelis/KoogAgent.kt:151 — examples/koog-js-example/koogelis/src/commonMain/kotlin/ai/koog/koogelis/KoogAgent.kt:151-175 | examples/spring-boot-kotlin/src/main/kotlin/com/example/agent/service/ToolRegistryProvider.kt:17-40 — 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 `examples/koog-js-example/koogelis/src/commonMain/kotlin/ai/koog/koogelis/KoogAgent.kt:151` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/koog-js-example/koogelis/src/commonMain/kotlin/ai/koog/koogelis/KoogAgent.kt:149` calls `isEmpty` and `examples/spring-boot-kotlin/src/main/kotlin/com/example/agent/service/ToolRegistryProvider.kt:16` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16–19 lines × 3) · ×1
  • Duplicated block (16–19 lines × 3) examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt:76 — examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt:76-91 | examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/weather/WeatherAgentProvider.kt:77-92 | examples/simple-examples/src/main/kotlin/ai/koog/agents/example/tone/ToneStrategy.kt:36-54 — before extracting anything, compare `examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt` and `examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/weather/WeatherAgentProvider.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/calculator/CalculatorAgentProvider.kt:76` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×1
  • Duplicated block (18 lines × 4) agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:250 — agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:250-267 | agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:281-298 | agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:315-332 | agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:385-402 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:250` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/weather/WeatherTools.kt:336 — examples/demo-compose-app/commonApp/src/commonMain/kotlin/com/jetbrains/example/koog/compose/agents/weather/WeatherTools.kt:336-352 | examples/trip-planning-example/src/main/kotlin/ai/koog/agents/examples/tripplanning/api/OpenMeteoClient.kt:158-174 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:250 — agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:250-260 | agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:281-291 | agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:315-325 | agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:385-395 | agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:430-440 — 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 `agents/agents-test/src/commonMain/kotlin/ai/koog/agents/testing/tools/MockExecutorDSLBuilder.kt:250` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 3) · ×1
  • Duplicated block (24 lines × 3) examples/code-agent/step-02-add-execution-tool/src/main/kotlin/Main.kt:49 — examples/code-agent/step-02-add-execution-tool/src/main/kotlin/Main.kt:49-72 | examples/code-agent/step-03-add-observability/src/main/kotlin/Main.kt:60-83 | examples/code-agent/step-04-add-subagent/src/main/kotlin/Main.kt:47-70 — before extracting anything, compare `examples/code-agent/step-02-add-execution-tool/src/main/kotlin/Main.kt` and `examples/code-agent/step-03-add-observability/src/main/kotlin/Main.kt` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (89 lines × 2) · ×1
  • Duplicated block (89 lines × 2) examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:241 — examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:241-329 | examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/agents/BankingAgentService.java:189-277 — before extracting anything, compare `examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java` and `examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/agents/BankingAgentService.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:241` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `AccountIssueSolution` names `org.example.koog.java.structs.AccountIssueSolution` in one and `org.example.koog.spring.java.structs.AccountIssueSolution` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (25–30 lines × 2) · ×1
  • Duplicated block (25–30 lines × 2) examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:184 — examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:184-208 | examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/agents/BankingAgentService.java:115-144 — before extracting anything, compare `examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java` and `examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/agents/BankingAgentService.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:184` 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 first that the copies are not typed on the same thing: `AccountIssueSolution` names `org.example.koog.java.structs.AccountIssueSolution` in one and `org.example.koog.spring.java.structs.AccountIssueSolution` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (16–45 lines × 3) · ×1
  • Duplicated block (16–45 lines × 3) examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:103 — examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:103-147 | examples/simple-examples-java/src/main/java/ai/koog/agents/example/chatmemory/ChatMemoryJdbcExample.java:102-117 | examples/simple-examples-java/src/main/java/ai/koog/agents/example/snapshot/PersistenceJdbcExample.java:94-109 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:188 — examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:188-209 | examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:217-238 — both copies are in the same file, so extract the 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 `examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:188` 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 (10–13 lines × 3) · ×1
  • Duplicated block (10–13 lines × 3) examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:303 — examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:303-315 | examples/simple-examples-java/src/main/java/ai/koog/agents/example/strategies/GraphStrategyExample.java:63-72 | examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/agents/BankingAgentService.java:251-263 — before extracting anything, compare `examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java` and `examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/agents/BankingAgentService.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/javaone-2026/src/main/java/org/example/koog/java/agents/KoogAgentService.java:303` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `AccountIssueSolution` names `org.example.koog.java.structs.AccountIssueSolution` in one and `org.example.koog.spring.java.structs.AccountIssueSolution` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:262 — examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:262-268 | examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:270-276 | examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:278-284 | examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:285-292 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:262` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:262` calls `transformed` and `examples/spring-ai-java/src/main/java/com/example/spring_ai_java/service/customersupport/CustomerSupportGraphService.java:285` does not — after which the two agree again for 5 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 (43 lines × 2) · ×1
  • Duplicated block (43 lines × 2) examples/javaone-2026/src/main/java/org/example/koog/java/structs/AccountIssueSummary.java:1 — examples/javaone-2026/src/main/java/org/example/koog/java/structs/AccountIssueSummary.java:1-43 | examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/structs/AccountIssueSummary.java:1-43 — before extracting anything, compare `examples/javaone-2026/src/main/java/org/example/koog/java/structs/AccountIssueSummary.java` and `examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/structs/AccountIssueSummary.java` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/javaone-2026/src/main/java/org/example/koog/java/structs/AccountIssueSummary.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) examples/javaone-2026/src/main/java/org/example/koog/java/tools/AccountReadTools.java:15 — examples/javaone-2026/src/main/java/org/example/koog/java/tools/AccountReadTools.java:15-48 | examples/spring-io-2026/java/src/main/java/org/example/koog/spring/java/tools/AccountReadUtils.java:15-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `Transaction` names `org.example.koog.java.structs.Transaction` in one and `org.example.koog.spring.java.structs.Transaction` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking examples/simple-examples/src/main/kotlin/ai/koog/agents/example/mcp/GoogleMapsMcpClient.kt:21 — `main` is async and calls Thread.sleep — a blocking call inside async code stalls the coroutine's thread, and every coroutine dispatched to it for as long as it runs.
Minor — 284 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×218
  • Orphaned file prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/models/OpenAIChatCompletion.kt: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 koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt: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 koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt: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 agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentFactory.kt: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 http-client/http-client-spring-webclient/src/main/kotlin/ai/koog/http/client/spring/SpringWebClientKoogHttpClient.kt: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 prompt/prompt-markdown/src/commonMain/kotlin/ai/koog/prompt/markdown/Markdown.kt: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 agents/agents-tools/src/commonMain/kotlin/ai/koog/agents/core/tools/ToolBase.kt: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 prompt/prompt-structure/src/commonMain/kotlin/ai/koog/prompt/structure/json/generator/StandardJsonSchemaGenerator.kt: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 agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence/jdbc/JdbcPersistenceStorageProvider.kt: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 agents/agents-features/agents-features-opentelemetry/src/jvmCommonMain/kotlin/ai/koog/agents/features/opentelemetry/feature/OpenTelemetryConfig.kt: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 prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openrouter/OpenRouterParams.kt: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 agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeCliConfig.kt: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 agents/agents-ext/src/commonMain/kotlin/ai/koog/agents/ext/tool/file/EditFileTool.kt: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 prompt/prompt-structure/src/commonMain/kotlin/ai/koog/prompt/structure/markdown/MarkdownParser.kt: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 koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt: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 koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt: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 convention-plugin-ai/src/main/kotlin/ai/koog/gradle/fixups/CheckSplitPackagesPlugin.kt: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 prompt/prompt-cache/prompt-cache-model/src/commonMain/kotlin/ai/koog/prompt/cache/model/PromptCache.kt: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 agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/remote/client/FeatureMessageRemoteClient.kt: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 agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/discovery/AgentcoreStrategyDiscovery.kt: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 agents/agents-features/agents-features-a2a-client/src/commonMain/kotlin/ai/koog/agents/a2a/client/feature/A2AAgentClientNodes.kt: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 agents/agents-tools/src/commonMain/kotlin/ai/koog/agents/core/tools/ToolDescriptors.kt: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 prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/dashscope/DashscopeParams.kt: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 prompt/prompt-structure/src/commonMain/kotlin/ai/koog/prompt/structure/json/generator/JsonSchemaGenerator.kt: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 agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/AgentcoreNamespaceResolver.kt: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.
  • + 193 more in this group — see findings.md.
X4 · Structured logging · Interpolated log message defeats structured logging · ×34
  • Interpolated log message defeats structured logging koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/openrouter/OpenRouterLLMAutoConfiguration.kt:60 — `info` at line 60 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/openai/OpenAILLMAutoConfiguration.kt:68 — `info` at line 68 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/ollama/OllamaLLMAutoConfiguration.kt:60 — `info` at line 60 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/mistralai/MistralAILLMAutoConfiguration.kt:68 — `info` at line 68 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/google/GoogleLLMAutoConfiguration.kt:68 — `info` at line 68 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/deepseek/DeepSeekLLMAutoConfiguration.kt:72 — `info` at line 72 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/anthropic/AnthropicLLMAutoConfiguration.kt:66 — `info` at line 66 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai-v2/koog-spring-ai-v2-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiEmbeddingAutoConfiguration.kt:91 — `info` at line 91 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:105 — `info` at line 105 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:181 — `info` at line 181 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai-v2/koog-spring-ai-v2-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatMemoryAutoConfiguration.kt:90 — `info` at line 90 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:105 — `info` at line 105 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:108 — `info` at line 108 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:116 — `info` at line 116 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai-v2/koog-spring-ai-v2-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:119 — `info` at line 119 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai/koog-spring-ai-starter-model-embedding/src/main/kotlin/ai/koog/spring/ai/embedding/SpringAiEmbeddingAutoConfiguration.kt:91 — `info` at line 91 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:105 — `info` at line 105 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/SpringAiChatAutoConfiguration.kt:181 — `info` at line 181 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai/koog-spring-ai-starter-chat-memory/src/main/kotlin/ai/koog/spring/ai/memory/SpringAiChatMemoryAutoConfiguration.kt:90 — `info` at line 90 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai/koog-spring-ai-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:105 — `info` at line 105 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai/koog-spring-ai-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:108 — `info` at line 108 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai/koog-spring-ai-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:116 — `info` at line 116 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-spring-ai/koog-spring-ai-common/src/main/kotlin/ai/koog/spring/ai/common/DispatcherProperties.kt:119 — `info` at line 119 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-bedrock-agentcore-runtime/src/main/kotlin/ai/koog/agentcore/runtime/AgentCoreRuntime.kt:577 — `error` at line 577 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging koog-bedrock-agentcore-runtime/src/main/kotlin/ai/koog/agentcore/runtime/AgentCoreRuntime.kt:581 — `error` at line 581 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
  • + 9 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Low CVE · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X10 · Duplicated predicate · Duplicated predicate · ×4
  • Duplicated predicate prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt:96 — `JsonSchemaConsts.Keys.REF in refObject && refObject.size > 1` appears character-identically in 3 files — prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/structure/AnthropicStandardJsonSchemaGenerator.kt, prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/structure/GoogleStandardJsonSchemaGenerator.kt, prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/structure/OpenAIStandardJsonSchemaGenerator.kt. 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 koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt:57 — `document.id == null || document.id == id` appears character-identically in 2 files — koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt, koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt. 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 koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt:61 — `textContent.isNotEmpty() || media.isNotEmpty()` appears character-identically in 2 files — koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt, koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt. 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 koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/DocumentWithMetadata.kt:18 — `value is String || value is Boolean || value is Number` appears character-identically in 2 files — koog-spring-ai-v2/koog-spring-ai-v2-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/DocumentWithMetadata.kt, koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/DocumentWithMetadata.kt. 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.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 9 significant file(s) lose their only recent owner: agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/dsl/AgentcoreLongTermMemoryDsl.kt, koog-spring-ai/koog-spring-ai-starter-vector-store/src/main/kotlin/ai/koog/spring/ai/vectorstore/SpringAiKoogVectorStore.kt, agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/augmentation/AgentcorePromptAugmenter.kt, agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/storage/InMemoryRecordStorage.kt, agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory/aws/AgentcoreCompositeSearchStrategy.kt, agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/search/SearchStrategy.kt, agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/augmentation/SystemPromptAugmenter.kt, agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/augmentation/PromptAugmenter.kt (+1 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 9 significant file(s) lose their only recent owner: a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/model/AgentCard.kt, a2a/a2a-transport/a2a-transport-server-jsonrpc-http/src/commonMain/kotlin/ai/koog/a2a/transport/server/jsonrpc/http/HttpJSONRPCServerTransport.kt, a2a/a2a-transport/a2a-transport-core-jsonrpc/src/commonMain/kotlin/ai/koog/a2a/transport/jsonrpc/JSONRPCServerTransport.kt, a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/transport/ServerTransport.kt, a2a/a2a-client/src/commonMain/kotlin/ai/koog/a2a/client/A2AClient.kt, a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/exceptions/Exceptions.kt, a2a/a2a-server/src/commonMain/kotlin/ai/koog/a2a/server/agent/AgentExecutor.kt, a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/transport/ClientTransport.kt (+1 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/remote/jsonConfig.kt, agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/writer/traceMessageFormat.kt, agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/span/GenAIAgentSpan.kt. Pair on, review, or document these before any departure.
P10 · Library API & versioning · Implementation type on the public API · ×2
  • Implementation type on the public API agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/entity/AIAgentNode.kt:170 — 1 public type in `ai.koog.agents.core.agent.entity` is marked as implementation by its own namespace, folder or name: `SimpleAIAgentNodeImpl` (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/entity/AIAgentNode.kt:170, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
  • Implementation type on the public API agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:59 — 2 public types in `ai.koog.agents.core.feature.pipeline` are marked as implementation by their own namespace, folder or name: `AIAgentPipelineImpl` (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt:59, name ends in `Impl`), `AIAgentPlannerPipelineImpl` (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPlannerPipelineImpl.kt:22, name ends in `Impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 5 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 (27 single-owned of 520 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; 520 of the 1039 production source files in this repository met that bar). They are anonymized user #4 (2 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/graphModel.kt, agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/agent/MermaidDiagramGenerator.kt, agents/agents-tools/src/jvmCommonMain/kotlin/ai/koog/agents/core/tools/reflect/ToolFromCallableExtensions.kt, agents/agents-ext/src/jvmMain/kotlin/ai/koog/agents/ext/tool/shell/JvmShellCommandExecutor.kt, agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentBuilderCommon.kt, koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/anthropic/AnthropicKoogProperties.kt.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found build.gradle.kts:1 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `build.gradle.kts` makes this repository a deployable product (line 1).
D21 · Naming Consistency · `nextToolAgentID` spells `ID` where 318 names in the project spell it `Id` · ×1
  • `nextToolAgentID` spells `ID` where 318 names in the project spell it `Id` agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentTool.kt:78 — 318 of 319 names in project agents-core spell the token `Id` (318 of 319; unit: names in project agents-core containing `Id`). Peers: AIAgent.run(sessionId) (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgent.kt:34); AIAgent.createSession(sessionId) (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgent.kt:45); AIAgentBase.run(sessionId) (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentBase.kt:71); AIAgentBase.createSession(sessionId) (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentBase.kt:101); AIAgentBase.prepareContext(runId) (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentBase.kt:114). Rename to `nextToolAgentId`. [rule N6]
D21 · Naming Consistency · `KoogLlmClientProperties` spells `Llm` where 12 names in the project spell it `LLM` · ×1
  • `KoogLlmClientProperties` spells `Llm` where 12 names in the project spell it `LLM` koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/KoogLlmClientProperties.kt:15 — 12 of 13 names in project koog-spring-boot-starter spell the token `LLM` (12 of 13; unit: names in project koog-spring-boot-starter containing `LLM`). Peers: ai.koog.spring.prompt.executor.MultiLLMAutoConfiguration (koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/MultiLLMAutoConfiguration.kt:10); MultiLLMAutoConfiguration.multiLLMPromptExecutor (koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/MultiLLMAutoConfiguration.kt:13); ai.koog.spring.prompt.executor.clients.anthropic.AnthropicLLMAutoConfiguration (koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/anthropic/AnthropicLLMAutoConfiguration.kt:43); AnthropicLLMAutoConfiguration.anthropicLLMClient (koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/anthropic/AnthropicLLMAutoConfiguration.kt:65); ai.koog.spring.prompt.executor.clients.deepseek.DeepSeekLLMAutoConfiguration (koog-spring-boot-starter/src/main/kotlin/ai/koog/spring/prompt/executor/clients/deepseek/DeepSeekLLMAutoConfiguration.kt:49). Rename to `KoogLLMClientProperties`. [rule N6]
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 2 of 88 project(s) overshoot their size bounds, lowering Project Cohesion to 9.5/10. The most over is `agents/agents-core` (27150 LoC, 500 module-visible types across 67 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 218 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt, koog-spring-ai/koog-spring-ai-starter-model-chat/src/main/kotlin/ai/koog/spring/ai/chat/Converters.kt, agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/agent/AIAgentFactory.kt, prompt/prompt-markdown/src/commonMain/kotlin/ai/koog/prompt/markdown/Markdown.kt, agents/agents-tools/src/commonMain/kotlin/ai/koog/agents/core/tools/ToolBase.kt, prompt/prompt-structure/src/commonMain/kotlin/ai/koog/prompt/structure/json/generator/StandardJsonSchemaGenerator.kt, agents/agents-features/agents-features-opentelemetry/src/jvmCommonMain/kotlin/ai/koog/agents/features/opentelemetry/feature/OpenTelemetryConfig.kt, agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeCliConfig.kt (and 210 more) (221 orphaned of 520 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; 520 of the 1039 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 50/53 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `a2a/a2a-transport/a2a-transport-server-jsonrpc-http`, `agents/agents-features/agents-features-a2a-client`, `agents/agents-mcp-server`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:7 — No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 21 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.
P3 · Security & performance tooling · Dependabot does not watch npm/uv/maven · ×1
  • Dependabot does not watch npm/uv/maven REDACTED:2 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, `uv`, `maven`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
X2 · Cancellation propagation · Not all suspend functions that make a request accept the coroutine's cancellation · ×1
  • Not all suspend functions that make a request accept the coroutine's cancellation — Only 8/10 suspend functions that make a cancellable request (Ktor, OkHttp newCall, URL streams) accept the coroutine's cancellation or pass one on, so a request keeps running after whatever wanted it has given up — a screen navigated away from, a disposed widget, a superseded search. In a suspend function, make the request with a call that suspends — Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` that cancels the `Call` — not a blocking `execute()`: `withContext(Dispatchers.IO)` moves the call off the caller's thread but does not make it cancellable; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • Silent fallback default in catch docs/hooks/process_api_links.py:184 — `_suggest_keys` (in `on_page_markdown`) swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Minor — 391 finding(s)
D12 · Dependency Hygiene · Outdated (compile) · ×295
  • Outdated (compile): org.springframework.ai:spring-ai-model — org.springframework.ai:spring-ai-model 1.1.4 → 2.0.2 available.
  • Outdated (compile): io.ktor:ktor-server-sse-jvm — io.ktor:ktor-server-sse-jvm 3.3.3 → 3.6.1 available.
  • Outdated (compile): com.fasterxml.jackson.datatype:jackson-datatype-jsr310 — com.fasterxml.jackson.datatype:jackson-datatype-jsr310 2.21.2 → 2.23.0 available.
  • Outdated (compile): ai.koog:prompt-xml-jvm — ai.koog:prompt-xml-jvm 0.8.0 → 1.3.0 available.
  • Outdated (compile): aws.sdk.kotlin:aws-endpoint-jvm — aws.sdk.kotlin:aws-endpoint-jvm 1.6.17 → 1.9.35 available.
  • Outdated (compile): org.springframework.ai:spring-ai-commons — org.springframework.ai:spring-ai-commons 1.1.4 → 2.0.2 available.
  • Outdated (compile): aws.smithy.kotlin:smithy-client-jvm — aws.smithy.kotlin:smithy-client-jvm 1.6.2 → 1.7.16 available.
  • Outdated (compile): org.apache.logging.log4j:log4j-to-slf4j — org.apache.logging.log4j:log4j-to-slf4j 2.24.3 → 2.26.1 available.
  • Outdated (compile): org.springframework:spring-messaging — org.springframework:spring-messaging 6.2.17 → 7.0.10 available.
  • Outdated (compile): org.apache.tomcat.embed:tomcat-embed-websocket — org.apache.tomcat.embed:tomcat-embed-websocket 10.1.53 → 11.0.27 available.
  • Outdated (compile): org.springframework:spring-web — org.springframework:spring-web 6.2.17 → 7.0.10 available.
  • Outdated (compile): org.springframework.boot:spring-boot-autoconfigure — org.springframework.boot:spring-boot-autoconfigure 3.5.13 → 4.1.2 available.
  • Outdated (compile): ai.koog:prompt-tokenizer-jvm — ai.koog:prompt-tokenizer-jvm 0.8.0 → 1.3.0 available.
  • Outdated (compile): redis.clients.authentication:redis-authx-core — redis.clients.authentication:redis-authx-core 0.1.1-beta2 → 0.2.0 available.
  • Outdated (compile): aws.smithy.kotlin:telemetry-api-jvm — aws.smithy.kotlin:telemetry-api-jvm 1.6.2 → 1.7.16 available.
  • Outdated (compile): io.ktor:ktor-client-logging-jvm — io.ktor:ktor-client-logging-jvm 3.3.3 → 3.6.1 available.
  • Outdated (compile): org.jetbrains.kotlinx:kotlinx-serialization-json-jvm — org.jetbrains.kotlinx:kotlinx-serialization-json-jvm 1.10.0 → 1.13.0 available.
  • Outdated (compile): com.networknt:json-schema-validator — com.networknt:json-schema-validator 2.0.0 → 3.0.9 available.
  • Outdated (compile): org.jetbrains.exposed:exposed-kotlin-datetime — org.jetbrains.exposed:exposed-kotlin-datetime 0.61.0 → 1.6.1 available.
  • Outdated (compile): ai.koog:prompt-structure-jvm — ai.koog:prompt-structure-jvm 0.8.0 → 1.3.0 available.
  • Outdated (compile): ai.koog:agents-tools-jvm — ai.koog:agents-tools-jvm 0.8.0 → 1.3.0 available.
  • Outdated (compile): io.modelcontextprotocol.sdk:mcp-json — io.modelcontextprotocol.sdk:mcp-json 0.17.0 → 0.17.2 available.
  • Outdated (compile): io.modelcontextprotocol:kotlin-sdk-core-jvm — io.modelcontextprotocol:kotlin-sdk-core-jvm 0.8.1 → 0.16.0 available.
  • Outdated (compile): org.springframework.ai:spring-ai-pgvector-store — org.springframework.ai:spring-ai-pgvector-store 1.1.4 → 2.0.2 available.
  • Outdated (compile): ai.koog:embeddings-llm-jvm — ai.koog:embeddings-llm-jvm 0.8.0 → 1.3.0 available.
  • + 270 more in this group — see findings.md.
D12 · Dependency Hygiene · Outdated (runtime) · ×38
  • Outdated (runtime): com.squareup.okhttp3:okhttp — com.squareup.okhttp3:okhttp 4.12.0 → 5.5.1 available.
  • Outdated (runtime): aws.smithy.kotlin:serde-jvm — aws.smithy.kotlin:serde-jvm 1.6.2 → 1.7.16 available.
  • Outdated (runtime): ai.koog:serialization-jackson — ai.koog:serialization-jackson 0.8.0 → 1.3.0 available.
  • Outdated (runtime): org.apache.httpcomponents.client5:httpclient5 — org.apache.httpcomponents.client5:httpclient5 5.5.2 → 5.6.5 available.
  • Outdated (runtime): aws.smithy.kotlin:http-client-engine-default-jvm — aws.smithy.kotlin:http-client-engine-default-jvm 1.6.2 → 1.7.16 available.
  • Outdated (runtime): io.opentelemetry:opentelemetry-exporter-common — io.opentelemetry:opentelemetry-exporter-common 1.49.0 → 1.68.0 available.
  • Outdated (runtime): aws.smithy.kotlin:aws-xml-protocols-jvm — aws.smithy.kotlin:aws-xml-protocols-jvm 1.6.2 → 1.7.16 available.
  • Outdated (runtime): aws.smithy.kotlin:serde-xml-jvm — aws.smithy.kotlin:serde-xml-jvm 1.6.2 → 1.7.16 available.
  • Outdated (runtime): aws.smithy.kotlin:http-client-engine-okhttp-jvm — aws.smithy.kotlin:http-client-engine-okhttp-jvm 1.6.2 → 1.7.16 available.
  • Outdated (runtime): io.ktor:ktor-network-tls-jvm — io.ktor:ktor-network-tls-jvm 3.3.3 → 3.6.1 available.
  • Outdated (runtime): io.ktor:ktor-client-apache5-jvm — io.ktor:ktor-client-apache5-jvm 3.3.3 → 3.6.1 available.
  • Outdated (runtime): aws.smithy.kotlin:http-auth-aws-jvm — aws.smithy.kotlin:http-auth-aws-jvm 1.6.2 → 1.7.16 available.
  • Outdated (runtime): io.opentelemetry:opentelemetry-exporter-sender-okhttp — io.opentelemetry:opentelemetry-exporter-sender-okhttp 1.49.0 → 1.68.0 available.
  • Outdated (runtime): aws.smithy.kotlin:serde-form-url-jvm — aws.smithy.kotlin:serde-form-url-jvm 1.6.2 → 1.7.16 available.
  • Outdated (runtime): org.jetbrains.kotlin:kotlin-stdlib-jdk8 — org.jetbrains.kotlin:kotlin-stdlib-jdk8 1.9.25 → 2.4.21 available.
  • Outdated (runtime): io.ktor:ktor-client-cio-jvm — io.ktor:ktor-client-cio-jvm 3.3.3 → 3.6.1 available.
  • Outdated (runtime): io.opentelemetry:opentelemetry-exporter-otlp-common — io.opentelemetry:opentelemetry-exporter-otlp-common 1.49.0 → 1.68.0 available.
  • Outdated (runtime): org.jetbrains.kotlin:kotlin-stdlib-jdk7 — org.jetbrains.kotlin:kotlin-stdlib-jdk7 1.9.25 → 2.4.21 available.
  • Outdated (runtime): aws.sdk.kotlin:aws-http-jvm — aws.sdk.kotlin:aws-http-jvm 1.6.17 → 1.9.35 available.
  • Outdated (runtime): org.checkerframework:checker-qual — org.checkerframework:checker-qual 3.52.0 → 4.4.0 available.
  • Outdated (runtime): io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi — io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi 1.49.0 → 1.68.0 available.
  • Outdated (runtime): aws.smithy.kotlin:aws-json-protocols-jvm — aws.smithy.kotlin:aws-json-protocols-jvm 1.6.2 → 1.7.16 available.
  • Outdated (runtime): aws.smithy.kotlin:logging-slf4j2-jvm — aws.smithy.kotlin:logging-slf4j2-jvm 1.6.2 → 1.7.16 available.
  • Outdated (runtime): org.fusesource.jansi:jansi — org.fusesource.jansi:jansi 2.4.2 → 2.4.3 available.
  • Outdated (runtime): org.apache.httpcomponents.core5:httpcore5-h2 — org.apache.httpcomponents.core5:httpcore5-h2 5.3.6 → 5.4.4 available.
  • + 13 more in this group — see findings.md.
D12 · Dependency Hygiene · Outdated (test) · ×26
  • Outdated (test): net.minidev:json-smart — net.minidev:json-smart 2.5.2 → 2.6.1 available.
  • Outdated (test): org.junit.jupiter:junit-jupiter-params — org.junit.jupiter:junit-jupiter-params 5.12.2 → 6.1.3 available.
  • Outdated (test): net.minidev:accessors-smart — net.minidev:accessors-smart 2.5.2 → 2.6.1 available.
  • Outdated (test): org.junit.jupiter:junit-jupiter-api — org.junit.jupiter:junit-jupiter-api 5.12.2 → 6.1.3 available.
  • Outdated (test): org.junit.jupiter:junit-jupiter — org.junit.jupiter:junit-jupiter 5.12.2 → 6.1.3 available.
  • Outdated (test): org.junit.platform:junit-platform-engine — org.junit.platform:junit-platform-engine 1.12.2 → 6.1.3 available.
  • Outdated (test): jakarta.xml.bind:jakarta.xml.bind-api — jakarta.xml.bind:jakarta.xml.bind-api 4.0.4 → 4.0.5 available.
  • Outdated (test): org.springframework.boot:spring-boot-test — org.springframework.boot:spring-boot-test 3.5.13 → 4.1.2 available.
  • Outdated (test): org.ow2.asm:asm — org.ow2.asm:asm 9.7.1 → 9.11.1 available.
  • Outdated (test): org.springframework.boot:spring-boot-test-autoconfigure — org.springframework.boot:spring-boot-test-autoconfigure 3.5.13 → 4.1.2 available.
  • Outdated (test): net.bytebuddy:byte-buddy — net.bytebuddy:byte-buddy 1.17.8 → 1.18.17 available.
  • Outdated (test): com.jayway.jsonpath:json-path — com.jayway.jsonpath:json-path 2.9.0 → 3.0.0 available.
  • Outdated (test): org.springframework.boot:spring-boot-starter-test — org.springframework.boot:spring-boot-starter-test 3.5.13 → 4.1.2 available.
  • Outdated (test): org.mockito:mockito-core — org.mockito:mockito-core 5.17.0 → 5.24.0 available.
  • Outdated (test): org.junit.jupiter:junit-jupiter-engine — org.junit.jupiter:junit-jupiter-engine 5.12.2 → 6.1.3 available.
  • Outdated (test): org.junit.platform:junit-platform-commons — org.junit.platform:junit-platform-commons 1.12.2 → 6.1.3 available.
  • Outdated (test): org.objenesis:objenesis — org.objenesis:objenesis 3.3 → 3.6 available.
  • Outdated (test): org.springframework:spring-test — org.springframework:spring-test 6.2.17 → 7.0.10 available.
  • Outdated (test): org.mockito:mockito-junit-jupiter — org.mockito:mockito-junit-jupiter 5.17.0 → 5.24.0 available.
  • Outdated (test): org.xmlunit:xmlunit-core — org.xmlunit:xmlunit-core 2.10.4 → 2.14.0 available.
  • Outdated (test): org.awaitility:awaitility — org.awaitility:awaitility 4.2.2 → 4.3.0 available.
  • Outdated (test): net.bytebuddy:byte-buddy-agent — net.bytebuddy:byte-buddy-agent 1.17.8 → 1.18.17 available.
  • Outdated (test): org.springframework.boot:spring-boot-test — org.springframework.boot:spring-boot-test 3.5.11 → 4.1.2 available.
  • Outdated (test): org.springframework.boot:spring-boot-starter-test — org.springframework.boot:spring-boot-starter-test 3.5.11 → 4.1.2 available.
  • Outdated (test): org.springframework.boot:spring-boot-test-autoconfigure — org.springframework.boot:spring-boot-test-autoconfigure 3.5.11 → 4.1.2 available.
  • + 1 more in this group — see findings.md.
D5 · Coupling · Off the main sequence · ×2
  • Off the main sequence: koog:koog-spring-ai-v2:koog-spring-ai-v2-common — koog:koog-spring-ai-v2:koog-spring-ai-v2-common: abstractness 0.25, instability 0.00, distance 0.75 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: koog:koog-spring-ai:koog-spring-ai-common — koog:koog-spring-ai:koog-spring-ai-common: abstractness 0.25, instability 0.00, distance 0.75 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.client.apache5 [auto]) · ×1
  • Outdated (compile -- module io.ktor.client.apache5 [auto]): io.ktor:ktor-client-apache5-jvm — io.ktor:ktor-client-apache5-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.client.core [auto]) · ×1
  • Outdated (compile -- module io.ktor.client.core [auto]): io.ktor:ktor-client-core-jvm — io.ktor:ktor-client-core-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.http [auto]) · ×1
  • Outdated (compile -- module io.ktor.http [auto]): io.ktor:ktor-http-jvm — io.ktor:ktor-http-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.utils [auto]) · ×1
  • Outdated (compile -- module io.ktor.utils [auto]): io.ktor:ktor-utils-jvm — io.ktor:ktor-utils-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.http.cio [auto]) · ×1
  • Outdated (compile -- module io.ktor.http.cio [auto]): io.ktor:ktor-http-cio-jvm — io.ktor:ktor-http-cio-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.io [auto]) · ×1
  • Outdated (compile -- module io.ktor.io [auto]): io.ktor:ktor-io-jvm — io.ktor:ktor-io-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.events [auto]) · ×1
  • Outdated (compile -- module io.ktor.events [auto]): io.ktor:ktor-events-jvm — io.ktor:ktor-events-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.websocket.serialization [auto]) · ×1
  • Outdated (compile -- module io.ktor.websocket.serialization [auto]): io.ktor:ktor-websocket-serialization-jvm — io.ktor:ktor-websocket-serialization-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.sse [auto]) · ×1
  • Outdated (compile -- module io.ktor.sse [auto]): io.ktor:ktor-sse-jvm — io.ktor:ktor-sse-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.client.content.negotiation [auto]) · ×1
  • Outdated (compile -- module io.ktor.client.content.negotiation [auto]): io.ktor:ktor-client-content-negotiation-jvm — io.ktor:ktor-client-content-negotiation-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.serialization [auto]) · ×1
  • Outdated (compile -- module io.ktor.serialization [auto]): io.ktor:ktor-serialization-jvm — io.ktor:ktor-serialization-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.client.logging [auto]) · ×1
  • Outdated (compile -- module io.ktor.client.logging [auto]): io.ktor:ktor-client-logging-jvm — io.ktor:ktor-client-logging-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.serialization.kotlinx.json [auto]) · ×1
  • Outdated (compile -- module io.ktor.serialization.kotlinx.json [auto]): io.ktor:ktor-serialization-kotlinx-json-jvm — io.ktor:ktor-serialization-kotlinx-json-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.serialization.kotlinx [auto]) · ×1
  • Outdated (compile -- module io.ktor.serialization.kotlinx [auto]): io.ktor:ktor-serialization-kotlinx-jvm — io.ktor:ktor-serialization-kotlinx-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module kotlinx.serialization.json.io.jvm (auto)) · ×1
  • Outdated (compile -- module kotlinx.serialization.json.io.jvm (auto)): org.jetbrains.kotlinx:kotlinx-serialization-json-io-jvm — org.jetbrains.kotlinx:kotlinx-serialization-json-io-jvm 1.8.1 → 1.13.0 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.server.sse [auto]) · ×1
  • Outdated (compile -- module io.ktor.server.sse [auto]): io.ktor:ktor-server-sse-jvm — io.ktor:ktor-server-sse-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.server.core [auto]) · ×1
  • Outdated (compile -- module io.ktor.server.core [auto]): io.ktor:ktor-server-core-jvm — io.ktor:ktor-server-core-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module typesafe.config [auto]) · ×1
  • Outdated (compile -- module typesafe.config [auto]): com.typesafe:config — com.typesafe:config 1.4.3 → 1.4.10 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.server.cio [auto]) · ×1
  • Outdated (compile -- module io.ktor.server.cio [auto]): io.ktor:ktor-server-cio-jvm — io.ktor:ktor-server-cio-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.websockets [auto]) · ×1
  • Outdated (compile -- module io.ktor.websockets [auto]): io.ktor:ktor-websockets-jvm — io.ktor:ktor-websockets-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module io.ktor.network [auto]) · ×1
  • Outdated (compile -- module io.ktor.network [auto]): io.ktor:ktor-network-jvm — io.ktor:ktor-network-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (runtime -- module io.ktor.server.websockets [auto]) · ×1
  • Outdated (runtime -- module io.ktor.server.websockets [auto]): io.ktor:ktor-server-websockets-jvm — io.ktor:ktor-server-websockets-jvm 3.2.3 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (runtime -- module io.ktor.client.cio [auto]) · ×1
  • Outdated (runtime -- module io.ktor.client.cio [auto]): io.ktor:ktor-client-cio-jvm — io.ktor:ktor-client-cio-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (runtime -- module io.ktor.network.tls [auto]) · ×1
  • Outdated (runtime -- module io.ktor.network.tls [auto]): io.ktor:ktor-network-tls-jvm — io.ktor:ktor-network-tls-jvm 3.2.2 → 3.6.1 available.
D12 · Dependency Hygiene · Outdated (compile -- module kotlin.stdlib) · ×1
  • Outdated (compile -- module kotlin.stdlib): org.jetbrains.kotlin:kotlin-stdlib — org.jetbrains.kotlin:kotlin-stdlib 1.9.25 → 2.4.21 available.
D12 · Dependency Hygiene · Outdated (compile -- module kotlinx.coroutines.core) · ×1
  • Outdated (compile -- module kotlinx.coroutines.core): org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm — org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm 1.10.2 → 1.11.0 available.
D12 · Dependency Hygiene · Outdated (compile -- module agents.features.chat.history.jdbc.jvm [auto]) · ×1
  • Outdated (compile -- module agents.features.chat.history.jdbc.jvm [auto]): ai.koog:agents-features-chat-history-jdbc — ai.koog:agents-features-chat-history-jdbc 0.8.0 → 1.3.0 available.
D12 · Dependency Hygiene · Outdated (compile -- module agents.features.chat.memory.sql.jvm [auto]) · ×1
  • Outdated (compile -- module agents.features.chat.memory.sql.jvm [auto]): ai.koog:agents-features-chat-memory-sql-jvm — ai.koog:agents-features-chat-memory-sql-jvm 0.8.0 → 1.3.0 available.
D12 · Dependency Hygiene · Outdated (compile -- module kotlinx.coroutines.reactor) · ×1
  • Outdated (compile -- module kotlinx.coroutines.reactor): org.jetbrains.kotlinx:kotlinx-coroutines-reactor — org.jetbrains.kotlinx:kotlinx-coroutines-reactor 1.10.2 → 1.11.0 available.
D12 · Dependency Hygiene · Outdated (compile -- module kotlinx.coroutines.reactive) · ×1
  • Outdated (compile -- module kotlinx.coroutines.reactive): org.jetbrains.kotlinx:kotlinx-coroutines-reactive — org.jetbrains.kotlinx:kotlinx-coroutines-reactive 1.10.2 → 1.11.0 available.

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/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-732c80b7ffa8482589845f8cc14482fc/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/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-732c80b7ffa8482589845f8cc14482fc/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/canine-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 .107artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .71artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .2artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 57 file(s) — `a2a/a2a-core/src/commonMain/kotlin/ai/koog/a2a/model/AgentCard.kt`, `a2a/a2a-server/src/commonMain/kotlin/ai/koog/a2a/server/session/SessionEventProcessor.kt`, `agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliAIAgentBuilderBase.kt`, `agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CliConfig.kt`, `agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/CustomCliAgentBuilder.kt`, … (+52 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1d69d-8bc8-750c-b740-c0131c19aaa5 · 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