Agent Orchestration Design

Harness as a graph · handoff contracts · state, credentials and tooling · three worked flows

Companion to the production-grade requirements spec. This document is design, not requirements: it explains how the pieces fit and why, and it carries the normative envelope schemas that the requirements reference.

Companion to An Ideal Vulnerability-Discovery Harness · index


1. The harness is a graph, and it is worth saying so explicitly

The three-stage pipeline is usually drawn as a linear sequence. That drawing is convenient and slightly misleading. What is actually being built is a directed graph with typed edges, durable state and policy evaluated at traversal time. Naming the primitives makes several design decisions fall out rather than needing to be argued.

PrimitiveWhat it is in the harness
VertexAn agent or a deterministic tool. Recon, finder, validator, exploit-prover, fixer, post-fix validator are AI vertices. The policy evaluator, the scanner adapters, the schema checker and the diff applier are non-AI vertices. Both kinds sit in the same graph and are addressed the same way.
EdgeA handoff. Not a pointer but a contract: it declares the trust level of what is moving, the certainty attached to it, its provenance, and the payload. Section 3 gives the schema.
StateThe findings store, code graph, evidence store, patch state and conformance history. State lives outside the agents and outlives any single run, which is what makes resume-rather-than-restart possible after a failure.
PolicyAutonomy tiers, approval gates, scope tokens, evidence-tier thresholds, loop budgets. Evaluated on the edge before traversal, by the orchestrator, never by the agent that wants to traverse it.

1.1 Three places the graph model needs care

It has cycles, and the cycles are the dangerous part. Finder to validator to fixer is acyclic. Still-present reopening a finding, and configuration drift re-entering remediation, are loops. An agent graph with an unbounded loop is how a run consumes a quarter of the model budget arguing with itself. Loop bounds are therefore properties of the graph, not of any agent: iteration ceiling, wall-clock ceiling and cost ceiling are enforced by the loop governor at the orchestrator level, and breaching one produces an inconclusive terminal state rather than a retry.

Policy sits on the edge, and that is a security property rather than a stylistic preference. If the fixer decides whether the fixer may merge, there is no control, only a prompt. When the orchestrator evaluates the gate before allowing traversal, no amount of reasoning inside the agent reaches past it. This is the same distinction that separates a token that carries its own limits from an API that trusts its caller.

State is typed, directional and deliberately lossy. A stock orchestration runtime accumulates context forward: each node sees everything the previous nodes produced. That default is exactly wrong here. The validator must receive the finder's claim and must not receive the finder's reasoning, because a hypothesis that arrives wearing its own justification arrives as a premise. The edge drops information on purpose. This single departure from default state-passing is the most important thing in this document.

1.2 What this means for framework choice

Any graph runtime with conditional edges and durable checkpoints will carry the shape. The requirements that constrain the choice are not about the graph API:

A runtime that makes shared mutable state the path of least resistance will produce a harness that launders conclusions, no matter what the prompts say.


2. State, credentials and tooling

Section 1 named state and policy as graph primitives. This section is what they are made of.

2.1 State storage

State separates into four tiers by durability, and the tiering is a control rather than an optimisation.

TierContentsLifetimeNotes
Durable, authoritativeFindings, verdicts, evidence pointers, lineage, approval records, conformance historyRetained to the audit clock, yearsAppend-only where the record is an audit artifact. A verdict is never overwritten; a new verdict supersedes it and both remain.
Durable, workingCode graphs, asset inventory, declared and observed configuration stateRetained to the debugging clock, weeksRebuildable from source. Cheap to discard, expensive to recompute.
EphemeralAgent scratch memory, intermediate reasoning, tool call transcripts within a runDestroyed with the sandboxNever promoted to durable storage without passing through an envelope.
Never persistedRaw secrets encountered in target code, full prompt and completion text where it contains target payloadsNot storedRedacted at capture, not at read. Redacting on the way out means the secret was already written down.

Two rules govern movement between tiers. Nothing moves from ephemeral to durable except as a validated envelope, which prevents an agent from persisting its own reasoning as fact. And exploit artifacts stay in the region that produced them; only conclusions and counts aggregate to the global control plane.

