@vibecompass/vibecompass 0.3.4 → 0.5.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 CHANGED
@@ -20,29 +20,33 @@ Shipped today:
20
20
  - interactive guided init for placement, workflow bootstrap, and first-session setup
21
21
  - lightweight starter architecture/session memory plus example-only decision guidance
22
22
  - generated `context.md` plus opt-in workflow guide files
23
- - opt-in starter `CLAUDE.md` / `AGENTS.md` templates that are created once and never overwritten
23
+ - opt-in starter `CLAUDE.md` / `AGENTS.md` templates that are created only when missing, with VibeCompass-managed regions for future refreshes
24
24
  - `vibecompass start-session` / `vibecompass close-session` for lane-aware local builder workflow
25
25
  - `vibecompass list-sessions` / `vibecompass switch-session` for multiple active session lanes
26
26
  - `vibecompass end-session` as a discoverable alias for `close-session`
27
27
  - `vibecompass sync-agents` for generated `CLAUDE.md`, `AGENTS.md`, `.cursorrules`, and `.github/copilot-instructions.md` views
28
+ - `vibecompass status` for a read-only project-memory health and drift report
29
+ - `vibecompass refresh-workflow` for explicit dry-run/apply refresh of package-owned derived workflow files
28
30
  - `vibecompass docs-review --guided` — print a comprehensive review prompt for your chosen LLM to run
29
31
  - `vibecompass docs-review --submit-hosted` — submit the review request to the hosted app and poll for proposal/artifact output
30
32
  - `vibecompass docs-review --run-local --provider anthropic` — local provider adapter that saves review output locally
31
33
  - `vibecompass docs-review --apply-output` — apply accepted architecture-doc blocks into canonical `architecture/` docs
34
+ - strict docs-review output validation for architecture-doc fences, duplicate paths, and required frontmatter
32
35
  - `vibecompass docs-review --complete` — mark the review accepted after the docs land
36
+ - hosted sync commands: `push`, `pull-preview`, `pull-export`, and `apply-export`
33
37
  - canonical file scanning and validation
34
38
  - `state/manifest.json` generation
35
39
  - JavaScript read-model helpers for project, feature, decision, and file context
36
40
 
37
41
  Not shipped yet:
38
42
 
39
- - hosted sync commands (push, pull-preview, pull-export)
40
- - hosted docs-review execution that runs the review and writes canonical docs
43
+ - one-command hosted docs-review that directly writes canonical local docs
41
44
  - additional local docs-review providers beyond Anthropic
42
45
  - automatic acceptance of review findings without a local apply step
43
46
 
44
- The package is publishable now as the file-contract and read-model core. The
45
- broader local-primary sync workflow is still being built on top of it.
47
+ The package is useful today as the local project-memory CLI and JavaScript
48
+ core. Use it to create a root, keep project memory current, run local sessions,
49
+ and sync with hosted VibeCompass when you have a hosted project binding.
46
50
 
47
51
  ## Requirements
48
52
 
@@ -67,7 +71,7 @@ npm install @vibecompass/vibecompass
67
71
 
68
72
  ## Quickstart
69
73
 
70
- Run the guided bootstrap:
74
+ Most users should start with the guided bootstrap:
71
75
 
