COMMANDS / READ

Perception &
Structure.

The read commands are the sensory organs of the Weaver agent: definitions, references, diagnostics, symbol cards, and budgeted graph slices. Each fuses raw file content with semantic metadata from Tree-sitter and LSP servers into a structured, bounded representation of the codebase.

Synopsis

Each read command queries code structure and relationships through the daemon. Without --json, results render for humans; with it, the stable machine contract streams to stdout while progress stays on stderr.

SYNTAX
weaver <resource> <verb> [FLAGS]
Language inferred from file extension

Commands

Command Source Description
definitions get LSP Jump to definition. Requires --uri and --position.
references list LSP Every usage of a symbol, with --limit and continuation cursors.
diagnostics list LSP Compiler warnings and language-server errors for a file or the whole workspace.
symbols list Sempai Structural queries via --query, --expr, or --rule. See the Sempai Engine.
cards get Planned Jacquard Compact symbol card with bounded one-hop relations (callers, callees, imports). Progressive detail levels and cache provenance.
graph-slices get Planned Jacquard Budgeted subgraph rooted at a symbol, with typed edges and explicit max_cards / max_edges / max_estimated_tokens caps.

Integration Examples

1. Jump to Definition

Point at any symbol with a URI and cursor position. Weaver starts the appropriate language server, resolves the definition, and returns the location as structured JSON.

TERMINAL
$ weaver definitions get --json \
  --uri file:///src/main.rs \
  --position 10:5
CLI JSON Output
// stable machine contract (--json)
[{"uri":"file:///src/auth.rs","line":42,"column":17}]

2. Find All References

Same shape, different command. Finds every call-site, import, and usage of the symbol at the given position — useful for impact analysis before a refactor.

TERMINAL
$ weaver references list --json \
  --uri file:///src/auth.rs \
  --position 42:17
CLI JSON Output
// stable machine contract (--json)
{"references":[{"uri":"file:///src/main.rs","line":10,"column":5},{"uri":"file:///tests/auth_test.rs","line":7,"column":12}]}
ARCHITECTURE

Semantic Fusion Engine

How Weaver constructs the "truth" about your code.

FIG 3.1: DATA FUSION
Illustration of raw source text, syntax trees, and language server metadata fusing into a structured semantic stream.

Ready to take action?

Now that the agent can see, learn how it manipulates the world.

Next: Change Commands