Inject the rules governing these files into the brief.

Dynamic context injection

Intent — Map the files an agent is about to touch to the exact constraints that govern those files (lints, conventions, component boundaries, tests) and inject that subset into the agent's brief before it writes code, moving detection left of the cheapest CI gate.

SummaryInject the rules governing these files into the brief.
TargetAgent · Context & dispatch substrate
Formagent-output
EnforcementSoft (probabilistic) — forward injection influences behavior; it does not block. (The reverse direction feeds a hard self-heal gate, but forward injection is advisory by nature.)

> ★ Flagship entry. This is the canonical example of the "why it's not just the naive > alternative" move that the whole catalogue is built around.

Motivation — the failure it kills

The recurring failure class is constraint under-specification at dispatch time. A coding agent lacks the tacit knowledge an experienced engineer has of which rules apply to a given change, so it makes plausible edits that violate them, then spends rounds (and tokens) discovering and repairing the violations. Call it "pinball." A layered validation hierarchy (pre-commit → merge check → deploy gate) makes it worse: context is lost between where the agent authored the change and where the failure surfaces. Across many concurrent agents, this wasted work multiplies.

Why it's not just "it's in the docs"

It comes down to availability vs. binding.

Docs do make a rule knowable; they just leave it optional. The brief makes it governing.

Mechanism

One piece of machinery run in two directions:

Two firing modes for the forward direction: brief-time auto-injection (the orchestrator declares target files; the dispatch path renders a constraint block into the prompt) and agent-discovery-time pull (the agent asks a constraints-for-files CLI once it knows what it will touch).

Prerequisites

1. File-addressable constraints. Every constraint declares its scope (file patterns / component tags) and lives in a registry you can query by file. Anything not addressable by file scope cannot be sliced. 2. Self-documenting constraints. Each rule carries a name, docstring, and an actionable "How to fix" line. This is the decisive prerequisite: the value of an injected constraint is bounded by the agent's ability to act on it, and its inverse, if you can't clearly explain a rule to an agent, the rule's own defense value is questionable. 3. A slicing operator at two granularities, file-scope (forward) and line-range (reverse), built as multiple adapters, one per registry (lint fleet, component registry, banned-API list, test corpus, doc index). 4. An injection point in the dispatch pipeline (the brief-authoring step) plus the on-demand CLI.

Consequences & costs

Known uses

Related mechanisms