@vibecompass/vibecompass 0.9.0 → 0.9.2

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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.2 - 2026-06-14
4
+
5
+ - Clarify docs-review acceptance gates so agents state when no architecture docs have been applied yet and only report completion after apply succeeds.
6
+ - Render local folder repo sources correctly in generated agent files instead of showing `null`.
7
+ - Fix false agent-file drift in `status` after `sync-agents` when managed files are already current.
8
+
9
+ ## 0.9.1 - 2026-06-14
10
+
11
+ - 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.
12
+
3
13
  ## 0.9.0 - 2026-06-14
4
14
 
5
15
  - Add explicit local folder sources for non-Git projects: `project.yaml.repos[]` may use `source: local` plus `path`, and `init` accepts `--repo-local <id=path>`.
package/README.md CHANGED
@@ -16,32 +16,69 @@ Full docs: https://vibecompass.dev/developers
16
16
 
17
17
  ## Install
18
18
 
19
- Run without installing:
19
+ Most people can run VibeCompass without installing it globally:
20
20
 
21
21
  ```bash
22
- npx -y @vibecompass/vibecompass --help
22
+ npx -y @vibecompass/vibecompass@latest --help
23
23
  ```
24
24
 
25
- Or install in a project:
25
+ Or install it globally if you want the shorter `vibecompass` command:
26
26
 
27
27
  ```bash
28
- npm install @vibecompass/vibecompass
28
+ npm install -g @vibecompass/vibecompass@latest
29
29
  ```
30
30
 
31
31
  Requires Node.js 20+.
32
32
 
33
33
  ## Quick Start
34
34
 
35
- Create project memory:
35
+ ### Easiest path: ask your AI coding tool
36
+
37
+ Open Claude Code, Codex, Cursor, or Copilot in the project folder you want
38
+ VibeCompass to remember, then paste:
39
+
40
+ ```text
41
+ VibeCompass is project memory for vibe coding. Use the npm package
42
+ @vibecompass/vibecompass@latest.
43
+
44
+ Please set it up in this project:
45
+ 1. Run the needed VibeCompass commands with npx.
46
+ 2. Initialize project memory with guided setup.
47
+ 3. If this folder is not a Git repo, use a local folder source.
48
+ 4. Start a named session lane for this setup work.
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.
54
+
55
+ Do not ask me to paste secret tokens into chat.
56
+ ```
57
+
58
+ After setup, start a fresh AI session in the same project and type:
59
+
60
+ ```text
61
+ docs review
62
+ ```
63
+
64
+ That asks the AI to inspect your code and create the first real architecture
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.
68
+
69
+ ### Terminal path
70
+
71
+ Run this from your project folder:
36
72
 
37
73
  ```bash
38
- npx -y @vibecompass/vibecompass init --guided
74
+ npx -y @vibecompass/vibecompass@latest init --guided
39
75
  ```
40
76
 
41
- For a folder that is not a Git repo, use an explicit local source:
77
+ If the folder is not a Git repo, use a local folder source:
42
78
 
43
79
  ```bash
44
- npx -y @vibecompass/vibecompass init \
80
+ npx -y @vibecompass/vibecompass@latest init \
81
+ --root .compass \
45
82
  --name "My Project" \
46
83
  --mode local-primary \
47
84
  --repo-local app=.
@@ -50,13 +87,13 @@ npx -y @vibecompass/vibecompass init \
50
87
  Check what to do next:
51
88
 
52
89
  ```bash
53
- npx -y @vibecompass/vibecompass status --root .compass
90
+ npx -y @vibecompass/vibecompass@latest status --root .compass
54
91
  ```
55
92
 
56
93
  Start a builder session:
57
94
 
58
95
  ```bash
59
- npx -y @vibecompass/vibecompass start-session \
96
+ npx -y @vibecompass/vibecompass@latest start-session \
60
97
  --root .compass \
61
98
  --id feature-lane \
62
99
  --working-on "Build the next feature"
