Engineering note
Agentic Closed-Loop Development: From Product Intent to Verified Software
A practical method for turning product intent into bounded agent work, accepted contributions, risk-selected proof, and accountable software delivery.
- agentic-engineering
- ai-native-engineering
- software-delivery
- verification
- bounded-autonomy
AI-assisted coding optimizes implementation. Agentic closed-loop development redesigns the complete path from product intent to verified software.
That distinction matters because code generation is becoming cheaper while engineering certainty remains expensive. A model can produce a plausible function, component, migration, or test in seconds. It cannot make an incomplete requirement complete, decide which architectural boundary should remain stable, or prove that a change behaves correctly in a deployed environment unless the surrounding engineering system gives it the necessary context, tools, constraints, and evidence.
The bottleneck is increasingly not code generation. It is controlling intent, context, scope, verification, and accountability.
This article presents a generalized engineering model developed through production software work and independently owned systems. Client-specific implementations and identifying details are intentionally omitted.
Revision, September 21, 2026. This revision refines delegation, model routing, verification selection, and evidence reporting. The core method remains product intent, repository-grounded context, bounded execution, correction, and accountable outcomes.
1. Why code generation is not enough
Software engineering begins before code and ends after it. Product intent has to be interpreted, existing behavior investigated, constraints found, tradeoffs made, changes integrated, and outcomes verified. A generated patch occupies only one part of that chain.
The first failure mode is incomplete intent. A request such as “make offline synchronization reliable” sounds clear until the system has to define which operations may queue, which identity authorizes them, how long that authority remains valid, what happens after a restart, and which server result is canonical. A model can fill those gaps with reasonable-looking assumptions. Reasonable-looking is not the same as authorized or correct.
The second failure mode is stale context. Repositories contain history, conventions, domain rules, and operational constraints that are not visible from a narrow code excerpt. Without that context, generated work may duplicate an existing abstraction, violate a boundary, or solve a symptom in the wrong layer. The patch may compile while making the system harder to change.
Architecture violations are especially easy to miss because they often pass local checks. A new dependency can bypass a domain service. A component can take ownership of server state that belongs elsewhere. A retry can be added in a client even though idempotency has to be guaranteed by the backend. Each change may look locally coherent while weakening the system as a whole.
Business-rule mistakes are harder. Tests only prove what they assert. If a test encodes the same mistaken assumption as the implementation, a green suite confirms consistency between two wrong artifacts. Generated tests can even optimize for the current patch rather than the intended behavior, producing impressive coverage around an invalid model.
Scope also drifts. An agent asked to repair one failure may refactor neighboring modules, rename public interfaces, update unrelated dependencies, or “clean up” configuration it does not understand. The extra work is not free. It increases review surface, expands regression risk, and makes it harder to attribute a failure to one decision.
Finally, local success is weak evidence for environment-dependent behavior. Authentication, browser APIs, database constraints, network transitions, deployment configuration, caches, physical devices, and production data shapes can invalidate a patch that passed static checks and mocked tests.
Compiling is not proof. Passing tests is not always product proof. A completed deployment is not proof that the intended behavior works. The engineering system must select the verification boundary that the change needs and report where its evidence stops.
2. Definition of agentic closed-loop development
Agentic closed-loop development is a controlled software-delivery system in which an agent can move through a bounded sequence of investigation, implementation, observation, comparison, and correction. It is not unrestricted autonomy.
The loop starts with a goal: a concrete outcome expressed in product or operational terms. The goal is accompanied by context: repository instructions, architecture, domain facts, constraints, exclusions, and the current state of the system. The agent takes an action inside approved scope, then obtains an observation from tools or runtime behavior.
That observation is compared with explicit acceptance criteria. If the evidence contradicts the criteria, the system may perform bounded correction when the failure is understood and the repair stays within authority. If the next action requires new product judgment, broader access, destructive work, or a change to the agreed model, the loop stops and escalates.
The loop ends with an accountable decision under the owning repository’s delivery policy. Planning approval, implementation authority, integration, and production release are distinct. An upfront mandate can authorize routine continuation within accepted scope; it cannot authorize a new business rule, broader security scope, destructive action, or unrestricted production release.
This model changes the unit of delegation. The unit is no longer “write this code.” It becomes “move this bounded work item from stated intent to defensible evidence, stopping when authority or facts run out.”
The loop can be represented as a small decision contract rather than an open-ended instruction:
type LoopDecision =
| { status: 'accepted'; evidence: Evidence[] }
| { status: 'correct'; defect: Defect; attemptsRemaining: number }
| { status: 'escalate'; reason: string; evidence: Evidence[] };
The useful property is not the TypeScript. It is the forced distinction between accepted evidence, a correctable defect, and a decision the agent does not own.
3. Reference lifecycle
The lifecycle is intentionally explicit. Each stage produces information needed by the next, and later evidence may send work back for correction.
Product intent
Product intent describes the desired behavior and why it matters. It should name the user or operational consequence, not merely prescribe a code edit. Intent also defines exclusions. A narrow goal with explicit non-goals is more useful than a broad ambition that invites interpretation.
Investigation
Investigation establishes repository truth. The agent traces the relevant routes, data ownership, contracts, tests, configuration, deployment path, and current runtime behavior. It separates facts from assumptions and identifies missing information before editing. Investigation is where a plausible plan becomes a repository-grounded plan.
Specification
The specification turns intent into scope, constraints, acceptance criteria, evidence requirements, and authority boundaries. It should state what must remain unchanged. When a behavior spans client, API, database, or device state, the criteria must describe the end-to-end result rather than one implementation detail.
Scoped implementation
Implementation is constrained by the specification. The agent changes the smallest coherent set of files and preserves unrelated work. It does not treat access to a repository as permission to redesign it. If the implementation exposes a contradiction in the specification, that is evidence to escalate, not permission to improvise.
Local verification
Local verification provides deterministic feedback: type checks, linting, unit and integration tests, contract checks, builds, and repository-specific proof. Select checks for the change’s impact and risk. Running every available command wastes time; running only the easiest creates false confidence.
Preview validation
Some behavior cannot be proved from source or a local process. Where applicable and authorized, a preview deployment exposes routing, assets, configuration, and integration behavior that a build cannot. Verify the intended route and behavior there before seeking release authority.
Local and preview checks may exercise a browser, API, database, network transition, background process, or device. Name the candidate and environment. A screenshot proves visible state at one moment; it does not prove an invisible backend invariant.
Bounded correction
When verification fails, classify the cause: implementation defect, invalid assumption, environment fault, or unreliable check. Repair within approved scope and rerun affected proof against a stable candidate. Do not repeat an unchanged deterministic failure hoping for a favorable result, or weaken an assertion to obtain PASS. Stop when the next correction needs new authority or facts.
Release authorization
The accountable person or authorized release process evaluates evidence, unresolved risk, reversibility, and operational readiness before production mutation. Verification success never grants release authority by itself. High-risk changes may require additional approval even when every automated check passes.
Production deployment
Once authorized, deployment follows the owning repository’s guarded direct lane or protected review lane and its release controls. Record the released revision and environment; a successful deployment does not establish that intended behavior works.
Post-release observation
Observe the released interface and relevant API, data, background, or device effects when authorized. Compare the deployed revision with the candidate that passed its gates. Production observation is separate from local or preview proof.
Documented outcome
The final record distinguishes implemented, verified, integrated, deployed, and observed-working outcomes. It states the candidate, environment, actual checks, remaining gaps, and exclusions. A positive workflow conclusion cannot turn skipped deployment jobs into deployment proof.
4. Four system layers
The lifecycle becomes easier to operate when responsibilities are separated into four layers.
Control layer
The control layer holds intent and state. It includes work items, specifications, acceptance criteria, project state, release state, and verification results. This layer answers: What are we trying to achieve? What is allowed? What evidence is required? Where is the work now?
The control layer should not be a chat transcript. Important decisions need durable representation so another person or agent can inspect why a boundary exists. A lightweight specification in the repository is often enough. The value comes from clarity and reviewability, not from building a new orchestration product.
Agent execution layer
The execution layer performs codebase investigation, planning, implementation, refactoring, tests, documentation, and controlled tool use. One lead owns architecture, decomposition, risk decisions, acceptance, integration, verification selection, and authorized delivery. It needs the minimum authority required for the task. Read access may be broad while write access remains scoped. Production credentials should not be available merely because the agent can edit application code.
Execution should produce small, inspectable changes. Large autonomous batches make failure attribution difficult. The agent should preserve the distinction between work it observed, work it changed, and work it only inferred.
Verification layer
The verification layer evaluates results through static checks, unit tests, integration tests, builds, browser and API behavior, deployed-environment checks, and production-readiness constraints. The important design choice is independence: verification should not rely entirely on the same reasoning that produced the patch.
Deterministic checks are valuable because they fail consistently. Runtime checks are valuable because they encounter real integration boundaries. Human review is valuable where intent and tradeoffs cannot be reduced to an assertion. Strong verification combines them instead of pretending one layer replaces the others.
Governance layer
The governance layer defines tool permissions, autonomy boundaries, retry limits, approval gates, schema and security controls, merge and release authority, and restrictions on destructive operations. Governance is part of the engineering design, not a policy document added after the agent has broad credentials.
A useful governance rule is specific enough to execute. “Be careful with production” is weak. “The agent may prepare a deployment and verify its preview, but production release requires named human approval” defines a boundary. It is enforced only when tool permissions, integration gates, and release controls actually prevent an unauthorized release. Instructions express policy; validated declarations check record shape; observed execution evidence shows what ran; enforced controls restrict what can happen. A well-formed acceptance record alone cannot prove that review occurred.
5. Accountable delegation and cost
One lead, bounded contributions
The lead may use a repository scout for discovery, a worker for bounded implementation, a verification assistant for focused checks, an independent reviewer for material high-risk changes, or an exceptional investigator for an unresolved architecture or security question. These are responsibilities, not a mandatory team. A trivial edit is often cheaper and clearer for the lead to do directly.
Each assignment names the outcome, authoritative context, literal file ownership, exclusions, acceptance criteria, and expected evidence. Parallelism helps only when tasks are genuinely independent. Overlapping writers can corrupt one candidate; separate writers sharing a database, port, device, or build output can corrupt each other’s proof. More agents also add coordination, context, and review cost. Compact task context and bounded concurrency matter more than filling available slots. The lead should not duplicate the worker’s implementation while waiting.
A contribution passes through assignment → execution → report → lead verification → ACCEPT / REWORK / REJECT → candidate integration. The lead checks material claims, the actual diff, required outcomes, relevant assertions, and reported results. It need not mechanically repeat every delegated search or test. ACCEPT binds to that particular result and revision. REWORK needs renewed acceptance; REJECT excludes the result. A useful partial contribution may be accepted for its stated scope while other task requirements stay open. A child’s PASS is neither whole-task completion nor delivery permission.
For material high-risk work, a separate reviewer examines the combined candidate, including final lead edits, after lead acceptance. Findings are evaluated and material repairs return for review. Independence adds scrutiny, but a reviewer can share the same mistaken assumption; behavioral assertions and runtime evidence still matter.
One compact acceptance record links requirement → owner → implementation → specific proof → actual result or gap. For example: “An expired offline authorization cannot replay a queued write → API worker → server guard → negative integration assertion against candidate A → PASS in local test; device restart behavior → verification owner → no device run → NOT RUN.” The first result can be accepted without claiming that the second outcome is complete.
Capability and cost routing
Use inexpensive reasoning for file discovery and straightforward evidence gathering, a capable routine model for bounded implementation, stronger judgment for architecture and security, and exceptional escalation only when ordinary analysis leaves a consequential question unresolved. Route by ambiguity, consequence, reasoning difficulty, and demonstrated failure. File count and available agent slots are poor proxies. Escalating reasoning or model capability never expands permissions or delivery authority.
Configuration can request role-specific models and reasoning levels; it cannot establish which model actually ran or prove cost savings. Report each role’s requested and observed model/reasoning, invocation counts, and escalation reason. Record tokens and cost only when runtime telemetry exposes them; otherwise say unavailable. Keep delegated context small and relevant rather than cloning full conversation history into every child.
6. Context engineering
Prompts are transient. Engineering context must be versioned, reviewable, and maintained alongside the system it governs.
A one-off prompt can describe the immediate request, but it is a poor home for durable architecture and domain knowledge. Repository-owned instructions can define directory ownership, public and private boundaries, test expectations, deployment constraints, known risks, and the conditions that require escalation. Architecture decisions can explain why a boundary exists. Domain documents can state invariants that code alone does not reveal.
Context needs structure. A single enormous instruction file becomes another stale document that agents partially read and humans stop reviewing. General rules belong near the repository root. More specific rules belong close to the code they govern. Task-specific facts belong in the task. Retrieval should load the narrowest relevant context rather than dumping the entire organization into every execution.
Context also needs an owner. Instructions that no longer match the system are worse than missing instructions because they create confident mistakes. When architecture, deployment, or policy changes, the related context should change in the same review. Verification can include checks that referenced paths and commands still exist.
Durable context has distinct owners. Implementation and observed evidence say what exists and what was demonstrated. Project Canon records accepted decisions, constraints, and operating contracts. A System & Feature Map helps navigate from a feature to implementation, constraints, and verification. An architecture guide or site explains supported facts to readers. The map never replaces source inspection, and polished documentation does not prove implementation. The names may differ by repository; the responsibilities should remain clear.
Good context does not eliminate investigation. It directs investigation toward the right evidence and makes established boundaries explicit. Load it progressively: start with the task and repository rules, follow relevant feature links, then inspect actual code and proof. A giant instruction file or a new orchestration service is unnecessary. The repository remains the source of implementation truth; documentation helps find and interpret it.
7. Verification at the highest practical layer
The target is the necessary verification boundary for the change. During implementation, use fast feedback: relevant type, lint, schema, unit, or contract checks. Once writers are quiescent and the candidate is stable, prove the affected slice with the integration, build, browser, API, database, or device checks that exercise its real failure modes. Then satisfy the repository’s admission and integration gates. Separately authorized release verification and post-release observation establish different facts. Foundational or unknown-impact changes can justify explicit full certification.
Impact determines breadth; risk increases depth in the affected dimensions. A copy correction may need content validation, build, and rendered inspection. An authorization change needs denied cases at the server boundary, not just a UI check. A synchronization change may need restart, reconnect, server effects, and device evidence. Begin with cheap checks and stop obsolete runs when a newer candidate invalidates them; expensive proof against a moving tree is wasted work.
Execution caches save time by reusing computation. Reusing evidence requires stronger conditions: applicable candidate and inputs, provenance, freshness, and explicit invalidation rules. An earlier green result does not automatically certify changed code, configuration, dependencies, environment, or target baseline. State which proof was reused and why it still applies.
Some repositories name tiered profiles for development feedback, affected proof, admission, and full certification. Those labels are local policy, not a universal standard. The reporting rule is universal: name the check, candidate, environment, actual result, and remaining gap. A build does not prove hosting; deployment health does not prove intended user behavior.
8. Bounded autonomy
The objective is maximum reliable delegation, not maximum agent freedom.
Authority should be grouped by risk and reversibility.
Autonomous work
An agent can usually investigate code, implement explicitly approved scope, write and run tests, prepare isolated changes, create an authorized preview, and perform bounded corrective action. These activities are inspectable and reversible when source control and environment boundaries are sound. An upfront mandate can cover routine continuation without asking for each step again.
Approval-gated work
Authentication, authorization, and schema work may be implemented and verified when the accepted scope explicitly includes them, with stronger review and proof. New business rules, broader security scope, destructive operations, production mutations, and release require their own authority. Integration follows the owning repository’s policy; neither direct-main nor PR-only delivery is a universal rule.
Prohibited work
Some actions are prohibited to both agents and hurried humans: disabling verification to obtain a green result, bypassing failing gates, exposing secrets, force-rewriting shared history without explicit authorization, changing requirements silently, hiding failed checks, and expanding scope without accountability.
| Activity | Agent authority | Human responsibility |
|---|---|---|
| Read code and investigate | Autonomous | Oversight |
| Clarify material ambiguity | Escalate | Decide |
| Implement approved scope | Autonomous | Review when needed |
| Run checks and previews | Autonomous | Oversight |
| Retry bounded failures | Autonomous within limit | Intervene after limit |
| Change authentication or schema | Implement and verify within explicitly approved scope | Approve scope and consequential decisions |
| Integrate candidate | Follow repository lane and granted authority | Own required decisions and gates |
| Release production | Prepare evidence; execute only with separate release authority | Own release decision |
| Bypass verification | Prohibited | Prohibited |
| Expose secrets | Prohibited | Prohibited |
Authority is not static. A low-risk documentation change can move through the loop with little intervention. A change affecting money, identity, tenant boundaries, or irreversible data needs narrower permissions and stronger proof.
9. Self-healing boundaries
“Self-healing” is useful only when the failure is diagnosed, classified, and bounded. An agent may restore an expected local service, regenerate a generated artifact, correct a fixture or invocation error, or repair an implementation defect inside approved scope. Rerun a deterministic check after correcting the attributable cause or changing its relevant input. An unchanged retry requires evidence of a transient failure and must stay within the retry budget.
Preserve the original failure, the correction or retry, and its actual result. Measure success against the same acceptance criteria; never repeat an unchanged failure hoping for a pass.
Self-healing must not invent requirements, change a security model, redesign architecture, silently migrate data, refactor unrelated systems, or suppress a failure. An agent that changes the gate until it passes is not healing the system. It is removing the evidence.
Retries need limits. A transient network retry may be reasonable; repeating the same failing deployment without new evidence is not. After a small number of well-understood attempts, escalate with the failure evidence, attempted corrections, and the next decision required. Never suppress adverse results or weaken assertions to obtain green checks.
The same rule applies to local environments. Restoring a documented database service is different from deleting state because a test is inconvenient. The first returns the environment to an expected condition. The second changes evidence and may destroy work.
10. Failure modes
Agentic systems do not remove engineering risk. They move more of that risk into specification quality, context quality, tool governance, and verification design.
Ambiguous specifications create confident divergence. The agent chooses one interpretation, implements it thoroughly, and reports completion even though the product decision was never made.
Stale context directs correct execution toward the wrong architecture. This is dangerous because the agent appears disciplined while following an obsolete rule.
Tests optimized instead of behavior occur when the implementation and test are generated together around the same assumption. The suite passes, but no independent evidence connects it to the intended outcome.
Environment collisions corrupt proof. Two tasks may share a database, port, worktree, or deployment target. A passing test can result from another process, and a cleanup can destroy unrelated state.
Flaky verification teaches the system to retry rather than understand. If a gate fails nondeterministically, the response should include diagnosing the gate, not normalizing repeated execution until a favorable result appears.
Hidden dependencies surface late. A local module, external service, authentication state, or generated asset may be missing from the declared workflow. Investigation and production-equivalent builds reduce this risk.
Runaway scope produces large, polished diffs that are difficult to verify. Agents are good at continuing. The system needs explicit stop conditions and exclusions.
Polished but misleading reports are a governance failure. A report that says “production verified” after only a local build is worse than a terse report that names the actual boundary.
False confidence from local checks appears whenever environment-specific behavior is treated as incidental. Deployment and runtime are part of the product.
Human rubber-stamping defeats the approval model. If the final reviewer cannot understand the scope, evidence, and unresolved risk, the approval gate is ceremonial. The system should summarize decisions, not overwhelm the reviewer with raw logs.
11. Adoption stages
Teams do not need to jump from editor completion to autonomous delivery. A staged model exposes weaknesses before authority expands.
1. AI-assisted implementation
Individuals use models for explanation, drafting, refactoring, and review. Humans sequence every step and verify results. The priority is learning where assistance improves work and where it produces plausible mistakes.
2. Structured agent execution
Tasks gain explicit scope, repository instructions, acceptance criteria, tool boundaries, and standard verification commands. Agents can complete bounded work while humans remain closely involved.
3. Closed-loop verification
Agents run deterministic checks and runtime validation, compare evidence with criteria, and perform limited correction. Reports distinguish local, preview, and production proof.
4. Governed autonomy
Low-risk work can progress with limited intervention. Permissions, retry limits, escalation conditions, and approval gates are enforced. High-risk decisions remain human-owned.
5. Measured engineering platform
The organization measures whether the system improves delivery rather than assuming more automation is better. Useful measures may include lead time, intervention rate, retry rate, verification failures, escaped defects, deployment success, cost per completed work item, and the percentage of autonomous versus approval-gated execution.
Measurements need context. A lower intervention rate is not automatically good if escaped defects rise. A higher retry rate may reveal stronger verification or weaker specifications. The purpose is to improve the engineering system, not to create a vanity autonomy score.
Adoption should expand authority only after the previous stage produces reliable evidence. Tool access is easy to grant and difficult to govern after workflows depend on it.
Conclusion
Agentic closed-loop development is conventional engineering discipline made explicit around a new execution capability. It treats code generation as one tool inside a larger system of intent, context, bounded action, independent evidence, correction, escalation, and accountable release.
The model is useful because it refuses two weak extremes. It does not reduce AI to autocomplete, and it does not pretend autonomy removes the need for architecture, security, verification, or human judgment. It delegates aggressively where work is bounded and observable, then stops where facts or authority end.
An independently owned example of these principles appears in the Ordr.now offline recovery and idempotent synchronization proof. The point is not that one product proves a universal model. It shows how explicit behavioral criteria, layered verification, and human release authority can constrain agent-assisted implementation in a real system.
The concrete repository, worktree, offline-mobile, device, and production-proof implementation is documented in Inside the Ordr.now Agentic Engineering Loop.
The useful question is not whether an agent can write the code. It is whether the engineering system can prove that the resulting software satisfies the intended behavior without sacrificing security, maintainability, or accountability.