vibe-coding-master 0.0.17 → 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.
- package/README.md +57 -28
- package/dist/backend/api/artifact-routes.js +5 -5
- package/dist/backend/api/harness-routes.js +8 -0
- package/dist/backend/server.js +8 -2
- package/dist/backend/services/artifact-service.js +12 -12
- package/dist/backend/services/harness-service.js +579 -5
- package/dist/backend/services/project-service.js +4 -1
- package/dist/backend/services/session-service.js +1 -3
- package/dist/backend/services/task-service.js +16 -17
- package/dist/backend/templates/handoff.js +64 -26
- package/dist/backend/templates/harness/architect-agent.js +42 -12
- package/dist/backend/templates/harness/claude-root.js +42 -18
- package/dist/backend/templates/harness/coder-agent.js +15 -11
- package/dist/backend/templates/harness/known-issues-doc.js +22 -0
- package/dist/backend/templates/harness/project-manager-agent.js +66 -16
- package/dist/backend/templates/harness/pull-request-template.js +29 -0
- package/dist/backend/templates/harness/reviewer-agent.js +40 -12
- package/dist/backend/templates/harness/vcm-final-acceptance-skill.js +105 -0
- package/dist/backend/templates/harness/vcm-harness-bootstrap-skill.js +78 -0
- package/dist/backend/templates/harness/vcm-long-running-validation-skill.js +50 -0
- package/dist/backend/templates/harness/vcm-route-message-skill.js +86 -0
- package/dist/backend/templates/message-envelope.js +1 -0
- package/dist/backend/templates/role-command.js +7 -1
- package/dist/shared/validation/artifact-check.js +14 -9
- package/dist-frontend/assets/index-CrY5Ryps.js +90 -0
- package/dist-frontend/assets/index-CvvtrrCN.css +32 -0
- package/dist-frontend/index.html +2 -2
- package/docs/cc-best-practices.md +433 -192
- package/docs/full-harness-baseline.md +254 -0
- package/docs/product-design.md +9 -9
- package/docs/v0.2-implementation-plan.md +379 -0
- package/docs/vcm-cc-best-practices.md +449 -0
- package/package.json +3 -1
- package/scripts/harness-tools/generate-module-index +298 -0
- package/scripts/harness-tools/generate-public-surface +692 -0
- package/scripts/install-vcm-harness.mjs +1607 -0
- package/scripts/uninstall-vcm-harness.mjs +490 -0
- package/scripts/verify-package.mjs +4 -0
- package/dist-frontend/assets/index-D40qaonx.css +0 -32
- package/dist-frontend/assets/index-DK2F4LFT.js +0 -90
- package/docs/v1-architecture-design.md +0 -1014
- package/docs/v1-implementation-plan.md +0 -1379
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
# VCM 0.2 Implementation Plan
|
|
2
|
+
|
|
3
|
+
Last updated: 2026-06-08
|
|
4
|
+
|
|
5
|
+
VCM 0.2 has two product tracks:
|
|
6
|
+
|
|
7
|
+
- Mobile gateway through Tencent iLink Bot API / Weixin DM.
|
|
8
|
+
- Full harness initialization based on the current `example/rust-layered`
|
|
9
|
+
baseline.
|
|
10
|
+
|
|
11
|
+
This document is an implementation plan, not a target-repository harness file.
|
|
12
|
+
|
|
13
|
+
## 1. Mobile Gateway Goal
|
|
14
|
+
|
|
15
|
+
VCM 0.2 should let the user monitor and lightly control VCM from mobile Weixin
|
|
16
|
+
direct messages.
|
|
17
|
+
|
|
18
|
+
The gateway is a mobile command surface, not a remote terminal. It should help
|
|
19
|
+
the user:
|
|
20
|
+
|
|
21
|
+
- check current task status
|
|
22
|
+
- see pending role messages or blockers
|
|
23
|
+
- approve or reject confirmation-gated actions
|
|
24
|
+
- send a short PM prompt
|
|
25
|
+
- receive high-value notifications
|
|
26
|
+
|
|
27
|
+
The first channel is Tencent iLink Bot API / Weixin DM.
|
|
28
|
+
|
|
29
|
+
## 2. Gateway Non-Goals
|
|
30
|
+
|
|
31
|
+
VCM 0.2 gateway should not:
|
|
32
|
+
|
|
33
|
+
- expose the full embedded terminal over Weixin
|
|
34
|
+
- promise ordinary Weixin group chat support
|
|
35
|
+
- store gateway credentials in the connected repository
|
|
36
|
+
- let unauthenticated Weixin users control VCM
|
|
37
|
+
- bypass existing backend task/session/orchestration services
|
|
38
|
+
|
|
39
|
+
## 3. Gateway Shape
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
Weixin mobile DM
|
|
43
|
+
-> Tencent iLink Bot API
|
|
44
|
+
-> VCM gateway channel: weixin-ilink
|
|
45
|
+
-> Gateway command parser
|
|
46
|
+
-> Existing VCM backend services
|
|
47
|
+
-> Gateway reply / notification
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The iLink channel should be outbound-first from the VCM process. It should
|
|
51
|
+
long-poll iLink for direct messages and send replies through the iLink send API.
|
|
52
|
+
This avoids requiring a public callback URL for the first gateway version.
|
|
53
|
+
|
|
54
|
+
Suggested backend files:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
src/backend/gateway/
|
|
58
|
+
gateway-service.ts
|
|
59
|
+
gateway-settings-service.ts
|
|
60
|
+
gateway-command-parser.ts
|
|
61
|
+
gateway-audit-log.ts
|
|
62
|
+
gateway-notifier.ts
|
|
63
|
+
channels/
|
|
64
|
+
weixin-ilink-channel.ts
|
|
65
|
+
|
|
66
|
+
src/backend/api/gateway-routes.ts
|
|
67
|
+
src/shared/types/gateway.ts
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Gateway settings and secrets must live in app-local state:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
~/.vcm/settings.json
|
|
74
|
+
~/.vcm/gateway/audit.jsonl
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Gateway credentials must never be written to a connected repository, terminal
|
|
78
|
+
log, `.ai/vcm/**`, or PR text.
|
|
79
|
+
|
|
80
|
+
## 4. Gateway Command Surface
|
|
81
|
+
|
|
82
|
+
Initial read-only commands:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
/status
|
|
86
|
+
/tasks
|
|
87
|
+
/task <id>
|
|
88
|
+
/pending
|
|
89
|
+
/help
|
|
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>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
State-changing commands require:
|
|
103
|
+
|
|
104
|
+
- authenticated allowed Weixin user
|
|
105
|
+
- command parsing into a known action
|
|
106
|
+
- confirmation when destructive or high-risk
|
|
107
|
+
- audit logging with secrets redacted
|
|
108
|
+
|
|
109
|
+
The gateway should call existing backend services instead of writing task files
|
|
110
|
+
directly. `/pm <text>` should use the same safe submit semantics used by VCM's
|
|
111
|
+
controlled session input path.
|
|
112
|
+
|
|
113
|
+
## 5. Gateway Security
|
|
114
|
+
|
|
115
|
+
Treat gateway authorization and command parsing as high-risk code.
|
|
116
|
+
|
|
117
|
+
Rules:
|
|
118
|
+
|
|
119
|
+
- allowlist Weixin users
|
|
120
|
+
- reject unknown users
|
|
121
|
+
- deduplicate inbound iLink message ids
|
|
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
|
|
126
|
+
|
|
127
|
+
## 6. Gateway Acceptance
|
|
128
|
+
|
|
129
|
+
Gateway is acceptable when:
|
|
130
|
+
|
|
131
|
+
- an allowed Weixin user can DM `/status` and receive current VCM status
|
|
132
|
+
- an unauthorized user is rejected and audited
|
|
133
|
+
- `/tasks` and `/pending` return useful summaries
|
|
134
|
+
- `/pm <text>` reaches PM through a controlled backend path
|
|
135
|
+
- restart does not replay already handled iLink messages
|
|
136
|
+
- credentials stay outside connected repos
|
|
137
|
+
- state-changing commands are audited
|
|
138
|
+
|
|
139
|
+
## 7. Full Harness Goal
|
|
140
|
+
|
|
141
|
+
Full harness initialization should create the current `example/rust-layered`
|
|
142
|
+
baseline, not the older broad `cc-best-practices.md` inventory.
|
|
143
|
+
|
|
144
|
+
The goal is a practical VCM harness:
|
|
145
|
+
|
|
146
|
+
- four core role agents
|
|
147
|
+
- concise root `CLAUDE.md` VCM block
|
|
148
|
+
- repo-local VCM skills
|
|
149
|
+
- manifest-managed harness ownership
|
|
150
|
+
- generated context tools
|
|
151
|
+
- generated context artifacts
|
|
152
|
+
- long-running command helper scripts
|
|
153
|
+
- project-owned durable docs created or initialized by bootstrap
|
|
154
|
+
- runtime state kept temporary and cleanable
|
|
155
|
+
|
|
156
|
+
## 8. Current Target Harness Shape
|
|
157
|
+
|
|
158
|
+
Fixed installer files:
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
CLAUDE.md
|
|
162
|
+
.gitignore
|
|
163
|
+
.claude/settings.json
|
|
164
|
+
.claude/agents/project-manager.md
|
|
165
|
+
.claude/agents/architect.md
|
|
166
|
+
.claude/agents/coder.md
|
|
167
|
+
.claude/agents/reviewer.md
|
|
168
|
+
.claude/skills/vcm-route-message.md
|
|
169
|
+
.claude/skills/vcm-final-acceptance.md
|
|
170
|
+
.claude/skills/vcm-long-running-validation.md
|
|
171
|
+
.claude/skills/vcm-harness-bootstrap.md
|
|
172
|
+
.ai/vcm-harness-manifest.json
|
|
173
|
+
.ai/tools/generate-module-index
|
|
174
|
+
.ai/tools/generate-public-surface
|
|
175
|
+
.ai/tools/run-long-check
|
|
176
|
+
.ai/tools/watch-job
|
|
177
|
+
.github/pull_request_template.md
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Derived bootstrap artifacts:
|
|
181
|
+
|
|
182
|
+
```text
|
|
183
|
+
.ai/generated/module-index.json
|
|
184
|
+
.ai/generated/public-surface.json
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Generated context is Rust-only for VCM 0.2. The fixed installer installs the
|
|
188
|
+
Rust `generate-module-index` and `generate-public-surface` tools, but it does
|
|
189
|
+
not generate trusted context by itself and does not promise generated-context
|
|
190
|
+
support for non-Rust projects.
|
|
191
|
+
|
|
192
|
+
Project-owned bootstrap outputs:
|
|
193
|
+
|
|
194
|
+
```text
|
|
195
|
+
docs/ARCHITECTURE.md
|
|
196
|
+
<module>/ARCHITECTURE.md
|
|
197
|
+
docs/TESTING.md
|
|
198
|
+
docs/known-issues.md
|
|
199
|
+
docs/plans/
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Runtime roots:
|
|
203
|
+
|
|
204
|
+
```text
|
|
205
|
+
.ai/vcm/
|
|
206
|
+
.claude/worktrees/
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Explicitly not part of the current target:
|
|
210
|
+
|
|
211
|
+
```text
|
|
212
|
+
.claude/commands/
|
|
213
|
+
.claude/agents/optional/
|
|
214
|
+
.ai/task-specs/
|
|
215
|
+
.ai/vcm/tasks/
|
|
216
|
+
.ai/vcm/handoffs/role-commands/
|
|
217
|
+
docs/plans/active/
|
|
218
|
+
docs/plans/completed/
|
|
219
|
+
docs/MODULE_MAP.md
|
|
220
|
+
docs/SECURITY.md
|
|
221
|
+
docs/DEPENDENCY_RULES.md
|
|
222
|
+
docs/AI_WORKFLOW.md
|
|
223
|
+
.ai/generated/test-map.json
|
|
224
|
+
.ai/tools/check-fast
|
|
225
|
+
.ai/tools/check-changed
|
|
226
|
+
.ai/tools/check-module
|
|
227
|
+
.ai/tools/check-boundaries
|
|
228
|
+
.ai/tools/check-agent-rules
|
|
229
|
+
.ai/tools/check-docs-freshness
|
|
230
|
+
.ai/tools/find-owner
|
|
231
|
+
.ai/tools/find-callers
|
|
232
|
+
.ai/tools/find-tests
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## 9. Harness Manifest
|
|
236
|
+
|
|
237
|
+
Full harness initialization writes:
|
|
238
|
+
|
|
239
|
+
```text
|
|
240
|
+
.ai/vcm-harness-manifest.json
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
The manifest records harness ownership only. It should include:
|
|
244
|
+
|
|
245
|
+
- VCM-managed files and directories
|
|
246
|
+
- marker type and marker boundaries
|
|
247
|
+
- JSON merge ownership
|
|
248
|
+
- VCM agents and skills
|
|
249
|
+
- harness tools
|
|
250
|
+
- derived generated artifacts
|
|
251
|
+
- runtime roots
|
|
252
|
+
- lifecycle labels
|
|
253
|
+
- uninstall actions
|
|
254
|
+
|
|
255
|
+
It should not include:
|
|
256
|
+
|
|
257
|
+
- project-owned durable docs
|
|
258
|
+
- module-level `ARCHITECTURE.md`
|
|
259
|
+
- `.ai/vcm/**` runtime files
|
|
260
|
+
- `.claude/worktrees/**`
|
|
261
|
+
- `.gitkeep`
|
|
262
|
+
|
|
263
|
+
## 10. AI-Assisted Bootstrap
|
|
264
|
+
|
|
265
|
+
The deterministic installer owns:
|
|
266
|
+
|
|
267
|
+
- managed block writes
|
|
268
|
+
- `.claude/settings.json` merge
|
|
269
|
+
- manifest creation and migration
|
|
270
|
+
- skill and agent file installation
|
|
271
|
+
- tool file installation
|
|
272
|
+
- generated directory creation
|
|
273
|
+
- uninstall behavior
|
|
274
|
+
|
|
275
|
+
The `vcm-harness-bootstrap` skill owns AI-assisted project understanding. It may
|
|
276
|
+
draft or refresh:
|
|
277
|
+
|
|
278
|
+
- `CLAUDE.md` project context outside the VCM managed block
|
|
279
|
+
- `docs/ARCHITECTURE.md`
|
|
280
|
+
- module-level `ARCHITECTURE.md`
|
|
281
|
+
- `docs/TESTING.md`
|
|
282
|
+
- `docs/known-issues.md`
|
|
283
|
+
- `.ai/generated/module-index.json`
|
|
284
|
+
- `.ai/generated/public-surface.json`
|
|
285
|
+
|
|
286
|
+
It must not edit product source, product tests, package manifests, lockfiles,
|
|
287
|
+
deployment config, or secrets. It must not create new validation wrapper tools
|
|
288
|
+
during bootstrap.
|
|
289
|
+
|
|
290
|
+
VCM UI startup flow:
|
|
291
|
+
|
|
292
|
+
1. User connects a repository.
|
|
293
|
+
2. User runs fixed harness install/update from the VCM Harness panel.
|
|
294
|
+
3. Backend runs `scripts/install-vcm-harness.mjs <repo-root>` and records the
|
|
295
|
+
deterministic result in the UI.
|
|
296
|
+
4. Backend recomputes bootstrap checks: fixed harness, `CLAUDE.md` project
|
|
297
|
+
context, generated context, project architecture doc, module architecture
|
|
298
|
+
docs, and testing doc.
|
|
299
|
+
5. User starts harness bootstrap from the UI when fixed harness is ready.
|
|
300
|
+
6. Backend starts one temporary Claude Code terminal in the repository root,
|
|
301
|
+
without a role agent, and sends a prompt requiring use of the
|
|
302
|
+
`vcm-harness-bootstrap` skill.
|
|
303
|
+
7. Backend passes bootstrap environment variables:
|
|
304
|
+
`VCM_TASK_REPO_ROOT`, `VCM_HARNESS_BOOTSTRAP=1`, `VCM_SESSION_ID`, and
|
|
305
|
+
`VCM_API_URL`.
|
|
306
|
+
8. Bootstrap terminal output is shown in the VCM UI. Session metadata is stored
|
|
307
|
+
in `.ai/vcm/bootstrap/session.json`; terminal output is logged to
|
|
308
|
+
`.ai/vcm/bootstrap/bootstrap.log`.
|
|
309
|
+
9. User refreshes harness status after the bootstrap session finishes. The
|
|
310
|
+
bootstrap is complete only when all checks are `ok`.
|
|
311
|
+
|
|
312
|
+
The bootstrap terminal is deliberately visible and resumable. If the terminal
|
|
313
|
+
process disappears before the files are complete, VCM should report the previous
|
|
314
|
+
session as resumable and allow the user to start bootstrap again or finish the
|
|
315
|
+
remaining files manually.
|
|
316
|
+
|
|
317
|
+
## 11. Runtime Cleanup
|
|
318
|
+
|
|
319
|
+
Runtime files under `.ai/vcm/**` are not manifest entries. They are deleted
|
|
320
|
+
during task cleanup after useful facts are promoted.
|
|
321
|
+
|
|
322
|
+
Task records live outside connected repos:
|
|
323
|
+
|
|
324
|
+
```text
|
|
325
|
+
~/.vcm/projects/<project-id>/tasks/<task-slug>.json
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Routine completed task plans should not be archived under
|
|
329
|
+
`docs/plans/completed/`. Durable facts should move into durable docs, code,
|
|
330
|
+
tests, PR text, or commit history; temporary task files should be deleted.
|
|
331
|
+
|
|
332
|
+
## 12. Harness Implementation Phases
|
|
333
|
+
|
|
334
|
+
Phase 1: Deterministic skeleton
|
|
335
|
+
|
|
336
|
+
- install/update managed VCM blocks
|
|
337
|
+
- install four role agents
|
|
338
|
+
- install four VCM skills
|
|
339
|
+
- install `.ai/tools/` scripts
|
|
340
|
+
- create `.ai/generated/`
|
|
341
|
+
- create `.ai/vcm-harness-manifest.json`
|
|
342
|
+
- create/update `.github/pull_request_template.md`
|
|
343
|
+
- do not write project-specific generated context or durable doc content
|
|
344
|
+
|
|
345
|
+
Phase 2: Rust generated context
|
|
346
|
+
|
|
347
|
+
- implement or refine `generate-module-index`
|
|
348
|
+
- implement or refine `generate-public-surface`
|
|
349
|
+
- generate `.ai/generated/module-index.json`
|
|
350
|
+
- generate `.ai/generated/public-surface.json`
|
|
351
|
+
- support `--check` freshness mode
|
|
352
|
+
- treat non-Rust generated context as unsupported until project-specific
|
|
353
|
+
generators are added
|
|
354
|
+
|
|
355
|
+
Phase 3: AI-assisted project docs
|
|
356
|
+
|
|
357
|
+
- use `vcm-harness-bootstrap`
|
|
358
|
+
- create or refresh project-owned durable docs
|
|
359
|
+
- mark unknowns and needs-human-confirmation
|
|
360
|
+
|
|
361
|
+
Phase 4: Cleanup and acceptance
|
|
362
|
+
|
|
363
|
+
- keep temporary docs deleted and durable docs updated
|
|
364
|
+
- verify generated context freshness when relevant
|
|
365
|
+
- report any deterministic VCM upgrade needs as implementation follow-up
|
|
366
|
+
|
|
367
|
+
## 13. Full Harness Acceptance
|
|
368
|
+
|
|
369
|
+
Full harness initialization is acceptable when:
|
|
370
|
+
|
|
371
|
+
- manifest records only harness-managed entries
|
|
372
|
+
- project durable docs are not manifest entries
|
|
373
|
+
- `.ai/vcm/**` runtime files are not manifest entries
|
|
374
|
+
- generated context has real generator tools
|
|
375
|
+
- no fixed `check-*` wrapper is installed by default
|
|
376
|
+
- no `test-map.json` is installed by default
|
|
377
|
+
- no `.claude/commands/`, optional agents, role-commands, or repo-local task
|
|
378
|
+
records are installed by default
|
|
379
|
+
- `example/rust-layered` and generated templates agree on the same baseline
|