feat: support CCB_CLAUDE_MD_MODE=route to reduce CLAUDE.md context bloat#120
Merged
bfly123 merged 1 commit intobfly123:mainfrom Mar 10, 2026
Merged
Conversation
Add CCB_CLAUDE_MD_MODE env var with two modes: - "inline" (default): full config injected into CLAUDE.md (~57 lines), backward compatible - "route": minimal 3-line pointer in CLAUDE.md, full config written to ~/.claude/rules/ccb-config.md This reduces context pollution for solo development sessions where CCB multi-agent collaboration rules are not needed. Closes bfly123#113
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #113
Adds
CCB_CLAUDE_MD_MODEenvironment variable (Proposal A from the issue) to support externalizing CCB config fromCLAUDE.md.Great problem analysis by @bookandlover in the original issue — this PR implements the approach discussed there.
What it does
Two modes controlled by
CCB_CLAUDE_MD_MODE:inline(default) — current behavior, full config in CLAUDE.md (~57 lines). Fully backward compatible, nothing changes for existing users.route— minimal 3-line pointer in CLAUDE.md, full config written to~/.claude/rules/ccb-config.mdUsage
Switching between modes is safe — re-running install with a different mode updates the
<!-- CCB_CONFIG_START -->block in-place.Changes
install.shinstall_claude_md_config()— select template based onCCB_CLAUDE_MD_MODEenv varinstall.shusage()— document new env varinstall.shinstall_all()— output message shows active modeinstall.shuninstall_claude_md_config()— clean up external config fileconfig/claude-md-ccb-route.mdTest plan
./install.sh install— default inline behavior unchangedCCB_CLAUDE_MD_MODE=route ./install.sh install— verify minimal CLAUDE.md + full~/.claude/rules/ccb-config.md./install.sh uninstall— verify both CLAUDE.md block and external file cleaned up概要
关闭 #113
新增
CCB_CLAUDE_MD_MODE环境变量,支持将 CCB 配置从 CLAUDE.md 外部化。inline(默认):行为不变,完全向后兼容route:CLAUDE.md 只保留 3 行指针,完整配置写入~/.claude/rules/ccb-config.md感谢 @bookandlover 在 issue 中的详细分析和方案设计。