Skip to content

§3.1 Where Obligations Can Be Enforced

A foundation model produces probabilistic outputs; a harness turns selected outputs into actions. Once those actions can alter a repository, invoke an API, change infrastructure, or ship an artifact, the engineering question is no longer only how to steer the reasoner. It is where the surrounding environment can intervene between a proposed action and its consequence.

Guidance influences behavior; enforcement determines what the environment will permit or accept. A prompt, brief, example, or playbook can make one action more likely than another. A permission boundary can forbid an action, while a validator and gate can refuse a result. Feedback can return evidence to the reasoner—a failing test, an observed call, a measured latency, or a validator’s explanation—so that subsequent work can respond. The distinction matters when choosing where to intervene: the environment must be able to constrain the relevant action or determine whether the resulting work is accepted, rather than merely advising the reasoner.

Recent agentic-security guidance draws a similar boundary. Once agents act before commit time, the repository is too late to be the security boundary: the tools, permissions, and execution environment that produce a change join the trusted base, so agentic security must secure the process that creates the artifact, not only the artifact 1.1. Snyk, “The Agentic Development Lifecycle,” Snyk, 2026, https://snyk.io/blog/agentic-development-lifecycle/.

A correct result does not excuse an unacceptable process. An agent might produce working software while accessing data it was not authorized to read, modifying dependencies without approval, or deploying before the required checks completed. Testing the resulting artifact cannot establish that those actions were permissible. Some engineering obligations govern the product. Others govern how the product may be produced. The environment must be able to enforce both.

Where the environment intervenes determines what it can examine and control. Figure 3.1-1 distinguishes reasoning input, where guidance ordinarily operates, from three enforcement boundaries: individual actions, composed units of work, and the resulting artifact or runtime state. Moving toward larger units of work can make additional obligations legible because more context and evidence are available. The appropriate boundary is the earliest one where the environment can evaluate and enforce the obligation.

Intervention boundaries: guidance, actions, work, and artifacts Four columns compare intervention boundaries. Reasoning input is guidance: context supplied to the reasoner, with instructions, models and examples. The three enforcement boundaries are action, covering one proposed action with permissions, hooks and tool restrictions; work unit, covering a composed body of work with task-completion checks, merge gates and deployment gates; and artifact or runtime, covering the resulting artifact or running state with API boundaries, schemas and runtime permissions. Rows identify Boundary, Scope and Examples. A rightward arrow indicates increasing scope of work considered and more context for evaluating obligations, not increasing enforcement strength. GUIDANCE ENFORCEMENT BOUNDARIES Reasoning input Context supplied to the reasoner Instructions models examples Action One proposed action Permissions hooks tool restrictions Work unit Composed body of work Task-completion checks merge gates deployment gates Artifact / runtime Resulting artifact or running state API boundaries schemas runtime permissions Boundary Scope Examples Increasing scope of work considered More context for evaluating obligations
Figure 3.1-1. Intervention boundaries. Guidance influences reasoning; enforcement constrains actions or determines whether work and artifacts are accepted. Moving from individual actions to larger units of work can make additional obligations legible as evidence accumulates. Later boundaries are not necessarily stronger. Choose the earliest boundary where the obligation can be evaluated and enforced.

3.1.1 Reasoning Input, Action, Work Unit, and Artifact/Runtime

The first location is reasoning input: the context, representations, examples, and instructions put in front of the reasoner. This is where Modeling and context engineering do most of their work: a finite reasoner does better when the relevant system knowledge is already externalized and selected for the task. But placement in context is ordinarily guidance, not enforcement. The model can misread, forget, or disregard what it was shown.

The context supplied to an agent can change as the work becomes better understood. Figure 3.1-2 illustrates dynamic context injection in two stages. At dispatch, anticipated files and components determine an initial selection of relevant engineering knowledge. After planning, the agent's refined understanding of the work determines a second selection, which may add or remove relevant material. Standing instructions remain available throughout. This arrangement limits unnecessary context while allowing newly relevant obligations to be surfaced before implementation.

Case study

Worked inset — DocAble: Supplying Context and Requiring Discovery

