File Complexity Overall
  • There are 2,222 files with units, with 316,626 lines of code.
    • 16 very complex files (McCabe index sum 251+; 24,065 lines of code)
    • 68 complex files (McCabe index sum 126-250; 46,815 lines of code)
    • 310 medium complex files (McCabe index sum 51-125; 95,070 lines of code)
    • 359 slightly complex files (McCabe index sum 26-50; 60,555 lines of code)
    • 1,469 simple files (McCabe index sum 1-25; 90,121 lines of code)
  • 2,975 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system7% | 14% | 30% | 19% | 28%
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
ts5% | 14% | 33% | 19% | 26%
tsx12% | 18% | 11% | 18% | 40%
py61% | 0% | 23% | 9% | 4%
h0% | 0% | 72% | 15% | 12%
js0% | 0% | 57% | 0% | 42%
c0% | 0% | 0% | 95% | 4%
cpp0% | 0% | 0% | 63% | 36%
cjs0% | 0% | 0% | 100% | 0%
nsh0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
packages6% | 14% | 30% | 19% | 29%
scripts12% | 24% | 35% | 12% | 15%
apps8% | 2% | 22% | 23% | 42%
snapshots52% | 42% | 0% | 0% | 4%
python0% | 0% | 52% | 43% | 4%
benchmarks0% | 0% | 10% | 49% | 39%
.agents0% | 0% | 100% | 0% | 0%
website0% | 0% | 0% | 32% | 67%
native0% | 0% | 0% | 80% | 19%
.github0% | 0% | 0% | 100% | 0%
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
analyzer.ts
in packages/typert/generator/src
2951 157 1001 34 38
TrajectoryTable.tsx
in packages/client/ui-trajectory/src/client
3392 88 659 19 166
domain.ts
in packages/schedule/schedule/src
1626 121 590 36 80
2501 83 505 20 79
main.ts
in apps/desktop/src
1211 47 416 34 132
layout.ts
in packages/client/ui-trajectory/src/client
1070 57 346 32 46
suite.ts
in packages/test-support/session-snapshot/src
1207 59 340 28 67
bootstrap.py
in packages/experimental/ptc-runtime-python/py
986 49 301 31 43
payload-validation.ts
in packages/session/session-format-v0-to-v1/src
1006 49 299 30 89
index.ts
in packages/session/session-persistence-jsonl/src
1342 88 292 22 13
headless.snapshot.ts
in snapshots/session
1201 73 286 24 36
878 29 286 33 51
TaskDetail.tsx
in packages/client/ui-schedule/src/client
1667 64 285 17 93
index.ts
in packages/api/gateway/src
1324 66 284 21 19
index.ts
in packages/test-support/llm-replay/src
888 49 274 31 21
815 35 267 33 50
run-gates.ts
in scripts
1264 53 250 20 41
index.ts
in packages/skill/skill-filesystem/src
884 61 246 28 14
PluginManagerPage.tsx
in packages/client/ui-plugin-manager/src/client
1442 73 227 16 57
emitter.ts
in packages/typert/generator/src
1028 50 222 22 20
manager-store.ts
in packages/client/ui-plugin-manager/src/client
846 43 220 26 21
index.ts
in packages/core/session/src
811 31 217 27 34
index.ts
in packages/extensions/cordis-host-runner/src
1035 48 213 21 23
439 20 210 48 46
602 36 209 35 34
resolver.ts
in packages/boot/app-boot/src/profile-resolution
767 35 209 27 44
guard.ts
in packages/extensions/cordis-host-runner/src
614 38 204 33 59
fsio.ts
in packages/fs/fs-local/src
550 69 203 37 13
832 22 202 24 67
assembler.ts
in packages/client/ui-conversation/src/client/conversation
1005 41 202 20 23
migration.ts
in packages/session/session-format-v1-to-v2/src
645 56 200 31 16
partial-json.ts
in packages/util/values/src
531 30 194 37 30
scoped-slots.tsx
in packages/client/ui-renderer/src/client
1208 45 193 16 24
index.ts
in packages/credentials/credentials-local/src
540 58 193 36 15
json-schema.ts
in packages/core/tools/src
507 24 191 38 57
index.ts
in packages/core/tools/src
1129 52 191 17 13
index.ts
in packages/session-query/session-query-sqlite/src
996 61 191 19 25
session.ts
in packages/api/session-controller/src/client/sessions
665 38 191 29 20
index.ts
in packages/client/modules/src
847 52 188 22 14
1597 48 185 12 21
chat-snapshot-builder.ts
in packages/client/ui-chat/src/client/conversation-nodes
1034 44 183 18 22
index.ts
in packages/experimental/auto-review/src
620 31 182 29 43
sdk.snapshot.ts
in snapshots/sdk
987 51 178 18 12
memory.ts
in packages/experimental/webworker-runtime/src/storage
744 71 177 24 13
projector.ts
in packages/boot/app-boot/src/config-schema
421 6 176 42 118
surface.ts
in packages/core/session/src
511 28 174 34 36
index.ts
in packages/credentials/deepseek-account-platform/src
561 35 174 31 26
918 58 172 19 12
generation.ts
in packages/session/session-persistence-jsonl/src
895 52 172 19 12
payload.ts
in packages/session/session-format-v2-to-v3/src
305 16 167 55 31
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...