File Complexity Overall
  • There are 165 files with units, with 14,744 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 3 complex files (McCabe index sum 126-250; 2,066 lines of code)
    • 7 medium complex files (McCabe index sum 51-125; 2,495 lines of code)
    • 18 slightly complex files (McCabe index sum 26-50; 2,976 lines of code)
    • 137 simple files (McCabe index sum 1-25; 7,207 lines of code)
  • 76 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 14% | 16% | 20% | 48%
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% | 24% | 17% | 35% | 21%
js0% | 78% | 21% | 0% | 0%
tsx0% | 0% | 31% | 3% | 64%
ts0% | 0% | 0% | 27% | 72%
cjs0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
agent-battle0% | 46% | 19% | 25% | 8%
agent-decomposition0% | 27% | 12% | 40% | 19%
production-ready-agent0% | 0% | 25% | 4% | 69%
how-we-claude-code0% | 0% | 30% | 18% | 51%
ship-your-first-managed-agent0% | 0% | 26% | 0% | 73%
research-desk0% | 0% | 0% | 17% | 82%
eval-driven-agent-development0% | 0% | 0% | 44% | 55%
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
bot.js
in agent-battle/bot
984 28 212 22 29
my_agent.py
in agent-battle
614 18 153 25 22
cma.py
in agent-decomposition/agents
468 23 152 32 44
probes.py
in agent-battle/harness
405 14 104 26 13
graders.py
in agent-decomposition/evals
204 16 94 46 27
ReplayPage.tsx
in how-we-claude-code/phase-3-verify/src/verify/harness
581 11 79 14 42
cast.js
in agent-battle/event/public/js
268 15 69 26 14
ChatPanel.tsx
in production-ready-agent/solution/components
430 7 61 14 38
ChatPanel.tsx
in production-ready-agent/starter/components
430 7 61 14 38
provided.py
in ship-your-first-managed-agent
177 6 57 32 37
sandbox_tools.py
in agent-decomposition/agents
152 18 50 33 10
replay.py
in agent-battle/harness
126 7 45 36 29
client.py
in agent-battle/harness
131 11 41 31 12
tools.py
in agent-decomposition/agents/before
160 17 40 25 7
seed.py
in agent-decomposition/data
221 9 37 17 8
DeskChat.tsx
in research-desk/src/components
168 3 36 21 25
logging_.py
in agent-battle/harness
201 12 34 17 8
run.py
in agent-decomposition/evals
152 7 34 22 13
orchestrator.ts
in research-desk/solutions/src/lib
180 8 33 18 8
recorder.ts
in how-we-claude-code/phase-3-verify/src/verify/harness
173 12 33 19 6
agent.py
in agent-battle/harness
355 10 32 9 11
parse-pptx.ts
in eval-driven-agent-development/src
185 7 30 16 12
eval-runner.ts
in eval-driven-agent-development/src
203 6 29 14 9
orchestrator.ts
in research-desk/src/lib
158 6 28 18 7
leaderboard.py
in agent-battle/harness
82 11 27 33 5
chat.ts
in production-ready-agent/solution/lib
80 2 26 33 25
chat.ts
in production-ready-agent/starter/lib
80 2 26 33 25
runner.ts
in how-we-claude-code/phase-3-verify/src/verify/core
169 14 26 15 4
verify.py
in agent-battle/harness
71 2 24 34 23
memory.ts
in research-desk/src/lib
62 6 23 37 6
analysis.ts
in research-desk/src/lib
151 8 23 15 10
generate_log.py
in ship-your-first-managed-agent/data
123 9 23 19 6
analysis.ts
in research-desk/solutions/src/lib
159 7 22 14 10
UnitPage.tsx
in how-we-claude-code/phase-3-verify/src/verify/harness
140 3 21 15 19
prompts.py
in agent-battle/harness
75 8 21 28 6
create-slides.ts
in eval-driven-agent-development/src
129 2 21 16 13
a11y.ts
in how-we-claude-code/phase-3-verify/src/verify/verifiers
88 3 20 23 9
common.py
in agent-decomposition/agents
81 9 20 25 5
config.ts
in research-desk/src/lib
89 8 19 21 4
seed.ts
in research-desk/scripts
127 3 18 14 11
page.tsx
in research-desk/src/app
63 1 18 29 18
provision.ts
in research-desk/solutions/src/lib
176 7 16 9 4
sessions.ts
in research-desk/solutions/src/lib
108 6 16 15 9
sessions.ts
in research-desk/src/lib
104 6 16 15 9
relay-client.cjs
in agent-battle/bot
71 3 16 23 13
subagents.py
in agent-decomposition/agents/before
66 5 16 24 8
DeploymentsPanel.tsx
in research-desk/src/components
117 2 15 13 10
visibleAct.ts
in how-we-claude-code/phase-3-verify/src/verify/harness
83 8 15 18 4
agent_complete.py
in ship-your-first-managed-agent
77 7 15 19 6
report.py
in agent-decomposition/evals
34 4 15 44 7
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...