vibe-coding-master 0.0.16 → 0.2.0

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.
Files changed (47) hide show
  1. package/README.md +74 -41
  2. package/dist/backend/api/artifact-routes.js +5 -5
  3. package/dist/backend/api/harness-routes.js +8 -0
  4. package/dist/backend/api/message-routes.js +4 -4
  5. package/dist/backend/api/round-routes.js +4 -2
  6. package/dist/backend/server.js +8 -2
  7. package/dist/backend/services/artifact-service.js +12 -12
  8. package/dist/backend/services/claude-hook-service.js +1 -1
  9. package/dist/backend/services/harness-service.js +579 -5
  10. package/dist/backend/services/message-service.js +71 -137
  11. package/dist/backend/services/project-service.js +4 -1
  12. package/dist/backend/services/round-service.js +14 -52
  13. package/dist/backend/services/session-service.js +1 -3
  14. package/dist/backend/services/task-service.js +16 -17
  15. package/dist/backend/templates/handoff.js +64 -26
  16. package/dist/backend/templates/harness/architect-agent.js +42 -12
  17. package/dist/backend/templates/harness/claude-root.js +42 -18
  18. package/dist/backend/templates/harness/coder-agent.js +15 -11
  19. package/dist/backend/templates/harness/known-issues-doc.js +22 -0
  20. package/dist/backend/templates/harness/project-manager-agent.js +66 -15
  21. package/dist/backend/templates/harness/pull-request-template.js +29 -0
  22. package/dist/backend/templates/harness/reviewer-agent.js +40 -12
  23. package/dist/backend/templates/harness/vcm-final-acceptance-skill.js +105 -0
  24. package/dist/backend/templates/harness/vcm-harness-bootstrap-skill.js +78 -0
  25. package/dist/backend/templates/harness/vcm-long-running-validation-skill.js +50 -0
  26. package/dist/backend/templates/harness/vcm-route-message-skill.js +86 -0
  27. package/dist/backend/templates/message-envelope.js +1 -0
  28. package/dist/backend/templates/role-command.js +7 -1
  29. package/dist/shared/validation/artifact-check.js +14 -9
  30. package/dist-frontend/assets/index-CrY5Ryps.js +90 -0
  31. package/dist-frontend/assets/index-CvvtrrCN.css +32 -0
  32. package/dist-frontend/index.html +2 -2
  33. package/docs/cc-best-practices.md +434 -192
  34. package/docs/full-harness-baseline.md +254 -0
  35. package/docs/product-design.md +31 -28
  36. package/docs/v0.2-implementation-plan.md +379 -0
  37. package/docs/vcm-cc-best-practices.md +449 -0
  38. package/package.json +3 -1
  39. package/scripts/harness-tools/generate-module-index +298 -0
  40. package/scripts/harness-tools/generate-public-surface +692 -0
  41. package/scripts/install-vcm-harness.mjs +1607 -0
  42. package/scripts/uninstall-vcm-harness.mjs +490 -0
  43. package/scripts/verify-package.mjs +4 -0
  44. package/dist-frontend/assets/index-CvtyKEfS.js +0 -89
  45. package/dist-frontend/assets/index-jEkUTnIY.css +0 -32
  46. package/docs/v1-architecture-design.md +0 -1009
  47. package/docs/v1-implementation-plan.md +0 -1376
