vibe-coding-master 0.7.5 → 0.7.7
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 +40 -16
- package/dist/backend/adapters/git-adapter.js +15 -0
- package/dist/backend/api/artifact-routes.js +3 -0
- package/dist/backend/api/harness-routes.js +57 -27
- package/dist/backend/api/runtime-state-routes.js +7 -3
- package/dist/backend/api/task-routes.js +36 -4
- package/dist/backend/api/translation-routes.js +11 -2
- package/dist/backend/api/translation-worker-routes.js +37 -9
- package/dist/backend/cli/install-vcm-harness.js +40 -2
- package/dist/backend/gateway/gateway-service.js +34 -17
- package/dist/backend/server.js +12 -3
- package/dist/backend/services/artifact-service.js +4 -1
- package/dist/backend/services/auto-memory-service.js +156 -81
- package/dist/backend/services/claude-hook-service.js +50 -35
- package/dist/backend/services/command-dispatcher.js +1 -1
- package/dist/backend/services/gate-review-service.js +44 -0
- package/dist/backend/services/harness-feedback-service.js +47 -8
- package/dist/backend/services/harness-service.js +112 -34
- package/dist/backend/services/message-service.js +39 -2
- package/dist/backend/services/round-service.js +10 -121
- package/dist/backend/services/runtime-coordinator-service.js +18 -10
- package/dist/backend/services/runtime-recovery-service.js +1 -2
- package/dist/backend/services/session-service.js +36 -98
- package/dist/backend/services/status-service.js +1 -0
- package/dist/backend/services/task-close-service.js +12 -27
- package/dist/backend/services/task-workflow-service.js +228 -0
- package/dist/backend/services/translation-worker-service.js +14 -7
- package/dist/backend/templates/handoff.js +40 -1
- package/dist/backend/templates/harness/architect-agent.js +67 -19
- package/dist/backend/templates/harness/claude-root.js +25 -29
- package/dist/backend/templates/harness/gate-review.js +26 -13
- package/dist/backend/templates/harness/harness-engineer-agent.js +8 -8
- package/dist/backend/templates/harness/memory-block.js +69 -0
- package/dist/backend/templates/harness/project-known-issues.js +1 -0
- package/dist/backend/templates/harness/project-manager-agent.js +211 -73
- package/dist/backend/templates/harness/role-memory.js +9 -12
- package/dist/backend/templates/harness/tester-agent.js +4 -1
- package/dist/backend/templates/harness/vcm-architecture-interview-skill.js +82 -0
- package/dist/backend/templates/harness/vcm-final-acceptance-skill.js +4 -3
- package/dist/backend/templates/harness/vcm-harness-bootstrap-skill.js +14 -3
- package/dist/backend/templates/harness/vcm-propose-memory-skill.js +2 -2
- package/dist/backend/templates/harness/vcm-route-message-skill.js +5 -0
- package/dist/backend/templates/harness/vcm-task-state-skill.js +110 -0
- package/dist/backend/templates/message-envelope.js +1 -1
- package/dist/shared/constants.js +0 -10
- package/dist/shared/types/workflow.js +1 -0
- package/dist/shared/validation/artifact-check.js +20 -0
- package/dist-frontend/assets/index-42EpETgd.js +97 -0
- package/dist-frontend/assets/index-D65x2x0F.css +32 -0
- package/dist-frontend/index.html +2 -2
- package/package.json +1 -1
- package/scripts/harness-tools/check-durable-docs +298 -0
- package/scripts/verify-package.mjs +1 -0
- package/dist-frontend/assets/index-DCb-S6Ls.css +0 -32
- package/dist-frontend/assets/index-NTlycxx9.js +0 -97
|
@@ -4,8 +4,8 @@ Harness Review and provides an exact draft path.
|
|
|
4
4
|
|
|
5
5
|
## Rules
|
|
6
6
|
|
|
7
|
-
- Treat
|
|
8
|
-
never edits active memory.
|
|
7
|
+
- Treat every \`<VCM-memory>\` block as read-only. This skill creates a proposal;
|
|
8
|
+
it never edits active memory.
|
|
9
9
|
- Write only to the exact draft path assigned by VCM. The path must be under
|
|
10
10
|
\`.ai/vcm/memory-review/runs/<run-id>/drafts/\` in the active task worktree.
|
|
11
11
|
- If VCM did not provide a draft path, do not create a proposal.
|
|
@@ -53,6 +53,9 @@ For PM dispatch, use:
|
|
|
53
53
|
\`\`\`md
|
|
54
54
|
---
|
|
55
55
|
type: task
|
|
56
|
+
workflow_flow: code-change
|
|
57
|
+
workflow_step: coder-implementation
|
|
58
|
+
workflow_status: active
|
|
56
59
|
artifact_refs:
|
|
57
60
|
- .ai/vcm/handoffs/architecture-plan.md
|
|
58
61
|
- docs/plans/example.md
|
|
@@ -74,6 +77,8 @@ Stop conditions:
|
|
|
74
77
|
...
|
|
75
78
|
\`\`\`
|
|
76
79
|
|
|
80
|
+
PM route files should declare the workflow checkpoint fields defined by the \`vcm-task-state\` skill. Non-PM reports must not declare workflow state.
|
|
81
|
+
|
|
77
82
|
For non-PM reports, use:
|
|
78
83
|
|
|
79
84
|
\`\`\`md
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
export function renderVcmTaskStateSkillRules() {
|
|
2
|
+
return `## Purpose
|
|
3
|
+
|
|
4
|
+
Use this skill only as project-manager to declare the current task workflow checkpoint to VCM.
|
|
5
|
+
|
|
6
|
+
The declaration is recoverable context, not a workflow controller. It does not authorize a transition, replace handoff artifacts, or decide the next role.
|
|
7
|
+
|
|
8
|
+
## Declaration
|
|
9
|
+
|
|
10
|
+
For a PM role dispatch, put the current declaration in the route-file frontmatter:
|
|
11
|
+
|
|
12
|
+
\`\`\`yaml
|
|
13
|
+
workflow_flow: code-change
|
|
14
|
+
workflow_step: coder-implementation
|
|
15
|
+
workflow_branch: none
|
|
16
|
+
workflow_resume_point: none
|
|
17
|
+
workflow_status: active
|
|
18
|
+
workflow_evidence_refs: .ai/vcm/handoffs/architecture-plan.md
|
|
19
|
+
\`\`\`
|
|
20
|
+
|
|
21
|
+
For a checkpoint without a role route, run:
|
|
22
|
+
|
|
23
|
+
\`\`\`bash
|
|
24
|
+
.ai/tools/update-task-state --flow code-change --step awaiting-user --status awaiting-user
|
|
25
|
+
\`\`\`
|
|
26
|
+
|
|
27
|
+
Supply only fields that changed. Use \`none\` to clear branch or resume point. Repeat \`--evidence\` for evidence paths.
|
|
28
|
+
|
|
29
|
+
Declare the selected flow before its first dispatch, update the step on later PM dispatches, and update no-route checkpoints such as waiting for the user, waiting for Gate Review, or completion.
|
|
30
|
+
|
|
31
|
+
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.
|
|
32
|
+
`;
|
|
33
|
+
}
|
|
34
|
+
export function renderUpdateTaskStateTool() {
|
|
35
|
+
return `#!/usr/bin/env python3
|
|
36
|
+
import argparse
|
|
37
|
+
import json
|
|
38
|
+
import os
|
|
39
|
+
import sys
|
|
40
|
+
import urllib.error
|
|
41
|
+
import urllib.parse
|
|
42
|
+
import urllib.request
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def emit(status, message=None, state=None):
|
|
46
|
+
payload = {"status": status}
|
|
47
|
+
if message:
|
|
48
|
+
payload["message"] = message
|
|
49
|
+
if state is not None:
|
|
50
|
+
payload["state"] = state
|
|
51
|
+
print(json.dumps(payload, ensure_ascii=False))
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def main():
|
|
55
|
+
parser = argparse.ArgumentParser(description="Declare advisory VCM task workflow state.")
|
|
56
|
+
parser.add_argument("--flow")
|
|
57
|
+
parser.add_argument("--step")
|
|
58
|
+
parser.add_argument("--branch")
|
|
59
|
+
parser.add_argument("--resume-point")
|
|
60
|
+
parser.add_argument("--status")
|
|
61
|
+
parser.add_argument("--evidence", action="append", default=[])
|
|
62
|
+
args = parser.parse_args()
|
|
63
|
+
|
|
64
|
+
if os.environ.get("VCM_ROLE") != "project-manager":
|
|
65
|
+
emit("warning", "Only project-manager may declare VCM task workflow state.")
|
|
66
|
+
return 0
|
|
67
|
+
|
|
68
|
+
api_url = os.environ.get("VCM_API_URL", "").rstrip("/")
|
|
69
|
+
task_slug = os.environ.get("VCM_TASK_SLUG", "").strip()
|
|
70
|
+
if not api_url or not task_slug:
|
|
71
|
+
emit("warning", "VCM_API_URL or VCM_TASK_SLUG is unavailable; task state was not updated.")
|
|
72
|
+
return 0
|
|
73
|
+
|
|
74
|
+
payload = {}
|
|
75
|
+
for key, value in (
|
|
76
|
+
("flow", args.flow),
|
|
77
|
+
("step", args.step),
|
|
78
|
+
("branch", args.branch),
|
|
79
|
+
("resumePoint", args.resume_point),
|
|
80
|
+
("status", args.status),
|
|
81
|
+
):
|
|
82
|
+
if value is not None:
|
|
83
|
+
payload[key] = value
|
|
84
|
+
if args.evidence:
|
|
85
|
+
payload["evidenceRefs"] = args.evidence
|
|
86
|
+
|
|
87
|
+
if not payload:
|
|
88
|
+
emit("warning", "No task workflow fields were supplied.")
|
|
89
|
+
return 0
|
|
90
|
+
|
|
91
|
+
url = f"{api_url}/api/tasks/{urllib.parse.quote(task_slug, safe='')}/workflow-state"
|
|
92
|
+
request = urllib.request.Request(
|
|
93
|
+
url,
|
|
94
|
+
data=json.dumps(payload).encode("utf-8"),
|
|
95
|
+
headers={"content-type": "application/json"},
|
|
96
|
+
method="POST",
|
|
97
|
+
)
|
|
98
|
+
try:
|
|
99
|
+
with urllib.request.urlopen(request, timeout=3) as response:
|
|
100
|
+
state = json.loads(response.read().decode("utf-8"))
|
|
101
|
+
emit("updated", state=state)
|
|
102
|
+
except (OSError, ValueError, urllib.error.URLError, urllib.error.HTTPError) as error:
|
|
103
|
+
emit("warning", f"Task state was not updated: {error}")
|
|
104
|
+
return 0
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
if __name__ == "__main__":
|
|
108
|
+
sys.exit(main())
|
|
109
|
+
`;
|
|
110
|
+
}
|
|
@@ -27,5 +27,5 @@ Instructions:
|
|
|
27
27
|
}
|
|
28
28
|
export function renderManualStagePrompt(message) {
|
|
29
29
|
const target = message.bodyPath ?? `VCM message ${message.id}`;
|
|
30
|
-
return `
|
|
30
|
+
return `[VCM MESSAGE]\nid: ${message.id}\nRead and handle the VCM message at ${target}.\n[/VCM MESSAGE]`;
|
|
31
31
|
}
|
package/dist/shared/constants.js
CHANGED
|
@@ -84,16 +84,6 @@ export function isHarnessEngineerToolRoleName(value) {
|
|
|
84
84
|
export function isDispatchableRole(value) {
|
|
85
85
|
return DISPATCHABLE_ROLES.includes(value);
|
|
86
86
|
}
|
|
87
|
-
/**
|
|
88
|
-
* Roles that address the human operator. When a role in this set ends its turn
|
|
89
|
-
* with no onward route message, the flow is treated as awaiting a user decision
|
|
90
|
-
* (see the `awaiting-user` flow-pause reason). Single source of truth for that
|
|
91
|
-
* predicate.
|
|
92
|
-
*/
|
|
93
|
-
export const USER_FACING_ROLES = ["project-manager"];
|
|
94
|
-
export function isUserFacingRole(value) {
|
|
95
|
-
return USER_FACING_ROLES.includes(value);
|
|
96
|
-
}
|
|
97
87
|
export function getRoleDefinition(role) {
|
|
98
88
|
const definition = ROLE_DEFINITIONS.find((candidate) => candidate.name === role);
|
|
99
89
|
if (!definition) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
const REQUIRED_HEADINGS = {
|
|
2
|
+
"architecture-brief": [
|
|
3
|
+
"Accepted Outcome",
|
|
4
|
+
"Confirmed User Decisions",
|
|
5
|
+
"Existing Constraints",
|
|
6
|
+
"Unresolved User Decisions",
|
|
7
|
+
"User Confirmation"
|
|
8
|
+
],
|
|
2
9
|
"architecture-plan": [
|
|
3
10
|
"Accepted Scope",
|
|
4
11
|
"Current Code Reality",
|
|
@@ -103,6 +110,19 @@ export function checkMarkdownArtifact(kind, artifactPath, content) {
|
|
|
103
110
|
};
|
|
104
111
|
}
|
|
105
112
|
function validateArtifactFields(kind, content) {
|
|
113
|
+
if (kind === "architecture-brief") {
|
|
114
|
+
const status = /^\s*Architecture Brief Status\s*:\s*(\S+)\s*$/im.exec(content)?.[1]?.toLowerCase();
|
|
115
|
+
const invalidFields = status === "interviewing" || status === "confirmed"
|
|
116
|
+
? []
|
|
117
|
+
: ["Architecture Brief Status must be interviewing or confirmed."];
|
|
118
|
+
if (status === "confirmed") {
|
|
119
|
+
const unresolved = readArtifactSectionValue(content, "Unresolved User Decisions");
|
|
120
|
+
if (!unresolved || !/^none\.?$/i.test(unresolved)) {
|
|
121
|
+
invalidFields.push("Unresolved User Decisions must be None when Architecture Brief Status is confirmed.");
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return invalidFields;
|
|
125
|
+
}
|
|
106
126
|
if (kind === "test-report") {
|
|
107
127
|
const result = /^\s*Test Result\s*:\s*(\S+)\s*$/im.exec(content)?.[1]?.toLowerCase();
|
|
108
128
|
const invalidFields = result === "pass" || result === "fail"
|