@logicseek/hello-cc 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # hello-cc Documentation
2
+
3
+ Start with the [project README](../README.md) when you only need the project
4
+ summary and first command. Use these docs when you need more detail.
5
+
6
+ ## User Docs
7
+
8
+ - [User Guide](guide.md): install, start, Web console, coordination semantics,
9
+ workflow, stable peer identity, and environment behavior.
10
+ - [Command Reference](commands.md): compact list of public commands and the
11
+ intended use of each command group.
12
+ - [Changelog](../CHANGELOG.md): release notes for published versions.
13
+ - Release notes: run `npm run release:check` and
14
+ `npm run release:github:dry-run` before publishing. Pushing a `v*` tag runs
15
+ `.github/workflows/github-release.yml`, which creates or updates the GitHub
16
+ Release description from the current changelog section. Use
17
+ `workflow_dispatch` to backfill older releases without a personal token.
18
+
19
+ ## Design And Implementation
20
+
21
+ - [Design Notes](design.md): product boundary, project boundary, capability
22
+ levels, coordination semantics, and provider-session binding.
23
+ - [Implementation Notes](implementation.md): architecture, protocol, command
24
+ surface, stack, shim behavior, and implementation plan.
@@ -0,0 +1,24 @@
1
+ # hello-cc 文档
2
+
3
+ 只需要项目简介和第一条命令时,先看[仓库 README](../README.zh-CN.md)。
4
+ 需要更多细节时,再看下面的文档。
5
+
6
+ ## 用户文档
7
+
8
+ - [用户指南](guide.zh-CN.md):安装、启动、Web 控制台、协作语义、工作流、稳定
9
+ peer 身份和环境变量行为。
10
+ - [命令参考](commands.zh-CN.md):公共命令的紧凑清单,以及每组命令的用途。
11
+ - [更新日志](../CHANGELOG.md):已发布版本的 release notes。
12
+ - 发行说明:发布前运行 `npm run release:check` 和
13
+ `npm run release:github:dry-run`。推送 `v*` tag 会触发
14
+ `.github/workflows/github-release.yml`,根据当前 changelog 小节创建或更新
15
+ GitHub Release 描述。旧版本可用 `workflow_dispatch` 补写描述,不需要个人
16
+ token。
17
+
18
+ ## 设计和实现
19
+
20
+ - [设计说明](design.md):产品边界、项目边界、能力层级、协作语义和 provider
21
+ session 绑定。
22
+ - [实现说明](implementation.md):架构、协议、命令面、技术栈、shim 行为和实现计划。
23
+
24
+ 设计和实现文档目前只有英文版。
@@ -0,0 +1,135 @@
1
+ # hello-cc Command Reference
2
+
3
+ Use `hcc --help` for the current top-level command list. Most subcommands also
4
+ accept `--help`, for example `hcc update --help`, `hcc peer --help`, and
5
+ `hcc task --help`.
6
+
7
+ ## Install Maintenance
8
+
9
+ ```text
10
+ hcc update [--tag TAG] [--registry URL] [--dry-run]
11
+ hcc uninstall [--purge --yes]
12
+ ```
13
+
14
+ `hcc update` updates the global npm install. `hcc uninstall` removes local
15
+ hooks and shims; add `--purge --yes` only when you also want to remove the
16
+ current project's `.hello-cc` data and guidance blocks.
17
+
18
+ ## Start And Stop
19
+
20
+ ```text
21
+ hcc web [--host HOST] [--port N] [--token TEXT] [--local] [--no-token] [--no-discover] [--no-guidance]
22
+ hcc down
23
+ hcc up [--no-discover] [--no-guidance]
24
+ ```
25
+
26
+ `hcc web` is the default entry. It initializes coordination, installs hooks and
27
+ shims, starts or reuses the Web console, and returns the terminal to you. Bare
28
+ `hcc web` listens on `0.0.0.0` and uses a saved URL token, generating one on
29
+ first use. Use `--local` to bind only `127.0.0.1`, `--token` or `HCC_WEB_TOKEN`
30
+ to replace the saved token, and
31
+ `--no-token` only in trusted local/test environments. Use `hcc up` only when you
32
+ want coordination without the Web console or shims.
33
+
34
+ ## Peers And Status
35
+
36
+ ```text
37
+ hcc peers
38
+ hcc status [--peer ID]
39
+ hcc state [--peer ID] [--resource PATH] [--intent work|stop|finish]
40
+ hcc scan [--register]
41
+ hcc prompt --peer ID [--kind codex|claude|shell|other] [--role ROLE]
42
+ hcc join --peer ID [--kind codex|claude|shell|other] [--role ROLE]
43
+ hcc env --peer ID
44
+ hcc heartbeat [--peer ID] [--renew-locks --ttl 900]
45
+ hcc run --peer ID --kind codex|claude|shell --role ROLE -- COMMAND [ARGS...]
46
+ ```
47
+
48
+ Use these commands to inspect live project state, register terminals, and run a
49
+ CLI with `HCC_PEER`, `HCC_ROOT`, and `HCC_DB` set. `hcc state` does not execute
50
+ coordination actions such as acking messages, claiming tasks, acquiring locks, or
51
+ creating handoffs. It adds a unified collaboration timeline plus
52
+ `automation.next_action.argv`, a machine-readable next coordination command for
53
+ agents to execute explicitly. `automation.current_task` records the peer's active
54
+ task when one exists.
55
+
56
+ ## Browser-Controllable Terminals
57
+
58
+ ```text
59
+ hcc peer list
60
+ hcc peer start PEER [--kind K] [--role R] [--cwd DIR] [--restart-env] -- COMMAND [ARGS...]
61
+ hcc peer start PEER --kind codex --resume SESSION_ID [--restart-env]
62
+ hcc peer start PEER --kind codex --last
63
+ hcc peer start PEER --kind claude --resume SESSION_ID [--restart-env]
64
+ hcc peer start PEER --kind claude --continue
65
+ hcc peer attach PEER [--pane PANE] [--kind K] [--role R] [--cwd DIR]
66
+ hcc peer stop PEER
67
+ hcc inject PEER TEXT [--no-enter]
68
+ ```
69
+
70
+ These commands create or attach tmux-backed terminals that can be viewed and
71
+ controlled from the Web console.
72
+
73
+ ## Messages
74
+
75
+ ```text
76
+ hcc msg send [--from ID] [--to ID|all] --body TEXT [--task N] [--kind note|task|handoff]
77
+ hcc msg inbox [--peer ID] [--wait SEC] [--all] [--limit N]
78
+ hcc msg ack [--peer ID] --id N
79
+ hcc msg reply [--from ID] --id N --body TEXT [--to ID] [--kind reply]
80
+ hcc msg thread --id N [--limit N]
81
+ hcc ask PEER MESSAGE [--from ID] [--task N] [--inject]
82
+ hcc broadcast MESSAGE [--from ID] [--task N] [--inject]
83
+ ```
84
+
85
+ Messages are addressed mailbox items. `ask` and `broadcast` also support live
86
+ terminal injection with `--inject`. Use `msg reply` when answering a specific
87
+ message; the reply stays in the same thread and is sent back to the original
88
+ sender by default. Use `msg thread` to inspect the full thread for one message.
89
+
90
+ ## Tasks
91
+
92
+ ```text
93
+ hcc task create --title TEXT [--body TEXT] [--from ID] [--to ID] [--priority N]
94
+ hcc task list [--status S] [--peer ID] [--all]
95
+ hcc task claim [--peer ID] --id N
96
+ hcc task next [--peer ID] [--force]
97
+ hcc task create --title TEXT --parent N [--team-role ROLE]
98
+ hcc task update [--peer ID] --id N --status running|review|blocked|done|abandoned [--summary TEXT] [--body TEXT] [--to ID]
99
+ hcc task done [--peer ID] --id N --summary TEXT
100
+ ```
101
+
102
+ Tasks are shared project facts. They remain visible until marked `done` or
103
+ `abandoned`. `task next` returns your existing claimed/running/review/blocked
104
+ task before claiming a new pending task; use `--force` only when intentionally
105
+ taking another pending task.
106
+
107
+ ## Teams
108
+
109
+ ```text
110
+ hcc team plan --from-task N [--item ROLE:TITLE] [--item PEER:ROLE:TITLE] [--workers A,B|codex:2,claude:1]
111
+ hcc team start --from-task N [--item ROLE:TITLE] [--item PEER:ROLE:TITLE] [--workers A,B|codex:2,claude:1] [--force]
112
+ hcc team status --task N
113
+ ```
114
+
115
+ Teams are explicit parent-task splits. `team plan` is read-only and shows the
116
+ subtasks that would be created. `team start` creates child tasks under the
117
+ parent and optionally assigns them to worker peer IDs. It does not silently
118
+ spawn model processes or override the current-task rule. `--workers` accepts
119
+ explicit peer IDs or kind counts such as `codex:2,claude:1`.
120
+
121
+ ## Locks, Handoffs, And Events
122
+
123
+ ```text
124
+ hcc lock acquire [--peer ID] --resource PATH [--task N] [--ttl SEC] [--reason TEXT]
125
+ hcc lock renew [--peer ID] --resource PATH [--ttl SEC]
126
+ hcc lock release [--peer ID] --resource PATH [--force]
127
+ hcc lock list [--all]
128
+ hcc handoff create [--from ID] --summary TEXT [--task N] [--to ID] [--changed-files JSON_OR_CSV] [--tests TEXT] [--risks TEXT]
129
+ hcc handoff list [--task N] [--limit N]
130
+ hcc event tail [--limit N]
131
+ hcc gc [--older-than DAYS] [--yes]
132
+ ```
133
+
134
+ Locks are advisory coordination locks with TTLs. Handoffs preserve the result,
135
+ tests, changed files, and remaining risks when work moves between peers.
@@ -0,0 +1,126 @@
1
+ # hello-cc 命令参考
2
+
3
+ 使用 `hcc --help` 查看当前顶层命令列表。大多数子命令也支持 `--help`,
4
+ 例如 `hcc update --help`、`hcc peer --help` 和 `hcc task --help`。
5
+
6
+ ## 安装维护
7
+
8
+ ```text
9
+ hcc update [--tag TAG] [--registry URL] [--dry-run]
10
+ hcc uninstall [--purge --yes]
11
+ ```
12
+
13
+ `hcc update` 更新全局 npm 安装。`hcc uninstall` 移除本机 hooks 和 shims;
14
+ 只有在确定也要删除当前项目的 `.hello-cc` 数据和指导块时,才加
15
+ `--purge --yes`。
16
+
17
+ ## 启动和停止
18
+
19
+ ```text
20
+ hcc web [--host HOST] [--port N] [--token TEXT] [--local] [--no-token] [--no-discover] [--no-guidance]
21
+ hcc down
22
+ hcc up [--no-discover] [--no-guidance]
23
+ ```
24
+
25
+ `hcc web` 是默认入口。它会初始化协作状态,安装 hooks 和 shims,启动或复用
26
+ Web 控制台,然后把终端还给你。裸 `hcc web` 会监听 `0.0.0.0` 并使用固定
27
+ URL token;首次使用时自动生成并保存。用 `--local` 可只绑定 `127.0.0.1`,
28
+ 用 `--token` 或 `HCC_WEB_TOKEN` 可替换保存的 token,只有在可信本地/测试环境才使用 `--no-token`。
29
+ 只想使用本地协作、不需要 Web 或 shims 时,再使用 `hcc up`。
30
+
31
+ ## Peers 和状态
32
+
33
+ ```text
34
+ hcc peers
35
+ hcc status [--peer ID]
36
+ hcc state [--peer ID] [--resource PATH] [--intent work|stop|finish]
37
+ hcc scan [--register]
38
+ hcc prompt --peer ID [--kind codex|claude|shell|other] [--role ROLE]
39
+ hcc join --peer ID [--kind codex|claude|shell|other] [--role ROLE]
40
+ hcc env --peer ID
41
+ hcc heartbeat [--peer ID] [--renew-locks --ttl 900]
42
+ hcc run --peer ID --kind codex|claude|shell --role ROLE -- COMMAND [ARGS...]
43
+ ```
44
+
45
+ 这些命令用于查看项目状态、注册终端,以及用 `HCC_PEER`、`HCC_ROOT`、
46
+ `HCC_DB` 环境运行 CLI。`hcc state` 不会执行确认消息、认领任务、获取锁或
47
+ 创建 handoff 这类协作动作;它会返回统一协作时间线,以及
48
+ `automation.next_action.argv` 这种机器可读的下一步协作命令,供 agent 显式执行
49
+ 并留下审计记录。`automation.current_task` 会记录当前 peer 已经拥有的活动任务。
50
+
51
+ ## Web 可控终端
52
+
53
+ ```text
54
+ hcc peer list
55
+ hcc peer start PEER [--kind K] [--role R] [--cwd DIR] [--restart-env] -- COMMAND [ARGS...]
56
+ hcc peer start PEER --kind codex --resume SESSION_ID [--restart-env]
57
+ hcc peer start PEER --kind codex --last
58
+ hcc peer start PEER --kind claude --resume SESSION_ID [--restart-env]
59
+ hcc peer start PEER --kind claude --continue
60
+ hcc peer attach PEER [--pane PANE] [--kind K] [--role R] [--cwd DIR]
61
+ hcc peer stop PEER
62
+ hcc inject PEER TEXT [--no-enter]
63
+ ```
64
+
65
+ 这些命令创建或接入 tmux-backed 终端,让 Web 控制台可以观察和操作它们。
66
+
67
+ ## 消息
68
+
69
+ ```text
70
+ hcc msg send [--from ID] [--to ID|all] --body TEXT [--task N] [--kind note|task|handoff]
71
+ hcc msg inbox [--peer ID] [--wait SEC] [--all] [--limit N]
72
+ hcc msg ack [--peer ID] --id N
73
+ hcc msg reply [--from ID] --id N --body TEXT [--to ID] [--kind reply]
74
+ hcc msg thread --id N [--limit N]
75
+ hcc ask PEER MESSAGE [--from ID] [--task N] [--inject]
76
+ hcc broadcast MESSAGE [--from ID] [--task N] [--inject]
77
+ ```
78
+
79
+ 消息是带收件人的邮箱记录。`ask` 和 `broadcast` 加 `--inject` 后,也会把内容
80
+ 实时注入到终端。回复某条消息时使用 `msg reply`;默认会发回原 sender,并保留
81
+ 在同一个 thread 中。使用 `msg thread` 可以查看某条消息所在的完整线程。
82
+
83
+ ## 任务
84
+
85
+ ```text
86
+ hcc task create --title TEXT [--body TEXT] [--from ID] [--to ID] [--priority N]
87
+ hcc task list [--status S] [--peer ID] [--all]
88
+ hcc task claim [--peer ID] --id N
89
+ hcc task next [--peer ID] [--force]
90
+ hcc task create --title TEXT --parent N [--team-role ROLE]
91
+ hcc task update [--peer ID] --id N --status running|review|blocked|done|abandoned [--summary TEXT] [--body TEXT] [--to ID]
92
+ hcc task done [--peer ID] --id N --summary TEXT
93
+ ```
94
+
95
+ 任务是项目共享事实。任务会一直可见,直到被标记为 `done` 或 `abandoned`。
96
+ `task next` 会优先返回当前 peer 已经认领、运行、审查或阻塞中的任务;只有明确
97
+ 要再接一个 pending 任务时才使用 `--force`。
98
+
99
+ ## 团队
100
+
101
+ ```text
102
+ hcc team plan --from-task N [--item ROLE:TITLE] [--item PEER:ROLE:TITLE] [--workers A,B|codex:2,claude:1]
103
+ hcc team start --from-task N [--item ROLE:TITLE] [--item PEER:ROLE:TITLE] [--workers A,B|codex:2,claude:1] [--force]
104
+ hcc team status --task N
105
+ ```
106
+
107
+ 团队是显式的父任务拆分。`team plan` 只读,只展示会创建哪些子任务。
108
+ `team start` 会在父任务下创建子任务,并可把子任务分配给 worker peer。
109
+ 它不会静默启动模型进程,也不会绕过“先继续当前任务”的规则。`--workers`
110
+ 支持显式 peer ID,也支持 `codex:2,claude:1` 这种 kind 数量形式。
111
+
112
+ ## 锁、交接和事件
113
+
114
+ ```text
115
+ hcc lock acquire [--peer ID] --resource PATH [--task N] [--ttl SEC] [--reason TEXT]
116
+ hcc lock renew [--peer ID] --resource PATH [--ttl SEC]
117
+ hcc lock release [--peer ID] --resource PATH [--force]
118
+ hcc lock list [--all]
119
+ hcc handoff create [--from ID] --summary TEXT [--task N] [--to ID] [--changed-files JSON_OR_CSV] [--tests TEXT] [--risks TEXT]
120
+ hcc handoff list [--task N] [--limit N]
121
+ hcc event tail [--limit N]
122
+ hcc gc [--older-than DAYS] [--yes]
123
+ ```
124
+
125
+ 锁是带 TTL 的协作式 advisory lock。交接记录用于保存结果、测试、变更文件和
126
+ 剩余风险,方便工作在多个 peer 之间继续。
package/docs/design.md CHANGED
@@ -170,12 +170,13 @@ Server polls/captures tmux pane output and broadcasts it to browsers.
170
170
  ```text
171
171
  peers stable terminal identities and heartbeat
172
172
  peer_bindings provider session binding and runtime transport metadata
173
- tasks task assignment, ownership, and lifecycle
174
- messages direct or broadcast messages
173
+ tasks task assignment, ownership, hierarchy, and lifecycle
174
+ messages direct, broadcast, or threaded messages
175
175
  message_reads per-peer ack state
176
176
  locks advisory exclusive locks with TTL
177
177
  handoffs durable cross-session handoff summaries
178
178
  events audit trail for observability
179
+ schema_migrations applied SQLite schema version history
179
180
  ```
