vibe-coding-master 0.2.4 → 0.2.6
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 -3
- package/dist/backend/adapters/claude-adapter.js +9 -2
- package/dist/backend/adapters/git-adapter.js +60 -0
- package/dist/backend/api/claude-hook-routes.js +7 -0
- package/dist/backend/api/project-routes.js +3 -0
- package/dist/backend/server.js +2 -1
- package/dist/backend/services/app-settings-service.js +49 -1
- package/dist/backend/services/claude-hook-service.js +61 -11
- package/dist/backend/services/harness-service.js +6 -5
- package/dist/backend/services/project-service.js +104 -28
- package/dist/backend/services/round-service.js +40 -7
- package/dist/backend/services/session-service.js +16 -2
- package/dist/shared/types/app-settings.js +17 -0
- package/dist/shared/types/session.js +37 -1
- package/dist-frontend/assets/index-CPXFnxAY.css +32 -0
- package/dist-frontend/assets/index-D0_02lmQ.js +90 -0
- package/dist-frontend/index.html +2 -2
- package/docs/gateway-design.md +585 -0
- package/docs/product-design.md +72 -14
- package/docs/v0.2-implementation-plan.md +78 -68
- package/docs/vcm-cc-best-practices.md +18 -4
- package/package.json +1 -1
- package/scripts/install-vcm-harness.mjs +3 -2
- package/dist-frontend/assets/index-CfZ3VYXY.js +0 -90
- package/dist-frontend/assets/index-CfqduxVB.css +0 -32
package/docs/product-design.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# VibeCodingMaster Product Design
|
|
2
2
|
|
|
3
|
-
Last updated: 2026-06-
|
|
3
|
+
Last updated: 2026-06-10
|
|
4
4
|
|
|
5
5
|
This document describes the current product direction and implemented V1 behavior for VCM.
|
|
6
6
|
|
|
@@ -217,7 +217,7 @@ All sidebar groups are collapsible and default to collapsed. When no task is sel
|
|
|
217
217
|
Sections:
|
|
218
218
|
|
|
219
219
|
- `Repository Path`
|
|
220
|
-
- `Repository`
|
|
220
|
+
- `Connected Repository`
|
|
221
221
|
- `Settings`
|
|
222
222
|
- `VCM Harness`
|
|
223
223
|
- `New Task`
|
|
@@ -233,13 +233,29 @@ Repository Path
|
|
|
233
233
|
[ Recent v ] [ Connect ]
|
|
234
234
|
```
|
|
235
235
|
|
|
236
|
-
`Repository` shows
|
|
236
|
+
`Connected Repository` shows the connected base repository, not the active task
|
|
237
|
+
worktree:
|
|
237
238
|
|
|
238
|
-
- path
|
|
239
|
-
- branch
|
|
240
|
-
-
|
|
239
|
+
- base repo path
|
|
240
|
+
- current branch
|
|
241
|
+
- upstream branch when configured
|
|
242
|
+
- ahead/behind status relative to upstream
|
|
243
|
+
- current commit hash
|
|
244
|
+
- base repo working tree state
|
|
245
|
+
- last checked time
|
|
246
|
+
- a `Pull` button
|
|
241
247
|
|
|
242
|
-
|
|
248
|
+
Opening this section refreshes the connected repository status through
|
|
249
|
+
`GET /api/projects/current`. VCM does not poll this state at high frequency.
|
|
250
|
+
|
|
251
|
+
The `Pull` button runs `git pull --ff-only` only against the connected base
|
|
252
|
+
repository. It is disabled when the base repository has uncommitted changes,
|
|
253
|
+
when the branch has no upstream, or when the active task is an inline task using
|
|
254
|
+
the base repository directly. VCM does not stash, merge, or mutate task
|
|
255
|
+
worktrees from this button.
|
|
256
|
+
|
|
257
|
+
The old `Dirty: yes/no` label is not used. The UI uses `Working tree: clean` or
|
|
258
|
+
`Working tree: uncommitted changes`.
|
|
243
259
|
|
|
244
260
|
`Settings` contains:
|
|
245
261
|
|
|
@@ -251,7 +267,7 @@ The old `Dirty: yes/no` label is not used. The UI uses `Working tree: clean` or
|
|
|
251
267
|
|
|
252
268
|
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.
|
|
253
269
|
|
|
254
|
-
When `Flow pause alert` is on, VCM plays a short, soft, two-note local chime after a role flow stops advancing. If the flow lasted less than
|
|
270
|
+
When `Flow pause alert` is on, VCM plays a short, soft, two-note local chime after a role flow stops advancing. If the flow lasted less than 2 minutes, the chime plays 3 times, 1.4 seconds apart, and stops. If the flow lasted 2 minutes or longer, VCM shows an in-app alert dialog and repeats the chime until the user confirms the dialog. The alert sound must reuse one browser audio context after user activation instead of creating a fresh context for each repeat, because Safari can block repeated timer-driven playback when every repeat looks like a new autoplay attempt.
|
|
255
271
|
`Try alert` must work even when no flow has just paused so the user can verify browser sound and notification behavior.
|
|
256
272
|
Safari may still require the user to manually set `Safari > Website Settings > Auto-Play > Allow All Auto-Play`; Chrome is the recommended browser for reliable repeated alert sound.
|
|
257
273
|
|
|
@@ -335,10 +351,11 @@ Task-level round state:
|
|
|
335
351
|
- `Stop` moves the round into a 10 second settling window.
|
|
336
352
|
- A new `UserPromptSubmit` inside the window continues the same round.
|
|
337
353
|
- If no new prompt is accepted before the deadline, the round becomes `paused`.
|
|
338
|
-
- The
|
|
354
|
+
- The pause transition is timer-driven from the `Stop` event. Round-state reads do not end a round.
|
|
355
|
+
- Before pausing, VCM checks `.ai/vcm/handoffs/messages`; if a pending route message exists and can be delivered, VCM retries delivery and extends the settling window instead of alerting.
|
|
339
356
|
- The same round state stores total round count, prompt-submit count, stop count, and Claude Code active runtime. Active runtime is measured only between `UserPromptSubmit` and `Stop`, not during the settling window.
|
|
340
357
|
|
|
341
|
-
The frontend polls this task-level round state and deduplicates each paused round so the same paused state does not alert on every poll. Flow duration is measured from the first `UserPromptSubmit` to `pausedAt`, falling back to the last `Stop` when needed. Pauses under
|
|
358
|
+
The frontend polls this task-level round state and deduplicates each paused round so the same paused state does not alert on every poll. Flow duration is measured from the first `UserPromptSubmit` to `pausedAt`, falling back to the last `Stop` when needed. Pauses under 2 minutes trigger the weak 3-chime reminder at 1.4 second intervals. Pauses at or above 2 minutes trigger the strong alert dialog and repeating sound until confirmation.
|
|
342
359
|
|
|
343
360
|
## 9. Session Lifecycle
|
|
344
361
|
|
|
@@ -478,7 +495,7 @@ Default route policy:
|
|
|
478
495
|
|
|
479
496
|
Stop-triggered scan:
|
|
480
497
|
|
|
481
|
-
- VCM injects Claude Code `UserPromptSubmit` and `
|
|
498
|
+
- VCM injects Claude Code `UserPromptSubmit`, `Stop`, and `PermissionRequest` hooks into `.claude/settings.json`.
|
|
482
499
|
- The hooks do not call `vcmctl`; they POST directly to the local VCM backend.
|
|
483
500
|
- When any role stops, VCM marks that role idle, then scans pending route files.
|
|
484
501
|
- 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.
|
|
@@ -512,6 +529,7 @@ VCM Harness injects Claude Code hooks into `.claude/settings.json`:
|
|
|
512
529
|
|
|
513
530
|
- `UserPromptSubmit`: posts directly to the VCM backend, marks the role running, and confirms any matching VCM message by recording `acceptedAt`
|
|
514
531
|
- `Stop`: posts directly to the VCM backend, marks the role idle, and triggers pending route-file dispatch
|
|
532
|
+
- `PermissionRequest`: posts directly to the VCM backend and prints the backend response to stdout so Claude Code can consume an allow decision when the local VCM setting is enabled
|
|
515
533
|
|
|
516
534
|
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.
|
|
517
535
|
|
|
@@ -633,7 +651,32 @@ Translation panel `Auto-send` is separate from task `Auto orchestration`:
|
|
|
633
651
|
|
|
634
652
|
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.
|
|
635
653
|
|
|
636
|
-
## 14.
|
|
654
|
+
## 14. Mobile Gateway
|
|
655
|
+
|
|
656
|
+
VCM Gateway is a mobile Weixin DM bridge to the local desktop VCM instance.
|
|
657
|
+
|
|
658
|
+
Gateway product rules:
|
|
659
|
+
|
|
660
|
+
- DM only; group chat is not supported.
|
|
661
|
+
- One mobile Weixin DM identity binds to one desktop VCM instance.
|
|
662
|
+
- Binding is not tied to one project or one task.
|
|
663
|
+
- The bound phone can select among the projects and tasks available to the
|
|
664
|
+
desktop VCM instance.
|
|
665
|
+
- Plain mobile text is sent only to the current task's `project-manager`.
|
|
666
|
+
- Gateway never sends directly to `architect`, `coder`, or `reviewer`.
|
|
667
|
+
- Gateway can push PM assistant replies to Weixin whenever gateway is enabled,
|
|
668
|
+
even if that PM turn was started from desktop VCM.
|
|
669
|
+
- When gateway translation is enabled, mobile Chinese input is translated to
|
|
670
|
+
English before PM receives it, and PM English replies are translated to
|
|
671
|
+
Chinese before Weixin receives them.
|
|
672
|
+
- The PM prompt does not include the original Chinese text.
|
|
673
|
+
- There is no multi-user allowlist. The security model is one bound DM identity.
|
|
674
|
+
|
|
675
|
+
The first channel is Tencent iLink Bot API / Weixin DM. VCM uses QR login,
|
|
676
|
+
`getupdates` long polling, and `sendmessage` text replies. Gateway details and
|
|
677
|
+
implementation plan live in `docs/gateway-design.md`.
|
|
678
|
+
|
|
679
|
+
## 15. Local State
|
|
637
680
|
|
|
638
681
|
App-level settings:
|
|
639
682
|
|
|
@@ -644,9 +687,21 @@ App-level settings:
|
|
|
644
687
|
Stored app-level settings include:
|
|
645
688
|
|
|
646
689
|
- UI theme mode: `system`, `light`, or `dark`
|
|
690
|
+
- flow pause alert preference
|
|
691
|
+
- Claude Code permission request handling preference
|
|
647
692
|
- translation provider settings and API key
|
|
648
693
|
- recent repository paths
|
|
649
694
|
|
|
695
|
+
Gateway state and audit logs:
|
|
696
|
+
|
|
697
|
+
```text
|
|
698
|
+
~/.vcm/gateway/settings.json
|
|
699
|
+
~/.vcm/gateway/audit.jsonl
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
Gateway credentials, iLink tokens, DM binding identity, cursors, context tokens,
|
|
703
|
+
and audit logs must stay outside connected repositories.
|
|
704
|
+
|
|
650
705
|
Repository-level VCM state:
|
|
651
706
|
|
|
652
707
|
```text
|
|
@@ -682,7 +737,7 @@ External Claude transcripts:
|
|
|
682
737
|
~/.claude/projects/<project-hash>/<claude-session-id>.jsonl
|
|
683
738
|
```
|
|
684
739
|
|
|
685
|
-
##
|
|
740
|
+
## 16. Packaging Expectations
|
|
686
741
|
|
|
687
742
|
Published npm packages must include built output:
|
|
688
743
|
|
|
@@ -701,7 +756,7 @@ npm run build && npm run verify:package
|
|
|
701
756
|
|
|
702
757
|
This protects against publishing raw TypeScript bin files or missing frontend assets.
|
|
703
758
|
|
|
704
|
-
##
|
|
759
|
+
## 17. Success Criteria
|
|
705
760
|
|
|
706
761
|
VCM V1 is successful when:
|
|
707
762
|
|
|
@@ -712,6 +767,7 @@ VCM V1 is successful when:
|
|
|
712
767
|
- Switching roles never loses the embedded terminal.
|
|
713
768
|
- Restart creates a fresh Claude session; Resume reconnects to the persisted one.
|
|
714
769
|
- Permission modes are reflected in the Claude command.
|
|
770
|
+
- Sidebar settings include Claude Code permission request handling with `off` and `allow all`; `off` is the default.
|
|
715
771
|
- Roles can route messages by writing fixed route files under `.ai/vcm/handoffs/messages/`.
|
|
716
772
|
- Manual orchestration lets the user inspect pending route-file messages without auto-submitting Enter.
|
|
717
773
|
- Auto orchestration can deliver pending route-file messages to idle running target roles.
|
|
@@ -719,6 +775,8 @@ VCM V1 is successful when:
|
|
|
719
775
|
- Round completion detection waits for the final role in a chained conversation and can alert with prompt plus sound.
|
|
720
776
|
- Translation settings save to `~/.vcm/settings.json`.
|
|
721
777
|
- Translation reads Claude transcript JSONL reliably after start, resume, and restart.
|
|
778
|
+
- Gateway can bind one Weixin DM identity to the desktop VCM instance, send
|
|
779
|
+
translated plain text to PM, and push translated PM replies back to Weixin.
|
|
722
780
|
- Terminal and translation panel have equal, stable reading space.
|
|
723
781
|
- Harness install/update preserves user content outside VCM managed blocks.
|
|
724
782
|
- Completed tasks can cleanly remove their worktree and VCM task metadata without affecting other tasks.
|
|
@@ -12,65 +12,80 @@ This document is an implementation plan, not a target-repository harness file.
|
|
|
12
12
|
|
|
13
13
|
## 1. Mobile Gateway Goal
|
|
14
14
|
|
|
15
|
-
VCM 0.2 should let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
The gateway
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
VCM 0.2 should let one mobile Weixin DM bind to one desktop VCM instance and
|
|
16
|
+
talk to the current task's `project-manager` role.
|
|
17
|
+
|
|
18
|
+
The detailed gateway product design and implementation plan lives in
|
|
19
|
+
`docs/gateway-design.md`.
|
|
20
|
+
|
|
21
|
+
Current decisions:
|
|
22
|
+
|
|
23
|
+
- Support Weixin DM only. Group chat is not supported.
|
|
24
|
+
- Bind one mobile Weixin DM identity to one desktop VCM instance.
|
|
25
|
+
- Binding is not project-specific and not task-specific.
|
|
26
|
+
- The bound phone can select among the projects and tasks available to the
|
|
27
|
+
desktop VCM instance.
|
|
28
|
+
- Plain mobile text is sent only to the current task's `project-manager`.
|
|
29
|
+
- Gateway never sends directly to `architect`, `coder`, or `reviewer`.
|
|
30
|
+
- PM replies may be pushed to Weixin whenever gateway is enabled, even when the
|
|
31
|
+
PM turn was started from the desktop UI.
|
|
32
|
+
- When translation is enabled, mobile Chinese input is translated to English
|
|
33
|
+
before PM sees it, and PM English replies are translated to Chinese before
|
|
34
|
+
Weixin sees them.
|
|
35
|
+
- The prompt sent to PM does not include the original Chinese text.
|
|
36
|
+
- There is no multi-user allowlist. The security model is one bound DM identity.
|
|
28
37
|
|
|
29
38
|
## 2. Gateway Non-Goals
|
|
30
39
|
|
|
31
40
|
VCM 0.2 gateway should not:
|
|
32
41
|
|
|
33
|
-
- expose the
|
|
34
|
-
-
|
|
42
|
+
- expose the embedded terminal over Weixin
|
|
43
|
+
- support group chat
|
|
44
|
+
- support multiple mobile users
|
|
35
45
|
- store gateway credentials in the connected repository
|
|
36
|
-
-
|
|
46
|
+
- send directly to non-PM roles
|
|
47
|
+
- run shell commands from gateway messages
|
|
48
|
+
- provide approve/reject/start/stop workflow controls in the MVP
|
|
37
49
|
- bypass existing backend task/session/orchestration services
|
|
38
50
|
|
|
39
51
|
## 3. Gateway Shape
|
|
40
52
|
|
|
41
53
|
```text
|
|
42
54
|
Weixin mobile DM
|
|
43
|
-
-> Tencent iLink Bot API
|
|
55
|
+
-> Tencent iLink Bot API getupdates
|
|
44
56
|
-> VCM gateway channel: weixin-ilink
|
|
45
|
-
->
|
|
46
|
-
->
|
|
47
|
-
->
|
|
57
|
+
-> bound identity check
|
|
58
|
+
-> command parser or PM message bridge
|
|
59
|
+
-> existing VCM backend services
|
|
60
|
+
-> Tencent iLink sendmessage
|
|
48
61
|
```
|
|
49
62
|
|
|
50
|
-
The iLink channel
|
|
51
|
-
|
|
52
|
-
|
|
63
|
+
The iLink channel is outbound-first from the VCM process. It long-polls iLink
|
|
64
|
+
for direct messages and sends replies through the iLink send API. This avoids a
|
|
65
|
+
public callback URL for the first gateway version.
|
|
53
66
|
|
|
54
67
|
Suggested backend files:
|
|
55
68
|
|
|
56
69
|
```text
|
|
70
|
+
src/shared/types/gateway.ts
|
|
71
|
+
|
|
57
72
|
src/backend/gateway/
|
|
58
73
|
gateway-service.ts
|
|
59
74
|
gateway-settings-service.ts
|
|
60
75
|
gateway-command-parser.ts
|
|
61
|
-
gateway-
|
|
76
|
+
gateway-pm-bridge.ts
|
|
62
77
|
gateway-notifier.ts
|
|
78
|
+
gateway-audit-log.ts
|
|
63
79
|
channels/
|
|
64
80
|
weixin-ilink-channel.ts
|
|
65
81
|
|
|
66
82
|
src/backend/api/gateway-routes.ts
|
|
67
|
-
src/shared/types/gateway.ts
|
|
68
83
|
```
|
|
69
84
|
|
|
70
85
|
Gateway settings and secrets must live in app-local state:
|
|
71
86
|
|
|
72
87
|
```text
|
|
73
|
-
~/.vcm/settings.json
|
|
88
|
+
~/.vcm/gateway/settings.json
|
|
74
89
|
~/.vcm/gateway/audit.jsonl
|
|
75
90
|
```
|
|
76
91
|
|
|
@@ -79,62 +94,57 @@ log, `.ai/vcm/**`, or PR text.
|
|
|
79
94
|
|
|
80
95
|
## 4. Gateway Command Surface
|
|
81
96
|
|
|
82
|
-
|
|
97
|
+
MVP commands:
|
|
83
98
|
|
|
84
99
|
```text
|
|
100
|
+
/help
|
|
85
101
|
/status
|
|
102
|
+
/projects
|
|
103
|
+
/use-project <index-or-path>
|
|
86
104
|
/tasks
|
|
87
|
-
/task <
|
|
88
|
-
/
|
|
89
|
-
/
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Initial state-changing commands:
|
|
93
|
-
|
|
94
|
-
```text
|
|
95
|
-
/pm <text>
|
|
96
|
-
/approve <id>
|
|
97
|
-
/reject <id>
|
|
98
|
-
/pause <task>
|
|
99
|
-
/resume <task>
|
|
105
|
+
/use-task <index-or-task-slug>
|
|
106
|
+
/translate on
|
|
107
|
+
/translate off
|
|
100
108
|
```
|
|
101
109
|
|
|
102
|
-
|
|
110
|
+
Plain text that does not start with `/` is treated as a PM message for the
|
|
111
|
+
current task.
|
|
103
112
|
|
|
104
|
-
|
|
105
|
-
- command parsing into a known action
|
|
106
|
-
- confirmation when destructive or high-risk
|
|
107
|
-
- audit logging with secrets redacted
|
|
113
|
+
## 5. Gateway Feasibility
|
|
108
114
|
|
|
109
|
-
The
|
|
110
|
-
|
|
111
|
-
|
|
115
|
+
The local reference implementation
|
|
116
|
+
`/Users/sheldon/Documents/New project 3/weixin-ilink-gateway-test` proves the
|
|
117
|
+
needed Tencent iLink primitives:
|
|
112
118
|
|
|
113
|
-
|
|
119
|
+
- QR login through `ilink/bot/get_bot_qrcode`.
|
|
120
|
+
- QR status polling through `ilink/bot/get_qrcode_status`.
|
|
121
|
+
- Long-poll receive through `ilink/bot/getupdates`.
|
|
122
|
+
- Text DM send through `ilink/bot/sendmessage`.
|
|
123
|
+
- Token, cursor, and context-token persistence outside repositories.
|
|
124
|
+
- Session-expiration handling through iLink error code `-14`.
|
|
114
125
|
|
|
115
|
-
|
|
126
|
+
VCM already has the other required primitives:
|
|
116
127
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
- rate-limit command handling
|
|
123
|
-
- redact secrets in logs
|
|
124
|
-
- confirmation-gate destructive actions
|
|
125
|
-
- never expose raw terminal write APIs to gateway commands
|
|
128
|
+
- controlled terminal submission through backend PTY services
|
|
129
|
+
- Claude Code `UserPromptSubmit` / `Stop` hooks
|
|
130
|
+
- Claude transcript parsing
|
|
131
|
+
- translation provider integration
|
|
132
|
+
- project/task/session services
|
|
126
133
|
|
|
127
134
|
## 6. Gateway Acceptance
|
|
128
135
|
|
|
129
|
-
Gateway is acceptable when:
|
|
130
|
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
- `/
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
136
|
+
Gateway MVP is acceptable when:
|
|
137
|
+
|
|
138
|
+
- desktop VCM can enable/disable gateway
|
|
139
|
+
- desktop VCM can QR-bind one Weixin DM identity
|
|
140
|
+
- the bound phone can DM `/status` and receive current VCM status
|
|
141
|
+
- the bound phone can list and select current project/task context
|
|
142
|
+
- the bound phone can send Chinese plain text to current task PM
|
|
143
|
+
- PM receives only the translated English prompt, without original Chinese
|
|
144
|
+
- gateway pushes PM assistant replies to Weixin whenever enabled
|
|
145
|
+
- PM replies are translated to Chinese when gateway translation is enabled
|
|
146
|
+
- restart does not replay already handled iLink messages or PM replies
|
|
147
|
+
- credentials and audit logs stay outside connected repos
|
|
138
148
|
|
|
139
149
|
## 7. Full Harness Goal
|
|
140
150
|
|
|
@@ -412,10 +412,24 @@ gateway-submitted prompts, and command authorization.
|
|
|
412
412
|
VCM 0.2 gateway should expose a conservative mobile command surface through
|
|
413
413
|
Tencent iLink Bot API / Weixin DM.
|
|
414
414
|
|
|
415
|
+
Gateway product rules:
|
|
416
|
+
|
|
417
|
+
- support Weixin DM only, not group chat
|
|
418
|
+
- bind one mobile Weixin DM identity to one desktop VCM instance
|
|
419
|
+
- do not bind gateway to a single project or task
|
|
420
|
+
- let the bound phone select among the projects and tasks available to that VCM
|
|
421
|
+
instance
|
|
422
|
+
- send ordinary mobile text only to the current task's `project-manager`
|
|
423
|
+
- do not send gateway messages directly to architect, coder, or reviewer
|
|
424
|
+
- when translation is enabled, send only translated English to PM and translated
|
|
425
|
+
Chinese back to Weixin
|
|
426
|
+
- do not include the original Chinese text in PM prompts
|
|
427
|
+
- use one bound DM identity; do not maintain a multi-user allowlist
|
|
428
|
+
|
|
415
429
|
Gateway settings and secrets live in app-local state:
|
|
416
430
|
|
|
417
431
|
```text
|
|
418
|
-
~/.vcm/settings.json
|
|
432
|
+
~/.vcm/gateway/settings.json
|
|
419
433
|
```
|
|
420
434
|
|
|
421
435
|
Gateway audit logs live outside connected repositories:
|
|
@@ -428,9 +442,9 @@ Rules:
|
|
|
428
442
|
|
|
429
443
|
- do not expose the full embedded terminal over Weixin
|
|
430
444
|
- do not store gateway credentials in connected repositories
|
|
431
|
-
-
|
|
432
|
-
-
|
|
433
|
-
- audit state
|
|
445
|
+
- reject or ignore messages outside the bound DM identity
|
|
446
|
+
- keep the MVP PM-only and avoid approve/reject/start/stop workflow commands
|
|
447
|
+
- audit gateway state changes and message handling with secrets redacted
|
|
434
448
|
- treat gateway authorization and command parsing as high-risk code
|
|
435
449
|
|
|
436
450
|
## 16. Minimum VCM Rules
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ const MANIFEST_PATH = ".ai/vcm-harness-manifest.json";
|
|
|
11
11
|
const HTML_BLOCK_PATTERN = /<!-- VCM:BEGIN(?:\s+version=\d+)? -->[\s\S]*?<!-- VCM:END -->/m;
|
|
12
12
|
const HASH_BLOCK_PATTERN = /# VCM:BEGIN(?:\s+version=\d+)?\n[\s\S]*?# VCM:END/m;
|
|
13
13
|
const VCM_HOOK_COMMAND = `sh -c 'if [ -z "\${VCM_TASK_SLUG:-}" ] || [ -z "\${VCM_ROLE:-}" ] || [ -z "\${VCM_API_URL:-}" ]; then exit 0; fi; node -e '"'"'let s="";process.stdin.setEncoding("utf8");process.stdin.on("data",d=>s+=d);process.stdin.on("end",()=>{let event={};try{event=s.trim()?JSON.parse(s):{};}catch{event={raw:s};}process.stdout.write(JSON.stringify({taskSlug:process.env.VCM_TASK_SLUG,role:process.env.VCM_ROLE,event}));});'"'"' | curl -fsS --max-time 2 -X POST "\${VCM_API_URL}/api/hooks/claude-code" -H "content-type: application/json" --data-binary @- >/dev/null || true'`;
|
|
14
|
+
const VCM_PERMISSION_REQUEST_HOOK_COMMAND = `sh -c 'if [ -z "\${VCM_TASK_SLUG:-}" ] || [ -z "\${VCM_ROLE:-}" ] || [ -z "\${VCM_API_URL:-}" ]; then exit 0; fi; node -e '"'"'let s="";process.stdin.setEncoding("utf8");process.stdin.on("data",d=>s+=d);process.stdin.on("end",()=>{let event={};try{event=s.trim()?JSON.parse(s):{};}catch{event={raw:s};}process.stdout.write(JSON.stringify({taskSlug:process.env.VCM_TASK_SLUG,role:process.env.VCM_ROLE,event}));});'"'"' | curl -fsS --max-time 5 -X POST "\${VCM_API_URL}/api/hooks/claude-code/permission-request" -H "content-type: application/json" --data-binary @- || true'`;
|
|
14
15
|
|
|
15
16
|
const AGENT_FRONTMATTER = {
|
|
16
17
|
"project-manager": {
|
|
@@ -1480,14 +1481,14 @@ function mergeVcmHooks(settings) {
|
|
|
1480
1481
|
}
|
|
1481
1482
|
}
|
|
1482
1483
|
|
|
1483
|
-
for (const eventName of ["UserPromptSubmit", "Stop"]) {
|
|
1484
|
+
for (const eventName of ["UserPromptSubmit", "Stop", "PermissionRequest"]) {
|
|
1484
1485
|
hooks[eventName] = [
|
|
1485
1486
|
...(Array.isArray(hooks[eventName]) ? hooks[eventName] : []),
|
|
1486
1487
|
{
|
|
1487
1488
|
hooks: [
|
|
1488
1489
|
{
|
|
1489
1490
|
type: "command",
|
|
1490
|
-
command: VCM_HOOK_COMMAND,
|
|
1491
|
+
command: eventName === "PermissionRequest" ? VCM_PERMISSION_REQUEST_HOOK_COMMAND : VCM_HOOK_COMMAND,
|
|
1491
1492
|
timeout: 5
|
|
1492
1493
|
}
|
|
1493
1494
|
]
|