vibe-coding-master 0.0.5 → 0.0.7
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/README.md +168 -63
- package/dist/backend/adapters/translation-provider.js +145 -0
- package/dist/backend/api/artifact-routes.js +3 -0
- package/dist/backend/api/harness-routes.js +22 -0
- package/dist/backend/api/project-routes.js +3 -8
- package/dist/backend/api/translation-routes.js +70 -0
- package/dist/backend/runtime/node-pty-runtime.js +20 -18
- package/dist/backend/server.js +31 -1
- package/dist/backend/services/app-settings-service.js +128 -0
- package/dist/backend/services/artifact-service.js +7 -4
- package/dist/backend/services/claude-transcript-service.js +509 -0
- package/dist/backend/services/harness-service.js +178 -0
- package/dist/backend/services/project-service.js +4 -0
- package/dist/backend/services/session-service.js +7 -5
- package/dist/backend/services/status-service.js +76 -0
- package/dist/backend/services/translation-prompts.js +173 -0
- package/dist/backend/services/translation-queue.js +39 -0
- package/dist/backend/services/translation-service.js +546 -0
- package/dist/backend/templates/handoff.js +32 -0
- package/dist/backend/templates/harness/architect-agent.js +12 -0
- package/dist/backend/templates/harness/claude-root.js +14 -0
- package/dist/backend/templates/harness/coder-agent.js +11 -0
- package/dist/backend/templates/harness/project-manager-agent.js +14 -0
- package/dist/backend/templates/harness/reviewer-agent.js +13 -0
- package/dist/backend/ws/translation-ws.js +35 -0
- package/dist/shared/types/harness.js +1 -0
- package/dist/shared/types/translation.js +5 -0
- package/dist/shared/validation/artifact-check.js +15 -1
- package/dist/shared/validation/language-detect.js +46 -0
- package/dist-frontend/assets/index-BNASqKEK.css +32 -0
- package/dist-frontend/assets/index-Bp49_End.js +58 -0
- package/dist-frontend/index.html +2 -2
- package/docs/cc-best-practices.md +93 -36
- package/docs/product-design.md +313 -1408
- package/docs/v1-architecture-design.md +500 -1153
- package/docs/v1-implementation-plan.md +783 -1604
- package/package.json +3 -1
- package/scripts/verify-package.mjs +121 -0
- package/dist/backend/templates/role-messaging-context.js +0 -44
- package/dist-frontend/assets/index-Bah6k-Ix.css +0 -32
- package/dist-frontend/assets/index-EMaQuIB6.js +0 -58
- package/docs/v1-message-bus-orchestration-design.md +0 -534
package/docs/product-design.md
CHANGED
|
@@ -1,1307 +1,301 @@
|
|
|
1
|
-
# VibeCodingMaster
|
|
1
|
+
# VibeCodingMaster Product Design
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
日期:2026-05-29
|
|
5
|
-
状态:产品设计草案
|
|
6
|
-
依据:`docs/cc-best-practices.md`
|
|
3
|
+
Last updated: 2026-05-30
|
|
7
4
|
|
|
8
|
-
|
|
5
|
+
This document describes the product that the current code implements. It intentionally removes older CLI-first, tmux, raw-PTY-translation, and main-page artifact-panel designs that are no longer part of V1.
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
## 1. Product Positioning
|
|
11
8
|
|
|
12
|
-
|
|
9
|
+
VibeCodingMaster is a local GUI task workspace for Claude Code.
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
It helps a user run one engineering task through several explicit Claude Code role sessions:
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
- `project-manager`
|
|
14
|
+
- `architect`
|
|
15
|
+
- `coder`
|
|
16
|
+
- `reviewer`
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
The user should mostly talk to `project-manager`. The project manager coordinates the other roles through VCM messaging and durable handoff files. The user can still switch into any role session to inspect, guide, or interrupt.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
user intent
|
|
22
|
-
-> GUI task workspace
|
|
23
|
-
-> project manager session clarification
|
|
24
|
-
-> project manager command planning
|
|
25
|
-
-> task severity classification
|
|
26
|
-
-> task spec
|
|
27
|
-
-> required role route
|
|
28
|
-
-> role session cockpit
|
|
29
|
-
-> role-specific command generation
|
|
30
|
-
-> architecture plan
|
|
31
|
-
-> public contract review
|
|
32
|
-
-> Claude Code implementation
|
|
33
|
-
-> validation
|
|
34
|
-
-> independent AI review
|
|
35
|
-
-> replan when needed
|
|
36
|
-
-> PR / final acceptance
|
|
37
|
-
-> project memory update
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## 2. 产品背景
|
|
41
|
-
|
|
42
|
-
Claude Code 已经可以在真实项目中高效写代码,但复杂项目里的失败通常不是因为模型完全不会写代码,而是因为缺少工程控制层:
|
|
43
|
-
|
|
44
|
-
- 需求没有被澄清,Claude Code 直接开始改代码。
|
|
45
|
-
- 任务没有 scope、non-goals、public contract、test contract。
|
|
46
|
-
- 一个 session 同时承担架构、编码、测试、review,导致自我确认。
|
|
47
|
-
- 任务进度、实现偏差、验证结果和决策只留在聊天里,无法跨 session 延续。
|
|
48
|
-
- 文档、模块边界、测试策略和代码变化不同步。
|
|
49
|
-
- AI 发现了计划问题,但没有正式 Replan 协议,只能边做边改。
|
|
50
|
-
- 代码完成后缺少独立 reviewer 和验收清单。
|
|
51
|
-
|
|
52
|
-
最新最佳实践的核心判断是:
|
|
53
|
-
|
|
54
|
-
> AI coding reliability comes from two things: public contract design prevents architecture drift, and public contract tests prevent behavior drift.
|
|
55
|
-
|
|
56
|
-
VibeCodingMaster 的产品机会,就是把这条原则变成日常 AI 编程工作流。
|
|
57
|
-
|
|
58
|
-
## 3. 核心价值
|
|
59
|
-
|
|
60
|
-
### 3.1 对用户
|
|
61
|
-
|
|
62
|
-
- 用户可以用自然语言描述需求,不需要手写复杂 Claude Code prompt。
|
|
63
|
-
- 用户能在编码前看到清晰的实现方案和风险。
|
|
64
|
-
- 用户能知道 Claude Code 做了什么、为什么这么做、如何验证。
|
|
65
|
-
- 用户能把长期项目的经验沉淀到 repo,而不是沉没在聊天记录里。
|
|
66
|
-
|
|
67
|
-
### 3.2 对工程团队
|
|
68
|
-
|
|
69
|
-
- 降低 AI 编码带来的架构漂移。
|
|
70
|
-
- 降低行为回归和测试缺失。
|
|
71
|
-
- 让高风险任务进入更严格的角色路由和 human approval。
|
|
72
|
-
- 让 AI 生成代码具备可审计的任务、计划、验证和 review 证据。
|
|
73
|
-
|
|
74
|
-
### 3.3 对 Claude Code
|
|
75
|
-
|
|
76
|
-
- 给 Claude Code 提供正确上下文,而不是大量噪音。
|
|
77
|
-
- 把模糊需求转成明确 task spec。
|
|
78
|
-
- 用 public contract 限制可变范围。
|
|
79
|
-
- 用 contract tests 和 validation commands 提供可执行反馈。
|
|
80
|
-
- 用 handoff artifacts 跨 session 保留任务状态。
|
|
81
|
-
|
|
82
|
-
## 4. 目标用户
|
|
83
|
-
|
|
84
|
-
### 4.1 Solo Builder
|
|
85
|
-
|
|
86
|
-
已经使用 Claude Code 做大量开发,但经常遇到:
|
|
87
|
-
|
|
88
|
-
- 改错文件。
|
|
89
|
-
- 一次做太多。
|
|
90
|
-
- 上下文丢失。
|
|
91
|
-
- 测试没跑。
|
|
92
|
-
- 代码能跑但架构变形。
|
|
93
|
-
|
|
94
|
-
VibeCodingMaster 帮他把想法整理成小步、可验证、可回滚的任务。
|
|
95
|
-
|
|
96
|
-
### 4.2 Tech Lead
|
|
97
|
-
|
|
98
|
-
希望团队使用 Claude Code 提升吞吐量,但担心:
|
|
99
|
-
|
|
100
|
-
- 架构边界被打穿。
|
|
101
|
-
- 测试质量下降。
|
|
102
|
-
- public API 被随意修改。
|
|
103
|
-
- 高风险业务逻辑缺少审查。
|
|
104
|
-
|
|
105
|
-
VibeCodingMaster 提供角色制、contract gate、review gate 和最终验收流程。
|
|
106
|
-
|
|
107
|
-
### 4.3 Product-minded Founder
|
|
108
|
-
|
|
109
|
-
能表达产品意图,但不能稳定写出高质量工程 prompt。
|
|
110
|
-
|
|
111
|
-
VibeCodingMaster 把业务语言转成:
|
|
112
|
-
|
|
113
|
-
- task spec
|
|
114
|
-
- architecture plan
|
|
115
|
-
- public surface contract
|
|
116
|
-
- validation plan
|
|
117
|
-
- PR summary
|
|
118
|
-
|
|
119
|
-
## 5. 产品原则
|
|
120
|
-
|
|
121
|
-
### 5.1 Repo 是事实源
|
|
122
|
-
|
|
123
|
-
重要项目知识必须进入 repo,成为 Claude Code 可读取、可版本化、可 review 的 artifact。
|
|
124
|
-
|
|
125
|
-
核心 artifact:
|
|
126
|
-
|
|
127
|
-
```text
|
|
128
|
-
CLAUDE.md
|
|
129
|
-
docs/
|
|
130
|
-
.ai/task-specs/
|
|
131
|
-
.ai/handoffs/
|
|
132
|
-
.ai/state/
|
|
133
|
-
.ai/generated/
|
|
134
|
-
tools/
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### 5.2 Public Contract 优先
|
|
20
|
+
VCM is not a hosted SaaS product. It runs locally, connects to a local repository path, starts local Claude Code processes, and writes local task metadata into that repository.
|
|
138
21
|
|
|
139
|
-
|
|
22
|
+
## 2. Product Goals
|
|
140
23
|
|
|
141
|
-
-
|
|
142
|
-
- public methods
|
|
143
|
-
- module APIs
|
|
144
|
-
- service / controller / repository public entry points
|
|
145
|
-
- route handlers / command handlers
|
|
146
|
-
- hooks
|
|
147
|
-
- externally used component props
|
|
24
|
+
VCM V1 must make multi-session Claude Code work visible and recoverable:
|
|
148
25
|
|
|
149
|
-
|
|
26
|
+
- Connect a local Git repository.
|
|
27
|
+
- Create a named task.
|
|
28
|
+
- Start, stop, restart, and resume one Claude Code session per role.
|
|
29
|
+
- Keep role terminals embedded in one GUI.
|
|
30
|
+
- Preserve task state, session state, handoff files, message history, and raw terminal logs.
|
|
31
|
+
- Let roles communicate through a PM-mediated message bus.
|
|
32
|
+
- Let users choose between manual message approval and auto orchestration.
|
|
33
|
+
- Install or update VCM role rules into `CLAUDE.md` and `.claude/agents/*.md`.
|
|
34
|
+
- Provide a low-cost translation layer so the user can write Chinese while Claude Code receives English engineering instructions.
|
|
150
35
|
|
|
151
|
-
|
|
36
|
+
## 3. Non-Goals
|
|
152
37
|
|
|
153
|
-
|
|
38
|
+
V1 does not include:
|
|
154
39
|
|
|
155
|
-
|
|
40
|
+
- tmux.
|
|
41
|
+
- Worktree isolation per role.
|
|
42
|
+
- Concurrent edits across roles as a product workflow.
|
|
43
|
+
- Automatic confirmation of Claude Code permission prompts.
|
|
44
|
+
- A main-page artifact inspector.
|
|
45
|
+
- Raw PTY parsing to infer Claude answer boundaries.
|
|
46
|
+
- Automatic writing of translations into repo artifacts.
|
|
47
|
+
- Hosted auth, cloud sync, multi-user collaboration, or project indexing.
|
|
156
48
|
|
|
157
|
-
|
|
158
|
-
- boundary or failure path
|
|
49
|
+
## 4. Core Workflow
|
|
159
50
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
- invalid input
|
|
163
|
-
- permission or state constraints
|
|
164
|
-
- side effects
|
|
165
|
-
- idempotency
|
|
166
|
-
- historical regressions
|
|
167
|
-
|
|
168
|
-
### 5.4 角色分离
|
|
169
|
-
|
|
170
|
-
复杂任务中,不允许一个 Claude Code session 同时拥有架构、编码、最终测试和独立 review。
|
|
171
|
-
|
|
172
|
-
默认角色链:
|
|
173
|
-
|
|
174
|
-
```text
|
|
175
|
-
project manager -> architect -> coder -> reviewer -> human approval
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### 5.5 文件交接,不靠聊天记忆
|
|
179
|
-
|
|
180
|
-
角色之间通过 handoff artifacts 交接:
|
|
181
|
-
|
|
182
|
-
```text
|
|
183
|
-
.ai/handoffs/<task-slug>/
|
|
184
|
-
architecture-plan.md
|
|
185
|
-
implementation-log.md
|
|
186
|
-
validation-log.md
|
|
187
|
-
review-report.md
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
聊天记录可以辅助理解,但不能作为长期事实源。
|
|
191
|
-
|
|
192
|
-
### 5.6 Replan 是正式流程
|
|
193
|
-
|
|
194
|
-
当计划和代码现实不一致时,不能悄悄改方向。
|
|
195
|
-
|
|
196
|
-
VibeCodingMaster 必须触发:
|
|
51
|
+
Recommended flow:
|
|
197
52
|
|
|
198
53
|
```text
|
|
199
|
-
|
|
200
|
-
->
|
|
201
|
-
->
|
|
202
|
-
->
|
|
203
|
-
->
|
|
204
|
-
->
|
|
205
|
-
-> Update docs
|
|
206
|
-
-> Continue
|
|
54
|
+
project-manager
|
|
55
|
+
-> architect architecture plan
|
|
56
|
+
-> coder implementation and validation
|
|
57
|
+
-> reviewer independent review
|
|
58
|
+
-> architect docs sync / architecture drift check
|
|
59
|
+
-> project-manager final acceptance, commit, and PR
|
|
207
60
|
```
|
|
208
61
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
VibeCodingMaster 不是让所有任务都变重,而是按任务风险选择流程重量。
|
|
212
|
-
|
|
213
|
-
小任务要快,复杂任务要稳,高风险任务要有硬 gate。
|
|
214
|
-
|
|
215
|
-
### 5.8 GUI 是主交互入口
|
|
216
|
-
|
|
217
|
-
V1 的主入口不是 CLI,而是本地 GUI 工作台。
|
|
218
|
-
|
|
219
|
-
用户应该通过页面完成:
|
|
220
|
-
|
|
221
|
-
- 选择本地 repo。
|
|
222
|
-
- 创建任务。
|
|
223
|
-
- 启动或停止 role sessions。
|
|
224
|
-
- 切换 `project-manager / architect / coder / reviewer`。
|
|
225
|
-
- 直接在 session 面板里和 Claude Code 沟通。
|
|
226
|
-
- 查看 role command、handoff artifacts、logs、状态和风险。
|
|
227
|
-
|
|
228
|
-
CLI 可以作为开发、调试或自动化入口保留,但不能成为 V1 的主要用户体验。
|
|
229
|
-
|
|
230
|
-
### 5.9 终端是能力,不是产品界面
|
|
231
|
-
|
|
232
|
-
Claude Code 本质上仍然是交互式终端程序,VibeCodingMaster 可以使用 embedded terminal 来承载它。
|
|
62
|
+
The workflow is a soft guide in V1. VCM computes readiness from handoff artifact checks and session state, then shows the result in the sidebar. It does not block the user from manually starting a role out of order.
|
|
233
63
|
|
|
234
|
-
|
|
64
|
+
## 5. Roles
|
|
235
65
|
|
|
236
|
-
|
|
237
|
-
- process id。
|
|
238
|
-
- terminal stream。
|
|
239
|
-
- WebSocket message。
|
|
240
|
-
- input/output bridge。
|
|
66
|
+
### Project Manager
|
|
241
67
|
|
|
242
|
-
|
|
68
|
+
The project manager owns:
|
|
243
69
|
|
|
244
|
-
|
|
70
|
+
- user communication
|
|
71
|
+
- task clarification
|
|
72
|
+
- role routing
|
|
73
|
+
- message dispatch
|
|
74
|
+
- handoff verification
|
|
75
|
+
- final acceptance
|
|
76
|
+
- commit and PR preparation after gates pass
|
|
245
77
|
|
|
246
|
-
|
|
78
|
+
The project manager must not become the architect, coder, and reviewer for non-trivial work.
|
|
247
79
|
|
|
248
|
-
|
|
80
|
+
### Architect
|
|
249
81
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
它负责:
|
|
253
|
-
|
|
254
|
-
- 和用户对话,澄清需求。
|
|
255
|
-
- 把用户输入整理成 task brief 和 task spec。
|
|
256
|
-
- 判断任务严重级别。
|
|
257
|
-
- 选择 required role route。
|
|
258
|
-
- 决定下一步应该调用 architect、coder、reviewer 还是 specialist。
|
|
259
|
-
- 为每个角色准备准确、完整、边界清楚的 role command。
|
|
260
|
-
- 确保 handoff artifacts 存在。
|
|
261
|
-
- 调度 Claude Code 的 architect、coder、reviewer session。
|
|
262
|
-
- 收集 validation evidence。
|
|
263
|
-
- 判断是否需要 Replan。
|
|
264
|
-
- 维护项目状态和最终验收。
|
|
265
|
-
|
|
266
|
-
它不应该成为一个“什么都自己做”的 coding session。
|
|
267
|
-
|
|
268
|
-
它发给其他角色的命令必须包含:
|
|
269
|
-
|
|
270
|
-
- role identity
|
|
271
|
-
- task spec path
|
|
272
|
-
- required input artifacts
|
|
273
|
-
- allowed scope
|
|
274
|
-
- public surface contract
|
|
275
|
-
- test contract
|
|
276
|
-
- stop conditions
|
|
277
|
-
- validation commands
|
|
278
|
-
- expected output artifact path
|
|
279
|
-
- escalation / Replan triggers
|
|
280
|
-
|
|
281
|
-
换句话说:
|
|
282
|
-
|
|
283
|
-
```text
|
|
284
|
-
Project Manager = user-facing conversation owner + role command dispatcher
|
|
285
|
-
```
|
|
82
|
+
The architect owns:
|
|
286
83
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
### 6.2 Task Spec
|
|
290
|
-
|
|
291
|
-
Task Spec 是用户需求进入工程系统的入口。
|
|
292
|
-
|
|
293
|
-
建议路径:
|
|
294
|
-
|
|
295
|
-
```text
|
|
296
|
-
.ai/task-specs/<task-slug>.md
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
标准结构:
|
|
300
|
-
|
|
301
|
-
```md
|
|
302
|
-
# Task Spec
|
|
303
|
-
|
|
304
|
-
## Goal
|
|
305
|
-
## Background
|
|
306
|
-
## Scope
|
|
307
|
-
## Non-goals
|
|
308
|
-
## Task Severity
|
|
309
|
-
## Required Role Route
|
|
310
|
-
## Handoff Directory
|
|
311
|
-
## Relevant Files
|
|
312
|
-
## File Responsibilities
|
|
313
|
-
## Public Surface Contract
|
|
314
|
-
## Test Contract
|
|
315
|
-
## Architecture Constraints
|
|
316
|
-
## Stop Conditions
|
|
317
|
-
## Expected Behavior
|
|
318
|
-
## Validation Commands
|
|
319
|
-
## Definition of Done
|
|
320
|
-
## Risks
|
|
321
|
-
## Questions
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
### 6.3 Architecture Plan
|
|
325
|
-
|
|
326
|
-
Architecture Plan 是 architect role 的输出。
|
|
327
|
-
|
|
328
|
-
建议路径:
|
|
329
|
-
|
|
330
|
-
```text
|
|
331
|
-
.ai/handoffs/<task-slug>/architecture-plan.md
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
它定义:
|
|
335
|
-
|
|
336
|
-
- task classification
|
|
337
|
-
- required role route
|
|
338
|
-
- modules and files
|
|
84
|
+
- architecture plan
|
|
85
|
+
- module boundaries
|
|
339
86
|
- file responsibilities
|
|
340
|
-
- public
|
|
341
|
-
-
|
|
342
|
-
-
|
|
343
|
-
-
|
|
344
|
-
- validation per phase
|
|
345
|
-
- rollback / replan triggers
|
|
346
|
-
- risks
|
|
347
|
-
- docs to update
|
|
87
|
+
- public contracts
|
|
88
|
+
- test contracts
|
|
89
|
+
- Replan triggers
|
|
90
|
+
- post-review docs sync and architecture drift checks
|
|
348
91
|
|
|
349
|
-
|
|
92
|
+
Outputs:
|
|
350
93
|
|
|
351
|
-
|
|
94
|
+
- `.ai/handoffs/<task>/architecture-plan.md`
|
|
95
|
+
- `.ai/handoffs/<task>/docs-sync-report.md`
|
|
352
96
|
|
|
353
|
-
|
|
97
|
+
### Coder
|
|
354
98
|
|
|
355
|
-
|
|
356
|
-
.ai/handoffs/<task-slug>/implementation-log.md
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
它记录:
|
|
360
|
-
|
|
361
|
-
- files changed
|
|
362
|
-
- public surface changed
|
|
363
|
-
- tests added / updated
|
|
364
|
-
- validation run
|
|
365
|
-
- deviations from architecture plan
|
|
366
|
-
- follow-ups
|
|
367
|
-
|
|
368
|
-
### 6.5 Validation Log
|
|
369
|
-
|
|
370
|
-
Validation Log 是任务级验证证据。
|
|
371
|
-
|
|
372
|
-
建议路径:
|
|
373
|
-
|
|
374
|
-
```text
|
|
375
|
-
.ai/handoffs/<task-slug>/validation-log.md
|
|
376
|
-
```
|
|
99
|
+
The coder owns:
|
|
377
100
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
### 6.6 Review Report
|
|
382
|
-
|
|
383
|
-
Review Report 是 reviewer role 的输出。
|
|
384
|
-
|
|
385
|
-
建议路径:
|
|
386
|
-
|
|
387
|
-
```text
|
|
388
|
-
.ai/handoffs/<task-slug>/review-report.md
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
它必须覆盖:
|
|
392
|
-
|
|
393
|
-
- role / handoff compliance
|
|
394
|
-
- scope review
|
|
395
|
-
- architecture review
|
|
396
|
-
- public contract review
|
|
397
|
-
- test review
|
|
398
|
-
- missing tests added
|
|
101
|
+
- implementation within the approved plan
|
|
102
|
+
- direct unit/contract/regression tests
|
|
399
103
|
- validation evidence
|
|
400
|
-
-
|
|
401
|
-
- findings
|
|
402
|
-
- decision
|
|
104
|
+
- implementation log
|
|
403
105
|
|
|
404
|
-
|
|
106
|
+
Outputs:
|
|
405
107
|
|
|
406
|
-
|
|
108
|
+
- `.ai/handoffs/<task>/implementation-log.md`
|
|
109
|
+
- `.ai/handoffs/<task>/validation-log.md`
|
|
407
110
|
|
|
408
|
-
|
|
111
|
+
### Reviewer
|
|
409
112
|
|
|
410
|
-
|
|
113
|
+
The reviewer owns:
|
|
411
114
|
|
|
412
|
-
-
|
|
413
|
-
-
|
|
414
|
-
-
|
|
415
|
-
-
|
|
416
|
-
-
|
|
417
|
-
- test contract
|
|
418
|
-
- handoff paths
|
|
419
|
-
- validation requirements
|
|
420
|
-
- stop conditions
|
|
421
|
-
- current task state
|
|
115
|
+
- independent review
|
|
116
|
+
- test adequacy
|
|
117
|
+
- scope and architecture compliance
|
|
118
|
+
- docs gap detection
|
|
119
|
+
- risk findings
|
|
422
120
|
|
|
423
|
-
|
|
121
|
+
Output:
|
|
424
122
|
|
|
425
|
-
|
|
426
|
-
.ai/handoffs/<task-slug>/role-commands/<role>.md
|
|
427
|
-
```
|
|
123
|
+
- `.ai/handoffs/<task>/review-report.md`
|
|
428
124
|
|
|
429
|
-
|
|
125
|
+
## 6. Information Architecture
|
|
430
126
|
|
|
431
|
-
|
|
127
|
+
The app has two primary areas:
|
|
432
128
|
|
|
433
129
|
```text
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
- <relevant docs>
|
|
439
|
-
|
|
440
|
-
Produce:
|
|
441
|
-
- .ai/handoffs/<task-slug>/architecture-plan.md
|
|
442
|
-
|
|
443
|
-
Rules:
|
|
444
|
-
- define public surface contract
|
|
445
|
-
- define test contract
|
|
446
|
-
- do not edit production code
|
|
447
|
-
- stop and escalate if ...
|
|
130
|
+
┌───────────────────────────────┬─────────────────────────────────────────────┐
|
|
131
|
+
│ Sidebar │ Task Workspace │
|
|
132
|
+
│ collapsible sections │ header + active role console │
|
|
133
|
+
└───────────────────────────────┴─────────────────────────────────────────────┘
|
|
448
134
|
```
|
|
449
135
|
|
|
450
|
-
|
|
136
|
+
### Sidebar
|
|
451
137
|
|
|
452
|
-
|
|
138
|
+
All sidebar groups are collapsible and default to collapsed. When no task is selected, `Repository Path` opens by default.
|
|
453
139
|
|
|
454
|
-
|
|
140
|
+
Sections:
|
|
455
141
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
| T5 | large rewrite / greenfield | 新子系统、大迁移、长期重构 | `architect`,然后每个 phase 循环 `coder -> reviewer`,阶段边界做 architect review |
|
|
142
|
+
- `Repository Path`
|
|
143
|
+
- `Repository`
|
|
144
|
+
- `Workflow`
|
|
145
|
+
- `Settings`
|
|
146
|
+
- `VCM Harness`
|
|
147
|
+
- `New Task`
|
|
148
|
+
- `Tasks`
|
|
464
149
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
## 8. 端到端工作流
|
|
468
|
-
|
|
469
|
-
### 8.1 新项目初始化
|
|
470
|
-
|
|
471
|
-
用户连接一个 repo 后,VibeCodingMaster 执行 Harness Scan:
|
|
150
|
+
`Repository Path` layout:
|
|
472
151
|
|
|
473
152
|
```text
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
-> inspect directory and module boundaries
|
|
478
|
-
-> check CLAUDE.md
|
|
479
|
-
-> check docs/ARCHITECTURE.md
|
|
480
|
-
-> check docs/MODULE_MAP.md
|
|
481
|
-
-> check docs/TESTING.md
|
|
482
|
-
-> check module-local CLAUDE.md
|
|
483
|
-
-> check validation tools
|
|
484
|
-
-> check generated artifacts
|
|
485
|
-
-> report harness gaps
|
|
153
|
+
Repository Path
|
|
154
|
+
[ /path/to/repo ]
|
|
155
|
+
[ Recent v ] [ Connect ]
|
|
486
156
|
```
|
|
487
157
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
- 当前 harness level。
|
|
491
|
-
- 缺失的核心文档。
|
|
492
|
-
- 缺失的 validation commands。
|
|
493
|
-
- 高风险模块。
|
|
494
|
-
- 是否存在 generated artifact freshness check。
|
|
495
|
-
- 是否适合执行非平凡 AI coding。
|
|
496
|
-
|
|
497
|
-
### 8.2 用户提出需求
|
|
498
|
-
|
|
499
|
-
用户输入自然语言:
|
|
500
|
-
|
|
501
|
-
```text
|
|
502
|
-
帮我把账单里的优惠券和部分退款逻辑修一下。
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
VibeCodingMaster 不直接让 Claude Code 编码,而是先澄清:
|
|
506
|
-
|
|
507
|
-
- 期望行为是什么?
|
|
508
|
-
- 哪些入口受影响?
|
|
509
|
-
- 是否允许改 public API?
|
|
510
|
-
- 是否允许改 schema?
|
|
511
|
-
- 是否涉及权限、支付、数据删除?
|
|
512
|
-
- 成功标准是什么?
|
|
513
|
-
- 需要保留哪些兼容行为?
|
|
514
|
-
|
|
515
|
-
### 8.3 生成 Task Spec
|
|
516
|
-
|
|
517
|
-
VibeCodingMaster 根据用户回答和代码库扫描生成 Task Spec。
|
|
518
|
-
|
|
519
|
-
关键要求:
|
|
520
|
-
|
|
521
|
-
- 至少定义 file responsibilities。
|
|
522
|
-
- 普通任务定义 public surface contract。
|
|
523
|
-
- 新增或修改 public function 定义 test contract。
|
|
524
|
-
- 高风险任务定义 human approval gate。
|
|
525
|
-
|
|
526
|
-
### 8.4 Preflight Architecture Review
|
|
527
|
-
|
|
528
|
-
VibeCodingMaster 调用 Claude Code architect session 或等价架构角色生成 `architecture-plan.md`。
|
|
529
|
-
|
|
530
|
-
随后可调用独立模型做 Preflight Review,例如 ChatGPT、Gemini 或 fresh Claude session。
|
|
531
|
-
|
|
532
|
-
Preflight Review 输出:
|
|
533
|
-
|
|
534
|
-
```text
|
|
535
|
-
Decision: approve / request_changes / block
|
|
536
|
-
|
|
537
|
-
Critical Issues:
|
|
538
|
-
Architecture Risks:
|
|
539
|
-
Public Contract Risks:
|
|
540
|
-
Missing Context:
|
|
541
|
-
Test Requirements:
|
|
542
|
-
Suggested Plan Changes:
|
|
543
|
-
Final Recommendation:
|
|
544
|
-
```
|
|
545
|
-
|
|
546
|
-
如果 decision 是 `request_changes`,回到 architect 修改计划。
|
|
547
|
-
如果 decision 是 `block`,停止并请求用户或 human reviewer 决策。
|
|
548
|
-
|
|
549
|
-
### 8.5 Coder 执行
|
|
550
|
-
|
|
551
|
-
Coder role 只执行 approved plan。
|
|
552
|
-
|
|
553
|
-
执行 prompt 必须包含:
|
|
554
|
-
|
|
555
|
-
- task spec path
|
|
556
|
-
- architecture plan path
|
|
557
|
-
- scope
|
|
558
|
-
- public surface contract
|
|
559
|
-
- test contract
|
|
560
|
-
- validation commands
|
|
561
|
-
- stop conditions
|
|
562
|
-
- handoff log path
|
|
563
|
-
|
|
564
|
-
Coder 不能静默改变:
|
|
565
|
-
|
|
566
|
-
- scope
|
|
567
|
-
- public contract
|
|
568
|
-
- module responsibility
|
|
569
|
-
- architecture direction
|
|
570
|
-
- test strategy
|
|
571
|
-
|
|
572
|
-
如需改变,必须触发 Replan。
|
|
573
|
-
|
|
574
|
-
### 8.6 Validation
|
|
575
|
-
|
|
576
|
-
VibeCodingMaster 按任务风险选择验证层级:
|
|
158
|
+
`Repository` shows:
|
|
577
159
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
L1 Focused Unit / Contract Tests
|
|
583
|
-
changed-file tests, public contract tests, regression tests
|
|
584
|
-
|
|
585
|
-
L2 Module / Integration Tests
|
|
586
|
-
module service tests, DB integration, API contract
|
|
587
|
-
|
|
588
|
-
L3 Smoke E2E
|
|
589
|
-
core user journeys, browser/API smoke flows
|
|
590
|
-
|
|
591
|
-
L4 Full Regression / Release Suite
|
|
592
|
-
historical replay, visual, accessibility, perf, cross-browser
|
|
593
|
-
```
|
|
160
|
+
- path
|
|
161
|
+
- branch
|
|
162
|
+
- working tree state
|
|
594
163
|
|
|
595
|
-
|
|
164
|
+
The old `Dirty: yes/no` label is not used. The UI uses `Working tree: clean` or `Working tree: uncommitted changes`.
|
|
596
165
|
|
|
597
|
-
|
|
598
|
-
- T1:L0 + focused L1。
|
|
599
|
-
- T2:L0 + L1 + relevant L2。
|
|
600
|
-
- T3:L0 + L1 + L2。
|
|
601
|
-
- T4:L0 + L1 + L2 + relevant L3,release 前 L4。
|
|
602
|
-
- T5:每个 phase 有独立 validation plan。
|
|
166
|
+
`Workflow` shows the five soft workflow gates:
|
|
603
167
|
|
|
604
|
-
|
|
168
|
+
- Architecture
|
|
169
|
+
- Implementation
|
|
170
|
+
- Review
|
|
171
|
+
- Docs Sync
|
|
172
|
+
- PM Final
|
|
605
173
|
|
|
606
|
-
|
|
174
|
+
`Settings` contains:
|
|
607
175
|
|
|
608
|
-
|
|
176
|
+
- `Messages` button, opening a modal list of role messages.
|
|
177
|
+
- `Events` button, opening a modal list of runtime UI events for the current task.
|
|
178
|
+
- `Auto orchestration` on/off toggle.
|
|
609
179
|
|
|
610
|
-
|
|
611
|
-
2. security / permission risk
|
|
612
|
-
3. regressions
|
|
613
|
-
4. missing tests
|
|
614
|
-
5. architecture boundary violations
|
|
615
|
-
6. public contract mismatch
|
|
616
|
-
7. docs sync
|
|
180
|
+
There is no separate `Pause orchestration` or `Resume orchestration` control in the GUI. The current product model is one on/off toggle.
|
|
617
181
|
|
|
618
|
-
|
|
182
|
+
`VCM Harness` shows whether VCM managed blocks are installed/up to date in the project rules files.
|
|
619
183
|
|
|
620
|
-
|
|
621
|
-
- 增加小的边界测试。
|
|
622
|
-
- 修复测试 fixture。
|
|
623
|
-
- 修复明显 typo、import、lint。
|
|
184
|
+
`New Task` contains one input:
|
|
624
185
|
|
|
625
|
-
|
|
186
|
+
- `task name`
|
|
626
187
|
|
|
627
|
-
|
|
188
|
+
There is no optional title input in the current UI.
|
|
628
189
|
|
|
629
|
-
|
|
190
|
+
### Task Workspace
|
|
630
191
|
|
|
631
|
-
|
|
632
|
-
behavior is correct
|
|
633
|
-
+ architecture is compliant
|
|
634
|
-
+ public contract is accurate
|
|
635
|
-
+ tests are sufficient
|
|
636
|
-
+ validation evidence exists
|
|
637
|
-
+ docs are synced
|
|
638
|
-
+ plan deviations are traceable
|
|
639
|
-
```
|
|
640
|
-
|
|
641
|
-
最终报告必须包含:
|
|
192
|
+
The task workspace header is one compact row:
|
|
642
193
|
|
|
643
194
|
```text
|
|
644
|
-
|
|
645
|
-
Role sessions used:
|
|
646
|
-
Handoff artifacts:
|
|
647
|
-
Files changed:
|
|
648
|
-
Public surface changed:
|
|
649
|
-
Tests added/updated:
|
|
650
|
-
Validation run:
|
|
651
|
-
Architecture checks:
|
|
652
|
-
Docs updated:
|
|
653
|
-
Plan deviations:
|
|
654
|
-
Remaining risks:
|
|
655
|
-
Decision:
|
|
195
|
+
TASK WORKSPACE <task> <branch> [Project Manager] [Architect] [Coder] [Reviewer] [Refresh]
|
|
656
196
|
```
|
|
657
197
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
### 9.1 Chat Intake
|
|
661
|
-
|
|
662
|
-
负责和用户沟通,把自然语言变成工程需求。
|
|
663
|
-
|
|
664
|
-
能力:
|
|
665
|
-
|
|
666
|
-
- 识别任务类型。
|
|
667
|
-
- 判断风险等级。
|
|
668
|
-
- 追问关键需求。
|
|
669
|
-
- 识别 high-risk boundaries。
|
|
670
|
-
- 生成 task brief。
|
|
671
|
-
|
|
672
|
-
### 9.2 Task Spec Builder
|
|
673
|
-
|
|
674
|
-
负责生成和维护 `.ai/task-specs/<task-slug>.md`。
|
|
675
|
-
|
|
676
|
-
能力:
|
|
677
|
-
|
|
678
|
-
- scope / non-goals。
|
|
679
|
-
- severity classification。
|
|
680
|
-
- required role route。
|
|
681
|
-
- file responsibilities。
|
|
682
|
-
- public surface contract。
|
|
683
|
-
- test contract。
|
|
684
|
-
- validation commands。
|
|
685
|
-
- stop conditions。
|
|
686
|
-
|
|
687
|
-
### 9.3 Role Route Manager
|
|
688
|
-
|
|
689
|
-
负责根据任务分级选择 role route。
|
|
690
|
-
|
|
691
|
-
能力:
|
|
692
|
-
|
|
693
|
-
- 推荐 `architect / coder / reviewer / specialist`。
|
|
694
|
-
- 检查当前 session role 是否匹配。
|
|
695
|
-
- 阻止错误角色继续执行。
|
|
696
|
-
- 在 GUI 中引导用户启动或切换到正确 Claude Code role session。
|
|
697
|
-
|
|
698
|
-
### 9.4 Handoff Manager
|
|
699
|
-
|
|
700
|
-
负责管理 `.ai/handoffs/<task-slug>/`。
|
|
701
|
-
|
|
702
|
-
能力:
|
|
703
|
-
|
|
704
|
-
- 创建 handoff directory。
|
|
705
|
-
- 校验 artifact schema。
|
|
706
|
-
- 检查前置 artifact 是否存在。
|
|
707
|
-
- 汇总角色输出。
|
|
708
|
-
- 标记缺失或不一致内容。
|
|
709
|
-
|
|
710
|
-
### 9.5 Contract Manager
|
|
711
|
-
|
|
712
|
-
负责管理 public surface contract 和 test contract。
|
|
713
|
-
|
|
714
|
-
能力:
|
|
715
|
-
|
|
716
|
-
- 识别 public functions / module APIs。
|
|
717
|
-
- 记录输入、输出、副作用、错误行为、依赖规则。
|
|
718
|
-
- 检查代码变更是否修改 public surface。
|
|
719
|
-
- 提醒新增或更新 contract tests。
|
|
720
|
-
- 调用 `tools/check-public-surface` 和 `tools/check-contract-tests`。
|
|
721
|
-
|
|
722
|
-
### 9.6 Prompt Compiler
|
|
723
|
-
|
|
724
|
-
负责把 VibeCodingMaster 的结构化任务上下文编译成 AI 角色可以准确执行的完整命令。
|
|
725
|
-
|
|
726
|
-
它服务于 Project Manager,是 Project Manager “给其他角色发准确命令”的核心能力。
|
|
727
|
-
|
|
728
|
-
输入:
|
|
729
|
-
|
|
730
|
-
- 用户原始需求。
|
|
731
|
-
- Task Spec。
|
|
732
|
-
- Required Role Route。
|
|
733
|
-
- Architecture Plan。
|
|
734
|
-
- Public Surface Contract。
|
|
735
|
-
- Test Contract。
|
|
736
|
-
- Handoff Directory。
|
|
737
|
-
- Validation Commands。
|
|
738
|
-
- Stop Conditions。
|
|
739
|
-
- 当前任务状态。
|
|
740
|
-
|
|
741
|
-
输出:
|
|
742
|
-
|
|
743
|
-
- architect role command。
|
|
744
|
-
- coder role command。
|
|
745
|
-
- reviewer role command。
|
|
746
|
-
- specialist role command。
|
|
747
|
-
- human approval brief。
|
|
748
|
-
|
|
749
|
-
每个 role command 必须回答:
|
|
750
|
-
|
|
751
|
-
- 你是谁。
|
|
752
|
-
- 你要读什么。
|
|
753
|
-
- 你要产出什么。
|
|
754
|
-
- 你可以改什么。
|
|
755
|
-
- 你不能改什么。
|
|
756
|
-
- 什么情况下必须停止。
|
|
757
|
-
- 你必须运行或检查哪些验证。
|
|
758
|
-
- 你的完成标准是什么。
|
|
198
|
+
Role tabs show the session status for each role.
|
|
759
199
|
|
|
760
|
-
|
|
200
|
+
The main task workspace only renders the active role console. Messages, Events, and Workflow are in the sidebar.
|
|
761
201
|
|
|
762
|
-
|
|
202
|
+
## 7. Role Console
|
|
763
203
|
|
|
764
|
-
|
|
204
|
+
The role console owns a single role session.
|
|
765
205
|
|
|
766
|
-
|
|
767
|
-
Task Workspace: <task-slug>
|
|
768
|
-
|
|
769
|
-
Role sessions:
|
|
770
|
-
project-manager
|
|
771
|
-
architect
|
|
772
|
-
coder
|
|
773
|
-
reviewer
|
|
774
|
-
|
|
775
|
-
Each role session:
|
|
776
|
-
embedded terminal
|
|
777
|
-
input channel
|
|
778
|
-
output stream
|
|
779
|
-
status badge
|
|
780
|
-
role command link
|
|
781
|
-
raw log link
|
|
782
|
-
handoff artifact link
|
|
783
|
-
```
|
|
784
|
-
|
|
785
|
-
能力:
|
|
206
|
+
Controls:
|
|
786
207
|
|
|
787
|
-
-
|
|
788
|
-
-
|
|
789
|
-
-
|
|
790
|
-
-
|
|
791
|
-
-
|
|
792
|
-
-
|
|
793
|
-
- 展示每个 role session 对应的 role command、raw log 和 handoff artifact。
|
|
794
|
-
- 支持把 Project Manager 生成的 role command 从 GUI 发送到目标 role session。
|
|
795
|
-
- 支持将 terminal output 持续写入 task logs。
|
|
208
|
+
- Permission mode select.
|
|
209
|
+
- `Start`.
|
|
210
|
+
- `Resume`.
|
|
211
|
+
- `Restart`.
|
|
212
|
+
- `Stop`.
|
|
213
|
+
- `Translate` toggle.
|
|
796
214
|
|
|
797
|
-
|
|
215
|
+
Permission modes:
|
|
798
216
|
|
|
799
|
-
-
|
|
800
|
-
-
|
|
801
|
-
-
|
|
802
|
-
- 多个 role session 可以同时存在,但写代码仍遵守 single-writer rule。
|
|
803
|
-
- VibeCodingMaster 负责 session lifecycle、可见性、artifact 管理和状态汇总,不替代 role agent 的专业判断。
|
|
217
|
+
- `default`
|
|
218
|
+
- `bypassPermissions`
|
|
219
|
+
- `--dangerously-skip-permissions`
|
|
804
220
|
|
|
805
|
-
|
|
221
|
+
The permission mode applies on the next start/resume/restart. If a session is already running, changing the select does not mutate that live process.
|
|
806
222
|
|
|
807
|
-
|
|
223
|
+
When translation is off, the console shows one embedded terminal.
|
|
808
224
|
|
|
809
|
-
|
|
225
|
+
When translation is on, the console splits horizontally:
|
|
810
226
|
|
|
811
227
|
```text
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
-> node-pty
|
|
816
|
-
-> claude --agent <role> [permission option]
|
|
228
|
+
┌────────────────────────────┬────────────────────────────┐
|
|
229
|
+
│ embedded Claude terminal │ Translation panel │
|
|
230
|
+
└────────────────────────────┴────────────────────────────┘
|
|
817
231
|
```
|
|
818
232
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
- 为每个 role 创建 pseudo-terminal。
|
|
822
|
-
- 将终端输出流式推送到前端 embedded terminal。
|
|
823
|
-
- 将用户键盘输入从前端写回对应 pty。
|
|
824
|
-
- 允许 backend 在用户触发时向 pty 写入短指令。
|
|
825
|
-
- 允许 backend 监听 pty output,并用于日志、状态和 GUI 提醒。
|
|
826
|
-
- 支持 resize。
|
|
827
|
-
- 支持进程退出、异常、重启和状态上报。
|
|
828
|
-
- 支持将 raw terminal stream 保存到 logs。
|
|
829
|
-
|
|
830
|
-
权限模式:
|
|
831
|
-
|
|
832
|
-
- GUI 在每个 role session 的 Start / Restart 上方提供权限选项。
|
|
833
|
-
- `默认`:不额外传权限参数,使用 Claude Code 默认权限行为。
|
|
834
|
-
- `bypassPermissions`:启动参数为 `--permission-mode bypassPermissions`。
|
|
835
|
-
- `--dangerously-skip-permissions`:启动参数为 `--dangerously-skip-permissions`。
|
|
836
|
-
- 选项只影响新启动或重启的 session,不自动改变已经运行中的 Claude Code 进程。
|
|
837
|
-
|
|
838
|
-
自动化边界:
|
|
839
|
-
|
|
840
|
-
- V1 可以程序化写入 terminal input,但只用于用户触发的 command dispatch。
|
|
841
|
-
- V1 可以程序化读取 terminal output,但只做 raw log、轻量状态和 UI 提醒。
|
|
842
|
-
- V1 不自动确认 Claude Code 权限提示。
|
|
843
|
-
- V1 允许用户在启动 session 时主动选择较宽松的 Claude Code 权限模式。
|
|
844
|
-
- V1 不让 PM 自动连续驱动 architect / coder / reviewer。
|
|
845
|
-
- V1 不根据 terminal output 自动执行高风险下一步。
|
|
846
|
-
|
|
847
|
-
### 9.9 Claude Code Adapter
|
|
848
|
-
|
|
849
|
-
负责将 Prompt Compiler 生成的 role command 交给 Claude Code 执行,或生成可复制的 Claude Code prompt。
|
|
850
|
-
|
|
851
|
-
能力:
|
|
852
|
-
|
|
853
|
-
- 启动或恢复 architect session。
|
|
854
|
-
- 启动或恢复 coder session。
|
|
855
|
-
- 启动或恢复 reviewer session。
|
|
856
|
-
- 注入 artifact paths。
|
|
857
|
-
- 注入 stop conditions。
|
|
858
|
-
- 收集执行输出。
|
|
859
|
-
- 处理 Claude Code 交互式权限确认和等待状态。
|
|
860
|
-
|
|
861
|
-
V1 中,Claude Code Adapter 主要通过 Terminal Runtime Manager 工作。它不直接实现翻译功能;翻译由 `project-manager` agent 根据自己的 role prompt 完成。
|
|
862
|
-
|
|
863
|
-
### 9.10 Cross-Model Reviewer
|
|
864
|
-
|
|
865
|
-
负责让另一个 AI 模型审查计划或代码。
|
|
866
|
-
|
|
867
|
-
能力:
|
|
868
|
-
|
|
869
|
-
- Preflight Plan Review。
|
|
870
|
-
- Public Contract Review。
|
|
871
|
-
- Test Contract Review。
|
|
872
|
-
- Code Diff Review。
|
|
873
|
-
- Security Review。
|
|
874
|
-
- Architecture Review。
|
|
875
|
-
|
|
876
|
-
价值:
|
|
877
|
-
|
|
878
|
-
- 避免实现 session 自我确认。
|
|
879
|
-
- 在编码前发现方案问题。
|
|
880
|
-
- 在 PR 前发现遗漏测试、边界问题和架构漂移。
|
|
233
|
+
The split should stay close to 50/50 width. Both panes expand vertically to fill the remaining workspace height.
|
|
881
234
|
|
|
882
|
-
|
|
235
|
+
## 8. Session Lifecycle
|
|
883
236
|
|
|
884
|
-
|
|
237
|
+
Buttons:
|
|
885
238
|
|
|
886
|
-
|
|
239
|
+
- `Start`: creates a new Claude session id and starts a fresh role process.
|
|
240
|
+
- `Resume`: reuses the persisted Claude session id and starts Claude Code with resume.
|
|
241
|
+
- `Restart`: stops the current process and starts a fresh Claude session id.
|
|
242
|
+
- `Stop`: stops the current embedded terminal process.
|
|
887
243
|
|
|
888
|
-
|
|
889
|
-
- 运行或指导运行 validation commands。
|
|
890
|
-
- 摘要失败日志。
|
|
891
|
-
- 要求失败后 rerun。
|
|
892
|
-
- 写入 task-level validation log。
|
|
893
|
-
|
|
894
|
-
### 9.12 Replan Controller
|
|
895
|
-
|
|
896
|
-
负责处理计划偏差。
|
|
897
|
-
|
|
898
|
-
能力:
|
|
899
|
-
|
|
900
|
-
- 识别 replan trigger。
|
|
901
|
-
- 冻结当前实现状态。
|
|
902
|
-
- 比较 plan 和 code reality。
|
|
903
|
-
- 生成选项:patch forward、partial rollback、full rollback。
|
|
904
|
-
- 记录用户或 human reviewer 的决策。
|
|
905
|
-
- 更新 task spec、architecture plan 和 docs。
|
|
906
|
-
|
|
907
|
-
### 9.13 Project Memory
|
|
908
|
-
|
|
909
|
-
负责项目长期状态。
|
|
910
|
-
|
|
911
|
-
文件:
|
|
244
|
+
Current command shapes:
|
|
912
245
|
|
|
913
246
|
```text
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
.ai/state/scratch.md
|
|
247
|
+
claude --agent <role> --session-id <uuid>
|
|
248
|
+
claude --agent <role> --resume <uuid>
|
|
249
|
+
claude --agent <role> --session-id <uuid> --permission-mode bypassPermissions
|
|
250
|
+
claude --agent <role> --session-id <uuid> --dangerously-skip-permissions
|
|
919
251
|
```
|
|
920
252
|
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
- 记录 active tasks。
|
|
924
|
-
- 记录架构和设计决策。
|
|
925
|
-
- 记录 deferred findings。
|
|
926
|
-
- 记录 validation index。
|
|
927
|
-
- 清理 session-local scratch。
|
|
928
|
-
|
|
929
|
-
### 9.14 PR Assistant
|
|
930
|
-
|
|
931
|
-
负责把任务结果整理成 PR。
|
|
253
|
+
VCM persists:
|
|
932
254
|
|
|
933
|
-
|
|
255
|
+
- terminal runtime session id
|
|
256
|
+
- Claude session id
|
|
257
|
+
- transcript path
|
|
258
|
+
- role status
|
|
259
|
+
- permission mode
|
|
260
|
+
- display command
|
|
261
|
+
- cwd
|
|
262
|
+
- pid when running
|
|
263
|
+
- log path
|
|
934
264
|
|
|
935
|
-
|
|
936
|
-
- task spec link。
|
|
937
|
-
- architecture plan link。
|
|
938
|
-
- files changed。
|
|
939
|
-
- public surface changed。
|
|
940
|
-
- tests added / updated。
|
|
941
|
-
- validation evidence。
|
|
942
|
-
- docs sync。
|
|
943
|
-
- remaining risks。
|
|
265
|
+
## 9. Harness Installation
|
|
944
266
|
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
推荐 repo 结构:
|
|
267
|
+
On repository connect, VCM checks:
|
|
948
268
|
|
|
949
269
|
```text
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
MODULE_MAP.md
|
|
956
|
-
TESTING.md
|
|
957
|
-
SECURITY.md
|
|
958
|
-
DEPENDENCY_RULES.md
|
|
959
|
-
cc-best-practices.md
|
|
960
|
-
product-design.md
|
|
961
|
-
exec-plans/
|
|
962
|
-
active/
|
|
963
|
-
completed/
|
|
964
|
-
|
|
965
|
-
.claude/
|
|
966
|
-
settings.json
|
|
967
|
-
skills/
|
|
968
|
-
agents/
|
|
969
|
-
architect.md
|
|
970
|
-
coder.md
|
|
971
|
-
reviewer.md
|
|
972
|
-
optional/
|
|
973
|
-
security-specialist.md
|
|
974
|
-
migration-specialist.md
|
|
975
|
-
performance-specialist.md
|
|
976
|
-
frontend-qa.md
|
|
977
|
-
commands/
|
|
978
|
-
|
|
979
|
-
.ai/
|
|
980
|
-
task-specs/
|
|
981
|
-
handoffs/
|
|
982
|
-
state/
|
|
983
|
-
generated/
|
|
984
|
-
|
|
985
|
-
tools/
|
|
986
|
-
check-fast
|
|
987
|
-
check-changed
|
|
988
|
-
check-module
|
|
989
|
-
check-e2e-smoke
|
|
990
|
-
check-boundaries
|
|
991
|
-
check-public-surface
|
|
992
|
-
check-contract-tests
|
|
993
|
-
check-generated-artifacts
|
|
994
|
-
check-docs-freshness
|
|
995
|
-
check-agent-rules
|
|
996
|
-
```
|
|
997
|
-
|
|
998
|
-
## 11. 关键界面
|
|
999
|
-
|
|
1000
|
-
### 11.1 Project Dashboard
|
|
1001
|
-
|
|
1002
|
-
显示:
|
|
1003
|
-
|
|
1004
|
-
- 已连接 repo。
|
|
1005
|
-
- active tasks。
|
|
1006
|
-
- task severity。
|
|
1007
|
-
- required role route。
|
|
1008
|
-
- 每个任务的 session health。
|
|
1009
|
-
- blocked tasks。
|
|
1010
|
-
- recent validation failures。
|
|
1011
|
-
- known issues。
|
|
1012
|
-
- harness health。
|
|
1013
|
-
- 最近打开的 role session。
|
|
1014
|
-
|
|
1015
|
-
### 11.2 Task Workspace
|
|
1016
|
-
|
|
1017
|
-
一个任务的主工作台。
|
|
1018
|
-
|
|
1019
|
-
左侧:
|
|
1020
|
-
|
|
1021
|
-
- 任务列表。
|
|
1022
|
-
- 用户需求。
|
|
1023
|
-
- task spec。
|
|
1024
|
-
- required role route。
|
|
1025
|
-
- open questions。
|
|
1026
|
-
|
|
1027
|
-
中间:
|
|
1028
|
-
|
|
1029
|
-
- role session tabs。
|
|
1030
|
-
- embedded Claude Code terminal。
|
|
1031
|
-
- 当前 role 的输入框和输出流。
|
|
1032
|
-
- session toolbar:start / stop / restart / clear view / open log。
|
|
1033
|
-
- role status:starting / running / waiting / blocked / done / crashed。
|
|
1034
|
-
- acceptance checklist。
|
|
1035
|
-
|
|
1036
|
-
### 11.3 Session Console
|
|
1037
|
-
|
|
1038
|
-
显示单个 Claude Code role session 的完整交互界面:
|
|
1039
|
-
|
|
1040
|
-
- role name。
|
|
1041
|
-
- agent command,例如 `claude --agent architect`。
|
|
1042
|
-
- terminal viewport。
|
|
1043
|
-
- terminal input。
|
|
1044
|
-
- running / waiting / crashed 状态。
|
|
1045
|
-
- last output time。
|
|
1046
|
-
- raw log path。
|
|
1047
|
-
- restart / stop / mark done 操作。
|
|
1048
|
-
|
|
1049
|
-
Session Console 必须支持 Claude Code 的交互式确认场景,例如权限确认、继续执行确认、失败后用户补充指令。
|
|
1050
|
-
|
|
1051
|
-
### 11.4 Handoff Files
|
|
1052
|
-
|
|
1053
|
-
V1 不在任务主界面展示独立 artifact panel。role commands、handoff artifacts 和 raw logs 仍保存在任务目录中,作为 Claude Code sessions 之间的文件级事实源;GUI 优先把空间留给 embedded terminal。
|
|
1054
|
-
|
|
1055
|
-
### 11.5 Contract View
|
|
1056
|
-
|
|
1057
|
-
显示当前任务涉及的 public surface:
|
|
1058
|
-
|
|
1059
|
-
- public function name。
|
|
1060
|
-
- owner module。
|
|
1061
|
-
- inputs。
|
|
1062
|
-
- outputs。
|
|
1063
|
-
- side effects。
|
|
1064
|
-
- error behavior。
|
|
1065
|
-
- dependency rules。
|
|
1066
|
-
- existing tests。
|
|
1067
|
-
- required tests。
|
|
1068
|
-
- contract status。
|
|
1069
|
-
|
|
1070
|
-
### 11.6 Review Inbox
|
|
1071
|
-
|
|
1072
|
-
集中处理:
|
|
1073
|
-
|
|
1074
|
-
- Preflight Review findings。
|
|
1075
|
-
- Code Review findings。
|
|
1076
|
-
- Replan requests。
|
|
1077
|
-
- Missing test warnings。
|
|
1078
|
-
- Docs sync warnings。
|
|
1079
|
-
- Human approval gates。
|
|
1080
|
-
|
|
1081
|
-
### 11.7 Harness Health
|
|
1082
|
-
|
|
1083
|
-
显示:
|
|
1084
|
-
|
|
1085
|
-
- root `CLAUDE.md` 是否存在。
|
|
1086
|
-
- module-local `CLAUDE.md` 覆盖率。
|
|
1087
|
-
- architecture docs 是否存在。
|
|
1088
|
-
- testing docs 是否存在。
|
|
1089
|
-
- validation tools 是否存在。
|
|
1090
|
-
- generated artifacts 是否 freshness-checked。
|
|
1091
|
-
- role agents 是否存在。
|
|
1092
|
-
- hooks / CI gates 是否存在。
|
|
1093
|
-
- known issues 是否过期。
|
|
1094
|
-
|
|
1095
|
-
## 12. 数据对象
|
|
1096
|
-
|
|
1097
|
-
### 12.1 Project
|
|
1098
|
-
|
|
1099
|
-
```json
|
|
1100
|
-
{
|
|
1101
|
-
"id": "project_123",
|
|
1102
|
-
"name": "VibeCodingMaster",
|
|
1103
|
-
"repoPath": "/path/to/repo",
|
|
1104
|
-
"defaultBranch": "main",
|
|
1105
|
-
"harnessHealth": "partial",
|
|
1106
|
-
"validationCommands": [
|
|
1107
|
-
"tools/check-fast",
|
|
1108
|
-
"tools/check-changed"
|
|
1109
|
-
]
|
|
1110
|
-
}
|
|
1111
|
-
```
|
|
1112
|
-
|
|
1113
|
-
### 12.2 Task
|
|
1114
|
-
|
|
1115
|
-
```json
|
|
1116
|
-
{
|
|
1117
|
-
"id": "task_123",
|
|
1118
|
-
"slug": "coupon-partial-refund",
|
|
1119
|
-
"title": "Fix coupon and partial refund calculation",
|
|
1120
|
-
"severity": "T4",
|
|
1121
|
-
"status": "planning",
|
|
1122
|
-
"requiredRoleRoute": [
|
|
1123
|
-
"architect",
|
|
1124
|
-
"billing-specialist",
|
|
1125
|
-
"coder",
|
|
1126
|
-
"reviewer",
|
|
1127
|
-
"human-approval"
|
|
1128
|
-
],
|
|
1129
|
-
"specPath": ".ai/task-specs/coupon-partial-refund.md",
|
|
1130
|
-
"handoffDirectory": ".ai/handoffs/coupon-partial-refund"
|
|
1131
|
-
}
|
|
1132
|
-
```
|
|
1133
|
-
|
|
1134
|
-
### 12.3 Public Contract
|
|
1135
|
-
|
|
1136
|
-
```json
|
|
1137
|
-
{
|
|
1138
|
-
"symbol": "RefundService.calculateRefundAmount",
|
|
1139
|
-
"module": "billing",
|
|
1140
|
-
"signatureStatus": "unchanged",
|
|
1141
|
-
"inputs": ["invoiceId", "request"],
|
|
1142
|
-
"output": "Money",
|
|
1143
|
-
"sideEffects": [],
|
|
1144
|
-
"errorBehavior": ["throws when invoice is not refundable"],
|
|
1145
|
-
"dependencyRules": ["must not call payment adapter internals"],
|
|
1146
|
-
"requiredTests": [
|
|
1147
|
-
"happy path",
|
|
1148
|
-
"refund cannot exceed post-discount total",
|
|
1149
|
-
"invalid invoice state"
|
|
1150
|
-
]
|
|
1151
|
-
}
|
|
270
|
+
CLAUDE.md
|
|
271
|
+
.claude/agents/project-manager.md
|
|
272
|
+
.claude/agents/architect.md
|
|
273
|
+
.claude/agents/coder.md
|
|
274
|
+
.claude/agents/reviewer.md
|
|
1152
275
|
```
|
|
1153
276
|
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
```json
|
|
1157
|
-
{
|
|
1158
|
-
"id": "review_123",
|
|
1159
|
-
"type": "preflight_plan",
|
|
1160
|
-
"reviewer": "cross_model_reviewer",
|
|
1161
|
-
"decision": "request_changes",
|
|
1162
|
-
"findings": [
|
|
1163
|
-
{
|
|
1164
|
-
"severity": "high",
|
|
1165
|
-
"category": "public_contract",
|
|
1166
|
-
"message": "The plan changes refund behavior but does not define consumer-facing contract tests."
|
|
1167
|
-
}
|
|
1168
|
-
]
|
|
1169
|
-
}
|
|
1170
|
-
```
|
|
277
|
+
If a file is missing, VCM can create a recommended default.
|
|
1171
278
|
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
```json
|
|
1175
|
-
{
|
|
1176
|
-
"id": "session_architect_123",
|
|
1177
|
-
"claudeSessionId": "00000000-0000-4000-8000-000000000001",
|
|
1178
|
-
"taskSlug": "coupon-partial-refund",
|
|
1179
|
-
"role": "architect",
|
|
1180
|
-
"status": "running",
|
|
1181
|
-
"command": "claude --agent architect --permission-mode bypassPermissions",
|
|
1182
|
-
"permissionMode": "bypassPermissions",
|
|
1183
|
-
"terminalBackend": "node-pty",
|
|
1184
|
-
"logPath": ".ai/handoffs/coupon-partial-refund/logs/architect.log",
|
|
1185
|
-
"roleCommandPath": ".ai/handoffs/coupon-partial-refund/role-commands/architect.md",
|
|
1186
|
-
"handoffArtifactPath": ".ai/handoffs/coupon-partial-refund/architecture-plan.md",
|
|
1187
|
-
"startedAt": "2026-05-29T00:00:00+08:00",
|
|
1188
|
-
"lastOutputAt": "2026-05-29T00:03:14+08:00"
|
|
1189
|
-
}
|
|
1190
|
-
```
|
|
279
|
+
If a file already exists, VCM only inserts or replaces the managed block:
|
|
1191
280
|
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
"id": "evt_123",
|
|
1197
|
-
"sessionId": "session_architect_123",
|
|
1198
|
-
"type": "output",
|
|
1199
|
-
"timestamp": "2026-05-29T00:03:14+08:00",
|
|
1200
|
-
"data": "Architecture Summary..."
|
|
1201
|
-
}
|
|
1202
|
-
```
|
|
1203
|
-
|
|
1204
|
-
## 13. MVP 范围
|
|
1205
|
-
|
|
1206
|
-
### 13.1 V1 产品定位
|
|
1207
|
-
|
|
1208
|
-
V1 只做一件事:
|
|
1209
|
-
|
|
1210
|
-
> 做一个本地 GUI Session Cockpit,让用户可以在一个任务工作台中启动、切换、查看、输入和管理多个 Claude Code role sessions。
|
|
1211
|
-
|
|
1212
|
-
V1 不在产品层做翻译功能。
|
|
1213
|
-
用户输入和 Claude Code 输出的中英翻译,交给 `.claude/agents/project-manager.md` 中定义的 Project Manager 角色完成。
|
|
1214
|
-
|
|
1215
|
-
V1 的核心判断标准不是“CLI 是否能控制多个终端”,而是:
|
|
1216
|
-
|
|
1217
|
-
> 用户是否可以不离开 GUI,就完成多 Claude Code sessions 的创建、切换、沟通、观察、日志保存和 handoff artifact 查看。
|
|
1218
|
-
|
|
1219
|
-
### 13.2 V1 必须支持
|
|
1220
|
-
|
|
1221
|
-
1. 启动本地 GUI 应用。
|
|
1222
|
-
2. 连接或选择本地 Git repo。
|
|
1223
|
-
3. 检查本机是否安装 Claude Code。
|
|
1224
|
-
4. 创建任务 workspace。
|
|
1225
|
-
5. 为任务创建 handoff directory:
|
|
1226
|
-
- `.ai/handoffs/<task-slug>/`
|
|
1227
|
-
- `.ai/handoffs/<task-slug>/role-commands/`
|
|
1228
|
-
- `.ai/handoffs/<task-slug>/logs/`
|
|
1229
|
-
6. 在 GUI 中展示 role session tabs:
|
|
1230
|
-
- `project-manager`
|
|
1231
|
-
- `architect`
|
|
1232
|
-
- `coder`
|
|
1233
|
-
- `reviewer`
|
|
1234
|
-
7. 在对应 role session 中启动 Claude Code:
|
|
1235
|
-
- 首次启动:`claude --agent <role> --session-id <uuid>`
|
|
1236
|
-
- 恢复启动:`claude --agent <role> --resume <uuid>`
|
|
1237
|
-
8. 在页面中嵌入每个 Claude Code session 的终端输出和输入。
|
|
1238
|
-
9. 支持用户切换 role session 并直接沟通。
|
|
1239
|
-
10. 支持 Claude Code 权限确认、等待用户输入、失败后补充指令等交互式场景。
|
|
1240
|
-
11. 展示每个 role session 的状态:not started / starting / running / waiting / blocked / done / crashed。
|
|
1241
|
-
12. 支持启动、停止、重启某个 role session。
|
|
1242
|
-
13. 支持 Project Manager 生成 role command artifact。
|
|
1243
|
-
14. 支持用户在 GUI 中查看 role command,并一键发送到目标 role session。
|
|
1244
|
-
15. 将每个 role session 的 raw output 保存为日志。
|
|
1245
|
-
16. 在 GUI 中查看 architecture-plan / implementation-log / validation-log / review-report。
|
|
1246
|
-
17. 检查 handoff artifacts 是否存在、是否为空、是否包含必要标题。
|
|
1247
|
-
18. 展示当前任务的状态摘要和下一步建议。
|
|
1248
|
-
19. 在 `.vcm/sessions/<task-slug>.json` 中记录每个 role 的 `claudeSessionId`,支持异常中断后 Resume。
|
|
1249
|
-
20. 保留 CLI 作为开发和调试入口,但不要求用户用 CLI 完成主流程。
|
|
1250
|
-
|
|
1251
|
-
### 13.3 V1 明确不做
|
|
1252
|
-
|
|
1253
|
-
- SaaS 多用户协作。
|
|
1254
|
-
- 企业权限和审计。
|
|
1255
|
-
- 完整 Desktop 打包和自动更新。
|
|
1256
|
-
- 产品层翻译管线。
|
|
1257
|
-
- 独立翻译模型调用。
|
|
1258
|
-
- 自动生成完整 Task Spec。
|
|
1259
|
-
- 自动做 Preflight Review。
|
|
1260
|
-
- 自动做 Cross-Model Code Review。
|
|
1261
|
-
- 自动判断 public contract 和 test contract。
|
|
1262
|
-
- 自动运行 validation commands。
|
|
1263
|
-
- 自动创建 PR。
|
|
1264
|
-
- Jira / Linear / GitHub 双向同步。
|
|
1265
|
-
- 云端 session 托管。
|
|
1266
|
-
- 多 repo / 多任务并行调度。
|
|
1267
|
-
- 多 worktree 自动管理。
|
|
1268
|
-
- 让用户手动管理底层 terminal process。
|
|
1269
|
-
|
|
1270
|
-
这些能力可以作为后续版本演进。V1 的判断标准不是“PM 流程是否全部自动化”,而是“GUI 是否让多 Claude Code role sessions 变得可见、可切换、可沟通、可恢复、可交接”。
|
|
1271
|
-
|
|
1272
|
-
### 13.4 V1 本地执行机制
|
|
1273
|
-
|
|
1274
|
-
推荐 V1 使用本地 Web GUI:
|
|
1275
|
-
|
|
1276
|
-
```text
|
|
1277
|
-
Browser UI / Desktop shell
|
|
1278
|
-
-> local Node backend
|
|
1279
|
-
-> WebSocket terminal bridge
|
|
1280
|
-
-> node-pty
|
|
1281
|
-
-> claude --agent <role>
|
|
281
|
+
```md
|
|
282
|
+
<!-- VCM:BEGIN version=1 -->
|
|
283
|
+
...
|
|
284
|
+
<!-- VCM:END -->
|
|
1282
285
|
```
|
|
1283
286
|
|
|
1284
|
-
|
|
287
|
+
VCM must preserve all user-authored content outside the managed block.
|
|
1285
288
|
|
|
1286
|
-
|
|
1287
|
-
- Backend 负责 repo 连接、进程生命周期、pty I/O、日志写入、artifact 读写。
|
|
1288
|
-
- Claude Code role session 负责实际沟通和执行。
|
|
1289
|
-
- Handoff artifacts 负责跨 session 传递稳定结果。
|
|
289
|
+
After applying harness changes, the UI tells the user what changed and recommends reviewing and committing those files.
|
|
1290
290
|
|
|
1291
|
-
|
|
291
|
+
Role sessions get VCM behavior from `CLAUDE.md` and `.claude/agents/*.md`, not from a pasted startup context.
|
|
1292
292
|
|
|
1293
|
-
|
|
1294
|
-
TerminalRuntime implementation = node-pty
|
|
1295
|
-
```
|
|
1296
|
-
|
|
1297
|
-
后续如果要增强持久性,应优先改进本地 backend lifecycle、session registry、raw logs 和恢复体验,而不是引入额外终端复用层。
|
|
293
|
+
## 10. Handoff Files
|
|
1298
294
|
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
推荐文件:
|
|
295
|
+
Each task creates:
|
|
1302
296
|
|
|
1303
297
|
```text
|
|
1304
|
-
.ai/handoffs/<task
|
|
298
|
+
.ai/handoffs/<task>/
|
|
1305
299
|
role-commands/
|
|
1306
300
|
architect.md
|
|
1307
301
|
coder.md
|
|
@@ -1315,283 +309,194 @@ TerminalRuntime implementation = node-pty
|
|
|
1315
309
|
implementation-log.md
|
|
1316
310
|
validation-log.md
|
|
1317
311
|
review-report.md
|
|
312
|
+
docs-sync-report.md
|
|
313
|
+
messages/
|
|
314
|
+
<message-id>.md
|
|
1318
315
|
```
|
|
1319
316
|
|
|
1320
|
-
|
|
317
|
+
The product treats handoff files as durable facts. The terminal is useful for live interaction, but handoff files and message history are what survive task handoffs cleanly.
|
|
1321
318
|
|
|
1322
|
-
|
|
319
|
+
The main UI no longer has a dedicated artifact panel. Artifact APIs still exist for status checks, role command compatibility, and future UI work.
|
|
1323
320
|
|
|
1324
|
-
|
|
1325
|
-
Project Manager session
|
|
1326
|
-
-> writes role command artifact
|
|
1327
|
-
-> GUI shows command artifact to user
|
|
1328
|
-
-> user approves or sends from GUI
|
|
1329
|
-
-> VibeCodingMaster backend writes short instruction to target role session
|
|
1330
|
-
-> target role session executes
|
|
1331
|
-
-> backend records raw log
|
|
1332
|
-
-> handoff artifact becomes stable result
|
|
1333
|
-
```
|
|
1334
|
-
|
|
1335
|
-
也就是说:
|
|
1336
|
-
|
|
1337
|
-
- PM 负责“决定发什么命令”。
|
|
1338
|
-
- GUI 负责让用户看见、确认和发送。
|
|
1339
|
-
- Backend 负责把命令送进正确 role session。
|
|
1340
|
-
- Role agent 负责执行命令并输出结果。
|
|
1341
|
-
- Handoff artifacts 负责跨 session 传递稳定结果。
|
|
321
|
+
## 11. Message Bus
|
|
1342
322
|
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
第一版应该是本地 GUI:
|
|
323
|
+
VCM messaging is API-driven.
|
|
1346
324
|
|
|
1347
325
|
```text
|
|
1348
|
-
|
|
1349
|
-
->
|
|
1350
|
-
->
|
|
1351
|
-
->
|
|
1352
|
-
->
|
|
1353
|
-
->
|
|
1354
|
-
-> Send architect command
|
|
1355
|
-
-> View architecture-plan.md
|
|
1356
|
-
-> Start coder session
|
|
1357
|
-
-> Send coder command
|
|
1358
|
-
-> View implementation-log.md and validation-log.md
|
|
1359
|
-
-> Start reviewer session
|
|
1360
|
-
-> Send reviewer command
|
|
1361
|
-
-> View review-report.md
|
|
1362
|
-
-> Final acceptance
|
|
326
|
+
role terminal
|
|
327
|
+
-> vcmctl
|
|
328
|
+
-> VCM backend API
|
|
329
|
+
-> policy validation
|
|
330
|
+
-> durable message snapshots
|
|
331
|
+
-> target terminal write when allowed
|
|
1363
332
|
```
|
|
1364
333
|
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
- 启动 dev server。
|
|
1368
|
-
- 调试 backend。
|
|
1369
|
-
- 导出状态。
|
|
1370
|
-
- 执行自动化 smoke test。
|
|
1371
|
-
|
|
1372
|
-
但用户主流程必须在 GUI 中完成。
|
|
1373
|
-
|
|
1374
|
-
## 14. 成功指标
|
|
1375
|
-
|
|
1376
|
-
### 14.1 V1 稳定性指标
|
|
1377
|
-
|
|
1378
|
-
- GUI 启动成功率。
|
|
1379
|
-
- repo 连接成功率。
|
|
1380
|
-
- role session 创建成功率。
|
|
1381
|
-
- Claude Code role session 启动成功率。
|
|
1382
|
-
- embedded terminal 输入输出成功率。
|
|
1383
|
-
- WebSocket 断线重连成功率。
|
|
1384
|
-
- role command 从 GUI 发送成功率。
|
|
1385
|
-
- session output 保存为 raw log 的成功率。
|
|
1386
|
-
- stop / restart / recover 成功率。
|
|
1387
|
-
|
|
1388
|
-
### 14.2 流程指标
|
|
1389
|
-
|
|
1390
|
-
- 每个任务都有 GUI workspace 的比例。
|
|
1391
|
-
- 每个 role session 都有 raw log 的比例。
|
|
1392
|
-
- 每个 role command 都有 artifact 的比例。
|
|
1393
|
-
- 用户能在 GUI 中查看 handoff artifacts 的比例。
|
|
1394
|
-
- PM 能读取 architect / coder / reviewer 输出并生成状态摘要的比例。
|
|
1395
|
-
- 用户在 role session 中手动介入后,VibeCodingMaster 能恢复 session 状态的比例。
|
|
1396
|
-
|
|
1397
|
-
### 14.3 用户体验指标
|
|
1398
|
-
|
|
1399
|
-
- 用户手写 prompt 长度下降。
|
|
1400
|
-
- 用户可以清楚看到每个 role session 当前状态。
|
|
1401
|
-
- 用户可以在 GUI 中切换到任意 Claude Code role session。
|
|
1402
|
-
- 用户可以直接在 GUI 中输入、确认权限和继续对话。
|
|
1403
|
-
- 用户觉得多 Claude Code session 的切换和管理成本下降。
|
|
1404
|
-
- 用户愿意用 VibeCodingMaster 启动下一次多角色任务。
|
|
1405
|
-
|
|
1406
|
-
## 15. 里程碑
|
|
1407
|
-
|
|
1408
|
-
### Phase 1:Local GUI Shell
|
|
1409
|
-
|
|
1410
|
-
- 创建本地 Web GUI 或 Desktop shell。
|
|
1411
|
-
- 支持选择本地 repo。
|
|
1412
|
-
- 显示 Project Dashboard。
|
|
1413
|
-
- 显示 Task Workspace。
|
|
1414
|
-
- 创建 `.vcm` 和 `.ai/handoffs/` 基础目录。
|
|
1415
|
-
|
|
1416
|
-
### Phase 2:Embedded Claude Code Sessions
|
|
1417
|
-
|
|
1418
|
-
- 使用 `node-pty` 启动 `claude --agent <role>`。
|
|
1419
|
-
- 使用 xterm.js 嵌入 terminal。
|
|
1420
|
-
- 支持 terminal input / output / resize。
|
|
1421
|
-
- 支持 `project-manager / architect / coder / reviewer` tabs。
|
|
1422
|
-
- 支持 stop / restart / crashed 状态。
|
|
1423
|
-
|
|
1424
|
-
### Phase 3:Task Artifacts Panel
|
|
334
|
+
Allowed message routes:
|
|
1425
335
|
|
|
1426
|
-
-
|
|
1427
|
-
-
|
|
1428
|
-
-
|
|
1429
|
-
- 检查 handoff artifact 是否存在。
|
|
1430
|
-
- 检查 handoff artifact schema completeness。
|
|
1431
|
-
- 支持从 artifact 跳转到对应 role session。
|
|
336
|
+
- `project-manager` to `architect` / `coder` / `reviewer`: `task`, `question`, `review-request`, `revise`, `cancel`
|
|
337
|
+
- `architect` / `coder` / `reviewer` to `project-manager`: `result`, `question`, `blocked`, `finding`
|
|
338
|
+
- `user` to `project-manager`: `user-request`
|
|
1432
339
|
|
|
1433
|
-
|
|
340
|
+
Manual mode:
|
|
1434
341
|
|
|
1435
|
-
-
|
|
1436
|
-
-
|
|
1437
|
-
-
|
|
1438
|
-
-
|
|
1439
|
-
-
|
|
1440
|
-
- GUI 展示 command 并允许用户发送到 reviewer session。
|
|
1441
|
-
- Backend 保存 raw logs 和 dispatch event。
|
|
342
|
+
- message status becomes `pending_approval` when the target role is running
|
|
343
|
+
- user opens `Messages`
|
|
344
|
+
- user clicks `Stage`
|
|
345
|
+
- VCM writes a short prompt into the target terminal
|
|
346
|
+
- VCM does not submit Enter
|
|
1442
347
|
|
|
1443
|
-
|
|
348
|
+
Auto mode:
|
|
1444
349
|
|
|
1445
|
-
-
|
|
1446
|
-
-
|
|
1447
|
-
-
|
|
1448
|
-
- Cross-Model Code Review。
|
|
1449
|
-
- validation runner。
|
|
1450
|
-
- GitHub PR integration。
|
|
1451
|
-
- session persistence hardening。
|
|
1452
|
-
- Desktop packaging。
|
|
350
|
+
- if target role is running, VCM writes a `[VCM MESSAGE]` envelope and submits it
|
|
351
|
+
- PM remains the routing hub
|
|
352
|
+
- non-PM roles reply to PM
|
|
1453
353
|
|
|
1454
|
-
|
|
354
|
+
The backend still has a `paused` state field and pause/resume API routes for compatibility. The current GUI exposes only manual/auto.
|
|
1455
355
|
|
|
1456
|
-
|
|
356
|
+
## 12. Translation
|
|
1457
357
|
|
|
1458
|
-
|
|
358
|
+
Translation is a local assistant layer beside the role terminal.
|
|
1459
359
|
|
|
1460
|
-
|
|
360
|
+
### Provider Settings
|
|
1461
361
|
|
|
1462
|
-
|
|
1463
|
-
- 使用 node-pty 承载真实 pty。
|
|
1464
|
-
- 保留 raw terminal stream。
|
|
1465
|
-
- 支持用户直接在当前 session 面板中输入。
|
|
1466
|
-
- 对 waiting / crashed / exited 状态做显式提示。
|
|
362
|
+
Settings are saved in:
|
|
1467
363
|
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
应对:
|
|
364
|
+
```text
|
|
365
|
+
~/.vcm/settings.json
|
|
366
|
+
```
|
|
1473
367
|
|
|
1474
|
-
|
|
1475
|
-
- 原始输出全部保存到 logs。
|
|
1476
|
-
- 关键结论以 handoff artifacts 为准。
|
|
1477
|
-
- 页面刷新后从 backend 重新订阅 session。
|
|
1478
|
-
- 后续增强本地 backend lifecycle、session metadata 和恢复体验。
|
|
368
|
+
The settings file stores:
|
|
1479
369
|
|
|
1480
|
-
|
|
370
|
+
- translation provider settings
|
|
371
|
+
- translation API key
|
|
372
|
+
- recent repository paths
|
|
1481
373
|
|
|
1482
|
-
|
|
374
|
+
The API key input is a normal text input. The file is local to the user's machine/runtime.
|
|
1483
375
|
|
|
1484
|
-
|
|
376
|
+
Provider type:
|
|
1485
377
|
|
|
1486
|
-
-
|
|
1487
|
-
- T0/T1 只启动 project-manager 和 coder。
|
|
1488
|
-
- 未使用 role session 保持 not started。
|
|
1489
|
-
- UI 显示运行中 session 和资源提示。
|
|
378
|
+
- OpenAI-compatible chat completions
|
|
1490
379
|
|
|
1491
|
-
|
|
380
|
+
Prompt slots:
|
|
1492
381
|
|
|
1493
|
-
|
|
382
|
+
- `zh-to-en`
|
|
383
|
+
- `zh-to-en-with-context`
|
|
384
|
+
- `en-to-zh`
|
|
1494
385
|
|
|
1495
|
-
|
|
386
|
+
The settings modal shows the default prompt for each slot and allows a user override. Empty override means use the default prompt.
|
|
1496
387
|
|
|
1497
|
-
|
|
1498
|
-
- PM 只产出 role command artifact。
|
|
1499
|
-
- GUI 显示 role command,用户可确认后发送。
|
|
1500
|
-
- Backend 负责发送短指令和记录 dispatch。
|
|
1501
|
-
- 对高风险命令要求用户确认。
|
|
388
|
+
### Claude Output Translation
|
|
1502
389
|
|
|
1503
|
-
|
|
390
|
+
Output translation does not read raw PTY text.
|
|
1504
391
|
|
|
1505
|
-
|
|
392
|
+
VCM tails Claude Code transcript JSONL files under:
|
|
1506
393
|
|
|
1507
|
-
|
|
394
|
+
```text
|
|
395
|
+
~/.claude/projects/<project-hash>/<claude-session-id>.jsonl
|
|
396
|
+
```
|
|
1508
397
|
|
|
1509
|
-
|
|
1510
|
-
- T0/T1 可以只启动 `project-manager` 和 `coder`。
|
|
1511
|
-
- T2 以上才推荐完整 role route。
|
|
1512
|
-
- UI 中默认折叠高级 contract 字段,但内部仍保留检查。
|
|
398
|
+
The transcript path is persisted in the role session record. If that path is missing, VCM falls back to resolving by current working directory and then scanning `~/.claude/projects` for the newest file with the session id.
|
|
1513
399
|
|
|
1514
|
-
|
|
400
|
+
Transcript event handling:
|
|
1515
401
|
|
|
1516
|
-
|
|
402
|
+
- assistant text -> `prose` -> translated
|
|
403
|
+
- AskUserQuestion tool -> formatted `prose` -> translated
|
|
404
|
+
- TodoWrite tool -> formatted `prose` -> translated
|
|
405
|
+
- Agent/Task tool -> formatted `prose` -> translated
|
|
406
|
+
- normal tool_use -> `tool-output` -> preserved
|
|
407
|
+
- tool_result -> `tool-output` -> preserved
|
|
1517
408
|
|
|
1518
|
-
|
|
409
|
+
Display behavior:
|
|
1519
410
|
|
|
1520
|
-
-
|
|
1521
|
-
-
|
|
1522
|
-
-
|
|
1523
|
-
-
|
|
411
|
+
- `prose` starts by showing the English source.
|
|
412
|
+
- while translating, panel status shows `translating <elapsed>`.
|
|
413
|
+
- when translation succeeds, the English source is replaced by Chinese translated text.
|
|
414
|
+
- when translation fails, panel status shows `error` and the entry keeps the visible source plus an error.
|
|
415
|
+
- `tool-output` is dim, one-line, truncated by CSS, and not translated.
|
|
1524
416
|
|
|
1525
|
-
|
|
417
|
+
There is no keyword classifier that drops assistant text. A previous design skipped permission-looking or log-looking text; that is removed.
|
|
1526
418
|
|
|
1527
|
-
|
|
419
|
+
### User Input Translation
|
|
1528
420
|
|
|
1529
|
-
|
|
421
|
+
The composer has one textarea and one `Send English` button.
|
|
1530
422
|
|
|
1531
|
-
|
|
1532
|
-
- reviewer 检查 handoff compliance。
|
|
1533
|
-
- final acceptance 把 handoff artifact 作为硬条件。
|
|
1534
|
-
- UI 中直接显示 missing / incomplete / ok。
|
|
423
|
+
Keyboard behavior:
|
|
1535
424
|
|
|
1536
|
-
|
|
425
|
+
- `Enter`: translate current Chinese text, or send the current English draft.
|
|
426
|
+
- `Shift+Enter`: insert newline.
|
|
1537
427
|
|
|
1538
|
-
|
|
428
|
+
After translation succeeds, the English draft replaces the original Chinese text in the same textarea.
|
|
1539
429
|
|
|
1540
|
-
|
|
430
|
+
`Send English` writes the current English text to the active role terminal and submits Enter.
|
|
1541
431
|
|
|
1542
|
-
- `
|
|
1543
|
-
- Replan 时强制同步文档。
|
|
1544
|
-
- PR template 加 docs sync checklist。
|
|
1545
|
-
- 月度 harness review 删除无用文档。
|
|
432
|
+
Translation panel `Auto-send` is separate from task `Auto orchestration`:
|
|
1546
433
|
|
|
1547
|
-
|
|
434
|
+
- `Auto-send` on: translate and send if there is no translation warning.
|
|
435
|
+
- `Auto-send` off: translate to English draft and wait for user send.
|
|
1548
436
|
|
|
1549
|
-
|
|
437
|
+
## 13. Local State
|
|
1550
438
|
|
|
1551
|
-
|
|
439
|
+
App-level settings:
|
|
1552
440
|
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
441
|
+
```text
|
|
442
|
+
~/.vcm/settings.json
|
|
443
|
+
```
|
|
1556
444
|
|
|
1557
|
-
|
|
445
|
+
Repository-level VCM state:
|
|
1558
446
|
|
|
1559
|
-
|
|
447
|
+
```text
|
|
448
|
+
.vcm/config.json
|
|
449
|
+
.vcm/tasks/<task>.json
|
|
450
|
+
.vcm/sessions/<task>.json
|
|
451
|
+
.vcm/messages/<task>.jsonl
|
|
452
|
+
.vcm/orchestration/<task>.json
|
|
453
|
+
```
|
|
1560
454
|
|
|
1561
|
-
|
|
455
|
+
Repo handoff artifacts:
|
|
1562
456
|
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
- 先把 embedded Claude Code sessions 和 handoff artifact visibility 做扎实。
|
|
457
|
+
```text
|
|
458
|
+
.ai/handoffs/<task>/
|
|
459
|
+
```
|
|
1567
460
|
|
|
1568
|
-
|
|
461
|
+
External Claude transcripts:
|
|
1569
462
|
|
|
1570
|
-
|
|
463
|
+
```text
|
|
464
|
+
~/.claude/projects/<project-hash>/<claude-session-id>.jsonl
|
|
465
|
+
```
|
|
1571
466
|
|
|
1572
|
-
|
|
467
|
+
## 14. Packaging Expectations
|
|
1573
468
|
|
|
1574
|
-
|
|
1575
|
-
- 显示当前 repo path 和 branch。
|
|
1576
|
-
- 高风险任务保留 human approval。
|
|
1577
|
-
- 后续接入 Claude Code permissions/hooks。
|
|
1578
|
-
- 不隐藏 Claude Code 的权限确认。
|
|
469
|
+
Published npm packages must include built output:
|
|
1579
470
|
|
|
1580
|
-
|
|
471
|
+
- `dist/main.js`
|
|
472
|
+
- `dist/cli/vcmctl.js`
|
|
473
|
+
- backend route/service/template output in `dist/`
|
|
474
|
+
- frontend static assets in `dist-frontend/`
|
|
475
|
+
- `README.md`
|
|
476
|
+
- `docs/`
|
|
477
|
+
- `scripts/`
|
|
1581
478
|
|
|
1582
|
-
|
|
479
|
+
`prepack` runs:
|
|
1583
480
|
|
|
1584
|
-
|
|
481
|
+
```text
|
|
482
|
+
npm run build && npm run verify:package
|
|
483
|
+
```
|
|
1585
484
|
|
|
1586
|
-
|
|
485
|
+
This protects against publishing raw TypeScript bin files or missing frontend assets.
|
|
1587
486
|
|
|
1588
|
-
|
|
487
|
+
## 15. Success Criteria
|
|
1589
488
|
|
|
1590
|
-
|
|
1591
|
-
Claude Code = coding engine
|
|
1592
|
-
VibeCodingMaster = GUI session cockpit + project manager + harness manager + quality gatekeeper
|
|
1593
|
-
```
|
|
489
|
+
VCM V1 is successful when:
|
|
1594
490
|
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
491
|
+
- A user can connect a repo without global Git safe-directory setup.
|
|
492
|
+
- A user can create a task and start all four role sessions.
|
|
493
|
+
- Switching roles never loses the embedded terminal.
|
|
494
|
+
- Restart creates a fresh Claude session; Resume reconnects to the persisted one.
|
|
495
|
+
- Permission modes are reflected in the Claude command.
|
|
496
|
+
- PM can route messages through `vcmctl`.
|
|
497
|
+
- Manual orchestration lets the user inspect and stage messages without auto-submitting Enter.
|
|
498
|
+
- Auto orchestration can deliver PM-approved work to running target roles.
|
|
499
|
+
- Translation settings save to `~/.vcm/settings.json`.
|
|
500
|
+
- Translation reads Claude transcript JSONL reliably after start, resume, and restart.
|
|
501
|
+
- Terminal and translation panel have equal, stable reading space.
|
|
502
|
+
- Harness install/update preserves user content outside VCM managed blocks.
|