@vibecompass/vibecompass 0.9.1 → 0.9.3
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/CHANGELOG.md +12 -0
- package/README.md +8 -3
- package/package.json +1 -1
- package/src/docs-review.js +41 -7
- package/src/generators/agent-files/markers.js +2 -1
- package/src/generators/agent-files/template.js +13 -1
- package/src/scaffold.js +2 -2
- package/src/status.js +1 -1
- package/src/workflows/registry.js +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.3 - 2026-06-14
|
|
4
|
+
|
|
5
|
+
- Make docs-review prompts mode-aware: interactive AI sessions stop at the coverage-plan approval gate, while `--run-local` and hosted single-turn runs emit fenced proposal material for later apply/proposal review.
|
|
6
|
+
- Clarify that pre-approval coverage plans are proposed scope, not accepted output, so agents should not label proposed areas `accepted` before user approval.
|
|
7
|
+
- Update generated docs-review workflow guidance and prompt regression coverage for the interactive vs single-turn split.
|
|
8
|
+
|
|
9
|
+
## 0.9.2 - 2026-06-14
|
|
10
|
+
|
|
11
|
+
- Clarify docs-review acceptance gates so agents state when no architecture docs have been applied yet and only report completion after apply succeeds.
|
|
12
|
+
- Render local folder repo sources correctly in generated agent files instead of showing `null`.
|
|
13
|
+
- Fix false agent-file drift in `status` after `sync-agents` when managed files are already current.
|
|
14
|
+
|
|
3
15
|
## 0.9.1 - 2026-06-14
|
|
4
16
|
|
|
5
17
|
- Make local docs-review prompts self-contained by printing the accepted output file, root-scoped apply command, and same-version `npx` fallback the agent should run after user acceptance.
|
package/README.md
CHANGED
|
@@ -46,7 +46,11 @@ Please set it up in this project:
|
|
|
46
46
|
2. Initialize project memory with guided setup.
|
|
47
47
|
3. If this folder is not a Git repo, use a local folder source.
|
|
48
48
|
4. Start a named session lane for this setup work.
|
|
49
|
-
5.
|
|
49
|
+
5. If you run docs review, continue until either architecture docs are applied
|
|
50
|
+
or you are waiting for my explicit coverage-plan approval. Do not call docs
|
|
51
|
+
review done just because the marker was created.
|
|
52
|
+
6. Tell me which files changed, whether docs were actually applied, and what I
|
|
53
|
+
should review next.
|
|
50
54
|
|
|
51
55
|
Do not ask me to paste secret tokens into chat.
|
|
52
56
|
```
|
|
@@ -58,8 +62,9 @@ docs review
|
|
|
58
62
|
```
|
|
59
63
|
|
|
60
64
|
That asks the AI to inspect your code and create the first real architecture
|
|
61
|
-
docs.
|
|
62
|
-
|
|
65
|
+
docs. If it asks you to approve a coverage plan, approve it or ask for changes;
|
|
66
|
+
the package prints the output file and exact apply command after the accepted
|
|
67
|
+
docs are ready.
|
|
63
68
|
|
|
64
69
|
### Terminal path
|
|
65
70
|
|
package/package.json
CHANGED
package/src/docs-review.js
CHANGED
|
@@ -79,6 +79,9 @@ export async function preflightDocsReview(options = {}, environment = {}) {
|
|
|
79
79
|
: normalizeReviewConfig(options);
|
|
80
80
|
const env = environment.env ?? process.env;
|
|
81
81
|
const localProvider = resolveLocalProvider(options);
|
|
82
|
+
const promptExecutionMode = options.submitHosted || shouldRunLocal(options)
|
|
83
|
+
? 'single-turn'
|
|
84
|
+
: 'interactive';
|
|
82
85
|
const runtime = resolveDocsReviewRuntime(project, {
|
|
83
86
|
env,
|
|
84
87
|
guided: Boolean(options.guided),
|
|
@@ -92,6 +95,7 @@ export async function preflightDocsReview(options = {}, environment = {}) {
|
|
|
92
95
|
rootDir,
|
|
93
96
|
llm: reviewConfig.llm,
|
|
94
97
|
model: reviewConfig.model,
|
|
98
|
+
executionMode: promptExecutionMode,
|
|
95
99
|
});
|
|
96
100
|
|
|
97
101
|
const status = options.submitHosted
|
|
@@ -1687,6 +1691,36 @@ function renderReviewPrompt(options) {
|
|
|
1687
1691
|
const outputPath = path.join(options.rootDir, 'state', 'docs-review-output.md');
|
|
1688
1692
|
const applyCommand = `vibecompass docs-review --root ${shellQuote(options.rootDir)} --apply-output --output ${shellQuote(outputPath)}`;
|
|
1689
1693
|
const npxApplyCommand = `npx -y @vibecompass/vibecompass@${PACKAGE_VERSION} docs-review --root ${shellQuote(options.rootDir)} --apply-output --output ${shellQuote(outputPath)}`;
|
|
1694
|
+
const isSingleTurn = options.executionMode === 'single-turn';
|
|
1695
|
+
const coveragePlanStageLines = isSingleTurn
|
|
1696
|
+
? [
|
|
1697
|
+
'- This is a single-turn execution mode: there is no mid-review user approval turn.',
|
|
1698
|
+
'- Treat the coverage plan you emit in this response as accepted proposal material, then emit the planned `vibecompass-coverage-plan`, architecture-doc, and decision-recommendation fences in the same response.',
|
|
1699
|
+
'- Human review happens later at the local apply-output step or hosted proposal surface; generated output is not canonical until accepted and applied.',
|
|
1700
|
+
]
|
|
1701
|
+
: [
|
|
1702
|
+
'- Before user approval, present the coverage plan as human-readable proposed scope. Do not label proposed areas `accepted` and do not emit the `vibecompass-coverage-plan` fence yet.',
|
|
1703
|
+
'- Ask for user acceptance before emitting fenced coverage-plan or architecture-doc blocks. When you stop for acceptance, state plainly that no architecture docs have been applied yet.',
|
|
1704
|
+
'- After approval, emit the accepted plan as one `vibecompass-coverage-plan version=1` JSON fence before architecture-doc blocks.',
|
|
1705
|
+
];
|
|
1706
|
+
const outputContractIntroLines = isSingleTurn
|
|
1707
|
+
? [
|
|
1708
|
+
'Because this is a single-turn execution mode, output the machine-readable coverage-plan block in this response before architecture-doc blocks.',
|
|
1709
|
+
]
|
|
1710
|
+
: [
|
|
1711
|
+
'If you are stopping for user approval, do not output the machine-readable fence below yet; show the plan as proposed scope and ask the user to approve or revise it.',
|
|
1712
|
+
'',
|
|
1713
|
+
'After the user accepts the plan, output one machine-readable coverage-plan block for the accepted plan:',
|
|
1714
|
+
];
|
|
1715
|
+
const stage4WriteLine = isSingleTurn
|
|
1716
|
+
? `- The package will save the model response to \`${outputPath}\`; local users or hosted proposal reviewers decide what becomes canonical later.`
|
|
1717
|
+
: `- After the user accepts Stage 2, write the complete accepted fenced output verbatim to \`${outputPath}\`.`;
|
|
1718
|
+
const finalOutputLine = isSingleTurn
|
|
1719
|
+
? `Only include accepted proposal-material blocks for coverage, architecture, and decision recommendations. The package or hosted worker saves the response to \`${outputPath}\`; report that generated output still requires local apply or hosted proposal acceptance before it is canonical.`
|
|
1720
|
+
: `Only include accepted coverage, architecture, and decision-recommendation blocks. After user acceptance, save the final accepted output to \`${outputPath}\`, run \`${applyCommand}\` or \`${npxApplyCommand}\`, and report applied paths plus parser warnings.`;
|
|
1721
|
+
const architectureDocBlockIntro = isSingleTurn
|
|
1722
|
+
? 'Then, for each planned architecture doc in this single-turn response, output one fenced block exactly like this:'
|
|
1723
|
+
: 'Then, for each architecture doc the user accepts, output one fenced block exactly like this:';
|
|
1690
1724
|
|
|
1691
1725
|
return [
|
|
1692
1726
|
`# ${DOCS_REVIEW_PROMPT_VERSION}`,
|
|
@@ -1699,6 +1733,7 @@ function renderReviewPrompt(options) {
|
|
|
1699
1733
|
`- Project mode: ${options.project.mode}`,
|
|
1700
1734
|
`- Review provider to record: ${options.llm}`,
|
|
1701
1735
|
`- Review model/version to record: ${options.model}`,
|
|
1736
|
+
`- Execution mode: ${isSingleTurn ? 'single-turn (emit accepted proposal output now)' : 'interactive (stop at coverage-plan approval gate)'}`,
|
|
1702
1737
|
`- Accepted output file: ${outputPath}`,
|
|
1703
1738
|
`- Apply command after user acceptance: ${applyCommand}`,
|
|
1704
1739
|
`- Apply command if the CLI is not installed on PATH: ${npxApplyCommand}`,
|
|
@@ -1721,8 +1756,7 @@ function renderReviewPrompt(options) {
|
|
|
1721
1756
|
'- The minimum useful set must cover: user journey, project/system map (frontend/backend/API/data/integration structure and connections), and summaries of the core journey-facing features.',
|
|
1722
1757
|
'- Prioritize entry points, user-flow/gating relationships, data ownership, external integrations, jobs/async boundaries, auth/security boundaries, and test surfaces.',
|
|
1723
1758
|
'- Mark each proposed doc as `comprehensive`, `partial`, or `initial`, with the reason and blindspots.',
|
|
1724
|
-
|
|
1725
|
-
'- Ask for user acceptance before emitting fenced architecture-doc blocks.',
|
|
1759
|
+
...coveragePlanStageLines,
|
|
1726
1760
|
'',
|
|
1727
1761
|
'Stage 3 — Bounded doc generation:',
|
|
1728
1762
|
'- Generate only accepted docs, one complete fenced block per architecture path.',
|
|
@@ -1732,10 +1766,10 @@ function renderReviewPrompt(options) {
|
|
|
1732
1766
|
'- Include only the most important involved files; prefer representative entry points and owned contracts over exhaustive file lists.',
|
|
1733
1767
|
'',
|
|
1734
1768
|
'Stage 4 — Apply and verify:',
|
|
1735
|
-
|
|
1769
|
+
stage4WriteLine,
|
|
1736
1770
|
`- Then run \`${applyCommand}\` to validate and apply the accepted blocks.`,
|
|
1737
1771
|
`- If \`vibecompass\` is not installed on PATH, run \`${npxApplyCommand}\` instead.`,
|
|
1738
|
-
'- Surface any parser warnings, especially oversized docs, so the user can decide whether to compact or accept the output.',
|
|
1772
|
+
'- Only report docs-review as applied after the apply command succeeds. Surface any parser warnings, especially oversized docs, so the user can decide whether to compact or accept the output.',
|
|
1739
1773
|
'',
|
|
1740
1774
|
'## Architecture Doc Contract',
|
|
1741
1775
|
'When creating or updating architecture docs, use the existing VibeCompass structure:',
|
|
@@ -1804,7 +1838,7 @@ function renderReviewPrompt(options) {
|
|
|
1804
1838
|
'- token-budget risks or oversized-doc candidates',
|
|
1805
1839
|
'- proposed decisions, if any',
|
|
1806
1840
|
'',
|
|
1807
|
-
|
|
1841
|
+
...outputContractIntroLines,
|
|
1808
1842
|
'',
|
|
1809
1843
|
'```vibecompass-coverage-plan version=1',
|
|
1810
1844
|
'{',
|
|
@@ -1825,7 +1859,7 @@ function renderReviewPrompt(options) {
|
|
|
1825
1859
|
'}',
|
|
1826
1860
|
'```',
|
|
1827
1861
|
'',
|
|
1828
|
-
|
|
1862
|
+
architectureDocBlockIntro,
|
|
1829
1863
|
'',
|
|
1830
1864
|
'```vibecompass-architecture-doc path=architecture/domain/feature/component.md',
|
|
1831
1865
|
'<complete markdown file content>',
|
|
@@ -1842,7 +1876,7 @@ function renderReviewPrompt(options) {
|
|
|
1842
1876
|
'**Context:** Optional supporting context.',
|
|
1843
1877
|
'```',
|
|
1844
1878
|
'',
|
|
1845
|
-
|
|
1879
|
+
finalOutputLine,
|
|
1846
1880
|
].join('\n');
|
|
1847
1881
|
}
|
|
1848
1882
|
|
|
@@ -46,7 +46,8 @@ export function applyManagedBlock(existingContent, generatedContent, options = {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const before = existingContent.slice(0, startIndex);
|
|
49
|
-
const
|
|
49
|
+
const rawAfter = existingContent.slice(endIndex + END_MARKER.length);
|
|
50
|
+
const after = rawAfter.trim() === '' ? '' : rawAfter;
|
|
50
51
|
const beforeSeparator = before === '' || before.endsWith('\n') ? '' : '\n';
|
|
51
52
|
const afterSeparator = after === '' || after.startsWith('\n') ? '' : '\n';
|
|
52
53
|
|
|
@@ -63,7 +63,7 @@ function renderProjectSnapshot(context) {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
for (const repo of context.repos) {
|
|
66
|
-
lines.push(`- Repo \`${repo.id}\`: ${repo
|
|
66
|
+
lines.push(`- Repo \`${repo.id}\`: ${formatRepoDescriptor(repo)}`);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
const domainCount = context.domains.length;
|
|
@@ -82,6 +82,18 @@ function renderProjectSnapshot(context) {
|
|
|
82
82
|
return lines.length > 0 ? lines : ['- No project details recorded yet.'];
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
function formatRepoDescriptor(repo) {
|
|
86
|
+
if (repo?.source === 'local' || repo?.path) {
|
|
87
|
+
return `local folder ${repo.path ?? '.'}`;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (repo?.remote) {
|
|
91
|
+
return repo.remote;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return 'source not recorded';
|
|
95
|
+
}
|
|
96
|
+
|
|
85
97
|
function renderDecisionLine(decision) {
|
|
86
98
|
return `D-${String(decision.decision_id).padStart(3, '0')} — ${decision.title}`;
|
|
87
99
|
}
|
package/src/scaffold.js
CHANGED
|
@@ -459,11 +459,11 @@ ${repoLines}
|
|
|
459
459
|
}
|
|
460
460
|
|
|
461
461
|
function formatRepoDescriptor(repo) {
|
|
462
|
-
if (repo.source === 'local') {
|
|
462
|
+
if (repo.source === 'local' || repo.path) {
|
|
463
463
|
return `local folder ${repo.path}`;
|
|
464
464
|
}
|
|
465
465
|
|
|
466
|
-
return repo.remote;
|
|
466
|
+
return repo.remote ?? 'source not recorded';
|
|
467
467
|
}
|
|
468
468
|
|
|
469
469
|
function generateArchitectureGuide(projectConfig) {
|
package/src/status.js
CHANGED
|
@@ -281,7 +281,7 @@ async function readAgentFileStatus(rootDir, toolingRootDir) {
|
|
|
281
281
|
results: result.results.map((item) => ({
|
|
282
282
|
format: item.format,
|
|
283
283
|
relativePath: item.relativePath,
|
|
284
|
-
status: item.status,
|
|
284
|
+
status: item.changed || item.warning ? item.status : 'current',
|
|
285
285
|
warning: item.warning,
|
|
286
286
|
changed: item.changed,
|
|
287
287
|
conflicts: item.conflicts ?? [],
|
|
@@ -90,8 +90,8 @@ function renderDocsReviewWorkflow(options = {}) {
|
|
|
90
90
|
const decisionsPath = joinRootRelative(rootRelativePath, 'decisions/');
|
|
91
91
|
const sessionsPath = joinRootRelative(rootRelativePath, 'sessions/');
|
|
92
92
|
const outputPath = joinRootRelative(rootRelativePath, 'state/docs-review-output.md');
|
|
93
|
-
const applyCommand = `vibecompass docs-review --root ${rootRelativePath} --apply-output`;
|
|
94
|
-
const npxApplyCommand = `npx -y @vibecompass/vibecompass@${PACKAGE_VERSION} docs-review --root ${rootRelativePath} --apply-output`;
|
|
93
|
+
const applyCommand = `vibecompass docs-review --root ${rootRelativePath} --apply-output --output ${outputPath}`;
|
|
94
|
+
const npxApplyCommand = `npx -y @vibecompass/vibecompass@${PACKAGE_VERSION} docs-review --root ${rootRelativePath} --apply-output --output ${outputPath}`;
|
|
95
95
|
|
|
96
96
|
return `# VibeCompass Workflow — docs review
|
|
97
97
|
|
|
@@ -113,11 +113,11 @@ Turn starter project memory into evidence-backed architecture docs under \`archi
|
|
|
113
113
|
- produce a coverage plan before reading broad source bodies
|
|
114
114
|
- read targeted source files only when the coverage plan needs evidence
|
|
115
115
|
3. Run \`vibecompass docs-review --guided --llm <tool-name> --model <model-name>\` to record the review marker and print the canonical docs-review contract. Use the current AI tool name and model when known.
|
|
116
|
-
4. Present the evidence inventory, coverage plan, user journey, project/system map, proposed architecture docs, blindspots, token-budget risks, and any decision candidates before generating accepted output.
|
|
117
|
-
5. Draft only output the user accepts.
|
|
116
|
+
4. Present the evidence inventory, coverage plan, user journey, project/system map, proposed architecture docs, blindspots, token-budget risks, and any decision candidates before generating accepted output. If you stop here for user approval, state clearly that no architecture docs have been applied yet and do not label proposed areas as accepted.
|
|
117
|
+
5. Draft only output the user accepts. After approval, the accepted plan must be fenced as \`vibecompass-coverage-plan version=1\`. Accepted architecture docs must be fenced as \`vibecompass-architecture-doc path=architecture/domain/feature/component.md\` blocks and must include required frontmatter: \`domain\`, \`feature\`, \`component\`, and \`status\`. The accepted \`architecture/overview/project-shape.md\` doc should include exactly one \`vibecompass-project-map version=1\` JSON block with journey-facing features, entry points, and evidence-backed relationships. Accepted local decisions may be fenced as \`vibecompass-decision-recommendation target=decisions/domain.md\` blocks without D-numbers.
|
|
118
118
|
6. Keep each generated architecture doc focused and retrieval-oriented. Soft budget: under 12000 bytes per doc unless the extra detail is necessary and called out in review metadata or retrieval guidance.
|
|
119
119
|
7. Write the accepted fenced blocks verbatim to \`${outputPath}\`.
|
|
120
|
-
8. Run \`${applyCommand}\` to validate and apply the accepted blocks. If \`vibecompass\` is not installed on PATH, run \`${npxApplyCommand}\` instead. If accepted docs were written manually outside the output file, run \`vibecompass docs-review --root ${rootRelativePath} --complete\` after confirming the marker should be completed.
|
|
120
|
+
8. Run \`${applyCommand}\` to validate and apply the accepted blocks. If \`vibecompass\` is not installed on PATH, run \`${npxApplyCommand}\` instead. Only report docs-review as applied after this command succeeds. If accepted docs were written manually outside the output file, run \`vibecompass docs-review --root ${rootRelativePath} --complete\` after confirming the marker should be completed.
|
|
121
121
|
9. Run \`vibecompass status\` to confirm the docs-review marker is complete and not drifted. Report the applied architecture paths, coverage projection, decision recommendations, parser warnings such as oversized docs or missing review metadata, and any blindspots documented in the accepted docs-review output.
|
|
122
122
|
|
|
123
123
|
## Rebuild option
|