Skip to main content

Module subdir_instructions

Module subdir_instructions 

Source
Expand description

Lazy per-subdirectory instruction injection.

When the agent reads a file, this module checks parent directories for instruction files (AGENTS.md, CLAUDE.md) that haven’t been injected yet and returns their content for injection into the conversation.

Mirrors OpenCode’s InstructionPrompt.resolve() behavior.

Structs§

SubdirInstruction
An instruction file discovered from a subdirectory.
SubdirInstructionTracker
Tracks which subdirectory instruction files have been injected into the conversation, and discovers new ones when files are read.