72
76
  ```bash
73
77
  npx -y @vibecompass/vibecompass init --guided
@@ -78,6 +82,18 @@ Guided init asks about repo topology, recommends a placement pattern
78
82
  lightweight starter project memory, scaffolds the workflow files you opt into,
79
83
  and can open the first builder session immediately.
80
84
 
85
+ After init, the usual loop is:
86
+
87
+ ```bash
88
+ npx -y @vibecompass/vibecompass status --root .compass
89
+ npx -y @vibecompass/vibecompass start-session --root .compass --id feature-lane --working-on "Build the next feature"
90
+ npx -y @vibecompass/vibecompass docs-review --root .compass --guided
91
+ npx -y @vibecompass/vibecompass close-session --root .compass --session feature-lane --title "Feature Lane" --completed "Shipped the slice" --next-step "Review and publish"
92
+ ```
93
+
94
+ Run `vibecompass status` when you are not sure what to do next. It is
95
+ read-only and prints the safest follow-up commands for the current root.
96
+
81
97
  When the owner directory is a workspace root or primary repo, the canonical
82
98
  root defaults to `.compass/` inside that directory. For a dedicated memory repo,
83
99
  the canonical root defaults to the repo root itself.
@@ -129,6 +145,39 @@ AGENTS.md # at the tooling root, only if missing and --with-agents is
129
145
 
130
146
  `context.md` is a derived package-owned file. Re-running `init --force --with-workflow`
131
147
  regenerates it; do not treat it as a hand-edited source document.
148
+ Starter `CLAUDE.md` / `AGENTS.md` files include VibeCompass managed markers
149
+ when the package creates them, so later `sync-agents` and session lifecycle
150
+ commands can refresh the generated region without warning. If those files
151
+ already exist without markers, init leaves them untouched unless you explicitly
152
+ adopt them.
153
+
154
+ Check an initialized root without writing files:
155
+
156
+ ```bash
157
+ npx -y @vibecompass/vibecompass status --root .compass
158
+ ```
159
+
160
+ Use `status --json` when another tool needs the typed diagnostic model. The
161
+ JSON output intentionally excludes raw hosted preview tokens and resolved
162
+ credential values.
163
+
164
+ Preview package-owned workflow refreshes without mutating files:
165
+
166
+ ```bash
167
+ npx -y @vibecompass/vibecompass refresh-workflow --root .compass --dry-run
168
+ ```
169
+
170
+ Apply the refresh explicitly when the plan looks right:
171
+
172
+ ```bash
173
+ npx -y @vibecompass/vibecompass refresh-workflow --root .compass --apply
174
+ ```
175
+
176
+ `refresh-workflow` updates generated workflow artifacts such as `context.md`,
177
+ workflow guide READMEs, managed agent-file blocks, and the local
178
+ `state/manifest.json`. Existing package-version stamps are sticky by default;
179
+ pass `--update-package-stamp` when you intentionally want to move the
180
+ canonical `project.yaml.metadata.package_version` stamp to the current CLI.
132
181
 
133
182
  ## After init: generate real architecture docs
134
183
 
@@ -240,7 +289,7 @@ Generate agent-instruction files from project memory:
240
289
  npx -y @vibecompass/vibecompass sync-agents --root .compass
241
290
  ```
242
291
 
243
- `sync-agents` writes only VibeCompass managed regions:
292
+ `sync-agents` writes compact VibeCompass bootloader regions:
244
293
 
245
294
  ```md
246
295
  <!-- vibecompass:start - managed by VibeCompass, do not edit -->
@@ -248,13 +297,23 @@ npx -y @vibecompass/vibecompass sync-agents --root .compass
248
297
  <!-- vibecompass:end -->
249
298
  ```
250
299
 
251
- Content outside those markers is preserved. Existing files without markers are
252
- reported as warnings and left untouched unless you explicitly adopt them:
300
+ Content outside those markers is preserved. Package-created starter files
301
+ include managed markers from the beginning. Existing user files without markers
302
+ are reported as warnings and left untouched unless you explicitly adopt them:
253
303
 
254
304
  ```bash
255
305
  npx -y @vibecompass/vibecompass sync-agents --root .compass --adopt-existing
256
306
  ```
257
307
 
308
+ The managed block intentionally stays short: project-memory root, read order,
309
+ prompt-command routing, and hard safety rules. Detailed workflow lives in
310
+ `context.md` and generated files under `workflows/`, so `CLAUDE.md`, `AGENTS.md`,
311
+ `.cursorrules`, and Copilot instructions do not duplicate long protocol text.
312
+ `CLAUDE.md` starters also keep the mutable `Current session` block above the
313
+ managed region because session lifecycle commands update it. `AGENTS.md`
314
+ starters are intentionally just the managed bootloader; add Codex/team notes
315
+ before or after the marker block if needed, and `sync-agents` will preserve them.
316
+
258
317
  Adoption appends a managed VibeCompass block to the end of existing unmarked
