Expand description
Agent-facing context aggregation.
The Context envelope is the payload repograph context emits — for each
in-scope repository, the inlined content of every file matching the user’s
selected agents’ file patterns. Stable JSON shape is the contract with
downstream AI agents.
Pattern resolution is deliberately bounded: flat patterns (e.g. CLAUDE.md)
are checked by direct existence, glob patterns under a known parent
directory (e.g. .cursor/rules/*.md) are matched against a single non-
recursive directory listing. We never walk the repo tree blindly — that’s
the kind of behavior that would force us to add .gitignore semantics to
avoid traversing node_modules, and the registry’s patterns don’t need it.
Structs§
- Agent
Doc - One agent’s matched files within a single repo.
- Context
- Top-level payload emitted by
repograph context.schema_versionis the contract — additive-only at1; breaking changes bump it. - Matched
File - One file the resolver matched against an agent’s pattern set.
- Repo
Context - Per-repo block of the
Contextenvelope.
Enums§
- Scope
- The scope a
repograph contextinvocation was resolved against.
Constants§
- SCHEMA_
VERSION - The current (and only)
Contextschema version. Downstream agents pin on this; bumping it is a breaking change.
Functions§
- resolve_
agent_ docs - Walk the registry’s patterns for each agent against
repo_root.