Short-term versus long-term memory. Short-term memory is the run's working context and dies with it. Long-term memory is the findings store plus the learning signal, and it is read through queries rather than injected wholesale. An agent that carries forward everything it has ever concluded will eventually recognise its own past guesses as established fact. Memory is retrieved deliberately, scoped to the current target, and tagged with its provenance so the agent can tell what it is reading.

2.2 Short-lived credentials

No agent holds a standing credential. The pattern is minting rather than holding:

  1. The orchestrator presents the run's identity and the intended action to a credential broker.
  2. The broker evaluates policy: this agent, this target, this scan, now.
  3. The broker mints a token scoped to one target, one action class, one run, expiring in minutes.
  4. The agent uses it and never sees a longer-lived secret.
  5. The tool independently verifies the token and does not trust the caller's assertion about what it is allowed to do.

Delegation narrows and never widens. If the orchestrator holds read and write across repositories A, B and C, the finder receives read on A and B, and a tool call within the finder receives read on A alone. The effective permission of any chain is the intersection of every link, not the union. This is what stops a hostile instruction file from borrowing a privileged agent's hands: the file can persuade an agent, but persuasion does not enlarge a token.

Workload identity is preferred to any stored secret. The best-protected secret is the one that does not exist, so where the platform supports attested workload identity the broker mints against that rather than against a stored key. Revocation is per agent identity and must be tested rather than merely designed, because an untested revocation path is an assumption.

2.3 Tooling: deterministic tools, MCP, and skills

The harness reaches the outside world through three distinct mechanisms, and conflating them is a common source of trouble.

Deterministic tools are called when the answer does not require judgement: run the parser, compute the call graph, evaluate the policy rule, apply the diff, diff two configuration states. These are ordinary function calls with typed inputs and outputs. They are preferred wherever they can decide, because a deterministic answer costs nothing to validate and cannot hallucinate. In the configuration flow specifically, most findings never reach a model at all.

MCP servers are how the harness reaches third-party and internal systems: source control, ticketing, scanners, cloud APIs. Three properties matter:

Custom skills are versioned prompt-and-procedure bundles held in the agent repository: how to hunt a particular vulnerability class, how to shape a remediation for a given framework, how to phrase a disclosure. They are artifacts with owners, versions and review history, not strings pasted into a system prompt. Two consequences follow: a skill change is attributable in the lineage of every finding produced after it, and a model swap can be evaluated against a fixed skill set so that the variable under test is actually the model.

The distinction that matters operationally: a tool is something the harness calls, an MCP server is something the harness connects to, and a skill is something the harness knows. They fail differently and are governed differently.


3. Agent-to-agent handoff

3.1 What travels, and what must not

Every hop carries the same envelope. The fields exist to stop specific failures rather than to be complete.

FieldPurposeFailure it prevents
trust_tierMarks target-derived content as untrusted for the whole life of the recordContent gaining authority by crossing a boundary
certaintyCarries the claim's epistemic status and can only degrade or hold across a hopConclusion laundering: a hypothesis arriving as a premise
provenanceWhich agent, which model version, which skill version, which evidenceUntraceable findings; inability to attribute a regression to a model swap
payloadThe claim and its evidence pointers, explicitly not the sender's reasoningThe receiver inheriting the sender's argument and agreeing with it
authorityAbsent by design. Permission travels separately, minted per hopThe confused deputy

3.2 The envelope

{
  "envelope_id": "uuid",
  "run_id": "uuid",
  "hop": { "from": "finder@2.4.1", "to": "validator", "sequence": 3 },
  "trust_tier": "untrusted | sanitised | verified | operator",
  "certainty": {
    "level": "hypothesis | corroborated | proven | refuted",
    "confidence": 0.0,
    "may_increase": false
  },
  "provenance": {
    "agent": "finder",
    "agent_version": "2.4.1",
    "model": "vendor/model@snapshot",
    "skills": ["injection-hunt@1.7"],
    "derived_from": ["envelope_id", "..."]
  },
  "payload": {
    "claim": "string, one assertion",
    "locations": [{ "uri": "...", "line": 0, "symbol": "..." }],
    "evidence": [{ "tier": "T1|T2|T3|T4", "ref": "evidence-store://...", "kind": "..." }],
    "reasoning": null
  },
  "budget": { "iterations_used": 2, "iterations_max": 6, "cost_used_usd": 0.41 }
}