180
181
 
181
182
  ## Coordination Semantics
@@ -185,10 +186,17 @@ events audit trail for observability
185
186
  - SQLite runs with WAL and `busy_timeout=5000`.
186
187
  - Tasks are project facts. They remain visible to all peers until status becomes
187
188
  `done` or `abandoned`.
189
+ - Tasks can form explicit parent/child hierarchies for team splits. Team commands
190
+ create auditable child tasks; they do not silently spawn model processes.
188
191
  - Messages are addressed mailbox items. Read state is tracked per peer.
192
+ - Message replies keep `reply_to` and `thread_id` so peer-visible collaboration
193
+ history can be reconstructed without terminal capture.
189
194
  - Broadcast messages use per-peer acknowledgement, so one peer cannot consume a
190
195
  message for everyone else.
191
196
  - Locks are advisory and TTL-based. Peers must follow the protocol.
197
+ - `hcc state` and `/api/state` expose a derived timeline plus
198
+ `automation.next_action.argv`; the command is advisory and does not execute
199
+ coordination actions itself.
192
200
 
193
201
  ## Hook Path
194
202
 
@@ -196,8 +204,8 @@ The primary model-facing path is hook context injection, not project markdown.
196
204
 
197
205
  `hcc web` installs hooks that register sessions and inject hello-cc snapshots at
