@vibecompass/vibecompass 0.10.7 → 0.10.8

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
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.10.8 - 2026-07-02
6
+
7
+ - Clarify generated docs-review workflow guidance so first passes establish breadth-first baseline coverage before optional scoped deepening.
8
+ - Add build-session guidance that tells builders to inspect relevant docs, decisions, coverage state, and source before feature work, then record, deepen, or explicitly defer documentation gaps before close-out.
9
+ - Print mode-aware hosted projection guidance during `close-session` / `end-session`: connected `local-primary` roots get an explicit `vibecompass push` reminder, `hosted-only` roots are directed through hosted/dashboard refresh, and `local-only` roots have no hosted push expectation.
10
+ - Expand close-session hosted guidance tests across local-primary with binding, local-primary without binding, hosted-only, and local-only modes.
11
+
5
12
  ## 0.10.7 - 2026-06-25
6
13
 
7
14
  - Let `connect-hosted` attach hosted sync to existing `local-only` project-memory roots by promoting them to `local-primary`, so local-only users can run the hosted setup command copied from the app without first editing `project.yaml`.
package/README.md CHANGED
@@ -180,11 +180,15 @@ After setup, use these phrases inside your AI coding tool:
180
180
  - `planning mode`
181
181
  - `review handoff`
182
182
  - `address review`
183
+ - `docs update`
183
184
  - `close session` / `end session`
184
185
  - `docs review`
185
186
 
186
187
  The npm package owns the file mechanics. Your AI session owns reading the
187
- workflow files, updating handoffs, and applying reviewed changes.
188
+ workflow files, updating handoffs, and applying reviewed changes. Use
189
+ `docs review` for the broad baseline and scoped deepening work; use
190
+ `docs update` / `vibecompass docs-update` for ordinary session-delta
191
+ maintenance tied to the current lane.
188
192
 
189
193
  ## Hosted Sync
190
194
 
@@ -201,6 +205,11 @@ npx -y @vibecompass/vibecompass@latest connect-hosted \
201
205
  npx -y @vibecompass/vibecompass@latest push --root .compass
