Skip to content

refactor: drop cc_ prefix from module names#144

Merged
chauncygu merged 1 commit into
mainfrom
rename-drop-cc-prefix
Jun 16, 2026
Merged

refactor: drop cc_ prefix from module names#144
chauncygu merged 1 commit into
mainfrom
rename-drop-cc-prefix

Conversation

@chauncygu

Copy link
Copy Markdown
Contributor

Rename the four cc_-prefixed modules to plain names for readability:

cc_config.py -> config.py
cc_daemon/ -> daemon/
cc_kernel/ -> kernel/
cc_mcp/ -> mcp_client/

The MCP client is named mcp_client/ rather than bare mcp/ to avoid shadowing Python's namespace and the modelcontextprotocol package. Test files test_cc_daemon_.py are renamed to test_daemon_.py to match.

References updated across .py, docs/, RFCs, README, CONTRIBUTING, pyproject.toml (py-modules + packages.find), and ci.yml using whole-word matching so unrelated tokens (cc_bin, cc_script, cv_acc_mean, cc_tool_call_debug, etc.) are left untouched.

Fix two name-collision regressions surfaced by the rename, where the now-generic module name clashed with a same-scope local variable:

  • tests/test_setup_wizard.py: import config shadowed the config dict param of the wizard helper; alias the module to _config_mod.
  • examples/kernel_e2e_smoke.py: with kernel.Kernel.open() as kernel self-shadowed the module; and _run_demo's kernel instance param collided with module-level kernel.ScheduleSpec/SandboxPolicy. Bind the context var as kern and import the classes at module level.

Full suite: 2449 passed, 3 skipped.

Rename the four cc_-prefixed modules to plain names for readability:

  cc_config.py -> config.py
  cc_daemon/   -> daemon/
  cc_kernel/   -> kernel/
  cc_mcp/      -> mcp_client/

The MCP client is named mcp_client/ rather than bare mcp/ to avoid
shadowing Python's namespace and the modelcontextprotocol package.
Test files test_cc_daemon_*.py are renamed to test_daemon_*.py to match.

References updated across .py, docs/, RFCs, README, CONTRIBUTING,
pyproject.toml (py-modules + packages.find), and ci.yml using
whole-word matching so unrelated tokens (cc_bin, cc_script, cv_acc_mean,
cc_tool_call_debug, etc.) are left untouched.

Fix two name-collision regressions surfaced by the rename, where the
now-generic module name clashed with a same-scope local variable:

  - tests/test_setup_wizard.py: `import config` shadowed the `config`
    dict param of the wizard helper; alias the module to `_config_mod`.
  - examples/kernel_e2e_smoke.py: `with kernel.Kernel.open() as kernel`
    self-shadowed the module; and `_run_demo`'s `kernel` instance param
    collided with module-level `kernel.ScheduleSpec`/`SandboxPolicy`.
    Bind the context var as `kern` and import the classes at module level.

Full suite: 2449 passed, 3 skipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chauncygu chauncygu merged commit c02dfa9 into main Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant