vibe-coding-master 0.0.14 → 0.0.16
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 +32 -34
- package/dist/backend/api/claude-hook-routes.js +3 -0
- package/dist/backend/api/message-routes.js +8 -40
- package/dist/backend/server.js +1 -23
- package/dist/backend/services/artifact-service.js +27 -2
- package/dist/backend/services/claude-hook-service.js +108 -49
- package/dist/backend/services/harness-service.js +18 -1
- package/dist/backend/services/message-service.js +307 -210
- package/dist/backend/services/round-service.js +2 -2
- package/dist/backend/services/session-service.js +25 -9
- package/dist/backend/templates/handoff.js +3 -0
- package/dist/backend/templates/harness/architect-agent.js +4 -3
- package/dist/backend/templates/harness/claude-root.js +5 -4
- package/dist/backend/templates/harness/coder-agent.js +4 -3
- package/dist/backend/templates/harness/project-manager-agent.js +5 -5
- package/dist/backend/templates/harness/reviewer-agent.js +4 -3
- package/dist/backend/templates/message-envelope.js +7 -3
- package/dist-frontend/assets/{index-DVhkEVnA.js → index-CvtyKEfS.js} +44 -44
- package/dist-frontend/index.html +1 -1
- package/docs/cc-best-practices.md +10 -9
- package/docs/product-design.md +64 -35
- package/docs/v1-architecture-design.md +31 -29
- package/docs/v1-implementation-plan.md +71 -50
- package/package.json +2 -3
- package/scripts/verify-package.mjs +0 -3
- package/dist/cli/vcmctl.js +0 -171
package/dist-frontend/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>VibeCodingMaster</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-CvtyKEfS.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-jEkUTnIY.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
@@ -214,9 +214,10 @@ Role-specific behavior lives in `.claude/agents/`.
|
|
|
214
214
|
- Do not let one coding session own architecture/plan decisions, implementation, final testing responsibility, and review.
|
|
215
215
|
- Role outputs are exchanged through `.ai/vcm/handoffs/`, not through chat history.
|
|
216
216
|
- Role messaging is turn-based. Keep at most one active message to the same target role.
|
|
217
|
-
-
|
|
218
|
-
-
|
|
219
|
-
-
|
|
217
|
+
- Send role messages by writing or updating the fixed route file under `.ai/vcm/handoffs/messages/<from-role>-<to-role>.md`.
|
|
218
|
+
- For a given target role, update the same route file instead of creating multiple fragmented messages.
|
|
219
|
+
- After writing or updating a role message file, end the current Claude Code turn. Treat the file write as the final coordination action of that turn.
|
|
220
|
+
- Do not poll message files, start shell loops, or keep the turn open waiting for another role's answer. VCM dispatches pending route files after Claude Code `Stop`.
|
|
220
221
|
- Do not use Claude Code Task/Subagent for VCM role delegation; VCM owns the four long-running role sessions.
|
|
221
222
|
- If new information appears while a role is still processing, update the handoff artifact or wait instead of sending fragmented follow-up messages.
|
|
222
223
|
- When the required role route includes `architect`, coding must not start until the architecture and plan artifact exists.
|
|
@@ -565,7 +566,7 @@ Do not include:
|
|
|
565
566
|
|
|
566
567
|
For large projects, the default execution model should be explicit role-based sessions, not dynamic role routing inside one generic Claude conversation.
|
|
567
568
|
|
|
568
|
-
The user-facing task should start with a `project-manager` role session. The project manager owns user communication,
|
|
569
|
+
The user-facing task should start with a `project-manager` role session. The project manager owns user communication, route-file message preparation, severity classification, role routing, progress tracking, and process verification. It does not own architecture, coding, and independent review for the same non-trivial task.
|
|
569
570
|
|
|
570
571
|
Do not make one generic Claude session own architecture, planning, coding, final testing, and review for non-trivial work. That blurs responsibility and makes acceptance weak.
|
|
571
572
|
|
|
@@ -719,7 +720,7 @@ Role responsibilities:
|
|
|
719
720
|
|
|
720
721
|
```text
|
|
721
722
|
project-manager
|
|
722
|
-
owns user communication, task clarification, task specs, role routing, and
|
|
723
|
+
owns user communication, task clarification, task specs, role routing, and route-file message preparation
|
|
723
724
|
turns user input into an engineering task when needed
|
|
724
725
|
summarizes role outputs back to the user
|
|
725
726
|
creates and verifies handoff artifacts
|
|
@@ -1365,9 +1366,9 @@ Do not rely on `CLAUDE.md` for constraints that can be automated.
|
|
|
1365
1366
|
Recommended hooks:
|
|
1366
1367
|
|
|
1367
1368
|
```text
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1369
|
+
Stop:
|
|
1370
|
+
notify VCM that a role turn ended
|
|
1371
|
+
trigger VCM to scan .ai/vcm/handoffs/messages/ for pending route files
|
|
1371
1372
|
|
|
1372
1373
|
PreToolUse:
|
|
1373
1374
|
block protected files
|
|
@@ -2158,7 +2159,7 @@ Monthly review:
|
|
|
2158
2159
|
If you can only enforce 16 rules, enforce these:
|
|
2159
2160
|
|
|
2160
2161
|
1. User-facing tasks start with `claude --agent project-manager`; untagged sessions are not implicit project managers.
|
|
2161
|
-
2. The `project-manager` agent owns user communication, task clarification, and precise
|
|
2162
|
+
2. The `project-manager` agent owns user communication, task clarification, and precise route-file message preparation.
|
|
2162
2163
|
3. Complex tasks use explicit role sessions, handoff artifacts, and plan first; do not edit directly.
|
|
2163
2164
|
4. One task uses one branch, one worktree, one handoff directory, and one PR by default.
|
|
2164
2165
|
5. Role sessions for the same task work in the same task worktree sequentially; parallel write work uses separate task or sub-task worktrees.
|
package/docs/product-design.md
CHANGED
|
@@ -243,14 +243,14 @@ The old `Dirty: yes/no` label is not used. The UI uses `Working tree: clean` or
|
|
|
243
243
|
`Settings` contains:
|
|
244
244
|
|
|
245
245
|
- `Theme` button, cycling through `System`, `Light`, and `Dark`.
|
|
246
|
-
- `Round alert` button, on by default, controlling the completion prompt and
|
|
246
|
+
- `Round alert` button, on by default, controlling the completion prompt and soft two-note completion chime.
|
|
247
247
|
- `Try alert` button, firing the same completion prompt and sound for local verification.
|
|
248
248
|
- `Messages` button, opening a modal list of role messages.
|
|
249
249
|
- `Events` button, opening a modal list of runtime UI events for the current task.
|
|
250
250
|
|
|
251
251
|
The default theme mode is `System`, which follows the OS/browser color-scheme preference. The entire application chrome, sidebar, forms, modals, status badges, and workspace panels must support both light and dark rendering. Embedded terminals keep their terminal-native dark styling.
|
|
252
252
|
|
|
253
|
-
When `Round alert` is on, VCM shows a compact in-app prompt and plays a short local
|
|
253
|
+
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
254
|
`Try alert` must work even when no conversation has just completed so the user can verify browser sound and notification behavior.
|
|
255
255
|
|
|
256
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`.
|
|
@@ -320,13 +320,13 @@ VCM detects answer completion from VCM's hook-driven role activity state, not fr
|
|
|
320
320
|
|
|
321
321
|
Backend role state:
|
|
322
322
|
|
|
323
|
-
-
|
|
323
|
+
- VCM terminal submit: role becomes `running`.
|
|
324
324
|
- `Stop`: role becomes `idle` and records `lastStopAt`.
|
|
325
325
|
- The role tab and Round alert use the same activity state source.
|
|
326
326
|
|
|
327
327
|
Task-level round state:
|
|
328
328
|
|
|
329
|
-
- If VCM role messages exist, the latest active `
|
|
329
|
+
- If VCM role messages exist, the latest active `submitted` message defines the current target role.
|
|
330
330
|
- A PM -> Coder -> PM chain completes only when the latest target role, PM, reaches hook `Stop`.
|
|
331
331
|
- Queued or pending messages prevent completion because more role work is waiting.
|
|
332
332
|
- If no VCM role message is involved, the latest direct role `Stop` can complete the round.
|
|
@@ -424,31 +424,60 @@ Each task creates:
|
|
|
424
424
|
review-report.md
|
|
425
425
|
docs-sync-report.md
|
|
426
426
|
messages/
|
|
427
|
-
|
|
427
|
+
project-manager-architect.md
|
|
428
|
+
project-manager-coder.md
|
|
429
|
+
project-manager-reviewer.md
|
|
430
|
+
architect-project-manager.md
|
|
431
|
+
coder-project-manager.md
|
|
432
|
+
reviewer-project-manager.md
|
|
433
|
+
<optional-peer-route>.md
|
|
428
434
|
```
|
|
429
435
|
|
|
430
436
|
The product treats handoff files as task-local coordination facts. The terminal is useful for live interaction, but handoff files and message history are the source of truth during a task. They live under `.ai/vcm/`, are ignored by Git, and are removed by `Close Task`; final decisions that should survive must be copied into normal project docs, source, commit messages, or PR text.
|
|
431
437
|
|
|
432
|
-
The main UI no longer has a dedicated artifact panel. Artifact APIs still exist for status checks
|
|
438
|
+
The main UI no longer has a dedicated artifact panel. Artifact APIs still exist for status checks and future UI work.
|
|
433
439
|
|
|
434
440
|
## 12. Message Bus
|
|
435
441
|
|
|
436
|
-
VCM messaging is
|
|
442
|
+
VCM messaging is file-driven and dispatched by VCM after Claude Code turn completion. Roles do not call a VCM CLI to send messages.
|
|
437
443
|
|
|
438
444
|
```text
|
|
439
445
|
role terminal
|
|
440
|
-
->
|
|
441
|
-
->
|
|
442
|
-
->
|
|
443
|
-
->
|
|
444
|
-
->
|
|
446
|
+
-> writes/updates one route file under .ai/vcm/handoffs/messages/
|
|
447
|
+
-> ends the Claude Code turn
|
|
448
|
+
-> Claude Code Stop hook calls VCM backend directly
|
|
449
|
+
-> VCM scans pending route files
|
|
450
|
+
-> VCM validates, snapshots, and dispatches one allowed message per idle target role
|
|
445
451
|
```
|
|
446
452
|
|
|
447
|
-
|
|
453
|
+
Route files:
|
|
448
454
|
|
|
449
|
-
-
|
|
450
|
-
-
|
|
451
|
-
- `
|
|
455
|
+
- File name format is `<from-role>-<to-role>.md`.
|
|
456
|
+
- Role names use VCM role slugs, for example `project-manager-coder.md`.
|
|
457
|
+
- The file path determines `from` and `to`; frontmatter cannot override the route.
|
|
458
|
+
- The file body is Markdown.
|
|
459
|
+
- Optional YAML frontmatter may provide `type`, `severity`, `title`, or `related_artifact`.
|
|
460
|
+
- Blank or whitespace-only files mean "no pending message".
|
|
461
|
+
- Non-empty files mean "pending message waiting for VCM dispatch".
|
|
462
|
+
|
|
463
|
+
The important product rule is one file per directed route. If role A decides several times during one turn that it needs to call role B, it must edit the same `A-B.md` file instead of creating multiple messages. This turns duplicate sends into a single latest pending instruction.
|
|
464
|
+
|
|
465
|
+
Default route policy:
|
|
466
|
+
|
|
467
|
+
- `project-manager` may send to `architect`, `coder`, and `reviewer`.
|
|
468
|
+
- `architect`, `coder`, and `reviewer` may send to `project-manager`.
|
|
469
|
+
- Peer routes such as `coder-reviewer.md` may exist for explicit task designs, but VCM still serializes delivery per target role.
|
|
470
|
+
- `user` talks to `project-manager` through the normal active terminal or translation composer, not through a route file.
|
|
471
|
+
|
|
472
|
+
Stop-triggered scan:
|
|
473
|
+
|
|
474
|
+
- VCM injects Claude Code `UserPromptSubmit` and `Stop` hooks into `.claude/settings.json`.
|
|
475
|
+
- The hooks do not call `vcmctl`; they POST directly to the local VCM backend.
|
|
476
|
+
- When any role stops, VCM marks that role idle, then scans pending route files.
|
|
477
|
+
- VCM scans the stopped role's outgoing files and also any pending files targeting newly idle roles, so messages that were blocked by a busy target can be delivered after that target stops.
|
|
478
|
+
- VCM reads only stable, non-empty files and ignores blank files.
|
|
479
|
+
- VCM delivers at most one message to a target role per scan.
|
|
480
|
+
- If multiple pending files target the same idle role, VCM chooses deterministically by oldest modified time, then route name.
|
|
452
481
|
|
|
453
482
|
Manual mode:
|
|
454
483
|
|
|
@@ -458,28 +487,28 @@ Manual mode:
|
|
|
458
487
|
- `Mark All Done` marks open message records as `acknowledged` after the user manually handled stuck messages
|
|
459
488
|
- user decides whether to copy or manually act on the message
|
|
460
489
|
- VCM does not write to the target terminal or submit Enter
|
|
490
|
+
- VCM does not clear the source route file until the user marks it done or VCM later dispatches it in auto mode
|
|
461
491
|
|
|
462
492
|
Auto mode:
|
|
463
493
|
|
|
464
|
-
- if target role is
|
|
465
|
-
-
|
|
466
|
-
-
|
|
467
|
-
- non-
|
|
468
|
-
- VCM
|
|
469
|
-
-
|
|
470
|
-
-
|
|
471
|
-
- when the GUI sees a newly submitted auto message, it switches the active role tab to the target role
|
|
472
|
-
- a role's `vcmctl reply` or `vcmctl result` acknowledges the active message and releases the next queued message for that role
|
|
473
|
-
- `Mark All Done` is a manual recovery action for stuck orchestration. It marks `pending_approval`, `queued`, `staged`, `delivering`, `submitted`, `delivered`, and failed message states as `acknowledged` so the next queued work is not permanently blocked after the user manually copied or sent a message.
|
|
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
|
|
497
|
+
- 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
|
|
499
|
+
- 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.
|
|
474
501
|
|
|
475
502
|
VCM Harness injects Claude Code hooks into `.claude/settings.json`:
|
|
476
503
|
|
|
477
|
-
- `UserPromptSubmit`:
|
|
478
|
-
- `Stop`:
|
|
504
|
+
- `UserPromptSubmit`: posts directly to the VCM backend, marks the role running, and confirms any matching VCM message from `delivering` to `submitted`
|
|
505
|
+
- `Stop`: posts directly to the VCM backend, marks the role idle, and triggers pending route-file dispatch
|
|
506
|
+
|
|
507
|
+
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.
|
|
479
508
|
|
|
480
|
-
The injected role rules require asynchronous
|
|
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.
|
|
481
510
|
|
|
482
|
-
|
|
511
|
+
There is no `vcmctl` in the target design. Hook entrypoints are direct HTTP from Claude Code hooks to the local VCM backend.
|
|
483
512
|
|
|
484
513
|
## 13. Translation
|
|
485
514
|
|
|
@@ -617,6 +646,7 @@ Task worktree local files:
|
|
|
617
646
|
.claude/worktrees/<task>/.ai/vcm/orchestration/<task>.json
|
|
618
647
|
.claude/worktrees/<task>/.ai/vcm/translation/<task>/
|
|
619
648
|
.claude/worktrees/<task>/.ai/vcm/handoffs/
|
|
649
|
+
.claude/worktrees/<task>/.ai/vcm/handoffs/messages/<from-role>-<to-role>.md
|
|
620
650
|
```
|
|
621
651
|
|
|
622
652
|
For tasks created without a worktree, the task runtime repo is the connected base repo, so the runtime state resolves under the base repo's `.ai/vcm/`. Because `.ai/vcm/handoffs/` has no task-name segment, VCM allows only one active inline task in a connected repo.
|
|
@@ -632,7 +662,6 @@ External Claude transcripts:
|
|
|
632
662
|
Published npm packages must include built output:
|
|
633
663
|
|
|
634
664
|
- `dist/main.js`
|
|
635
|
-
- `dist/cli/vcmctl.js`
|
|
636
665
|
- backend route/service/template output in `dist/`
|
|
637
666
|
- frontend static assets in `dist-frontend/`
|
|
638
667
|
- `README.md`
|
|
@@ -658,10 +687,10 @@ VCM V1 is successful when:
|
|
|
658
687
|
- Switching roles never loses the embedded terminal.
|
|
659
688
|
- Restart creates a fresh Claude session; Resume reconnects to the persisted one.
|
|
660
689
|
- Permission modes are reflected in the Claude command.
|
|
661
|
-
-
|
|
662
|
-
- Manual orchestration lets the user inspect
|
|
663
|
-
- Auto orchestration can deliver
|
|
664
|
-
- Auto orchestration switches to the target role tab when a
|
|
690
|
+
- Roles can route messages by writing fixed route files under `.ai/vcm/handoffs/messages/`.
|
|
691
|
+
- Manual orchestration lets the user inspect pending route-file messages without auto-submitting Enter.
|
|
692
|
+
- 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.
|
|
665
694
|
- Round completion detection waits for the final role in a chained conversation and can alert with prompt plus sound.
|
|
666
695
|
- Translation settings save to `~/.vcm/settings.json`.
|
|
667
696
|
- Translation reads Claude transcript JSONL reliably after start, resume, and restart.
|
|
@@ -113,7 +113,7 @@ Responsibilities:
|
|
|
113
113
|
- Render compact header with task title, branch, immutable worktree path, role tabs, Refresh, and red `Close Task`.
|
|
114
114
|
- Hold per-role permission mode selection.
|
|
115
115
|
- Hold task orchestration state and pass its on/off control to the active role console.
|
|
116
|
-
- Detect newly submitted auto-orchestration messages from
|
|
116
|
+
- Detect newly submitted auto-orchestration messages from VCM dispatch and switch the active role tab to the target role.
|
|
117
117
|
- Emit task round state to `App` so completion alerts can be deduplicated and displayed.
|
|
118
118
|
- Render one `SessionConsole` per role but only show the active role.
|
|
119
119
|
- Emit messages/orchestration/events back to `App` so sidebar stays synchronized.
|
|
@@ -553,50 +553,56 @@ Files:
|
|
|
553
553
|
|
|
554
554
|
- `src/backend/services/message-service.ts`
|
|
555
555
|
- `src/backend/templates/message-envelope.ts`
|
|
556
|
-
- `src/cli/vcmctl.ts`
|
|
557
556
|
|
|
558
557
|
State:
|
|
559
558
|
|
|
560
559
|
```text
|
|
561
560
|
<taskRepoRoot>/.ai/vcm/messages/<task>.jsonl
|
|
562
561
|
<taskRepoRoot>/.ai/vcm/orchestration/<task>.json
|
|
563
|
-
<taskRepoRoot>/.ai/vcm/handoffs/messages/<
|
|
562
|
+
<taskRepoRoot>/.ai/vcm/handoffs/messages/<from-role>-<to-role>.md
|
|
564
563
|
```
|
|
565
564
|
|
|
566
565
|
Policy:
|
|
567
566
|
|
|
568
|
-
-
|
|
569
|
-
-
|
|
570
|
-
-
|
|
567
|
+
- Roles never call a VCM CLI to send messages.
|
|
568
|
+
- A role writes or updates exactly one route file for each directed target role.
|
|
569
|
+
- File name format is `<from-role>-<to-role>.md`; the filename is the authoritative route.
|
|
570
|
+
- Blank route files are not pending.
|
|
571
|
+
- Non-empty route files are pending and are dispatched only by VCM.
|
|
572
|
+
- Optional YAML frontmatter may provide message type and metadata, but cannot override the route.
|
|
573
|
+
- PM-to-role and role-to-PM routes are the default policy. Peer route files are supported only when the task design explicitly allows them.
|
|
571
574
|
|
|
572
575
|
Manual mode:
|
|
573
576
|
|
|
574
577
|
```text
|
|
575
|
-
|
|
578
|
+
role writes route file -> Stop hook -> VCM records pending snapshot -> Messages modal -> Copy/manual action
|
|
576
579
|
```
|
|
577
580
|
|
|
578
|
-
The current GUI shows sequence, timestamp, status, body preview,
|
|
581
|
+
The current GUI shows sequence, timestamp, status, route file path, body preview, `Copy`, and `Mark All Done`. VCM leaves the route file non-empty until the user confirms the pending content was handled or auto mode later dispatches it.
|
|
579
582
|
|
|
580
583
|
Auto mode:
|
|
581
584
|
|
|
582
585
|
```text
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
586
|
+
role writes route file
|
|
587
|
+
Stop hook -> VCM scans pending route files
|
|
588
|
+
target idle and running -> VCM writes envelope + Enter -> delivering
|
|
589
|
+
UserPromptSubmit hook -> VCM confirms accepted prompt -> submitted
|
|
590
|
+
submitted -> VCM clears source route file if it still contains the same message
|
|
591
|
+
target busy/unavailable/failure -> source route file remains non-empty
|
|
592
|
+
target Stop hook -> VCM scans again and may deliver next pending route file
|
|
587
593
|
```
|
|
588
594
|
|
|
589
|
-
The backend pastes a `[VCM MESSAGE]` envelope into the target terminal, then sends Enter as a separate terminal input event.
|
|
595
|
+
The backend pastes a `[VCM MESSAGE]` envelope into the target terminal, then sends Enter as a separate terminal input event. A successful terminal write creates a `delivering` snapshot. Claude Code `UserPromptSubmit` is the acceptance confirmation that moves the message to `submitted`. VCM snapshots the message body before clearing the source route file so the message history remains auditable. Delivery is serialized per target role; VCM never sends two pending route files into the same target role during one scan.
|
|
590
596
|
|
|
591
|
-
VCM Harness owns Claude Code hook injection through `.claude/settings.json`.
|
|
597
|
+
VCM Harness owns Claude Code hook injection through `.claude/settings.json`. The target design injects `UserPromptSubmit` and `Stop`. Hooks post directly to a local VCM backend endpoint and do not use `vcmctl`. `UserPromptSubmit` confirms accepted prompts and switches the role activity badge to `running`; `Stop` switches the role activity badge to `idle` and triggers a pending route-file scan. VCM also marks a role `running` immediately after it submits user input or a VCM message to that embedded terminal. VCM does not use Claude Code Subagent hooks for role delegation.
|
|
592
598
|
|
|
593
|
-
`Mark All Done` is a manual recovery action for stuck orchestration. It appends `acknowledged` snapshots for open messages
|
|
599
|
+
`Mark All Done` is a manual recovery action for stuck orchestration. It appends `acknowledged` snapshots for open messages and, after user confirmation, clears pending route files that the user already handled manually.
|
|
594
600
|
|
|
595
601
|
The message service also serializes message mutations per task inside the VCM process so concurrent API calls cannot bypass the per-role in-flight check.
|
|
596
602
|
|
|
597
|
-
The backend
|
|
603
|
+
The backend should not keep compatibility-only message command paths after this migration. Removing `vcmctl` is part of the target simplification.
|
|
598
604
|
|
|
599
|
-
Messages and orchestration snapshots are task runtime state under `taskRepoRoot/.ai/vcm`.
|
|
605
|
+
Messages and orchestration snapshots are task runtime state under `taskRepoRoot/.ai/vcm`. Pending route files live in the task worktree handoff directory and are cleared after successful VCM submission.
|
|
600
606
|
|
|
601
607
|
## 12. Round Completion Architecture
|
|
602
608
|
|
|
@@ -620,12 +626,12 @@ The round service reads hook-driven role activity from `RoleSessionRecord`. It d
|
|
|
620
626
|
|
|
621
627
|
Mapping:
|
|
622
628
|
|
|
623
|
-
-
|
|
629
|
+
- VCM terminal submit updates the session to `activityStatus: "running"` and the round role state to `answering`
|
|
624
630
|
- `Stop` updates the session to `activityStatus: "idle"`, records `lastStopAt`, and the round role state becomes `idle`
|
|
625
631
|
|
|
626
632
|
Task-level completion:
|
|
627
633
|
|
|
628
|
-
- If a message is currently `delivering
|
|
634
|
+
- If a message is currently `delivering` or `submitted`, the latest such message defines the round target.
|
|
629
635
|
- In a PM -> role -> PM chain, completion follows the newest active message, so the round completes after PM emits hook `Stop` for the final response.
|
|
630
636
|
- Queued or pending messages prevent completion.
|
|
631
637
|
- If no VCM message is in the round, the latest direct role `Stop` can still produce a completion state.
|
|
@@ -635,7 +641,7 @@ Frontend behavior:
|
|
|
635
641
|
- `TaskWorkspace` polls the round endpoint with the other task state.
|
|
636
642
|
- `App` stores the sidebar `Round alert` preference in `~/.vcm/settings.json`.
|
|
637
643
|
- `Try alert` is frontend-only and calls the same round completion notice/sound path without persisting any setting.
|
|
638
|
-
- `App` deduplicates `completionId`, then shows a small `Round complete` prompt and plays a short Web Audio
|
|
644
|
+
- `App` deduplicates `completionId`, then shows a small `Round complete` prompt and plays a short two-note Web Audio chime when alerts are enabled.
|
|
639
645
|
|
|
640
646
|
## 13. Role Command Compatibility
|
|
641
647
|
|
|
@@ -665,7 +671,7 @@ The dispatcher:
|
|
|
665
671
|
4. Resolves primary command path `role-commands/<role>.md`, with legacy fallback `<role>-command.md`.
|
|
666
672
|
5. Pastes `Please read and execute the role command at: <path>` to the target terminal, then sends Enter as a separate terminal input event.
|
|
667
673
|
|
|
668
|
-
This is
|
|
674
|
+
This is an obsolete compatibility path and should be removed when route-file messaging lands. The preferred V1 coordination path is VCM-dispatched route files under `.ai/vcm/handoffs/messages/`.
|
|
669
675
|
|
|
670
676
|
## 14. Harness Service
|
|
671
677
|
|
|
@@ -702,7 +708,7 @@ Managed block:
|
|
|
702
708
|
# VCM:END
|
|
703
709
|
```
|
|
704
710
|
|
|
705
|
-
`.claude/settings.json` is JSON-merged by the harness. VCM preserves existing settings and adds
|
|
711
|
+
`.claude/settings.json` is JSON-merged by the harness. VCM preserves existing settings and adds `UserPromptSubmit` and `Stop` hooks that post directly to the local VCM backend using the session-provided VCM API URL, task slug, role, and Claude session id. The hooks must not call `vcmctl`.
|
|
706
712
|
|
|
707
713
|
The service:
|
|
708
714
|
|
|
@@ -883,21 +889,18 @@ Messages:
|
|
|
883
889
|
|
|
884
890
|
```text
|
|
885
891
|
GET /api/tasks/:taskSlug/messages
|
|
886
|
-
|
|
892
|
+
GET /api/tasks/:taskSlug/messages/pending-route-files
|
|
893
|
+
POST /api/tasks/:taskSlug/messages/scan
|
|
887
894
|
POST /api/tasks/:taskSlug/messages/mark-all-done
|
|
888
|
-
POST /api/tasks/:taskSlug/messages/:messageId/stage
|
|
889
|
-
POST /api/tasks/:taskSlug/messages/:messageId/approve
|
|
890
|
-
POST /api/tasks/:taskSlug/messages/:messageId/reject
|
|
891
895
|
GET /api/tasks/:taskSlug/orchestration
|
|
892
896
|
PUT /api/tasks/:taskSlug/orchestration
|
|
893
|
-
POST /api/tasks/:taskSlug/orchestration/pause
|
|
894
|
-
POST /api/tasks/:taskSlug/orchestration/resume
|
|
895
897
|
```
|
|
896
898
|
|
|
897
899
|
Claude Code hooks:
|
|
898
900
|
|
|
899
901
|
```text
|
|
900
902
|
POST /api/hooks/claude-code
|
|
903
|
+
POST /api/hooks/claude-code/stop
|
|
901
904
|
```
|
|
902
905
|
|
|
903
906
|
Round:
|
|
@@ -972,7 +975,6 @@ Fastify error handler returns:
|
|
|
972
975
|
Bins:
|
|
973
976
|
|
|
974
977
|
- `vcm` -> `dist/main.js`
|
|
975
|
-
- `vcmctl` -> `dist/cli/vcmctl.js`
|
|
976
978
|
|
|
977
979
|
Important scripts:
|
|
978
980
|
|