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 2.1.215 renamed file wraps everything in one top-level function expression containing 32,157 statements. Bun emits each original ESM module through a minified lazy-loader helper (named b in this build), preceded by forward function / class / var declarations and an export helper (named nt here) whose second argument maps semantic export names to identifier-returning getters.
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 structurally recognized lazy-loader call. Function definitions usually sit earlier in the same partition.
Coverage summary
Metric
Value
Top-level statements in wrapping IIFE
32,157
Bun module loaders
4,820
Modules with an explicit structural export table
564
Modules with any semantic declaration or export
1,208
Modules currently classified into a theme
228
Modules with semantic info but no theme yet
980
Fully opaque modules (still all minified)
3,612
Populated themes recognized
36
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 2.1.215 build under claude-code-pkg/, these representative semantic anchors resolve. Replacement bundles regenerated by scripts/semantic-rename-cli.mjs can move or lose individual aliases as export/minifier surfaces change.
Caveats
Loader and export helper names are minified and changed from T/j$ to b/nt in this update. The extractor detects both structures rather than depending on those names. Statements between two loaders are attributed to the second loader (the module being initialized).
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.
980 modules with semantic content remain unclassified because they hold subsystem-specific names not yet promoted to a theme. They are recorded verbatim in data/cli-modules.json and are good seeds for further atlas passes.
3,612 modules are still fully opaque (no semantic names yet) and are intentionally not surfaced here. Further rename evidence can lift more of them; see the rename pipeline in scripts/semantic-rename-cli.mjs for the existing evidence classes.