Skip to main content

Instruction Graph#

All agent-instruction surfaces become nodes in one resolved graph (ADR-0006, REQ-INSTR-001..006):

SurfaceProviderNotes
AGENTS.md / AGENTS.override.mdcodexany depth; nested scopes; closer wins
global codex AGENTS (seam)codexinjected dir; always weakest
CLAUDE.mdclauderoot + nested
GEMINI.mdgeminiroot + nested
.github/copilot-instructions.mdcopilotrepo-wide
.github/instructions/*.instructions.mdcopilotapplyTo frontmatter globs
.agents/skills/<name>/SKILL.mdsharedlinked skill catalog nodes

Node fields: id, provider, kind, relativePath, scopeRoot, applyTo, depth, precedence, managed, checksum (sha256), tokenEstimate, status, conflicts, duplicates, references, securityFlags.

Precedence tiers (deterministic):

resolveEffectiveStack(graph, provider, forPath) returns the weakest→strongest chain for one path. Nested AGENTS.md files apply only inside their directory subtree — this path-scoping is intentionally independent from workspace boundaries (docs/guides/monorepo.md).

Analysis on top of the graph is deterministic only: convention conflicts, exact/near duplicates, stale references, unreachable globs, hidden unicode, external refs, massive embedded data, credential-shaped literals. No LLM/NLP verdicts anywhere; nothing critical without captured evidence.