vibe-coding-master 0.7.43 → 0.7.44

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 (42) hide show
  1. package/README.md +40 -13
  2. package/dist/backend/api/artifact-routes.js +3 -0
  3. package/dist/backend/api/harness-routes.js +16 -0
  4. package/dist/backend/api/task-routes.js +1 -0
  5. package/dist/backend/api/workflow-control-routes.js +12 -0
  6. package/dist/backend/cli/install-vcm-harness.js +21 -0
  7. package/dist/backend/server.js +3 -1
  8. package/dist/backend/services/artifact-service.js +7 -30
  9. package/dist/backend/services/auto-memory-service.js +640 -12
  10. package/dist/backend/services/claude-hook-service.js +80 -2
  11. package/dist/backend/services/gate-review-service.js +173 -74
  12. package/dist/backend/services/harness-feedback-service.js +76 -78
  13. package/dist/backend/services/harness-service.js +27 -3
  14. package/dist/backend/services/runtime-coordinator-service.js +2 -1
  15. package/dist/backend/services/status-service.js +1 -0
  16. package/dist/backend/services/translation-worker-service.js +19 -4
  17. package/dist/backend/services/workflow-control-service.js +96 -12
  18. package/dist/backend/templates/handoff.js +44 -2
  19. package/dist/backend/templates/harness/architect-agent.js +13 -7
  20. package/dist/backend/templates/harness/architect-scaffold-worker-agent.js +1 -1
  21. package/dist/backend/templates/harness/check-scaffold-ledger.js +234 -10
  22. package/dist/backend/templates/harness/claude-root.js +3 -2
  23. package/dist/backend/templates/harness/coder-agent.js +8 -0
  24. package/dist/backend/templates/harness/gate-review.js +144 -49
  25. package/dist/backend/templates/harness/harness-engineer-agent.js +25 -10
  26. package/dist/backend/templates/harness/project-manager-agent.js +16 -10
  27. package/dist/backend/templates/harness/resolve-durable-doc-assignment.js +60 -0
  28. package/dist/backend/templates/harness/tester-agent.js +13 -0
  29. package/dist/backend/templates/harness/vcm-ask-user-skill.js +82 -0
  30. package/dist/backend/templates/harness/vcm-code-navigation-skill.js +7 -5
  31. package/dist/backend/templates/harness/vcm-task-state-skill.js +2 -2
  32. package/dist/backend/templates/harness/vcm-workflow-review-skill.js +1 -1
  33. package/dist/shared/types/workflow.js +1 -0
  34. package/dist/shared/validation/artifact-check.js +3 -3
  35. package/dist/shared/validation/artifact-contract.js +1 -1
  36. package/dist/shared/validation/artifact-registry.js +16 -0
  37. package/dist-frontend/assets/{index-VW9tYPP5.js → index-BvCmrFlN.js} +49 -49
  38. package/dist-frontend/index.html +1 -1
  39. package/package.json +1 -1
  40. package/scripts/claude-plugins/vcm-lsp-bridge/.claude-plugin/plugin.json +21 -6
  41. package/scripts/harness-tools/vcm-artifact +1 -2
  42. package/scripts/harness-tools/vcm-bash-guard +1 -1