198
206
  session start and before model answers. The injected snapshot contains current
199
- peer identity, active peers, open tasks, unread messages, active locks, and the
200
- commands the model should use to inspect state.
207
+ peer identity, active peers, open tasks, unread messages, active locks, the
208
+ current task when one exists, and the next auditable coordination action.
201
209
 
202
210
  `CLAUDE.md`, `AGENTS.md`, and `.hello-cc/HCC.md` are fallback instruction
203
211
  layers. Existing root files are updated only inside a bounded hello-cc block.
package/docs/guide.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # hello-cc User Guide
2
2
 
3
- This guide contains the detailed usage notes that are intentionally kept out of
4
- the short project README.
3
+ This guide covers the practical workflow for installing, starting, and using
4
+ hello-cc. For a compact command list, use the [Command Reference](commands.md).
5
5
 
6
- ## Install And Update
6
+ ## Install, Update, And Uninstall
7
7
 
8
8
  Install hello-cc globally:
9
9
 
@@ -14,11 +14,30 @@ npm install -g @logicseek/hello-cc
14
14
  Update an existing global install:
15
15
 
16
16
  ```bash
17
- npm install -g @logicseek/hello-cc@latest
17
+ hcc update
18
18
  ```
19
19
 
20
- `hcc` does not have a self-update command. `hcc task update` updates a
21
- coordination task, not the installed package.
20
+ `hcc update` runs `npm install -g @logicseek/hello-cc@latest`. Use
21
+ `hcc update --help` to see the available update options. `hcc task update`
22
+ updates a coordination task, not the installed package.
23
+
24
+ Remove hooks and shims from this machine:
25
+
26
+ ```bash
27
+ hcc uninstall
28
+ ```
29
+
30
+ Remove the current project's `.hello-cc` data and guidance blocks too:
31
+
32
+ ```bash
33
+ hcc uninstall --purge --yes
34
+ ```
35
+
36
+ Remove the global npm package:
37
+
38
+ ```bash
39
+ npm uninstall -g @logicseek/hello-cc
40
+ ```
22
41
 
23
42
  ## Default Entry
24
43
 
@@ -51,8 +70,8 @@ project: /path/to/project
51
70
  database: /path/to/project/.hello-cc/mesh.db
52
71
  runtime: /path/to/project/.hello-cc/runtime.json
53
72
  log: /path/to/project/.hello-cc/web.log
54
- open: http://<machine-ip>:8787/?project=%2Fpath%2Fto%2Fproject
55
- local: http://127.0.0.1:8787/?project=%2Fpath%2Fto%2Fproject
73
+ open: http://<machine-ip>:8787/?token=<token>&project=%2Fpath%2Fto%2Fproject
74
+ local: http://127.0.0.1:8787/?token=<token>&project=%2Fpath%2Fto%2Fproject
56
75
  shims: installed claude, codex
57
76
  PATH updated in ~/.bashrc; open a new terminal or source it
58
77
  stop: hcc down
@@ -138,6 +157,8 @@ Tasks and messages have different read semantics:
138
157
  `abandoned`.
139
158
  - Messages are addressed mailbox items. `hcc msg inbox` defaults to unread
140
159
  messages for the current peer, and `hcc msg ack` records per-peer read state.
160
+ - Message replies are threaded. Use `hcc msg reply --id N --body "..."` when
161
+ answering a message, and use `hcc msg thread --id N` to read the full thread.
141
162
  - `ask` and `broadcast` write durable messages. With `--inject`, they also send
142
163
  live input to runtime-attached terminals.
143
164
  - Locks use SQLite transactions and TTLs. They are coordination locks, not a
@@ -156,8 +177,9 @@ into the model context:
156
177
  - open tasks
157
178
  - unread messages for the current peer
158
179
  - active locks
159
- - suggested commands such as `hcc status`, `hcc peers`, `hcc task list`,
160
- `hcc msg inbox`, and `hcc lock list`
180
+ - a machine-readable next action from `hcc state`
181
+ - suggested commands such as `hcc status`, `hcc state`, `hcc peers`,
182
+ `hcc task list`, `hcc msg inbox`, and `hcc lock list`
161
183
 
162
184
  When an attached Claude/Codex session is asked what other sessions are doing,
163
185
  it should answer from the latest hello-cc state instead of generic isolation
@@ -183,31 +205,46 @@ claude -p 'Do you see hello-cc open tasks?' --debug hooks --debug-file /tmp/hcc-
183
205
  The debug log should contain `Hook UserPromptSubmit ... provided
184
206
  additionalContext` and the `hello-cc coordination` block.
185
207
 
208
+ `hcc state --peer <peer> [--resource PATH]` exposes the same coordination state
209
+ without performing coordination actions such as acking messages, claiming tasks,
210
+ acquiring locks, sending messages, creating handoffs, or marking tasks done. It
211
+ returns the existing project arrays plus a unified `timeline` and an
212
+ `automation` object. The important machine field is
213
+ `automation.next_action.argv`: agents can execute that explicit hcc command, so
214
+ the coordination flow becomes auditable instead of being only a prompt
215
+ instruction. `automation.current_task` carries the peer's active task so a
216
+ resumed session keeps working on the same task until it is handed off, done, or
217
+ blocked.
218
+
186
219
  ## Web Console