Three constraints are enforced by the orchestrator rather than requested of the agent:

  1. payload.reasoning is stripped on the finder-to-validator hop. Not omitted by convention, removed by the edge.
  2. certainty.may_increase is false on every hop except the validator's output. Only an adversarial attempt to disprove may raise a claim's standing, and only a live re-test may raise it to proven.
  3. derived_from is mandatory and forms the lineage chain. A finding with a broken chain is inconclusive by definition, because its history cannot be reconstructed.

3.3 Certainty transitions

HopEnteringLeavingRule
Recon → Finder—hypothesisRecon produces structure, never findings
Finder → ValidatorhypothesishypothesisUnchanged. Reasoning stripped
Validator → Exploit-proverhypothesiscorroborated | refutedRefuted terminates and is written to the learning signal
Exploit-prover → Fixercorroboratedproven | corroboratedOnly a successful proof reaches proven. Failure to reproduce does not refute
Fixer → HITL gateprovenunchangedThe fixer cannot alter the standing of the finding it is fixing
HITL → Post-fix validatorprovenunchangedApproval authorises a change, it does not strengthen a claim
Post-fix validator → terminalprovenclosed-verified | still-present | regressed | inconclusiveFour exits. Absence of signal is inconclusive, never closed

The last row is the one most often collapsed in practice. A re-scan that returns nothing has not proved the fix worked; it has proved the scan saw nothing. Recording that as closed converts a measurement gap into a false assurance, and does so at exactly the point where nobody is looking any more.

3.4 Human-in-the-loop gates

A gate is a vertex, not a callback. It has an identity, an inbox, an SLA and an audit record, and the graph cannot traverse past it without a decision artifact.

GateFlowTriggerPayload to the humanNon-removable because
Pre-exploitationB (systems)Any action against a live system that could be observed as an attackTarget, blast radius, abort conditions, SecOps pre-notification statusAn exploit-capable system acting unannounced is indistinguishable from an intrusion
Pre-mergeA (code)Any change to a repositoryDiff, test result, evidence bundle, what the validator tried and failed to breakA model that writes the fix cannot be the sole judge that the fix is correct
Pre-changeB, CAny mutation of a live system or configurationChange plan, risk assessment, rollback, conformance impactBlast radius on live infrastructure is not recoverable by revert alone
EscalationAllConfusion, contradiction, or budget exhaustionThe disagreement itself, both positions, what evidence would settle itAn agent that cannot decide must surface that, not pick

Escalation deserves particular attention because it is the gate most often omitted. The harness must be able to say I do not know, and must have somewhere to send that. The trigger conditions are concrete: two agents reach contradictory verdicts on the same claim; an agent's confidence falls below threshold on a high-severity finding; the loop governor exhausts a budget; a tool returns a result the schema cannot parse; or an evidence tier cannot be established at the level the severity requires. Each produces a structured escalation carrying both positions and, critically, a statement of what evidence would resolve it — which is what makes the human's job tractable rather than a re-adjudication from scratch.


4. Source code: discovery to verified remediation

