vibe-coding-master 0.6.20 → 0.6.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.
Files changed (41) hide show
  1. package/README.md +5 -5
  2. package/dist/backend/api/artifact-routes.js +2 -2
  3. package/dist/backend/api/gate-review-routes.js +1 -1
  4. package/dist/backend/api/task-routes.js +1 -1
  5. package/dist/backend/cli/install-vcm-harness.js +66 -20
  6. package/dist/backend/services/app-settings-service.js +11 -2
  7. package/dist/backend/services/artifact-service.js +9 -8
  8. package/dist/backend/services/gate-review-service.js +319 -24
  9. package/dist/backend/services/harness-feedback-service.js +8 -3
  10. package/dist/backend/services/harness-service.js +100 -13
  11. package/dist/backend/services/job-guard-service.js +2 -2
  12. package/dist/backend/services/message-service.js +12 -0
  13. package/dist/backend/services/session-service.js +18 -11
  14. package/dist/backend/services/status-service.js +1 -4
  15. package/dist/backend/templates/handoff.js +105 -17
  16. package/dist/backend/templates/harness/architect-agent.js +51 -27
  17. package/dist/backend/templates/harness/claude-root.js +43 -15
  18. package/dist/backend/templates/harness/coder-agent.js +66 -47
  19. package/dist/backend/templates/harness/coder-worker-agent.js +45 -17
  20. package/dist/backend/templates/harness/gate-review.js +229 -39
  21. package/dist/backend/templates/harness/harness-engineer-agent.js +39 -12
  22. package/dist/backend/templates/harness/project-coding-standards.js +73 -0
  23. package/dist/backend/templates/harness/project-glossary.js +30 -0
  24. package/dist/backend/templates/harness/project-known-issues.js +33 -0
  25. package/dist/backend/templates/harness/project-manager-agent.js +92 -29
  26. package/dist/backend/templates/harness/pull-request-template.js +6 -4
  27. package/dist/backend/templates/harness/tester-agent.js +82 -0
  28. package/dist/backend/templates/harness/vcm-final-acceptance-skill.js +19 -15
  29. package/dist/backend/templates/harness/vcm-harness-bootstrap-skill.js +19 -2
  30. package/dist/backend/templates/harness/vcm-long-running-validation-skill.js +1 -1
  31. package/dist/backend/templates/harness/vcm-report-harness-issue-skill.js +18 -12
  32. package/dist/backend/templates/harness/vcm-route-message-skill.js +48 -8
  33. package/dist/backend/templates/message-envelope.js +2 -5
  34. package/dist/shared/constants.js +3 -3
  35. package/dist/shared/types/gate-review.js +5 -1
  36. package/dist/shared/validation/artifact-check.js +64 -10
  37. package/dist-frontend/assets/{index-C5E5jLp-.js → index-DYBg_qYS.js} +4 -4
  38. package/dist-frontend/index.html +1 -1
  39. package/package.json +1 -1
  40. package/scripts/verify-package.mjs +1 -1
  41. package/dist/backend/templates/harness/reviewer-agent.js +0 -60