187
220
 
188
- Start local and LAN-visible control:
221
+ Start local and LAN-visible control with token authentication:
189
222
 
190
223
  ```bash
191
224
  hcc web
192
225
  ```
193
226
 
194
- Use a token only when you want one:
227
+ Bare `hcc web` stores its generated token and reuses it across restarts. Set a
228
+ token explicitly when you want to replace the saved value:
195
229
 
196
230
  ```bash
197
- HCC_WEB_TOKEN='choose-a-long-token' hcc web --host 0.0.0.0 --port 8787
231
+ HCC_WEB_TOKEN='choose-a-long-token' hcc web --port 8787
198
232
  ```
199
233
 
200
234
  Open from another machine on the same network:
201
235
 
202
236
  ```text
203
- http://<machine-ip>:8787/
237
+ http://<machine-ip>:8787/?token=<token>
204
238
  ```
205
239
 
240
+ Use `hcc web --local` to bind only `127.0.0.1`. Use `hcc web --no-token` only
241
+ in a trusted local/test environment.
242
+
206
243
  The web console can:
207
244
 
208
245
  - switch between multiple registered project roots on one port
209
246
  - register another project path from the browser
210
- - show project state: peers, tasks, messages, locks, handoffs, events
247
+ - show project state: next action, timeline, peers, tasks, and locks
211
248
  - operate local terminals: start Claude/Codex/shell, send keyboard input, view