@@ -65,13 +102,13 @@ npx -y @vibecompass/vibecompass start-session \
65
102
  Generate evidence-backed architecture docs:
66
103
 
67
104
  ```bash
68
- npx -y @vibecompass/vibecompass docs-review --root .compass --guided
105
+ npx -y @vibecompass/vibecompass@latest docs-review --root .compass --guided
69
106
  ```
70
107
 
71
108
  Close the session:
72
109
 
73
110
  ```bash
74
- npx -y @vibecompass/vibecompass close-session \
111
+ npx -y @vibecompass/vibecompass@latest close-session \
75
112
  --root .compass \
76
113
  --session feature-lane \
77
114
  --title "Feature Lane" \
@@ -83,25 +120,25 @@ npx -y @vibecompass/vibecompass close-session \
83
120
 
84
121
  ```bash
85
122
  # Create or inspect project memory
86
- vibecompass init --guided
87
- vibecompass status --root .compass
123
+ npx -y @vibecompass/vibecompass@latest init --guided
124
+ npx -y @vibecompass/vibecompass@latest status --root .compass
88
125
 
89
126
  # Session workflow
90
- vibecompass start-session --root .compass --id auth-flow --working-on "Auth flow"
91
- vibecompass list-sessions --root .compass
92
- vibecompass switch-session auth-flow --root .compass
93
- vibecompass close-session --root .compass --session auth-flow --title "Auth Flow" --completed "Built auth" --next-step "Review"
127
+ npx -y @vibecompass/vibecompass@latest start-session --root .compass --id auth-flow --working-on "Auth flow"
128
+ npx -y @vibecompass/vibecompass@latest list-sessions --root .compass
129
+ npx -y @vibecompass/vibecompass@latest switch-session auth-flow --root .compass
130
+ npx -y @vibecompass/vibecompass@latest close-session --root .compass --session auth-flow --title "Auth Flow" --completed "Built auth" --next-step "Review"
94
131
 
95
132
  # Agent instruction files
96
- vibecompass sync-agents --root .compass
133
+ npx -y @vibecompass/vibecompass@latest sync-agents --root .compass
97
134
 
98
135
  # Architecture docs review
99
- vibecompass docs-review --root .compass --guided
100
- vibecompass docs-review --root .compass --apply-output
136
+ npx -y @vibecompass/vibecompass@latest docs-review --root .compass --guided
137
+ npx -y @vibecompass/vibecompass@latest docs-review --root .compass --apply-output
101
138
 
102
139
  # Rerun docs review from an archived architecture-doc slate
103
- vibecompass docs-review --root .compass --rebuild --path architecture
104
- vibecompass docs-review --root .compass --rebuild --apply --stale-policy archive --path architecture
140
+ npx -y @vibecompass/vibecompass@latest docs-review --root .compass --rebuild --path architecture
141
+ npx -y @vibecompass/vibecompass@latest docs-review --root .compass --rebuild --apply --stale-policy archive --path architecture
105
142
  ```
106
143
 
107
144
  ## What It Creates
@@ -146,13 +183,13 @@ Use hosted sync when you want browser review, team workflows, or hosted
146
183
  docs-review proposals:
147
184
 
148
185
  ```bash
149
- vibecompass connect-hosted \
186
+ npx -y @vibecompass/vibecompass@latest connect-hosted \
150
187
  --root .compass \
151
188
  --sync-api-url https://vibecompass.dev \
152
189
  --sync-project-id vc_proj_example \
153
190
  --sync-credential-env-var VIBECOMPASS_SYNC_TOKEN
154
191
 
155
- vibecompass push --root .compass
192
+ npx -y @vibecompass/vibecompass@latest push --root .compass
156
193
  ```
157
194
 
158
195
  ### Multiple environments
@@ -162,16 +199,16 @@ production) so you never have to rebind:
162
199
 
163
200
  ```bash
164
201
  # add targets once — the first one becomes the default