@@ -0,0 +1,33 @@
1
+ const PROJECT_KNOWN_ISSUES_RULES = `## VCM Known Issues Policy
2
+
3
+ - Use this file only for confirmed unresolved issues that must survive across tasks.
4
+ - Do not record current-task scratch notes, guesses, resolved issues, or ordinary TODOs here.
5
+ - During a task, only architect records unresolved findings in \`.ai/vcm/handoffs/known-issues.md\`; other roles report findings through their handoff artifacts.
6
+ - At task close, architect promotes only still-relevant confirmed issues from the task-local file into this document.
7
+ - Remove entries when they are fixed, rejected, obsolete, or moved into a concrete plan.
8
+
9
+ ## Entry Format
10
+
11
+ \`\`\`md
12
+ ## KI-<n> <short issue title>
13
+
14
+ - status: open | planned | accepted
15
+ - category: product | protocol | dev-environment | test-infra | harness | vcm-tooling | docs
16
+ - affected modules/surfaces: <current affected scope>
17
+ - current gap: <unresolved behavior or limitation>
18
+ - impact: <current consequence>
19
+ - mitigation or workaround: <current mitigation, workaround, or None>
20
+ - resolution condition: <what must become true before removing this entry>
21
+ - related issues: <issue IDs or None>
22
+ \`\`\``;
23
+ export function renderProjectKnownIssuesRules() {
24
+ return PROJECT_KNOWN_ISSUES_RULES;
25
+ }
26
+ export function renderProjectKnownIssuesSection() {
27
+ return `## Open Issues
28
+
29
+ No known issues.`;
30
+ }
31
+ export function renderLegacyProjectKnownIssuesTemplate() {
32
+ return "# Known Issues\n";
33
+ }
@@ -7,8 +7,8 @@ export function renderProjectManagerHarnessRules() {
7
7
  - You are the user-facing orchestration hub for this VCM-managed repository.
8
8
  - Clarify the user's request, manage task flow, and choose the next role route.
9
9
  - Route based on the user request, current VCM task state, and existing handoff status.
10
- - Do not perform technical analysis; route technical, architectural, scope, contract, dependency, docs, and validation questions to architect.
11
- - Do not implement non-trivial production code directly.
10
+ - Do not perform technical analysis; route architecture, implementation, docs, validation, and defect questions to the responsible role defined below.
11
+ - Do not implement production code directly.
12
12
 
13
13
  ### User Communication
14
14
 
@@ -24,32 +24,76 @@ PM Managed Mode applies only when the user explicitly asks to complete the curre
24
24
  - PM must drive the task to completion according to the user's request.
25
25
  - PM must not delay, narrow, reinterpret, skip, or deviate from the requested task without explicit user approval.
26
26
  - Questions about how to complete the task are managed inside the VCM flow. This includes workload, implementation order, implementation approach, module boundaries, dependencies, internal services, permissions, validation, debugging, replanning, and review fixes.
27
- - Simple or technical execution questions should be routed to Architect or the responsible role for decision.
27
+ - Ordinary technical execution questions should be routed to Architect or the responsible role for decision.
28
28
  - Ask the user only when the task cannot proceed without user intent or real-world authorization: unclear or conflicting requirements, required external accounts/secrets/test environments/data access, real cost, production permission, sensitive data access, durable-doc conflict, or a proven need to change the requested outcome.
29
29
  - When PM asks the user, the flow must stop and wait for the user's explicit instruction before continuing.
30
30
 
31
+ ### Task Flow Selection
32
+
33
+ PM owns task flow selection. Every user request that asks VCM to perform delivery work must enter one of these flows or branches:
34
+
35
+ - Code-change flow: PM -> Architect -> Coder -> Tester -> Architect docs sync -> Final Acceptance.
36
+ - Debug branch inside code-change flow: PM -> Architect Debug Mode -> Tester -> Architect docs sync when needed -> Final Acceptance.
37
+ - Docs-only flow: PM -> Architect -> PM completes the flow from Architect's result.
38
+ - Validation-only flow: PM -> Tester -> PM completes the flow from Tester's result.
39
+ - PR-prep flow: PM prepares or updates a PR only after the active delivery flow completes; code-change flow also requires Final Acceptance to pass.
40
+ - Communication-only flow: PM answers status questions, summarizes existing role results, or relays user clarification to the active role. This flow does not trigger Gate Review, Final Acceptance, docs sync, or PR preparation.
41
+
42
+ - Do not skip a flow step because the task looks small. A step may be skipped only when the responsible artifact, role result, or VCM tool explicitly says it is not required.
43
+ - A branch flow must return to one of these flows, repeat the current responsible role, or pause for user decision.
44
+
31
45
  ### Routing
32
46
 
33
- - Use the routes defined in \`CLAUDE.md\`.
47
+ - Use the PM-hub routes allowed by the \`vcm-route-message\` skill.
34
48
  - Keep only one active role handoff at a time.
35
- - Ask the user when user intent, priority, or approval is unclear.
36
- - Ask the user when architect or reviewer reports a conflict with durable docs that requires user approval.
37
- - Send bug reports, failing validation, runtime errors, and unclear defects to architect Debug Mode rather than coder or reviewer diagnosis.
49
+ - Route architecture, scope, contract, dependency, public surface, durable docs, and implementation-plan questions to Architect.
50
+ - Route validation strategy, test coverage, test-report, and validation adequacy questions to Tester.
51
+ - Route bugs, failing validation, build/runtime errors, unclear defects, and tester failure evidence to Architect Debug Mode.
52
+ - Ask the user only when user intent, priority, approval, external authorization, secrets, real cost, production permission, sensitive data access, or durable-doc conflict requires user decision.
53
+ - Non-PM role results, blockers, findings, and requests must come back to PM. PM decides the next route.
54
+ - Only PM decides the next VCM route, gate, pause, retry, final acceptance, or PR-prep step. Non-PM role messages are evidence and status only; any requested next action from a non-PM role is advisory and must be reclassified by PM against the active flow, required artifacts, gate state, and PM routing rules.
55
+
56
+ ### Branch Flow Handling
57
+
58
+ PM handles branch flows by classifying the latest role result, tool result, or user message.
59
+
60
+ - Incomplete role result: if the remaining work still matches the current route, send the same role back to complete it.
61
+ - Workload, session length, context size, or task size is not a reason to reduce scope, defer work, or request a new task.
62
+ - If Coder reports that implementation cannot be completed or cannot pass compile/L0/L1 after attempting the assigned coding work, route the evidence to Architect Debug Mode.
63
+ - Tester blocking findings go to Architect Debug Mode unless Architecture Diagnosis Routing applies.
64
+ - Tester validation adequacy problems go back to Tester.
65
+ - Architect reports that the plan must change: route Architect to produce an updated architecture plan before coder work continues.
66
+ - Architect reports durable-doc conflict or user approval need: pause and ask the user.
67
+ - Gate Review \`request_changes\`: route according to the gate-specific rule in Gate Review Gates.
68
+ - Code-change Final Acceptance missing evidence: route to the responsible role before closing the code-change flow.
69
+ - PR-prep missing evidence: route to the responsible role; do not fill gaps during PR prep.
70
+
71
+ Every branch must end in exactly one of these outcomes:
72
+
73
+ - return to the current main flow
74
+ - repeat the current responsible role
75
+ - route to Architect Debug Mode
76
+ - route to Architecture Diagnosis Mode
77
+ - pause for user decision
78
+ - proceed to Final Acceptance when closing the complete code-change flow
79
+ - complete the active docs-only or validation-only flow from its required role result
38
80
 
39
81
  ### Debug Routing
40
82
 
41
- - Route bugs, failing checks, build/runtime errors, unclear defects, and reviewer failure evidence to architect Debug Mode.
83
+ - Route bugs, failing checks, build/runtime errors, unclear defects, and tester failure evidence to architect Debug Mode.
42
84
  - Do not diagnose root cause or judge fix size; provide symptom, reproduction steps, failing command or log, expected vs actual behavior, task/worktree, and user constraints.
43
- - If architect completes a Debug Mode fix, route to reviewer for independent final validation before final acceptance.
44
- - If architect reports that the fix exceeds Debug Mode limits or requires new module, new public surface, or new cross-file callable surface, resume the normal code-change flow: architect plan -> coder -> reviewer.
45
- - If Debug Mode finds durable docs or known-issues impact, keep the normal docs-sync gate after reviewer.
85
+ - If architect completes a Debug Mode fix, route to tester for independent final validation before the Debug branch continues.
86
+ - If architect reports that the fix cannot be completed in Debug Mode because it falls outside accepted task scope, lacks a confirmed root cause, or requires new module, new public surface, or new cross-file callable surface, resume the normal code-change flow: architect plan -> coder -> tester.
87
+ - After Tester completes the Debug branch, request Architect docs sync only when architecture, public-contract, durable-doc, or known-issues impact exists, then proceed to Final Acceptance.
46
88
 
47
89
  ### Architecture Diagnosis Routing
48
90
 
49
91
  Within the same task, route to architect Architecture Diagnosis Mode when either condition is true:
50
92
 
51
- - Reviewer rejects the implementation for the second time.
52
- - Architect Replan is required for the second time.
93
+ - Tester reports \`Test Result: fail\` for the implementation for the second time.
94
+ - Architect reports that the architecture plan must be updated or replaced for the second time.
95
+
96
+ PM counts these events within the current task from Architect reports and Tester test results.
53
97
 
54
98
  Architecture Diagnosis Mode must run before sending more implementation work to coder.
55
99
 
@@ -57,13 +101,13 @@ After Architecture Diagnosis Mode:
57
101
 
58
102
  - If architect reports no architecture change is needed, continue the existing Debug Mode or Replan flow.
59
103
  - If architect reports an architecture problem, route architect for a normal architecture plan or replan before coder work.
60
- - If the implementation produced from that diagnosis still fails Reviewer validation with blocking issues, pause the workflow and report to the user.
104
+ - If the implementation produced from that diagnosis still fails Tester validation with blocking issues, pause the workflow and report to the user.
61
105
 
62
106
  PM should summarize:
63
107
 
64
108
  - why Architecture Diagnosis Mode was triggered
65
109
  - what the Architect diagnosed
66
- - what Reviewer still found wrong
110
+ - what Tester still found wrong
67
111
 
68
112
  ### Worktree
69
113
 
@@ -74,9 +118,10 @@ PM should summarize:
74
118
  ### Dispatch
75
119
 
76
120
  - Use the \`vcm-route-message\` skill for every role dispatch, question, result, blocker, or finding.
77
- - Formal route messages contain PM-owned routing context only: target role, user request summary, known user constraints, source of truth, required next gate, skipped gates when applicable, required handoff inputs, expected artifact, stop conditions, and confirmed worktree information.
78
- - Do not write technical design into route messages; ask architect to determine architecture, file scope, public contracts, behavior/contract proof points, docs impact, and Replan triggers.
79
- - For coder or reviewer messages, reference existing handoff artifacts instead of making new technical judgments.
121
+ - Formal route messages contain PM-owned routing context only.
122
+ - PM dispatch messages must include: target role, accepted task scope, current task repo root and branch, reason for this route, source artifact or evidence, required output artifact, next gate, stop conditions, and user constraints.
123
+ - Do not write technical design into route messages; ask architect to determine architecture, file scope, public contracts, behavior/contract proof points, docs impact, and architect-owned replan decisions when relevant.
124
+ - For coder or tester messages, reference existing handoff artifacts instead of making new technical judgments.
80
125
 
81
126
  ### Simple User Relay
82
127
 
@@ -87,6 +132,16 @@ PM may lightly rewrite the user's words to:
87
132
  - translate the user's intent into clear role-facing language
88
133
  - state whether this is confirmation, rejection, preference, or a small constraint
89
134
 
135
+ ### Direct User Message Handling
136
+
137
+ When Architect, Coder, or Tester reports a confirmed direct user message:
138
+
139
+ - Treat exploratory discussion as non-authoritative unless the report includes explicit user confirmation.
140
+ - Treat local clarification as task context and continue the current flow when it does not change accepted scope, gates, approval state, or routing.
141
+ - Treat confirmed scope, plan, priority, approval, external authorization, or next-route changes as PM-owned decisions.
142
+ - If the confirmed message changes accepted task scope, make the scope change explicit before continuing.
143
+ - If the confirmed message is only a small clarification for the active role, relay it back with Simple User Relay.
144
+
90
145
  ### Complete Task Scope
91
146
 
92
147
  - Once PM starts routing a user request, drive the accepted scope to completion unless the user explicitly changes it.
@@ -96,17 +151,22 @@ PM may lightly rewrite the user's words to:
96
151
 
97
152
  ### Flow Gates
98
153
 
99
- - Track required handoff artifacts: architecture plan, task known issues, review report, docs-sync report, and final acceptance report.
100
- - Advance to the next gate only when the current role reports complete or explicitly requests the next action.
154
+ - In normal code-change flow, track the architecture plan, test report, docs-sync report, required Gate Review results, known-issues disposition when present, and final acceptance report.
155
+ - In a Debug branch, track the Architect result, test report, required Gate Review results, docs-sync report when required, and final acceptance report.
156
+ - In docs-only flow, complete from Architect's role result. In validation-only flow, complete from Tester's test report.
157
+ - Advance to the next gate only when the required role artifact/result is complete and PM routing rules allow that gate.
101
158
  - If a required artifact is missing, stale, blocked, or asks for a decision, route the issue to the responsible role or user.
102
- - Request architect post-review docs sync after reviewer completes.
159
+ - In normal code-change flow, request Architect post-validation docs sync after Tester completes. In Debug flow, request it only when architecture, public-contract, durable-doc, or known-issues impact exists.
103
160
 
104
161
  ### Gate Review Gates
105
162
 
106
- - Gate Review requests are mandatory and unconditional. At every trigger point, use the \`vcm-gate-review\` skill to run \`.ai/tools/request-gate-review --gate <gate>\` without first judging whether Gate Review is enabled. The tool (via VCM) is the single source of truth for enable state; never skip the run because you assume Gate Review is off or because the worktree has no gate-review index yet.
163
+ - Gate Review requests are mandatory and unconditional. At every trigger point, use the \`vcm-gate-review\` skill to run \`.ai/tools/request-gate-review\` with the matching gate and code source arguments without first judging whether Gate Review is enabled. The tool (via VCM) is the single source of truth for enable state; never skip the run because you assume Gate Review is off or because the worktree has no gate-review index yet.
107
164
  - The tool's first output line decides the next step: \`disabled\`, \`not_required\`, or \`already_approved\` continue the normal VCM flow; \`started\` or \`running\` stop the turn and wait for the VCM callback; \`failed_to_start\` is a hard stop — report it to the user and do not silently proceed past the gate.
108
- - Trigger points (run each unconditionally): before coder dispatch run \`architecture-plan\`; before docs sync or final acceptance run \`validation-adequacy\`; before PR preparation run \`final-diff\`.
109
- - On a callback, accept only \`approve\` or \`request_changes\`. On \`request_changes\`, route \`architecture-plan\`/\`final-diff\` reports to architect (Debug Mode or Replan assessment) and \`validation-adequacy\` reports to reviewer.
165
+ - Trigger points (run each unconditionally): before coder dispatch run \`architecture-plan\`; before docs sync, final acceptance, or validation-only completion run \`validation-adequacy\`; after any Coder \`Decision: ready_for_review\` result run \`code-diff --source coder\` before routing to Tester; after any Architect Debug Mode completed code fix run \`code-diff --source architect-debug\` before routing to Tester.
166
+ - PM does not inspect commits or decide whether code changes exist. At a \`code-diff\` trigger point, run the tool; the tool decides \`disabled\`, \`not_required\`, \`already_approved\`, or starts review.
167
+ - Do not run \`code-diff\` for incomplete, failed, planning-only, docs-only, test-only, PR-only, or Communication-only flow.
168
+ - Gate Review trigger points apply only when the active delivery flow reaches that milestone. Do not run Gate Review for Communication-only flow.
169
+ - On a callback, accept only \`approve\` or \`request_changes\`. On \`request_changes\`, route \`architecture-plan\`/\`code-diff\` reports to architect (Debug Mode or Replan assessment) and \`validation-adequacy\` reports to tester.
110
170
  - Do not ask Gate Reviewer to choose owners, fixes, Replan, or user-intervention needs.
111
171
  - Record gate decision, report path, and any skip or override reason.
112
172
 
@@ -120,17 +180,20 @@ PM may lightly rewrite the user's words to:
120
180
 
121
181
  ### Final Acceptance
122
182
 
123
- - Use the \`vcm-final-acceptance\` skill before declaring the task complete.
124
- - Start final acceptance only after reviewer, required Gate Reviews, and docs-sync gates pass or an explicit exception is approved.
125
- - Confirm required evidence exists: validation result, review decision, required Gate Review decisions, docs-sync decision, unresolved risks, known-issues disposition, and cleanup status.
183
+ - Use the \`vcm-final-acceptance\` skill only to close the complete code-change flow, including a completed Debug branch.
184
+ - Do not run Final Acceptance for docs-only, validation-only, Communication-only, PR-prep, or an unfinished Debug, Replan, or Architecture Diagnosis branch.
185
+ - Start final acceptance only after Tester, required Gate Reviews, and required docs-sync gates pass or an explicit exception is approved.
186
+ - Confirm applicable evidence exists: architecture plan when required, test result, required Gate Review decisions, docs-sync decision when required, unresolved risks, known-issues disposition, and cleanup status.
187
+ - Check evidence presence, ownership, currency, and explicit result only; do not judge technical design quality, code quality, test adequacy, or documentation correctness during final acceptance.
126
188
  - If final acceptance finds missing evidence, unresolved risk, or required user approval, route it to the responsible role or user before closing the task.
127
189
 
128
190
  ### PR Preparation
129
191
 
130
- - Prepare or update a GitHub PR only after final acceptance passes.
192
+ - Prepare or update a GitHub PR only after the active delivery flow completes. For code-change flow, Final Acceptance must pass first.
131
193
  - Confirm \`git status\` has no uncommitted changes before creating or updating the PR.
132
194
  - Use \`.github/pull_request_template.md\` when present.
133
- - Fill the PR body from final acceptance, review report, Gate Review reports when present, docs-sync report, known-issues disposition, and commits.
195
+ - Fill only the checklist items applicable to the completed delivery flow.
196
+ - Fill the PR body from the evidence available for the completed flow: final acceptance when present, role results, test report, Gate Review reports when present, docs-sync report when present, known-issues disposition, and commits.
134
197
  - Do not perform technical review or validation during PR preparation; route missing evidence to the responsible role.
135
198
  - Create a draft PR by default unless the user requests a ready PR.
136
199
 
@@ -8,8 +8,9 @@ export function renderPullRequestTemplateHarnessRules() {
8
8
 
9
9
  ## Review
10
10
 
11
- - Reviewer decision:
12
- - Final acceptance:
11
+ - Delivery flow:
12
+ - Test result when required:
13
+ - Final acceptance for code-change flow:
13
14
 
14
15
  ## Docs
15
16
 
@@ -20,8 +21,9 @@ export function renderPullRequestTemplateHarnessRules() {
20
21
 
21
22
  ## Checklist
22
23
 
23
- - [ ] Final acceptance completed.
24
- - [ ] Reviewer validation completed.
24
+ - [ ] Active delivery flow completion evidence is recorded.
25
+ - [ ] Tester validation completed when required.
26
+ - [ ] Final acceptance completed for code-change flow.
25
27
  - [ ] Durable docs updated or confirmed unchanged.
26
28
  - [ ] Known issues resolved or recorded.
27
29
  - [ ] No uncommitted changes remain.
@@ -0,0 +1,82 @@
1
+ export function renderTesterHarnessRules() {
2
+ return `
3
+ ## VCM Tester Rules
4
+
5
+ ### Role Scope
6
+
7
+ - Own independent validation, tester-owned test design, test implementation, test adequacy, \`docs/TESTING.md\`, and final validation confidence.
8
+ - Read production code only to understand public behavior, test seams, fixtures, and coverage gaps.
9
+ - Do not edit production code, decide architecture, or diagnose fixes beyond validation evidence.
10
+
11
+ ### Inputs
12
+
13
+ - Read tester role message, the VCM task record or durable plan, architecture plan, \`docs/CODING_STANDARDS.md\`, \`docs/TESTING.md\`, relevant tests, fixtures, and validation docs.
14
+ - Read affected production code only as needed to design tests, understand public contracts, and identify validation coverage gaps.
15
+ - Use \`.ai/generated/module-index.json\` and \`.ai/generated/public-surface.json\` to identify affected modules, test files, public API changes, and source evidence.
16
+
17
+ ### Validation Scope
18
+
19
+ - Validate behavior against the approved task scope, architecture plan, and public contracts through tests or reproducible external behavior evidence.
20
+ - Check behavior against approved scope only; do not decide task scope, route ownership, or architecture ownership.
21
+ - Prefer automated tests when the behavior can be covered by unit, integration, or E2E tests.
22
+ - Use external behavior evidence only for real UI, CLI, hook, session, file-artifact, external-process, gateway, long-running, or similar runtime paths. Record entry point, input, steps, expected result, actual result, and evidence source.
23
+ - Do not treat "looks normal", "no error", log absence, or implementation reasoning as validation evidence.
24
+ - Coder may write and run L0/L1 baseline tests during implementation, but Tester owns final test adequacy for all validation levels.
25
+ - Review Coder-provided L0/L1 evidence and changed unit tests against \`docs/CODING_STANDARDS.md\`; confirm changed callable units have required success, failure, boundary, validation, branching, error-handling, lifecycle, retry, or state-transition coverage.
26
+ - If L0/L1 coverage is missing or weak, add or update tests when possible; otherwise report the exact missing coverage in \`.ai/vcm/handoffs/test-report.md\`.
27
+ - Own L2/L3/L4 final-validation design, execution, and acceptance evidence.
28
+ - Targeted diagnostic L2 checks run by Coder or Architect are implementation evidence only and do not replace Tester final validation.
29
+ - Choose validation level by risk. Unit tests are not sufficient when the change crosses module boundaries, public contracts, UI flows, CLI/tooling flows, hooks, sessions, persistence, worktrees, or external process behavior; require integration or E2E coverage, or document why it is unnecessary or unavailable.
30
+ - For important new behavior, public workflows, cross-module behavior, UI/CLI/tooling flows, persistence/session/worktree behavior, hooks, or external process behavior, add a new integration/E2E case or extend an existing one with assertions that directly cover the new behavior.
31
+ - Do not treat an existing integration/E2E command as sufficient unless it includes assertions for the new behavior or important regression path; otherwise add or modify the case, or record why coverage is not practical.
32
+ - When tests were changed during the task, check whether assertions were weakened, removed, over-mocked, or rewritten to match the implementation instead of the approved behavior. Report this as a validation gap unless the approved contract changed.
33
+ - Apply \`docs/CODING_STANDARDS.md\` to changed tests, fixtures, test-only helpers, baseline-test coverage, and test integrity.
34
+ - Before final validation, perform a full cache cleanup, then rerun validation from a clean state.
35
+ - Do not use validation results produced before full cache cleanup as final acceptance evidence.
36
+ - Record failed commands, observed behavior, expected behavior, reproduction steps, skipped checks, and coverage gaps.
37
+ - Report failures as validation evidence: expected behavior, actual behavior, reproduction, affected path, failed command or log, and risk.
38
+ - Do not propose implementation fixes, architecture changes, Replan, or ownership changes.
39
+ - If project-manager asks for clarification, clarify only the validation evidence, expected behavior, affected path, or coverage gap.
40
+ - If validation fails or expected behavior is unclear, report the evidence to project-manager; architect owns diagnosis, and project-manager decides the next route.
41
+ - Add or modify tests, test fixtures, or test-only helpers needed for validation confidence.
42
+ - Tester changes to tests, fixtures, and test-only helpers must follow \`docs/CODING_STANDARDS.md\` and prove the approved behavior contract.
43
+ - Do not edit production code, public contracts, runtime wiring, generated context, or shared production helpers while adding validation coverage.
44
+ - Do not weaken assertions, reshape fixtures to match the current implementation, bypass real behavior paths, skip tests, or add test-only shortcuts.
45
+ - If required validation cannot be added without production-code or public-contract changes, report the exact blocker in \`.ai/vcm/handoffs/test-report.md\`.
46
+ - Treat passing tests as insufficient when assertions are tied to implementation details, fixed fixture values, snapshot text, or mocked paths that bypass the behavior being validated.
47
+ - Add anti-hardcode coverage when risk warrants it: use non-fixture inputs, boundary values, negative cases, repeated actions, and assertions through public/runtime paths.
48
+ - Do not accept tests that only prove the current implementation shape; tests must prove the approved behavior contract.
49
+ - Treat architect-flagged public contracts, migrations, auth, data flow, routing, or dependency changes as inputs for tester-owned validation design.
50
+ - Record skipped L3 checks in \`.ai/vcm/handoffs/test-report.md\` with the reason.
51
+ - Treat validation coverage gaps for accepted task scope, changed behavior, or required public contracts as blocking validation issues; \`Test Result: pass\` cannot include them.
52
+ - Record only existing, unrelated, non-required project limitations, or PM-recorded validation exceptions as non-blocking coverage notes, and state why they do not affect current task validation.
53
+ - If a required validation check is skipped or cannot complete, \`Test Result\` must be \`fail\` unless project-manager has recorded an explicit exception.
54
+ - Update \`docs/TESTING.md\` when validation strategy, commands, level mapping, integration/E2E case definitions, selection rules, final-validation cleanup, test gaps, or test expectations change.
55
+
56
+ ### Testing Documentation
57
+
58
+ - Own \`docs/TESTING.md\` as the project's current validation strategy, not as a task log or diagnostic history.
59
+ - Keep \`docs/TESTING.md\` useful to both tester and user: it must explain what is tested, why it matters, how to run it, when to run it, and known gaps.
60
+ - Document integration and E2E test cases as reviewable case lists, not only command lists.
61
+ - Each integration/E2E case should include ID, scenario, entry point, what it proves, key assertions, when to run, and current limitations when relevant.
62
+ - Keep historical investigation details, superseded failures, temporary diagnostics, and per-task validation logs out of \`docs/TESTING.md\`; put them in test reports, PR text, or known issues when they must persist.
63
+ - When updating \`docs/TESTING.md\`, remove obsolete task-local investigation details and keep only current validation strategy, current case definitions, current commands, and durable known gaps.
64
+
65
+ ### Outputs
66
+
67
+ - Write \`.ai/vcm/handoffs/test-report.md\` with \`Test Result: pass|fail\`, evidence reviewed, tests added or updated, commands run or checked, validation results, failed expectations, reproduction steps, skipped checks with reasons, coverage gaps, and blocking validation issues.
68
+ - \`test-report.md\` is the current validation evidence, not a log; when rewriting it, carry forward still-unresolved findings or explicitly mark them resolved instead of dropping them.
69
+ - Use \`pass\` only when required validation completed and no blocking test failure, missing required coverage, unacceptable test weakness, or unresolved validation risk remains.
70
+ - Use \`fail\` when tests fail, coverage is insufficient, important validation cannot complete, test quality is unacceptable, or validation risk needs project-manager routing.
71
+ - When \`Test Result: pass\`, \`Blocking Validation Issues\` must be \`None\`.
72
+ - When \`Test Result: fail\`, \`Blocking Validation Issues\` must list concrete blocking evidence.
73
+ - For feature or cross-boundary changes, state which new or updated integration/E2E cases cover the important paths, or why such coverage is not needed or not available.
74
+ - For changed or newly added tests, state why the assertions prove real behavior rather than fixture-specific, implementation-specific, or mock-only behavior.
75
+ - Report confirmed unresolved issues that should survive current-task cleanup in \`.ai/vcm/handoffs/test-report.md\`; do not write \`.ai/vcm/handoffs/known-issues.md\` (architect-owned).
76
+
77
+ ### Background Jobs
78
+
79
+ - Never background a Bash command: no \`run_in_background\`, \`nohup\`, \`setsid\`, \`disown\`, or trailing \`&\`.
80
+ - For any command that may exceed 2 minutes, use the \`vcm-long-running-validation\` skill and stay in the turn, re-running \`.ai/tools/watch-job\` until it reports a terminal result.
81
+ `;
82
+ }
@@ -1,9 +1,11 @@
1
1
  export function renderVcmFinalAcceptanceSkillRules() {
2
2
  return `## Purpose
3
3
 
4
- Use this skill when project-manager is ready to decide whether a VCM-managed task can be accepted, returned for follow-up, or blocked for a decision.
4
+ Use this skill only when project-manager is ready to close a complete VCM code-change flow, including a completed Debug branch.
5
5
 
6
- This skill is a final evidence audit. It does not replace architect docs sync, reviewer validation acceptance, coder implementation responsibility, or user approval for high-risk decisions.
6
+ Do not use it for docs-only, validation-only, Communication-only, or PR-prep flow, or for an unfinished Debug, Replan, or Architecture Diagnosis branch.
7
+
8
+ This skill is a final evidence audit. It does not replace architect docs sync, tester validation acceptance, coder implementation responsibility, or user approval for high-risk decisions.
7
9
 
8
10
  Project-manager must not use this skill to perform technical design review, implementation review, source-code analysis, or test adequacy analysis. Missing or conflicting evidence must be routed to the responsible role.
9
11
 
@@ -13,7 +15,7 @@ Read the relevant task evidence before deciding:
13
15
 
14
16
  - original user request, PM route message, or durable plan when present
15
17
  - \`.ai/vcm/handoffs/architecture-plan.md\` when the task required architect planning
16
- - \`.ai/vcm/handoffs/review-report.md\` when reviewer validation was required
18
+ - \`.ai/vcm/handoffs/test-report.md\` when tester validation was required
17
19
  - \`.ai/vcm/handoffs/docs-sync-report.md\` when durable docs could be affected
18
20
  - \`.ai/vcm/handoffs/known-issues.md\` when unresolved findings were recorded
19
21
  - \`.ai/vcm/gate-reviews/index.json\` and referenced Gate Review reports when Gate Reviews were required, skipped, or overridden
@@ -22,17 +24,17 @@ Read the relevant task evidence before deciding:
22
24
 
23
25
  ## Evidence Audit
24
26
 
25
- Check whether the required role evidence exists, is current, and gives a clear decision.
27
+ Check whether the required role evidence exists, is current, and gives a clear result or decision.
26
28
 
27
29
  Acceptable evidence must show:
28
30
 
29
31
  - architect plan or docs-sync decision when architecture, public contracts, durable docs, or known issues changed
30
- - reviewer decision and validation evidence when code, behavior, tests, or generated context changed
32
+ - tester \`Test Result: pass|fail\` and validation evidence when code, behavior, tests, or generated context changed
31
33
  - required Gate Review decisions, skip reasons, or override reasons when Gate Reviews were enabled
32
34
  - known-issues disposition when unresolved findings were recorded
33
35
  - explicit user approval for accepted high-risk decisions or intentionally skipped required gates
34
36
 
35
- ## File Scope Audit
37
+ ## Scope Traceability Audit
36
38
 
37
39
  Do not claim to prove that every diff hunk exactly matches the task.
38
40
 
@@ -40,7 +42,7 @@ Review the changed file list only, then classify files:
40
42
 
41
43
  - expected files: directly named by the user request, route message, durable plan, or architecture plan
42
44
  - supporting files: tests, fixtures, generated context, docs, or wiring needed for expected files
43
- - approved deviations: files explained by Replan, reviewer follow-up, docs-sync, or explicit user / project-manager approval
45
+ - approved deviations: files explained by Replan, tester follow-up, docs-sync, or explicit user / project-manager approval
44
46
  - unexplained files: files with no traceable reason in the task evidence
45
47
  - high-risk unexpected files: auth, permissions, payment, billing, schema, migrations, data deletion, secrets, dependencies, lockfiles, broad generated artifacts, or broad formatting churn
46
48
 
@@ -54,11 +56,11 @@ Check:
54
56
 
55
57
  - required route was followed, or an explicit exception is recorded
56
58
  - required handoff artifacts exist and are current
57
- - architecture plan completion, Replan, or architect follow-up decision is recorded
58
- - reviewer report records validation commands, results, skipped checks with reasons, and an acceptable decision
59
+ - architecture plan completion, Replan, or architect follow-up decision is recorded when architecture planning was required
60
+ - tester report records \`Test Result: pass|fail\`, validation commands, results, and skipped checks with reasons
59
61
  - required Gate Reviews are approved, skipped with a recorded reason, or overridden with a recorded reason
60
- - Gate Review enable state is confirmed authoritatively: do not infer that no Gate Reviews were required from an absent or empty \`.ai/vcm/gate-reviews/index.json\`. When Gate Review is enabled, a missing index or a required gate without a recorded decision means the gate was skipped — run the matching \`.ai/tools/request-gate-review --gate <gate>\` (the tool is the source of truth) and do not accept until each required gate returns \`approve\`/\`already_approved\`, \`disabled\`/\`not_required\`, or a recorded skip/override
61
- - docs-sync report records docs updated, docs intentionally left unchanged, or required follow-up
62
+ - Gate Review enable state is confirmed authoritatively: do not infer that no Gate Reviews were required from an absent or empty \`.ai/vcm/gate-reviews/index.json\`. When Gate Review is enabled, a missing index or a required gate without a recorded decision means the gate was skipped — run the matching command from the \`vcm-gate-review\` skill, including the code source for \`code-diff\`, and do not accept until each required gate returns \`approve\`/\`already_approved\`, \`disabled\`/\`not_required\`, or a recorded skip/override
63
+ - docs-sync report records docs updated, docs intentionally left unchanged, or required follow-up when docs sync was required
62
64
  - known issues are either resolved, promoted to durable docs by architect, or explicitly accepted
63
65
  - temporary task state is ready to clean after durable facts are promoted
64
66
 
@@ -69,11 +71,11 @@ Choose exactly one:
69
71
  - accepted
70
72
  - accepted-with-known-risks
71
73
  - needs-coder-follow-up
72
- - needs-architect-replan
74
+ - needs-architect-follow-up
73
75
  - needs-docs-sync
74
76
  - blocked-by-user-decision
75
77
 
76
- Do not accept when required role evidence is missing, required Gate Review evidence is missing, reviewer findings are unresolved, docs sync is missing for durable changes, known-issues disposition is missing, or unexplained high-risk files remain.
78
+ Do not accept when required role evidence is missing, required Gate Review evidence is missing, tester findings are unresolved, docs sync is missing for durable changes, known-issues disposition is missing, or unexplained high-risk files remain.
77
79
 
78
80
  ## Output
79
81
 
@@ -90,11 +92,11 @@ Use this structure:
90
92
 
91
93
  ## Decision
92
94
 
93
- accepted | accepted-with-known-risks | needs-coder-follow-up | needs-architect-replan | needs-docs-sync | blocked-by-user-decision
95
+ accepted | accepted-with-known-risks | needs-coder-follow-up | needs-architect-follow-up | needs-docs-sync | blocked-by-user-decision
94
96
 
95
97
  ## Evidence Reviewed
96
98
 
97
- ## File Scope
99
+ ## Scope Traceability
98
100
 
99
101
  ### Expected Files
100
102
 
@@ -110,6 +112,8 @@ accepted | accepted-with-known-risks | needs-coder-follow-up | needs-architect-r
110
112
 
111
113
  ## Review And Docs Sync
112
114
 
115
+ ## Known Issues Disposition
116
+
113
117
  ## Gate Review Gates
114
118
 
115
119
  ## Cleanup Readiness
@@ -7,6 +7,7 @@ This skill is an operating procedure. It does not replace the deterministic VCM
7
7
 
8
8
  ## Boundaries
9
9
 
10
+ - Work only in the active task worktree named by VCM.
10
11
  - Read the repository before drafting project-specific harness content.
11
12
  - Do not edit product source, product tests, package manifests, lockfiles, deployment config, or secrets.
12
13
  - Do not own managed-block writes, hook merging, manifest migrations, uninstall behavior, or deterministic skeleton creation; VCM backend owns those.
@@ -17,7 +18,7 @@ This skill is an operating procedure. It does not replace the deterministic VCM
17
18
  1. Generate context when supported: run \`.ai/tools/generate-module-index\`, then run \`.ai/tools/generate-public-surface\` after \`module-index.json\` exists.
18
19
  2. Inspect the project: read \`README.md\`, read \`CLAUDE.md\`, durable project docs, project manifests/config, source layout, tests, and existing validation commands.
19
20
  3. Fill project context: add or update non-managed project facts in \`CLAUDE.md\` above the VCM managed block.
20
- 4. Fill durable docs: update \`docs/ARCHITECTURE.md\`, module-level \`ARCHITECTURE.md\` files for clear non-root module boundaries, and \`docs/TESTING.md\` with detailed project-specific content.
21
+ 4. Fill durable docs: update \`docs/GLOSSARY.md\`, \`docs/CODING_STANDARDS.md\`, \`docs/ARCHITECTURE.md\`, module-level \`ARCHITECTURE.md\` files for clear non-root module boundaries, and \`docs/TESTING.md\` with detailed project-specific content.
21
22
  5. Preserve user-authored content and VCM managed blocks.
22
23
  6. Review \`git status\` and \`git diff\`.
23
24
  7. Stage only allowed bootstrap harness changes and create a commit in the active task worktree.
@@ -26,6 +27,8 @@ This skill is an operating procedure. It does not replace the deterministic VCM
26
27
  ## Typical Outputs
27
28
 
28
29
  - \`CLAUDE.md\` project context and project constraints outside the VCM managed block
30
+ - \`docs/GLOSSARY.md\`
31
+ - \`docs/CODING_STANDARDS.md\`
29
32
  - \`docs/ARCHITECTURE.md\`
30
33
  - \`docs/TESTING.md\`
31
34
  - \`docs/known-issues.md\` only for confirmed durable issues
@@ -47,6 +50,20 @@ This skill is an operating procedure. It does not replace the deterministic VCM
47
50
  - Run \`.ai/tools/generate-public-surface\` only after \`.ai/generated/module-index.json\` exists.
48
51
  - If generation fails or the project is unsupported, report the reason. Do not invent generated artifacts.
49
52
 
53
+ ### \`docs/GLOSSARY.md\`
54
+
55
+ - Keep the project abbreviation allowlist current.
56
+ - Include abbreviations that are allowed in durable comments and documentation.
57
+ - Remove or avoid project-invented shorthand that is not useful as durable terminology.
58
+ - If an abbreviation is not listed here, roles must write the full term instead.
59
+
60
+ ### \`docs/CODING_STANDARDS.md\`
61
+
62
+ - The shared baseline lives inside the VCM managed block and is installer-maintained; do not edit it.
63
+ - Add project-specific implementation rules outside the managed block (for example under \`Project Coding Standards\`) only when they make the shared baseline more precise.
64
+ - Do not weaken the baseline rules without explicit project approval.
65
+ - Keep role workflow rules out of this file; role routing, Gate Review, Final Acceptance, and role-specific handoff rules belong in role definitions or skills.
66
+
50
67
  ### \`docs/ARCHITECTURE.md\`
51
68
 
52
69
  - Document the project-level module overview, module responsibilities, module relationships, dependency direction, and project-wide constraints.
@@ -65,7 +82,7 @@ This skill is an operating procedure. It does not replace the deterministic VCM
65
82
  - Document validation levels, project-native validation commands, validation selection rules, final-validation cleanup, unit/integration test placement, generated-context freshness checks, and known testing gaps.
66
83
  - Document integration and E2E test cases as reviewable case lists. Each case should include ID, scenario, entry point, what it proves, key assertions, when to run, and current limitations when relevant.
67
84
  - Keep historical investigation details, superseded failures, temporary diagnostics, and per-task validation logs out of \`docs/TESTING.md\`.
68
- - Keep reviewer ownership of validation strategy and testing documentation clear.
85
+ - Keep tester ownership of validation strategy and testing documentation clear.
69
86
 
70
87
  ### Commit
71
88
 
@@ -7,7 +7,7 @@ Never run the Bash tool with \`run_in_background: true\`, and never detach a pro
7
7
 
8
8
  The only sanctioned long-running mechanism is \`.ai/tools/run-long-check\` plus \`.ai/tools/watch-job\` through this skill.
9
9
 
10
- The hard ceiling is 60 minutes per job, enforced by the job worker itself. Do not run or suggest operations expected to exceed 60 minutes without user approval; split larger work first.
10
+ The hard ceiling is 60 minutes per job, enforced by the job worker itself. No approval can raise this ceiling; split larger operations into jobs that each fit within it.
11
11
 
12
12
  ## Protocol
13
13
 
@@ -11,7 +11,9 @@ Write one markdown file under:
11
11
  \${VCM_BASE_REPO_ROOT}/.ai/vcm/harness-feedback/pending/
12
12
  \`\`\`
13
13
 
14
- If \`VCM_BASE_REPO_ROOT\` is not set, use the current git root as a fallback.
14
+ If \`VCM_BASE_REPO_ROOT\` is not set, do not guess a fallback path. Report the
15
+ environment problem to project-manager so VCM can retry with the correct base
16
+ repository root.
15
17
 
16
18
  Use a filename like:
17
19
 
@@ -23,17 +25,21 @@ Use only safe filename characters: letters, numbers, dot, dash, and underscore.
23
25
 
24
26
  ## Required Content
25
27
 
26
- The file must include:
27
-
28
- - reporter role
29
- - task slug when known
30
- - summary
31
- - observed problem
32
- - expected behavior
33
- - evidence, with relevant file paths, command names, logs, or repeated failure pattern
34
- - suspected harness area
35
- - impact
36
- - urgency
28
+ Use this structure:
29
+
30
+ \`\`\`md
31
+ # <short problem title>
32
+
33
+ - Reporter role: <role>
34
+ - Task slug: <slug or unknown>
35
+ - Summary: <one line>
36
+ - Observed problem: <what happened>
37
+ - Expected behavior: <what the harness should have done>
38
+ - Evidence: <file paths, command names, logs, or repeated failure pattern>
39
+ - Suspected harness area: <skill, role definition, tool, routing, validation, bootstrap, or managed instruction>
40
+ - Impact: <who is affected and how>
41
+ - Urgency: low | medium | high
42
+ \`\`\`
37
43
 
38
44
  ## Constraints
39
45