259
318
  agent files, preserves everything outside the markers, and reports possible
260
319
  workflow-overlap lines before you rely on the result. Guided init may offer the
@@ -336,6 +395,7 @@ Options:
336
395
  - `--close-session-git-publish`: store that the close-session workflow includes a Git publish step
337
396
  - `--close-session-git-remote <name>`: optional default Git remote name for that stored publish step
338
397
  - `--force`: overwrite an existing `project.yaml`
398
+ - `--replace-active-lanes`: allow `--force` to replace a root that has active session lanes
339
399
 
340
400
  When `--start-session` is used, `init` automatically enables the minimum
341
401
  workflow bootstrap required for that session: `context.md` plus `CLAUDE.md`.
@@ -371,6 +431,51 @@ actual token in your environment before running hosted commands.
371
431
  Running it again replaces the existing hosted binding in `project.yaml`, which
372
432
  is the intended rotation path after you create a new sync credential.
373
433
 
434
+ ### `vibecompass status`
435
+
436
+ ```text
437
+ vibecompass status [options]
438
+ ```
439
+
440
+ Options:
441
+
442
+ - `--root <path>`: project-memory root; defaults to `.compass`
443
+ - `--tooling-root <path>`: directory where agent files are inspected; defaults to cwd
444
+ - `--json`: print the typed status model as JSON
445
+
446
+ `status` is strictly read-only. It reports project identity, active session
447
+ lanes, package-version drift, local manifest compatibility, docs-review
448
+ marker state, generated agent-file drift, warnings, and recommended next
449
+ commands. It does not write canonical files, generated workflow files, agent
450
+ instruction files, or `state/manifest.json`.
451
+
452
+ ### `vibecompass refresh-workflow`
453
+
454
+ ```text
455
+ vibecompass refresh-workflow [--dry-run|--apply] [options]
456
+ ```
457
+
458
+ Options:
459
+
460
+ - `--root <path>`: project-memory root; defaults to `.compass`
461
+ - `--tooling-root <path>`: directory where agent files are refreshed; defaults to cwd
462
+ - `--dry-run`: show planned refresh without changing files; this is the default
463
+ - `--apply`: apply the planned workflow refresh
464
+ - `--update-package-stamp`: update an existing `project.yaml` package-version stamp
465
+ - `--allow-downgrade-templates`: allow applying templates with a CLI older than the root stamp
466
+
467
+ `refresh-workflow` is the explicit upgrade path for package-owned derived
468
+ artifacts. Dry-run mode is read-only. Apply mode can regenerate `context.md`,
469
+ workflow guide READMEs that still match the package-generated shape, managed
470
+ agent-file blocks, and `state/manifest.json`. It leaves user-authored workflow
471
+ guide files untouched when they no longer match the generated guide shape.
472
+
473
+ Package-version stamps are intentionally conservative: missing legacy stamps
474
+ can be created by apply mode, existing older or invalid stamps are left
475
+ untouched unless `--update-package-stamp` is passed, and roots stamped by a
476
+ newer CLI require `--allow-downgrade-templates` before older templates are
477
+ applied.
478
+
374
479
  ### `vibecompass start-session`
375
480
 
376
481
  ```text
@@ -387,6 +492,9 @@ Options:
387
492
  - `--repo <id>`: repeatable repo ID for the lane
388
493
  - `--claim <path>`: repeatable path claim for overlap warnings
389
494
  - `--date <YYYY-MM-DD>`: optional explicit session date
495
+ - `--last-thing-completed <text>`: optional override for the `CLAUDE.md` current-session block
496
+ - `--blockers <text>`: optional current blockers summary
497
+ - `--next-session-should <text>`: optional current-session handoff summary
390
498
 
391
499
  This command updates the `Current session` block in `CLAUDE.md` and creates
392
500
  `sessions/active/<lane-id>/session.yaml`, `wip.md`, and `handoff.md` for the
@@ -404,6 +512,10 @@ vibecompass list-sessions [options]
404
512
 
405
513
  Lists active session lanes and marks the current lane.
406
514
 
515
+ Options:
516
+
517
+ - `--root <path>`: project-memory root; defaults to `.compass`
518
+
407
519
  ### `vibecompass switch-session`
408
520
 
409
521
  ```text
