vibe-coding-master 0.0.15 → 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 +11 -9
- package/dist/backend/api/claude-hook-routes.js +3 -0
- package/dist/backend/services/claude-hook-service.js +110 -48
- package/dist/backend/services/harness-service.js +4 -4
- package/dist/backend/services/message-service.js +69 -10
- package/dist/backend/services/round-service.js +1 -1
- package/dist/backend/services/session-service.js +4 -2
- package/dist-frontend/assets/{index-QhzvzTMZ.js → index-CvtyKEfS.js} +42 -42
- package/dist-frontend/index.html +1 -1
- package/docs/product-design.md +10 -9
- package/docs/v1-architecture-design.md +9 -7
- package/docs/v1-implementation-plan.md +10 -9
- package/package.json +1 -1
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>
|
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`.
|
|
@@ -471,8 +471,8 @@ Default route policy:
|
|
|
471
471
|
|
|
472
472
|
Stop-triggered scan:
|
|
473
473
|
|
|
474
|
-
- VCM injects
|
|
475
|
-
- The
|
|
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
476
|
- When any role stops, VCM marks that role idle, then scans pending route files.
|
|
477
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
478
|
- VCM reads only stable, non-empty files and ignores blank files.
|
|
@@ -491,9 +491,9 @@ Manual mode:
|
|
|
491
491
|
|
|
492
492
|
Auto mode:
|
|
493
493
|
|
|
494
|
-
- if the target role is idle and has no active
|
|
495
|
-
- terminal write success stores a durable message snapshot and marks the delivery `
|
|
496
|
-
-
|
|
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
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
498
|
- when VCM dispatches a message, the GUI switches to the target role tab so the user can watch execution
|
|
499
499
|
- the target role answers by writing its own route file back to the next role and then ending its turn
|
|
@@ -501,13 +501,14 @@ Auto mode:
|
|
|
501
501
|
|
|
502
502
|
VCM Harness injects Claude Code hooks into `.claude/settings.json`:
|
|
503
503
|
|
|
504
|
+
- `UserPromptSubmit`: posts directly to the VCM backend, marks the role running, and confirms any matching VCM message from `delivering` to `submitted`
|
|
504
505
|
- `Stop`: posts directly to the VCM backend, marks the role idle, and triggers pending route-file dispatch
|
|
505
506
|
|
|
506
|
-
VCM
|
|
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.
|
|
507
508
|
|
|
508
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.
|
|
509
510
|
|
|
510
|
-
There is no `vcmctl` in the target design.
|
|
511
|
+
There is no `vcmctl` in the target design. Hook entrypoints are direct HTTP from Claude Code hooks to the local VCM backend.
|
|
511
512
|
|
|
512
513
|
## 13. Translation
|
|
513
514
|
|
|
@@ -585,15 +585,16 @@ Auto mode:
|
|
|
585
585
|
```text
|
|
586
586
|
role writes route file
|
|
587
587
|
Stop hook -> VCM scans pending route files
|
|
588
|
-
target idle and running -> VCM writes envelope + Enter ->
|
|
589
|
-
|
|
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
|
|
590
591
|
target busy/unavailable/failure -> source route file remains non-empty
|
|
591
592
|
target Stop hook -> VCM scans again and may deliver next pending route file
|
|
592
593
|
```
|
|
593
594
|
|
|
594
|
-
The backend pastes a `[VCM MESSAGE]` envelope into the target terminal, then sends Enter as a separate terminal input event. A successful terminal
|
|
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.
|
|
595
596
|
|
|
596
|
-
VCM Harness owns Claude Code hook injection through `.claude/settings.json`. The target design injects
|
|
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.
|
|
597
598
|
|
|
598
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.
|
|
599
600
|
|
|
@@ -630,7 +631,7 @@ Mapping:
|
|
|
630
631
|
|
|
631
632
|
Task-level completion:
|
|
632
633
|
|
|
633
|
-
- If a message is currently `submitted`, the latest such message defines the round target.
|
|
634
|
+
- If a message is currently `delivering` or `submitted`, the latest such message defines the round target.
|
|
634
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.
|
|
635
636
|
- Queued or pending messages prevent completion.
|
|
636
637
|
- If no VCM message is in the round, the latest direct role `Stop` can still produce a completion state.
|
|
@@ -640,7 +641,7 @@ Frontend behavior:
|
|
|
640
641
|
- `TaskWorkspace` polls the round endpoint with the other task state.
|
|
641
642
|
- `App` stores the sidebar `Round alert` preference in `~/.vcm/settings.json`.
|
|
642
643
|
- `Try alert` is frontend-only and calls the same round completion notice/sound path without persisting any setting.
|
|
643
|
-
- `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.
|
|
644
645
|
|
|
645
646
|
## 13. Role Command Compatibility
|
|
646
647
|
|
|
@@ -707,7 +708,7 @@ Managed block:
|
|
|
707
708
|
# VCM:END
|
|
708
709
|
```
|
|
709
710
|
|
|
710
|
-
`.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`.
|
|
711
712
|
|
|
712
713
|
The service:
|
|
713
714
|
|
|
@@ -898,6 +899,7 @@ PUT /api/tasks/:taskSlug/orchestration
|
|
|
898
899
|
Claude Code hooks:
|
|
899
900
|
|
|
900
901
|
```text
|
|
902
|
+
POST /api/hooks/claude-code
|
|
901
903
|
POST /api/hooks/claude-code/stop
|
|
902
904
|
```
|
|
903
905
|
|
|
@@ -716,7 +716,8 @@ Route-file protocol:
|
|
|
716
716
|
- VCM scans the stopped role's outgoing files and pending files targeting newly idle roles
|
|
717
717
|
- VCM delivers at most one route file per target role per scan
|
|
718
718
|
- if several files target the same idle role, choose oldest modified time, then route name
|
|
719
|
-
- successful terminal
|
|
719
|
+
- successful terminal write snapshots the body as `delivering`
|
|
720
|
+
- `UserPromptSubmit` confirms Claude Code accepted the prompt, stores `submitted`, then clears the source route file if it still contains that same message
|
|
720
721
|
- failed, blocked, manual, or unavailable delivery leaves the source route file unchanged
|
|
721
722
|
- `markAllDone` appends `acknowledged` snapshots and may clear pending route files only after user confirmation
|
|
722
723
|
|
|
@@ -742,9 +743,10 @@ Exports:
|
|
|
742
743
|
|
|
743
744
|
Responsibilities:
|
|
744
745
|
|
|
745
|
-
- accept Claude Code `Stop` hook events directly over HTTP
|
|
746
|
+
- accept Claude Code `UserPromptSubmit` and `Stop` hook events directly over HTTP
|
|
746
747
|
- map hook events to the current VCM project, task, role, and persisted Claude session id
|
|
747
|
-
- update `RoleSessionRecord.activityStatus`: `Stop -> idle`
|
|
748
|
+
- update `RoleSessionRecord.activityStatus`: `UserPromptSubmit -> running`, `Stop -> idle`
|
|
749
|
+
- call `MessageService.confirmPromptSubmitted` when `UserPromptSubmit` includes a VCM message envelope
|
|
748
750
|
- call `MessageService.scanAndDispatchPendingRouteFiles` after recording the stop event
|
|
749
751
|
- never require `vcmctl hook-event`
|
|
750
752
|
|
|
@@ -889,7 +891,7 @@ Responsibilities:
|
|
|
889
891
|
- map `activityStatus: "running"` to role state `answering`
|
|
890
892
|
- map `activityStatus: "idle"` plus `lastStopAt` to role state `idle`
|
|
891
893
|
- evaluate task-level round completion from messages plus role states
|
|
892
|
-
- wait for the latest active submitted target role in PM -> role -> PM chains
|
|
894
|
+
- wait for the latest active delivering/submitted target role in PM -> role -> PM chains
|
|
893
895
|
- ignore completion while queued or pending messages exist
|
|
894
896
|
|
|
895
897
|
## 9. Backend API
|
|
@@ -917,7 +919,7 @@ Registers HTTP routes and the terminal WebSocket.
|
|
|
917
919
|
- `src/backend/api/session-routes.ts`: session lifecycle
|
|
918
920
|
- `src/backend/api/artifact-routes.ts`: artifact and log reads/writes
|
|
919
921
|
- `src/backend/api/message-routes.ts`: message history, pending route files, Mark All Done recovery, and orchestration
|
|
920
|
-
- `src/backend/api/claude-hook-routes.ts`: Claude Code `Stop` hook receiver
|
|
922
|
+
- `src/backend/api/claude-hook-routes.ts`: Claude Code `UserPromptSubmit` and `Stop` hook receiver
|
|
921
923
|
- `src/backend/api/round-routes.ts`: task round completion state
|
|
922
924
|
- `src/backend/api/translation-routes.ts`: settings, prompt previews, provider test, start/poll, input/send, clear/retry
|
|
923
925
|
|
|
@@ -1230,7 +1232,7 @@ Sidebar:
|
|
|
1230
1232
|
- `Repository Path` default open only when no task is selected
|
|
1231
1233
|
- `Settings` includes `Theme`, `Round alert`, `Try alert`, `Messages`, and `Events`
|
|
1232
1234
|
- `Theme` cycles through `System`, `Light`, and `Dark`; `System` follows the browser/OS color-scheme preference
|
|
1233
|
-
- `Round alert` is on by default and controls the in-app completion prompt plus
|
|
1235
|
+
- `Round alert` is on by default and controls the in-app completion prompt plus a soft two-note completion chime
|
|
1234
1236
|
- `Try alert` calls the same prompt/sound path without waiting for a real completed round
|
|
1235
1237
|
|
|
1236
1238
|
Task workspace:
|
|
@@ -1242,8 +1244,8 @@ Task workspace:
|
|
|
1242
1244
|
|
|
1243
1245
|
Round completion:
|
|
1244
1246
|
|
|
1245
|
-
- task state follows the latest active submitted message target role
|
|
1246
|
-
- role activity uses
|
|
1247
|
+
- task state follows the latest active delivering/submitted message target role
|
|
1248
|
+
- role activity uses Claude Code `UserPromptSubmit` -> `running` and Claude Code `Stop` -> `idle`; VCM terminal submit also optimistically marks the target role `running`
|
|
1247
1249
|
- PM -> role -> PM chains complete after PM's final hook `Stop`, not after the intermediate role's `Stop`
|
|
1248
1250
|
- queued or pending messages keep the round active
|
|
1249
1251
|
- frontend dedupes `completionId` before showing a prompt or playing sound
|
|
@@ -1369,7 +1371,6 @@ Do not reintroduce these into V1 docs or UI unless the product direction changes
|
|
|
1369
1371
|
- `Dirty: yes/no` sidebar label
|
|
1370
1372
|
- role command dispatch as the primary orchestration path
|
|
1371
1373
|
- `vcmctl` as an active CLI or agent-facing message path
|
|
1372
|
-
- `UserPromptSubmit` as the delivery confirmation mechanism
|
|
1373
1374
|
- per-role worktrees
|
|
1374
1375
|
- switching a task to another branch/worktree after creation
|
|
1375
1376
|
- a separate `Create task worktree` button outside task creation
|