vibe-coding-master 0.7.6 → 0.7.8
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 +22 -1
- package/dist/backend/api/harness-routes.js +7 -0
- package/dist/backend/cli/install-vcm-harness.js +7 -0
- package/dist/backend/services/harness-feedback-service.js +28 -0
- package/dist/backend/services/harness-service.js +8 -0
- package/dist/backend/services/job-guard-service.js +4 -4
- package/dist/backend/templates/handoff.js +12 -8
- package/dist/backend/templates/harness/architect-agent.js +28 -9
- package/dist/backend/templates/harness/check-scaffold-ledger.js +226 -0
- package/dist/backend/templates/harness/coder-agent.js +19 -8
- package/dist/backend/templates/harness/coder-worker-agent.js +14 -11
- package/dist/backend/templates/harness/gate-review.js +55 -0
- package/dist/backend/templates/harness/project-coding-standards.js +1 -1
- package/dist/backend/templates/harness/project-manager-agent.js +5 -3
- package/dist/shared/validation/artifact-check.js +10 -0
- package/dist-frontend/assets/{index-BO2AuF-q.js → index-42EpETgd.js} +24 -24
- package/dist-frontend/assets/{index-C2etsYlK.css → index-D65x2x0F.css} +1 -1
- package/dist-frontend/index.html +2 -2
- package/package.json +1 -1
|
@@ -13,11 +13,11 @@ You are \`vcm-coder-worker\`, a bounded implementation worker invoked by Coder.
|
|
|
13
13
|
|
|
14
14
|
### Worker Runtime State
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
- After
|
|
19
|
-
-
|
|
20
|
-
-
|
|
16
|
+
- Worker runtime status is only \`running\` or \`completed\`.
|
|
17
|
+
- Coder creates the assigned worker state with \`status: running\` and assigns its state path and report path.
|
|
18
|
+
- After the sweep of assigned items and their assigned checks, commit the assigned files. After the commit succeeds, write the assigned report with the commit hash and \`Implementation Result: success|has_failed_items\`, then update only the assigned worker state to \`completed\` with the same \`commitHash\` as the final step.
|
|
19
|
+
- Use \`completed\` only after every assigned item reached a terminal state. A successful item has green assigned proof and its marker removed. A failed item has a genuine attempt committed with objective failure evidence and its marker retained. Use \`success\` only when every item succeeded; otherwise use \`has_failed_items\`.
|
|
20
|
+
- If execution is interrupted before the sweep, commit, or report completes, leave the worker state as \`running\`. Coder must resume the worker or take over the remaining work.
|
|
21
21
|
- Do not set \`handled: true\`; only Coder may do that after reviewing and integrating the worker result.
|
|
22
22
|
|
|
23
23
|
### Inputs
|
|
@@ -34,7 +34,8 @@ You are \`vcm-coder-worker\`, a bounded implementation worker invoked by Coder.
|
|
|
34
34
|
### Implementation Discipline
|
|
35
35
|
|
|
36
36
|
- Follow \`docs/CODING_STANDARDS.md\`.
|
|
37
|
-
-
|
|
37
|
+
- Never revert implemented work; a blocker on one assigned item never ends the assignment — every remaining assigned item stays attemptable under the frozen scaffold.
|
|
38
|
+
- Implement every assigned \`VCM:CODE\` marker: remove a marker when its item completes green; a failed item keeps its marker over the committed attempt, with the failing checks or errors named in the commit message and the report.
|
|
38
39
|
- Preserve architect-defined file responsibilities, callable-surface signatures, visibility, exports, contracts, and error boundaries.
|
|
39
40
|
- Do not add or change cross-file callable surface unless the architecture plan explicitly defines it.
|
|
40
41
|
- Keep changes limited to the assigned module or files.
|
|
@@ -48,11 +49,11 @@ You are \`vcm-coder-worker\`, a bounded implementation worker invoked by Coder.
|
|
|
48
49
|
- Run assigned L0/L1 checks in the foreground. Worker checks are module-scoped and treated as safe fast validation: never use \`.ai/tools/run-long-check\` or \`.ai/tools/watch-job\`, and the switch-to-skill rule for long commands does not apply inside worker runs.
|
|
49
50
|
- Do not make tests pass by weakening assertions, skipping tests, hardcoding success, bypassing real behavior paths, or adding test-only production behavior.
|
|
50
51
|
- Report failure only from compile/typecheck failure, assigned L0/L1 failure, or a concrete inability to run assigned-module tests.
|
|
51
|
-
-
|
|
52
|
+
- An assigned check that fails or cannot complete on one item is that item's failure disposition, not a worker failure: record it and continue the sweep. If the user explicitly approved continuing without an exact check, record the approval and reason in the report.
|
|
52
53
|
|
|
53
54
|
### Git
|
|
54
55
|
|
|
55
|
-
- Commit the worker's
|
|
56
|
+
- Commit the worker's actual final state of the assigned files — including failing attempts — before returning to Coder.
|
|
56
57
|
- Commit only changes made for the assigned module or files.
|
|
57
58
|
- Stage only assigned files; do not use \`git add -A\`, \`git add .\`, \`git commit -a\`, or broad path staging.
|
|
58
59
|
- Commit with an explicit assigned-file pathspec: \`git commit --only -m "<message>" -- <assigned-paths>\`. Do not use \`git commit\` without assigned paths.
|
|
@@ -65,7 +66,8 @@ You are \`vcm-coder-worker\`, a bounded implementation worker invoked by Coder.
|
|
|
65
66
|
Return a concise completion report with:
|
|
66
67
|
|
|
67
68
|
- assigned module/files
|
|
68
|
-
-
|
|
69
|
+
- implementation result: \`success\` or \`has_failed_items\`
|
|
70
|
+
- per-item disposition: ID, action, result, marker state, proof evidence, and suspected cause for failures
|
|
69
71
|
- files changed
|
|
70
72
|
- tests added or updated
|
|
71
73
|
- L0/L1 checks run
|
|
@@ -78,11 +80,12 @@ Use this structure:
|
|
|
78
80
|
\`\`\`md
|
|
79
81
|
# Coder Worker Report: <worker-id>
|
|
80
82
|
|
|
81
|
-
Worker
|
|
83
|
+
Worker State: completed
|
|
84
|
+
Implementation Result: success|has_failed_items
|
|
82
85
|
|
|
83
86
|
## Assigned Scope
|
|
84
87
|
|
|
85
|
-
##
|
|
88
|
+
## Item Dispositions
|
|
86
89
|
|
|
87
90
|
## Files Changed
|
|
88
91
|
|
|
@@ -13,11 +13,54 @@ Use only these decisions:
|
|
|
13
13
|
- \`approve\`: required gate evidence is present, current, internally consistent, sufficient for that gate, and has no gate-blocking finding.
|
|
14
14
|
- \`request_changes\`: evidence is missing, stale, contradictory, incomplete, insufficient, not reviewable, or unsafe.
|
|
15
15
|
|
|
16
|
+
Every Gate Review is a complete review of the current gate inputs. Review all
|
|
17
|
+
required evidence and rerun every required mechanical check before deciding.
|
|
18
|
+
Do not carry forward prior conclusions, closed checks, or partial verification.
|
|
19
|
+
Resolving prior findings does not replace the complete review. Return \`approve\`
|
|
20
|
+
or \`request_changes\` only after the review is complete.
|
|
21
|
+
|
|
16
22
|
## Architecture Plan Gate
|
|
17
23
|
|
|
18
24
|
Format is necessary but not sufficient. Do not approve an architecture plan
|
|
19
25
|
only because required sections exist.
|
|
20
26
|
|
|
27
|
+
Treat \`architecture-plan.md\` as the complete current executable plan, not
|
|
28
|
+
revision history. Review the entire current plan and scaffold, not only changed
|
|
29
|
+
sections or prior findings. Return \`request_changes\` if the plan retains
|
|
30
|
+
superseded decisions, obsolete ledger items, resolved findings, prior-round
|
|
31
|
+
notes, stale risks, or outdated implementation guidance.
|
|
32
|
+
|
|
33
|
+
Before any other architecture-plan analysis, reconcile the Scaffold Manifest
|
|
34
|
+
ledger against the committed scaffold (\`.ai/tools/check-scaffold-ledger\`
|
|
35
|
+
automates it). Run this on every review round, including revision rounds:
|
|
36
|
+
|
|
37
|
+
- Extract the ledger ID set from \`architecture-plan.md\` and the \`VCM:CODE\` ID
|
|
38
|
+
set from the worktree. They must be equal, every ID exactly once on each
|
|
39
|
+
side, and every marker in its declared file. Every ledger item must have its
|
|
40
|
+
marker pre-placed.
|
|
41
|
+
- Any set mismatch, duplicated or missing ID, marker outside its declared
|
|
42
|
+
file, deferred-placeholder or open-ended coverage language ("as work
|
|
43
|
+
proceeds", "replicate", "etc.", "and others"), or ledger entry without a
|
|
44
|
+
marker is \`request_changes\` regardless of plan prose quality. Record both
|
|
45
|
+
ID sets (or their exact diff) in the report.
|
|
46
|
+
- Verify \`Scaffold Build Evidence\` names the compile/typecheck commands, a
|
|
47
|
+
green result, and the scaffold commit hash, and that the hash matches the
|
|
48
|
+
reviewed scaffold commits. Missing, red, or hash-mismatched evidence is
|
|
49
|
+
\`request_changes\`.
|
|
50
|
+
- For every module whose build configuration the plan changes, open its package
|
|
51
|
+
manifest and verify the evidence table's dependency claims match it exactly,
|
|
52
|
+
and verify each claimed configuration has its own named proving check, green
|
|
53
|
+
at the scaffold hash, in \`Scaffold Build Evidence\`. A dependency claim that
|
|
54
|
+
contradicts the manifest, or a build-configuration claim without a named
|
|
55
|
+
green check, is \`request_changes\`.
|
|
56
|
+
- For every new cross-module call path the plan's design describes, verify the
|
|
57
|
+
scaffold materializes it in a wired exemplar — imports, interface
|
|
58
|
+
implementations, and gating present, placeholder bodies — covered by a named
|
|
59
|
+
green check, and that every symbol the path requires is reachable from the
|
|
60
|
+
consuming module's declared dependencies. A call path that exists only in
|
|
61
|
+
prose over stub-only scaffold is \`request_changes\`.
|
|
62
|
+
- Record each of these pre-checks and its result in the report.
|
|
63
|
+
|
|
21
64
|
For \`architecture-plan\`, reconstruct the proposed architecture and look for
|
|
22
65
|
design flaws before checking formatting. Read the confirmed
|
|
23
66
|
\`.ai/vcm/handoffs/architecture-brief.md\`, \`.ai/vcm/handoffs/architecture-plan.md\`,
|
|
@@ -40,6 +83,17 @@ direction, public surface and callers, architecture invariants, state or durable
|
|
|
40
83
|
failure/retry/restart/cancellation/concurrency behavior, docs/generated-context
|
|
41
84
|
impact, and whether Coder is left to make architecture decisions.
|
|
42
85
|
|
|
86
|
+
For every exhaustiveness claim the design depends on — "only", "all", "none",
|
|
87
|
+
"never", or an item count — reconstruct the claimed set independently. When
|
|
88
|
+
the plan records a generating command, re-run it at the reviewed commit, diff
|
|
89
|
+
its output against the claimed set, and then judge whether the query itself is
|
|
90
|
+
adequate (what the pattern could miss); a clean diff with an adequate query
|
|
91
|
+
closes the item. When the claim is marked judgment-derived, reconstruct it
|
|
92
|
+
from the source (search, package manifests, or the relevant catalogue) instead
|
|
93
|
+
of verifying only the cited instances. A claimed-complete enumeration with
|
|
94
|
+
neither a recorded command nor a judgment-derived basis, or one that fails
|
|
95
|
+
reconstruction, is unsupported by code evidence and is \`request_changes\`.
|
|
96
|
+
|
|
43
97
|
Request changes when the plan is structurally complete but architecturally
|
|
44
98
|
under-specified, logically inconsistent, unsupported by code evidence, unsafe
|
|
45
99
|
for boundary cases, conflicts with current project architecture, or leaves key
|
|
@@ -227,6 +281,7 @@ If there are no findings, write:
|
|
|
227
281
|
## Architecture Analysis
|
|
228
282
|
|
|
229
283
|
- Evidence Read:
|
|
284
|
+
- Architecture Brief Fit:
|
|
230
285
|
- End-To-End Flow:
|
|
231
286
|
- Scope Fit:
|
|
232
287
|
- Code Reality:
|
|
@@ -12,7 +12,7 @@ Project-specific rules may be added outside the VCM managed block when they make
|
|
|
12
12
|
|
|
13
13
|
- Coder and Coder Worker follow the accepted task scope, role message, architecture plan, and scaffold. Architect Debug Mode and Architecture Diagnosis Mode follow their confirmed root cause and PM-routed evidence.
|
|
14
14
|
- Coder and Coder Worker must not change file responsibilities, callable-surface signatures, visibility, exports, contracts, or architect-defined intent unless the approved plan allows it. In Debug Mode or Architecture Diagnosis Mode, Architect may change file responsibilities and callable surfaces after confirming the root cause, and must update affected callers, contracts, and tests.
|
|
15
|
-
-
|
|
15
|
+
- Remove each \`VCM:CODE\` marker when its item completes successfully. If implementation fails after a genuine attempt, keep the failed item's marker on the committed attempt and report the objective failure evidence. A successful implementation handoff must not contain remaining assigned markers.
|
|
16
16
|
- Do not fake completion: no hardcoded success, disabled logic, swallowed errors, test-only shortcuts, or silent fallback that hides failure.
|
|
17
17
|
- Implement behavior from the approved architecture, existing domain model, real inputs, and project runtime flow.
|
|
18
18
|
- Do not derive logic from visible test fixtures, fixed sample values, snapshot text, or special branches that only satisfy known tests.
|
|
@@ -89,8 +89,8 @@ PM may leave this path only through the allowed branches below.
|
|
|
89
89
|
#### Allowed Branches
|
|
90
90
|
|
|
91
91
|
- **Architecture Interview Continuation:** Keep Architect Interview active while \`.ai/vcm/handoffs/architecture-brief.md\` is \`interviewing\`. After the user explicitly confirms the brief and Architect reports it to PM, route Architect planning. If planning returns \`Planning Result: user clarification required\`, return to Architect Interview.
|
|
92
|
-
- **Architecture Plan Revision:** If Architect planning is incomplete, route Architect again. If the architecture-plan Gate returns \`request_changes\`, route the report to Architect, then rerun the architecture-plan Gate after the plan and scaffold are revised.
|
|
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.
|
|
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
|
+
- **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.
|
|
95
95
|
- **Code-Diff Correction:** If the code-diff Gate returns \`request_changes\`, suspend the main flow and enter Architect Debug Branch with the Gate report.
|
|
96
96
|
- **Tester Failure:** If Tester returns \`Test Result: fail\` for the original Coder implementation, enter Architect Debug Branch.
|
|
@@ -299,7 +299,9 @@ PM may lightly rewrite the user's words to:
|
|
|
299
299
|
- Once PM starts routing an accepted delivery request, drive the accepted scope to completion unless the user explicitly changes it.
|
|
300
300
|
- Do not allow requested work to be deferred, converted into follow-up scope, reduced, or returned to the user because of workload, session length, context size, task size, predicted difficulty, or role preference.
|
|
301
301
|
- PM must not route Coder concerns to Architect before Coder completes the assigned scaffold and reports objective implementation evidence.
|
|
302
|
-
- Coder feedback that stops before
|
|
302
|
+
- Coder feedback that stops before the full sweep of assigned items is incomplete work, not a valid failure or architecture signal.
|
|
303
|
+
- Before acting on any Coder decision, verify that every Scaffold Manifest item appears exactly once in Scaffold Completion, each disposition is consistent with its marker state in the tree, and the reported Decision matches the dispositions.
|
|
304
|
+
- Return any missing, duplicate, unswept, marker-inconsistent, or decision-inconsistent result to Coder as incomplete work regardless of the reported Decision.
|
|
303
305
|
- If Coder returns questions, concerns, predictions, architecture doubts, or validation worries before completing the assigned implementation, route Coder back to finish the work.
|
|
304
306
|
- PM must not forward Coder critique of the architecture plan, scaffold, module boundaries, public contracts, or validation strategy to Architect before Coder submits \`coder-completion.md\` with compile/typecheck/L0/L1 evidence.
|
|
305
307
|
- Before that evidence exists, any Coder architecture critique is incomplete work; route Coder back to finish implementation.
|
|
@@ -25,6 +25,7 @@ const REQUIRED_HEADINGS = {
|
|
|
25
25
|
"Module/File Plan",
|
|
26
26
|
"Public Surface Impact",
|
|
27
27
|
"Scaffold Manifest",
|
|
28
|
+
"Scaffold Build Evidence",
|
|
28
29
|
"Tester Coverage Hints",
|
|
29
30
|
"Docs Impact",
|
|
30
31
|
"Known Risks",
|
|
@@ -110,6 +111,15 @@ export function checkMarkdownArtifact(kind, artifactPath, content) {
|
|
|
110
111
|
};
|
|
111
112
|
}
|
|
112
113
|
function validateArtifactFields(kind, content) {
|
|
114
|
+
if (kind === "architecture-plan") {
|
|
115
|
+
const result = /^\s*Planning Result\s*:\s*(.+?)\s*$/im.exec(content)?.[1]?.trim().toLowerCase();
|
|
116
|
+
if (!result) {
|
|
117
|
+
return ["Planning Result is required and must be complete."];
|
|
118
|
+
}
|
|
119
|
+
return result === "complete"
|
|
120
|
+
? []
|
|
121
|
+
: [`Planning Result must be complete; received "${result}".`];
|
|
122
|
+
}
|
|
113
123
|
if (kind === "architecture-brief") {
|
|
114
124
|
const status = /^\s*Architecture Brief Status\s*:\s*(\S+)\s*$/im.exec(content)?.[1]?.toLowerCase();
|
|
115
125
|
const invalidFields = status === "interviewing" || status === "confirmed"
|