@@ -0,0 +1,82 @@
1
+ export function renderVcmAskUserSkillRules() {
2
+ return `## Purpose
3
+
4
+ Use this skill whenever Project Manager asks the user a question.
5
+
6
+ ## Ask And Wait
7
+
8
+ Register the exact question before asking it:
9
+
10
+ \`\`\`bash
11
+ .ai/tools/vcm-ask-user --question "<exact question>"
12
+ \`\`\`
13
+
14
+ After the tool returns \`awaiting_user\`, ask that question and end the turn. Do not request Workflow Review, write a route message, run a Gate, or advance the workflow in the same turn.
15
+
16
+ Every question pauses the workflow. PM may defer a question by not asking it; once PM asks, only a new direct user message resumes the workflow. The previous workflow approval is canceled, so request a fresh approval before the next dispatch.
17
+ `;
18
+ }
19
+ export function renderAskUserTool() {
20
+ return `#!/usr/bin/env python3
21
+ import argparse
22
+ import json
23
+ import os
24
+ import sys
25
+ import urllib.error
26
+ import urllib.parse
27
+ import urllib.request
28
+
29
+
30
+ def emit(status, message=None, state=None):
31
+ payload = {"status": status}
32
+ if message:
33
+ payload["message"] = message
34
+ if state is not None:
35
+ payload["state"] = state
36
+ print(json.dumps(payload, ensure_ascii=False))
37
+
38
+
39
+ def main():
40
+ parser = argparse.ArgumentParser(description="Pause VCM workflow for an exact user question.")
41
+ parser.add_argument("--question", required=True)
42
+ args = parser.parse_args()
43
+
44
+ if os.environ.get("VCM_ROLE") != "project-manager":
45
+ emit("failed", "Only project-manager may ask the user through VCM workflow control.")
46
+ return 2
47
+
48
+ question = args.question.strip()
49
+ if not question:
50
+ emit("failed", "A non-empty user question is required.")
51
+ return 2
52
+
53
+ api_url = os.environ.get("VCM_API_URL", "").rstrip("/")
54
+ task_slug = os.environ.get("VCM_TASK_SLUG", "").strip()
55
+ if not api_url or not task_slug:
56
+ emit("failed", "VCM_API_URL or VCM_TASK_SLUG is unavailable; the workflow was not paused.")
57
+ return 2
58
+
59
+ url = f"{api_url}/api/tasks/{urllib.parse.quote(task_slug, safe='')}/ask-user"
60
+ request = urllib.request.Request(
61
+ url,
62
+ data=json.dumps({"question": question}).encode("utf-8"),
63
+ headers={"content-type": "application/json"},
64
+ method="POST",
65
+ )
66
+ try:
67
+ with urllib.request.urlopen(request, timeout=5) as response:
68
+ state = json.loads(response.read().decode("utf-8"))
69
+ emit("awaiting_user", state=state)
70
+ return 0
71
+ except urllib.error.HTTPError as error:
72
+ detail = error.read().decode("utf-8", errors="replace")
73
+ emit("failed", f"VCM rejected the user question: HTTP {error.code} {detail}")
74
+ except (OSError, ValueError, urllib.error.URLError) as error:
75
+ emit("failed", f"VCM could not register the user question: {error}")
76
+ return 1
77
+
78
+
79
+ if __name__ == "__main__":
80
+ sys.exit(main())
81
+ `;
82
+ }
@@ -7,14 +7,16 @@ Use this skill when Architect must establish symbol definitions, implementations
7
7
 
