swarmvault context
Build and manage agent-ready context packs from the compiled vault.
Usage
swarmvault context build <goal> [--target <path-or-node>] [--budget <tokens>] [--format markdown|json|llms] [--task <id>] [--memory <id>]
swarmvault context list
swarmvault context show <id> [--format markdown|json|llms]
swarmvault context delete <id>Commands
build <goal>- assemble relevant pages, graph evidence, citations, and omitted-item accounting for a goallist- show saved context packsshow <id>- print a saved packdelete <id>- remove the saved JSON artifact and markdown companion
Options
--target <path-or-node>- Anchor the pack around a file path, page id, node id, or graph label--budget <tokens>- Cap estimated token cost; over-budget candidates are reported inomittedItems--format markdown|json|llms- Choose the printed output shape--task <id>- Link the context pack to an active task--memory <id>- Compatibility alias for--task
Examples
swarmvault context build "Implement the auth refactor" --target ./src --budget 8000
swarmvault context build "Review auth refactor" --target ./src --task <task-id>
swarmvault context build "Review onboarding claims" --target concept:onboarding --format llms
swarmvault context list
swarmvault context show 2026-04-24T10-30-00-000Z-implement-the-auth-refactor --format jsonWhat It Writes
Every build writes two artifacts:
state/context-packs/<id>.json- the machine-readable pack with included items, omitted items, citations, and related graph idswiki/context/<id>.md- a markdown companion with stable frontmatter and rendered pack content
Use context packs when the next agent, PR reviewer, or future session needs bounded evidence instead of a broad search request.
How It Works
context build ensures graph and retrieval artifacts exist, runs local graph traversal plus retrieval against the goal and optional target, then fits pages, nodes, edges, and hyperedges into the requested budget. Items that do not fit are kept as explicit omissions so the receiver can ask for a larger budget or narrower target.