This page records the Bun module partitioning and feature-theme clustering of the semantically renamed bundle claude-code-pkg/src/entrypoints/cli.renamed.js. It is a research-grade index: every line range below is a concrete anchor a reader can open in the file. Themes here back the higher-level narrative pages under docs/00-start-here/ through docs/06-agents-automation/; the entry point for product-level reading is the main feature map.
How to read this page
cli.renamed.js is the formatted-and-renamed output produced by scripts/normalize-cli-js.mjs and scripts/semantic-rename-cli.mjs. The renamed file wraps everything in one top-level function expression that contains 23,365 statements. Bun emits each original ESM module as a var loaderName = T(() => { /* setup */ }); loader, preceded by the module’s forward function / class / var declarations and j$(module, { semanticName: () => obfuscatedName, ... }) export tables.
The script scripts/extract-cli-module-map.mjs walks every loader boundary, attaches the surrounding declarations and export tables to that loader, then classifies each module by keyword matching on the semantic names. Outputs:
data/cli-modules.json — every module partition with loader line, declared names, export table, and counts.
1-based lines in claude-code-pkg/src/entrypoints/cli.renamed.js
Loader line = location of the var loaderName = T(...) statement. Function definitions usually sit a few hundred lines earlier in the same partition.
Coverage summary
Metric
Value
Top-level statements in wrapping IIFE
23,365
Bun module loaders (T(() => { ... }))
3,814
Modules with explicit j$ export table
387
Modules with any semantic decl or export
918
Modules currently classified into a theme
232
Modules with semantic info but no theme yet
686
Fully opaque modules (still all minified)
2,896
Themes recognized
37
Opaque modules are mostly small vendor helpers or inlined arrow chains whose surface stayed minified after the semantic rename pass. They are tracked but not promoted into the narrative docs.
Claude Code product themes
Each row links a Claude Code subsystem to its loader line range in cli.renamed.js and the docs page that already explains the runtime behavior. Open the file at the listed line, then scroll up to find the corresponding function / class declarations that the loader assembles.
Session, transcript, agent metadata, and teammate IPC
Third-party dependencies (bundled, not Claude Code logic)
These themes correspond to vendored runtime libraries embedded in cli.renamed.js. They are recorded here so reverse-engineers can skip them quickly and not mistake them for product code.
For the build under claude-code-pkg/ checked in here, all 23 anchors resolve. Replacement bundles regenerated by scripts/semantic-rename-cli.mjs should reproduce the same names while line numbers may shift.
Caveats
Each loader fingerprint is var X = T(() => { ... }). Statements between two loaders are attributed to the second loader (the module being initialized). Forward declarations for a module therefore precede its loader, sometimes by several thousand lines (e.g. the Session hub forwards from line 2015 forward but its loader sits at 3398).
Themes are identified by keyword regexes on the per-module set of semantic names. They have priority order; the first match wins. Some modules contain symbols from multiple themes (e.g. session hub + memory). Reclassify by adjusting the patterns in scripts/extract-cli-module-map.mjs.
686 modules with semantic content remain unclassified because they hold subsystem-specific names we have not yet promoted to a theme (proxy auth helpers, slash-command tables, etc.). They are recorded verbatim in data/cli-modules.json and are good seeds for further atlas passes.
2,896 modules are still fully opaque (no semantic names yet) and are intentionally not surfaced here. Further rename evidence (additional call-path patterns, registry inspection) can lift more of them; see the rename pipeline in scripts/semantic-rename-cli.mjs for the existing evidence classes.