@@ -0,0 +1,254 @@
1
+ # Full Harness Baseline
2
+
3
+ Last updated: 2026-06-08
4
+
5
+ Status: Temporary working document.
6
+
7
+ This file tracks the current VCM 0.2 harness baseline as represented by
8
+ `example/rust-layered`. It is not a broad inventory of the old
9
+ `cc-best-practices.md` baseline.
10
+
11
+ When the example stabilizes, migrate the durable decisions into
12
+ `docs/vcm-cc-best-practices.md` and delete this file.
13
+
14
+ ## Current Principle
15
+
16
+ VCM separates three kinds of files:
17
+
18
+ - Harness-managed files: VCM owns, upgrades, repairs, and can uninstall these
19
+ through `.ai/vcm-harness-manifest.json`.
20
+ - Project-owned durable docs: VCM bootstrap may create or initialize these, but
21
+ they become project truth and are not VCM-owned harness.
22
+ - Runtime state: VCM writes these during task execution and deletes them during
23
+ task cleanup. Runtime files are not manifest entries.
24
+
25
+ The manifest is a harness ownership and lifecycle record. It should include
26
+ VCM-managed rules, agents, skills, settings merges, harness tools, generated
27
+ context artifacts, PR template managed blocks, marker metadata, JSON ownership,
28
+ lifecycle labels, runtime roots, and uninstall actions.
29
+
30
+ The manifest should not list project-owned durable docs such as
31
+ `docs/ARCHITECTURE.md`, `docs/TESTING.md`, `docs/known-issues.md`,
32
+ `docs/plans/`, or module-level `ARCHITECTURE.md` files as managed entries. It
33
+ should not list `.ai/vcm/**` runtime files as managed entries either.
34
+
35
+ ## Install And Bootstrap Flow
36
+
37
+ VCM 0.2 uses a two-stage harness setup:
38
+
39
+ 1. Fixed install: VCM runs the deterministic fixed installer. This creates or
40
+ updates VCM-owned managed blocks, whole-file skills, role agents, settings
41
+ hooks, harness tools, generated-context directories, the PR template, and
42
+ `.ai/vcm-harness-manifest.json`.
43
+ 2. AI bootstrap: VCM starts a temporary Claude Code terminal in the repository
44
+ root and instructs it to use `vcm-harness-bootstrap`. This fills
45
+ project-owned content and generated artifacts.
46
+
47
+ The fixed install does not copy example project content. It may create blank
48
+ durable doc templates when missing, but project-specific facts are added only by
49
+ bootstrap or by later role work.
50
+
51
+ Bootstrap should produce or refresh:
52
+
53
+ ```text
54
+ CLAUDE.md project context outside the VCM managed block
55
+ docs/ARCHITECTURE.md
56
+ <module>/ARCHITECTURE.md
57
+ docs/TESTING.md
58
+ .ai/generated/module-index.json
59
+ .ai/generated/public-surface.json
60
+ ```
61
+
62
+ Bootstrap runtime metadata is temporary:
63
+
64
+ ```text
65
+ .ai/vcm/bootstrap/session.json
66
+ .ai/vcm/bootstrap/bootstrap.log
67
+ ```
68
+
69
+ These files are runtime state, not manifest entries. They can be deleted after
70
+ the generated artifacts and durable docs are complete.
71
+
72
+ ## Current Manifest Entries
73
+
74
+ These entries match the current `example/rust-layered/.ai/vcm-harness-manifest.json`.
75
+
76
+ | Area | Path | Ownership | Lifecycle | Notes |
77
+ | --- | --- | --- | --- | --- |
78
+ | Manifest | `.ai/vcm-harness-manifest.json` | whole-file | Long-term | VCM harness ownership record. |
79
+ | Root rules | `CLAUDE.md` | managed-block | Long-term | VCM HTML marker block only; project context outside the block is project-owned. |
80
+ | Ignore rules | `.gitignore` | managed-block | Long-term | VCM hash-comment marker block. The example comments `.ai/vcm/` so readers can inspect runtime artifacts. |
81
+ | Claude settings | `.claude/settings.json` | json-merge | Long-term | VCM owns hook entries matching VCM command markers. |
82
+ | Agent directory | `.claude/agents/` | VCM-created directory | Long-term | Contains the four core VCM role agents. |
83
+ | Core agent | `.claude/agents/project-manager.md` | managed-block | Long-term | Project-manager role rules. |
84
+ | Core agent | `.claude/agents/architect.md` | managed-block | Long-term | Architect role rules. |
85
+ | Core agent | `.claude/agents/coder.md` | managed-block | Long-term | Coder role rules. |
86
+ | Core agent | `.claude/agents/reviewer.md` | managed-block | Long-term | Reviewer role rules. |
87
+ | Skill directory | `.claude/skills/` | VCM-created directory | Conditional long-term | Keep while repo-local VCM skills are installed. |
88
+ | Skill | `.claude/skills/vcm-route-message.md` | whole-file | Conditional long-term | Route-file authoring protocol. |
89
+ | Skill | `.claude/skills/vcm-final-acceptance.md` | whole-file | Conditional long-term | PM final evidence audit. |
90
+ | Skill | `.claude/skills/vcm-long-running-validation.md` | whole-file | Conditional long-term | Role-independent long-running command protocol. |
91
+ | Skill | `.claude/skills/vcm-harness-bootstrap.md` | whole-file | Conditional long-term | AI-assisted project understanding procedure. |
92
+ | Harness tool directory | `.ai/tools/` | VCM-created directory | Long-term | Repo-local harness tools. |
93
+ | Generated-context tool | `.ai/tools/generate-module-index` | whole-file | Long-term | Generates `.ai/generated/module-index.json`. |
94
+ | Generated-context tool | `.ai/tools/generate-public-surface` | whole-file | Long-term | Generates `.ai/generated/public-surface.json`. |
95
+ | Runtime tool | `.ai/tools/run-long-check` | whole-file | Conditional long-term | Starts file-backed long-running command jobs. |
96
+ | Runtime tool | `.ai/tools/watch-job` | whole-file | Conditional long-term | Bounded watcher for long-running command jobs. |
97
+ | Generated context directory | `.ai/generated/` | VCM-created directory | Long-term | Derived context artifacts. |
98
+ | Generated context | `.ai/generated/module-index.json` | derived artifact | Derived | Regenerated by `generate-module-index`; do not hand-edit as source truth. |
99
+ | Generated context | `.ai/generated/public-surface.json` | derived artifact | Derived | Regenerated by `generate-public-surface`; do not hand-edit as source truth. |
100
+ | PR template | `.github/pull_request_template.md` | managed-block | Long-term | VCM PR checklist block. |
101
+
102
+ Runtime roots recorded by the manifest:
103
+
104
+ ```text
105
+ .ai/vcm/
106
+ .claude/worktrees/
107
+ ```
108
+
109
+ These roots are cleanup targets, not managed entries.
110
+
111
+ ## Project-Owned Bootstrap Outputs
112
+
113
+ The current example includes project-owned durable docs created or initialized
114
+ during harness bootstrap. They are important for the workflow, but they are not
115
+ VCM-owned harness and should not appear as manifest entries.
116
+
117
+ | Area | Path | Owner | Lifecycle | Notes |
118
+ | --- | --- | --- | --- | --- |
119
+ | Project context | `CLAUDE.md` content outside VCM block | Project | Long-term | Rust-layered project facts and constraints. |
120
+ | Project architecture | `docs/ARCHITECTURE.md` | Architect | Long-term | Project-level module overview, responsibilities, relationships, dependency direction, and links to module docs. |
121
+ | Module architecture | `<module>/ARCHITECTURE.md` | Architect | Long-term | Module-level boundaries, behavior, important public surface explanations, and risks. |
122
+ | Testing docs | `docs/TESTING.md` | Reviewer | Long-term | Validation levels, Rust commands, generated-context freshness checks, and testing gaps. |
123
+ | Known issues | `docs/known-issues.md` | Architect | Rolling durable doc | Confirmed unresolved issues and accepted limitations. Remove fixed, rejected, or obsolete entries. |
124
+ | Durable plans | `docs/plans/` | Project | Conditional long-term | Durable plans only when a large task needs them. Completed routine plans should be deleted after durable facts are promoted. |
125
+
126
+ Current `example/rust-layered` does not use these old separate docs:
127
+
128
+ ```text
129
+ docs/MODULE_MAP.md
130
+ docs/SECURITY.md
131
+ docs/DEPENDENCY_RULES.md
132
+ docs/AI_WORKFLOW.md
133
+ ```
134
+
135
+ ## Runtime State
136
+
137
+ Runtime state is created while VCM manages a task. It is task-local and should be
138
+ deleted during task cleanup after useful facts are promoted to code, tests,
139
+ durable docs, PR text, or commit history.
140
+
141
+ | Area | Path | Lifecycle | Notes |
142
+ | --- | --- | --- | --- |
143
+ | Worktrees | `.claude/worktrees/<task-slug>/` | Runtime cleanup | One task worktree shared by all roles. |
144
+ | Handoff root | `.ai/vcm/handoffs/` | Runtime cleanup | Role artifacts and route files for the active task. |
145
+ | Route messages | `.ai/vcm/handoffs/messages/<from-role>-<to-role>.md` | Runtime cleanup | Pending route files written by `vcm-route-message`. |
146
+ | Handoff logs | `.ai/vcm/handoffs/logs/` | Runtime cleanup | Debug/recovery logs, not durable project truth. |
147
+ | Architecture plan | `.ai/vcm/handoffs/architecture-plan.md` | Task-temporary | Architect handoff for one executable task. |
148
+ | Review report | `.ai/vcm/handoffs/review-report.md` | Task-temporary | Reviewer handoff for one executable task. |
149
+ | Docs sync report | `.ai/vcm/handoffs/docs-sync-report.md` | Task-temporary | Architect docs-sync handoff for one executable task. |
150
+ | Final acceptance | `.ai/vcm/handoffs/final-acceptance.md` | Task-temporary | PM final evidence-audit handoff for one executable task. |
151
+ | Task known issues | `.ai/vcm/handoffs/known-issues.md` | Task-temporary | Promote unresolved durable findings to `docs/known-issues.md`, then delete. |
152
+ | Long-running jobs | `.ai/vcm/jobs/<job-id>/` | Runtime cleanup | Status and logs from `run-long-check` / `watch-job`. |
153
+ | Bootstrap session | `.ai/vcm/bootstrap/session.json` | Runtime cleanup | Last harness-bootstrap terminal metadata. |
154
+ | Bootstrap log | `.ai/vcm/bootstrap/bootstrap.log` | Runtime cleanup | Terminal log for the harness-bootstrap session. |
155
+ | App-local task records | `~/.vcm/projects/<project-id>/tasks/<task-slug>.json` | Runtime cleanup | VCM UI/lifecycle subtask records outside the connected repo. |
156
+
157
+ Runtime state under `.ai/vcm/**` is excluded from manifest entries. The manifest
158
+ records `.ai/vcm/` only as a runtime root.
159
+
160
+ ## Current Skills
161
+
162
+ The current example installs these skills:
163
+
164
+ - `vcm-route-message`: route-file write protocol.
165
+ - `vcm-final-acceptance`: final PM evidence audit.
166
+ - `vcm-long-running-validation`: role-independent long-running command protocol.
167
+ - `vcm-harness-bootstrap`: one-time or occasional project-understanding, generated-context refresh, and durable-doc bootstrap procedure.
168
+
169
+ The current example does not install a separate `vcm-docs-sync` skill. Docs sync
170
+ is expressed in the architect role rules and writes
171
+ `.ai/vcm/handoffs/docs-sync-report.md`.
172
+
173
+ ## Current Tools
174
+
175
+ The current example keeps only four `.ai/tools/` files:
176
+
177
+ ```text
178
+ .ai/tools/generate-module-index
179
+ .ai/tools/generate-public-surface
180
+ .ai/tools/run-long-check
181
+ .ai/tools/watch-job
182
+ ```
183
+
184
+ The generated-context tools currently support Rust projects only. The fixed
185
+ installer may install them as the default Rust baseline, but non-Rust projects
186
+ need project-specific generators before `.ai/generated/*` can be trusted.
187
+
188
+ The current example intentionally does not install these old validation or
189
+ discovery wrappers:
190
+
191
+ ```text
192
+ .ai/tools/check-fast
193
+ .ai/tools/check-changed
194
+ .ai/tools/check-module
195
+ .ai/tools/check-boundaries
196
+ .ai/tools/check-agent-rules
197
+ .ai/tools/check-docs-freshness
198
+ .ai/tools/check-generated-artifacts
199
+ .ai/tools/find-owner
200
+ .ai/tools/find-callers
201
+ .ai/tools/find-tests
202
+ ```
203
+
204
+ Rust unit tests and integration tests are run with native Cargo commands chosen
205
+ by the responsible role. The harness does not need a fixed wrapper for every
206
+ validation level.
207
+
208
+ ## Generated Context
209
+
210
+ The current example has two generated artifacts:
211
+
212
+ ```text
213
+ .ai/generated/module-index.json
214
+ .ai/generated/public-surface.json
215
+ ```
216
+
217
+ Current support is Rust-only:
218
+
219
+ - `generate-module-index` reads Cargo workspace structure, auto-detects a
220
+ direct child `cargoRoot` when the project root has no `Cargo.toml`, and
221
+ filters workspace member paths that do not contain a crate.
222
+ - `generate-public-surface` indexes crate-external Rust `pub fn`,
223
+ `pub struct`, `pub enum`, and `pub trait` items, using `pub use` only to
224
+ resolve re-exported high-value API entries.
225
+
226
+ There is no `test-map.json`. Test files are discoverable through
227
+ `module-index.json` and Rust's normal Cargo test layout.
228
+
229
+ Generated artifacts are derived context, not durable project truth. They must be
230
+ regenerated by their tools after relevant source, manifest, module, or public API
231
+ changes.
232
+
233
+ ## Not Part Of The Current Example
234
+
235
+ The following items are intentionally not part of the current `rust-layered`
236
+ baseline:
237
+
238
+ ```text
239
+ .claude/commands/
240
+ .claude/agents/optional/
241
+ .ai/task-specs/
242
+ .ai/vcm/tasks/
243
+ .ai/vcm/handoffs/role-commands/
244
+ docs/plans/active/
245
+ docs/plans/completed/
246
+ docs/MODULE_MAP.md
247
+ docs/SECURITY.md
248
+ docs/DEPENDENCY_RULES.md
249
+ docs/AI_WORKFLOW.md
250
+ .ai/generated/test-map.json
251
+ ```
252
+
253
+ Do not reintroduce these into the example baseline unless there is a specific,
254
+ current VCM requirement.
@@ -1,6 +1,6 @@
1
1
  # VibeCodingMaster Product Design