Source Code: Discovery to Verified Remediationprocess decomposition: source code through remediation to post-fix validationHARNESS TRUST BOUNDARYSource repositorytarget code,read-onlyEngineering approverhuman approval gateA1.0 Repositoryingestclone, enumerateA2.0 Seed &call-graphstatic analysisA3.0 Hypothesisgen.recall-tunedfinderA4.0 Adversarialvalid.fresh contextCode graphcall paths, seedsFindings storehyp. → verdict → statusA5.0 Exploitproofsandboxed,isolatedA6.0 Fixgenerationon a branch, noshellA7.0 Post-deploy scanre-tests after mergeEvidence storeexploit proof artifactsLearning signalpost-deploy outcomesread-only pullfileswritegraph readclaimlogupdateacceptedwriteevidencefix PRapproved: merge to mainclosed-verified / still-presentoutcomeevery hypothesis is disproved-by-default until the validator fails to break itpost-deploy validation is what turns a merged diff into a verified fix
Level 1 decomposition of Flow A: source code moves through seven numbered processes from repository ingest to a post-deploy validation scan. The findings store is written twice on the way out — once as an unverified hypothesis, once as an adversarially checked verdict — and a third time when the post-deploy scan closes the loop with closed-verified or still-present. Nothing merges without the engineering approver sitting outside the trust boundary.
Source Code: Agent Detail and Handoffper-agent reads/writes/limits, the handoff envelope, and the two exits from validationFINDERrecall-tuned,over-reportsreads: code graph,call paths, seedswrites: hypothesis +confidence + evidencepointersHARD LIMITnever assertscertainty — outputis a hypothesis, nota findingVALIDATORadversarial, freshcontextreads: the hypothesisonly, not the finder'sreasoningwrites: falsificationattempt + verdictHARD LIMITmust try to disprovebefore it mayconfirmEXPLOIT-PROVERattempts exploitationreads: confirmedhypothesis + sandboxtarget copywrites: exploitevidence ornon-reproductionrecordHARD LIMITsandbox only — noshell to prod, noegressFIXERsmallest viablechangereads: confirmedfinding + exploitevidencewrites: diff + test,opened on a branchHARD LIMITno shell access,cannot merge, cannotself-approveHITL GATEengineering approverreads: diff + evidencebundlewrites: approve orreject decisionHARD LIMITnon-removable,only a human mayapprovePOST-FIX VALIDATORre-tests after deployreads: the livesystem, post-mergewrites:closed-verified orstill-present verdictHARD LIMITnever records anunverifiable resultas closedHANDOFF ENVELOPE — what travels between every agent pairthe Finder → Validator hop is where a hedge most easily becomes a premiseTrust leveltarget-derived contentstays untrustedCertaintya hypothesis stays ahypothesis, never apremiseProvenancewhich agent, whichevidence, which modelPayloadclaim + evidence, notthe sender's reasoningSTILL PRESENTfix did not hold;reopensCLOSEDVERIFIEDconfirmed againstlive systemnot fixedverifiedreopens as a NEW hypothesis, not the old premise
Level 2 view of the same flow, one lane per agent, each showing what it reads, what it writes, and the one thing it is not allowed to do. The handoff envelope band underneath is what actually travels between every pair of agents, and the callout marks the Finder-to-Validator hop as the place a hedge most easily turns into a fact if the envelope is not enforced. The HITL gate sits as its own lane rather than a side note, and post-fix validation ends in exactly two states: closed-verified, or still-present — which reopens as a new hypothesis rather than reviving the old one.

The code flow is the one with the most forgiving failure mode and the most subtle correctness problem. Forgiving, because a wrong fix is caught by tests and review before it reaches production. Subtle, because the finder is deliberately tuned for recall and will therefore produce a majority of claims that are wrong, which places the entire burden of precision on the validator.

The hard limits are the design. The finder never asserts certainty, so its output is structurally a hypothesis. The validator never sees the finder's reasoning, so it cannot be persuaded by an argument it did not construct. The exploit-prover runs only in a sandbox, so a proof attempt cannot become an incident. The fixer has no shell and cannot merge, so the worst outcome of a bad fix is a rejected pull request. The post-fix validator cannot record an unverifiable result as closed, so the pipeline cannot quietly conclude in its own favour.

The loop back from still-present reopens as a new hypothesis, not as the old premise. This matters more than it appears: carrying the original claim forward would mean the second attempt inherits the first attempt's conclusion, and the validator would be asked to disprove something it has already accepted once.


5. Running systems: discovery to verified remediation