An agent assigned to change DocAble’s code needs the rules relevant to the files it expects to edit. DocAble is a document-remediation service developed with agents, and its engineering environment selects those rules for each task. Those rules include architectural invariants, ownership declarations, lint requirements, and links to design decisions. The engineering problem is to select that knowledge for a particular task without making every agent reconstruct it from the repository.

DocAble selects context twice. At dispatch, an agent hook matches the work order’s anticipated files against file-scoped constraint declarations and the models’ file-to-component mappings. The resulting knowledge joins the standing instructions in the agent’s initial context. After planning, the agent triggers a second extraction using its refined file set. This selection may surface obligations missed initially or discard material no longer relevant to the proposed change 2.2. James C. Davis, DocAble: Automated Document-Accessibility Remediation, Good Fast and Cheap, SEIP manuscript, October 28, 2026, 2026. This is dynamic context injection: the knowledge supplied to an agent changes as the work becomes better understood. Figure 3.1-2 illustrates both selections and the separate gate that requires evidence of the second.

Dynamic context injection and enforcement Three rows distinguish agent workflow, dynamic context selection, and engineering knowledge as a resource. The workflow is initial agent context, planning to refine scope, refined agent context, a Git precommit gate, then implementation. The gate requires evidence of refined selection for the initial commit that permits implementation to begin. At task dispatch a hook selects initial knowledge from anticipated files and components. Planning passes refined scope to a second selection using refined files and dependencies; that selection may add or remove knowledge. Each selection feeds its corresponding agent context. Both draw from the same engineering knowledge repository of models, rules, procedures and examples. Standing instructions remain available throughout. Context retrieval supplies guidance; the distinct precommit gate enforces completion of the second selection. Agent workflow Context selection Engineering knowledge (actor) (dynamic) (resource) Initial agent context standing + initial Refined agent context standing + refined Planning Refine scope Implementation Gate Git precommit Evidence of refined selection Dispatch hook At start of task Initial selection Anticipated files and components Refined selection After planning Refined files and dependencies May add or remove Refined scope Engineering knowledge repository models · rules · procedures · examples Standing instructions — available throughout mission · compact method · compact policy
Figure 3.1-2. Dynamic context injection and enforcement. A dispatch hook selects initial engineering knowledge from anticipated files and components. After planning, the agent selects context again using its refined scope. Standing instructions remain available throughout. A Git precommit gate requires evidence of the second selection for the initial commit that permits implementation to begin.

Before implementation begins, the agent must make an initial commit demonstrating that the required discovery occurred. A separate Git pre-commit gate rejects that commit if the dispatch has no recorded second-extraction event. Its condition is deliberately narrower than “the agent followed the rules.” It does not compare the extraction’s file set with the committed files, or establish that the selected constraints were complete, correct, read, or followed. The gate requires a discovery event; correspondence checks and implementation gates must evaluate the obligations that discovery exposes.

Completion requires a different view of the work. DocAble’s definition-of-done audit recomputes evidence over the completed task instead of relying only on an earlier record. Several intermediate commits may legitimately leave a model and its implementation temporarily inconsistent; the completed task is where their required agreement can be assessed. The two mechanisms therefore answer different questions: did the required discovery occur, and does the finished work carry the evidence needed for acceptance? Neither question is answered merely by placing instructions in context. (Appendix A traces an actual dispatch through model selection, work-order construction, and completion checks.)

Guidance can make an acceptable realization more likely. A sound constraint or admission mechanism can instead rule a represented class of unacceptable realizations out of the surface it governs. Guidance improves the producer's odds; enforcement changes what admission must trust.

guidance: pi↑enforcement: selected Ji need not be trusted for admission

The first of the three enforcement boundaries is the action boundary exposed by the harness and its tools. Here, one attempted side effect is in view: a tool call, an API request, a shell command, or a file mutation.

AGENT HARNESS

Inset — Hooks and Permissions

Many agent harnesses let engineers intervene in an agent’s work through permissions and lifecycle hooks. For example, a deployment tool can be permitted to inspect production state while its credentials deny permission to modify it. A pre-action hook can invoke a check on a proposed command; if the check is configured to block violations, the harness refuses the command. A post-action hook can check the result or collect evidence, but the operation has already occurred. That evidence can inform a later acceptance decision: a CI or deployment gate can reject a larger unit of work when required checks fail.

We can understand these facilities by separating where an intervention occurs from what the configured mechanism does. The boundary determines what evidence is available in time to affect the decision. The mechanism determines how that evidence is used: the same failed check at the same hook might produce a warning or stop execution. If the deployment tool must not modify production state, permissions enforced by the production service can refuse a write before it takes effect. A warning after a write cannot satisfy that obligation: the forbidden effect has already occurred. The engineer therefore starts with what must be prevented or established, then chooses a boundary with sufficient evidence and a mechanism whose response enforces that requirement.

The second enforcement boundary is the work-unit boundary, where many actions compose into a meaningful unit: a completed task, pull request, build, migration step, or deployment candidate. Obligations that no single action can express become legible here: that the model and the implementation agree at task completion, that a change carries all its required evidence, that "done" actually holds. A pre-commit check can reject a local defect; a task-completion audit can weigh the whole body of work; a deployment gate can refuse a candidate whose accumulated evidence is inadequate. The larger scope makes obligations involving several actions available for evaluation, even when no individual action provides enough evidence.

The third enforcement boundary is the artifact or runtime boundary: the resulting system or running state. Types, narrow APIs, architectural seams, schemas, runtime permissions, and admission policies can make a forbidden state impossible to express or impossible to accept. For example, a service account may have permission to read production records but no permission to change them. The permission restricts what the running system can do, regardless of how the agent wrote its code.

3.1.2 Placement and Strength Are Different Decisions

These locations do not form a monotonic scale from weak to strong. A narrowly scoped API permission may enforce its obligation more strictly than a late CI check; a type may rule out one state completely while saying nothing about a system-level obligation a task-completion gate can weigh. Where a mechanism acts and how strongly it enforces an obligation are different design decisions.

Richer models can expand the properties the environment is able to state and govern, but substantial enforcement can exist without them. A bounded execution sandbox, for example, can constrain actions without requiring a rich model of the system it contains.

3.1.3 Return Evidence at the Earliest Useful Boundary

The boundaries also determine what feedback can return and when. An action hook can explain why a call was refused; a CI check can report a violated invariant in the change under review; a deployment validator can identify failed checks or missing required evidence. Placing a check where the obligation can first be evaluated allows useful evidence to return while the relevant work is still in progress. The agent can then revise the change using the reasoning and context already at hand. If feedback arrives after it has moved on, it may have to reconstruct what it changed and why before it can understand the failure and correct the work.

Controls within the GEE can also interact or conflict; §3.5 treats their growing portfolio as a system in its own right.

The Alignment Principle: Make selected engineering obligations enforceable through constraints that restrict actions or states, sensors that produce evidence, and gates that evaluate evidence and control whether work may proceed. Once an obligation is entrusted to the engineering environment, satisfying it should not depend solely on each future agent remembering it.

Worked Examples

Takeaway. Place the enforcing mechanism at a boundary where the obligation is legible and the environment can evaluate or constrain the relevant work. The appropriate boundary depends on the obligation.

The next section asks what must be true before an obligation deserves enforcement.

Works Cited

  1. Snyk. “The Agentic Development Lifecycle.” Snyk, 2026. https://snyk.io/blog/agentic-development-lifecycle/.
  2. Davis, James C. DocAble: Automated Document-Accessibility Remediation, Good Fast and Cheap. SEIP manuscript, October 28, 2026, 2026.
  3. Mikhalev, Vladimir. “The Untrusted Autonomous Workload: How AI Coding Agents Reshape What Isolation Has to Do.” Docker, May 26, 2026. https://www.docker.com/blog/untrusted-autonomous-workload-ai-sandboxes/.
  4. Charas, Max, and Marc Bruggmann. “Background Coding Agents: Predictable Results Through Strong Feedback Loops (Honk, Part 3).” Spotify Engineering, December 9, 2025. https://engineering.atspotify.com/2025/12/feedback-loops-background-coding-agents-part-3.
© James C. Davis, 2026–present