2
2
 
3
- Last updated: 2026-05-31
3
+ Last updated: 2026-06-02
4
4
 
5
5
  This document describes the current product direction and implemented V1 behavior for VCM.
6
6
 
@@ -163,7 +163,7 @@ The architect owns:
163
163
  - module boundaries
164
164
  - file responsibilities
165
165
  - public contracts
166
- - test contracts
166
+ - verifiable behavior and behavior/contract proof points
167
167
  - Replan triggers
168
168
  - post-review docs sync and architecture drift checks
169
169
 
@@ -179,12 +179,10 @@ The coder owns:
179
179
  - implementation within the approved plan
180
180
  - direct unit/contract/regression tests
181
181
  - validation evidence
182
- - implementation log
183
182
 
184
183
  Outputs:
185
184
 
186
- - `.ai/vcm/handoffs/implementation-log.md`
187
- - `.ai/vcm/handoffs/validation-log.md`
185
+ - `.ai/vcm/handoffs/known-issues.md`
188
186
 
189
187
  ### Reviewer
190
188
 
@@ -199,6 +197,7 @@ The reviewer owns:
199
197
  Output:
200
198
 
201
199
  - `.ai/vcm/handoffs/review-report.md`
200
+ - `.ai/vcm/handoffs/known-issues.md`
202
201
 