165
- vibecompass connect-hosted --root .compass --target dev \
202
+ npx -y @vibecompass/vibecompass@latest connect-hosted --root .compass --target dev \
166
203
  --sync-api-url http://localhost:3000 --sync-project-id vc_proj_dev \
167
204
  --sync-credential-env-var VIBECOMPASS_SYNC_TOKEN
168
- vibecompass connect-hosted --root .compass --target prod \
205
+ npx -y @vibecompass/vibecompass@latest connect-hosted --root .compass --target prod \
169
206
  --sync-api-url https://vibecompass.dev --sync-project-id vc_proj_prod \
170
207
  --sync-credential-env-var VIBECOMPASS_SYNC_TOKEN_PROD
171
208
 
172
209
  # then pick per command, or switch the default
173
- vibecompass push --root .compass --sync-target prod
174
- vibecompass sync-target prod --root .compass
210
+ npx -y @vibecompass/vibecompass@latest push --root .compass --sync-target prod
211
+ npx -y @vibecompass/vibecompass@latest sync-target prod --root .compass
175
212
  ```
176
213
 
177
214
  Tip: if you already have a single (flat) binding, add it as your first named
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibecompass/vibecompass",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "Local-first project-memory core for VibeCompass",
5
5
  "type": "module",
6
6
  "bin": {
@@ -6,6 +6,7 @@ import { sha256Text } from './hash.js';
6
6
  import { writeStateManifest } from './manifest.js';
7
7
  import { parseSimpleYaml } from './simple-yaml.js';
8
8
  import { readSyncCursor, resolveSyncBinding } from './sync-binding.js';
9
+ import { PACKAGE_VERSION } from './version.js';
9
10
 
10
11
  const DOCS_REVIEW_PROMPT_VERSION = 'VibeCompass Docs Review Prompt v3';
11
12
  const ARCHITECTURE_DOC_SOFT_SIZE_LIMIT_BYTES = 12000;
@@ -1683,6 +1684,10 @@ function renderApplyOutputMessage(options) {
1683
1684
  }
1684
1685
 
1685
1686
  function renderReviewPrompt(options) {
1687
+ const outputPath = path.join(options.rootDir, 'state', 'docs-review-output.md');
1688
+ const applyCommand = `vibecompass docs-review --root ${shellQuote(options.rootDir)} --apply-output --output ${shellQuote(outputPath)}`;
1689
+ const npxApplyCommand = `npx -y @vibecompass/vibecompass@${PACKAGE_VERSION} docs-review --root ${shellQuote(options.rootDir)} --apply-output --output ${shellQuote(outputPath)}`;
1690
+
1686
1691
  return [
1687
1692
  `# ${DOCS_REVIEW_PROMPT_VERSION}`,
1688
1693
  '',
