CCB Config
This is the private agentroles.ccb_self built-in CCB configuration skill. It
owns .ccb/ccb.config design, editing, validation, reload readiness, and
affected-agent reporting. It is not a global inherited skill for non-self
agents.
Read references/config-contracts.md before complex edits or reload-impact
analysis.
The canonical skill name remains ccb-config. The full skill lives in this
Role source and must not also be stored in common inherited skill folders.
Scope
Allowed:
- Edit project
.ccb/ccb.config.
- Design windows topology, agent names, providers, role bindings, managed tool
windows, sidebar layout, workspaces, provider profiles, model/base URL/env-var
references, provider command templates, startup args, permission, restore,
queue policy, and watch paths.
- Prefer
version = 2 [windows] topology for new configs and structural
edits unless the user explicitly asks for compact syntax.
- Update config to reference already configured or user-supplied fallback
provider/model/base URL/profile/env-var references after provider/API
failure.
- Run
ccb config validate after every edit.
- Review protected project command fields and record external exact-value
approval with
ccb config approve-commands only after explicit approval.
- Run
ccb reload --dry-run before reload materialization.
- Execute
ccb reload when validation passed, dry-run was reviewed, the plan
is supported, and the user explicitly wants the change materialized.
- Identify affected agents that may need post-reload guarded runtime refresh.
Forbidden:
- Do not edit
.ccb/ccb_memory.md, .ccb/agents/<agent>/memory.md, provider
homes, installed role stores, generated memory, lifecycle, lease, runtime,
mailbox, provider session, or tmux state.
- If the user asks for dynamic workflow roles, task lanes, or mounted-agent
memory overlays, route to
ccb-workflow-orchestrate; this skill still owns
only .ccb/ccb.config and reload-readiness.
- Do not execute
ccb restart, ccb kill, ccb clear, or ccb repair from
this skill.
- Do not run raw tmux commands.
- Do not infer pane health from config.
- Do not read, print, store, search for, scrape, borrow, or use API keys.
Project Command Trust Gate
The protected fields are tool_windows.<name>.command and
agents.<name>.provider_command_template.
Before startup or reload can execute either field:
- Show the exact field and command value to the user without executing it.
- Check that it matches the user's intended local tool or Provider launch.
- With explicit approval intent, run:
ccb config approve-commands
- Verify CCB accepted the external receipt, then continue with normal
validation/reload gates.
Safe mode does not bypass this gate. Neither do script mode, validation,
project ownership, or a previous receipt for a different value. Never edit the
receipt store directly.
Required Workflow
- Resolve config source and target. Project config
.ccb/ccb.config is the
normal target; user config ~/.ccb/ccb.config is out of scope unless the
user explicitly asks.
- Read current config and classify active shape: compact, hybrid, or
version = 2 [windows] topology.
- Preserve existing agent names, provider choices, role bindings, worktree
settings, labels, comments, and advanced overrides unless the user asks to
change them.
- Before editing an existing project config, create one dated pre-edit backup
next to it, for example
cp .ccb/ccb.config .ccb/ccb.config.bak.$(date +%s). Restore only from the
backup created for this edit.
- Make the smallest disk edit that satisfies the user request.
- If a protected command field exists or changed, complete the Project Command
Trust Gate before any execution path.
- Run:
ccb config validate
- If validation fails, report the full validation error, do not run reload,
and do not claim recovery is complete. Restore the previous config when a
reliable pre-edit copy exists; otherwise stop and ask for the user's
preferred correction or rollback.
- If the user wants the change materialized and validation passed, run:
ccb reload --dry-run
- Classify dry-run output:
- no change
- reloadable presentation/config change
- role asset/tool materialization change
- topology/provider/startup change with affected agents
- blocked or unsupported reload
- Execute
ccb reload only when gates pass and materialization intent is
explicit.
- Re-check the mounted daemon graph after reload.
- Report affected agents and hand post-reload runtime refresh decisions to
ccb-self-recover.
Affected-Agent Rules
Mark an agent as affected when the change may alter:
- provider command or command template
- provider profile or inherited provider configuration
- model, base URL, API route, or env-var reference
- role id, role version, memory, skill, prompt, or tool materialization
- workspace path or worktree mode
- startup args, permission, restore, queue policy, or watch paths
Do not restart affected agents from this skill. Return a handoff:
Affected agents: ...
Reload status: ...
Needs recover check: yes|no
Reason: ...
Suggested next skill: ccb-self-recover
Role Binding
Use canonical Role ids such as agentroles.archi and
agentroles.ccb_self. The project-local agent name remains the ask target.
Recommended binding:
[windows]
ops = "agentroles.ccb_self:codex"
If validation reports a missing installed role, tell the user to install it:
ccb roles install agentroles.ccb_self
Do not copy role memory or skills into .ccb manually.
Reporting
Summarize:
- config source and disk path
- exact files changed
- validation result
- dry-run result
- whether reload was run
- affected agents
- blocked runtime actions for
ccb-self-recover
1---2name: ccb-config3description: Private built-in CCB configuration skill for agentroles.ccb_self. Design, edit, validate, and prepare reloads for .ccb/ccb.config, role bindings, providers, windows, workspaces, tool windows, sidebar, and provider startup inputs. Use only inside ccb_self; non-self agents should delegate CCB config changes to ccb_self.4---56# CCB Config78This is the private `agentroles.ccb_self` built-in CCB configuration skill. It9owns `.ccb/ccb.config` design, editing, validation, reload readiness, and10affected-agent reporting. It is not a global inherited skill for non-self11agents.1213Read `references/config-contracts.md` before complex edits or reload-impact14analysis.1516The canonical skill name remains `ccb-config`. The full skill lives in this17Role source and must not also be stored in common inherited skill folders.1819## Scope2021Allowed:2223- Edit project `.ccb/ccb.config`.24- Design windows topology, agent names, providers, role bindings, managed tool25 windows, sidebar layout, workspaces, provider profiles, model/base URL/env-var26 references, provider command templates, startup args, permission, restore,27 queue policy, and watch paths.28- Prefer `version = 2` `[windows]` topology for new configs and structural29 edits unless the user explicitly asks for compact syntax.30- Update config to reference already configured or user-supplied fallback31 provider/model/base URL/profile/env-var references after provider/API32 failure.33- Run `ccb config validate` after every edit.34- Review protected project command fields and record external exact-value35 approval with `ccb config approve-commands` only after explicit approval.36- Run `ccb reload --dry-run` before reload materialization.37- Execute `ccb reload` when validation passed, dry-run was reviewed, the plan38 is supported, and the user explicitly wants the change materialized.39- Identify affected agents that may need post-reload guarded runtime refresh.4041Forbidden:4243- Do not edit `.ccb/ccb_memory.md`, `.ccb/agents/<agent>/memory.md`, provider44 homes, installed role stores, generated memory, lifecycle, lease, runtime,45 mailbox, provider session, or tmux state.46- If the user asks for dynamic workflow roles, task lanes, or mounted-agent47 memory overlays, route to `ccb-workflow-orchestrate`; this skill still owns48 only `.ccb/ccb.config` and reload-readiness.49- Do not execute `ccb restart`, `ccb kill`, `ccb clear`, or `ccb repair` from50 this skill.51- Do not run raw tmux commands.52- Do not infer pane health from config.53- Do not read, print, store, search for, scrape, borrow, or use API keys.5455## Project Command Trust Gate5657The protected fields are `tool_windows.<name>.command` and58`agents.<name>.provider_command_template`.5960Before startup or reload can execute either field:61621. Show the exact field and command value to the user without executing it.632. Check that it matches the user's intended local tool or Provider launch.643. With explicit approval intent, run:6566```bash67ccb config approve-commands68```69704. Verify CCB accepted the external receipt, then continue with normal71 validation/reload gates.7273Safe mode does not bypass this gate. Neither do script mode, validation,74project ownership, or a previous receipt for a different value. Never edit the75receipt store directly.7677## Required Workflow78791. Resolve config source and target. Project config `.ccb/ccb.config` is the80 normal target; user config `~/.ccb/ccb.config` is out of scope unless the81 user explicitly asks.822. Read current config and classify active shape: compact, hybrid, or83 `version = 2` `[windows]` topology.843. Preserve existing agent names, provider choices, role bindings, worktree85 settings, labels, comments, and advanced overrides unless the user asks to86 change them.874. Before editing an existing project config, create one dated pre-edit backup88 next to it, for example89 `cp .ccb/ccb.config .ccb/ccb.config.bak.$(date +%s)`. Restore only from the90 backup created for this edit.915. Make the smallest disk edit that satisfies the user request.926. If a protected command field exists or changed, complete the Project Command93 Trust Gate before any execution path.947. Run:9596```bash97ccb config validate98```991008. If validation fails, report the full validation error, do not run reload,101 and do not claim recovery is complete. Restore the previous config when a102 reliable pre-edit copy exists; otherwise stop and ask for the user's103 preferred correction or rollback.1049. If the user wants the change materialized and validation passed, run:105106```bash107ccb reload --dry-run108```10911010. Classify dry-run output:111 - no change112 - reloadable presentation/config change113 - role asset/tool materialization change114 - topology/provider/startup change with affected agents115 - blocked or unsupported reload11611. Execute `ccb reload` only when gates pass and materialization intent is117 explicit.11812. Re-check the mounted daemon graph after reload.11913. Report affected agents and hand post-reload runtime refresh decisions to120 `ccb-self-recover`.121122## Affected-Agent Rules123124Mark an agent as affected when the change may alter:125126- provider command or command template127- provider profile or inherited provider configuration128- model, base URL, API route, or env-var reference129- role id, role version, memory, skill, prompt, or tool materialization130- workspace path or worktree mode131- startup args, permission, restore, queue policy, or watch paths132133Do not restart affected agents from this skill. Return a handoff:134135```text136Affected agents: ...137Reload status: ...138Needs recover check: yes|no139Reason: ...140Suggested next skill: ccb-self-recover141```142143## Role Binding144145Use canonical Role ids such as `agentroles.archi` and146`agentroles.ccb_self`. The project-local agent name remains the ask target.147148Recommended binding:149150```toml151[windows]152ops = "agentroles.ccb_self:codex"153```154155If validation reports a missing installed role, tell the user to install it:156157```bash158ccb roles install agentroles.ccb_self159```160161Do not copy role memory or skills into `.ccb` manually.162163## Reporting164165Summarize:166167- config source and disk path168- exact files changed169- validation result170- dry-run result171- whether reload was run172- affected agents173- blocked runtime actions for `ccb-self-recover`