Local Feedback Loop (normative)
April 30, 2026 · View on GitHub
This document is the single operator-facing source of truth for the canonical local command:
agentskeptic loop --workflow-id <id> --events <path> --registry <path> (--db <sqlitePath> | --postgres-url <url>)
Purpose
agentskeptic loop is the default local path to get an immediate decision-grade trust verdict on real database state with historical context.
Hosted commercial posture (lifecycle states, rerun gates, procedural accept semantics) lives in docs/outcome-certificate-normative.md — Hosted enforcement lifecycle (verification FSM) — not here.
It always does all of the following in one run:
- verifies against the target database,
- emits normalized verdict output,
- emits contextual next action for non-trusted outcomes,
- persists run artifacts and updates local run history,
- auto-compares against the latest compatible prior run.
Terminal contract
loop emits exactly this section order on stdout:
VERDICT: TRUSTED|NOT TRUSTED|UNKNOWNWHY: <single concise rationale>LOCAL_REGRESSION_COMPARE: <no_anchor|summary>NEXT_ACTION: <single actionable step>(required forNOT TRUSTEDandUNKNOWN; omitted forTRUSTED)RUN_REF: <capturedAt workflowId path>
Exit codes:
0: TRUSTED1: NOT TRUSTED2: UNKNOWN (verification completed but state not established / incomplete)3: operational failure (stderr carries one JSON error envelope; stdout still carries UNKNOWN contract block)
Local run history contract
loop persists run history under:
~/.agentskeptic/runs/index.json- one run directory per execution containing:
events.ndjsonworkflow-result.jsonoutcome-certificate.json
Index schema:
schemaVersion: 1runs[]entries withworkflowId,capturedAt,runDir,workflowResultPath,eventsPath,outcomeCertificatePath
User-facing invariants:
- every run is traceable by
(workflowId, capturedAt, artifact path), - compare baseline selection is “latest compatible prior run” for the same
workflowId, - history is bounded by
--max-history-runs(default100).
Compatibility and scope
quick,crossing, andverify-integrator-ownedremain supported for specialized workflows and backward compatibility.- Normalized trust verdict output is canonical on
looponly. - Advanced trend analysis, watch mode, and policy workflows are out of scope for this contract.