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; role projection must keep this
private role skill from being merged with or exposed as a global inherited
same-name skill.
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.
- 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.
- 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.
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.
- 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 projection/tool 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 projection
- 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 Pack 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"
When a local agent name is required, keep provider authority in [windows] and
write only the role overlay:
[windows]
ops = "selfops:codex"
[agents.selfops]
role = "agentroles.ccb_self"
Do not repeat [windows]-owned provider, workspace_mode = "inplace", or
workspace_mode = "git-worktree" in [agents.<name>] overlays. Treat
ccb config validate style warnings as cleanup work before reload.
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---5
6# CCB Config
7
8This is the private `agentroles.ccb_self` built-in CCB configuration skill. It
9owns `.ccb/ccb.config` design, editing, validation, reload readiness, and
10affected-agent reporting. It is not a global inherited skill for non-self
11agents.
12
13Read `references/config-contracts.md` before complex edits or reload-impact
14analysis.
15
16The canonical skill name remains `ccb-config`; role projection must keep this
17private role skill from being merged with or exposed as a global inherited
18same-name skill.
19
20## Scope
21
22Allowed:
23
24- Edit project `.ccb/ccb.config`.
25- Design windows topology, agent names, providers, role bindings, managed tool
26 windows, sidebar layout, workspaces, provider profiles, model/base URL/env-var
27 references, provider command templates, startup args, permission, restore,
28 queue policy, and watch paths.
29- Prefer `version = 2` `[windows]` topology for new configs and structural
30 edits unless the user explicitly asks for compact syntax.
31- Update config to reference already configured or user-supplied fallback
32 provider/model/base URL/profile/env-var references after provider/API
33 failure.
34- Run `ccb config validate` after every edit.
35- Run `ccb reload --dry-run` before reload materialization.
36- Execute `ccb reload` when validation passed, dry-run was reviewed, the plan
37 is supported, and the user explicitly wants the change materialized.
38- Identify affected agents that may need post-reload guarded runtime refresh.
39
40Forbidden:
41
42- Do not edit `.ccb/ccb_memory.md`, `.ccb/agents/<agent>/memory.md`, provider
43 homes, installed role stores, generated memory, lifecycle, lease, runtime,
44 mailbox, provider session, or tmux state.
45- Do not execute `ccb restart`, `ccb kill`, `ccb clear`, or `ccb repair` from
46 this skill.
47- Do not run raw tmux commands.
48- Do not infer pane health from config.
49- Do not read, print, store, search for, scrape, borrow, or use API keys.
50
51## Required Workflow
52
531. Resolve config source and target. Project config `.ccb/ccb.config` is the
54 normal target; user config `~/.ccb/ccb.config` is out of scope unless the
55 user explicitly asks.
562. Read current config and classify active shape: compact, hybrid, or
57 `version = 2` `[windows]` topology.
583. Preserve existing agent names, provider choices, role bindings, worktree
59 settings, labels, comments, and advanced overrides unless the user asks to
60 change them.
614. Before editing an existing project config, create one dated pre-edit backup
62 next to it, for example
63 `cp .ccb/ccb.config .ccb/ccb.config.bak.$(date +%s)`. Restore only from the
64 backup created for this edit.
655. Make the smallest disk edit that satisfies the user request.
666. Run:
67
68```bash
69ccb config validate
70```
71
727. If validation fails, report the full validation error, do not run reload,
73 and do not claim recovery is complete. Restore the previous config when a
74 reliable pre-edit copy exists; otherwise stop and ask for the user's
75 preferred correction or rollback.
768. If the user wants the change materialized and validation passed, run:
77
78```bash
79ccb reload --dry-run
80```
81
829. Classify dry-run output:
83 - no change
84 - reloadable presentation/config change
85 - role projection/tool change
86 - topology/provider/startup change with affected agents
87 - blocked or unsupported reload
8810. Execute `ccb reload` only when gates pass and materialization intent is
89 explicit.
9011. Re-check the mounted daemon graph after reload.
9112. Report affected agents and hand post-reload runtime refresh decisions to
92 `ccb-self-recover`.
93
94## Affected-Agent Rules
95
96Mark an agent as affected when the change may alter:
97
98- provider command or command template
99- provider profile or inherited provider configuration
100- model, base URL, API route, or env-var reference
101- role id, role version, memory, skill, prompt, or tool projection
102- workspace path or worktree mode
103- startup args, permission, restore, queue policy, or watch paths
104
105Do not restart affected agents from this skill. Return a handoff:
106
107```text
108Affected agents: ...
109Reload status: ...
110Needs recover check: yes|no
111Reason: ...
112Suggested next skill: ccb-self-recover
113```
114
115## Role Binding
116
117Use canonical Role Pack ids such as `agentroles.archi` and
118`agentroles.ccb_self`. The project-local agent name remains the ask target.
119
120Recommended binding:
121
122```toml
123[windows]
124ops = "agentroles.ccb_self:codex"
125```
126
127When a local agent name is required, keep provider authority in `[windows]` and
128write only the role overlay:
129
130```toml
131[windows]
132ops = "selfops:codex"
133
134[agents.selfops]
135role = "agentroles.ccb_self"
136```
137
138Do not repeat `[windows]`-owned `provider`, `workspace_mode = "inplace"`, or
139`workspace_mode = "git-worktree"` in `[agents.<name>]` overlays. Treat
140`ccb config validate` style warnings as cleanup work before reload.
141
142If validation reports a missing installed role, tell the user to install it:
143
144```bash
145ccb roles install agentroles.ccb_self
146```
147
148Do not copy role memory or skills into `.ccb` manually.
149
150## Reporting
151
152Summarize:
153
154- config source and disk path
155- exact files changed
156- validation result
157- dry-run result
158- whether reload was run
159- affected agents
160- blocked runtime actions for `ccb-self-recover`