vibe-coding-master 0.7.19 → 0.7.21

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 CHANGED
@@ -9,7 +9,7 @@ VCM helps you keep one task organized across dedicated roles:
9
9
  - Architect
10
10
  - Coder
11
11
  - Tester
12
- - optional Gate Reviewer
12
+ - optional Reviewer
13
13
 
14
14
  It runs locally, connects to a local Git repository, creates a task branch and
15
15
  worktree, starts embedded Claude Code terminals, and manages handoffs,
@@ -133,7 +133,7 @@ If you want VCM app state to survive container rebuilds, set:
133
133
  7. Review the harness/bootstrap commit diff.
134
134
  8. Start the role sessions, or use the saved launch template / one-click start.
135
135
  9. Talk mostly to Project Manager.
136
- 10. Let PM route work to Architect, Coder, Tester, and Gate Reviewer when
136
+ 10. Let PM route work to Architect, Coder, Tester, and Reviewer when
137
137
  enabled.
138
138
  11. Review the final result and close the task when finished.
139
139
 
@@ -290,7 +290,7 @@ The global launch template stores per-role defaults for the five workflow roles:
290
290
  - auto orchestration
291
291
 
292
292
  One-click start launches the four core roles. If any Gate Review Gate is enabled,
293
- it also launches Gate Reviewer.
293
+ it also launches Reviewer.
294
294
 
295
295
  Translator and Harness Engineer are tool roles. They are controlled from their
296
296
  own panels, not from the main role tab bar or the one-click launch template.
@@ -331,14 +331,14 @@ Available gates:
331
331
  - Validation adequacy
332
332
  - Code diff
333
333
 
334
- When a gate is enabled, VCM uses Gate Reviewer as an independent review role.
335
- Gate Reviewer reviews artifacts and diffs, writes a gate report, and returns
334
+ When a gate is enabled, VCM uses Reviewer as an independent review role.
335
+ Reviewer reviews artifacts and diffs, writes a gate report, and returns
336
336
  only:
337
337
 
338
338
  - `approve`
339
339
  - `request_changes`
340
340
 
341
- Gate Reviewer does not run tests and does not choose owners or fixes. PM routes
341
+ Reviewer does not run tests and does not choose owners or fixes. PM routes
342
342
  findings back to the responsible role.
343
343
 
344
344
  ## Translation
@@ -405,7 +405,7 @@ Gateway can:
405
405
  - translate mobile messages when Gateway translation is enabled
406
406
 
407
407
  Gateway does not expose the embedded terminal and does not send directly to
408
- Architect, Coder, Tester, or Gate Reviewer.
408
+ Architect, Coder, Tester, or Reviewer.
409
409
 
410
410
  Common commands:
411
411
 
@@ -462,7 +462,7 @@ files.
462
462
 
463
463
  `Auto memory` is the switch for the entire automated memory workflow. During
464
464
  Review Task Harness after Final Acceptance, Project Manager, Architect, Coder,
465
- Tester, and an enabled Gate Reviewer submit proposals in sequence through
465
+ Tester, and an enabled Reviewer submit proposals in sequence through
466
466
  `vcm-propose-memory`. Harness Engineer verifies and consolidates them before VCM
467
467
  applies the result. Roles cannot edit active memory directly.
468
468
 
