vibe-coding-master 0.6.20 → 0.6.22
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 +5 -5
- package/dist/backend/api/artifact-routes.js +2 -2
- package/dist/backend/api/gate-review-routes.js +1 -1
- package/dist/backend/api/task-routes.js +1 -1
- package/dist/backend/cli/install-vcm-harness.js +66 -20
- package/dist/backend/services/app-settings-service.js +11 -2
- package/dist/backend/services/artifact-service.js +9 -8
- package/dist/backend/services/gate-review-service.js +322 -24
- package/dist/backend/services/harness-feedback-service.js +8 -3
- package/dist/backend/services/harness-service.js +100 -13
- package/dist/backend/services/job-guard-service.js +2 -2
- package/dist/backend/services/message-service.js +12 -0
- package/dist/backend/services/session-service.js +18 -11
- package/dist/backend/services/status-service.js +1 -4
- package/dist/backend/templates/handoff.js +105 -17
- package/dist/backend/templates/harness/architect-agent.js +110 -49
- package/dist/backend/templates/harness/claude-root.js +45 -15
- package/dist/backend/templates/harness/coder-agent.js +66 -47
- package/dist/backend/templates/harness/coder-worker-agent.js +45 -17
- package/dist/backend/templates/harness/gate-review.js +237 -39
- package/dist/backend/templates/harness/harness-engineer-agent.js +39 -12
- package/dist/backend/templates/harness/project-coding-standards.js +73 -0
- package/dist/backend/templates/harness/project-glossary.js +30 -0
- package/dist/backend/templates/harness/project-known-issues.js +33 -0
- package/dist/backend/templates/harness/project-manager-agent.js +103 -34
- package/dist/backend/templates/harness/pull-request-template.js +6 -4
- package/dist/backend/templates/harness/tester-agent.js +82 -0
- package/dist/backend/templates/harness/vcm-final-acceptance-skill.js +22 -17
- package/dist/backend/templates/harness/vcm-harness-bootstrap-skill.js +19 -2
- package/dist/backend/templates/harness/vcm-long-running-validation-skill.js +1 -1
- package/dist/backend/templates/harness/vcm-report-harness-issue-skill.js +18 -12
- package/dist/backend/templates/harness/vcm-route-message-skill.js +48 -8
- package/dist/backend/templates/message-envelope.js +2 -5
- package/dist/shared/constants.js +3 -3
- package/dist/shared/types/gate-review.js +6 -1
- package/dist/shared/validation/artifact-check.js +64 -10
- package/dist-frontend/assets/{index-C5E5jLp-.js → index-DYBg_qYS.js} +4 -4
- package/dist-frontend/index.html +1 -1
- package/package.json +1 -1
- package/scripts/verify-package.mjs +1 -1
- package/dist/backend/templates/harness/reviewer-agent.js +0 -60
|
@@ -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
|
|
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.
|
|
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,
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
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
|
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
export function renderVcmRouteMessageSkillRules() {
|
|
2
2
|
return `## Purpose
|
|
3
3
|
|
|
4
|
-
Use this skill when a VCM role
|
|
4
|
+
Use this skill when project-manager dispatches a VCM role or when a VCM role reports a question, result, blocker, or finding back to project-manager.
|
|
5
5
|
|
|
6
6
|
This skill writes a route file. It does not deliver the message. VCM backend delivery is triggered later by Claude Code hooks.
|
|
7
7
|
|
|
8
8
|
## Route Policy
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
VCM uses project-manager as the routing hub.
|
|
11
|
+
|
|
12
|
+
Allowed routes:
|
|
13
|
+
|
|
14
|
+
- \`project-manager -> architect\`
|
|
15
|
+
- \`project-manager -> coder\`
|
|
16
|
+
- \`project-manager -> tester\`
|
|
17
|
+
- \`architect -> project-manager\`
|
|
18
|
+
- \`coder -> project-manager\`
|
|
19
|
+
- \`tester -> project-manager\`
|
|
20
|
+
|
|
21
|
+
Non-PM roles must not route directly to each other. Report questions, blockers, results, findings, or validation evidence back to project-manager. PM decides the next role route.
|
|
11
22
|
|
|
12
23
|
Allowed message types:
|
|
13
24
|
|
|
@@ -27,7 +38,7 @@ Write or update exactly one file:
|
|
|
27
38
|
.ai/vcm/handoffs/messages/<from-role>-<to-role>.md
|
|
28
39
|
\`\`\`
|
|
29
40
|
|
|
30
|
-
The file name is authoritative. Do not put from/to in frontmatter and do not create alternate message paths.
|
|
41
|
+
Use one allowed route above. The file name is authoritative. Do not put from/to in frontmatter and do not create alternate message paths.
|
|
31
42
|
|
|
32
43
|
If the same route file already contains a not-yet-delivered message, update that file instead of creating a fragmented follow-up.
|
|
33
44
|
|
|
@@ -37,7 +48,7 @@ Use the smallest body that is complete. Include artifact refs instead of copying
|
|
|
37
48
|
|
|
38
49
|
For simple user relay, use a lightweight body instead of the formal dispatch format.
|
|
39
50
|
|
|
40
|
-
For
|
|
51
|
+
For PM dispatch, use:
|
|
41
52
|
|
|
42
53
|
\`\`\`md
|
|
43
54
|
---
|
|
@@ -56,19 +67,46 @@ Request or result:
|
|
|
56
67
|
Evidence:
|
|
57
68
|
...
|
|
58
69
|
|
|
59
|
-
|
|
70
|
+
Next gate:
|
|
71
|
+
...
|
|
72
|
+
|
|
73
|
+
Stop conditions:
|
|
60
74
|
...
|
|
61
75
|
\`\`\`
|
|
62
76
|
|
|
77
|
+
For non-PM reports, use:
|
|
78
|
+
|
|
79
|
+
\`\`\`md
|
|
80
|
+
---
|
|
81
|
+
type: result
|
|
82
|
+
artifact_refs:
|
|
83
|
+
- .ai/vcm/handoffs/example.md
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
Summary:
|
|
87
|
+
...
|
|
88
|
+
|
|
89
|
+
Result, blocker, or finding:
|
|
90
|
+
...
|
|
91
|
+
|
|
92
|
+
Evidence:
|
|
93
|
+
...
|
|
94
|
+
|
|
95
|
+
Requested PM decision:
|
|
96
|
+
...
|
|
97
|
+
\`\`\`
|
|
98
|
+
|
|
99
|
+
For non-PM role reports, \`Requested PM decision\` is a request for PM classification, not an instruction to route, skip gates, continue, pause, or close the task.
|
|
100
|
+
|
|
63
101
|
## Formal Body Content
|
|
64
102
|
|
|
65
103
|
Formal messages should include:
|
|
66
104
|
|
|
67
105
|
- why this message exists
|
|
68
|
-
- what the target role should do or what result is being reported
|
|
106
|
+
- what the target role should do for PM dispatch, or what result/status is being reported for non-PM reports
|
|
69
107
|
- source of truth or artifact references
|
|
70
108
|
- validation or documentation state when relevant
|
|
71
|
-
- blocker,
|
|
109
|
+
- blocker, finding, status, or PM decision needed when relevant
|
|
72
110
|
|
|
73
111
|
## Turn Rule
|
|
74
112
|
|
|
@@ -81,7 +119,9 @@ Do not:
|
|
|
81
119
|
- start a shell loop
|
|
82
120
|
- wait for another role's answer
|
|
83
121
|
- paste directly into another role terminal
|
|
84
|
-
- use Claude Code Task/Subagent
|
|
122
|
+
- use Claude Code Task/Subagent to replace VCM role routing. Coder worker
|
|
123
|
+
subagents are governed by Coder's \`vcm-coder-worker\` rules and are not
|
|
124
|
+
route-message delivery.
|
|
85
125
|
|
|
86
126
|
VCM scans pending route files after the Stop hook and delivers later replies in a new turn.
|
|
87
127
|
|
|
@@ -2,9 +2,6 @@ export function renderMessageEnvelope(message) {
|
|
|
2
2
|
const artifactRefs = message.artifactRefs.length > 0
|
|
3
3
|
? message.artifactRefs.map((artifact) => `- ${artifact}`).join("\n")
|
|
4
4
|
: "- none";
|
|
5
|
-
const routeFileExample = message.toRole === "project-manager"
|
|
6
|
-
? ".ai/vcm/handoffs/messages/project-manager-<target-role>.md"
|
|
7
|
-
: `.ai/vcm/handoffs/messages/${message.toRole}-project-manager.md`;
|
|
8
5
|
return `
|
|
9
6
|
[VCM MESSAGE]
|
|
10
7
|
id: ${message.id}
|
|
@@ -21,8 +18,8 @@ ${artifactRefs}
|
|
|
21
18
|
Instructions:
|
|
22
19
|
- Read the message and execute only within this VCM task.
|
|
23
20
|
- If you write or update a VCM route file, use the vcm-route-message skill.
|
|
24
|
-
- If
|
|
25
|
-
-
|
|
21
|
+
- If PM sends a VCM message after handling this, write or update .ai/vcm/handoffs/messages/project-manager-<target-role>.md.
|
|
22
|
+
- If a non-PM role sends a VCM message after handling this, reply only to project-manager with .ai/vcm/handoffs/messages/<your-role>-project-manager.md.
|
|
26
23
|
- After writing a route file, end this Claude Code turn immediately.
|
|
27
24
|
- Do not poll, loop, or wait for another role in this turn. VCM scans route files after your Stop hook and delivers later replies in a new turn.
|
|
28
25
|
[/VCM MESSAGE]
|
package/dist/shared/constants.js
CHANGED
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
const REQUIRED_HEADINGS = {
|
|
2
2
|
"architecture-plan": [
|
|
3
|
-
"
|
|
3
|
+
"Accepted Scope",
|
|
4
|
+
"Current Code Reality",
|
|
4
5
|
"Architecture Decision",
|
|
6
|
+
"Module/File Plan",
|
|
7
|
+
"Public Surface Impact",
|
|
5
8
|
"Scaffold Manifest",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
+
"Tester Coverage Hints",
|
|
10
|
+
"Docs Impact",
|
|
11
|
+
"Known Risks",
|
|
12
|
+
"Coder Handoff Notes"
|
|
9
13
|
],
|
|
10
14
|
"known-issues": [
|
|
11
15
|
"Task Issues",
|
|
12
16
|
"Escalation To Docs"
|
|
13
17
|
],
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
18
|
+
"test-report": [
|
|
19
|
+
"Evidence Reviewed",
|
|
20
|
+
"Tests Added Or Updated",
|
|
21
|
+
"Commands Run Or Checked",
|
|
22
|
+
"Validation Results",
|
|
23
|
+
"Failed Expectations",
|
|
24
|
+
"Reproduction Steps",
|
|
25
|
+
"Skipped Checks With Reasons",
|
|
26
|
+
"Coverage Gaps",
|
|
27
|
+
"Blocking Validation Issues"
|
|
19
28
|
],
|
|
20
29
|
"docs-sync-report": [
|
|
21
30
|
"Summary",
|
|
@@ -34,6 +43,7 @@ const REQUIRED_HEADINGS = {
|
|
|
34
43
|
"Validation Summary",
|
|
35
44
|
"Review And Docs Sync",
|
|
36
45
|
"Known Issues Disposition",
|
|
46
|
+
"Gate Review Gates",
|
|
37
47
|
"Cleanup Readiness",
|
|
38
48
|
"Final User Summary"
|
|
39
49
|
]
|
|
@@ -48,6 +58,7 @@ export function checkMarkdownArtifact(kind, artifactPath, content) {
|
|
|
48
58
|
isEmpty: true,
|
|
49
59
|
hasPlaceholder: false,
|
|
50
60
|
missingHeadings: [...REQUIRED_HEADINGS[kind]],
|
|
61
|
+
invalidFields: [],
|
|
51
62
|
status: "missing"
|
|
52
63
|
};
|
|
53
64
|
}
|
|
@@ -60,11 +71,13 @@ export function checkMarkdownArtifact(kind, artifactPath, content) {
|
|
|
60
71
|
isEmpty: true,
|
|
61
72
|
hasPlaceholder: false,
|
|
62
73
|
missingHeadings: [...REQUIRED_HEADINGS[kind]],
|
|
74
|
+
invalidFields: [],
|
|
63
75
|
status: "empty"
|
|
64
76
|
};
|
|
65
77
|
}
|
|
66
78
|
const missingHeadings = REQUIRED_HEADINGS[kind].filter((heading) => !hasHeading(trimmed, heading));
|
|
67
79
|
const hasPlaceholder = PLACEHOLDER_PATTERN.test(trimmed);
|
|
80
|
+
const invalidFields = validateArtifactFields(kind, trimmed);
|
|
68
81
|
return {
|
|
69
82
|
kind,
|
|
70
83
|
path: artifactPath,
|
|
@@ -72,9 +85,50 @@ export function checkMarkdownArtifact(kind, artifactPath, content) {
|
|
|
72
85
|
isEmpty: false,
|
|
73
86
|
hasPlaceholder,
|
|
74
87
|
missingHeadings,
|
|
75
|
-
|
|
88
|
+
invalidFields,
|
|
89
|
+
status: missingHeadings.length === 0 && !hasPlaceholder && invalidFields.length === 0 ? "ok" : "incomplete"
|
|
76
90
|
};
|
|
77
91
|
}
|
|
92
|
+
function validateArtifactFields(kind, content) {
|
|
93
|
+
if (kind === "test-report") {
|
|
94
|
+
const result = /^\s*Test Result\s*:\s*(\S+)\s*$/im.exec(content)?.[1]?.toLowerCase();
|
|
95
|
+
return result === "pass" || result === "fail"
|
|
96
|
+
? []
|
|
97
|
+
: ["Test Result must be pass or fail."];
|
|
98
|
+
}
|
|
99
|
+
if (kind === "docs-sync-report") {
|
|
100
|
+
return validateDecision(content, ["synced", "unchanged", "blocked"]);
|
|
101
|
+
}
|
|
102
|
+
if (kind === "final-acceptance") {
|
|
103
|
+
return validateDecision(content, [
|
|
104
|
+
"accepted",
|
|
105
|
+
"accepted-with-known-risks",
|
|
106
|
+
"needs-coder-follow-up",
|
|
107
|
+
"needs-architect-follow-up",
|
|
108
|
+
"needs-docs-sync",
|
|
109
|
+
"blocked-by-user-decision"
|
|
110
|
+
]);
|
|
111
|
+
}
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
function validateDecision(content, allowed) {
|
|
115
|
+
const decision = readArtifactSectionValue(content, "Decision")?.toLowerCase();
|
|
116
|
+
return decision && allowed.includes(decision)
|
|
117
|
+
? []
|
|
118
|
+
: [`Decision must be one of: ${allowed.join(", ")}.`];
|
|
119
|
+
}
|
|
120
|
+
export function readArtifactSectionValue(content, heading) {
|
|
121
|
+
const match = new RegExp(`^#{1,6}\\s+${escapeRegExp(heading)}\\s*$`, "im").exec(content);
|
|
122
|
+
if (!match || match.index === undefined) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
const afterHeading = content.slice(match.index + match[0].length);
|
|
126
|
+
const nextHeading = /\n#{1,6}\s+\S/.exec(afterHeading);
|
|
127
|
+
const section = nextHeading?.index === undefined
|
|
128
|
+
? afterHeading
|
|
129
|
+
: afterHeading.slice(0, nextHeading.index);
|
|
130
|
+
return section.split(/\r?\n/).map((line) => line.trim()).find(Boolean);
|
|
131
|
+
}
|
|
78
132
|
function hasHeading(content, heading) {
|
|
79
133
|
const pattern = new RegExp(`^#{1,6}\\s+${escapeRegExp(heading)}\\s*$`, "im");
|
|
80
134
|
return pattern.test(content);
|