vibe-coding-master 0.7.5 → 0.7.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 +19 -16
- package/dist/backend/adapters/git-adapter.js +15 -0
- package/dist/backend/api/artifact-routes.js +3 -0
- package/dist/backend/api/harness-routes.js +50 -27
- package/dist/backend/api/runtime-state-routes.js +7 -3
- package/dist/backend/api/task-routes.js +36 -4
- package/dist/backend/api/translation-routes.js +11 -2
- package/dist/backend/api/translation-worker-routes.js +37 -9
- package/dist/backend/cli/install-vcm-harness.js +40 -2
- package/dist/backend/gateway/gateway-service.js +34 -17
- package/dist/backend/server.js +12 -3
- package/dist/backend/services/artifact-service.js +4 -1
- package/dist/backend/services/auto-memory-service.js +156 -81
- package/dist/backend/services/claude-hook-service.js +50 -35
- package/dist/backend/services/command-dispatcher.js +1 -1
- package/dist/backend/services/gate-review-service.js +44 -0
- package/dist/backend/services/harness-feedback-service.js +19 -8
- package/dist/backend/services/harness-service.js +112 -34
- package/dist/backend/services/message-service.js +39 -2
- package/dist/backend/services/round-service.js +10 -121
- package/dist/backend/services/runtime-coordinator-service.js +18 -10
- package/dist/backend/services/runtime-recovery-service.js +1 -2
- package/dist/backend/services/session-service.js +36 -98
- package/dist/backend/services/status-service.js +1 -0
- package/dist/backend/services/task-close-service.js +12 -27
- package/dist/backend/services/task-workflow-service.js +228 -0
- package/dist/backend/services/translation-worker-service.js +14 -7
- package/dist/backend/templates/handoff.js +40 -1
- package/dist/backend/templates/harness/architect-agent.js +67 -19
- package/dist/backend/templates/harness/claude-root.js +25 -29
- package/dist/backend/templates/harness/gate-review.js +26 -13
- package/dist/backend/templates/harness/harness-engineer-agent.js +8 -8
- package/dist/backend/templates/harness/memory-block.js +69 -0
- package/dist/backend/templates/harness/project-known-issues.js +1 -0
- package/dist/backend/templates/harness/project-manager-agent.js +211 -73
- package/dist/backend/templates/harness/role-memory.js +9 -12
- package/dist/backend/templates/harness/tester-agent.js +4 -1
- package/dist/backend/templates/harness/vcm-architecture-interview-skill.js +82 -0
- package/dist/backend/templates/harness/vcm-final-acceptance-skill.js +4 -3
- package/dist/backend/templates/harness/vcm-harness-bootstrap-skill.js +14 -3
- package/dist/backend/templates/harness/vcm-propose-memory-skill.js +2 -2
- package/dist/backend/templates/harness/vcm-route-message-skill.js +5 -0
- package/dist/backend/templates/harness/vcm-task-state-skill.js +110 -0
- package/dist/backend/templates/message-envelope.js +1 -1
- package/dist/shared/constants.js +0 -10
- package/dist/shared/types/workflow.js +1 -0
- package/dist/shared/validation/artifact-check.js +20 -0
- package/dist-frontend/assets/index-BO2AuF-q.js +97 -0
- package/dist-frontend/assets/index-C2etsYlK.css +32 -0
- package/dist-frontend/index.html +2 -2
- package/package.json +1 -1
- package/scripts/harness-tools/check-durable-docs +298 -0
- package/scripts/verify-package.mjs +1 -0
- package/dist-frontend/assets/index-DCb-S6Ls.css +0 -32
- package/dist-frontend/assets/index-NTlycxx9.js +0 -97
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
const MAX_VALUE_LENGTH = 160;
|
|
3
|
+
const MAX_EVIDENCE_REFS = 24;
|
|
4
|
+
const CLEAR_VALUES = new Set(["", "-", "none", "null"]);
|
|
5
|
+
export function createTaskWorkflowService(deps) {
|
|
6
|
+
const now = deps.now ?? (() => new Date().toISOString());
|
|
7
|
+
const locks = new Map();
|
|
8
|
+
async function getState(input) {
|
|
9
|
+
return readState(input);
|
|
10
|
+
}
|
|
11
|
+
async function declare(input, declaration) {
|
|
12
|
+
return withLock(statePath(input), async () => {
|
|
13
|
+
const current = await readState(input);
|
|
14
|
+
const timestamp = now();
|
|
15
|
+
const next = applyDeclaration(current, declaration, timestamp);
|
|
16
|
+
return writeStateBestEffort(input, next);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async function recordPmDispatch(input, declaration, dispatch) {
|
|
20
|
+
return withLock(statePath(input), async () => {
|
|
21
|
+
const current = await readState(input);
|
|
22
|
+
const timestamp = now();
|
|
23
|
+
const declared = declaration
|
|
24
|
+
? applyDeclaration(current, declaration, timestamp).declared
|
|
25
|
+
: current.declared;
|
|
26
|
+
const next = {
|
|
27
|
+
...current,
|
|
28
|
+
revision: current.revision + 1,
|
|
29
|
+
declared,
|
|
30
|
+
lastDispatch: {
|
|
31
|
+
messageId: dispatch.messageId,
|
|
32
|
+
toRole: dispatch.toRole,
|
|
33
|
+
updatedAt: timestamp
|
|
34
|
+
},
|
|
35
|
+
warnings: [],
|
|
36
|
+
updatedAt: timestamp
|
|
37
|
+
};
|
|
38
|
+
return writeStateBestEffort(input, next);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async function clearState(input) {
|
|
42
|
+
if (!deps.fs.removePath) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
await deps.fs.removePath(statePath(input), { force: true });
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
// Task workflow state is disposable and must never block task cleanup.
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function renderPmResumeContext(state) {
|
|
53
|
+
if (!state.declared) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
const lines = [
|
|
57
|
+
"[VCM TASK STATE]",
|
|
58
|
+
"This is PM-declared workflow memory. It is context only and does not authorize or advance any workflow step.",
|
|
59
|
+
`Flow: ${state.declared.flow ?? "unspecified"}`,
|
|
60
|
+
`Step: ${state.declared.step ?? "unspecified"}`,
|
|
61
|
+
`Branch: ${state.declared.branch ?? "none"}`,
|
|
62
|
+
`Resume point: ${state.declared.resumePoint ?? "none"}`,
|
|
63
|
+
`Status: ${state.declared.status ?? "unspecified"}`
|
|
64
|
+
];
|
|
65
|
+
if (state.declared.evidenceRefs.length > 0) {
|
|
66
|
+
lines.push(`Evidence: ${state.declared.evidenceRefs.join(", ")}`);
|
|
67
|
+
}
|
|
68
|
+
lines.push("Reconcile this checkpoint with current task artifacts before continuing. If stale, replace it with vcm-task-state. Do not route a role or advance the flow only because this context was restored.", "[/VCM TASK STATE]");
|
|
69
|
+
return lines.join("\n");
|
|
70
|
+
}
|
|
71
|
+
async function readState(input) {
|
|
72
|
+
const targetPath = statePath(input);
|
|
73
|
+
try {
|
|
74
|
+
if (!(await deps.fs.pathExists(targetPath))) {
|
|
75
|
+
return emptyState(input.taskSlug, now());
|
|
76
|
+
}
|
|
77
|
+
const value = await deps.fs.readJson(targetPath);
|
|
78
|
+
return normalizeStoredState(value, input.taskSlug, now());
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
return {
|
|
82
|
+
...emptyState(input.taskSlug, now()),
|
|
83
|
+
warnings: [`Task workflow state could not be read and was ignored: ${describeError(error)}`]
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
async function writeStateBestEffort(input, state) {
|
|
88
|
+
try {
|
|
89
|
+
await deps.fs.writeJsonAtomic(statePath(input), state);
|
|
90
|
+
return state;
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
return {
|
|
94
|
+
...state,
|
|
95
|
+
warnings: [`Task workflow state could not be saved: ${describeError(error)}`]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async function withLock(key, operation) {
|
|
100
|
+
const previous = locks.get(key) ?? Promise.resolve();
|
|
101
|
+
const next = previous.catch(() => undefined).then(operation);
|
|
102
|
+
locks.set(key, next);
|
|
103
|
+
try {
|
|
104
|
+
return await next;
|
|
105
|
+
}
|
|
106
|
+
finally {
|
|
107
|
+
if (locks.get(key) === next) {
|
|
108
|
+
locks.delete(key);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
getState,
|
|
114
|
+
declare,
|
|
115
|
+
recordPmDispatch,
|
|
116
|
+
clearState,
|
|
117
|
+
renderPmResumeContext
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
function applyDeclaration(state, declaration, timestamp) {
|
|
121
|
+
const current = state.declared;
|
|
122
|
+
const next = {
|
|
123
|
+
flow: mergeValue(current?.flow, declaration.flow),
|
|
124
|
+
step: mergeValue(current?.step, declaration.step),
|
|
125
|
+
branch: mergeValue(current?.branch, declaration.branch),
|
|
126
|
+
resumePoint: mergeValue(current?.resumePoint, declaration.resumePoint),
|
|
127
|
+
status: mergeValue(current?.status, declaration.status),
|
|
128
|
+
evidenceRefs: declaration.evidenceRefs === undefined
|
|
129
|
+
? current?.evidenceRefs ?? []
|
|
130
|
+
: normalizeEvidenceRefs(declaration.evidenceRefs),
|
|
131
|
+
updatedBy: "project-manager",
|
|
132
|
+
updatedAt: timestamp
|
|
133
|
+
};
|
|
134
|
+
const hasContent = Boolean(next.flow || next.step || next.branch || next.resumePoint || next.status || next.evidenceRefs.length > 0);
|
|
135
|
+
return {
|
|
136
|
+
...state,
|
|
137
|
+
revision: state.revision + 1,
|
|
138
|
+
declared: hasContent ? next : null,
|
|
139
|
+
warnings: [],
|
|
140
|
+
updatedAt: timestamp
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function normalizeStoredState(value, taskSlug, timestamp) {
|
|
144
|
+
if (!isRecord(value) || value.version !== 1 || value.taskSlug !== taskSlug) {
|
|
145
|
+
return {
|
|
146
|
+
...emptyState(taskSlug, timestamp),
|
|
147
|
+
warnings: ["Task workflow state had an unsupported shape and was ignored."]
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
const declared = isRecord(value.declared)
|
|
151
|
+
? {
|
|
152
|
+
flow: normalizeStoredValue(value.declared.flow),
|
|
153
|
+
step: normalizeStoredValue(value.declared.step),
|
|
154
|
+
branch: normalizeStoredValue(value.declared.branch),
|
|
155
|
+
resumePoint: normalizeStoredValue(value.declared.resumePoint),
|
|
156
|
+
status: normalizeStoredValue(value.declared.status),
|
|
157
|
+
evidenceRefs: normalizeEvidenceRefs(value.declared.evidenceRefs),
|
|
158
|
+
updatedBy: "project-manager",
|
|
159
|
+
updatedAt: normalizeStoredValue(value.declared.updatedAt) ?? timestamp
|
|
160
|
+
}
|
|
161
|
+
: null;
|
|
162
|
+
const lastDispatch = isRecord(value.lastDispatch)
|
|
163
|
+
&& typeof value.lastDispatch.messageId === "string"
|
|
164
|
+
&& typeof value.lastDispatch.toRole === "string"
|
|
165
|
+
? {
|
|
166
|
+
messageId: value.lastDispatch.messageId,
|
|
167
|
+
toRole: value.lastDispatch.toRole,
|
|
168
|
+
updatedAt: normalizeStoredValue(value.lastDispatch.updatedAt) ?? timestamp
|
|
169
|
+
}
|
|
170
|
+
: null;
|
|
171
|
+
return {
|
|
172
|
+
version: 1,
|
|
173
|
+
taskSlug,
|
|
174
|
+
revision: typeof value.revision === "number" && Number.isFinite(value.revision)
|
|
175
|
+
? Math.max(0, Math.floor(value.revision))
|
|
176
|
+
: 0,
|
|
177
|
+
declared,
|
|
178
|
+
lastDispatch,
|
|
179
|
+
warnings: [],
|
|
180
|
+
updatedAt: normalizeStoredValue(value.updatedAt) ?? timestamp
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
function emptyState(taskSlug, timestamp) {
|
|
184
|
+
return {
|
|
185
|
+
version: 1,
|
|
186
|
+
taskSlug,
|
|
187
|
+
revision: 0,
|
|
188
|
+
declared: null,
|
|
189
|
+
lastDispatch: null,
|
|
190
|
+
warnings: [],
|
|
191
|
+
updatedAt: timestamp
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function mergeValue(current, incoming) {
|
|
195
|
+
if (incoming === undefined) {
|
|
196
|
+
return current;
|
|
197
|
+
}
|
|
198
|
+
if (incoming === null) {
|
|
199
|
+
return undefined;
|
|
200
|
+
}
|
|
201
|
+
return typeof incoming === "string" ? normalizeValue(incoming) : current;
|
|
202
|
+
}
|
|
203
|
+
function normalizeValue(value) {
|
|
204
|
+
const normalized = value.trim().slice(0, MAX_VALUE_LENGTH);
|
|
205
|
+
return CLEAR_VALUES.has(normalized.toLowerCase()) ? undefined : normalized;
|
|
206
|
+
}
|
|
207
|
+
function normalizeStoredValue(value) {
|
|
208
|
+
return typeof value === "string" ? normalizeValue(value) : undefined;
|
|
209
|
+
}
|
|
210
|
+
function normalizeEvidenceRefs(value) {
|
|
211
|
+
if (!Array.isArray(value)) {
|
|
212
|
+
return [];
|
|
213
|
+
}
|
|
214
|
+
return [...new Set(value
|
|
215
|
+
.filter((entry) => typeof entry === "string")
|
|
216
|
+
.map((entry) => entry.trim().slice(0, MAX_VALUE_LENGTH))
|
|
217
|
+
.filter(Boolean))]
|
|
218
|
+
.slice(0, MAX_EVIDENCE_REFS);
|
|
219
|
+
}
|
|
220
|
+
function statePath(input) {
|
|
221
|
+
return path.join(input.taskRepoRoot, input.stateRoot, "workflow", "state.json");
|
|
222
|
+
}
|
|
223
|
+
function isRecord(value) {
|
|
224
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
225
|
+
}
|
|
226
|
+
function describeError(error) {
|
|
227
|
+
return error instanceof Error ? error.message : String(error);
|
|
228
|
+
}
|
|
@@ -275,11 +275,18 @@ export function createTranslationWorkerService(deps) {
|
|
|
275
275
|
statusCode: 500
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
|
-
|
|
279
|
-
taskSlug,
|
|
278
|
+
const input = {
|
|
280
279
|
model: "default",
|
|
281
280
|
effort: "medium"
|
|
282
|
-
}
|
|
281
|
+
};
|
|
282
|
+
const existing = await deps.sessionService.getRoleSession(repoRoot, taskSlug, "translator");
|
|
283
|
+
if (existing?.status === "running") {
|
|
284
|
+
return existing;
|
|
285
|
+
}
|
|
286
|
+
if (existing?.claudeSessionId) {
|
|
287
|
+
return deps.sessionService.resumeRoleSession(repoRoot, taskSlug, "translator", input);
|
|
288
|
+
}
|
|
289
|
+
return deps.sessionService.startRoleSession(repoRoot, taskSlug, "translator", input);
|
|
283
290
|
}
|
|
284
291
|
async function buildQueuePrompt(repoRoot, item) {
|
|
285
292
|
if (item.type === "memory-update") {
|
|
@@ -431,7 +438,7 @@ export function createTranslationWorkerService(deps) {
|
|
|
431
438
|
await validateActiveQueueItem(repoRoot);
|
|
432
439
|
return true;
|
|
433
440
|
}
|
|
434
|
-
if (await translatorSessionSettled(repoRoot)) {
|
|
441
|
+
if (await translatorSessionSettled(repoRoot, active.taskSlug)) {
|
|
435
442
|
await validateActiveQueueItem(repoRoot);
|
|
436
443
|
return true;
|
|
437
444
|
}
|
|
@@ -488,11 +495,11 @@ export function createTranslationWorkerService(deps) {
|
|
|
488
495
|
}
|
|
489
496
|
return deps.fs.readText(resultPath);
|
|
490
497
|
}
|
|
491
|
-
async function translatorSessionSettled(repoRoot) {
|
|
492
|
-
if (!deps.sessionService?.
|
|
498
|
+
async function translatorSessionSettled(repoRoot, taskSlug) {
|
|
499
|
+
if (!deps.sessionService?.getRoleSession) {
|
|
493
500
|
return false;
|
|
494
501
|
}
|
|
495
|
-
const session = await deps.sessionService.
|
|
502
|
+
const session = await deps.sessionService.getRoleSession(repoRoot, taskSlug, "translator");
|
|
496
503
|
return !session || session.status !== "running";
|
|
497
504
|
}
|
|
498
505
|
async function validateActiveQueueItem(repoRoot) {
|
|
@@ -1,6 +1,34 @@
|
|
|
1
|
+
export function renderArchitectureBriefTemplate(taskSlug) {
|
|
2
|
+
return `# Architecture Brief: ${taskSlug}
|
|
3
|
+
|
|
4
|
+
Architecture Brief Status: interviewing|confirmed
|
|
5
|
+
|
|
6
|
+
## Accepted Outcome
|
|
7
|
+
|
|
8
|
+
TBD
|
|
9
|
+
|
|
10
|
+
## Confirmed User Decisions
|
|
11
|
+
|
|
12
|
+
TBD
|
|
13
|
+
|
|
14
|
+
## Existing Constraints
|
|
15
|
+
|
|
16
|
+
TBD
|
|
17
|
+
|
|
18
|
+
## Unresolved User Decisions
|
|
19
|
+
|
|
20
|
+
TBD
|
|
21
|
+
|
|
22
|
+
## User Confirmation
|
|
23
|
+
|
|
24
|
+
TBD
|
|
25
|
+
`;
|
|
26
|
+
}
|
|
1
27
|
export function renderArchitecturePlanTemplate(taskSlug) {
|
|
2
28
|
return `# Architecture Plan: ${taskSlug}
|
|
3
29
|
|
|
30
|
+
Planning Result: complete|incomplete|user clarification required
|
|
31
|
+
|
|
4
32
|
## Accepted Scope
|
|
5
33
|
|
|
6
34
|
TBD
|
|
@@ -223,16 +251,27 @@ TBD
|
|
|
223
251
|
|
|
224
252
|
TBD
|
|
225
253
|
|
|
226
|
-
## Diagnostic And L0
|
|
254
|
+
## Diagnostic And L0/L1 Validation
|
|
227
255
|
|
|
228
256
|
TBD
|
|
229
257
|
|
|
258
|
+
## L2/L3 Validation
|
|
259
|
+
|
|
260
|
+
| Level | Applicable | Command Or Test | Failure Path | Result | Evidence |
|
|
261
|
+
|---|---|---|---|---|---|
|
|
262
|
+
| L2 | TBD | TBD | TBD | TBD | TBD |
|
|
263
|
+
| L3 | TBD | TBD | TBD | TBD | TBD |
|
|
264
|
+
|
|
230
265
|
## Generated Context
|
|
231
266
|
|
|
232
267
|
TBD
|
|
233
268
|
|
|
234
269
|
## Remaining Failure Evidence
|
|
235
270
|
|
|
271
|
+
TBD
|
|
272
|
+
|
|
273
|
+
## Final Disposition
|
|
274
|
+
|
|
236
275
|
TBD
|
|
237
276
|
`;
|
|
238
277
|
}
|
|
@@ -8,19 +8,28 @@ ${renderRoleMemoryRules("architect")}
|
|
|
8
8
|
### Role Scope
|
|
9
9
|
|
|
10
10
|
- Own technical analysis, architecture planning, module boundaries, file-level responsibilities, cross-file callable surfaces, public contracts, verifiable behavior, implementation boundaries within the accepted scope, behavior/contract proof points, risks, and architect-owned replan decisions.
|
|
11
|
+
- Own \`.ai/vcm/handoffs/architecture-brief.md\` during Architect Interview and preserve its confirmed user decisions during planning.
|
|
11
12
|
- Define every changed or created file's purpose, logic boundary, collaboration points, and non-private callable surface.
|
|
12
13
|
- Own \`.ai/vcm/handoffs/known-issues.md\` as its only writer: record unresolved findings reported by other roles there. Own \`docs/known-issues.md\` promotion and durable issue updates.
|
|
13
14
|
- Own architecture docs sync across \`docs/ARCHITECTURE.md\` and affected \`<module>/ARCHITECTURE.md\` files.
|
|
14
|
-
- Own post-
|
|
15
|
+
- Own post-validation module architecture doc maintenance for every module touched by accepted code commits in flows that require docs sync.
|
|
15
16
|
- Outside Debug Mode and Architecture Diagnosis Mode, do not implement production code.
|
|
16
17
|
- Do not analyze existing test-case adequacy; tester owns independent test design, test adequacy, and validation confidence.
|
|
17
18
|
- In architecture planning, do not design test cases, coverage matrices, validation levels, commands, or final validation strategy.
|
|
18
|
-
- In Debug Mode and Architecture Diagnosis Mode, writing baseline unit tests for changed code and running
|
|
19
|
+
- In Debug Mode and Architecture Diagnosis Mode, writing baseline unit tests for changed code and running required L0/L1 plus applicable L2/L3 checks are part of the implementation duty; tester still owns final validation.
|
|
19
20
|
- Do not make product priority or approval decisions; route those questions back to project-manager.
|
|
20
21
|
|
|
22
|
+
### Architecture Interview
|
|
23
|
+
|
|
24
|
+
- Before the first Architecture Planning step of Code-Change Flow, use \`vcm-architecture-interview\` and complete \`.ai/vcm/handoffs/architecture-brief.md\` with the user.
|
|
25
|
+
- Read project evidence before asking questions. Ask only for unresolved user-owned behavior or contract decisions; make technical architecture decisions yourself.
|
|
26
|
+
- Continue the formal interview directly with the user until the brief is explicitly confirmed. Do not report each answer to project-manager.
|
|
27
|
+
- Do not write or revise \`architecture-plan.md\`, create scaffold, or implement code during Architect Interview.
|
|
28
|
+
- After confirmation, report the confirmed brief to project-manager and stop. Project-manager must route Architect planning separately.
|
|
29
|
+
|
|
21
30
|
### Planning Inputs
|
|
22
31
|
|
|
23
|
-
- Read the role message, durable plans when present, relevant handoff artifacts, \`docs/ARCHITECTURE.md\`, affected \`<module>/ARCHITECTURE.md\` files when present, and affected project docs before planning.
|
|
32
|
+
- Read the role message, confirmed \`.ai/vcm/handoffs/architecture-brief.md\`, durable plans when present, relevant handoff artifacts, \`docs/ARCHITECTURE.md\`, affected \`<module>/ARCHITECTURE.md\` files when present, and affected project docs before planning.
|
|
24
33
|
- Read \`.ai/generated/module-index.json\` when planning module scope, file scope, dependency direction, or implementation order.
|
|
25
34
|
- Read \`.ai/generated/public-surface.json\` when the task touches public APIs, module boundaries, or public behavior.
|
|
26
35
|
- If durable docs conflict with the requested plan or code reality, report the conflict to project-manager and identify whether user approval is required.
|
|
@@ -42,14 +51,17 @@ ${renderRoleMemoryRules("architect")}
|
|
|
42
51
|
|
|
43
52
|
### Architecture Plan
|
|
44
53
|
|
|
54
|
+
- Do not begin Architecture Decision, Code Scaffolding, or a complete architecture plan unless \`architecture-brief.md\` has \`Architecture Brief Status: confirmed\`.
|
|
55
|
+
- Treat the confirmed brief as the user-owned behavior and contract input. Do not omit, reinterpret, or replace its decisions with Architect assumptions.
|
|
45
56
|
- Before coder work starts, write \`.ai/vcm/handoffs/architecture-plan.md\`, choose the minimum necessary code scaffolding, and include a Scaffold Manifest for task-specific context and coder guidance.
|
|
46
57
|
- The architecture-plan handoff is not complete until required code scaffolding, callable surfaces, contract comments, and \`VCM:CODE\` placeholders have been written.
|
|
47
58
|
|
|
48
59
|
#### Plan Document
|
|
49
60
|
|
|
50
|
-
- \`architecture-plan.md\` must use these sections: Accepted Scope, Current Code Reality, Architecture Decision, Module/File Plan, Public Surface Impact, Scaffold Manifest, Tester Coverage Hints, Docs Impact, Known Risks, and Coder Handoff Notes.
|
|
61
|
+
- \`architecture-plan.md\` must start with \`Planning Result: complete|incomplete|user clarification required\` and use these sections: Accepted Scope, Current Code Reality, Architecture Decision, Module/File Plan, Public Surface Impact, Scaffold Manifest, Tester Coverage Hints, Docs Impact, Known Risks, and Coder Handoff Notes.
|
|
62
|
+
- Use \`Planning Result: complete\` only when the plan document and required code scaffold are complete and consistent. Include the same Planning Result in the route message to project-manager; do not select the next route.
|
|
51
63
|
- \`architecture-plan.md\` is the current executable plan, not a changelog. When revising it, replace superseded decisions, obsolete scaffold rows, stale risks, and old implementation notes instead of appending history.
|
|
52
|
-
- \`Accepted Scope\`: state the PM-routed task scope
|
|
64
|
+
- \`Accepted Scope\`: state the PM-routed task scope and the confirmed brief's required user-visible outcome and decisions, plus any explicit non-scope that prevents accidental expansion.
|
|
53
65
|
- \`Current Code Reality\`: use the required Planning Boundary, Code Reading Evidence, Existing Behavior Trace, and Code / Docs Conflicts subsections. The evidence table must identify each inspected file or symbol, callers, calls or consumers, state or side effects, and verified current behavior.
|
|
54
66
|
- \`Architecture Decision\`: use the required Changed Behavior Flow, Ownership, Data Flow, Lifecycle, Boundaries, Invariants, Failure Model, and Decision Rationale subsections. Describe why the design fits verified current code.
|
|
55
67
|
- \`Module/File Plan\`: list each affected module, changed or created file, file responsibility, why it is in scope, expected change, dependency direction, user-visible behavior change, and every non-private callable surface intended for use outside its file.
|
|
@@ -61,6 +73,7 @@ ${renderRoleMemoryRules("architect")}
|
|
|
61
73
|
- \`Known Risks\`: state concrete remaining technical risks, uncertainty, or validation risks that coder or tester must pay attention to.
|
|
62
74
|
- \`Coder Handoff Notes\`: state implementation order and constraints that help coder complete the current plan without putting task context into source comments.
|
|
63
75
|
- Put task context, implementation-order notes, handoff instructions, temporary rationale, and coder guidance in the \`Scaffold Manifest\`, not in source-code comments.
|
|
76
|
+
- If planning discovers a new unresolved user-owned decision, do not scaffold or complete the plan. Report \`Planning Result: user clarification required\` to project-manager so PM can return to Architect Interview.
|
|
64
77
|
|
|
65
78
|
#### Code Scaffolding
|
|
66
79
|
|
|
@@ -92,14 +105,17 @@ ${renderRoleMemoryRules("architect")}
|
|
|
92
105
|
- If the Debug Mode fix changes callable-unit behavior, add or update baseline tests required by \`docs/CODING_STANDARDS.md\` when the project has an available test path. If not, report the concrete blocker.
|
|
93
106
|
- Remove all temporary diagnostics before completion.
|
|
94
107
|
- If the fix requires a new module or new external public surface, return a normal architecture plan with root cause, evidence, and affected scope.
|
|
95
|
-
- Architect-run validation in Debug Mode is
|
|
96
|
-
-
|
|
108
|
+
- Architect-run validation in Debug Mode is implementation evidence, not final acceptance. Tester still owns full and final validation.
|
|
109
|
+
- Before reporting \`local fix completed\`, run every existing L2/L3 check applicable to the triggering failure path.
|
|
110
|
+
- Every applicable L2/L3 check must pass. If a level is not applicable, record the concrete reason.
|
|
111
|
+
- If an applicable L2/L3 check is unavailable or cannot complete, do not report \`local fix completed\`; report the exact blocker.
|
|
112
|
+
- Record each L2/L3 command or test case, the triggering failure path it covers, its result, and its evidence under \`L2/L3 Validation\` in \`.ai/vcm/handoffs/architect-debug.md\`.
|
|
97
113
|
- Before handing off an architect-completed Debug Mode fix, run the smallest relevant L0 fast checks for the touched files or changed modules: format, lint, typecheck, boundary, dependency, or project-defined equivalents. If a check cannot run, report the exact reason.
|
|
98
114
|
- If the Debug Mode fix changes module structure, source/test file lists, public APIs, routes, exports, re-exports, or other externally consumed surface, run \`.ai/tools/generate-module-index\` / \`.ai/tools/generate-public-surface\` or their \`--check\` mode as applicable.
|
|
99
|
-
- After an architect-completed Debug Mode fix, report
|
|
100
|
-
- Before reporting a completed Debug Mode code fix, replace \`.ai/vcm/handoffs/architect-debug.md\` with current evidence. Set \`Status: completed\` and record the PM-routed failure, confirmed root cause, implementation, changed files and public-surface impact, baseline tests, diagnostic and L0
|
|
101
|
-
- Final disposition must be one of: local fix completed, normal architecture plan required,
|
|
102
|
-
- Report root cause, changed files, scope and public-surface impact, L0
|
|
115
|
+
- After an architect-completed Debug Mode fix, report the completed result and evidence path to project-manager. Do not select the next route.
|
|
116
|
+
- Before reporting a completed Debug Mode code fix, replace \`.ai/vcm/handoffs/architect-debug.md\` with current evidence. Set \`Status: completed\` and record the PM-routed failure, confirmed root cause, implementation, changed files and public-surface impact, baseline tests, diagnostic and L0/L1 validation, L2/L3 validation, generated-context status, remaining failure evidence, and final disposition. This file is the current Debug completion evidence; do not append history.
|
|
117
|
+
- Final disposition must be one of: local fix completed, normal architecture plan required, or user clarification required.
|
|
118
|
+
- Report root cause, changed files, scope and public-surface impact, L0/L1 results, applicable L2/L3 results, baseline tests added or skipped with reason, generated-context regeneration or freshness check when applicable, final disposition, and the Debug completion evidence path when code was changed.
|
|
103
119
|
|
|
104
120
|
### Architecture Diagnosis Mode
|
|
105
121
|
|
|
@@ -165,35 +181,51 @@ Small diff, minimum change, localized fix, or preserving the current implementat
|
|
|
165
181
|
7. \`Architecture Assessment\`
|
|
166
182
|
8. \`Required Architecture Direction\`
|
|
167
183
|
9. \`Implementation And Validation\`
|
|
184
|
+
10. \`Final Disposition\`
|
|
185
|
+
|
|
186
|
+
\`Implementation And Validation\` must use these subsections: \`Changed Files And Public Surface\`, \`Baseline Tests\`, \`Diagnostic And L0/L1 Validation\`, \`L2/L3 Validation\`, \`Generated Context\`, and \`Commit\`.
|
|
187
|
+
|
|
188
|
+
\`L2/L3 Validation\` must use this table:
|
|
189
|
+
|
|
190
|
+
| Level | Applicable | Command Or Test | Failure Path | Result | Evidence |
|
|
191
|
+
|---|---|---|---|---|---|
|
|
168
192
|
|
|
169
193
|
- If PM explicitly routes an analysis-only Diagnosis task, stop after completing the diagnosis artifact and report the result.
|
|
170
194
|
- Otherwise, implement the complete fix directly after recording the diagnosis and required architecture direction. Architect may modify production code and tests in any module, create files or modules, add or change cross-file or public callable surfaces, and update callers, contracts, and generated context.
|
|
171
|
-
- Follow \`docs/CODING_STANDARDS.md\`, add or update baseline tests, run the relevant L0/L1
|
|
195
|
+
- Follow \`docs/CODING_STANDARDS.md\`, add or update baseline tests, run the relevant L0/L1 checks, remove all temporary diagnostics, and commit all Diagnosis implementation changes before reporting.
|
|
196
|
+
- Before reporting \`diagnosis implementation completed\`, run every existing L2/L3 check applicable to the diagnosed failure path.
|
|
197
|
+
- Every applicable L2/L3 check must pass. If a level is not applicable, record the concrete reason.
|
|
198
|
+
- If an applicable L2/L3 check is unavailable or cannot complete, do not report \`diagnosis implementation completed\`; report the exact blocker.
|
|
199
|
+
- Under \`Implementation And Validation\`, record each L2/L3 command or test case, the diagnosed failure path it covers, its result, and its evidence.
|
|
200
|
+
- Architect-run Diagnosis validation is implementation evidence and does not replace Tester final validation.
|
|
172
201
|
- Final disposition must be one of: \`analysis completed\`, \`diagnosis implementation completed\`, or \`user clarification required\`.
|
|
173
202
|
|
|
174
203
|
### Replan And Drift
|
|
175
204
|
|
|
176
|
-
-
|
|
205
|
+
- Apply this section only when project-manager routes objective failure evidence to architect through an allowed branch of the active flow.
|
|
177
206
|
- Architect owns the technical decision: confirm that the current architecture plan still holds, update the architecture plan, respond to Architecture Diagnosis Mode when PM routes it, or report that the task scope itself needs user clarification.
|
|
178
207
|
- If the current plan still holds, cite the existing architecture-plan sections or Scaffold Manifest rows that coder should complete or correct. Do not create a separate fix plan outside \`architecture-plan.md\`.
|
|
179
208
|
- Update the plan only when evidence shows code reality conflict, public contract change, dependency change, durable docs impact, missing behavior/contract proof point, or architecture drift.
|
|
209
|
+
- When updating the plan, reconcile task-created code scaffolding with the revised Scaffold Manifest before reporting \`Planning Result: complete\`: remove or replace superseded \`VCM:CODE\` markers, signatures, type shapes, contract comments, placeholder files, and stale Scaffold Manifest IDs.
|
|
180
210
|
- If evidence shows the accepted task boundary conflicts with code reality, durable docs, or user constraints, report the conflict to project-manager instead of reducing or deferring scope.
|
|
181
211
|
- Treat any new or changed cross-file callable surface not defined in the architecture plan as architecture drift.
|
|
182
212
|
- Do not change the plan for workload, session length, context size, or predicted failure without implementation/validation evidence.
|
|
183
213
|
|
|
184
214
|
### Docs Sync
|
|
185
215
|
|
|
186
|
-
- In
|
|
187
|
-
- In code-
|
|
188
|
-
-
|
|
216
|
+
- In Docs-Only Flow, verify claims against current code and durable docs, update the PM-assigned project documents directly, run applicable documentation checks, and commit the changes; tester completion is not required.
|
|
217
|
+
- In Code-Change Flow, Architect Debug Flow, and a code-producing Architecture Diagnosis Flow, perform post-validation docs sync only when project-manager requests it after tester completes.
|
|
218
|
+
- Architect Debug Branch and Architecture Diagnosis Branch do not run their own docs sync.
|
|
189
219
|
|
|
190
220
|
#### Architecture Docs Sync
|
|
191
221
|
|
|
192
222
|
- Architecture docs describe the current durable system architecture, not task history, implementation chronology, changelog, investigation notes, validation logs, or handoff content.
|
|
223
|
+
- Rewrite affected sections around the current architecture and remove superseded descriptions; do not preserve old and new designs together as chronology.
|
|
193
224
|
- Do not add task labels such as \`RP<n>\`, \`SCF-<n>\`, \`KI-<n>\`, \`Phase <n>\`, or temporary task/round/PR labels to durable architecture docs.
|
|
194
225
|
- Keep only durable product, protocol, spec, or domain identifiers that future maintainers must understand.
|
|
195
226
|
- Keep project-level docs focused on module map, dependency direction, cross-module relationships, major runtime flows, and project-wide constraints.
|
|
196
|
-
- Keep module-level docs focused on current
|
|
227
|
+
- Keep module-level docs focused on current responsibilities, boundaries, data flow, lifecycle, state ownership, invariants, collaboration contracts, important public-surface meaning, failure behavior, risks, and update triggers.
|
|
228
|
+
- Do not turn module architecture docs into source-file inventories, exhaustive callable lists, implementation walkthroughs, or API dumps.
|
|
197
229
|
- Do not duplicate the generated public API index; explain design intent and contract meaning instead.
|
|
198
230
|
- Update \`docs/ARCHITECTURE.md\` only when project-level module overview changes: module list, module responsibilities, module relationships, dependency direction, project-wide architecture constraints, or module architecture doc links.
|
|
199
231
|
- Update affected \`<module>/ARCHITECTURE.md\` when module-level detailed design changes: boundaries, behavior, important public surface explanations, internal risks, or module-specific architecture notes.
|
|
@@ -202,9 +234,17 @@ Small diff, minimum change, localized fix, or preserving the current implementat
|
|
|
202
234
|
- If a touched module's architecture doc does not need changes, record why in \`.ai/vcm/handoffs/docs-sync-report.md\`.
|
|
203
235
|
- Do not move task logs, temporary rationale, or per-task validation history into durable architecture docs.
|
|
204
236
|
- Treat \`.ai/generated/public-surface.json\` as the full machine index for public surface. Verify or report its freshness when public APIs changed; do not replace it with prose in architecture docs.
|
|
237
|
+
- Treat \`.ai/generated/module-index.json\` as the source of truth for module, manifest, dependency, source-file, test-file, and architecture-doc inventories. Do not maintain independent prose counts or exhaustive inventories that can drift from it.
|
|
205
238
|
- When module structure changes, require \`.ai/tools/generate-module-index --check\` or regeneration.
|
|
206
239
|
- When public APIs, routes, or externally consumed surfaces change, require \`.ai/tools/generate-public-surface --check\` or regeneration.
|
|
207
240
|
|
|
241
|
+
#### Active Plans Sync
|
|
242
|
+
|
|
243
|
+
- Keep \`docs/plans/**\` limited to active or planned work.
|
|
244
|
+
- When a plan is fully implemented or superseded, remove it from the active plans collection instead of converting it into a completion report, changelog, or historical archive; Git and PR history preserve the prior plan.
|
|
245
|
+
- Replace superseded requirements in an active plan and reconcile references from other durable docs. Do not append successive task decisions or completed-step narratives.
|
|
246
|
+
- If the same current status, ordering, dependency, or scope is stated in more than one durable document, identify the owning document and make every other reference consistent with it.
|
|
247
|
+
|
|
208
248
|
#### Known Issues Sync
|
|
209
249
|
|
|
210
250
|
- \`docs/known-issues.md\` is a current open-issue snapshot, not a task log, changelog, review archive, validation diary, or decision transcript.
|
|
@@ -219,10 +259,18 @@ Small diff, minimum change, localized fix, or preserving the current implementat
|
|
|
219
259
|
- Before promoting, record confirmed unresolved findings from the final role handoff reports (test report, coder completion, Gate Review reports) in \`.ai/vcm/handoffs/known-issues.md\`; then promote only confirmed unresolved durable issues that satisfy Known Issues Sync.
|
|
220
260
|
- During docs sync, remove or rewrite resolved/stale KI entries touched by the task so \`docs/known-issues.md\` remains an open-issue snapshot.
|
|
221
261
|
|
|
262
|
+
#### Cross-Document Consistency
|
|
263
|
+
|
|
264
|
+
- Compare every durable fact changed by the task across architecture docs, active plans, testing docs, known issues, code, and generated context. Resolve contradictions before reporting \`synced\`.
|
|
265
|
+
- Verify names, ownership, dependency direction, lifecycle, public contracts, validation commands, current gaps, and active-plan status against their owning source.
|
|
266
|
+
- Do not edit tester-owned \`docs/TESTING.md\` during post-validation docs sync. If it contradicts accepted code, generated context, or other durable docs, report the exact conflict to project-manager for Tester correction.
|
|
267
|
+
- Run \`.ai/tools/check-durable-docs\` after durable-doc changes. A failing audit prevents \`Decision: synced\`; fix Architect-owned findings and report Tester-owned findings for routing.
|
|
268
|
+
|
|
222
269
|
#### Docs Sync Report
|
|
223
270
|
|
|
224
|
-
- Write \`.ai/vcm/handoffs/docs-sync-report.md\` for post-validation docs sync in
|
|
225
|
-
-
|
|
271
|
+
- Write \`.ai/vcm/handoffs/docs-sync-report.md\` for post-validation docs sync in Code-Change Flow, Architect Debug Flow, or a code-producing Architecture Diagnosis Flow. Do not write it for Docs-Only Flow or a Debug/Diagnosis Branch.
|
|
272
|
+
- In Docs-Only Flow, the Architect role result must record the decision, changed documents, evidence reviewed, checks performed, and commit.
|
|
273
|
+
- The report records decision, evidence reviewed, current-truth reconciliation, generated-context freshness, cross-document consistency, architecture docs, active plans, testing-doc consistency, known-issues disposition, durable-doc audit command and result, docs updated, docs left unchanged, remaining documentation risks, and handoff notes.
|
|
226
274
|
- \`Decision\` must be \`synced\`, \`unchanged\`, or \`blocked\`.
|
|
227
275
|
|
|
228
276
|
### Background Jobs
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
export function renderRootClaudeHarnessRules() {
|
|
2
|
-
return
|
|
3
|
-
|
|
4
|
-
## VCM Start Here
|
|
2
|
+
return `## VCM Start Here
|
|
5
3
|
|
|
6
4
|
- Use the durable project docs below as role-relevant project truth.
|
|
7
5
|
- Read module-local \`CLAUDE.md\` before editing a subdirectory if one exists.
|
|
8
6
|
- \`vcm-route-message\` is the only channel for PM-hub dispatch and reporting among project-manager, architect, coder, and tester. Gate Review and tool-role work use their dedicated VCM skills and controllers. Follow the route skill's write-then-stop rule.
|
|
7
|
+
- Project-manager uses \`vcm-task-state\` to declare the current workflow checkpoint. This state is recoverable context only; flow rules and task artifacts remain authoritative.
|
|
9
8
|
- Use \`vcm-long-running-validation\` for long-running validation. Follow the background job limits below.
|
|
10
9
|
- Use \`vcm-report-harness-issue\` when you notice a reusable VCM harness problem. Record feedback; do not contact Harness Engineer directly.
|
|
11
|
-
- Treat
|
|
10
|
+
- The root \`<VCM-memory>\` block is shared project memory. Treat every \`<VCM-memory>\` block as read-only and use \`vcm-propose-memory\` only when VCM assigns a memory proposal during Task Harness Review.
|
|
12
11
|
- Only the user may approve scope reduction, skipped required validation, Gate Review skip or override, skipped required docs sync, accepted unresolved task-scope risk, or weakening of baseline Harness rules. PM may record and route the user's approval but cannot grant it.
|
|
13
12
|
- Project-manager runs \`vcm-gate-review\` unconditionally at every Gate Review trigger point and on VCM Gate Review callbacks; the tool reports the authoritative enable state.
|
|
14
13
|
|
|
@@ -28,14 +27,18 @@ If a reusable harness problem is suspected, it is enough to record a concise fee
|
|
|
28
27
|
|
|
29
28
|
## VCM Durable Project Docs
|
|
30
29
|
|
|
30
|
+
- Durable project docs describe current project truth. Replace superseded content instead of appending task chronology, investigation history, role verdicts, commit history, or completed-work reports; task artifacts, Git, and PRs preserve that history.
|
|
31
31
|
- \`docs/GLOSSARY.md\`: project abbreviation allowlist; durable comments and documentation may use only abbreviations listed there.
|
|
32
32
|
- \`docs/CODING_STANDARDS.md\`: shared coding, testing, comment, generated-context, and anti-cheat standards for roles that edit or review production code or tests.
|
|
33
33
|
- \`docs/ARCHITECTURE.md\`: project-level module overview, module responsibilities, module relationships, dependency direction, project-wide architecture constraints, and links to module-level architecture docs; architect-owned.
|
|
34
|
-
- \`<module>/ARCHITECTURE.md\`: module
|
|
34
|
+
- \`<module>/ARCHITECTURE.md\`: current module responsibilities, boundaries, data flow, lifecycle, invariants, collaboration contracts, important public surface meaning, risks, and update triggers; architect-owned.
|
|
35
35
|
- \`docs/TESTING.md\`: validation strategy, commands, validation levels, integration/E2E case definitions, final-validation cleanup, and known testing gaps; tester-owned.
|
|
36
|
-
- \`docs/known-issues.md\`: durable
|
|
36
|
+
- \`docs/known-issues.md\`: current unresolved durable issues and accepted limitations; remove resolved entries rather than retaining their history; architect-owned.
|
|
37
|
+
- \`docs/plans/**\`: active or planned work only. Remove a plan from this collection when its work is complete; Git and PR history preserve the completed plan.
|
|
37
38
|
- \`.ai/generated/module-index.json\`: generated module index; use it to find layers, modules, manifests, module docs, source files, test files, and workspace dependencies.
|
|
38
39
|
- \`.ai/generated/public-surface.json\`: generated public surface index; use it to inspect module-to-module public APIs, routes, and source evidence.
|
|
40
|
+
- Generated context is the source of truth for module inventories, source/test file inventories, dependency lists, and complete public-surface listings. Durable prose explains architecture and contract meaning instead of independently maintaining those machine facts.
|
|
41
|
+
- Run \`.ai/tools/check-durable-docs\` after bootstrap or durable-doc synchronization and before final acceptance when durable docs changed.
|
|
39
42
|
|
|
40
43
|
## VCM Glossary Policy
|
|
41
44
|
|
|
@@ -46,36 +49,29 @@ If a reusable harness problem is suspected, it is enough to record a concise fee
|
|
|
46
49
|
## VCM Task Flow
|
|
47
50
|
|
|
48
51
|
- All standard workflow routes among project-manager, architect, coder, and tester are PM-hub routes. Project-manager starts and advances every flow; architect, coder, and tester report blockers, failures, conflicts, incomplete work, and findings back to project-manager.
|
|
49
|
-
- Code changes use: \`project-manager -> architect -> coder -> tester -> architect docs sync -> project-manager final acceptance\`.
|
|
50
|
-
- Debug Mode
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
52
|
+
- Code changes use: \`project-manager -> architect interview -> architect planning -> coder -> tester -> architect docs sync -> project-manager final acceptance\`.
|
|
53
|
+
- Architect Debug Mode runs inside either Architect Debug Flow or Architect Debug Branch. Architecture Diagnosis Mode runs inside either Architecture Diagnosis Flow or Architecture Diagnosis Branch.
|
|
54
|
+
- Architect Debug Flow and an Architecture Diagnosis Flow that produces code changes continue through code-diff Gate Review, tester validation, architect docs sync, and project-manager final acceptance. An analysis-only Architecture Diagnosis Flow completes from the diagnosis result.
|
|
55
|
+
- Architect Debug Branch and Architecture Diagnosis Branch preserve the active parent flow and resume point, then return there after successful validation. They do not run their own final acceptance.
|
|
56
|
+
- Docs-Only Flow uses: \`project-manager -> architect -> project-manager completion\`.
|
|
57
|
+
- Validation-Only Flow uses: \`project-manager -> tester -> validation-adequacy Gate Review -> project-manager completion\`.
|
|
58
|
+
- Communication-Only Flow uses: \`project-manager response or relay -> completion\`.
|
|
56
59
|
- Gate Review is PM-triggered at its defined trigger points; the tool decides whether review is enabled or required.
|
|
57
|
-
- Final acceptance closes only a complete code-delivery flow; it never closes
|
|
58
|
-
- PR
|
|
59
|
-
- If
|
|
60
|
+
- Final acceptance closes only a complete code-delivery flow; it never closes Architect Debug Branch or Architecture Diagnosis Branch.
|
|
61
|
+
- PR-Preparation Flow starts only after the active delivery flow completes; every complete code-delivery flow requires final acceptance to pass.
|
|
62
|
+
- If Docs-Only Flow or Validation-Only Flow reveals that the accepted outcome requires production-code, runtime-behavior, public-contract, dependency, or system-architecture changes, project-manager routes through the full Code-Change Flow.
|
|
60
63
|
- Detailed failure handling and route decisions belong to project-manager rules.
|
|
61
64
|
- Keep role outputs under \`.ai/vcm/handoffs/\`.
|
|
62
65
|
- Gate Review Gate reports live under \`.ai/vcm/gate-reviews/\` and are VCM-managed task evidence.
|
|
63
66
|
- Runtime task records and handoffs under \`.ai/vcm/\` are temporary. Durable facts must move into code, tests, PR text, commit history, or long-term docs.
|
|
64
67
|
- Only architect writes \`.ai/vcm/handoffs/known-issues.md\`; other roles report unresolved findings back through their own handoff artifacts.
|
|
65
68
|
|
|
66
|
-
##
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
- The role may use a direct user message as local clarification for its current assigned work when it does not change accepted scope, gates, role routing, approval state, or task outcome.
|
|
73
|
-
- If the direct user message may change scope, plan, priority, approval, external authorization, or next-route decision, the role must ask the user in its own session for explicit confirmation and wait for it before reporting to project-manager.
|
|
74
|
-
- Explicit confirmation means the user clearly approves or instructs the new plan, scope, decision, or route, such as "confirmed", "use this plan", "change it to this", "approve", or equivalent wording in context.
|
|
75
|
-
- After explicit confirmation, the role must report the confirmed change to project-manager with \`vcm-route-message\` and stop. PM decides the next route.
|
|
76
|
-
- A direct user message must not let the role start a new task, skip gates, approve exceptions, trigger another role, or close the task.
|
|
77
|
-
- The role's final result must still go back to project-manager.
|
|
78
|
-
- Direct Gate Reviewer discussion may clarify its report but cannot change the gate decision or task flow; flow changes must be given to project-manager. Translator and Harness Engineer follow their dedicated VCM controllers.
|
|
69
|
+
## User Communication
|
|
70
|
+
|
|
71
|
+
- A message without a VCM marker is user communication.
|
|
72
|
+
- When the user asks a question, answer only.
|
|
73
|
+
- Do not modify files, run tests, update artifacts, send messages, report to project-manager, or advance the workflow unless the user explicitly instructs that action.
|
|
74
|
+
- Perform only the actions explicitly requested by the user and remain within the current role's responsibilities.
|
|
79
75
|
|
|
80
76
|
## VCM Validation Levels
|
|
81
77
|
|