@@ -1694,6 +1699,9 @@ function renderReviewPrompt(options) {
1694
1699
  `- Project mode: ${options.project.mode}`,
1695
1700
  `- Review provider to record: ${options.llm}`,
1696
1701
  `- Review model/version to record: ${options.model}`,
1702
+ `- Accepted output file: ${outputPath}`,
1703
+ `- Apply command after user acceptance: ${applyCommand}`,
1704
+ `- Apply command if the CLI is not installed on PATH: ${npxApplyCommand}`,
1697
1705
  '',
1698
1706
  '## Required Inputs',
1699
1707
  '1. Read `project.yaml`.',
@@ -1714,7 +1722,7 @@ function renderReviewPrompt(options) {
1714
1722
  '- Prioritize entry points, user-flow/gating relationships, data ownership, external integrations, jobs/async boundaries, auth/security boundaries, and test surfaces.',
1715
1723
  '- Mark each proposed doc as `comprehensive`, `partial`, or `initial`, with the reason and blindspots.',
1716
1724
  '- Emit the accepted plan as one `vibecompass-coverage-plan version=1` JSON fence before architecture-doc blocks.',
1717
- '- Ask for user acceptance before emitting fenced architecture-doc blocks.',
1725
+ '- Ask for user acceptance before emitting fenced architecture-doc blocks. When you stop for acceptance, state plainly that no architecture docs have been applied yet.',
1718
1726
  '',
1719
1727
  'Stage 3 — Bounded doc generation:',
1720
1728
  '- Generate only accepted docs, one complete fenced block per architecture path.',
@@ -1724,8 +1732,10 @@ function renderReviewPrompt(options) {
1724
1732
  '- Include only the most important involved files; prefer representative entry points and owned contracts over exhaustive file lists.',
1725
1733
  '',
1726
1734
  'Stage 4 — Apply and verify:',
1727
- '- After accepted blocks are written to `state/docs-review-output.md`, run `vibecompass docs-review --apply-output`.',
1728
- '- Surface any parser warnings, especially oversized docs, so the user can decide whether to compact or accept the output.',
1735
+ `- After the user accepts Stage 2, write the complete accepted fenced output verbatim to \`${outputPath}\`.`,
1736
+ `- Then run \`${applyCommand}\` to validate and apply the accepted blocks.`,
1737
+ `- If \`vibecompass\` is not installed on PATH, run \`${npxApplyCommand}\` instead.`,
1738
+ '- 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.',
1729
1739
  '',
1730
1740
  '## Architecture Doc Contract',
1731
1741
  'When creating or updating architecture docs, use the existing VibeCompass structure:',
@@ -1832,10 +1842,14 @@ function renderReviewPrompt(options) {
1832
1842
  '**Context:** Optional supporting context.',
1833
1843
  '```',
1834
1844
  '',
1835
- 'Only include accepted coverage, architecture, and decision-recommendation blocks. After accepted output is applied, `vibecompass docs-review --apply-output` records completion in `state/docs-review.json`.',
1845
+ `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.`,
1836
1846
  ].join('\n');
1837
1847
  }
1838
1848
 
1849
+ function shellQuote(value) {
1850
+ return `'${String(value).replaceAll("'", "'\\''")}'`;
1851
+ }
1852
+
1839
1853
  function ensureTrailingNewline(value) {
1840
1854
  return value.endsWith('\n') ? value : `${value}\n`;
1841
1855
  }
@@ -46,7 +46,8 @@ export function applyManagedBlock(existingContent, generatedContent, options = {
46
46
  }
47
47
 
48
48
  const before = existingContent.slice(0, startIndex);
49
- const after = existingContent.slice(endIndex + END_MARKER.length);
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.remote}`);
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 ?? [],
@@ -1,3 +1,5 @@
1
+ import { PACKAGE_VERSION } from '../version.js';
2
+
1
3
  export const WORKFLOW_REGISTRY = [
2
4
  {
3
5
  id: 'session-lifecycle',
@@ -88,6 +90,8 @@ function renderDocsReviewWorkflow(options = {}) {
88
90
  const decisionsPath = joinRootRelative(rootRelativePath, 'decisions/');
89
91
  const sessionsPath = joinRootRelative(rootRelativePath, 'sessions/');
90
92
  const outputPath = joinRootRelative(rootRelativePath, 'state/docs-review-output.md');
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}`;
91
95
 
92
96
  return `# VibeCompass Workflow — docs review
93
97
 
@@ -109,11 +113,11 @@ Turn starter project memory into evidence-backed architecture docs under \`archi
109
113
  - produce a coverage plan before reading broad source bodies
110
114
  - read targeted source files only when the coverage plan needs evidence
111
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.
112
- 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.
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.
113
117
  5. Draft only output the user accepts. 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.
114
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.
115
- 7. Write the accepted fenced blocks to \`${outputPath}\`.
116
- 8. Run \`vibecompass docs-review --apply-output\` to validate and apply the accepted blocks. If accepted docs were written manually outside the output file, run \`vibecompass docs-review --complete\` after confirming the marker should be completed.
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. 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.
117
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.
118
122
 
119
123
  ## Rebuild option