203
202
  ## 6. Information Architecture
204
203
 
@@ -253,7 +252,7 @@ The default theme mode is `System`, which follows the OS/browser color-scheme pr
253
252
  When `Round alert` is on, VCM shows a compact in-app prompt and plays a short, soft, two-note local chime after a full conversation round truly ends.
254
253
  `Try alert` must work even when no conversation has just completed so the user can verify browser sound and notification behavior.
255
254
 
256
- There is no separate `Pause orchestration` or `Resume orchestration` control in the GUI. The current product model is one on/off toggle in the active role toolbar, immediately to the left of `Translate`.
255
+ There is no separate `Pause orchestration` or `Resume orchestration` control in the GUI. The current product model is one on/off toggle in the role console toolbar.
257
256
 
258
257
  `VCM Harness` shows whether VCM managed blocks are installed/up to date in the project rules files and `.gitignore`.
259
258
 
@@ -274,9 +273,13 @@ The worktree/branch path is the recommended VCM task model, but the user may cle
274
273
  The task workspace header is one compact row:
275
274
 
276
275
  ```text
277
- TASK WORKSPACE <task> <branch> <worktree> [Project Manager] [Architect] [Coder] [Reviewer] [Refresh]
276
+ <task> [Project Manager] [Architect] [Coder] [Reviewer] [Translate] [Close Task]
278
277
  ```