@@ -412,6 +524,11 @@ vibecompass switch-session <lane-id> [options]
412
524
 
413
525
  Changes the current lane in `sessions/active/index.yaml`.
414
526
 
527
+ Options:
528
+
529
+ - `--root <path>`: project-memory root; defaults to `.compass`
530
+ - `--session <lane-id>`: lane ID; positional ID is also accepted
531
+
415
532
  ### `vibecompass close-session`
416
533
 
417
534
  ```text
@@ -434,6 +551,8 @@ Options:
434
551
  - `--model <text>`: optional repeatable model contribution entry
435
552
  - `--blocker <text>`: repeatable blocker or open question
436
553
  - `--next-step <text>`: repeatable next-session instruction
554
+ - `--last-thing-completed <text>`: optional override for the `CLAUDE.md` completed summary
555
+ - `--next-session-should <text>`: optional override for the `CLAUDE.md` next-session summary
437
556
 
438
557
  This command finalizes the active scratchpad into
439
558
  `sessions/YYYY-MM-DD-N-display-title.md`, deletes the closed lane directory
@@ -464,6 +583,38 @@ memory. It creates missing files with managed markers, replaces existing
464
583
  managed regions, preserves content outside markers, and warns instead of
465
584
  overwriting existing unmarked files unless `--adopt-existing` is supplied.
466
585
 
586
+ ### Hosted sync commands
587
+
588
+ ```text
589
+ vibecompass push [options]
590
+ vibecompass pull-preview [options]
591
+ vibecompass pull-export [options]
592
+ vibecompass apply-export [options]
593
+ ```
594
+
595
+ Common option:
596
+
597
+ - `--root <path>`: project-memory root; defaults to `.compass`
598
+
599
+ Hosted sync commands require `project.yaml` mode `local-primary`, a
600
+ non-secret `project.yaml.sync` binding, and the token named by
601
+ `sync.credential_env_var` in your environment.
602
+
603
+ `push` sends canonical local project memory to the hosted sync API.
604
+
605
+ `pull-preview` asks hosted sync for pending proposal state without changing
606
+ canonical local files. It records preview metadata in local `state/`. Pass
607
+ `--no-pending-proposals` when you only want remote state and conflict data.
608
+
609
+ `pull-export` exports accepted hosted proposal operations into a local bundle
610
+ under `state/pull-export.json` by default. Use `--proposal <id>` to select
611
+ proposal IDs, `--preview-token <token>` to export from a specific preview, and
612
+ `--output <path>` to choose a different output path under the root.
613
+
614
+ `apply-export` applies a local export bundle to canonical project-memory files
615
+ and records the resulting state. Use `--output <path>` when the export bundle
616
+ is not at the default `state/pull-export.json`.
617
+
467
618
  ### `vibecompass docs-review`
468
619
 
469
620
  ```text
@@ -475,10 +626,14 @@ Options:
475
626
  - `--root <path>`: project-memory root; defaults to `.compass`
476
627
  - `--guided`: print a comprehensive review prompt for your chosen LLM to run (recommended)
477
628
  - `--submit-hosted`: submit the review request to the hosted app
629
+ - `--poll-hosted`: poll a hosted docs-review run and update `state/docs-review.json`
478
630
  - `--run-local`: run the generated review request with a local provider
479
631
  - `--provider <name>`: local provider for `--run-local`; currently `anthropic`
480
632
  - `--run-local-anthropic`: compatibility alias for `--run-local --provider anthropic`
481
633
  - `--apply-output`: apply accepted architecture-doc blocks from review output