212
249
  output, detach runtime control
213
250
 
@@ -221,63 +258,13 @@ Browser-controlled sessions are local tmux terminals:
221
258
  Already-open raw terminals cannot be captured or controlled unconditionally
222
259
  unless they started under tmux, screen, or a hello-cc shim. They can still
223
260
  participate in tasks, messages, and locks through hooks and `hcc` commands.
261
+ For these coordination-only peers, the Web console shows collaboration through
262
+ the Timeline rather than a terminal stream.
224
263
 
225
- ## Common Commands
264
+ ## Command Reference
226
265
 
227
- ```text
228
- # Default entry
229
- hcc web [--host HOST] [--port N] [--token TEXT] [--local] [--no-discover] [--no-guidance]
230
- hcc down
231
-
232
- # Local coordination without Web
233
- hcc up [--no-discover] [--no-guidance]
234
-
235
- # Peers and status
236
- hcc peers
237
- hcc status [--peer ID]
238
- hcc scan [--register]
239
- hcc prompt --peer ID [--kind codex|claude|shell|other] [--role ROLE]
240
- hcc join --peer ID [--kind codex|claude|shell|other] [--role ROLE]
241
- hcc env --peer ID
242
- hcc heartbeat [--peer ID] [--renew-locks --ttl 900]
243
- hcc run --peer ID --kind codex|claude|shell --role ROLE -- COMMAND [ARGS...]
244
-
245
- # Browser-controllable terminals
246
- hcc peer list
247
- hcc peer start PEER [--kind K] [--role R] [--cwd DIR] [--restart-env] -- COMMAND [ARGS...]
248
- hcc peer start PEER --kind codex --resume SESSION_ID [--restart-env]
249
- hcc peer start PEER --kind codex --last
250
- hcc peer start PEER --kind claude --resume SESSION_ID [--restart-env]
251
- hcc peer start PEER --kind claude --continue
252
- hcc peer attach PEER [--pane PANE] [--kind K] [--role R] [--cwd DIR]
253
- hcc peer stop PEER
254
- hcc inject PEER TEXT [--no-enter]
255
-
256
- # Messages
257
- hcc msg send [--from ID] [--to ID|all] --body TEXT [--task N] [--kind note|task|handoff]
258
- hcc msg inbox [--peer ID] [--wait SEC] [--all] [--limit N]
259
- hcc msg ack [--peer ID] --id N
260
- hcc ask PEER MESSAGE [--from ID] [--task N] [--inject]
261
- hcc broadcast MESSAGE [--from ID] [--task N] [--inject]
262
-
263
- # Tasks
264
- hcc task create --title TEXT [--body TEXT] [--from ID] [--to ID] [--priority N]
265
- hcc task list [--status S] [--peer ID] [--all]
266
- hcc task claim [--peer ID] --id N
267
- hcc task next [--peer ID]
268
- hcc task update [--peer ID] --id N --status running|review|blocked|done|abandoned [--summary TEXT] [--body TEXT] [--to ID]
269
- hcc task done [--peer ID] --id N --summary TEXT
270
-
271
- # Locks and handoffs
272
- hcc lock acquire [--peer ID] --resource PATH [--task N] [--ttl SEC] [--reason TEXT]
273
- hcc lock renew [--peer ID] --resource PATH [--ttl SEC]
274
- hcc lock release [--peer ID] --resource PATH [--force]
275
- hcc lock list [--all]
276
- hcc handoff create [--from ID] --summary TEXT [--task N] [--to ID] [--changed-files JSON_OR_CSV] [--tests TEXT] [--risks TEXT]
277
- hcc handoff list [--task N] [--limit N]
278
- hcc event tail [--limit N]
279
- hcc gc [--older-than DAYS] [--yes]
280
- ```
266
+ Use `hcc --help` for the command list and `hcc <command> --help` for a specific
267
+ command. The maintained summary lives in the [Command Reference](commands.md).
281
268
 