279
278
 
279
+ The header does not show `TASK WORKSPACE`, branch, or worktree path. Task branch/worktree details remain task metadata, but they are not first-row chrome.
280
+
281
+ The task workspace does not show a manual `Refresh` button. Task status, role status, messages, orchestration state, and round completion state refresh automatically. The only remaining `Refresh` control is inside the sidebar `VCM Harness` section, where it rechecks managed project files.
282
+
280
283
  Role tabs show the session status for each role.
281
284
 
282
285
  The main task workspace only renders the active role console. Messages and Events are opened from the sidebar.
@@ -292,7 +295,6 @@ Controls:
292
295
  - `Resume`.
293
296
  - `Restart`.
294
297
  - `Stop`.
295
- - `Translate` toggle.
296
298
 
297
299
  Permission modes:
298
300
 
@@ -316,7 +318,7 @@ The split should stay close to 50/50 width. Both panes expand vertically to fill
316
318
 
317
319
  ## 8. Round Completion Detection
318
320
 
319
- VCM detects answer completion from VCM's hook-driven role activity state, not from terminal silence.
321
+ VCM detects answer completion from VCM's hook-driven role activity state, not from terminal silence or message history.
320
322
 
321
323
  Backend role state:
322
324
 
@@ -326,10 +328,10 @@ Backend role state:
326
328
 