8
8
  1. Define the affected feature or module boundary and locate entry symbols with \`.ai/generated/module-index.json\` and \`.ai/generated/public-surface.json\` when available.
9
9
  2. Use LSP workspace or file symbols, definitions, implementations, references, and incoming or outgoing call hierarchy to resolve project-owned relationships. If \`LSP\` is unavailable, report a VCM LSP configuration failure instead of substituting text search.
10
- 3. If an initial workspace-symbol request is empty or reports indexing, wait and retry; startup or indexing time does not permit replacing a required semantic query with text matching. Retry the same bounded workspace query at most two more times. If it still cannot resolve, record the operation and result as unresolved.
11
- 4. Read the complete project-owned callable unit at every resolved location.
12
- 5. Expand one project-owned dependency hop at a time until the required behavior path has no unresolved symbol.
13
- 6. Use Glob, generated context, architecture documents, and runtime evidence to locate dynamic registrations, configuration or string edges, macros, documentation, and external boundaries that LSP does not model.
10
+ 3. Treat LSP results as symbol-specific. An accessor, backing field, trait declaration, implementation method, wrapper, and alias are separate symbols. Query every relevant symbol separately. When starting from an accessor or wrapper, read its implementation, resolve the backing field, delegate, or trait item with LSP, then query those symbols too. Never use one symbol's references as proof of a complete semantic class.
11
+ 4. If an initial workspace-symbol request is empty or reports indexing, wait and retry; startup or indexing time does not permit replacing a required semantic query with text matching. Retry the same bounded workspace query at most two more times. If it still cannot resolve, record the operation and result as unresolved.
12
+ 5. Read the complete project-owned callable unit at every resolved location.
13
+ 6. Expand one project-owned dependency hop at a time until the required behavior path has no unresolved symbol.
14
+ 7. If the correct LSP operation against the actual symbol is demonstrably partial for a relationship LSP does not model or expose, record the operation, result, and missing relationship. Then use an exact text search only within the already identified owning file or module to locate candidates. Read every candidate and verify its semantics against code and LSP. Text matches are candidate locations, not relationship evidence, and must not expand the search boundary or replace the initial LSP query.
15
+ 8. Use Glob, generated context, architecture documents, and runtime evidence to locate dynamic registrations, configuration or string edges, macros, documentation, and external boundaries that LSP does not model.
14
16
 
15
17
  ## Evidence
16
18
 
17
- - Record each resolved relationship and whether it came from LSP, runtime evidence, an external boundary, or a generated boundary.
19
+ - Record each resolved relationship and whether it came from LSP, runtime evidence, verified bounded source fallback, an external boundary, or a generated boundary.
18
20
  - When an empty LSP result contradicts a direct call in the code, another LSP result, or runtime evidence, treat the relationship as unresolved. Record the contradiction and use exact fallback evidence.
19
21
  - If LSP is unavailable or cannot resolve a required project-owned relationship, record that limitation and leave the relationship unresolved.
20
22
  - Generated indexes and architecture docs locate likely code; reading current-worktree implementation establishes behavior.
@@ -10,12 +10,12 @@ The declaration is recoverable context, not a workflow controller. It does not a
10
10
  Record a recoverable checkpoint with:
11
11
 
12
12
  \`\`\`bash
13
- .ai/tools/update-task-state --flow code-change --step awaiting-user --status awaiting-user
13
+ .ai/tools/update-task-state --flow code-change --step architect-planning --status active
14
14
  \`\`\`
15
15
 
16
16
  Supply only fields that changed. Use \`none\` to clear branch or resume point. Repeat \`--evidence\` for evidence paths.
17
17
 
18
- Declare the selected flow before its first dispatch, update the step before later PM dispatches, and update no-route checkpoints such as waiting for the user, waiting for Gate Review, or completion. Do not put task-state or workflow-approval fields in route-message frontmatter.
18
+ Declare the selected flow before its first dispatch, update the step before later PM dispatches, and update no-route checkpoints such as waiting for Gate Review or completion. Use \`vcm-ask-user\`, not this advisory declaration, whenever PM asks the user a question. Do not put task-state or workflow-approval fields in route-message frontmatter.
19
19
 
20
20
  If declaration fails, report the warning when relevant and continue the existing workflow. Never delay routing, Gate Review, final acceptance, or task close because task state is unavailable.
21
21
  `;
@@ -44,7 +44,7 @@ If VCM rejects the transition, remain in the current PM turn and choose a legal
44
44
 
45
45
  ## User Authorization
46
46
 
47
- Only the user's explicit instruction may authorize a rejected transition. Ask the user directly and wait. After the user authorizes the exact exception, resubmit the unchanged transition with:
47
+ Only the user's explicit instruction may authorize a rejected transition. Use \`vcm-ask-user\` with the exact authorization question, ask it, and wait. After the user authorizes the exact exception, resubmit the unchanged transition with:
48
48
 