@@ -484,7 +484,7 @@ Final Acceptance
484
484
  ```
485
485
 
486
486
  Memory proposal prompts sent to Project Manager, Architect, Coder, Tester, and
487
- an enabled Gate Reviewer use their normal task sessions and participate in
487
+ an enabled Reviewer use their normal task sessions and participate in
488
488
  Round/Turn tracking. Harness Engineer review and retrospective work remain tool
489
489
  role activity and do not participate in Round completion.
490
490
 
@@ -8,7 +8,7 @@ import { renderArchitectHarnessRules } from "../templates/harness/architect-agen
8
8
  import { renderCoderHarnessRules } from "../templates/harness/coder-agent.js";
9
9
  import { renderCoderWorkerHarnessRules } from "../templates/harness/coder-worker-agent.js";
10
10
  import { renderArchitectScaffoldWorkerHarnessRules } from "../templates/harness/architect-scaffold-worker-agent.js";
11
- import { renderGateReviewerAgentRules, renderRequestGateReviewTool, renderTranslatorAgentRules, renderVcmGateReviewSkillRules } from "../templates/harness/gate-review.js";
11
+ import { renderReviewerAgentRules, renderRequestGateReviewTool, renderTranslatorAgentRules, renderVcmGateReviewSkillRules } from "../templates/harness/gate-review.js";
12
12
  import { renderHarnessEngineerHarnessRules } from "../templates/harness/harness-engineer-agent.js";
13
13
  import { renderRootClaudeHarnessRules } from "../templates/harness/claude-root.js";
14
14
  import { renderGitignoreHarnessRules } from "../templates/harness/gitignore.js";
@@ -34,6 +34,8 @@ const CLI_DIR = path.dirname(fileURLToPath(import.meta.url));
34
34
  const APP_ROOT = path.resolve(CLI_DIR, "../../..");
35
35
  const VCM_PACKAGE_VERSION = readVcmPackageVersion(APP_ROOT);
36
36
  const MANIFEST_PATH = ".ai/vcm-harness-manifest.json";
37
+ const LEGACY_REVIEWER_AGENT_PATH = ".claude/agents/gate-reviewer.md";
38
+ const REVIEWER_AGENT_PATH = ".claude/agents/reviewer.md";
37
39
  const HTML_BLOCK_PATTERN = /<!-- VCM:BEGIN(?:\s+version=\d+)? -->[\s\S]*?<!-- VCM:END -->/m;
38
40
  const HASH_BLOCK_PATTERN = /# VCM:BEGIN(?:\s+version=\d+)?\n[\s\S]*?# VCM:END/m;
39
41
  const LEGACY_CODEX_HARNESS_PATHS = [
@@ -71,7 +73,7 @@ const AGENT_FRONTMATTER = {
71
73
  tester: {
72
74
  description: "VCM testing role for validation, test adequacy, approved-scope validation, and risk findings."
73
75
  },
74
- "gate-reviewer": {
76
+ reviewer: {
75
77
  description: "VCM independent gate review role for architecture plans, validation adequacy, and code diffs.",
76
78
  tools: "Read, Grep, Glob, Bash, Write"
77
79
  },
@@ -171,13 +173,13 @@ const MANAGED_FILES = [
171
173
  content: renderPullRequestTemplateHarnessRules()
172
174
  },
173
175
  {
174
- path: ".claude/agents/gate-reviewer.md",
175
- title: "Gate Reviewer Agent",
176
- agentName: "gate-reviewer",
176
+ path: ".claude/agents/reviewer.md",
177
+ title: "Reviewer Agent",
178
+ agentName: "reviewer",
177
179
  commentStyle: "html",
178
- category: "gate-reviewer-agent",
180
+ category: "reviewer-agent",
179
181
  memoryBlock: true,
180
- content: renderGateReviewerAgentRules()
182
+ content: renderReviewerAgentRules()
181
183
  },
182
184
  {
183
185
  path: ".claude/agents/translator.md",
@@ -380,6 +382,7 @@ async function main() {
380
382
  const dryRun = args.dryRun;
381
383
  const operations = [];
382
384
  await assertDirectory(projectRoot, "Project root");
385
+ await migrateReviewerAgent({ projectRoot, dryRun, operations });
383
386
  const manifest = await buildManifest(projectRoot);
384
387
  for (const definition of MANAGED_FILES) {
385
388
  await installManagedFile({ projectRoot, definition, dryRun, operations });
@@ -405,6 +408,32 @@ async function main() {
405
408
  });
406
409
  printReport({ projectRoot, dryRun, operations });
407
410
  }
411
+ async function migrateReviewerAgent({ projectRoot, dryRun, operations }) {
412
+ const legacyPath = resolveInside(projectRoot, LEGACY_REVIEWER_AGENT_PATH);
413
+ const legacyContent = await readOptionalText(legacyPath);
414
+ if (legacyContent === undefined) {
415
+ return;
416
+ }
417
+ const reviewerPath = resolveInside(projectRoot, REVIEWER_AGENT_PATH);
418
+ const reviewerContent = await readOptionalText(reviewerPath);
419
+ if (dryRun) {
420
+ operations.push(plan(LEGACY_REVIEWER_AGENT_PATH, reviewerContent === undefined
421
+ ? `rename to ${REVIEWER_AGENT_PATH}`
422
+ : `delete after ${REVIEWER_AGENT_PATH} was installed`));
423
+ return;
424
+ }
425
+ if (reviewerContent === undefined) {
426
+ const migratedContent = legacyContent
427
+ .replace(/^name:[ \t]*gate-reviewer[ \t]*$/m, "name: reviewer")
428
+ .replace(/^# Gate Reviewer Agent[ \t]*$/m, "# Reviewer Agent");
429
+ await fs.mkdir(path.dirname(reviewerPath), { recursive: true });
430
+ await fs.writeFile(reviewerPath, migratedContent, "utf8");
431
+ }
432
+ await fs.rm(legacyPath, { force: true });
433
+ operations.push(done(LEGACY_REVIEWER_AGENT_PATH, reviewerContent === undefined
434
+ ? `renamed to ${REVIEWER_AGENT_PATH}`
435
+ : `deleted after ${REVIEWER_AGENT_PATH} was installed`));
436
+ }
408
437
  function parseArgs(argv) {
409
438
  const args = {
410
439
  dryRun: false,
@@ -14,7 +14,7 @@ const MEMORY_FILE_DEFINITIONS = [
14
14
  { path: ".claude/agents/architect.md", title: "Architect Memory", role: "architect" },
15
15
  { path: ".claude/agents/coder.md", title: "Coder Memory", role: "coder" },
16
16
  { path: ".claude/agents/tester.md", title: "Tester Memory", role: "tester" },
17
- { path: ".claude/agents/gate-reviewer.md", title: "Gate Reviewer Memory", role: "gate-reviewer" },
17
+ { path: ".claude/agents/reviewer.md", title: "Reviewer Memory", role: "reviewer" },
18
18
  { path: ".claude/agents/harness-engineer.md", title: "Harness Engineer Memory", role: "harness-engineer" }
19
19
  ];
20
20
  export function createAutoMemoryService(deps) {
@@ -151,7 +151,7 @@ export function createAutoMemoryService(deps) {
151
151
  const gateSettings = await deps.appSettings.getGateReviewSettings(input.baseRepoRoot, input.taskSlug);
152
152
  const roles = ["project-manager", "architect", "coder", "tester"];
153
153
  if (gateSettings.enabled) {
154
- roles.push("gate-reviewer");
154
+ roles.push("reviewer");
155
155
  }
156
156
  const timestamp = now();
157
157
  const runId = createRunId(timestamp, "auto");
@@ -1,4 +1,4 @@
1
- import { isGateReviewerRoleName, isHarnessEngineerToolRoleName, isTranslatorToolRoleName, isVcmRoleName } from "../../shared/constants.js";
1
+ import { isHarnessEngineerToolRoleName, isReviewerRoleName, isTranslatorToolRoleName, isVcmRoleName } from "../../shared/constants.js";
2
2
  import { VcmError } from "../errors.js";
3
3
  import { readTranscriptTurnEvidence } from "./claude-transcript-reply.js";
4
4
  import { submitTerminalInput } from "../runtime/terminal-submit.js";
@@ -298,7 +298,7 @@ export function createClaudeHookService(deps) {
298
298
  }
299
299
  }
300
300
  return recordTurnEnd(input, context, eventName, {
301
- dispatchRouteFiles: !isGateReviewerRoleName(input.role),
301
+ dispatchRouteFiles: !isReviewerRoleName(input.role),
302
302
  notifyGateway: true,
303
303
  settleGuard: true
304
304
  });
@@ -347,7 +347,7 @@ export function createClaudeHookService(deps) {
347
347
  if (hasCompletionEvidence) {
348
348
  await clearStopFailureRecoveryState(context, input.role);
349
349
  return recordTurnEnd(input, context, eventName, {
350
- dispatchRouteFiles: !isGateReviewerRoleName(input.role),
350
+ dispatchRouteFiles: !isReviewerRoleName(input.role),
351
351
  notifyGateway: false,
352
352
  settleGuard: true
353
353
  });
@@ -6,11 +6,11 @@ import { VcmError } from "../errors.js";
6
6
  import { resolveRepoPath } from "../adapters/filesystem.js";
7
7
  import { submitTerminalInput } from "../runtime/terminal-submit.js";
8
8
  import { getTaskRuntimeRepoRoot } from "./task-service.js";
9
- const GATE_REVIEW_AGENT_PATH = ".claude/agents/gate-reviewer.md";
9
+ const REVIEWER_AGENT_PATH = ".claude/agents/reviewer.md";
10
10
  const GATE_REVIEW_DIR = ".ai/vcm/gate-reviews";
11
11
  const REQUESTS_DIR = ".ai/vcm/gate-reviews/requests";
12
12
  const GATE_REVIEW_VERSION = 1;
13
- const GATE_REVIEWER_ROLE = "gate-reviewer";
13
+ const REVIEWER_ROLE = "reviewer";
14
14
  const DEFAULT_REPORT_POLL_INTERVAL_MS = 1000;
15
15
  const DEFAULT_REPORT_TIMEOUT_MS = 30 * 60 * 1000;
16
16
  const activeRuns = new Set();
@@ -431,7 +431,7 @@ export function createGateReviewService(deps) {
431
431
  });
432
432
  await updateRequestStatus(deps.fs, context, requestId, "running", { startedAt: timestamp });
433
433
  const reviewDir = resolveRepoPath(context.taskRepoRoot, GATE_REVIEW_DIR);
434
- const agentPath = resolveRepoPath(context.repoRoot, GATE_REVIEW_AGENT_PATH);
434
+ const agentPath = resolveRepoPath(context.repoRoot, REVIEWER_AGENT_PATH);
435
435
  const prompt = buildGatePrompt(context, gate, requestId, codeDiffInput, codeDiffSources);
436
436
  await deps.fs.ensureDir(reviewDir);
437
437
  await deps.fs.ensureDir(resolveRepoPath(context.taskRepoRoot, REQUESTS_DIR));
@@ -439,20 +439,20 @@ export function createGateReviewService(deps) {
439
439
  if (!(await deps.fs.pathExists(agentPath))) {
440
440
  throw new VcmError({
441
441
  code: "GATE_REVIEW_AGENT_MISSING",
442
- message: `${GATE_REVIEW_AGENT_PATH} does not exist.`,
442
+ message: `${REVIEWER_AGENT_PATH} does not exist.`,
443
443
  statusCode: 409,
444
444
  hint: "Apply the VCM harness before requesting Gate Review Gates."
445
445
  });
446
446
  }
447
- const session = await ensureGateReviewerSession(context);
447
+ const session = await ensureReviewerSession(context);
448
448
  await submitTerminalInput(deps.runtime, session.id, prompt);
449
- await deps.sessionService.markRoleActivityRunning(context.repoRoot, context.taskSlug, GATE_REVIEWER_ROLE, session.id);
449
+ await deps.sessionService.markRoleActivityRunning(context.repoRoot, context.taskSlug, REVIEWER_ROLE, session.id);
450
450
  await deps.roundService.recordRoleTurnEvent({
451
451
  repoRoot: context.repoRoot,
452
452
  stateRepoRoot: context.taskRepoRoot,
453
453
  stateRoot: context.stateRoot,
454
454
  taskSlug: context.taskSlug,
455
- role: GATE_REVIEWER_ROLE,
455
+ role: REVIEWER_ROLE,
456
456
  eventName: "UserPromptSubmit"
457
457
  });
458
458
  const parsed = await waitForGateReport(deps.fs, context.taskRepoRoot, gate, requestId, now(), {
@@ -501,24 +501,24 @@ export function createGateReviewService(deps) {
501
501
  activeRuns.delete(runKey);
502
502
  }
503
503
  }
504
- async function ensureGateReviewerSession(context) {
505
- const existing = await deps.sessionService.getRoleSession(context.repoRoot, context.taskSlug, GATE_REVIEWER_ROLE);
504
+ async function ensureReviewerSession(context) {
505
+ const existing = await deps.sessionService.getRoleSession(context.repoRoot, context.taskSlug, REVIEWER_ROLE);
506
506
  if (existing?.status === "running" && deps.runtime.getSession(existing.id)) {
507
507
  return existing;
508
508
  }
509
509
  if (existing?.claudeSessionId) {
510
510
  try {
511
- return await deps.sessionService.resumeRoleSession(context.repoRoot, context.taskSlug, GATE_REVIEWER_ROLE, {
511
+ return await deps.sessionService.resumeRoleSession(context.repoRoot, context.taskSlug, REVIEWER_ROLE, {
512
512
  cols: 100,
513
513
  rows: 28,
514
514
  model: "default"
515
515
  });
516
516
  }
517
517
  catch {
518
- // Fall through to a fresh Gate Reviewer terminal if the saved session cannot be resumed.
518
+ // Fall through to a fresh Reviewer terminal if the saved session cannot be resumed.
519
519
  }
520
520
  }
521
- return deps.sessionService.startRoleSession(context.repoRoot, context.taskSlug, GATE_REVIEWER_ROLE, {
521
+ return deps.sessionService.startRoleSession(context.repoRoot, context.taskSlug, REVIEWER_ROLE, {
522
522
  cols: 100,
523
523
  rows: 28,
524
524
  model: "default"
@@ -891,7 +891,7 @@ async function computeInputHash(deps, taskRepoRoot, gate, codeDiffInput, codeDif
891
891
  "CLAUDE.md",
892
892
  ".claude/agents/architect.md",
893
893
  ".claude/agents/coder.md",
894
- ".claude/agents/gate-reviewer.md",
894
+ ".claude/agents/reviewer.md",
895
895
  ".claude/agents/tester.md",
896
896
  ".claude/skills/vcm-gate-review/SKILL.md",
897
897
  ".ai/tools/request-gate-review",
@@ -1048,13 +1048,13 @@ function buildGatePrompt(context, gate, requestId, codeDiffInput, codeDiffSource
1048
1048
  ? "\nDiff: inspect git status/diff in Worktree."
1049
1049
  : "";
1050
1050
  const architectureContract = gate === "architecture-plan"
1051
- ? "\n\nComplete every Architecture Analysis field required by the Gate Reviewer role with concrete current-worktree evidence before deciding."
1051
+ ? "\n\nComplete every Architecture Analysis field required by the Reviewer role with concrete current-worktree evidence before deciding."
1052
1052
  : "";
1053
1053
  const validationContract = gate === "validation-adequacy"
1054
- ? "\n\nComplete every Validation Analysis field required by the Gate Reviewer role with concrete current-worktree production and test evidence before deciding."
1054
+ ? "\n\nComplete every Validation Analysis field required by the Reviewer role with concrete current-worktree production and test evidence before deciding."
1055
1055
  : "";
1056
1056
  const codeDiffContract = gate === "code-diff"
1057
- ? "\n\nComplete every Code Diff Analysis field required by the Gate Reviewer role with concrete evidence from the named commit range before deciding."
1057
+ ? "\n\nComplete every Code Diff Analysis field required by the Reviewer role with concrete evidence from the named commit range before deciding."
1058
1058
  : "";
1059
1059
  const codeDiffSection = gate === "code-diff" && codeDiffInput
1060
1060
  ? `