327
329
  Task-level round state:
328
330
 
329
- - If VCM role messages exist, the latest active `submitted` message defines the current target role.
330
- - A PM -> Coder -> PM chain completes only when the latest target role, PM, reaches hook `Stop`.
331
- - Queued or pending messages prevent completion because more role work is waiting.
332
- - If no VCM role message is involved, the latest direct role `Stop` can complete the round.
331
+ - The latest role with a real hook `Stop` is the completion source when no role is still running.
332
+ - A PM -> Coder -> PM chain completes only when the final role, PM, reaches hook `Stop`.
333
+ - Pending route files prevent completion because more role work is waiting, but message history does not define completion.
334
+ - If no VCM role message is involved, the latest direct role `Stop` can still complete the round.
333
335
 
334
336
  The frontend polls this task-level round state. It deduplicates `completionId`, then shows the prompt and plays the sound only once per completed round.
335
337
 
@@ -419,8 +421,7 @@ Each task creates:
419
421
  coder.log
420
422
  reviewer.log
421
423
  architecture-plan.md
422
- implementation-log.md
423
- validation-log.md
424
+ known-issues.md
424
425
  review-report.md
425
426
  docs-sync-report.md
426
427
  messages/
@@ -481,32 +482,34 @@ Stop-triggered scan:
481
482
 
482
483
  Manual mode:
483
484
 
484
- - message status becomes `pending_approval` when the target role is running
485
+ - role route files stay non-empty as pending handoffs
485
486
  - user opens `Messages`
486
- - message rows show sequence, timestamp, status, body preview, path, and `Copy`
487
- - `Mark All Done` marks open message records as `acknowledged` after the user manually handled stuck messages
487
+ - message rows show newest delivered history first with stable increasing sequence, timestamp, body preview, path, and `Copy`
488
+ - `Mark All Done` clears pending route files after the user manually handled stuck handoff content
489
+ - `Delete All` removes message history without touching pending route files
488
490
  - user decides whether to copy or manually act on the message
489
491
  - VCM does not write to the target terminal or submit Enter
490
492
  - VCM does not clear the source route file until the user marks it done or VCM later dispatches it in auto mode
491
493
 
492
494
  Auto mode:
493
495
 
494
- - if the target role is idle and has no active `delivering` or `submitted` message, VCM writes a `[VCM MESSAGE]` envelope to that role's embedded terminal and submits Enter
495
- - terminal write success stores a durable message snapshot and marks the delivery `delivering`
496
- - Claude Code `UserPromptSubmit` confirms the accepted prompt, marks the message `submitted`, and clears the source route file if it still contains that same message
496
+ - if the target role is running and hook-idle, VCM writes a `[VCM MESSAGE]` envelope to that role's embedded terminal and submits Enter
497
+ - before writing to the terminal, VCM stores `dispatchingAt` and waits briefly so the GUI can switch to the target role tab first
498
+ - terminal write success stores a durable delivered message snapshot
499
+ - Claude Code `UserPromptSubmit` confirms the accepted prompt, stores `acceptedAt`, and clears the source route file if it still contains that same message
497
500
  - if the target role is not running, is busy, or terminal submission fails, VCM leaves the route file non-empty so it remains pending
498
- - when VCM dispatches a message, the GUI switches to the target role tab so the user can watch execution
501
+ - when VCM records `dispatchingAt`, the GUI switches to the target role tab so the user can watch the terminal receive and execute the message
499
502
  - the target role answers by writing its own route file back to the next role and then ending its turn