634
+ - `--apply-decision-artifact`: append an accepted hosted decision artifact locally
635
+ - `--artifact <id>`: artifact ID for `--apply-decision-artifact`
636
+ - `--refresh-index`: also regenerate `decisions/INDEX.md` after applying a decision artifact
482
637
  - `--output <path>`: review output path for `--apply-output`; defaults to `state/docs-review-output.md`
483
638
  - `--complete`: mark accepted docs-review changes as completed in local state
484
639
  - `--llm <name>`: preferred LLM/provider to record for the review (e.g. `claude`, `codex`, `gemini`)
@@ -500,9 +655,10 @@ Project-mode requirements:
500
655
  hosted binding, so hosted precedence does not apply when that flag is set.
501
656
 
502
657
  `--submit-hosted` uses `sync.credential_env_var` and records the hosted run
503
- ID in `state/docs-review.json`. Hosted execution creates review proposals and
504
- artifacts; for `local-primary` roots, local files stay untouched until you
505
- pull-preview, export, apply locally, and push to confirm the accepted output.
658
+ ID in `state/docs-review.json`. Use `--poll-hosted` to refresh the run marker.
659
+ Hosted execution creates review proposals and artifacts; for `local-primary`
660
+ roots, local files stay untouched until you pull-preview, export, apply
661
+ locally, and push to confirm the accepted output.
506
662
  Missing or stale hosted baselines fail with package-facing next-step guidance
507
663
  instead of running model work against the wrong source of truth.
508
664
 
@@ -525,7 +681,18 @@ Accepted review content.
525
681
  ```
526
682
  ````
527
683
 
528
- Only `architecture/*.md` paths are writable through this apply step.
684
+ The fence opening is strict: it must be exactly
685
+ `vibecompass-architecture-doc path=<architecture/*.md>` with one `path`
686
+ attribute and no extra attributes. Malformed architecture-doc fences report a
687
+ targeted error instead of being treated as "no output found".
688
+
689
+ Only `architecture/*.md` paths are writable through this apply step. Component
690
+ docs require non-empty `domain`, `feature`, `component`, and `status`
691
+ frontmatter. The project overview file,
692
+ `architecture/overview/project-shape.md`, may use status-only frontmatter so it
693
+ matches hosted docs-review proposal behavior. If one accepted output contains
694
+ multiple blocks for the same architecture path, local apply fails rather than
695
+ silently overwriting earlier accepted content.
529
696
 
530
697
  `vibecompass docs-review --complete` updates the marker in
531
698
  `state/docs-review.json` to `status: "completed"` once the docs have
@@ -554,19 +721,36 @@ recorded in `project.yaml`.
554
721
 
555
722
  ```js
556
723
  import {
724
+ PACKAGE_VERSION,
725
+ STATE_VERSION,
557
726
  initializeProjectMemory,
727
+ inspectProjectCompatibility,
728
+ formatCompatibilityWarnings,
558
729
  preflightDocsReview,
559
730
  startProjectSession,
731
+ listProjectSessions,
732
+ switchProjectSession,
560
733
  closeProjectSession,
561
734
  syncAgentInstructionFiles,
735
+ getSupportedAgentFormats,
736
+ getProjectStatus,
737
+ renderStatusText,
738
+ toStatusJson,
739
+ refreshWorkflow,
562
740
  scanProjectMemory,
741
+ generateStateManifest,
742
+ prepareStateManifest,
563
743
  writeStateManifest,
744
+ pushProjectMemory,
745
+ pullPreviewProjectMemory,
746
+ pullExportProjectMemory,
747
+ applyPullExport,
564
748
  loadProjectReadModel,
565
749
  getProjectContext,
566
750
  getFeatureContext,
567
751
  getDecisionLog,
568
752
  getFileContext,
569
- } from "vibecompass";
753
+ } from "@vibecompass/vibecompass";
570
754
  ```
571
755
 
572
756
  Typical flow:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibecompass/vibecompass",
3
- "version": "0.3.4",
3
+ "version": "0.5.0",
4
4
  "description": "Local-first project-memory core for VibeCompass",
5
5
  "type": "module",
6
6
  "bin": {