@@ -1109,7 +1109,7 @@ async function waitForGateReport(fs, taskRepoRoot, gate, requestId, timestamp, o
1109
1109
  const detail = errorMessage(lastError);
1110
1110
  throw new VcmError({
1111
1111
  code: "GATE_REVIEW_REPORT_TIMEOUT",
1112
- message: `Gate Reviewer did not produce a valid ${gate} report within ${Math.round(options.timeoutMs / 1000)}s.`,
1112
+ message: `Reviewer did not produce a valid ${gate} report within ${Math.round(options.timeoutMs / 1000)}s.`,
1113
1113
  statusCode: 504,
1114
1114
  hint: detail
1115
1115
  });
@@ -5,7 +5,7 @@ import { renderArchitectHarnessRules } from "../templates/harness/architect-agen
5
5
  import { renderCoderHarnessRules } from "../templates/harness/coder-agent.js";
6
6
  import { renderCoderWorkerHarnessRules } from "../templates/harness/coder-worker-agent.js";
7
7
  import { renderArchitectScaffoldWorkerHarnessRules } from "../templates/harness/architect-scaffold-worker-agent.js";
8
- import { renderGateReviewerAgentRules, renderRequestGateReviewTool, renderTranslatorAgentRules, renderVcmGateReviewSkillRules } from "../templates/harness/gate-review.js";
8
+ import { renderReviewerAgentRules, renderRequestGateReviewTool, renderTranslatorAgentRules, renderVcmGateReviewSkillRules } from "../templates/harness/gate-review.js";
9
9
  import { renderHarnessEngineerHarnessRules } from "../templates/harness/harness-engineer-agent.js";
10
10
  import { renderRootClaudeHarnessRules } from "../templates/harness/claude-root.js";
11
11
  import { renderGitignoreHarnessRules } from "../templates/harness/gitignore.js";
@@ -183,12 +183,12 @@ const HARNESS_FILES = [
183
183
  renderRules: renderRestartArchitectSkillRules
184
184
  },
185
185
  {
186
- kind: "agent-gate-reviewer",
187
- path: ".claude/agents/gate-reviewer.md",
188
- title: "Gate Reviewer Agent",
186
+ kind: "agent-reviewer",
187
+ path: ".claude/agents/reviewer.md",
188
+ title: "Reviewer Agent",
189
189
  memoryBlock: true,
190
- frontmatter: renderAgentFrontmatter("gate-reviewer", "VCM independent gate review role for architecture plans, validation adequacy, and code diffs.", { tools: "Read, Grep, Glob, Bash, Write" }),
191
- renderRules: renderGateReviewerAgentRules
190
+ frontmatter: renderAgentFrontmatter("reviewer", "VCM independent gate review role for architecture plans, validation adequacy, and code diffs.", { tools: "Read, Grep, Glob, Bash, Write" }),
191
+ renderRules: renderReviewerAgentRules
192
192
  },
193
193
  {
194
194
  kind: "agent-translator",
@@ -1279,7 +1279,7 @@ async function analyzeLegacyCodexHarnessPaths(fs, repoRoot) {
1279
1279
  changes.push({
1280
1280
  path: relativePath,
1281
1281
  action: "delete",
1282
- reason: "Legacy Codex harness path is obsolete; VCM now uses Claude Code Gate Reviewer and Translator roles."
1282
+ reason: "Legacy Codex harness path is obsolete; VCM now uses Claude Code Reviewer and Translator roles."
1283
1283
  });
1284
1284
  }
1285
1285
  return changes;
@@ -1,4 +1,4 @@
1
- import { CORE_VCM_ROLE_DEFINITIONS, GATE_REVIEWER_ROLE_DEFINITION, VCM_ROLE_NAMES } from "../../shared/constants.js";
1
+ import { CORE_VCM_ROLE_DEFINITIONS, REVIEWER_ROLE_DEFINITION, VCM_ROLE_NAMES } from "../../shared/constants.js";
2
2
  import { VcmError } from "../errors.js";
3
3
  import { getTaskRuntimeRepoRoot } from "./task-service.js";
4
4
  const ONE_CLICK_SESSION_COLS = 100;
@@ -25,10 +25,10 @@ export function createTaskLaunchService(deps) {
25
25
  mode
26
26
  });
27
27
  }