500
- - `Mark All Done` is a manual recovery action for stuck orchestration. It marks open message records as `acknowledged` and may clear route files only after the user confirms the pending file contents were manually handled.
503
+ - `Mark All Done` is a manual recovery action for stuck orchestration. It clears route files only after the user confirms the pending file contents were manually handled.
501
504
 
502
505
  VCM Harness injects Claude Code hooks into `.claude/settings.json`:
503
506
 
504
- - `UserPromptSubmit`: posts directly to the VCM backend, marks the role running, and confirms any matching VCM message from `delivering` to `submitted`
507
+ - `UserPromptSubmit`: posts directly to the VCM backend, marks the role running, and confirms any matching VCM message by recording `acceptedAt`
505
508
  - `Stop`: posts directly to the VCM backend, marks the role idle, and triggers pending route-file dispatch
506
509
 
507
510
  VCM uses `UserPromptSubmit` as the Claude Code acceptance signal. A successful PTY write only proves VCM delivered text to the embedded terminal; `UserPromptSubmit` proves Claude Code accepted the prompt.
508
511
 
509
- The injected role rules require asynchronous file messaging: after writing or updating a route file, the role must end the current Claude Code turn and wait for VCM to deliver a later reply. Roles must not poll files, start shell loops, or keep the turn open waiting for another role to answer, and they must not use Claude Code Task/Subagent for VCM role delegation.
512
+ The injected role rules require asynchronous file messaging: after writing or updating a route file, the role must end the current Claude Code turn and wait for VCM to deliver a later reply. Roles should use `.claude/skills/vcm-route-message.md` to author route files. Roles must not poll files, start shell loops, keep the turn open waiting for another role to answer, paste directly into another role terminal, or use Claude Code Task/Subagent for VCM role delegation.
510
513
 
511
514
  There is no `vcmctl` in the target design. Hook entrypoints are direct HTTP from Claude Code hooks to the local VCM backend.
512
515
 
@@ -540,7 +543,7 @@ Prompt slots:
540
543
  - `zh-to-en-with-context`
541
544
  - `en-to-zh`
542
545
 
543
- The settings modal shows all three prompt slots as direct editors. `Reset prompts` restores every prompt to its built-in default. The modal does not include separate enable/output/input-mode switches; opening the role toolbar `Translate` panel is the translation on/off control, and the panel-level `Auto-send` toggle controls whether translated user input is submitted automatically.
546
+ The settings modal shows all three prompt slots as direct editors. `Reset prompts` restores every prompt to its built-in default. The modal does not include separate enable/output/input-mode switches; opening the task header `Translate` panel is the translation on/off control, and the panel-level `Auto-send` toggle controls whether translated user input is submitted automatically.
544
547
 
545
548
  ### Claude Output Translation
546
549
 
@@ -606,7 +609,7 @@ Translation panel `Auto-send` is separate from task `Auto orchestration`:
606
609
  - `Auto-send` on: translate and send if there is no translation warning.
607
610
  - `Auto-send` off: translate to English draft and wait for user send.
608
611
 
609
- Task `Auto orchestration` is an adjacent toolbar button to the left of `Translate` and uses the same compact selected/unselected button styling.
612
+ Task `Auto orchestration` is a compact selected/unselected button in the role console toolbar. `Translate` is a global task header toggle next to `Close Task`; it opens/closes the translation split for all role consoles, so switching roles keeps the same translation setting.
610
613
 
611
614
  ## 14. Local State
612
615
 
@@ -690,7 +693,7 @@ VCM V1 is successful when:
690
693
  - Roles can route messages by writing fixed route files under `.ai/vcm/handoffs/messages/`.
691
694
  - Manual orchestration lets the user inspect pending route-file messages without auto-submitting Enter.
692
695
  - Auto orchestration can deliver pending route-file messages to idle running target roles.
693
- - Auto orchestration switches to the target role tab when VCM submits a route-file message.
696
+ - Auto orchestration switches to the target role tab when VCM records `dispatchingAt`, before VCM submits the route-file message.
694
697
  - Round completion detection waits for the final role in a chained conversation and can alert with prompt plus sound.
695
698
  - Translation settings save to `~/.vcm/settings.json`.
696
699
  - Translation reads Claude transcript JSONL reliably after start, resume, and restart.