Skip to content

Commit d863e1a

Browse files
committed
refine context flows and prompt guidance surfaces
1 parent 93f5c39 commit d863e1a

44 files changed

Lines changed: 1003 additions & 1411 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 108 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88

99
jobs:
10-
build-and-publish:
10+
verify-linux:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
@@ -38,10 +38,8 @@ jobs:
3838
python - <<'PY'
3939
import os
4040
import re
41-
import sys
4241
4342
def _read_pyproject_version(path: str = "pyproject.toml") -> str:
44-
# Keep this check dependency-free and compatible with older Python versions.
4543
in_project = False
4644
with open(path, "r", encoding="utf-8") as f:
4745
for raw in f:
@@ -147,6 +145,113 @@ jobs:
147145
print("OK: bundled web UI + help playbook + MCP handshake")
148146
PY
149147
148+
- name: Upload verified dist artifact
149+
uses: actions/upload-artifact@v4
150+
with:
151+
name: release-dist
152+
path: dist/*
153+
if-no-files-found: error
154+
155+
verify-platform-smoke:
156+
needs: verify-linux
157+
runs-on: ${{ matrix.os }}
158+
strategy:
159+
fail-fast: false
160+
matrix:
161+
include:
162+
- os: windows-latest
163+
label: Windows
164+
run_windows_pty: true
165+
- os: macos-latest
166+
label: macOS
167+
run_windows_pty: false
168+
defaults:
169+
run:
170+
shell: bash
171+
steps:
172+
- name: Checkout
173+
uses: actions/checkout@v4
174+
175+
- name: Set up Python
176+
uses: actions/setup-python@v5
177+
with:
178+
python-version: '3.11'
179+
180+
- name: Install smoke deps
181+
run: |
182+
python -m pip install -U pip pytest
183+
184+
- name: Run Windows PTY smoke tests
185+
if: matrix.run_windows_pty
186+
run: |
187+
python -m pip install -e .
188+
python -m pytest -q tests/test_socket_special_ops.py tests/test_windows_pty_backend.py
189+
190+
- name: Download verified dist artifact
191+
uses: actions/download-artifact@v4
192+
with:
193+
name: release-dist
194+
path: dist
195+
196+
- name: Install verified wheel
197+
run: |
198+
python -m pip install --force-reinstall dist/*.whl
199+
200+
- name: Smoke test installed wheel on ${{ matrix.label }}
201+
run: |
202+
cccc version
203+
python - <<'PY'
204+
import json
205+
import subprocess
206+
207+
proc = subprocess.Popen(
208+
["cccc", "mcp"],
209+
stdin=subprocess.PIPE,
210+
stdout=subprocess.PIPE,
211+
stderr=subprocess.PIPE,
212+
text=True,
213+
)
214+
assert proc.stdin is not None
215+
assert proc.stdout is not None
216+
217+
proc.stdin.write(json.dumps({"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {}}) + "\n")
218+
proc.stdin.flush()
219+
init_resp = json.loads(proc.stdout.readline().strip())
220+
assert init_resp.get("id") == 1
221+
assert init_resp.get("result", {}).get("serverInfo", {}).get("name") == "cccc-mcp"
222+
223+
proc.stdin.write(json.dumps({"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}) + "\n")
224+
proc.stdin.flush()
225+
tools_resp = json.loads(proc.stdout.readline().strip())
226+
assert tools_resp.get("id") == 2
227+
assert isinstance(tools_resp.get("result", {}).get("tools"), list)
228+
229+
proc.terminate()
230+
231+
print("OK: MCP handshake on installed wheel")
232+
PY
233+
234+
publish:
235+
needs:
236+
- verify-linux
237+
- verify-platform-smoke
238+
runs-on: ubuntu-latest
239+
steps:
240+
- name: Set up Python
241+
uses: actions/setup-python@v5
242+
with:
243+
python-version: '3.11'
244+
245+
- name: Install publish deps
246+
run: |
247+
python -m pip install -U pip twine
248+
249+
- name: Download verified dist artifact
250+
uses: actions/download-artifact@v4
251+
with:
252+
name: release-dist
253+
path: dist
254+
150255
- name: Determine repository
151256
id: repo
152257
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ uv.lock
4141
# Docs: VitePress build artifacts
4242
/docs/.vitepress/cache/
4343
/docs/.vitepress/dist/
44+
/docs/_archive_local/
4445

4546
# Local iteration notes (not shipped)
4647
/docs/ITERATION_PLAN.md

README.ja.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ CCCC は `pip install` 一つで導入完了、外部依存ゼロ — データ
5555
| **唯一の事実源** | append-only ledger(`ledger.jsonl`)が全メッセージ・イベントを記録 — 再生可能、監査可能、喪失なし |
5656
| **信頼性のあるメッセージング** | 既読カーソル、attention ACK、reply-required 義務追跡 — 誰が何を読んだか明確 |
5757
| **統一コントロールプレーン** | Web UI、CLI、MCP ツール、IM ブリッジがすべて 1 つの daemon に接続 — 状態の分断なし |
58-
| **マルチランタイム編成** | Claude Code、Codex CLI、Gemini CLI、Copilot など 12 種のランタイムを同一グループ内で混在利用 |
58+
| **マルチランタイム編成** | Claude Code、Codex CLI、Gemini CLI など 8 種の主要ランタイムを混在利用でき、さらに `custom` ランタイムも扱える |
5959
| **ロールベース協調** | Foreman + Peer ロールモデル、権限境界と宛先ルーティング(`@all``@peers``@foreman`|
6060
| **リモート運用** | Telegram、Slack、Discord、Feishu、DingTalk にブリッジ — スマートフォンからグループを管理 |
6161

@@ -127,7 +127,7 @@ graph TB
127127
A1["Claude Code"]
128128
A2["Codex CLI"]
129129
A3["Gemini CLI"]
130-
A4["+ 9 種"]
130+
A4["+ 5 種 + custom"]
131131
end
132132
133133
subgraph Daemon["CCCC Daemon · 単一ライター"]
@@ -169,7 +169,7 @@ graph TB
169169

170170
## サポートランタイム
171171

172-
CCCC は 12 種のランタイムでエージェントを編成。同一グループ内で各 actor が異なるランタイムを使用可能
172+
CCCC は 8 種の主要ランタイムでエージェントを編成し、残りは `custom` で扱えます。同一グループ内で各 actor が異なるランタイムを使用可能です
173173

174174
| ランタイム | MCP 自動設定 | コマンド |
175175
|-----------|:----------:|---------|
@@ -179,11 +179,8 @@ CCCC は 12 種のランタイムでエージェントを編成。同一グル
179179
| Droid || `droid` |
180180
| Amp || `amp` |
181181
| Auggie || `auggie` |
182+
| Kimi CLI || `kimi` |
182183
| Neovate || `neovate` |
183-
| Copilot || `copilot` |
184-
| Cursor || `cursor-agent` |
185-
| Kilo Code || `kilocode` |
186-
| OpenCode || `opencode` |
187184
| Custom || 任意のコマンド |
188185

189186
```bash
@@ -203,7 +200,7 @@ CCCC は IM グレードのメッセージングセマンティクスを実装
203200
- **Reply-required 義務** — 受信者が返信するまで追跡
204201
- **自動ウェイク** — メッセージ受信時、無効化された agent を自動起動
205202

206-
PTY actor にはターミナル注入、headless actor にはシステム通知で配信。daemon が全メッセージの到達状態を追跡
203+
メッセージは daemon が管理する配信パイプラインを通じて各 actor ランタイムへ届けられ、daemon が全メッセージの到達状態を追跡します
207204

208205
## オートメーションとポリシー
209206

@@ -306,19 +303,18 @@ cccc im start|stop|status
306303

307304
## MCP ツール
308305

309-
エージェントは **49 の MCP ツール**(7 つの名前空間)を通じて CCCC と対話:
306+
エージェントは、コンパクトな action-oriented MCP surface を通じて CCCC と対話します。コアツールは常時公開され、追加サーフェスは必要時のみ capability pack 経由で有効化されます。
310307

311-
| 名前空間 |||
312-
|----------|:--:|------|
313-
| **セッション** | 2 | `cccc_bootstrap`(ワンコール初期化)、`cccc_help`(運用プレイブック) |
314-
| **メッセージング** | 7 | `cccc_message_send``cccc_message_reply``cccc_file_send``cccc_inbox_list``cccc_inbox_mark_read`|
315-
| **グループ & Actor** | 10 | `cccc_group_info``cccc_group_list``cccc_actor_add/remove/start/stop/restart``cccc_runtime_list``cccc_group_set_state` |
316-
| **オートメーション** | 2 | `cccc_automation_state``cccc_automation_manage`(ルールの作成/更新/有効化/無効化/削除) |
317-
| **Context** | 19 | `cccc_context_get/sync``cccc_vision_update``cccc_sketch_update``cccc_milestone_*``cccc_task_*``cccc_note_*``cccc_reference_*``cccc_presence_*` |
318-
| **Headless** | 3 | `cccc_headless_status``cccc_headless_set_status``cccc_headless_ack_message` |
319-
| **システム** | 6 | `cccc_notify_send/ack``cccc_terminal_tail``cccc_project_info``cccc_debug_snapshot``cccc_debug_tail_logs` |
308+
| サーフェス ||
309+
|------------|----|
310+
| **セッションとガイダンス** | `cccc_bootstrap``cccc_help``cccc_project_info` |
311+
| **メッセージングとファイル** | `cccc_inbox_list``cccc_inbox_mark_read``cccc_message_send``cccc_message_reply``cccc_file` |
312+
| **グループと actor 制御** | `cccc_group``cccc_actor` |
313+
| **協調と状態** | `cccc_context_get``cccc_coordination``cccc_task``cccc_agent_state``cccc_context_sync` |
314+
| **オートメーションと記憶** | `cccc_automation``cccc_memory``cccc_memory_admin` |
315+
| **必要時のみの拡張** | `cccc_capability_*``cccc_space``cccc_terminal``cccc_debug``cccc_im_bind` |
320316

321-
MCP アクセスを持つエージェントは自己組織化が可能:受信箱の確認、返信、タスクとマイルストーンの管理、オートメーションルールの設定、ピアとの協調 — すべて権限範囲内で
317+
MCP アクセスを持つエージェントは、権限境界の中で自己組織化できます。受信箱の確認、可視返信、タスク協調、自己状態更新、そして必要なときだけの追加能力有効化が可能です
322318

323319
## CCCC の位置づけ
324320

README.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ CCCC is a single `pip install` with zero external dependencies — no database,
6262
| **Single source of truth** | Append-only ledger (`ledger.jsonl`) records every message and event — replayable, auditable, never lost |
6363
| **Reliable messaging** | Read cursors, attention ACK, reply-required obligations — you know exactly who read what |
6464
| **Unified control plane** | Web UI, CLI, MCP tools, and IM bridges all talk to one daemon — no state fragmentation |
65-
| **Multi-runtime orchestration** | Claude Code, Codex CLI, Gemini CLI, Copilot, and 8 more runtimes in one group |
65+
| **Multi-runtime orchestration** | Claude Code, Codex CLI, Gemini CLI, and 5 more first-class runtimes, plus custom runtime support |
6666
| **Role-based coordination** | Foreman + peer model with permission boundaries and recipient routing (`@all`, `@peers`, `@foreman`) |
6767
| **Remote operations** | Bridge to Telegram, Slack, Discord, Feishu, or DingTalk — manage groups from your phone |
6868

@@ -135,7 +135,7 @@ graph TB
135135
A1["Claude Code"]
136136
A2["Codex CLI"]
137137
A3["Gemini CLI"]
138-
A4["+ 9 more"]
138+
A4["+ 5 more + custom"]
139139
end
140140
141141
subgraph Daemon["CCCC Daemon · single writer"]
@@ -177,7 +177,7 @@ graph TB
177177

178178
## Supported Runtimes
179179

180-
CCCC orchestrates agents across 12 runtimes. Each actor in a group can use a different runtime.
180+
CCCC orchestrates agents across 8 first-class runtimes, with `custom` available for everything else. Each actor in a group can use a different runtime.
181181

182182
| Runtime | Auto MCP Setup | Command |
183183
|---------|:--------------:|---------|
@@ -187,11 +187,8 @@ CCCC orchestrates agents across 12 runtimes. Each actor in a group can use a dif
187187
| Droid || `droid` |
188188
| Amp || `amp` |
189189
| Auggie || `auggie` |
190+
| Kimi CLI || `kimi` |
190191
| Neovate || `neovate` |
191-
| Copilot || `copilot` |
192-
| Cursor || `cursor-agent` |
193-
| Kilo Code || `kilocode` |
194-
| OpenCode || `opencode` |
195192
| Custom || Any command |
196193

197194
```bash
@@ -211,7 +208,7 @@ CCCC implements IM-grade messaging semantics, not just "paste text into a termin
211208
- **Reply-required obligations** — tracked until the recipient responds
212209
- **Auto-wake** — disabled agents are automatically started when they receive a message
213210

214-
Messages are delivered to PTY actors via terminal injection and to headless actors via system notifications. The daemon tracks delivery state for every message.
211+
Messages are delivered to actor runtimes through the daemon-managed delivery pipeline, and the daemon tracks delivery state for every message.
215212

216213
## Automation & Policies
217214

@@ -314,19 +311,18 @@ cccc im start|stop|status
314311

315312
## MCP Tools
316313

317-
Agents interact with CCCC through **49 MCP tools** across 7 namespaces:
314+
Agents interact with CCCC through a compact action-oriented MCP surface. Core tools are always present, and optional capability packs add more surfaces only when enabled.
318315

319-
| Namespace | Tools | Examples |
320-
|-----------|:-----:|---------|
321-
| **Session** | 2 | `cccc_bootstrap` (one-call init), `cccc_help` (operational playbook) |
322-
| **Messaging** | 7 | `cccc_message_send`, `cccc_message_reply`, `cccc_file_send`, `cccc_inbox_list`, `cccc_inbox_mark_read` ... |
323-
| **Group & Actor** | 10 | `cccc_group_info`, `cccc_group_list`, `cccc_actor_add/remove/start/stop/restart`, `cccc_runtime_list`, `cccc_group_set_state` |
324-
| **Automation** | 2 | `cccc_automation_state`, `cccc_automation_manage` (create/update/enable/disable/delete rules) |
325-
| **Context** | 19 | `cccc_context_get/sync`, `cccc_vision_update`, `cccc_sketch_update`, `cccc_milestone_*`, `cccc_task_*`, `cccc_note_*`, `cccc_reference_*`, `cccc_presence_*` |
326-
| **Headless** | 3 | `cccc_headless_status`, `cccc_headless_set_status`, `cccc_headless_ack_message` |
327-
| **System** | 6 | `cccc_notify_send/ack`, `cccc_terminal_tail`, `cccc_project_info`, `cccc_debug_snapshot`, `cccc_debug_tail_logs` |
316+
| Surface | Examples |
317+
|---------|----------|
318+
| **Session & guidance** | `cccc_bootstrap`, `cccc_help`, `cccc_project_info` |
319+
| **Messaging & files** | `cccc_inbox_list`, `cccc_inbox_mark_read`, `cccc_message_send`, `cccc_message_reply`, `cccc_file` |
320+
| **Group & actor control** | `cccc_group`, `cccc_actor` |
321+
| **Coordination & state** | `cccc_context_get`, `cccc_coordination`, `cccc_task`, `cccc_agent_state`, `cccc_context_sync` |
322+
| **Automation & memory** | `cccc_automation`, `cccc_memory`, `cccc_memory_admin` |
323+
| **Capability-managed extras** | `cccc_capability_*`, `cccc_space`, `cccc_terminal`, `cccc_debug`, `cccc_im_bind` |
328324

329-
Agents with MCP access can self-organize: read their inbox, reply, manage tasks and milestones, set automation rules, and coordinate with peers — all within permission boundaries.
325+
Agents with MCP access can self-organize: read inbox state, reply visibly, coordinate around tasks, refresh agent state, and enable extra capabilities when the current job actually needs them.
330326

331327
## Where CCCC Fits
332328

README.zh-CN.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ CCCC 只需一条 `pip install`,零外部依赖 — 不需要数据库、不
6262
| **唯一事实源** | append-only ledger(`ledger.jsonl`)记录所有消息和事件 — 可回放、可审计、永不丢失 |
6363
| **可靠的消息语义** | 已读游标、attention ACK、reply-required 义务追踪 — 谁读了什么一清二楚 |
6464
| **统一控制面** | Web UI、CLI、MCP 工具、IM 桥接全部对接同一 daemon — 不存在状态分裂 |
65-
| **多运行时编排** | Claude Code、Codex CLI、Gemini CLI、Copilot12 种运行时可在同一协作组内混用 |
65+
| **多运行时编排** | Claude Code、Codex CLI、Gemini CLI 等 8 种一线运行时可混用,此外还支持 `custom` 运行时 |
6666
| **角色化协调** | Foreman + Peer 角色模型,权限边界清晰,收件人路由精确(`@all``@peers``@foreman`|
6767
| **远程运维** | 桥接至 Telegram、Slack、Discord、飞书、钉钉 — 手机上即可管理协作组 |
6868

@@ -134,7 +134,7 @@ graph TB
134134
A1["Claude Code"]
135135
A2["Codex CLI"]
136136
A3["Gemini CLI"]
137-
A4["+ 9 种"]
137+
A4["+ 5 种 + custom"]
138138
end
139139
140140
subgraph Daemon["CCCC Daemon · 单写者"]
@@ -176,7 +176,7 @@ graph TB
176176

177177
## 支持的运行时
178178

179-
CCCC 跨 12 种运行时编排 agent。同一协作组内,每个 actor 可使用不同的运行时。
179+
CCCC 跨 8 种一线运行时编排 agent,除此之外还支持 `custom` 运行时兜底。同一协作组内,每个 actor 可使用不同的运行时。
180180

181181
| 运行时 | 自动 MCP 配置 | 命令 |
182182
|---------|:----------:|------|
@@ -186,11 +186,8 @@ CCCC 跨 12 种运行时编排 agent。同一协作组内,每个 actor 可使
186186
| Droid || `droid` |
187187
| Amp || `amp` |
188188
| Auggie || `auggie` |
189+
| Kimi CLI || `kimi` |
189190
| Neovate || `neovate` |
190-
| Copilot || `copilot` |
191-
| Cursor || `cursor-agent` |
192-
| Kilo Code || `kilocode` |
193-
| OpenCode || `opencode` |
194191
| Custom || 任意命令 |
195192

196193
```bash
@@ -210,7 +207,7 @@ CCCC 实现的是 IM 级消息语义,而不是"往终端里粘贴一段文字"
210207
- **Reply-required 义务** — 持续追踪直到收件人回复
211208
- **自动唤醒** — 收到消息时,已停用的 actor 自动启动
212209

213-
PTY 模式的 actor 通过终端注入接收消息,headless 模式通过系统通知接收。daemon 对每条消息的触达状态持续追踪。
210+
消息会通过 daemon 管理的投递链路送达到各 actor 运行时,daemon 对每条消息的触达状态持续追踪。
214211

215212
## 自动化与策略
216213

@@ -313,19 +310,18 @@ cccc im start|stop|status
313310

314311
## MCP 工具
315312

316-
Agent 通过 **49 个 MCP 工具**(7 个命名空间)与 CCCC 交互
313+
Agent 通过一套紧凑的 action-oriented MCP surface 与 CCCC 交互。核心工具始终存在,额外能力则通过 capability pack 按需暴露。
317314

318-
| 命名空间 | 数量 | 示例 |
319-
|----------|:----:|------|
320-
| **会话** | 2 | `cccc_bootstrap`(一次性初始化)、`cccc_help`(操作手册) |
321-
| **消息** | 7 | `cccc_message_send``cccc_message_reply``cccc_file_send``cccc_inbox_list``cccc_inbox_mark_read`|
322-
| **协作组 & Actor** | 10 | `cccc_group_info``cccc_group_list``cccc_actor_add/remove/start/stop/restart``cccc_runtime_list``cccc_group_set_state` |
323-
| **自动化** | 2 | `cccc_automation_state``cccc_automation_manage`(创建/更新/启用/停用/删除规则) |
324-
| **Context** | 19 | `cccc_context_get/sync``cccc_vision_update``cccc_sketch_update``cccc_milestone_*``cccc_task_*``cccc_note_*``cccc_reference_*``cccc_presence_*` |
325-
| **Headless** | 3 | `cccc_headless_status``cccc_headless_set_status``cccc_headless_ack_message` |
326-
| **系统** | 6 | `cccc_notify_send/ack``cccc_terminal_tail``cccc_project_info``cccc_debug_snapshot``cccc_debug_tail_logs` |
315+
| 能力面 | 示例 |
316+
|--------|------|
317+
| **会话与指引** | `cccc_bootstrap``cccc_help``cccc_project_info` |
318+
| **消息与文件** | `cccc_inbox_list``cccc_inbox_mark_read``cccc_message_send``cccc_message_reply``cccc_file` |
319+
| **协作组与 actor 控制** | `cccc_group``cccc_actor` |
320+
| **协调与状态** | `cccc_context_get``cccc_coordination``cccc_task``cccc_agent_state``cccc_context_sync` |
321+
| **自动化与记忆** | `cccc_automation``cccc_memory``cccc_memory_admin` |
322+
| **按需扩展能力** | `cccc_capability_*``cccc_space``cccc_terminal``cccc_debug``cccc_im_bind` |
327323

328-
拥有 MCP 权限的 agent 可以自组织:读取收件箱、回复、管理任务与里程碑、设置自动化规则、与同伴协调 — 均在权限边界内
324+
拥有 MCP 权限的 agent 可以在权限边界内自组织:读取收件箱、可见回复、围绕任务协调、刷新自身状态,并在当前工作真正需要时再启用额外能力
329325

330326
## CCCC 的定位
331327

0 commit comments

Comments
 (0)