28
- function composeRoleDefinitions(gateReviewerEnabled) {
28
+ function composeRoleDefinitions(reviewerEnabled) {
29
29
  return [
30
30
  ...CORE_VCM_ROLE_DEFINITIONS,
31
- ...(gateReviewerEnabled ? [GATE_REVIEWER_ROLE_DEFINITION] : [])
31
+ ...(reviewerEnabled ? [REVIEWER_ROLE_DEFINITION] : [])
32
32
  ];
33
33
  }
34
34
  // Skip a running role, resume one that has a prior Claude session, otherwise
@@ -22,10 +22,11 @@ ${renderRoleMemoryRules("architect")}
22
22
  ### Architecture Interview
23
23
 
24
24
  - Before the first Architecture Planning step of Code-Change Flow, use \`vcm-architecture-interview\` and complete \`.ai/vcm/handoffs/architecture-brief.md\` and \`.ai/vcm/handoffs/architecture-evidence.md\`.
25
- - Read project evidence before asking questions. Ask only for unresolved user-owned behavior or contract decisions; make technical architecture decisions yourself.
25
+ - Read project evidence before asking questions. Ask only for unresolved user-owned behavior or contract decisions; make routine technical architecture decisions yourself.
26
+ - During the interview, draft the correctness-critical mechanisms and check their feasibility against current code and the authoritative spec or domain docs. Surface any spec or code conflict, and any correctness-, determinism-, or safety-critical mechanism choice you cannot settle from evidence, to the user for decision rather than settling it silently; record each decision's provenance in the brief (see \`vcm-architecture-interview\`).
26
27
  - 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 and evidence completion, report both artifacts to project-manager and stop. Project-manager must route Architect planning separately.
28
+ - Do not write or revise \`architecture-plan.md\`, create scaffold, or implement code before the brief is confirmed; until then, gather evidence and draft the feasibility mechanisms only. Begin planning only after confirmation, in the same turn.
29
+ - After the user confirms the brief and evidence is complete, continue directly into Architecture Planning in the same turn; do not stop for a separate planning route. Report to project-manager once the confirmed brief, complete evidence, and complete plan are all ready, so PM can run the architecture-plan Gate.
29
30
 
30
31
  ### Planning Inputs
31
32
 
@@ -75,7 +76,7 @@ ${renderRoleMemoryRules("architect")}
75
76
  - \`Current Code Reality\`: cite \`architecture-evidence.md\` and summarize only the verified facts that constrain the architecture decision. Do not duplicate the full evidence inventory. For any module whose build configuration the plan changes, the evidence artifact must quote its complete direct dependency list from the package manifest, never a summary or selection.
76
77
  - Any enumeration the plan presents as complete over the codebase — call-site inventories, module or file lists, symbol sets — must either record the deterministic, repository-local command that generates it (run at the scaffold commit, the set transcribed from its output) or be explicitly marked as judgment-derived with the evidence basis for its completeness. A complete-claimed enumeration with neither is not evidence.
77
78
  - \`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.
78
- - \`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, durable comment needs, and every non-private callable surface intended for use outside its file.
79
+ - \`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, durable comment needs, and every non-private callable surface intended for use outside its file. For every ledger item that consumes or sources cross-module data, name the module and symbol that owns or produces the data, trace the source-to-consumer path, and identify every field, parameter, accessor, trait method, command field, dependency, or other cross-file surface required by that path.
79
80
  - \`Public Surface Impact\`: state changed APIs, routes, commands, events, exports, storage formats, configuration, UI behavior, visibility changes, side effects, error boundaries, expected callers, or explicitly state none.
80
81
  - \`Scaffold Manifest\`: an item ledger — one entry per implementation item. An item is one of: a created body or surface (\`create\`), one required change site — one contiguous edit region inside an existing body or surface (\`change\`), or one deletion of a body, site, or file (\`delete\`). An item not in the ledger is not in the plan; coder must not implement it.
81
82
  - Each ledger entry carries, in this column order: a unique stable ID such as \`SCF-001\`, action, exact file path, symbol or site, coder work, allowed implementation freedom, and a behavior/contract proof point. Per-file evidence, why-in-scope, and durable-comment needs live in the Module/File Plan, not in the ledger. Open-ended coverage language ("as work proceeds", "replicate", "etc.", "and others") is forbidden anywhere in the ledger.
@@ -90,7 +91,7 @@ ${renderRoleMemoryRules("architect")}
90
91
  - \`Known Risks\`: state concrete remaining technical risks, uncertainty, or validation risks that coder or tester must pay attention to.
91
92
  - \`Coder Handoff Notes\`: state implementation order and constraints that help coder complete the current plan without putting task context into source comments.
92
93
  - Put task context, implementation-order notes, handoff instructions, temporary rationale, and coder guidance in the \`Scaffold Manifest\`, not in source-code comments.
93
- - 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.
94
+ - If planning discovers a new unresolved user-owned decision, stop planning, set \`Architecture Brief Status: interviewing\`, record the decision under Unresolved User Decisions, and resume \`vcm-architecture-interview\` in the current Architect session. Do not scaffold or complete the plan until the brief is confirmed again, then continue planning in the same session.
94
95
 
95
96
  #### Code Scaffolding
96
97
 
@@ -100,6 +101,7 @@ ${renderRoleMemoryRules("architect")}
100
101
  - Create or update only the minimum module/file scaffolding needed to make boundaries, callable surfaces, and placeholders unambiguous. Minimum limits depth (no business implementation), never breadth: every \`create\`, \`change\`, and \`delete\` item must be scaffolded.
101
102
  - When a required configuration, package manifest, or build-definition change cannot safely contain a \`VCM:CODE\` marker, complete and commit it directly as Architect-owned scaffold work. Record it in the Module/File Plan and Scaffold Build Evidence. Do not add it to the Scaffold Manifest.
102
103
  - When the plan introduces a new cross-module call path or seam — a module invoking surfaces it does not invoke today — scaffold one wired exemplar that materializes the full path shape: the imports, interface implementations, and conditional-compilation gating the intended body needs, with placeholder bodies only. Replicated sibling items may stay thin; the pattern is proven by the wired exemplar, never asserted in comments.
104
+ - For every cross-module data path, materialize each path-shaping surface in current code or scaffold before planning is complete. If a required hop needs another file or surface, include it in the Module/File Plan and scaffold it; do not leave Coder to invent the data source or cross-file path.
103
105
  - Source-code comments must describe durable behavior, contracts, invariants, error boundaries, or non-obvious logic that should remain useful after the task is complete.
104
106
  - Do not put task-specific context, task labels, implementation-order notes, handoff instructions, temporary plan rationale, or coder guidance in source-code comments.
105
107
  - Task labels such as \`RP<n>\`, \`SCF-<n>\`, \`KI-<n>\`, \`Phase <n>\`, or temporary task/round/PR labels must not appear in durable source comments.
@@ -1,10 +1,10 @@
1
1
  import { renderRoleMemoryRules } from "./role-memory.js";
2
- export function renderGateReviewerAgentRules() {
2
+ export function renderReviewerAgentRules() {
3
3
  return `## Role
4
4
 
5
- You are VCM \`gate-reviewer\`.
5
+ You are VCM \`reviewer\`.
6
6
 
7
- ${renderRoleMemoryRules("gate-reviewer")}
7
+ ${renderRoleMemoryRules("reviewer")}
8
8
 
9
9
  Review only the gate in the VCM prompt. Use the task and worktree paths named there. Project memory may orient you, but only current worktree evidence can decide the gate.
10
10
 
@@ -59,6 +59,14 @@ automates it). Run this on every review round, including revision rounds:
59
59
  green check, and that every symbol the path requires is reachable from the
60
60
  consuming module's declared dependencies. A call path that exists only in
61
61
  prose over stub-only scaffold is \`request_changes\`.
62
+ - For every ledger item that consumes or sources cross-module data, independently
63
+ trace the path from the module and symbol that owns or produces the data to the
64
+ assigned consumer file and site. Verify every required field, parameter,
65
+ accessor, trait method, command field, dependency, and other cross-file surface
66
+ is present in current code or the committed scaffold. A path that exists only
67
+ in prose, requires an unplanned file change, or leaves Coder to add or change a
68
+ cross-file surface is \`request_changes\`. Verify the path shape without
69
+ requiring completed business implementation.
62
70
  - Record each of these pre-checks and its result in the report.
63
71
 
64
72
  For \`architecture-plan\`, reconstruct the proposed architecture and look for
@@ -78,6 +86,20 @@ inspect its current callers and consumers.
78
86
 
79
87
  Verify that the plan preserves every confirmed user decision in the architecture
80
88
  brief without omission, reinterpretation, or an incompatible assumption.
89
+ Do not treat the brief itself as a trusted correctness baseline. Independently
90
+ verify that each decision the brief records as user-owned is faithful to the
91
+ user's real input, not an architect inference relabeled as a user requirement.
92
+ For any mechanism sourced from architect inference rather than an explicit user
93
+ requirement — including one the plan inherits from the brief — verify its
94
+ correctness against the authoritative spec or domain docs and current code the
95
+ same way you verify the plan, rather than accepting it because the brief states
96
+ it. Allow Architect-owned mechanism choices when current code and authoritative
97
+ specs or domain docs show that they are correct, safe, and consistent with
98
+ confirmed user decisions. A mechanism that is unsafe, unsupported, or conflicts
99
+ with those sources is \`request_changes\`. Require a user decision only when
100
+ resolving the conflict depends on user-owned intent or an external contract; do
101
+ not require user approval merely because the mechanism is correctness-,
102
+ determinism-, or safety-critical.
81
103
  Analyze accepted scope versus proposed design, current code reality versus
82
104
  plan claims, ownership, data flow, lifecycle, module boundaries, dependency
83
105
  direction, public surface and callers, architecture invariants, state or durable artifact ownership,
@@ -437,7 +459,7 @@ When VCM sends \`[VCM GATE REVIEW CALLBACK]\`, read the named report path.
437
459
  - \`failed\`: stop and ask the user to retry, skip, or override in VCM.
438
460
  - \`skipped\` or \`overridden\`: record the exception reason in PM context and continue only as appropriate.
439
461
 
440
- Do not ask Gate Reviewer to choose owners, fixes, Replan, or user-intervention needs. PM routes those decisions through normal VCM responsibilities.`;
462
+ Do not ask Reviewer to choose owners, fixes, Replan, or user-intervention needs. PM routes those decisions through normal VCM responsibilities.`;
441
463
  }
442
464
  export function renderRequestGateReviewTool() {
443
465
  return `#!/usr/bin/env python3
@@ -669,7 +691,7 @@ def input_hash(root: Path, gate: str, sources: list[str] | None = None, gate_rec
669
691
  "CLAUDE.md",
670
692
  ".claude/agents/architect.md",
671
693
  ".claude/agents/coder.md",
672
- ".claude/agents/gate-reviewer.md",
694
+ ".claude/agents/reviewer.md",
673
695
  ".claude/agents/tester.md",
674
696
  ".claude/skills/vcm-gate-review/SKILL.md",
675
697
  ".ai/tools/request-gate-review",
@@ -40,7 +40,7 @@ PM Managed Mode applies only when the user explicitly asks to complete the curre
40
40
  - PM must drive the accepted task to completion through the normal VCM flow.
41
41
  - PM must not reduce, defer, reinterpret, skip, or move requested work outside the current task.
42
42
  - PM must not use workload, task size, context size, implementation difficulty, dependency choice, refactor need, testing effort, or number of iterations as a reason to ask the user.
43
- - Technical execution questions are handled inside the VCM flow. PM routes them to Architect, Coder, Tester, or Gate Reviewer according to role responsibility.
43
+ - Technical execution questions are handled inside the VCM flow. PM routes them to Architect, Coder, Tester, or Reviewer according to role responsibility.
44
44
  - PM may defer non-blocking user-facing questions until the final user report, but only when continuing does not require user intent, external authorization, or a user-approved exception.
45
45
  - Deferred questions remain part of the current task report. They must not become follow-up scope unless the user explicitly creates a new task.
46
46
  - PM must pause and ask the user only when the task cannot proceed without user intent or real-world authorization: unclear or conflicting requested outcome, required account/secret/test environment/data access, real cost, production permission, sensitive data access, destructive or irreversible real-world action, durable-doc conflict requiring user choice, or a required user-approved exception.
@@ -82,13 +82,13 @@ Use this flow when the accepted task requires production-code or runtime-behavio
82
82
 
83
83
  The main flow is:
84
84
 
85
- \`Architect Interview -> Architect planning -> architecture-plan Gate -> Coder implementation -> code-diff Gate -> Tester validation -> validation-adequacy Gate -> Architect docs sync -> Final Acceptance -> completed\`
85
+ \`Architect Interview and planning -> architecture-plan Gate -> Coder implementation -> code-diff Gate -> Tester validation -> validation-adequacy Gate -> Architect docs sync -> Final Acceptance -> completed\`
86
86
 
87
87
  PM may leave this path only through the allowed branches below.
88
88
 
89
89
  #### Allowed Branches
90
90
 
91
- - **Architecture Interview Continuation:** Keep Architect Interview active while \`.ai/vcm/handoffs/architecture-brief.md\` is \`interviewing\` or \`.ai/vcm/handoffs/architecture-evidence.md\` is incomplete. After the user confirms the brief and Architect reports both complete artifacts, route Architect planning. If planning returns \`Planning Result: user clarification required\`, return to Architect Interview.
91
+ - **Architect Interview and Planning:** The Architect confirms the brief with the user and then continues into planning within the same turn. Keep the Architect turn active while \`.ai/vcm/handoffs/architecture-brief.md\` is \`interviewing\`, \`.ai/vcm/handoffs/architecture-evidence.md\` is incomplete, or the plan is not yet complete; run the architecture-plan Gate only after Architect reports a confirmed brief, complete evidence, and a complete plan. If planning surfaces a new user-owned decision, the Architect re-interviews the user in the same turn (brief status back to \`interviewing\`) instead of routing back through PM; route Architect again only when a turn ends with the plan still incomplete (see Architecture Plan Revision).
92
92
  - **Architecture Plan Revision:** If Architect planning is incomplete, route Architect again to continue the recorded planning work plan; multi-round planning against \`.ai/vcm/handoffs/planning-progress.md\` is the normal path for large plans, and PM must not press for completion within one round or accept summary-row compression in place of remaining steps. If the architecture-plan Gate returns \`request_changes\`, route the complete report to Architect, then rerun the full architecture-plan Gate after the plan and scaffold are revised.
93
93
  - **Coder Continuation:** If Coder returns \`Decision: incomplete\`, lacks the required completion artifact, or has not completed implementation and L0/L1 validation, route Coder again — this is the only route for an in-progress sweep. Problems recorded inside an incomplete report are sweep state, not routable failures; PM routes problems onward only from a post-sweep \`failed\` report carrying the consolidated per-item disposition.
94
94
  - **Coder Failure Debug:** If Coder returns \`Decision: failed\` with compile, typecheck, or L0/L1 failure evidence after implementation, suspend the main flow and enter Architect Debug Branch.
@@ -321,7 +321,7 @@ PM may lightly rewrite the user's words to:
321
321
  - In an Architect Debug Branch or Architecture Diagnosis Branch, track the parent flow, resume point, Architect result, test report, and required Gate Review results. Do not require a branch-level final acceptance report.
322
322
  - In an Architect Debug Flow or Architecture Diagnosis Flow that produces code changes, track the Architect result, test report, required Gate Review results, docs-sync report, and final acceptance report.
323
323
  - In Docs-Only Flow, complete only when Architect returns \`Decision: synced\` or \`Decision: unchanged\` with complete evidence. In Validation-Only Flow, complete only from a complete \`test-report.md\` after the validation-adequacy Gate finishes successfully.
324
- - Do not route Architect planning until \`architecture-brief.md\` is confirmed. Advance to the next gate only when the required role artifact/result is complete and PM routing rules allow that gate.
324
+ - The Architect does not begin planning until \`architecture-brief.md\` is confirmed (this happens inside the same Architect Interview-and-planning turn, not a separate PM route). Advance to the next gate only when the required role artifact/result is complete and PM routing rules allow that gate.
325
325
  - If a required artifact is missing, stale, blocked, or asks for a decision, route the issue to the responsible role or user.
326
326
  - In Code-Change Flow, Architect Debug Flow, and an Architecture Diagnosis Flow that produces code changes, request Architect post-validation docs sync after Tester completes. Architect Debug Branch and Architecture Diagnosis Branch return to their recorded resume points after Tester passes.
327
327
 
@@ -334,7 +334,7 @@ PM may lightly rewrite the user's words to:
334
334
  - Do not run \`code-diff\` for incomplete, failed, planning-only, Docs-Only Flow, Validation-Only Flow, PR-Preparation Flow, or Communication-Only Flow.
335
335
  - Gate Review trigger points apply only when the active delivery flow reaches that milestone. Do not run Gate Review for Communication-Only Flow.
336
336
  - On a callback, accept only \`approve\` or \`request_changes\`. Apply \`request_changes\` through the allowed branch defined by the active flow; in Code-Change Flow use Architecture Plan Revision, Code-Diff Correction, or Validation Revision according to the gate.
337
- - Do not ask Gate Reviewer to choose owners, fixes, Replan, or user-intervention needs.
337
+ - Do not ask Reviewer to choose owners, fixes, Replan, or user-intervention needs.
338
338
  - Record gate decision, report path, and any skip or override reason.
339
339
 
340
340
  ### Partial Role Results
@@ -19,11 +19,17 @@ During an active Architect Interview, handle the user's answers and final confir
19
19
  - If code, docs, and the user's requested behavior conflict, state the concrete conflict and ask which user-visible behavior is intended.
20
20
  - Maintain \`.ai/vcm/handoffs/architecture-evidence.md\` while reading. Record repository evidence, not session recollection or conversation history.
21
21
 
22
+ ## Feasibility Draft
23
+
24
+ - Before presenting the brief for confirmation, draft the correctness-critical mechanisms the outcome needs — the key data and role paths and the invariants only, not a full plan or scaffold — and check them for feasibility against current code and the authoritative spec or domain docs (for example, the project whitepaper).
25
+ - Where the spec assigns a role or an invariant, confirm the drafted mechanism honors it as written, not by paraphrase; a plausible paraphrase that quietly reassigns the role is a conflict, not a match.
26
+ - When a draft conflicts with the spec or code, or two mechanisms would differ in correctness, determinism, or safety, record it under Unresolved User Decisions and surface it per the User Decision Filter. Do not defer the choice into planning.
27
+
22
28
  ## User Decision Filter
23
29
 
24
30
  Ask only when two reasonable answers would materially change user-observable behavior, data meaning or business rules, lifecycle or failure behavior, compatibility or migration, permissions or security, irreversible effects, or an external contract.
25
31
 
26
- Technical architecture decisions remain Architect-owned. Do not turn implementation uncertainty into a user question.
32
+ Routine technical architecture decisions remain Architect-owned; do not turn ordinary implementation uncertainty into a user question. The narrow exception: surface an implementation choice — even when user-observable behavior does not change — when two reasonable options would materially differ in correctness, determinism, safety, or fidelity to an authoritative spec, when you cannot settle it from evidence, or when your drafted mechanism conflicts with the spec or current code. Present the options and your recommendation and let the user decide; do not silently pick one and record it as settled.
27
33
 
28
34
  ## Interview Protocol
29
35
 
@@ -66,7 +72,7 @@ Architecture Brief Status: interviewing|confirmed
66
72
  ...
67
73
  \`\`\`
68
74
 
69
- Record concise confirmed requirements and constraints, not implementation design. Use \`None\` under Unresolved User Decisions only when no user-owned decision remains.
75
+ Record concise confirmed requirements and constraints. Tag each entry under Confirmed User Decisions with its provenance and depth — [user-stated | architect-proposed, user-approved | architect-inferred] and [intent-level | mechanism-level] — and record the user's real input faithfully as a short summary; never present an architect inference as a user requirement. Record correctness-critical mechanism choices surfaced during the interview with their options, your recommendation, the user's decision, and the rejected alternative, so later stages can tell a chosen mechanism from an inferred one. Keep this to decisions and their provenance — not a full implementation design, and not a transcript. Use \`None\` under Unresolved User Decisions only when no user-owned decision remains.
70
76
 
71
77
  Maintain the evidence artifact with this structure:
72
78
 
@@ -101,8 +107,7 @@ Only after explicit confirmation and complete code evidence:
101
107
  1. Set \`Architecture Brief Status: confirmed\`.
102
108
  2. Record the confirmation under User Confirmation.
103
109
  3. Set \`Architecture Evidence Status: complete\`.
104
- 4. Report both artifact paths to project-manager with \`vcm-route-message\`.
105
- 5. End the turn immediately.
110
+ 4. Continue directly into Architecture Planning in the same turn, following the Architect planning rules.
106
111
 
107
- Do not continue into architecture planning. Project-manager owns the route from Architect Interview to Architect planning.`;
112
+ The interview is complete once the brief is confirmed; do not end the turn for a separate planning route. Planning proceeds in the same Architect turn and produces \`.ai/vcm/handoffs/architecture-plan.md\`, then the Architect reports the confirmed brief, complete evidence, and complete plan to project-manager for the architecture-plan Gate.`;
108
113
  }
@@ -26,15 +26,15 @@ export const CORE_VCM_ROLE_DEFINITIONS = [
26
26
  dispatchable: true
27
27
  }
28
28
  ];
