vibe-coding-master 0.4.42 → 0.5.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.
@@ -1,408 +0,0 @@
1
- # VCM 0.2 Implementation Plan
2
-
3
- Last updated: 2026-06-10
4
-
5
- > Archived historical plan. This document records the 0.2 design context and is
6
- > not the current implementation reference. For current behavior, use
7
- > `README.md`, `docs/gateway-design.md`, and `docs/full-harness-baseline.md`.
8
-
9
- VCM 0.2 has two product tracks:
10
-
11
- - Mobile gateway through Tencent iLink Bot API / Weixin DM.
12
- - Full harness initialization based on the current `example/rust-layered`
13
- baseline.
14
-
15
- This document is an implementation plan, not a target-repository harness file.
16
-
17
- ## 1. Mobile Gateway Goal
18
-
19
- VCM 0.2 should let one mobile Weixin DM bind to one desktop VCM instance,
20
- manage the basic task lifecycle, and talk to the current task's
21
- `project-manager` role.
22
-
23
- The detailed gateway product design and implementation plan lives in
24
- `docs/gateway-design.md`.
25
-
26
- Current decisions:
27
-
28
- - Support Weixin DM only. Group chat is not supported.
29
- - Bind one mobile Weixin DM identity to one desktop VCM instance.
30
- - Binding is not project-specific and not task-specific.
31
- - The bound phone can select among the projects and tasks available to the
32
- desktop VCM instance.
33
- - The bound phone can pull the selected connected base repo through VCM's
34
- fast-forward-only connected repository pull path.
35
- - The bound phone can create a worktree-backed task and ask VCM to initialize it
36
- through the saved launch template.
37
- - The bound phone can close a completed task through VCM's Close Task cleanup
38
- path after explicit confirmation.
39
- - Plain mobile text is sent only to the current task's `project-manager`.
40
- - Gateway never sends directly to `architect`, `coder`, or `reviewer`.
41
- - PM replies may be pushed to Weixin whenever gateway is enabled, even when the
42
- PM turn was started from the desktop UI.
43
- - When translation is enabled, mobile Chinese input is translated to English
44
- before PM sees it, and PM English replies are translated to Chinese before
45
- Weixin sees them.
46
- - The prompt sent to PM does not include the original Chinese text.
47
- - There is no multi-user allowlist. The security model is one bound DM identity.
48
-
49
- ## 2. Gateway Non-Goals
50
-
51
- VCM 0.2 gateway should not:
52
-
53
- - expose the embedded terminal over Weixin
54
- - support group chat
55
- - support multiple mobile users
56
- - store gateway credentials in the connected repository
57
- - send directly to non-PM roles
58
- - run shell commands from gateway messages
59
- - provide approve/reject gates, arbitrary role-specific start/stop controls, or
60
- shell execution in the MVP
61
- - bypass existing backend task/session/orchestration services
62
-
63
- ## 3. Gateway Shape
64
-
65
- ```text
66
- Weixin mobile DM
67
- -> Tencent iLink Bot API getupdates
68
- -> VCM gateway channel: weixin-ilink
69
- -> bound identity check
70
- -> command parser or PM message bridge
71
- -> existing VCM backend services
72
- -> Tencent iLink sendmessage
73
- ```
74
-
75
- The iLink channel is outbound-first from the VCM process. It long-polls iLink
76
- for direct messages and sends replies through the iLink send API. This avoids a
77
- public callback URL for the first gateway version.
78
-
79
- Implemented backend files:
80
-
81
- ```text
82
- src/shared/types/gateway.ts
83
-
84
- src/backend/gateway/
85
- gateway-service.ts
86
- gateway-settings-service.ts
87
- gateway-command-parser.ts
88
- gateway-audit-log.ts
89
- channels/
90
- weixin-ilink-channel.ts
91
-
92
- src/backend/api/gateway-routes.ts
93
- ```
94
-
95
- Gateway settings and secrets must live in app-local state:
96
-
97
- ```text
98
- <vcmDataDir>/gateway/settings.json
99
- <vcmDataDir>/gateway/audit.jsonl
100
- ```
101
-
102
- Gateway credentials must never be written to a connected repository, terminal
103
- log, `.ai/vcm/**`, or PR text.
104
-
105
- ## 4. Gateway Command Surface
106
-
107
- MVP commands:
108
-
109
- ```text
110
- /help
111
- /status
112
- /projects
113
- /use-project <index-or-path>
114
- /pull-current
115
- /tasks
116
- /use-task <index-or-task-slug>
117
- /create-task <task-slug> [title]
118
- /close-task
119
- /close-task confirm <task-slug>
120
- /translate on
121
- /translate off
122
- ```
123
-
124
- Plain text that does not start with `/` is treated as a PM message for the
125
- current task.
126
-
127
- ## 5. Gateway Feasibility
128
-
129
- The local reference implementation
130
- `/Users/sheldon/Documents/New project 3/weixin-ilink-gateway-test` proves the
131
- needed Tencent iLink primitives:
132
-
133
- - QR login through `ilink/bot/get_bot_qrcode`.
134
- - QR status polling through `ilink/bot/get_qrcode_status`.
135
- - Long-poll receive through `ilink/bot/getupdates`.
136
- - Text DM send through `ilink/bot/sendmessage`.
137
- - Token, cursor, and context-token persistence outside repositories.
138
- - Session-expiration handling through iLink error code `-14`.
139
-
140
- VCM already has the other required primitives:
141
-
142
- - controlled terminal submission through backend PTY services
143
- - Claude Code `UserPromptSubmit` / `Stop` hooks
144
- - Claude transcript parsing
145
- - translation provider integration
146
- - project/task/session services
147
-
148
- ## 6. Gateway Acceptance
149
-
150
- Gateway MVP is acceptable when:
151
-
152
- - desktop VCM can enable/disable gateway
153
- - desktop VCM can QR-bind one Weixin DM identity
154
- - the bound phone can DM `/status` and receive current VCM status
155
- - the bound phone can list and select current project/task context
156
- - the bound phone can run `/pull-current` to update the connected base repo
157
- - the bound phone can run `/create-task <task-slug> [title]` to create a task
158
- and start four role sessions through the saved launch template
159
- - the bound phone can send Chinese plain text to current task PM
160
- - PM receives only the translated English prompt, without original Chinese
161
- - gateway pushes PM assistant replies to Weixin whenever enabled
162
- - PM replies are translated to Chinese when gateway translation is enabled
163
- - the bound phone can close a completed task through `/close-task` and exact
164
- slug confirmation
165
- - restart does not replay already handled iLink messages or PM replies
166
- - credentials and audit logs stay outside connected repos
167
-
168
- ## 7. Full Harness Goal
169
-
170
- Full harness initialization should create the current `example/rust-layered`
171
- baseline, not the older broad `cc-best-practices.md` inventory.
172
-
173
- The goal is a practical VCM harness:
174
-
175
- - four core role agents
176
- - concise root `CLAUDE.md` VCM block
177
- - repo-local VCM skills
178
- - manifest-managed harness ownership
179
- - generated context tools
180
- - generated context artifacts
181
- - long-running command helper scripts
182
- - project-owned durable docs created or initialized by bootstrap
183
- - runtime state kept temporary and cleanable
184
-
185
- ## 8. Current Target Harness Shape
186
-
187
- Fixed installer files:
188
-
189
- ```text
190
- CLAUDE.md
191
- .gitignore
192
- .claude/settings.json
193
- .claude/agents/project-manager.md
194
- .claude/agents/architect.md
195
- .claude/agents/coder.md
196
- .claude/agents/reviewer.md
197
- .claude/skills/vcm-route-message/SKILL.md
198
- .claude/skills/vcm-final-acceptance/SKILL.md
199
- .claude/skills/vcm-long-running-validation/SKILL.md
200
- .claude/skills/vcm-harness-bootstrap/SKILL.md
201
- .ai/vcm-harness-manifest.json
202
- .ai/tools/generate-module-index
203
- .ai/tools/generate-public-surface
204
- .ai/tools/run-long-check
205
- .ai/tools/watch-job
206
- .github/pull_request_template.md
207
- ```
208
-
209
- Derived bootstrap artifacts:
210
-
211
- ```text
212
- .ai/generated/module-index.json
213
- .ai/generated/public-surface.json
214
- ```
215
-
216
- Generated context is Rust-only for VCM 0.2. The fixed installer installs the
217
- Rust `generate-module-index` and `generate-public-surface` tools, but it does
218
- not generate trusted context by itself and does not promise generated-context
219
- support for non-Rust projects.
220
-
221
- Project-owned bootstrap outputs:
222
-
223
- ```text
224
- docs/ARCHITECTURE.md
225
- <module>/ARCHITECTURE.md
226
- docs/TESTING.md
227
- docs/known-issues.md
228
- docs/plans/
229
- ```
230
-
231
- Runtime roots:
232
-
233
- ```text
234
- .ai/vcm/
235
- .claude/worktrees/
236
- ```
237
-
238
- Explicitly not part of the current target:
239
-
240
- ```text
241
- .claude/commands/
242
- .claude/agents/optional/
243
- .ai/task-specs/
244
- .ai/vcm/tasks/
245
- .ai/vcm/handoffs/role-commands/
246
- docs/plans/active/
247
- docs/plans/completed/
248
- docs/MODULE_MAP.md
249
- docs/SECURITY.md
250
- docs/DEPENDENCY_RULES.md
251
- docs/AI_WORKFLOW.md
252
- .ai/generated/test-map.json
253
- .ai/tools/check-fast
254
- .ai/tools/check-changed
255
- .ai/tools/check-module
256
- .ai/tools/check-boundaries
257
- .ai/tools/check-agent-rules
258
- .ai/tools/check-docs-freshness
259
- .ai/tools/find-owner
260
- .ai/tools/find-callers
261
- .ai/tools/find-tests
262
- ```
263
-
264
- ## 9. Harness Manifest
265
-
266
- Full harness initialization writes:
267
-
268
- ```text
269
- .ai/vcm-harness-manifest.json
270
- ```
271
-
272
- The manifest records harness ownership only. It should include:
273
-
274
- - VCM-managed files and directories
275
- - marker type and marker boundaries
276
- - JSON merge ownership
277
- - VCM agents and skills
278
- - harness tools
279
- - derived generated artifacts
280
- - runtime roots
281
- - lifecycle labels
282
- - uninstall actions
283
-
284
- It should not include:
285
-
286
- - project-owned durable docs
287
- - module-level `ARCHITECTURE.md`
288
- - `.ai/vcm/**` runtime files
289
- - `.claude/worktrees/**`
290
- - `.gitkeep`
291
-
292
- ## 10. AI-Assisted Bootstrap
293
-
294
- The deterministic installer owns:
295
-
296
- - managed block writes
297
- - `.claude/settings.json` merge
298
- - manifest creation and migration
299
- - skill and agent file installation
300
- - tool file installation
301
- - generated directory creation
302
- - uninstall behavior
303
-
304
- The `vcm-harness-bootstrap` skill owns AI-assisted project understanding. It may
305
- draft or refresh:
306
-
307
- - `CLAUDE.md` project context outside the VCM managed block
308
- - `docs/ARCHITECTURE.md`
309
- - module-level `ARCHITECTURE.md`
310
- - `docs/TESTING.md`
311
- - `docs/known-issues.md`
312
- - `.ai/generated/module-index.json`
313
- - `.ai/generated/public-surface.json`
314
-
315
- It must not edit product source, product tests, package manifests, lockfiles,
316
- deployment config, or secrets. It must not create new validation wrapper tools
317
- during bootstrap.
318
-
319
- VCM UI startup flow:
320
-
321
- 1. User connects a repository.
322
- 2. User runs fixed harness install/update from the VCM Harness panel.
323
- 3. Backend runs `scripts/install-vcm-harness.mjs <repo-root>` and records the
324
- deterministic result in the UI.
325
- 4. Backend recomputes bootstrap checks: fixed harness, `CLAUDE.md` project
326
- context, generated context, project architecture doc, module architecture
327
- docs, and testing doc.
328
- 5. User starts harness bootstrap from the UI when fixed harness is ready.
329
- 6. Backend starts one temporary Claude Code terminal in the repository root,
330
- without a role agent, and sends a prompt requiring use of the
331
- `vcm-harness-bootstrap` skill.
332
- 7. Backend passes bootstrap environment variables:
333
- `VCM_TASK_REPO_ROOT`, `VCM_HARNESS_BOOTSTRAP=1`, `VCM_SESSION_ID`, and
334
- `VCM_API_URL`.
335
- 8. Bootstrap terminal output is shown in the VCM UI. Session metadata is stored
336
- in `.ai/vcm/bootstrap/session.json`; terminal output is logged to
337
- `.ai/vcm/bootstrap/bootstrap.log`.
338
- 9. User refreshes harness status after the bootstrap session finishes. The
339
- bootstrap is complete only when all checks are `ok`.
340
-
341
- The bootstrap terminal is deliberately visible and resumable. If the terminal
342
- process disappears before the files are complete, VCM should report the previous
343
- session as resumable and allow the user to start bootstrap again or finish the
344
- remaining files manually.
345
-
346
- ## 11. Runtime Cleanup
347
-
348
- Runtime files under `.ai/vcm/**` are not manifest entries. They are deleted
349
- during task cleanup after useful facts are promoted.
350
-
351
- Task records live outside connected repos:
352
-
353
- ```text
354
- <vcmDataDir>/projects/<project-id>/tasks/<task-slug>.json
355
- ```
356
-
357
- Routine completed task plans should not be archived under
358
- `docs/plans/completed/`. Durable facts should move into durable docs, code,
359
- tests, PR text, or commit history; temporary task files should be deleted.
360
-
361
- ## 12. Harness Implementation Phases
362
-
363
- Phase 1: Deterministic skeleton
364
-
365
- - install/update managed VCM blocks
366
- - install four role agents
367
- - install four VCM skills
368
- - install `.ai/tools/` scripts
369
- - create `.ai/generated/`
370
- - create `.ai/vcm-harness-manifest.json`
371
- - create/update `.github/pull_request_template.md`
372
- - do not write project-specific generated context or durable doc content
373
-
374
- Phase 2: Rust generated context
375
-
376
- - implement or refine `generate-module-index`
377
- - implement or refine `generate-public-surface`
378
- - generate `.ai/generated/module-index.json`
379
- - generate `.ai/generated/public-surface.json`
380
- - support `--check` freshness mode
381
- - treat non-Rust generated context as unsupported until project-specific
382
- generators are added
383
-
384
- Phase 3: AI-assisted project docs
385
-
386
- - use `vcm-harness-bootstrap`
387
- - create or refresh project-owned durable docs
388
- - mark unknowns and needs-human-confirmation
389
-
390
- Phase 4: Cleanup and acceptance
391
-
392
- - keep temporary docs deleted and durable docs updated
393
- - verify generated context freshness when relevant
394
- - report any deterministic VCM upgrade needs as implementation follow-up
395
-
396
- ## 13. Full Harness Acceptance
397
-
398
- Full harness initialization is acceptable when:
399
-
400
- - manifest records only harness-managed entries
401
- - project durable docs are not manifest entries
402
- - `.ai/vcm/**` runtime files are not manifest entries
403
- - generated context has real generator tools
404
- - no fixed `check-*` wrapper is installed by default
405
- - no `test-map.json` is installed by default
406
- - no `.claude/commands/`, optional agents, role-commands, or repo-local task
407
- records are installed by default
408
- - `example/rust-layered` and generated templates agree on the same baseline