Running Systems: Discovery to Verified Remediationprocess decomposition: authorised scope through exploit validation to verified remediationHARNESS TRUST BOUNDARYCMDBscope + ownershipsourceUpstream vendorcannot-fix disclosureChange approverhuman approval gateSecOpspre-notified beforeexploitB1.0 Scopeintakeauthorisedranges, from CMDBB2.0 Discovery &fingerprintinghosts, ports,servicesB3.0 CorrelationVM / EDR / CSPMsignalB4.0 Exploithypothesiscandidate +rationaleAsset inventoryhosts, services, versionsB5.0 Sandboxedexploit attemptexplicit approvalrequiredB6.0 Patch /compensatingcontrolplan theremediationB7.0 Re-scan &re-validationconfirms closurepost-applyExploit evidenceproof-of-exploit artifactsPatch stateplan → apply → verifyLearning signalre-validation outcomesauthorised scopetargetswriteinventory readsignalpre-notify SOCapproved: beginwriteconfirmedplancannot-fix disclosurechange requestapproved: applyclosed-verified / still-presentoutcomea system that is exploit-capable but does not pre-notify its own SOC is handled as an intrusionnothing is patched or accepted as fixed without a human approval gate and a post-apply re-scan
Level 1 decomposition of Flow B: an authorised scope from the CMDB moves through seven numbered processes — discovery, correlation against existing VM/EDR/CSPM signal, an exploit hypothesis, a sandboxed exploit attempt, a patch or compensating-control plan, and a post-apply re-scan. SecOps is pre-notified before any exploit attempt begins; a system that skips that notification is indistinguishable from an intrusion and gets treated as one. Nothing reaches patch state as verified without a human change approver sitting outside the trust boundary and a re-scan that confirms the fix actually held.
Running Systems: Authorisation and Blast Radiusper-agent reads/writes/limits, the authorisation chain, and the four exits from re-validationDISCOVERYenumerates livesystemsreads: authorisedIP ranges, CMDBscopewrites: assetinventory +servicefingerprintsHARD LIMITnever scansoutside thetarget allowlistCORRELATIONfuses existingsignalreads: assetinventory, VM /EDR / CSPM feedswrites: correlatedrisk signal +exploit hypothesisHARD LIMITnever assertsexploitabilitywithout ahypothesisHITL GATE 1pre-exploitationapproverreads: hypothesis+ blast-radiusplanwrites: approve orreject, time-boxedwindowHARD LIMITnon-removable,only a human mayauthorise liveexploitationEXPLOIT AGENTattemptsexploitationreads: hypothesis,scope token,allowlistwrites: exploitevidence ornon-reproductionrecordHARD LIMITno destructiveverbs,rate-limited,sandbox onlyFIX AGENTplans theremediationreads: confirmedexploit evidencewrites: patch orcompensating-controlplanHARD LIMITno directproduction writeaccess, openschange requestonlyHITL GATE 2pre-changeapproverreads: patch plan+ risk assessmentwrites: approve orreject the changeHARD LIMITnon-removable,only a human mayauthorise a livechangeRE-VALIDATIONre-tests afterapplyreads: the livesystem,post-changewrites:closed-verified /still-present /regressed /inconclusiveHARD LIMITnever records anunverifiableresult as closedSTILL PRESENTfix did not holdREGRESSEDclosed, then reopenedINCONCLUSIVEescalates for manual reviewCLOSED — VERIFIEDconfirmed against live systemnot fixedreopenedno signalverifiedreopens as a NEW remediation attempt, not the old planAUTHORISATION AND BLAST-RADIUS ENVELOPE — what bounds every live action abovethe touch-live-systems difference from the code flow: no agent above holds standing accessScope tokentarget-derived, minted perjob, never heldTime-boxed windowexpires; no standing accessafter the window closesTarget allowlistexact hosts / ranges only,nothing adjacentRate limitsthrottled request rate, nodestructive verbsAbort conditionsauto-stop triggers halt therun mid-action
Level 2 view of Flow B, one lane per agent, each showing what it reads, what it writes, and the one thing it may not do. This is where the flow diverges from code review: every agent below acts on a live system, so the envelope underneath the lanes is not a data handoff but an authorisation and blast-radius boundary — a scope token, a time-boxed window, a target allowlist, a rate limit, and an abort condition, none of which the agent holds standing. Two HITL gates sit as their own lanes, one before exploitation and one before the change is applied, and re-validation ends in four states rather than two: closed-verified, still present, regressed, or inconclusive — the last of which escalates rather than guessing, and the first two reopen as a new remediation attempt rather than reviving the old plan.

