You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/loop-engineering.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,7 +183,9 @@ Each loop writes a durable iteration directory:
183
183
decision.json
184
184
```
185
185
186
-
`iteration.json` is the stable directory index. `executor.result.json` records the executor command, exit code, hashes, changed files, and normalized event summary. `trace.json` is a schema wrapper around the normalized execution trace and trusted evidence summary. `guard.findings.json` normalizes policy, hallucination, and regression findings into one `GuardFinding` schema. `guard.gates.json` turns Guard findings into blocking conditions and required actions. `decision.json` records the selected action with priority, confidence, blocking status, input signals, and convergence state.
186
+
`iteration.json` is the stable directory index. `executor.result.json` records the executor command, exit code, hashes, changed files, and normalized event summary. `trace.json` is a schema wrapper around the normalized execution trace and trusted evidence summary. `guard.findings.json` normalizes policy, hallucination, and regression findings into one `GuardFinding` schema. `guard.gates.json` turns Guard findings into blocking conditions and required actions. `decision.json` records the selected action with priority, confidence, blocking status, input signals, convergence state, and decision arbitration details.
187
+
188
+
Decision arbitration converts executor failures, forbidden policy findings, every blocking Guard Gate, blocking Loop decisions, missing required policy evidence, and risk signals into normalized candidates. Candidates are sorted by the shared action priority (`rollback`, `block`, `repack`, `repair`, `run-tests`, `human-review`, `finalize`), then confidence and stable candidate ID. The highest-priority candidate supplies the action; all remaining candidates stay visible as supporting blockers and contribute deduplicated commands and artifacts. Reordering Guard Gates therefore cannot change the selected decision.
187
189
188
190
`executor.events.jsonl` stores normalized `AgentEvent` records. OpenCode currently supports `opencode run --format json` stdout, optional transcript files, and generic stdout/stderr fallback; later executor adapters can produce the same event model for MiMoCode, Codex, Claude Code, and Cursor.
Copy file name to clipboardExpand all lines: docs/developer/guard-gate-schema.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,4 +37,10 @@ interface GuardGate {
37
37
}
38
38
```
39
39
40
-
Gates feed the orchestrator decision router, which writes a decision report such as `finalize`, `repair`, `repack`, `block`, `rollback`, or `require-human-review`.
40
+
Gates, executor failures, policy findings, Loop decisions, and risk signals are normalized into `HarnessDecisionCandidate` records before arbitration. Candidate ordering is deterministic and uses the shared action priority:
The highest-priority candidate becomes the selected action. Remaining candidates are retained as supporting candidates; their reasons, required commands, and artifacts are merged into the final decision with stable deduplication. `decision.json` and the orchestrator Markdown report record the selected candidate, selected priority, and supporting candidates, so the result does not depend on Guard Gate array order.
0 commit comments