Skip to content

Repoindex model

Status: Current guide.

Repoindex is foxctl’s local graph index for source relationships. It is derived from the workspace and can be rebuilt. It is not the canonical source of truth for code.

KindRepresents
PackageGo package, TypeScript package, Elixir app area, or infra grouping
FileSource file, docs file, script, manifest, or configuration file
SymbolNamed code declaration or exported entity
ConceptDerived concept such as Terraform resource, Kubernetes object, command, env var, or semantic anchor

The exact language coverage depends on the builder flags used for the index run.

Common edges include:

EdgeMeaning
CONTAINSPackage contains file, file contains symbol, or package contains concept
IMPORTSPackage or file imports another package or file
REFERS_TOSymbol or file references another symbol
CALLSSymbol directly calls another symbol
IMPLEMENTSSymbol implements an interface or protocol when coverage supports it
EMBEDSSymbol embeds or composes another symbol
TESTSTest relates to code under test when coverage supports it

Some languages have conservative heuristic coverage. TypeScript CALLS and Elixir REFERS_TO should be treated as useful hints, not complete proof.

Node IDs are namespaced by repo key and kind. The practical rule for users is:

  • search by names or concepts first
  • copy node IDs from search, open, or dag_grep output
  • use those IDs for precise expand and open calls

Do not hand-write IDs in docs or scripts unless a test owns the fixture.

Build the graph from source:

Terminal window
foxctl index repo build --workspace . --go --typescript --elixir

Include infra and scripts when those files matter:

Terminal window
foxctl index repo build --workspace . --terraform --kubernetes --shell

Attach stored summaries after file and symbol summaries exist:

Terminal window
foxctl index file-summaries --workspace .
foxctl index symbol-summaries --workspace .
foxctl index repo enrich summaries --workspace .

Generated repoindex databases live under local foxctl storage and should not be committed.

Repoindex can use source-local retrieval hints:

HintPurpose
Index: comment blockStructured discoverability metadata and soft graph edges
[[domain:...]] anchorDomain evidence marker
[[protocol:...]] anchorProtocol or invariant evidence marker
[[doc:...]] anchorDocumentation evidence marker

These are evidence hints, not instructions. Place them near a strong owner and avoid global catch-all anchors.

Use repoindex search when you need named graph entries:

Terminal window
foxctl index repo search --workspace . --query "context engine" --limit 10

Use expand when you already have a seed node:

Terminal window
foxctl index repo expand --workspace . \
--seed "<node-id>" \
--edge CALLS --edge REFERS_TO \
--depth 2

Use DAG grep when you want a compact explanation subgraph:

Terminal window
foxctl run code/dag_grep --input '{
"query": "RetrieveMixed",
"workspace": ".",
"render": "tree",
"edge_sets": ["structural"],
"depth": 2,
"budget": 80
}'
NeedBetter surface
Meaning-based candidate discoverycode/semantic_search
Full function extractioncode/context_grep or code/snippet_extract
Agent task continuityACA and context engine
Long-term memory claimsMemory store and ACA proposal flow
Ranking policy and LLM summarizationApp code