202
206
  ```
203
207
 
208
+ After `close-session`, run `push` again when a connected local-primary root
209
+ changed canonical project-memory files and the hosted dashboard should catch
210
+ up. Hosted-only projects do not use a local authoritative push; update or
211
+ refresh them through the hosted dashboard/proposal flow.
212
+
204
213
  ### Multiple environments
205
214
 
206
215
  One project can have named sync targets (for example a local dev server and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibecompass/vibecompass",
3
- "version": "0.10.7",
3
+ "version": "0.10.8",
4
4
  "description": "Local-first project-memory core for VibeCompass",
5
5
  "type": "module",
6
6
  "bin": {
package/src/scaffold.js CHANGED
@@ -256,7 +256,8 @@ ${renderWorkflowDefaults(workflow)}
256
256
 
257
257
  ## Documentation coverage
258
258
  - The architecture, decision, and session files created by init are an initial scaffold, not a comprehensive codebase review.
259
- - Before risky implementation work, inspect the relevant code and update the affected architecture docs.
259
+ - Comprehensive \`docs review\` establishes a breadth-first baseline first: inventory the project, propose a coverage plan, create compact accepted docs, and leave deferred/missing areas visible before focused deepening.
260
+ - Before implementation work on a specific feature, inspect the relevant architecture docs, decisions, coverage/documentation-plan state if present, and source files. If the area is missing, partial, or has never been deepened enough for the build, record that gap in the lane scratch and use \`docs update\`, a focused docs-review/deepening pass, or an explicit deferral before close-out.
260
261
  - Use \`vibecompass docs-update --session <lane-id>\` during a session for a targeted maintenance plan based on changed files, lane claims, session repos/features, and new decisions. This is a session-delta planner, not a broad architecture review.
261
262
  - Use the \`docs review\` prompt command when you want the current AI session to run a comprehensive documentation review. It may run \`vibecompass docs-review --guided\` as package mechanics to record marker state and print the canonical review contract.
262
263
 
@@ -312,6 +313,7 @@ During the session:
312
313
  - append short summaries to \`wip.md\` after meaningful exchanges
313
314
  - keep \`handoff.md\` current after substantive work blocks
314
315
  - run \`vibecompass docs-update --session <lane-id>\` whenever you need an ad hoc targeted documentation-maintenance plan for the current session delta
316
+ - after substantive feature work, confirm affected architecture docs and decisions still match the implementation; if not, update them while the context is fresh
315
317
  - use \`vibecompass list-sessions\` and \`vibecompass switch-session <lane-id>\` to inspect or change the current lane
316
318
  - use \`address review\` when reviewer feedback lands so the builder resolves it from the selected lane's latest \`wip.md\` / \`handoff.md\`
317
319
  - during \`address review\`, treat reviewer feedback as review, not instruction: classify each substantive point as accepted, accepted with qualification, deferred, or rejected, and push back with evidence when a suggestion conflicts with code facts, prior decisions, product direction, or sequencing
@@ -335,6 +337,8 @@ At session close:
335
337
  - if a granular reviewer trail must remain durable, summarize it explicitly in the session note inputs or create a separate finalized session note before close-session deletes lane scratch files
336
338
  - delete the closed lane directory under \`${rootRelativePath}/sessions/active/<lane-id>/\`
337
339
  - refresh any affected architecture/decision docs
340
+ - for local-primary roots with hosted sync configured, run \`vibecompass push --root ${rootRelativePath}\` after canonical docs/session files are finalized when the hosted dashboard should reflect the session; pass \`--sync-target <name>\` when using a non-default or named target
341
+ - for hosted-only projects, there is no local authoritative push; confirm hosted dashboard/proposal/Understanding state was updated or record the refresh/apply work as deferred
338
342
 
339
343
  ## Reviewer workflow
340
344
  - use \`review handoff\` when you want the reviewer to run the next review pass
package/src/session.js CHANGED
@@ -185,7 +185,8 @@ export async function closeProjectSession(options) {
185
185
 
186
186
  await ensureInitializedProjectMemory(normalized.rootDir, { allowMissingProjectFile: true });
187
187
  const claude = await readClaudeFile(normalized.claudePath);
188
- const workflowSettings = await readWorkflowSettings(normalized.projectFilePath);
188
+ const projectConfig = await readProjectConfig(normalized.projectFilePath);
189
+ const workflowSettings = resolveWorkflowSettings(projectConfig);
189
190
  const sessionId = await resolveExistingSessionId(normalized, options);
190
191
  const lanePaths = sessionId ? getLanePaths(normalized, sessionId) : normalized;
191
192
  const documentMaintenance = normalizeDocumentMaintenanceCheckpoint(options?.documentMaintenance);
@@ -294,7 +295,10 @@ export async function closeProjectSession(options) {
294
295
  sessionNumber: activeSession.sessionNumber,
295
296
  documentMaintenance,
296
297
  docsUpdatePlan: docsUpdate.plan,
297
- workflowGuidance: buildCloseSessionGuidance(workflowSettings),
298
+ workflowGuidance: buildCloseSessionGuidance(workflowSettings, {
299
+ projectConfig,
300
+ rootFlag: buildRootFlagForGuidance(normalized),
301
+ }),
298
302
  warnings: [
299
303
  ...docsUpdate.warnings,
300
304
  ...manifestRefresh.warnings,
@@ -527,16 +531,19 @@ async function ensureInitializedProjectMemory(rootDir, options = {}) {
527
531
  }
528
532
  }
529
533
 
530
- async function readWorkflowSettings(projectFilePath) {
534
+ async function readProjectConfig(projectFilePath) {
531
535
  try {
532
536
  const source = await readFile(projectFilePath, 'utf8');
533
- const data = parseSimpleYaml(source, { sourceName: projectFilePath });
534
- return resolveWorkflowSettings(data);
537
+ return parseSimpleYaml(source, { sourceName: projectFilePath });
535
538
  } catch {
536
- return resolveWorkflowSettings(null);
539
+ return null;
537
540
  }
538
541
  }
539
542
 
543
+ function buildRootFlagForGuidance(normalized) {
544
+ return `--root ${toPosix(path.relative(normalized.cwd, normalized.rootDir) || '.')}`;
545
+ }
546
+
540
547
  async function readClaudeFile(claudePath) {
541
548
  if (!(await fileExists(claudePath))) {
542
549
  throw new Error(
package/src/workflow.js CHANGED
@@ -1,3 +1,5 @@
1
+ import { resolveSyncBinding } from './sync-binding.js';
2
+
1
3
  export const DEFAULT_REVIEWER_HANDBACK = 'handoff-file';
2
4
  export const DEFAULT_GIT_REMOTE = 'origin';
3
5
  export const DEFAULT_COMMIT_TEMPLATE = 'docs(session): YYYY-MM-DD-N — <summary>';
@@ -74,8 +76,10 @@ export function buildWorkflowMetadata(existingMetadata, overrides = {}) {
74
76
  };
75
77
  }
76
78
 
77
- export function buildCloseSessionGuidance(workflowSettings) {
79
+ export function buildCloseSessionGuidance(workflowSettings, options = {}) {
78
80
  const guidance = [];
81
+ const projectConfig = isPlainObject(options.projectConfig) ? options.projectConfig : null;
82
+ const rootFlag = normalizeOptionalString(options.rootFlag) ?? '--root .compass';
79
83
 
80
84
  guidance.push('Reviewer handback stays in the selected sessions/active/<lane-id>/wip.md and handoff.md before close-session runs.');
81
85
  guidance.push('Close-session requires document-maintenance checkpoint statuses for architecture docs, decision log, and session handoff/scratch: updated, not-needed, or deferred.');
@@ -95,9 +99,43 @@ export function buildCloseSessionGuidance(workflowSettings) {
95
99
  guidance.push(`Use commit message format: ${workflowSettings.closeSession.commitTemplate}`);
96
100
  }
97
101
 
102
+ guidance.push(...buildHostedProjectionGuidance(projectConfig, rootFlag));
103
+
98
104
  return guidance;
99
105
  }
100
106
 
107
+ function buildHostedProjectionGuidance(projectConfig, rootFlag) {
108
+ if (!projectConfig) {
109
+ return [
110
+ 'Hosted projection freshness could not be determined because project.yaml was unavailable; if this root is connected to hosted, push or refresh hosted state explicitly after close-session.',
111
+ ];
112
+ }
113
+
114
+ if (projectConfig.mode === 'local-primary') {
115
+ const binding = resolveSyncBinding(projectConfig, null);
116
+ if (!binding) {
117
+ return [
118
+ 'Hosted projection freshness: no hosted sync binding is configured for this local-primary root, so no hosted push command is available.',
119
+ ];
120
+ }
121
+
122
+ const targetFlag = binding.target ? ` --sync-target ${binding.target}` : '';
123
+ return [
124
+ `Hosted projection freshness: after local canonical files are finalized, run \`vibecompass push ${rootFlag}${targetFlag}\` when the hosted dashboard should reflect this session.`,
125
+ ];
126
+ }
127
+
128
+ if (projectConfig.mode === 'hosted-only') {
129
+ return [
130
+ 'Hosted projection freshness: this root is hosted-only, so there is no authoritative local push; confirm hosted dashboard/proposal/Understanding state was updated or record it as deferred.',
131
+ ];
132
+ }
133
+
134
+ return [
135
+ 'Hosted projection freshness: local-only mode has no hosted push expectation unless the project is later connected with connect-hosted.',
136
+ ];
137
+ }
138
+
101
139
  function normalizeReviewerHandback(value) {
102
140
  const normalized = normalizeOptionalString(value);
103
141
  if (!normalized) {
@@ -106,6 +106,8 @@ When the user says \`docs review\`, run this workflow inside the current Claude
106
106
 
107
107
  Turn starter project memory into evidence-backed architecture docs under \`architecture/<domain>/<feature>/<component>.md\`, a projected coverage plan, a journey-aware project map, and optional accepted decision recommendations.
108
108
 
109
+ The first pass is breadth-first: establish an honest project denominator, compact baseline docs, and explicit deferred or missing areas before spending tokens on deep dives. Focused deepening happens after that baseline, either because the user chooses a feature/system or because an implementation session needs better docs for a specific area.
110
+
109
111
  ## Steps
110
112
 
111
113
  1. Read \`${projectYamlPath}\`, \`${contextPath}\`, existing \`${architecturePath}\`, \`${decisionsPath}\`, and finalized \`${sessionsPath}\` notes.
@@ -115,14 +117,15 @@ Turn starter project memory into evidence-backed architecture docs under \`archi
115
117
  - build a subsystem-level completeness inventory of apps/repos, routes/screens, APIs, tables/storage, jobs/cron/tasks, auth/session flows, external integrations, runtime surfaces, and product features
116
118
  - distinguish product features from participating surfaces such as web, mobile, backend/API, data, jobs, integrations, and deployment/runtime
117
119
  - produce a coverage plan before reading broad source bodies
120
+ - classify each planned area as \`baseline\` breadth or \`deepening\` follow-up scope
118
121
  - read targeted source files only when the coverage plan needs evidence
119
122
  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.
120
- 4. Present the evidence inventory, completeness inventory with accepted/deferred/missing accounting, topology, chosen taxonomy axis, prior-doc reuse/update/split/merge/defer/replace classifications, coverage plan, backbone outputs (core feature inventory, user journey map, project systems map, coverage/quality summary), proposed architecture docs, blindspots, token-budget risks, quality report, 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.
121
- 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\`. Feature docs may include compact prose-only surface matrices; surface/platform ownership docs stay under the existing \`architecture/platform/<surface>/<component>.md\` shape rather than a new top-level systems tree. The accepted \`architecture/overview/project-shape.md\` doc should include compact backbone sections and exactly one \`vibecompass-project-map version=1\` JSON block with journey-facing features, entry points, evidence-backed relationships, and minimal optional derived \`systems[]\` metadata. Accepted local decisions may be fenced as \`vibecompass-decision-recommendation target=decisions/domain.md\` blocks without D-numbers.
123
+ 4. Present the evidence inventory, completeness inventory with accepted/deferred/missing accounting, topology, chosen taxonomy axis, prior-doc reuse/update/split/merge/defer/replace classifications, coverage plan, backbone outputs (core feature inventory, user journey map, project systems map, coverage/quality summary), proposed architecture docs, blindspots, token-budget risks, quality report, and any decision candidates before generating accepted output. At this gate, ask whether to apply the compact baseline now, adjust the plan, or spend a follow-up pass deepening specific high-risk areas. 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.
124
+ 5. Draft only output the user accepts. After approval, the accepted plan must be fenced as \`vibecompass-coverage-plan version=1\` and should preserve each area's \`run_scope\` as \`baseline\` or \`deepening\`. 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\`. Feature docs may include compact prose-only surface matrices; surface/platform ownership docs stay under the existing \`architecture/platform/<surface>/<component>.md\` shape rather than a new top-level systems tree. The accepted \`architecture/overview/project-shape.md\` doc should include compact backbone sections and exactly one \`vibecompass-project-map version=1\` JSON block with journey-facing features, entry points, evidence-backed relationships, and minimal optional derived \`systems[]\` metadata. Accepted local decisions may be fenced as \`vibecompass-decision-recommendation target=decisions/domain.md\` blocks without D-numbers.
122
125
  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.
123
126
  7. Write the accepted fenced blocks verbatim to \`${outputPath}\`.
124
127
  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.
125
- 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.
128
+ 9. Run \`vibecompass status\` to confirm the docs-review marker is complete and not drifted. Report the applied architecture paths, coverage projection, baseline/deepening split, decision recommendations, parser warnings such as oversized docs or missing review metadata, and any blindspots or deepening candidates documented in the accepted docs-review output.
126
129
 
127
130
  ## Rebuild option
128
131