The infrastructure flow differs from the code flow in one respect that changes everything downstream: it touches live systems. Every control that follows exists because of that.

Authorisation is explicit and bounded. Scope comes from the CMDB rather than from discovery, so the harness cannot expand its own remit by finding something interesting adjacent to its target. The scope token is minted per job, names an exact allowlist, and expires. Nothing adjacent is in scope by virtue of being reachable.

Blast radius is bounded by construction. Rate limits, no destructive verbs, and abort conditions that halt a run mid-action. These are enforced outside the agent, because an agent that can disable its own throttle does not have one.

SecOps is pre-notified, and this is not a courtesy. An exploit-capable system operating inside the estate without the security operations team knowing will be detected as an intrusion, and correctly so. The pre-notification path is drawn as a first-class flow because omitting it produces a predictable and expensive incident.

Two gates rather than one. Approval before exploitation and approval before change application are different decisions with different risk profiles and often different approvers. Collapsing them into a single sign-off means whoever approves the exploit has implicitly approved the remediation, which is not what they were asked.

The four re-validation exits carry more weight here than in the code flow, because inconclusive on live infrastructure is common and legitimate. A host that was unreachable during the re-scan has not been verified.


6. Configuration: drift to verified conformance

Configuration: Drift to Verified Conformanceprocess decomposition: config ingest through drift and policy evaluation to a verified re-checkHARNESS TRUST BOUNDARYIaC repositorysource of declaredstateCloud controlplanelive resources,apply targetCSPMexistingposturesignalPlatform ownerapproves the IaC changeC1.0ConfigurationingestIaC + live state+ platformsettingsC2.0 Driftdetectiondeclared vs.actualC3.0 Policyevaluationdeterministic,rule-basedC4.0 AIreasoningonly theundecidableresidueDeclared statefrom IaC sourceObserved statefrom cloud APIsPolicy setrules, thresholdsC5.0Exploitabilityin contextblast radius,what's reachableC6.0 Remediationproposed as anIaC changeC7.0 Conformancere-checkre-evaluate after applyConformance historypass/fail over timeread-only pulldescribe / list APIsboth statesdrift reportresiduewritewriteposture signalrules readcontextdecided:skip AIassessedchange PRapproved: applyoutcomemost drift is decided by rule, not by the model — the AI reasons only about what the rules leave opennothing is applied to a live console; the only output of remediation is a proposed IaC change
Level 1 decomposition of Flow C: declared and observed configuration state are diffed for drift, then run through deterministic policy evaluation. Most violations are decided by rule and route directly to remediation; only the residue that policy cannot decide goes to AI reasoning and a context-and-blast-radius assessment before the two paths rejoin at remediation. Remediation is always a proposed IaC change, never a live edit, and nothing is treated as fixed until the platform owner approves it and the post-apply re-check confirms conformance.
Configuration: Agent Detail and the Deterministic Splitper-agent reads/writes/limits, the deterministic short-circuit, and the four exits from re-checkINGESTpulls declared +observed statereads: IaC source,cloud control-planeAPIs, platformsettingswrites: declaredstate + observedstate + driftreportHARD LIMITread-only againstthe cloud controlplane, nevermutatesPOLICY ENGINEdeterministic ruleevaluationreads: driftreport, policy setwrites: pass / fail/ undecidable percontrolHARD LIMITshort-circuits theAI entirely foranything a rulecan decideAI REASONINGresidue only, addscontextreads: undecidablecontrols, assetcontext, CSPMsignalwrites: reasonedassessment +confidenceHARD LIMITnever overrides adeterministicverdict, it onlyfills the gapsEXPLOIT CONTEXTblast-radius incontextreads: reasonedassessment, whatthe resource holdswrites:exploitabilityverdictreachable andconsequential, ornotHARD LIMITan open controlwith nothingbehind it is notescalatedREMEDIATIONAGENTsmallest viableIaC changereads: confirmedfinding, eitherpathwrites: diff +change PR, openedon a branchHARD LIMITnever applies to alive consoleoutput is code,alwaysHITL GATEplatform ownerapprovalreads: diff +assessmentwrites: approve orreject decisionHARD LIMITnon-removable,only a human mayauthorise applyRE-CHECKre-evaluates afterapplyreads: the livesystem, post-applywrites: conformant/ still-drifted /regressed /inconclusiveHARD LIMITnever records anunverifiableresult asconformantrule decides — skip AI and exploit-context entirelySTILL DRIFTEDchange did not converge stateREGRESSEDconformant, then drifted againINCONCLUSIVEescalates for manual reviewCONFORMANTconfirmed against live statenot convergedreopenedno signalverifiedre-enters at REMEDIATION AGENT as a process failure, not a new findingDRIFT-LOOP HANDLING — referenceif the live state diverges again after remediation, that is a process failure — the change did nothold, the drift-detection rule did not tighten, or an out-of-band edit reverted it — and it ishandled by the loop-back above, not by opening a newly triaged finding
Level 2 view of Flow C, one lane per agent. The dashed green line above the lanes is the point that matters most: when the policy engine's rules can decide a control outright, the run skips AI reasoning and exploit-context assessment entirely and goes straight to the remediation agent, which can only ever write a proposed IaC diff, never touch the live console. Re-drift after a fix is handled as a process failure — routed straight back to the remediation agent rather than re-triaged as a new finding — and re-check itself ends in four states: conformant, still drifted, regressed, or inconclusive, the last of which escalates instead of guessing.

