swarmvault watch
Watch the inbox directory and trigger import and compile cycles when files change.
Usage
swarmvault watch [--lint] [--repo] [--once] [--code-only] [--debounce <ms>]
swarmvault watch statusOptions
--lint- Run lint after each compile cycle--repo- Also refresh tracked repo roots that were previously ingested through directory ingest--once- Run one refresh cycle immediately instead of starting a long-running watcher--code-only- Force the AST-only refresh path and defer non-code semantic re-analysis to a latercompile--debounce <ms>- Debounce file changes before running a cycle. Default:900
What It Does
Each watch cycle:
- Imports new or changed inbox files
- Optionally refreshes tracked repo roots when
--repois enabled - Runs
swarmvault compile - Optionally runs
swarmvault lint - Writes a canonical session artifact to
state/sessions/ - Appends a compatibility run record to
state/jobs.ndjson
When --repo sees only code-file changes under tracked repo roots, SwarmVault takes the faster code-only path and refreshes code pages plus graph structure without re-running non-code semantic analysis for unchanged sources.
Use --code-only when you want to force that same narrower refresh path even on an explicit one-shot watch run.
When --repo sees non-code changes under tracked repo roots, SwarmVault records those files under state/watch/, marks affected pages stale, and surfaces the pending semantic refresh set through watch status and the local graph workspace instead of silently re-ingesting them.
Notes
- Watch mode is a foreground local worker in the current release
--repoextends the watch target set to tracked repo roots, but still ignores SwarmVault's generated workspace directories--onceis the same single-run refresh path used byswarmvault hook installwatch statusreports watched repo roots, the latest watch run, and pending semantic refresh entries- Rapid bursts of file changes are coalesced into a single cycle
state/jobs.ndjsonremains available for machine-readable run history, butstate/sessions/is the canonical audit trail