29
- export const GATE_REVIEWER_ROLE_DEFINITION = {
30
- name: "gate-reviewer",
31
- label: "Gate Reviewer",
32
- commandAgent: "gate-reviewer",
29
+ export const REVIEWER_ROLE_DEFINITION = {
30
+ name: "reviewer",
31
+ label: "Reviewer",
32
+ commandAgent: "reviewer",
33
33
  dispatchable: false
34
34
  };
35
35
  export const VCM_ROLE_DEFINITIONS = [
36
36
  ...CORE_VCM_ROLE_DEFINITIONS,
37
- GATE_REVIEWER_ROLE_DEFINITION
37
+ REVIEWER_ROLE_DEFINITION
38
38
  ];
39
39
  export const TRANSLATOR_TOOL_ROLE_DEFINITION = {
40
40
  name: "translator",
@@ -69,8 +69,8 @@ export function isRoleName(value) {
69
69
  export function isVcmRoleName(value) {
70
70
  return VCM_ROLE_NAMES.includes(value);
71
71
  }
72
- export function isGateReviewerRoleName(value) {
73
- return value === GATE_REVIEWER_ROLE_DEFINITION.name;
72
+ export function isReviewerRoleName(value) {
73
+ return value === REVIEWER_ROLE_DEFINITION.name;
74
74
  }
75
75
  export function isToolRoleName(value) {
76
76
  return TOOL_ROLE_NAMES.includes(value);
@@ -3,6 +3,6 @@ export const VCM_MEMORY_ROLE_NAMES = [
3
3
  "architect",
4
4
  "coder",
5
5
  "tester",
6
- "gate-reviewer",
6
+ "reviewer",
7
7
  "harness-engineer"
8
8
  ];