The configuration flow makes a point the other two do not: most of this does not need a model at all.

Drift between declared and observed state is a deterministic comparison. Whether a control satisfies a policy is a rule evaluation. Both are cheaper, faster, fully reproducible and impossible to hallucinate. The policy engine therefore short-circuits the AI entirely for anything a rule can decide, and the diagram draws that as a visible bypass rather than burying it.

The AI is for the residue, and the residue is genuinely hard. A publicly readable bucket is a finding or a non-event depending on what is in it, who can reach it, and what else must be true for it to matter. That is context and blast radius, which is exactly what rules are bad at and reasoning is good at. Scoping the model to the residue makes the cost profile sane and makes the AI's contribution auditable: if the rule decided, the model was not consulted, and the lineage says so.

Remediation is proposed as code, never applied to a console. The output of the remediation agent is an infrastructure-as-code change on a branch. A console edit fixes the symptom and guarantees the drift returns on the next apply, so a harness that edits live configuration is manufacturing its own future findings.

Recurrent drift is a process failure, not a new finding. If the live state diverges again after remediation, one of three things is true: the change did not hold, the drift rule did not tighten, or an out-of-band edit reverted it. None of those is a newly discovered vulnerability, and triaging it as one inflates the finding count while hiding the actual problem.


7. What this design does not solve

Stating the limits is part of the design.

A single-vendor estate constrains validator independence. The strongest hallucination control is a validator that does not share the finder's failure modes, which in practice means a different model family. An organisation standardised on one provider gets a weaker version of this control, and should know that rather than assume the architecture compensates.

The evidence ladder has a soft bottom rung. T1 executable proof and T2 deterministic static assertion are strong. T4, human-confirmed, is a judgement, and judgement under volume degrades. The cap on T4 findings is a real constraint that will be uncomfortable when a scan produces more findings than the cap allows, and the correct response is to improve evidence generation rather than raise the cap.

Post-remediation validation inherits the coverage of whatever performs it. A closed-verified result means the re-test did not find the issue, which is a statement about the re-test as much as about the fix.

Cost per true positive is only meaningful once the true-positive rate is stable. Early in a deployment the denominator moves for reasons unrelated to model performance, and reading model quality from that ratio too early will produce confident conclusions from noise.