File Complexity Overall
  • There are 53 files with units, with 11,032 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 1 complex files (McCabe index sum 126-250; 647 lines of code)
    • 5 medium complex files (McCabe index sum 51-125; 1,771 lines of code)
    • 12 slightly complex files (McCabe index sum 26-50; 2,403 lines of code)
    • 35 simple files (McCabe index sum 1-25; 6,211 lines of code)
  • 22 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 5% | 16% | 21% | 56%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
py0% | 5% | 16% | 21% | 56%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
scripts0% | 31% | 14% | 30% | 23%
commerce-common0% | 0% | 40% | 42% | 17%
merchant-agent0% | 0% | 9% | 19% | 71%
shopping-agent0% | 0% | 10% | 4% | 84%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 50)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
check.py
in scripts
647 34 207 32 31
turn.py
in commerce-common/commerce_common
419 29 109 26 22
run_demo.py
in scripts
286 15 85 30 40
enrichment.py
in merchant-agent/core/merchant_agent
367 12 83 23 14
memory.py
in commerce-common/commerce_common
451 20 55 12 7
enrichment.py
in shopping-agent/core/shopping_agent
248 11 53 21 10
agent_sdk.py
in commerce-common/commerce_common
199 11 48 24 13
serialization.py
in shopping-agent/core/shopping_agent
104 12 45 43 10
streaming.py
in commerce-common/commerce_common
173 16 41 24 19
manifest.py
in commerce-common/commerce_common
143 6 38 27 12
analysis.py
in merchant-agent/core/merchant_agent
254 9 35 14 10
execution.py
in commerce-common/commerce_common
213 20 34 16 3
smoke_chat.py
in scripts
621 4 34 5 18
fencing.py
in commerce-common/commerce_common
124 9 28 23 7
serialization.py
in merchant-agent/core/merchant_agent
69 7 28 41 10
types.py
in merchant-agent/core/merchant_agent
275 14 27 10 6
skills.py
in commerce-common/commerce_common
57 8 26 46 8
gates.py
in merchant-agent/core/merchant_agent
171 14 26 15 5
changes.py
in merchant-agent/core/merchant_agent
176 13 25 14 3
prompt.py
in merchant-agent/core/merchant_agent
177 2 25 14 24
prompt.py
in shopping-agent/core/shopping_agent
164 2 24 15 23
370 7 23 6 6
prompt_assembly.py
in commerce-common/commerce_common
56 7 21 38 9
merchant_tools.py
in merchant-agent/runtime-agent-sdk/merchant_agent_sdk
80 11 20 25 4
analysis.py
in merchant-agent/runtime-messages-api/merchant_agent_runtime
326 9 18 6 5
presentation.py
in commerce-common/commerce_common
107 8 17 16 9
mcp_server.py
in commerce-common/commerce_common
62 8 17 27 4
602 9 16 3 2
gates.py
in shopping-agent/core/shopping_agent
132 7 15 11 3
shopping_tools.py
in shopping-agent/runtime-agent-sdk/shopping_agent_sdk
63 8 14 22 3
grounding.py
in commerce-common/commerce_common
48 4 14 29 6
verify_all.py
in scripts
108 3 14 13 11
main.py
in merchant-agent/runtime-agent-sdk
101 4 14 14 6
executor.py
in merchant-agent/core/merchant_agent
313 8 14 4 4
run_morning_digest.py
in merchant-agent/managed-agents/scheduled-digest
90 3 12 13 6
main.py
in shopping-agent/runtime-agent-sdk
56 3 10 18 6
executor.py
in shopping-agent/core/shopping_agent
178 5 10 6 6
config.py
in merchant-agent/core/merchant_agent
170 2 10 6 6
agent.py
in merchant-agent/runtime-agent-sdk/merchant_agent_sdk
124 6 9 7 2
types.py
in shopping-agent/core/shopping_agent
127 5 8 6 2
types.py
in commerce-common/commerce_common
41 3 8 20 3
registry.py
in merchant-agent/core/merchant_agent/tools
688 6 6 1 1
merchant_mcp_server.py
in merchant-agent/managed-agents/merchant-mcp-server
223 5 6 3 2
agent.py
in shopping-agent/runtime-agent-sdk/shopping_agent_sdk
78 4 5 6 2
config.py
in shopping-agent/core/shopping_agent
104 1 5 5 5
storefront_mcp_server.py
in shopping-agent/managed-agents/storefront-mcp-server
137 4 5 4 2
grounding.py
in merchant-agent/core/merchant_agent
51 3 5 10 3
registry.py
in shopping-agent/core/shopping_agent/tools
619 4 4 1 1
grounding.py
in shopping-agent/core/shopping_agent
53 3 3 6 1
config.py
in commerce-common/commerce_common
39 2 3 8 2
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...