282
269
  ## Stable Peer Identity
283
270
 
@@ -314,10 +301,35 @@ hcc task next
314
301
  hcc lock acquire --resource vllm/router --ttl 900 --reason "implement diagnostics"
315
302
  ```
316
303
 
304
+ `task next` first returns the peer's current claimed/running/review/blocked task.
305
+ Use `hcc task next --force` only when intentionally taking another pending task.
306
+
307
+ Split a task into an explicit team when the work is genuinely parallel:
308
+
309
+ ```bash
310
+ hcc team plan --from-task 12 \
311
+ --item "docs:Update user guide" \
312
+ --item "tests:Add regression" \
313
+ --workers codex:1,claude:1
314
+
315
+ hcc team start --from-task 12 \
316
+ --item "docs:Update user guide" \
317
+ --item "tests:Add regression" \
318
+ --workers codex:1,claude:1
319
+
320
+ hcc team status --task 12
321
+ ```
322
+
323
+ `team plan` is read-only. `team start` creates child tasks and assignment
324
+ messages, but it does not spawn hidden model processes. Agents still claim,
325
+ lock, hand off, and finish their own child tasks through the normal commands.
326
+
317
327
  Message or inject:
318
328
 
319
329
  ```bash
320
330
  hcc msg send --to claude-a --body "Implementation is ready for review."
331
+ hcc msg reply --id 12 --body "Reviewed; no blocker found."
332
+ hcc msg thread --id 12
321
333
  hcc ask claude-a "Please review the current implementation." --inject
322
334
  hcc broadcast "Pause edits under vllm/router until this task finishes." --inject
323
335
  ```
@@ -341,7 +353,7 @@ hcc lock release --resource vllm/router
341
353
  | `HCC_PEER` | default peer identity |
342
354
  | `HCC_ROOT` | override project root |
343
355
  | `HCC_DB` | override database path |
344
- | `HCC_WEB_TOKEN` | optional token for web access |
356
+ | `HCC_WEB_TOKEN` | replace and save the stable web access token |
345
357
  | `HCC_RUNTIME_URL` | direct runtime URL |
346
358
  | `HCC_NO_AUTO_INSTALL_TMUX=1` | disable tmux auto-install, mainly for tests |
347
359