vibe-coding-master 0.3.26 → 0.3.28
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 +33 -29
- package/dist/backend/api/codex-hook-routes.js +0 -7
- package/dist/backend/api/gate-review-routes.js +58 -0
- package/dist/backend/api/task-routes.js +2 -2
- package/dist/backend/cli/install-vcm-harness.js +15 -57
- package/dist/backend/server.js +6 -8
- package/dist/backend/services/app-settings-service.js +15 -15
- package/dist/backend/services/codex-hook-service.js +8 -50
- package/dist/backend/services/{codex-review-service.js → gate-review-service.js} +108 -108
- package/dist/backend/services/harness-service.js +15 -63
- package/dist/backend/services/session-service.js +257 -41
- package/dist/backend/services/task-service.js +2 -2
- package/dist/backend/templates/harness/claude-root.js +2 -2
- package/dist/backend/templates/harness/{codex-review.js → gate-review.js} +35 -278
- package/dist/backend/templates/harness/project-manager-agent.js +7 -7
- package/dist/backend/templates/harness/vcm-final-acceptance-skill.js +5 -5
- package/dist/shared/constants.js +8 -5
- package/dist/shared/types/{codex-review.js → gate-review.js} +1 -1
- package/dist-frontend/assets/{index-CKWy15WL.js → index-x9I-bGUt.js} +37 -37
- package/dist-frontend/index.html +1 -1
- package/docs/codex-translation-plan.md +83 -136
- package/docs/full-harness-baseline.md +113 -207
- package/docs/gate-review-gates.md +133 -0
- package/docs/gateway-design.md +6 -8
- package/docs/product-design.md +66 -38
- package/docs/v0.2-implementation-plan.md +4 -0
- package/docs/vcm-cc-best-practices.md +36 -33
- package/package.json +1 -1
- package/scripts/verify-package.mjs +4 -4
- package/dist/backend/api/codex-review-routes.js +0 -58
- package/docs/codex-review-gates.md +0 -593
|
@@ -1,259 +1,165 @@
|
|
|
1
1
|
# Full Harness Baseline
|
|
2
2
|
|
|
3
|
-
Last updated: 2026-06-
|
|
3
|
+
Last updated: 2026-06-21
|
|
4
4
|
|
|
5
|
-
Status:
|
|
5
|
+
Status: Current implementation reference.
|
|
6
6
|
|
|
7
|
-
This file tracks the
|
|
8
|
-
`
|
|
9
|
-
`
|
|
7
|
+
This file tracks the VCM fixed harness currently installed by
|
|
8
|
+
`src/backend/services/harness-service.ts` and
|
|
9
|
+
`src/backend/cli/install-vcm-harness.ts`.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
`docs/vcm-cc-best-practices.md` and delete this file.
|
|
11
|
+
## Principles
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
VCM separates three file classes:
|
|
15
14
|
|
|
16
|
-
VCM
|
|
15
|
+
- Harness-managed files: VCM installs, upgrades, repairs, and can overwrite
|
|
16
|
+
inside managed blocks or whole-file templates.
|
|
17
|
+
- Project-owned durable docs: VCM may create starter docs, but project roles own
|
|
18
|
+
their content afterward.
|
|
19
|
+
- Runtime state: VCM writes these during task execution and cleanup removes them
|
|
20
|
+
when the task is closed.
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
they become project truth and are not VCM-owned harness.
|
|
22
|
-
- Runtime state: VCM writes these during task execution and deletes them during
|
|
23
|
-
task cleanup. Runtime files are not manifest entries.
|
|
22
|
+
The current implementation no longer uses `.ai/vcm-harness-manifest.json`.
|
|
23
|
+
Harness ownership is defined by the deterministic installer and by managed
|
|
24
|
+
markers such as `<!-- VCM:BEGIN version=1 -->`.
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
VCM-managed rules, agents, skills, settings merges, harness tools, generated
|
|
27
|
-
context artifacts, PR template managed blocks, marker metadata, JSON ownership,
|
|
28
|
-
lifecycle labels, runtime roots, and uninstall actions.
|
|
26
|
+
## Fixed Harness Files
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
`docs/ARCHITECTURE.md`, `docs/TESTING.md`, `docs/known-issues.md`,
|
|
32
|
-
`docs/plans/`, or module-level `ARCHITECTURE.md` files as managed entries. It
|
|
33
|
-
should not list `.ai/vcm/**` runtime files as managed entries either.
|
|
34
|
-
|
|
35
|
-
## Install And Bootstrap Flow
|
|
36
|
-
|
|
37
|
-
VCM 0.2 uses a two-stage harness setup:
|
|
38
|
-
|
|
39
|
-
1. Fixed install: VCM runs the deterministic fixed installer. This creates or
|
|
40
|
-
updates VCM-owned managed blocks, whole-file skills, role agents, settings
|
|
41
|
-
hooks, harness tools, generated-context directories, the PR template, and
|
|
42
|
-
`.ai/vcm-harness-manifest.json`.
|
|
43
|
-
2. AI bootstrap: VCM starts a temporary Claude Code terminal in the repository
|
|
44
|
-
root and instructs it to use `vcm-harness-bootstrap`. This fills
|
|
45
|
-
project-owned content and generated artifacts.
|
|
46
|
-
|
|
47
|
-
The fixed install does not copy example project content. It may create blank
|
|
48
|
-
durable doc templates when missing, but project-specific facts are added only by
|
|
49
|
-
bootstrap or by later role work.
|
|
50
|
-
|
|
51
|
-
Bootstrap should produce or refresh:
|
|
28
|
+
Managed-block files:
|
|
52
29
|
|
|
53
30
|
```text
|
|
54
|
-
CLAUDE.md
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
.
|
|
59
|
-
.
|
|
31
|
+
CLAUDE.md
|
|
32
|
+
.gitignore
|
|
33
|
+
.github/pull_request_template.md
|
|
34
|
+
.claude/agents/project-manager.md
|
|
35
|
+
.claude/agents/architect.md
|
|
36
|
+
.claude/agents/coder.md
|
|
37
|
+
.claude/agents/reviewer.md
|
|
38
|
+
.claude/agents/gate-reviewer.md
|
|
39
|
+
.ai/codex-translator/AGENTS.md
|
|
60
40
|
```
|
|
61
41
|
|
|
62
|
-
|
|
42
|
+
Whole-file or raw-file harness files:
|
|
63
43
|
|
|
64
44
|
```text
|
|
65
|
-
.
|
|
66
|
-
.
|
|
45
|
+
.claude/skills/vcm-route-message/SKILL.md
|
|
46
|
+
.claude/skills/vcm-final-acceptance/SKILL.md
|
|
47
|
+
.claude/skills/vcm-long-running-validation/SKILL.md
|
|
48
|
+
.claude/skills/vcm-harness-bootstrap/SKILL.md
|
|
49
|
+
.claude/skills/vcm-gate-review/SKILL.md
|
|
50
|
+
.ai/codex-translator/config.toml
|
|
51
|
+
.ai/codex-translator/.codex/config.toml
|
|
52
|
+
.ai/codex-translator/.codex/hooks.json
|
|
53
|
+
.ai/tools/generate-module-index
|
|
54
|
+
.ai/tools/generate-public-surface
|
|
55
|
+
.ai/tools/request-gate-review
|
|
56
|
+
.ai/tools/run-long-check
|
|
57
|
+
.ai/tools/watch-job
|
|
58
|
+
.ai/tools/vcm-bash-guard
|
|
67
59
|
```
|
|
68
60
|
|
|
69
|
-
|
|
70
|
-
the generated artifacts and durable docs are complete.
|
|
71
|
-
|
|
72
|
-
## Current Manifest Entries
|
|
73
|
-
|
|
74
|
-
These entries match the current `example/rust-layered/.ai/vcm-harness-manifest.json`.
|
|
75
|
-
|
|
76
|
-
| Area | Path | Ownership | Lifecycle | Notes |
|
|
77
|
-
| --- | --- | --- | --- | --- |
|
|
78
|
-
| Manifest | `.ai/vcm-harness-manifest.json` | whole-file | Long-term | VCM harness ownership record. |
|
|
79
|
-
| Root rules | `CLAUDE.md` | managed-block | Long-term | VCM HTML marker block only; project context outside the block is project-owned. |
|
|
80
|
-
| Ignore rules | `.gitignore` | managed-block | Long-term | VCM hash-comment marker block. The example comments `.ai/vcm/` so readers can inspect runtime artifacts. |
|
|
81
|
-
| Claude settings | `.claude/settings.json` | json-merge | Long-term | VCM owns hook entries matching VCM command markers. |
|
|
82
|
-
| Agent directory | `.claude/agents/` | VCM-created directory | Long-term | Contains the four core VCM role agents. |
|
|
83
|
-
| Core agent | `.claude/agents/project-manager.md` | managed-block | Long-term | Project-manager role rules. |
|
|
84
|
-
| Core agent | `.claude/agents/architect.md` | managed-block | Long-term | Architect role rules: plan document, Scaffold Manifest, code scaffolding, Debug Mode, docs sync. |
|
|
85
|
-
| Core agent | `.claude/agents/coder.md` | managed-block | Long-term | Coder role rules: scaffold implementation, coding standards, baseline unit checks. |
|
|
86
|
-
| Core agent | `.claude/agents/reviewer.md` | managed-block | Long-term | Reviewer role rules: independent validation, TESTING.md strategy, integration/E2E case lists. |
|
|
87
|
-
| Skill directory | `.claude/skills/` | VCM-created directory | Conditional long-term | Keep while repo-local VCM skills are installed. |
|
|
88
|
-
| Skill directory | `.claude/skills/vcm-route-message/` | VCM-created directory | Conditional long-term | Claude Code registration directory for the route-message skill. |
|
|
89
|
-
| Skill directory | `.claude/skills/vcm-final-acceptance/` | VCM-created directory | Conditional long-term | Claude Code registration directory for the final-acceptance skill. |
|
|
90
|
-
| Skill directory | `.claude/skills/vcm-long-running-validation/` | VCM-created directory | Conditional long-term | Claude Code registration directory for the long-running-validation skill. |
|
|
91
|
-
| Skill directory | `.claude/skills/vcm-harness-bootstrap/` | VCM-created directory | Conditional long-term | Claude Code registration directory for the harness-bootstrap skill. |
|
|
92
|
-
| Skill | `.claude/skills/vcm-route-message/SKILL.md` | whole-file | Conditional long-term | Route-file authoring protocol. |
|
|
93
|
-
| Skill | `.claude/skills/vcm-final-acceptance/SKILL.md` | whole-file | Conditional long-term | PM final evidence audit. |
|
|
94
|
-
| Skill | `.claude/skills/vcm-long-running-validation/SKILL.md` | whole-file | Conditional long-term | Role-independent long-running command protocol: worker-enforced 60 minute ceiling, supervision lease, windowed foreground watching. |
|
|
95
|
-
| Skill | `.claude/skills/vcm-harness-bootstrap/SKILL.md` | whole-file | Conditional long-term | AI-assisted project understanding procedure. |
|
|
96
|
-
| Harness tool directory | `.ai/tools/` | VCM-created directory | Long-term | Repo-local harness tools. |
|
|
97
|
-
| Generated-context tool | `.ai/tools/generate-module-index` | whole-file | Long-term | Generates `.ai/generated/module-index.json`. |
|
|
98
|
-
| Generated-context tool | `.ai/tools/generate-public-surface` | whole-file | Long-term | Generates `.ai/generated/public-surface.json`. |
|
|
99
|
-
| Runtime tool | `.ai/tools/run-long-check` | whole-file | Conditional long-term | Starts the only VCM-allowed file-backed validation job; its worker enforces the job ceiling (max 60m) and a supervision lease, and refuses concurrent jobs. |
|
|
100
|
-
| Runtime tool | `.ai/tools/watch-job` | whole-file | Conditional long-term | Foreground watcher and lease renewer; watches in windows up to 8 minutes and exits 125 while the job still runs instead of killing it. |
|
|
101
|
-
| Runtime tool | `.ai/tools/vcm-bash-guard` | whole-file | Conditional long-term | PreToolUse hook guard; denies `run_in_background`, `nohup`, `setsid`, `disown`, and `&` background Bash in VCM role sessions. |
|
|
102
|
-
| Generated context directory | `.ai/generated/` | VCM-created directory | Long-term | Derived context artifacts. |
|
|
103
|
-
| Generated context | `.ai/generated/module-index.json` | derived artifact | Derived | Regenerated by `generate-module-index`; do not hand-edit as source truth. |
|
|
104
|
-
| Generated context | `.ai/generated/public-surface.json` | derived artifact | Derived | Regenerated by `generate-public-surface`; do not hand-edit as source truth. |
|
|
105
|
-
| PR template | `.github/pull_request_template.md` | managed-block | Long-term | VCM PR checklist block. |
|
|
106
|
-
|
|
107
|
-
Runtime roots recorded by the manifest:
|
|
61
|
+
Durable doc templates created only when missing:
|
|
108
62
|
|
|
109
63
|
```text
|
|
110
|
-
.
|
|
111
|
-
.
|
|
64
|
+
docs/ARCHITECTURE.md
|
|
65
|
+
docs/TESTING.md
|
|
66
|
+
docs/known-issues.md
|
|
112
67
|
```
|
|
113
68
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
## Project-Owned Bootstrap Outputs
|
|
117
|
-
|
|
118
|
-
The current example includes project-owned durable docs created or initialized
|
|
119
|
-
during harness bootstrap. They are important for the workflow, but they are not
|
|
120
|
-
VCM-owned harness and should not appear as manifest entries.
|
|
121
|
-
|
|
122
|
-
| Area | Path | Owner | Lifecycle | Notes |
|
|
123
|
-
| --- | --- | --- | --- | --- |
|
|
124
|
-
| Project context | `CLAUDE.md` content outside VCM block | Project | Long-term | Rust-layered project facts and constraints. |
|
|
125
|
-
| Project architecture | `docs/ARCHITECTURE.md` | Architect | Long-term | Project-level module overview, responsibilities, relationships, dependency direction, and links to module docs. |
|
|
126
|
-
| Module architecture | `<module>/ARCHITECTURE.md` | Architect | Long-term | Module-level boundaries, behavior, important public surface explanations, and risks. |
|
|
127
|
-
| Testing docs | `docs/TESTING.md` | Reviewer | Long-term | Validation levels, commands, selection rules, final-validation cleanup, integration/E2E case definitions, generated-context freshness checks, and testing gaps. |
|
|
128
|
-
| Known issues | `docs/known-issues.md` | Architect | Rolling durable doc | Confirmed unresolved issues and accepted limitations. Remove fixed, rejected, or obsolete entries. |
|
|
129
|
-
| Durable plans | `docs/plans/` | Project | Conditional long-term | Durable plans only when a large task needs them. Completed routine plans should be deleted after durable facts are promoted. |
|
|
130
|
-
|
|
131
|
-
Current `example/rust-layered` does not use these old separate docs:
|
|
69
|
+
Directory roots created by the installer:
|
|
132
70
|
|
|
133
71
|
```text
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
72
|
+
.claude/agents/
|
|
73
|
+
.claude/skills/
|
|
74
|
+
.claude/skills/vcm-final-acceptance/
|
|
75
|
+
.claude/skills/vcm-harness-bootstrap/
|
|
76
|
+
.claude/skills/vcm-long-running-validation/
|
|
77
|
+
.claude/skills/vcm-route-message/
|
|
78
|
+
.claude/skills/vcm-gate-review/
|
|
79
|
+
.ai/codex-translator/
|
|
80
|
+
.ai/codex-translator/.codex/
|
|
81
|
+
.ai/vcm/translations/
|
|
82
|
+
.ai/vcm/gate-reviews/
|
|
83
|
+
.ai/tools/
|
|
84
|
+
.ai/generated/
|
|
138
85
|
```
|
|
139
86
|
|
|
140
|
-
##
|
|
141
|
-
|
|
142
|
-
Runtime state is created while VCM manages a task. It is task-local and should be
|
|
143
|
-
deleted during task cleanup after useful facts are promoted to code, tests,
|
|
144
|
-
durable docs, PR text, or commit history.
|
|
145
|
-
|
|
146
|
-
| Area | Path | Lifecycle | Notes |
|
|
147
|
-
| --- | --- | --- | --- |
|
|
148
|
-
| Worktrees | `.claude/worktrees/<task-slug>/` | Runtime cleanup | One task worktree shared by all roles. |
|
|
149
|
-
| Handoff root | `.ai/vcm/handoffs/` | Runtime cleanup | Role artifacts and route files for the active task. |
|
|
150
|
-
| Route messages | `.ai/vcm/handoffs/messages/<from-role>-<to-role>.md` | Runtime cleanup | Pending route files written by `vcm-route-message`. |
|
|
151
|
-
| Architecture plan | `.ai/vcm/handoffs/architecture-plan.md` | Task-temporary | Architect handoff for one executable task. |
|
|
152
|
-
| Review report | `.ai/vcm/handoffs/review-report.md` | Task-temporary | Reviewer handoff for one executable task. |
|
|
153
|
-
| Docs sync report | `.ai/vcm/handoffs/docs-sync-report.md` | Task-temporary | Architect docs-sync handoff for one executable task. |
|
|
154
|
-
| Final acceptance | `.ai/vcm/handoffs/final-acceptance.md` | Task-temporary | PM final evidence-audit handoff for one executable task. |
|
|
155
|
-
| Task known issues | `.ai/vcm/handoffs/known-issues.md` | Task-temporary | Promote unresolved durable findings to `docs/known-issues.md`, then delete. |
|
|
156
|
-
| Long-running jobs | `.ai/vcm/jobs/<job-id>/` | Runtime cleanup | Status and logs from `run-long-check` / `watch-job`. |
|
|
157
|
-
| Bootstrap session | `.ai/vcm/bootstrap/session.json` | Runtime cleanup | Last harness-bootstrap terminal metadata. |
|
|
158
|
-
| Bootstrap log | `.ai/vcm/bootstrap/bootstrap.log` | Runtime cleanup | Terminal log for the harness-bootstrap session. |
|
|
159
|
-
| App-local task records | `<vcmDataDir>/projects/<project-id>/tasks/<task-slug>.json` | Runtime cleanup | VCM UI/lifecycle subtask records outside the connected repo. |
|
|
160
|
-
|
|
161
|
-
Runtime state under `.ai/vcm/**` is excluded from manifest entries. The manifest
|
|
162
|
-
records `.ai/vcm/` only as a runtime root.
|
|
163
|
-
|
|
164
|
-
## Current Skills
|
|
165
|
-
|
|
166
|
-
The current example installs these skills:
|
|
87
|
+
## Installed Skills
|
|
167
88
|
|
|
168
89
|
- `vcm-route-message`: route-file write protocol.
|
|
169
|
-
- `vcm-final-acceptance`: final
|
|
170
|
-
- `vcm-long-running-validation`:
|
|
171
|
-
- `vcm-harness-bootstrap`:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
`.ai/vcm/handoffs/docs-sync-report.md`.
|
|
90
|
+
- `vcm-final-acceptance`: PM final evidence audit.
|
|
91
|
+
- `vcm-long-running-validation`: foreground supervision protocol for long jobs.
|
|
92
|
+
- `vcm-harness-bootstrap`: AI-assisted project understanding and generated
|
|
93
|
+
context refresh.
|
|
94
|
+
- `vcm-gate-review`: PM protocol for requesting Gate Review and handling VCM
|
|
95
|
+
callbacks.
|
|
176
96
|
|
|
177
|
-
##
|
|
178
|
-
|
|
179
|
-
The current example keeps only five `.ai/tools/` files:
|
|
97
|
+
## Installed Tools
|
|
180
98
|
|
|
181
99
|
```text
|
|
182
100
|
.ai/tools/generate-module-index
|
|
183
101
|
.ai/tools/generate-public-surface
|
|
102
|
+
.ai/tools/request-gate-review
|
|
184
103
|
.ai/tools/run-long-check
|
|
185
104
|
.ai/tools/watch-job
|
|
186
105
|
.ai/tools/vcm-bash-guard
|
|
187
106
|
```
|
|
188
107
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
108
|
+
`generate-module-index` and `generate-public-surface` currently target Rust
|
|
109
|
+
projects. Non-Rust repositories can still install the fixed harness, but
|
|
110
|
+
generated context should be treated as unsupported until project-specific
|
|
111
|
+
generators exist.
|
|
112
|
+
|
|
113
|
+
## Runtime State
|
|
192
114
|
|
|
193
|
-
|
|
194
|
-
discovery wrappers:
|
|
115
|
+
Task runtime state lives in the task worktree:
|
|
195
116
|
|
|
196
117
|
```text
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
118
|
+
<taskRepoRoot>/.ai/vcm/sessions/<task>.json
|
|
119
|
+
<taskRepoRoot>/.ai/vcm/messages/<task>.jsonl
|
|
120
|
+
<taskRepoRoot>/.ai/vcm/orchestration/<task>.json
|
|
121
|
+
<taskRepoRoot>/.ai/vcm/translation/<task>/
|
|
122
|
+
<taskRepoRoot>/.ai/vcm/handoffs/
|
|
123
|
+
<taskRepoRoot>/.ai/vcm/handoffs/messages/<from-role>-<to-role>.md
|
|
124
|
+
<taskRepoRoot>/.ai/vcm/handoffs/architecture-plan.md
|
|
125
|
+
<taskRepoRoot>/.ai/vcm/handoffs/known-issues.md
|
|
126
|
+
<taskRepoRoot>/.ai/vcm/handoffs/review-report.md
|
|
127
|
+
<taskRepoRoot>/.ai/vcm/handoffs/docs-sync-report.md
|
|
128
|
+
<taskRepoRoot>/.ai/vcm/handoffs/final-acceptance.md
|
|
129
|
+
<taskRepoRoot>/.ai/vcm/jobs/<job-id>/
|
|
130
|
+
<taskRepoRoot>/.ai/vcm/gate-reviews/
|
|
207
131
|
```
|
|
208
132
|
|
|
209
|
-
|
|
210
|
-
by the responsible role. The harness does not need a fixed wrapper for every
|
|
211
|
-
validation level.
|
|
212
|
-
|
|
213
|
-
## Generated Context
|
|
214
|
-
|
|
215
|
-
The current example has two generated artifacts:
|
|
133
|
+
Project-scoped runtime state lives in the base repository:
|
|
216
134
|
|
|
217
135
|
```text
|
|
218
|
-
|
|
219
|
-
|
|
136
|
+
<baseRepoRoot>/.ai/vcm/gate-reviewer/session.json
|
|
137
|
+
<baseRepoRoot>/.ai/vcm/translations/
|
|
138
|
+
<baseRepoRoot>/.ai/vcm/bootstrap/session.json
|
|
139
|
+
<baseRepoRoot>/.ai/vcm/bootstrap/bootstrap.log
|
|
220
140
|
```
|
|
221
141
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
- `generate-module-index` reads Cargo workspace structure, auto-detects a
|
|
225
|
-
direct child `cargoRoot` when the project root has no `Cargo.toml`, and
|
|
226
|
-
filters workspace member paths that do not contain a crate.
|
|
227
|
-
- `generate-public-surface` indexes crate-external Rust `pub fn`,
|
|
228
|
-
`pub struct`, `pub enum`, and `pub trait` items, using `pub use` only to
|
|
229
|
-
resolve re-exported high-value API entries.
|
|
230
|
-
|
|
231
|
-
There is no `test-map.json`. Test files are discoverable through
|
|
232
|
-
`module-index.json` and Rust's normal Cargo test layout.
|
|
142
|
+
App-local state lives under `vcmDataDir`:
|
|
233
143
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
144
|
+
```text
|
|
145
|
+
<vcmDataDir>/settings.json
|
|
146
|
+
<vcmDataDir>/projects/index.json
|
|
147
|
+
<vcmDataDir>/projects/<project-id>/config.json
|
|
148
|
+
<vcmDataDir>/projects/<project-id>/tasks/<task>.json
|
|
149
|
+
<vcmDataDir>/gateway/
|
|
150
|
+
```
|
|
237
151
|
|
|
238
|
-
|
|
152
|
+
Ordinary VCM role sessions no longer persist raw terminal logs under
|
|
153
|
+
`.ai/vcm/handoffs/logs/`. Claude transcript JSONL files under
|
|
154
|
+
`~/.claude/projects/` remain the semantic source for output translation and
|
|
155
|
+
session recovery.
|
|
239
156
|
|
|
240
|
-
|
|
241
|
-
baseline:
|
|
157
|
+
## Cleanup
|
|
242
158
|
|
|
243
|
-
|
|
244
|
-
.
|
|
245
|
-
.
|
|
246
|
-
.ai/task-specs/
|
|
247
|
-
.ai/vcm/tasks/
|
|
248
|
-
.ai/vcm/handoffs/role-commands/
|
|
249
|
-
docs/plans/active/
|
|
250
|
-
docs/plans/completed/
|
|
251
|
-
docs/MODULE_MAP.md
|
|
252
|
-
docs/SECURITY.md
|
|
253
|
-
docs/DEPENDENCY_RULES.md
|
|
254
|
-
docs/AI_WORKFLOW.md
|
|
255
|
-
.ai/generated/test-map.json
|
|
256
|
-
```
|
|
159
|
+
Close Task removes the task-owned worktree, branch, app-local task record, and
|
|
160
|
+
task-local runtime state. It stops task-scoped VCM role sessions for that task.
|
|
161
|
+
It must not stop project-scoped Gate Reviewer or Codex Translator sessions.
|
|
257
162
|
|
|
258
|
-
|
|
259
|
-
|
|
163
|
+
Durable facts that should survive task cleanup must be promoted into code,
|
|
164
|
+
tests, durable docs, PR text, commit history, or release notes before closing
|
|
165
|
+
the task.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Gate Review Gates
|
|
2
|
+
|
|
3
|
+
This document defines VCM Gate Review Gates.
|
|
4
|
+
|
|
5
|
+
Gate Review is an optional quality layer for complex tasks. It uses a fifth
|
|
6
|
+
role, `gate-reviewer`, powered by Claude Code. The role is independent from the
|
|
7
|
+
normal PM -> architect -> coder -> reviewer workflow.
|
|
8
|
+
|
|
9
|
+
## Gates
|
|
10
|
+
|
|
11
|
+
VCM supports three gates:
|
|
12
|
+
|
|
13
|
+
- `architecture-plan`: review architect's plan before coder dispatch.
|
|
14
|
+
- `validation-adequacy`: review reviewer validation coverage before docs sync
|
|
15
|
+
or final acceptance.
|
|
16
|
+
- `final-diff`: review the final diff before PR preparation.
|
|
17
|
+
|
|
18
|
+
Each gate returns only:
|
|
19
|
+
|
|
20
|
+
- `approve`
|
|
21
|
+
- `request_changes`
|
|
22
|
+
|
|
23
|
+
Gate Reviewer does not choose owners, fixes, Replan, or user intervention. PM
|
|
24
|
+
routes follow-up by gate type.
|
|
25
|
+
|
|
26
|
+
## Ownership
|
|
27
|
+
|
|
28
|
+
VCM owns:
|
|
29
|
+
|
|
30
|
+
- global Gate Review switches in `~/.vcm/settings.json`
|
|
31
|
+
- current task gate state under `<taskRepoRoot>/.ai/vcm/gate-reviews/`
|
|
32
|
+
- starting/resuming the project-scoped Gate Reviewer Claude Code session
|
|
33
|
+
- sending the gate prompt
|
|
34
|
+
- waiting for the report
|
|
35
|
+
- marking the Gate Reviewer turn in Round state
|
|
36
|
+
- sending the callback to PM
|
|
37
|
+
|
|
38
|
+
PM owns:
|
|
39
|
+
|
|
40
|
+
- triggering `vcm-gate-review` at the three gate points
|
|
41
|
+
- stopping after a `started` or `running` result
|
|
42
|
+
- handling the VCM callback
|
|
43
|
+
- routing `request_changes` to the responsible normal VCM role
|
|
44
|
+
|
|
45
|
+
Gate Reviewer owns:
|
|
46
|
+
|
|
47
|
+
- reviewing only the requested gate
|
|
48
|
+
- writing only the assigned report
|
|
49
|
+
|
|
50
|
+
## Session Scope
|
|
51
|
+
|
|
52
|
+
Gate Reviewer is project-scoped:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
<baseRepoRoot>/.ai/vcm/gate-reviewer/session.json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The session is reusable across tasks in the same project. The gate prompt must
|
|
59
|
+
therefore name the current task and task worktree path explicitly. Prior
|
|
60
|
+
session memory can help orientation, but only current worktree evidence can
|
|
61
|
+
decide the gate.
|
|
62
|
+
|
|
63
|
+
Gate reports remain task-scoped:
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
<taskRepoRoot>/.ai/vcm/gate-reviews/
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Prompt Shape
|
|
70
|
+
|
|
71
|
+
VCM sends a short prompt:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
[VCM GATE REVIEW]
|
|
75
|
+
Task: <taskSlug>
|
|
76
|
+
Worktree: <taskRepoRoot>
|
|
77
|
+
Gate: <gate>
|
|
78
|
+
Request: <requestId>
|
|
79
|
+
Report: <absolute report path>
|
|
80
|
+
|
|
81
|
+
Evidence:
|
|
82
|
+
- <relative evidence file>
|
|
83
|
+
Diff: inspect git status/diff in Worktree.
|
|
84
|
+
|
|
85
|
+
Write only Report. Start exactly:
|
|
86
|
+
Gate: <gate>
|
|
87
|
+
Request: <requestId>
|
|
88
|
+
Decision: approve|request_changes
|
|
89
|
+
Summary: <one or two sentences>
|
|
90
|
+
[/VCM GATE REVIEW]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Detailed review rules live in `.claude/agents/gate-reviewer.md`, so the prompt
|
|
94
|
+
does not repeat role policy.
|
|
95
|
+
|
|
96
|
+
## Files
|
|
97
|
+
|
|
98
|
+
Harness-managed files:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
.claude/agents/gate-reviewer.md
|
|
102
|
+
.claude/skills/vcm-gate-review/SKILL.md
|
|
103
|
+
.ai/tools/request-gate-review
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Task runtime files:
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
.ai/vcm/gate-reviews/index.json
|
|
110
|
+
.ai/vcm/gate-reviews/architecture-plan-review.md
|
|
111
|
+
.ai/vcm/gate-reviews/validation-adequacy-review.md
|
|
112
|
+
.ai/vcm/gate-reviews/final-diff-review.md
|
|
113
|
+
.ai/vcm/gate-reviews/requests/<request-id>.json
|
|
114
|
+
.ai/vcm/gate-reviews/requests/<request-id>.prompt.md
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Flow
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
PM reaches gate
|
|
121
|
+
-> PM uses vcm-gate-review
|
|
122
|
+
-> VCM checks global gate switch and task state
|
|
123
|
+
-> VCM starts or resumes project Gate Reviewer session
|
|
124
|
+
-> VCM sends short prompt with task/worktree/report paths
|
|
125
|
+
-> VCM marks Gate Reviewer running in current Round
|
|
126
|
+
-> Gate Reviewer writes report
|
|
127
|
+
-> VCM validates report and marks Gate Reviewer idle
|
|
128
|
+
-> VCM callbacks PM
|
|
129
|
+
-> PM continues or routes follow-up
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Close Task stops task-scoped VCM role sessions only. It must not stop the
|
|
133
|
+
project-scoped Gate Reviewer session.
|
package/docs/gateway-design.md
CHANGED
|
@@ -161,9 +161,8 @@ Task lifecycle commands:
|
|
|
161
161
|
- `/create-task <task-slug> [title]` creates a task worktree,
|
|
162
162
|
selects it as the mobile current task, applies the saved launch template, and
|
|
163
163
|
starts the four role sessions (`project-manager`, `architect`, `coder`,
|
|
164
|
-
`reviewer`)
|
|
165
|
-
|
|
166
|
-
translation.
|
|
164
|
+
`reviewer`) using the saved desktop launch-template values. The saved template
|
|
165
|
+
controls permission mode, model, effort, and auto orchestration.
|
|
167
166
|
If no template has been saved, VCM uses the default launch template.
|
|
168
167
|
- `/close-task` starts a destructive confirmation flow for the current task.
|
|
169
168
|
Gateway replies with the exact confirmation command.
|
|
@@ -248,7 +247,6 @@ Rules:
|
|
|
248
247
|
-> select it as gateway current task
|
|
249
248
|
-> load saved launch template from app preferences
|
|
250
249
|
-> set orchestration from template
|
|
251
|
-
-> set gateway/desktop translation state from template
|
|
252
250
|
-> start four role sessions with template permission/model/effort
|
|
253
251
|
-> switch mobile current role to project-manager
|
|
254
252
|
-> reply with task slug, branch, worktree, template summary, and session status
|
|
@@ -585,7 +583,7 @@ Service dependencies:
|
|
|
585
583
|
- `SessionService`: PM session state, Claude session metadata, and role session
|
|
586
584
|
start for launch-template initialization.
|
|
587
585
|
- `AppSettingsService`: saved launch template with permission mode, model,
|
|
588
|
-
effort, auto orchestration,
|
|
586
|
+
effort, auto orchestration, plus the global Gateway translation preference.
|
|
589
587
|
- `MessageService` / orchestration state service: set the newly created task to
|
|
590
588
|
template auto/manual orchestration mode.
|
|
591
589
|
- `TerminalRuntime`: controlled PM terminal submission.
|
|
@@ -672,8 +670,8 @@ Validation:
|
|
|
672
670
|
`POST /api/projects/current/pull` or the equivalent project service method.
|
|
673
671
|
- Implement `/create-task <task-slug> [title]` by creating a task worktree
|
|
674
672
|
task, selecting it as mobile current task, applying the saved launch template,
|
|
675
|
-
setting orchestration mode,
|
|
676
|
-
role sessions.
|
|
673
|
+
setting orchestration mode, applying the global Gateway translation state, and
|
|
674
|
+
starting the four core role sessions.
|
|
677
675
|
- Implement `/close-task` and `/close-task confirm <task-slug>` as a two-step
|
|
678
676
|
destructive confirmation around the same Close Task cleanup path as desktop
|
|
679
677
|
VCM.
|
|
@@ -779,7 +777,7 @@ Gateway MVP is complete when:
|
|
|
779
777
|
through VCM's fast-forward-only pull path.
|
|
780
778
|
- Bound phone can run `/create-task <task-slug> [title]` to create a task
|
|
781
779
|
worktree, select it, apply the saved launch template, and start
|
|
782
|
-
the four role sessions.
|
|
780
|
+
the four core role sessions.
|
|
783
781
|
- Bound phone can send Chinese plain text to current task PM.
|
|
784
782
|
- PM receives only the translated English prompt, without original Chinese.
|
|
785
783
|
- Gateway can push PM assistant replies to Weixin whenever enabled.
|