49
49
  \`\`\`text
50
50
  Authorization Text: <user's exact authorization>
@@ -11,6 +11,7 @@ export const WORKFLOW_EVIDENCE_ARTIFACTS = [
11
11
  "test-report.md",
12
12
  "architect-debug.md",
13
13
  "architecture-diagnosis.md",
14
+ "docs-update-report.md",
14
15
  "docs-sync-report.md",
15
16
  "final-acceptance.md"
16
17
  ];
@@ -1,4 +1,4 @@
1
- import { ARCHITECT_DEBUG_STATUSES, ARCHITECTURE_BRIEF_STATUSES, ARCHITECTURE_DIAGNOSIS_DISPOSITIONS, ARCHITECTURE_EVIDENCE_STATUSES, ARCHITECTURE_PLAN_RESULTS, CODER_COMPLETION_DECISIONS, DOCS_SYNC_DECISIONS, FINAL_ACCEPTANCE_DECISIONS, L3_ACTIONS, L3_REQUIRED_VALUES, PLANNING_PROGRESS_STATUSES, STRICT_NONE_VALUE, TEST_INFRASTRUCTURE_STATUSES, TEST_RESULTS } from "./artifact-contract.js";
1
+ import { ARCHITECT_DEBUG_STATUSES, ARCHITECTURE_BRIEF_STATUSES, ARCHITECTURE_DIAGNOSIS_DISPOSITIONS, ARCHITECTURE_EVIDENCE_STATUSES, ARCHITECTURE_PLAN_RESULTS, CODER_COMPLETION_DECISIONS, DOCS_REPORT_DECISIONS, FINAL_ACCEPTANCE_DECISIONS, L3_ACTIONS, L3_REQUIRED_VALUES, PLANNING_PROGRESS_STATUSES, STRICT_NONE_VALUE, TEST_INFRASTRUCTURE_STATUSES, TEST_RESULTS } from "./artifact-contract.js";
2
2
  import { getArtifactDefinition } from "./artifact-registry.js";
3
3
  const PLACEHOLDER_PATTERN = /(^|\n)\s*(TBD|Not run yet\.?|status:\s*draft)\s*(\n|$)/i;
4
4
  export function checkMarkdownArtifact(kind, artifactPath, content, options = {}) {
@@ -244,8 +244,8 @@ function validateArtifactFields(kind, content, mode) {
244
244
  }
245
245
  return invalidFields;
246
246
  }
247
- if (kind === "docs-sync-report") {
248
- return validateDecision(content, DOCS_SYNC_DECISIONS);
247
+ if (kind === "docs-update-report" || kind === "docs-sync-report") {
248
+ return validateDecision(content, DOCS_REPORT_DECISIONS);
249
249
  }
250
250
  if (kind === "final-acceptance") {
251
251
  return validateDecision(content, FINAL_ACCEPTANCE_DECISIONS);
@@ -23,7 +23,7 @@ export const TEST_INFRASTRUCTURE_STATUSES = [
23
23
  ];
24
24
  export const L3_REQUIRED_VALUES = ["yes", "no"];
25
25
  export const L3_ACTIONS = ["run-existing", "updated", "added"];
26
- export const DOCS_SYNC_DECISIONS = ["synced", "unchanged", "blocked"];
26
+ export const DOCS_REPORT_DECISIONS = ["synced", "unchanged", "blocked"];
27
27
  export const FINAL_ACCEPTANCE_DECISIONS = [
28
28
  "accepted",
29
29
  "accepted-with-known-risks",
@@ -156,6 +156,22 @@ export const ARTIFACT_DEFINITIONS = [
156
156
  "User Approval Evidence"
157
157
  ]
158
158
  },
159
+ {
160
+ kind: "docs-update-report",
161
+ fileName: "docs-update-report.md",
162
+ owner: ["architect", "coder", "tester"],
163
+ requiredHeadings: [
164
+ "Summary",
165
+ "Assignment ID",
166
+ "Documents Updated",
167
+ "Documents Reviewed And Left Unchanged",
168
+ "Evidence Reviewed",
169
+ "Checks Performed",
170
+ "Commit",
171
+ "Remaining Documentation Issues",
172
+ "Decision"
173
+ ]
174
+ },
159
175
  {
160
176
  kind: "docs-sync-report",
161
177
  fileName: "docs-sync-report.md",