Skip to main content

Module context

Module context 

Source
Expand description

Application-owned context discovery and instruction adapters.

Pure context policy lives in thndrs_agent::context; this module performs filesystem discovery and supplies the resulting application data.

Modules§

export
Versioned, bounded context inspection and export projections.
instructions
Scoped project instructions: nested AGENTS.md discovery, selection, and turn-boundary reload diagnostics.

Structs§

ContextSource
A single loaded context source.
InstructionDiagnostic
A diagnostic about a discovered instruction file.
InstructionInventory
Result of scoped instruction discovery.
InstructionSelection
Result of pure instruction selection for a turn.
InstructionSnapshot
A turn-boundary snapshot of instruction file hashes for change detection.

Enums§

InstructionSeverity
Severity of an InstructionDiagnostic.

Constants§

AGENTS_MD_SIZE_CAP
Maximum bytes read from an AGENTS.md file.

Functions§

discover_instructions
Discover root and nested AGENTS.md files below workspace_root.
discover_workspace_root
Discover the workspace root from cwd. Prefers the git top-level directory when available; falls back to the canonicalized cwd.
load_agents_md
Load root AGENTS.md from the workspace root, if present.
scope_depth
select_instructions
Select applicable instruction sources for a turn.
trim_to_char_boundary
Trim a string to at most max_bytes bytes, ensuring we end on a UTF-8 char boundary.