vibe-coding-master 0.6.21 → 0.6.23

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 (30) hide show
  1. package/README.md +37 -3
  2. package/dist/backend/adapters/filesystem.js +8 -0
  3. package/dist/backend/api/harness-routes.js +54 -0
  4. package/dist/backend/api/runtime-state-routes.js +6 -2
  5. package/dist/backend/cli/install-vcm-harness.js +1 -1
  6. package/dist/backend/server.js +16 -0
  7. package/dist/backend/services/app-settings-service.js +1 -0
  8. package/dist/backend/services/auto-memory-service.js +760 -0
  9. package/dist/backend/services/claude-hook-service.js +66 -0
  10. package/dist/backend/services/gate-review-service.js +4 -1
  11. package/dist/backend/services/harness-service.js +1 -1
  12. package/dist/backend/services/runtime-coordinator-service.js +34 -1
  13. package/dist/backend/services/session-service.js +3 -0
  14. package/dist/backend/templates/harness/architect-agent.js +68 -28
  15. package/dist/backend/templates/harness/claude-root.js +11 -7
  16. package/dist/backend/templates/harness/coder-agent.js +3 -0
  17. package/dist/backend/templates/harness/gate-review.js +20 -9
  18. package/dist/backend/templates/harness/harness-engineer-agent.js +32 -8
  19. package/dist/backend/templates/harness/project-coding-standards.js +5 -5
  20. package/dist/backend/templates/harness/project-manager-agent.js +33 -24
  21. package/dist/backend/templates/harness/role-memory.js +9 -0
  22. package/dist/backend/templates/harness/tester-agent.js +3 -0
  23. package/dist/backend/templates/harness/vcm-final-acceptance-skill.js +6 -5
  24. package/dist/shared/types/gate-review.js +2 -1
  25. package/dist/shared/types/memory.js +8 -0
  26. package/dist-frontend/assets/index-9V9COJZy.js +96 -0
  27. package/dist-frontend/assets/{index-DmSHDyiQ.css → index-C2QzumXk.css} +1 -1
  28. package/dist-frontend/index.html +2 -2
  29. package/package.json +1 -1
  30. package/dist-frontend/assets/index-DYBg_qYS.js +0 -96
