vibe-coding-master 0.0.17 → 0.2.0
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 +57 -28
- package/dist/backend/api/artifact-routes.js +5 -5
- package/dist/backend/api/harness-routes.js +8 -0
- package/dist/backend/server.js +8 -2
- package/dist/backend/services/artifact-service.js +12 -12
- package/dist/backend/services/harness-service.js +579 -5
- package/dist/backend/services/project-service.js +4 -1
- package/dist/backend/services/session-service.js +1 -3
- package/dist/backend/services/task-service.js +16 -17
- package/dist/backend/templates/handoff.js +64 -26
- package/dist/backend/templates/harness/architect-agent.js +42 -12
- package/dist/backend/templates/harness/claude-root.js +42 -18
- package/dist/backend/templates/harness/coder-agent.js +15 -11
- package/dist/backend/templates/harness/known-issues-doc.js +22 -0
- package/dist/backend/templates/harness/project-manager-agent.js +66 -16
- package/dist/backend/templates/harness/pull-request-template.js +29 -0
- package/dist/backend/templates/harness/reviewer-agent.js +40 -12
- package/dist/backend/templates/harness/vcm-final-acceptance-skill.js +105 -0
- package/dist/backend/templates/harness/vcm-harness-bootstrap-skill.js +78 -0
- package/dist/backend/templates/harness/vcm-long-running-validation-skill.js +50 -0
- package/dist/backend/templates/harness/vcm-route-message-skill.js +86 -0
- package/dist/backend/templates/message-envelope.js +1 -0
- package/dist/backend/templates/role-command.js +7 -1
- package/dist/shared/validation/artifact-check.js +14 -9
- package/dist-frontend/assets/index-CrY5Ryps.js +90 -0
- package/dist-frontend/assets/index-CvvtrrCN.css +32 -0
- package/dist-frontend/index.html +2 -2
- package/docs/cc-best-practices.md +433 -192
- package/docs/full-harness-baseline.md +254 -0
- package/docs/product-design.md +9 -9
- package/docs/v0.2-implementation-plan.md +379 -0
- package/docs/vcm-cc-best-practices.md +449 -0
- package/package.json +3 -1
- package/scripts/harness-tools/generate-module-index +298 -0
- package/scripts/harness-tools/generate-public-surface +692 -0
- package/scripts/install-vcm-harness.mjs +1607 -0
- package/scripts/uninstall-vcm-harness.mjs +490 -0
- package/scripts/verify-package.mjs +4 -0
- package/dist-frontend/assets/index-D40qaonx.css +0 -32
- package/dist-frontend/assets/index-DK2F4LFT.js +0 -90
- package/docs/v1-architecture-design.md +0 -1014
- package/docs/v1-implementation-plan.md +0 -1379
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export function renderVcmFinalAcceptanceSkillRules() {
|
|
2
|
+
return `## Purpose
|
|
3
|
+
|
|
4
|
+
Use this skill when project-manager is ready to decide whether a VCM-managed task can be accepted, returned for follow-up, or blocked for a decision.
|
|
5
|
+
|
|
6
|
+
This skill is a final evidence audit. It does not replace architect docs sync, reviewer acceptance, validation, or user approval for high-risk decisions.
|
|
7
|
+
|
|
8
|
+
## Required Inputs
|
|
9
|
+
|
|
10
|
+
Read the relevant task evidence before deciding:
|
|
11
|
+
|
|
12
|
+
- route messages or durable plan
|
|
13
|
+
- \`.ai/vcm/handoffs/architecture-plan.md\`
|
|
14
|
+
- \`.ai/vcm/handoffs/known-issues.md\`
|
|
15
|
+
- \`.ai/vcm/handoffs/review-report.md\`
|
|
16
|
+
- \`.ai/vcm/handoffs/docs-sync-report.md\`
|
|
17
|
+
- current \`git status\` and \`git diff\`
|
|
18
|
+
- relevant long-term docs when the task touched public behavior, architecture, tests, security, dependencies, or plans
|
|
19
|
+
|
|
20
|
+
## Scope Traceability Audit
|
|
21
|
+
|
|
22
|
+
Do not claim to prove that the diff is exactly equal to the task scope.
|
|
23
|
+
|
|
24
|
+
Instead, classify changed files and meaningful hunks:
|
|
25
|
+
|
|
26
|
+
- expected changes: directly named by the user request, durable plan, route message, or architecture plan
|
|
27
|
+
- supporting changes: tests, fixtures, types, docs, or wiring needed for expected changes
|
|
28
|
+
- approved deviations: changes explained by Replan, reviewer follow-up, or explicit user / project-manager approval
|
|
29
|
+
- unexplained changes: changes with no traceable reason in the task evidence
|
|
30
|
+
- high-risk unexpected changes: auth, permissions, payment, billing, schema, migrations, data deletion, secrets, generated artifacts, dependencies, lockfiles, or broad formatting churn
|
|
31
|
+
|
|
32
|
+
Unexplained changes must be explained, reverted, or routed for follow-up before normal acceptance.
|
|
33
|
+
|
|
34
|
+
High-risk unexpected changes require project-manager / user approval or Replan before acceptance.
|
|
35
|
+
|
|
36
|
+
## Acceptance Checks
|
|
37
|
+
|
|
38
|
+
Check:
|
|
39
|
+
|
|
40
|
+
- required route was followed, or a user-approved exception is recorded
|
|
41
|
+
- required handoff artifacts exist and are current
|
|
42
|
+
- architecture plan was followed, or Replan was approved
|
|
43
|
+
- reviewer decision is acceptable, or findings are routed for follow-up
|
|
44
|
+
- docs sync is complete, or docs intentionally left unchanged are justified
|
|
45
|
+
- task-local known issues were resolved, promoted to \`docs/known-issues.md\`, or explicitly left out with a reason
|
|
46
|
+
- public behavior has direct tests or a recorded exception
|
|
47
|
+
- tests were not weakened, deleted, or skipped just to pass
|
|
48
|
+
- temporary task state is ready to clean after durable facts are promoted
|
|
49
|
+
|
|
50
|
+
## Decisions
|
|
51
|
+
|
|
52
|
+
Choose exactly one:
|
|
53
|
+
|
|
54
|
+
- accepted
|
|
55
|
+
- accepted-with-known-risks
|
|
56
|
+
- needs-coder-follow-up
|
|
57
|
+
- needs-architect-replan
|
|
58
|
+
- needs-docs-sync
|
|
59
|
+
- blocked-by-user-decision
|
|
60
|
+
|
|
61
|
+
Do not accept when validation evidence is missing, reviewer findings are unresolved, docs sync is missing for durable changes, or unexplained high-risk changes remain.
|
|
62
|
+
|
|
63
|
+
## Output
|
|
64
|
+
|
|
65
|
+
Write or update:
|
|
66
|
+
|
|
67
|
+
\`\`\`text
|
|
68
|
+
.ai/vcm/handoffs/final-acceptance.md
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
Use this structure:
|
|
72
|
+
|
|
73
|
+
\`\`\`md
|
|
74
|
+
# Final Acceptance: <task>
|
|
75
|
+
|
|
76
|
+
## Decision
|
|
77
|
+
|
|
78
|
+
accepted | accepted-with-known-risks | needs-coder-follow-up | needs-architect-replan | needs-docs-sync | blocked-by-user-decision
|
|
79
|
+
|
|
80
|
+
## Evidence Reviewed
|
|
81
|
+
|
|
82
|
+
## Scope Traceability
|
|
83
|
+
|
|
84
|
+
### Expected Changes
|
|
85
|
+
|
|
86
|
+
### Supporting Changes
|
|
87
|
+
|
|
88
|
+
### Approved Deviations
|
|
89
|
+
|
|
90
|
+
### Unexplained Changes
|
|
91
|
+
|
|
92
|
+
### High-Risk Unexpected Changes
|
|
93
|
+
|
|
94
|
+
## Validation Summary
|
|
95
|
+
|
|
96
|
+
## Review And Docs Sync
|
|
97
|
+
|
|
98
|
+
## Cleanup Readiness
|
|
99
|
+
|
|
100
|
+
## Final User Summary
|
|
101
|
+
\`\`\`
|
|
102
|
+
|
|
103
|
+
The final user summary should be concise and include files changed, validation, docs updates, open risks, and next action.
|
|
104
|
+
`;
|
|
105
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export function renderVcmHarnessBootstrapSkillRules() {
|
|
2
|
+
return `## Purpose
|
|
3
|
+
|
|
4
|
+
Use this skill when VCM needs AI-assisted project understanding to finish or refresh project-specific harness content.
|
|
5
|
+
|
|
6
|
+
This skill is an operating procedure. It does not replace the deterministic VCM installer.
|
|
7
|
+
|
|
8
|
+
## Boundaries
|
|
9
|
+
|
|
10
|
+
- Read the repository before drafting project-specific harness content.
|
|
11
|
+
- Do not edit product source, product tests, package manifests, lockfiles, deployment config, or secrets.
|
|
12
|
+
- Do not own managed-block writes, hook merging, manifest migrations, uninstall behavior, or deterministic skeleton creation; VCM backend owns those.
|
|
13
|
+
- Do not create new validation wrapper tools during bootstrap.
|
|
14
|
+
|
|
15
|
+
## Procedure
|
|
16
|
+
|
|
17
|
+
1. Generate context when supported: run \`.ai/tools/generate-module-index\`, then run \`.ai/tools/generate-public-surface\` after \`module-index.json\` exists.
|
|
18
|
+
2. Inspect the project: read \`README.md\`, read \`CLAUDE.md\`, durable project docs, project manifests/config, source layout, tests, and existing validation commands.
|
|
19
|
+
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, and \`docs/TESTING.md\` with detailed project-specific content.
|
|
21
|
+
5. Preserve user-authored content and VCM managed blocks.
|
|
22
|
+
6. Report evidence, unknowns, confirmation-needed areas, generation failures, and recommended deterministic VCM actions.
|
|
23
|
+
|
|
24
|
+
## Typical Outputs
|
|
25
|
+
|
|
26
|
+
- \`CLAUDE.md\` project context and project constraints outside the VCM managed block
|
|
27
|
+
- \`docs/ARCHITECTURE.md\`
|
|
28
|
+
- \`docs/TESTING.md\`
|
|
29
|
+
- \`docs/known-issues.md\` only for confirmed durable issues
|
|
30
|
+
- module-level \`ARCHITECTURE.md\` files
|
|
31
|
+
- \`.ai/generated/module-index.json\`
|
|
32
|
+
- \`.ai/generated/public-surface.json\`
|
|
33
|
+
|
|
34
|
+
## Output Requirements
|
|
35
|
+
|
|
36
|
+
### \`CLAUDE.md\`
|
|
37
|
+
|
|
38
|
+
- Write only project-specific facts outside the VCM managed block.
|
|
39
|
+
- Include project type, architecture shape, important constraints, and local conventions when verified or strongly inferred.
|
|
40
|
+
- Do not edit, duplicate, or summarize the VCM managed block.
|
|
41
|
+
|
|
42
|
+
### Generated Context
|
|
43
|
+
|
|
44
|
+
- Run \`.ai/tools/generate-module-index\` when the generator exists and the project is supported.
|
|
45
|
+
- Run \`.ai/tools/generate-public-surface\` only after \`.ai/generated/module-index.json\` exists.
|
|
46
|
+
- If generation fails or the project is unsupported, report the reason. Do not invent generated artifacts.
|
|
47
|
+
|
|
48
|
+
### \`docs/ARCHITECTURE.md\`
|
|
49
|
+
|
|
50
|
+
- Document the project-level module overview, module responsibilities, module relationships, dependency direction, and project-wide constraints.
|
|
51
|
+
- Link to module-level \`ARCHITECTURE.md\` files when present.
|
|
52
|
+
- Explain generated-context ownership, especially that \`.ai/generated/public-surface.json\` is the machine index for crate-external public APIs.
|
|
53
|
+
|
|
54
|
+
### Module-Level \`ARCHITECTURE.md\`
|
|
55
|
+
|
|
56
|
+
- Create or update one module-level \`ARCHITECTURE.md\` for each clear module boundary.
|
|
57
|
+
- Document module boundaries, responsibilities, allowed dependencies, important behavior, important public surface explanations, risks, and update triggers.
|
|
58
|
+
- Keep complete public API listings in \`.ai/generated/public-surface.json\`; module docs should explain meaning and design intent, not duplicate the full generated index.
|
|
59
|
+
|
|
60
|
+
### \`docs/TESTING.md\`
|
|
61
|
+
|
|
62
|
+
- Document validation levels, project-native validation commands, unit/integration test placement, generated-context freshness checks, and known testing gaps.
|
|
63
|
+
- Keep reviewer ownership of validation strategy and testing documentation clear.
|
|
64
|
+
|
|
65
|
+
## Final Summary
|
|
66
|
+
|
|
67
|
+
Include:
|
|
68
|
+
|
|
69
|
+
- files reviewed
|
|
70
|
+
- files drafted or updated
|
|
71
|
+
- verified claims
|
|
72
|
+
- inferred claims
|
|
73
|
+
- unknowns
|
|
74
|
+
- needs human confirmation
|
|
75
|
+
- suggested validation commands
|
|
76
|
+
- recommended next harness steps
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export function renderVcmLongRunningValidationSkillRules() {
|
|
2
|
+
return `## Rule
|
|
3
|
+
|
|
4
|
+
Do not end the current turn only to wait for a long-running shell callback.
|
|
5
|
+
|
|
6
|
+
Use a bounded file-backed job instead.
|
|
7
|
+
|
|
8
|
+
## Protocol
|
|
9
|
+
|
|
10
|
+
1. Start the command through \`.ai/tools/run-long-check\`.
|
|
11
|
+
2. Write job state under \`.ai/vcm/jobs/<job-id>/\`.
|
|
12
|
+
3. Run \`.ai/tools/watch-job <job-id> --timeout <duration>\` in the same turn.
|
|
13
|
+
4. Treat success, failure, and timeout as explicit results.
|
|
14
|
+
5. Read the final status and relevant log tail.
|
|
15
|
+
6. Record command, result, duration, and required follow-up wherever the caller normally records command evidence.
|
|
16
|
+
|
|
17
|
+
Example:
|
|
18
|
+
|
|
19
|
+
\`\`\`bash
|
|
20
|
+
.ai/tools/run-long-check -- cargo test --workspace
|
|
21
|
+
.ai/tools/watch-job <job-id> --timeout 20m
|
|
22
|
+
\`\`\`
|
|
23
|
+
|
|
24
|
+
## Job Files
|
|
25
|
+
|
|
26
|
+
\`\`\`text
|
|
27
|
+
.ai/vcm/jobs/<job-id>/command.json
|
|
28
|
+
.ai/vcm/jobs/<job-id>/status.json
|
|
29
|
+
.ai/vcm/jobs/<job-id>/stdout.log
|
|
30
|
+
.ai/vcm/jobs/<job-id>/stderr.log
|
|
31
|
+
\`\`\`
|
|
32
|
+
|
|
33
|
+
## Timeout
|
|
34
|
+
|
|
35
|
+
Timeout is not "unknown". It is a command result.
|
|
36
|
+
|
|
37
|
+
On timeout:
|
|
38
|
+
|
|
39
|
+
- summarize the latest log tail
|
|
40
|
+
- record the timeout in \`status.json\`
|
|
41
|
+
- report whether the timed-out process was stopped
|
|
42
|
+
- do not mark the command as passed
|
|
43
|
+
|
|
44
|
+
\`watch-job\` should attempt to stop the timed-out command process group. If termination cannot be confirmed, say so in the summary.
|
|
45
|
+
|
|
46
|
+
## Cleanup
|
|
47
|
+
|
|
48
|
+
\`.ai/vcm/jobs/**\` is runtime state. Delete it after the command result and useful log evidence have been recorded where needed.
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export function renderVcmRouteMessageSkillRules() {
|
|
2
|
+
return `## Purpose
|
|
3
|
+
|
|
4
|
+
Use this skill when a VCM role needs to hand work, ask a question, report a result, report a blocker, or raise a finding to another VCM role.
|
|
5
|
+
|
|
6
|
+
This skill writes a route file. It does not deliver the message. VCM backend delivery is triggered later by Claude Code hooks.
|
|
7
|
+
|
|
8
|
+
## Route Policy
|
|
9
|
+
|
|
10
|
+
Use only routes allowed by the current VCM role rules and task approval.
|
|
11
|
+
|
|
12
|
+
Allowed message types:
|
|
13
|
+
|
|
14
|
+
- task
|
|
15
|
+
- question
|
|
16
|
+
- revise
|
|
17
|
+
- cancel
|
|
18
|
+
- result
|
|
19
|
+
- blocked
|
|
20
|
+
- finding
|
|
21
|
+
|
|
22
|
+
## Route File
|
|
23
|
+
|
|
24
|
+
Write or update exactly one file:
|
|
25
|
+
|
|
26
|
+
\`\`\`text
|
|
27
|
+
.ai/vcm/handoffs/messages/<from-role>-<to-role>.md
|
|
28
|
+
\`\`\`
|
|
29
|
+
|
|
30
|
+
The file name is authoritative. Do not put from/to in frontmatter and do not create alternate message paths.
|
|
31
|
+
|
|
32
|
+
If the same route file already contains a not-yet-delivered message, update that file instead of creating a fragmented follow-up.
|
|
33
|
+
|
|
34
|
+
## Message Format
|
|
35
|
+
|
|
36
|
+
\`\`\`md
|
|
37
|
+
---
|
|
38
|
+
type: task
|
|
39
|
+
artifact_refs:
|
|
40
|
+
- .ai/vcm/handoffs/architecture-plan.md
|
|
41
|
+
- docs/plans/example.md
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
Summary:
|
|
45
|
+
...
|
|
46
|
+
|
|
47
|
+
Request or result:
|
|
48
|
+
...
|
|
49
|
+
|
|
50
|
+
Evidence:
|
|
51
|
+
...
|
|
52
|
+
|
|
53
|
+
Expected next action:
|
|
54
|
+
...
|
|
55
|
+
\`\`\`
|
|
56
|
+
|
|
57
|
+
Use the smallest body that is complete. Include artifact refs instead of copying long documents.
|
|
58
|
+
|
|
59
|
+
## Required Body Content
|
|
60
|
+
|
|
61
|
+
- why this message exists
|
|
62
|
+
- what the target role should do or what result is being reported
|
|
63
|
+
- source of truth or artifact references
|
|
64
|
+
- validation or documentation state when relevant
|
|
65
|
+
- blocker, decision needed, or next step when relevant
|
|
66
|
+
|
|
67
|
+
## Turn Rule
|
|
68
|
+
|
|
69
|
+
After writing or updating the route file, end the current Claude Code turn immediately.
|
|
70
|
+
|
|
71
|
+
Do not:
|
|
72
|
+
|
|
73
|
+
- send another message to the same target role in the same turn
|
|
74
|
+
- poll route files
|
|
75
|
+
- start a shell loop
|
|
76
|
+
- wait for another role's answer
|
|
77
|
+
- paste directly into another role terminal
|
|
78
|
+
- use Claude Code Task/Subagent for VCM role delegation
|
|
79
|
+
|
|
80
|
+
VCM scans pending route files after the Stop hook and delivers later replies in a new turn.
|
|
81
|
+
|
|
82
|
+
## Recovery
|
|
83
|
+
|
|
84
|
+
If delivery is manual, blocked, or the target role is busy, leave the route file non-empty. Do not clear it yourself unless the user or VCM controller has explicitly confirmed manual handling.
|
|
85
|
+
`;
|
|
86
|
+
}
|
|
@@ -20,6 +20,7 @@ ${artifactRefs}
|
|
|
20
20
|
|
|
21
21
|
Instructions:
|
|
22
22
|
- Read the message and execute only within this VCM task.
|
|
23
|
+
- If you write or update a VCM route file, use the vcm-route-message skill.
|
|
23
24
|
- If you need to send a VCM message after handling this, write or update .ai/vcm/handoffs/messages/<your-role>-<target-role>.md.
|
|
24
25
|
- Non-PM roles reply only to project-manager, for example ${routeFileExample}.
|
|
25
26
|
- After writing a route file, end this Claude Code turn immediately.
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
export function renderRoleCommandTemplate(taskSlug, role) {
|
|
1
|
+
export function renderRoleCommandTemplate(taskSlug, role, taskRepoRoot = "$VCM_TASK_REPO_ROOT", branch = "TBD") {
|
|
2
2
|
return `# ${role} command for ${taskSlug}
|
|
3
3
|
|
|
4
|
+
## Worktree
|
|
5
|
+
|
|
6
|
+
Task repo root: ${taskRepoRoot}
|
|
7
|
+
Branch: ${branch}
|
|
8
|
+
Rule: only edit files under Task repo root.
|
|
9
|
+
|
|
4
10
|
## Objective
|
|
5
11
|
|
|
6
12
|
TBD
|
|
@@ -6,15 +6,9 @@ const REQUIRED_HEADINGS = {
|
|
|
6
6
|
"Risks",
|
|
7
7
|
"Stop Conditions"
|
|
8
8
|
],
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"Validation",
|
|
13
|
-
"Deviations From Architecture Plan",
|
|
14
|
-
"Follow-ups"
|
|
15
|
-
],
|
|
16
|
-
"validation-log": [
|
|
17
|
-
"Validation"
|
|
9
|
+
"known-issues": [
|
|
10
|
+
"Task Issues",
|
|
11
|
+
"Escalation To Docs"
|
|
18
12
|
],
|
|
19
13
|
"review-report": [
|
|
20
14
|
"Summary",
|
|
@@ -29,7 +23,18 @@ const REQUIRED_HEADINGS = {
|
|
|
29
23
|
"Docs Reviewed And Left Unchanged",
|
|
30
24
|
"Public Contract / Module Boundary Notes",
|
|
31
25
|
"Remaining Documentation Risks",
|
|
26
|
+
"Known Issues Disposition",
|
|
32
27
|
"Decision"
|
|
28
|
+
],
|
|
29
|
+
"final-acceptance": [
|
|
30
|
+
"Decision",
|
|
31
|
+
"Evidence Reviewed",
|
|
32
|
+
"Scope Traceability",
|
|
33
|
+
"Validation Summary",
|
|
34
|
+
"Review And Docs Sync",
|
|
35
|
+
"Known Issues Disposition",
|
|
36
|
+
"Cleanup Readiness",
|
|
37
|
+
"Final User Summary"
|
|
33
38
|
]
|
|
34
39
|
};
|
|
35
40
|
const PLACEHOLDER_PATTERN = /(^|\n)\s*(TBD|Not run yet\.?|status:\s*draft)\s*(\n|$)/i;
|