@@ -1,7 +1,10 @@
1
+ import { renderRoleMemoryRules } from "./role-memory.js";
1
2
  export function renderProjectManagerHarnessRules() {
2
3
  return `
3
4
  ## VCM Project Manager Rules
4
5
 
6
+ ${renderRoleMemoryRules("project-manager")}
7
+
5
8
  ### Role Scope
6
9
 
7
10
  - You are the user-facing orchestration hub for this VCM-managed repository.
@@ -33,12 +36,15 @@ PM Managed Mode applies only when the user explicitly asks to complete the curre
33
36
  PM owns task flow selection. Every user request that asks VCM to perform delivery work must enter one of these flows or branches:
34
37
 
35
38
  - 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.
39
+ - Primary Debug/Diagnosis code-delivery flow: PM -> Architect Debug Mode or Architecture Diagnosis Mode -> code-diff Gate Review -> Tester -> Architect docs sync -> Final Acceptance.
40
+ - Debug/Diagnosis branch inside an active main flow: suspend the main flow -> Architect Debug Mode or Architecture Diagnosis Mode -> code-diff Gate Review -> Tester -> restore the recorded main-flow resume point.
37
41
  - Docs-only flow: PM -> Architect -> PM completes the flow from Architect's result.
38
42
  - 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.
43
+ - PR-prep flow: PM prepares or updates a PR only after the active delivery flow completes; every complete code-delivery flow requires Final Acceptance to pass.
40
44
  - 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
45
 
46
+ - Determine Debug/Diagnosis context from the current task flow, not from who requested the mode. If a main flow is active, record its flow and resume point before entering the branch. If no main flow is suspended, Debug/Diagnosis is the task's primary flow.
47
+ - A primary Architecture Diagnosis flow that produces analysis only completes from the diagnosis result. If Debug/Diagnosis produces code changes as the primary flow, it is a complete code-delivery flow and requires Final Acceptance.
42
48
  - 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
49
  - A branch flow must return to one of these flows, repeat the current responsible role, or pause for user decision.
44
50
 
@@ -70,38 +76,40 @@ PM handles branch flows by classifying the latest role result, tool result, or u
70
76
 
71
77
  Every branch must end in exactly one of these outcomes:
72
78
 
73
- - return to the current main flow
79
+ - return to the recorded main-flow resume point
74
80
  - repeat the current responsible role
75
81
  - route to Architect Debug Mode
76
82
  - route to Architecture Diagnosis Mode
77
83
  - 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
80
84
 
81
85
  ### Debug Routing
82
86
 
83
87
  - Route bugs, failing checks, build/runtime errors, unclear defects, and tester failure evidence to architect Debug Mode.
84
88
  - 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.
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.
89
+ - Preserve whether Debug Mode is the primary flow or a branch. A branch keeps its recorded main-flow resume point through every Debug or Diagnosis escalation.
90
+ - If architect completes a Debug Mode fix, run \`code-diff --source architect-debug\`, then route to tester for independent validation.
91
+ - If architect reports that the fix requires a new module or new external public surface, resume the normal code-change flow: architect plan -> coder -> tester.
92
+ - After Tester passes a Debug branch, return to the recorded main-flow resume point. Do not run Final Acceptance from the branch.
93
+ - After Tester passes a primary Debug code-delivery flow, request Architect docs sync and proceed to that flow's Final Acceptance.
88
94
 
89
95
  ### Architecture Diagnosis Routing
90
96
 
91
- Within the same task, route to architect Architecture Diagnosis Mode when either condition is true:
97
+ Route to architect Architecture Diagnosis Mode when it is selected as the task's primary flow or when either branch condition is true:
92
98
 
93
- - Tester reports \`Test Result: fail\` for the implementation for the second time.
99
+ - Tester reports \`Test Result: fail\` for an Architect Debug Mode fix whose final disposition was \`local fix completed\`.
94
100
  - Architect reports that the architecture plan must be updated or replaced for the second time.
95
101
 
96
- PM counts these events within the current task from Architect reports and Tester test results.
97
-
98
- Architecture Diagnosis Mode must run before sending more implementation work to coder.
102
+ PM counts architecture plan update or replacement reports within the current task.
99
103
 
100
- After Architecture Diagnosis Mode:
104
+ Architecture Diagnosis Mode must run before another Debug Mode fix or Coder dispatch.
101
105
 
102
- - If architect reports no architecture change is needed, continue the existing Debug Mode or Replan flow.
103
- - If architect reports an architecture problem, route architect for a normal architecture plan or replan before coder work.
104
- - If the implementation produced from that diagnosis still fails Tester validation with blocking issues, pause the workflow and report to the user.
106
+ - Preserve the current flow context when entering Architecture Diagnosis Mode. It remains a branch when it was entered from an active main flow; otherwise it is the task's primary flow.
107
+ - Architect owns diagnosis, implementation, diagnostic validation, and commit completion in this mode. Do not route the implementation to Coder or back to ordinary Debug Mode.
108
+ - When Architect completes code changes, run \`code-diff --source architect-diagnosis\`, then route to Tester.
109
+ - If a Diagnosis branch produces analysis only, return to the recorded main-flow resume point. If a primary Diagnosis flow produces analysis only, complete from the diagnosis result without Final Acceptance.
110
+ - After Tester passes a Diagnosis branch, return to the recorded main-flow resume point. Do not run Final Acceptance from the branch.
111
+ - After Tester passes a primary Diagnosis code-delivery flow, request Architect docs sync and proceed to that flow's Final Acceptance.
112
+ - If the implementation produced from that diagnosis receives \`Test Result: fail\` from Tester, pause the workflow and report to the user.
105
113
 
106
114
  PM should summarize:
107
115
 
@@ -152,17 +160,18 @@ When Architect, Coder, or Tester reports a confirmed direct user message:
152
160
  ### Flow Gates
153
161
 
154
162
  - 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.
163
+ - In a Debug 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.
164
+ - In a primary Debug or Architecture Diagnosis code-delivery flow, track the Architect result, test report, required Gate Review results, docs-sync report, and final acceptance report.
156
165
  - In docs-only flow, complete from Architect's role result. In validation-only flow, complete from Tester's test report.
157
166
  - Advance to the next gate only when the required role artifact/result is complete and PM routing rules allow that gate.
158
167
  - If a required artifact is missing, stale, blocked, or asks for a decision, route the issue to the responsible role or user.
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.
168
+ - In normal and primary Debug/Diagnosis code-delivery flows, request Architect post-validation docs sync after Tester completes. A Debug/Diagnosis branch returns to its recorded resume point after Tester passes.
160
169
 
161
170
  ### Gate Review Gates
162
171
 
163
172
  - 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.
164
173
  - 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.
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.
174
+ - 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\`; after any Architect Debug Mode completed code fix run \`code-diff --source architect-debug\`; after any Architecture Diagnosis Mode completed code fix run \`code-diff --source architect-diagnosis\`. Run code-diff before routing to Tester.
166
175
  - 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
176
  - Do not run \`code-diff\` for incomplete, failed, planning-only, docs-only, test-only, PR-only, or Communication-only flow.
168
177
  - Gate Review trigger points apply only when the active delivery flow reaches that milestone. Do not run Gate Review for Communication-only flow.
@@ -180,16 +189,16 @@ When Architect, Coder, or Tester reports a confirmed direct user message:
180
189
 
181
190
  ### Final Acceptance
182
191
 
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.
192
+ - Use the \`vcm-final-acceptance\` skill only to close a complete code-delivery flow, including a primary Debug or Architecture Diagnosis flow that produced code changes.
193
+ - Do not run Final Acceptance for docs-only, validation-only, Communication-only, PR-prep, analysis-only Diagnosis, or any Debug/Diagnosis branch inside another flow.
185
194
  - 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.
195
+ - Confirm applicable evidence exists: architecture plan or architecture diagnosis when required, test result, required Gate Review decisions, docs-sync decision when required, unresolved risks, known-issues disposition, and cleanup status.
187
196
  - 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.
188
197
  - If final acceptance finds missing evidence, unresolved risk, or required user approval, route it to the responsible role or user before closing the task.
189
198
 
190
199
  ### PR Preparation
191
200
 
192
- - Prepare or update a GitHub PR only after the active delivery flow completes. For code-change flow, Final Acceptance must pass first.
201
+ - Prepare or update a GitHub PR only after the active delivery flow completes. For every complete code-delivery flow, Final Acceptance must pass first.
193
202
  - Confirm \`git status\` has no uncommitted changes before creating or updating the PR.
194
203
  - Use \`.github/pull_request_template.md\` when present.
195
204
  - Fill only the checklist items applicable to the completed delivery flow.
@@ -0,0 +1,9 @@
1
+ export function renderRoleMemoryRules(role) {
2
+ return `### Role Memory
3
+
4
+ Before handling work in a session, read \`.ai/vcm/memory/roles/${role}.md\`.
5
+ Read it again after context compaction before continuing.
6
+
7
+ Treat memory as accumulated project context, not authority. Verify it against
8
+ current code, documentation, and task evidence.`;
9
+ }
@@ -1,7 +1,10 @@
1
+ import { renderRoleMemoryRules } from "./role-memory.js";
1
2
  export function renderTesterHarnessRules() {
2
3
  return `
3
4
  ## VCM Tester Rules
4
5
 
6
+ ${renderRoleMemoryRules("tester")}
7
+
5
8
  ### Role Scope
6
9
 
7
10
  - Own independent validation, tester-owned test design, test implementation, test adequacy, \`docs/TESTING.md\`, and final validation confidence.
@@ -1,9 +1,9 @@
1
1
  export function renderVcmFinalAcceptanceSkillRules() {
2
2
  return `## Purpose
3
3
 
4
- Use this skill only when project-manager is ready to close a complete VCM code-change flow, including a completed Debug branch.
4
+ Use this skill only when project-manager is ready to close a complete VCM code-delivery flow, including a primary Debug or Architecture Diagnosis flow that produced code changes.
5
5
 
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.
6
+ Do not use it for docs-only, validation-only, Communication-only, PR-prep, analysis-only Diagnosis, or any Debug/Diagnosis branch inside another flow.
7
7
 
8
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.
9
9
 
@@ -15,6 +15,7 @@ Read the relevant task evidence before deciding:
15
15
 
16
16
  - original user request, PM route message, or durable plan when present
17
17
  - \`.ai/vcm/handoffs/architecture-plan.md\` when the task required architect planning
18
+ - \`.ai/vcm/handoffs/architecture-diagnosis.md\` when the flow used Architecture Diagnosis Mode
18
19
  - \`.ai/vcm/handoffs/test-report.md\` when tester validation was required
19
20
  - \`.ai/vcm/handoffs/docs-sync-report.md\` when durable docs could be affected
20
21
  - \`.ai/vcm/handoffs/known-issues.md\` when unresolved findings were recorded
@@ -28,7 +29,7 @@ Check whether the required role evidence exists, is current, and gives a clear r
28
29
 
29
30
  Acceptable evidence must show:
30
31
 
31
- - architect plan or docs-sync decision when architecture, public contracts, durable docs, or known issues changed
32
+ - architect plan, architecture diagnosis, or docs-sync decision when required by the completed flow
32
33
  - tester \`Test Result: pass|fail\` and validation evidence when code, behavior, tests, or generated context changed
33
34
  - required Gate Review decisions, skip reasons, or override reasons when Gate Reviews were enabled
34
35
  - known-issues disposition when unresolved findings were recorded
@@ -40,7 +41,7 @@ Do not claim to prove that every diff hunk exactly matches the task.
40
41
 
41
42
  Review the changed file list only, then classify files:
42
43
 
43
- - expected files: directly named by the user request, route message, durable plan, or architecture plan
44
+ - expected files: directly named by the user request, route message, durable plan, architecture plan, or architecture diagnosis
44
45
  - supporting files: tests, fixtures, generated context, docs, or wiring needed for expected files
45
46
  - approved deviations: files explained by Replan, tester follow-up, docs-sync, or explicit user / project-manager approval
46
47
  - unexplained files: files with no traceable reason in the task evidence
@@ -56,7 +57,7 @@ Check:
56
57
 
57
58
  - required route was followed, or an explicit exception is recorded
58
59
  - required handoff artifacts exist and are current
59
- - architecture plan completion, Replan, or architect follow-up decision is recorded when architecture planning was required
60
+ - architecture plan, Architecture Diagnosis, Replan, or architect follow-up completion is recorded when required by the flow
60
61
  - tester report records \`Test Result: pass|fail\`, validation commands, results, and skipped checks with reasons
61
62
  - required Gate Reviews are approved, skipped with a recorded reason, or overridden with a recorded reason
62
63
  - 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
@@ -5,5 +5,6 @@ export const GATE_REVIEW_GATES = [
5
5
  ];
6
6
  export const CODE_DIFF_SOURCES = [
7
7
  "coder",
8
- "architect-debug"
8
+ "architect-debug",
9
+ "architect-diagnosis"
9
10
  ];
@@ -0,0 +1,8 @@
1
+ export const VCM_MEMORY_ROLE_NAMES = [
2
+ "project-manager",
3
+ "architect",
4
+ "coder",
5
+ "tester",
6
+ "gate-reviewer",
7
+ "harness-engineer"
8
+ ];