# Evidence-bound adjudication

`adjudicate` resolves a genuine decision impasse. It does not replace normal
engineering judgment. It creates a small, tools-free decision environment. It
then runs independent constituent assessments through a dedicated
`full_sub_agent` process profile and sends their validated findings to a final
judge.

The tool separates three things:

1. Evidence is part of the caller-supplied admissible record.
2. Arguments are claims about that evidence. Arguments are not evidence.
3. Constituent findings are analysis. Agreement between constituents does not
   create a new fact.

The host validates all identifiers, citations, panel results, and the verdict.
The tool holds the case when it cannot validate the required quorum or final
contract. It does not guess a result.

## Clean-context purpose

The main agent context can contain old plans, persuasive language, stale
assumptions, and momentum from work that happened before the current decision.
`adjudicate` does not pass that transcript into the panel. The parent must first
freeze one explicit admissible record. The record can name explicit exclusions
and has a host-enforced deadline. Each constituent starts in a fresh
context and receives only its assignment, the relevant record subset, and the
decision rules. The judge receives the immutable record and validated public
findings. It does not receive the parent's accumulated narrative.

This boundary reduces anchoring and accidental context contamination. It does
not guarantee an unbiased decision. Record selection, question framing,
decision rules, and model behavior can still influence the result. The receipt
makes those inputs, exclusions, validation failures, findings, and dissent
auditable instead of hiding them in the parent context.

## Availability

`adjudicate` is an agent-bound tool in each top-level full-agent path:

| Surface | Execution | Progress projection |
| --- | --- | --- |
| Interactive `omnius` TUI | Yes | Specialized streamed adjudication block |
| One-shot `omnius "<task>"` | Yes | Ordinary tool events and final result |
| `POST /v1/run` | Yes, subject to the selected tool profile | Run events and final result |
| Default full-agent `POST /v1/chat` | Yes, subject to the selected tool profile | Chat/run events and final result |

The tool itself is intentionally unavailable to child agents. This prevents
nested panels, recursive terminal projections, and unbounded inference fan-out.
Each constituent uses a host-selected `full_sub_agent` execution profile. This
profile enters before the normal CLI runner starts. It accepts one bounded JSON
contract over stdin and makes one request with `tools: []`, `think: false`, and
temperature 0. It does not load the project prompt, parent narrative, memory,
skills, normal child tool registry, or writable capabilities. The profile is an
internal host interface. A model cannot select it through `full_sub_agent`.
The child runs from the operating-system temporary directory. It does not
receive the project path or ambient parent environment. The host passes only
the selected backend address, model, provider protocol, and transport secret.

The daemon direct-tool registry, `/v1/chat/completions` bounded mini-loop,
Telegram runners, and voice-call runners do not expose the native tool. Do not
infer `GET /v1/tools/adjudicate` or
`POST /v1/tools/adjudicate/call` from the tool name. A caller-supplied OpenAI
tool with the same name is not the native Omnius implementation. Use
`omnius show tool.adjudicate` for the static discovery contract.

## When to use it

Use `adjudicate` when all of these conditions are true:

- The active task has one exact, unresolved decision.
- Two or more outcomes remain materially plausible.
- The decision affects the next action.
- The available evidence conflicts or supports different risk tradeoffs.
- A fresh, evidence-scoped context can assess the decision more reliably than the
  main loop's large working context.

Do not use it for an ordinary implementation choice, a factual lookup, or a
way to avoid gathering missing evidence.

## Minimum call

```json
{
  "question": "Should the failed release be rolled back or repaired in place?",
  "allowedOutcomes": ["rollback", "repair_in_place"],
  "evidence": [
    {
      "id": "E1",
      "kind": "test_result",
      "source": "integration run 2026-08-31T18:00:00Z",
      "content": "The post-deploy integration suite failed 14 of 80 tests."
    },
    {
      "id": "E2",
      "kind": "artifact",
      "source": "release receipt sha256:abc",
      "content": "The prior artifact matches the last known-good receipt."
    }
  ]
}
```

The case framer derives three distinct constituent assignments by default. Set
`panelSize` from 2 through 6 to change that count.

## Detailed call

```json
{
  "caseId": "release-impasse-2026-08-31",
  "question": "Should the failed release be rolled back or repaired in place?",
  "context": "The release is paused. No mutation is authorized during this decision.",
  "exclusions": ["Unverified claims from the parent transcript"],
  "allowedOutcomes": ["rollback", "repair_in_place"],
  "burdenOfProof": "clear_and_convincing",
  "decisionRules": [
    "Prefer verified recovery evidence.",
    "Do not infer a successful recovery from panel agreement."
  ],
  "evidence": [
    {
      "id": "E1",
      "kind": "test_result",
      "source": "integration run 2026-08-31T18:00:00Z",
      "content": "The post-deploy integration suite failed 14 of 80 tests.",
      "reliability": 0.98
    },
    {
      "id": "E2",
      "kind": "artifact",
      "source": "release receipt sha256:abc",
      "content": "The prior artifact matches the last known-good receipt."
    },
    {
      "id": "E3",
      "kind": "observation",
      "source": "operations log",
      "content": "No rollback rehearsal exists for the new migration."
    }
  ],
  "arguments": [
    {
      "id": "A1",
      "position": "rollback",
      "claim": "The known-good artifact makes rollback more reversible.",
      "citedEvidenceIds": ["E1", "E2"]
    },
    {
      "id": "A2",
      "position": "repair_in_place",
      "claim": "Rollback has untested migration risk.",
      "citedEvidenceIds": ["E3"]
    }
  ],
  "constituents": [
    {
      "id": "correctness",
      "label": "Correctness",
      "question": "Which outcome is best supported by functional evidence?",
      "evidenceIds": ["E1", "E2"],
      "argumentIds": ["A1"],
      "decisionRuleIds": ["rule-1", "rule-2"]
    },
    {
      "id": "reversibility",
      "label": "Reversibility",
      "question": "Which outcome has the safest verified recovery path?",
      "evidenceIds": ["E2", "E3"],
      "argumentIds": ["A1", "A2"],
      "decisionRuleIds": ["rule-1", "rule-2"]
    },
    {
      "id": "risk",
      "label": "Operational risk",
      "question": "What unsupported risk remains for each outcome?",
      "evidenceIds": ["E1", "E3"],
      "argumentIds": ["A2"],
      "decisionRuleIds": ["rule-1", "rule-2"]
    }
  ],
  "quorum": 2,
  "maxConcurrency": 3,
  "constituentExecution": "auto",
  "timeoutMs": 120000,
  "maxTokensPerConstituent": 2048,
  "maxJudgeTokens": 3072
}
```

`insufficient_evidence` is a reserved verdict. Do not include it in
`allowedOutcomes`. The host makes it available to constituents and the judge.
It produces a held case instead of a binding decision.

## Execution phases

### 1. Record admission

The host validates the input before inference. It rejects duplicate IDs,
unknown citations, invalid outcome names, incomplete manual assignment
coverage, and a quorum that exceeds the panel size.

The host creates a canonical case record and SHA-256 record hash.

### 2. Case framing

If the caller omits `constituents`, a tools-free case framer creates 2 through
6 assignments. Each assignment has a distinct question and an explicit subset
of evidence, arguments, and decision rules.

The host rejects unknown IDs and incomplete evidence coverage. It retries one
time with validation codes only. The invalid model output is not added to the
repair prompt. If both planner responses have JSON or schema drift, the host
creates a deterministic evidence-covering assignment plan. This fallback only
frames independent questions. It does not select an outcome or add evidence.
Backend failures and an expired case deadline do not activate the fallback.

Planner, constituent, and judge requests use strict provider JSON Schemas.
When a visible response still fails host validation, the receipt retains
bounded field-level issue codes, a response hash, and a content-free top-level
shape summary. It does not retain the rejected response body.

### 3. Constituent fan-out

The host runs assignments with bounded concurrency. Each constituent gets a
fresh context that contains only:

- the exact case question and allowed outcomes;
- the stated burden;
- its assignment;
- its assigned decision rules;
- its assigned evidence;
- its assigned arguments.

The constituent gets no tools. It has no mutation authority. It must return a
public assessment, a recommendation, confidence, cited evidence IDs, claims,
counterarguments, and uncertainties.

`constituentExecution` accepts three host-validated values:

- `auto` is the safe default. A top-level runtime uses the dedicated
  `full_sub_agent` profile when it is wired. Library callers without that
  executor use the bounded direct path.
- `full_sub_agent` requests the process-isolated profile. If the profile cannot
  start for an ordinary transport reason, the host records the failure and
  falls back once to the bounded direct path.
- `direct` skips the child process and uses the bounded direct path.

Cancellation or deadline expiry never activates direct fallback. The host
terminates active child processes, records the failure, and holds the case when
quorum cannot be met. Each validated finding records `executionProfile` and,
for a child process, its `executionId`. These fields are included in the
finding hash and durable constituent artifact.

The child profile rejects extra request fields that could smuggle tools,
memory, or a working directory. It also rejects a structured tool call emitted
by a backend despite the empty tool list. The host rejects unassigned
citations, unknown outcomes, identity mismatches, and invalid schemas. One
strict repair attempt is allowed. A host deadline also bounds a backend or
child process that does not return. Deadline expiry holds the case.

### 4. Quorum

The default quorum is two thirds of the requested panel, rounded up, with a
minimum of two. A caller can set a stricter quorum.

The tool holds the case if too few findings pass host validation. It does not
invoke the judge without quorum.

### 5. Judge synthesis

The judge gets the immutable full case record and validated constituent
findings. The prompt labels findings as analysis rather than evidence.

The judge must:

- apply the burden and decision rules;
- cite only admitted evidence IDs;
- consider every validated constituent;
- accept or reject every constituent finding exactly once;
- preserve each constituent recommendation that conflicts with the verdict as
  material dissent;
- select an allowed outcome or `insufficient_evidence`.

The host validates this contract. It holds the case after two invalid judge
responses.

### 6. Durable receipt

Artifacts are written atomically under:

```text
.omnius/adjudications/<case-id>/run-<timestamp>/
  case.json
  assignments.json
  findings.json
  constituents/
    <constituent-id>-<hash>.json
  verdict.json
  receipt.json
```

`verdict.json` is absent when the case holds before a valid verdict. The
receipt records hashes, quorum, validation failures, elapsed time, and final
status. `verifyAdjudicationReplay(receiptPath)` re-opens these artifacts and
checks the case, finding, verdict, and receipt hash bindings without inference.

## CLI display

The CLI opens one live block when record admission starts. It shows:

- case identity and decision question;
- record size, burden, and allowed outcomes;
- constituent assignments;
- separately attributed public assessment streams;
- host validation results;
- the judge's public rationale stream;
- final verdict, citations, status, and receipt path.

The block has a `read mode` row. Select it to expand all retained rows. The
display retains a bounded amount of text. It strips terminal controls and uses
the normal secret redactor. It does not display provider hidden reasoning.

## Harness

Run the deterministic impasse harness:

```bash
pnpm harness:adjudication
```

The harness does not load a model and does not use a GPU. It verifies parallel
constituent overlap, streamed public assessments, judge synthesis, and receipt
persistence. The focused automated tests also cover invalid citations, strict
repair, deterministic planner fallback, conflicting recommendations and
dissent, deadline expiry, partial valid quorum, automatic case framing,
artifact replay, and no-judge behavior when quorum fails.
Process-profile tests use real child processes without live inference. They
prove concurrent scoped constituents, no parent-context bleed, no tool or
mutation authority, cancellation and deadline termination, bounded direct
fallback, recombination, and persisted execution identity.

The implementation lives in
`packages/orchestrator/src/adjudication.ts`. The full-sub-agent process
transport lives in `packages/execution/src/tools/full-sub-agent.ts`. The hidden
tools-free entrypoint lives in
`packages/cli/src/commands/adjudication-constituent.ts`. The live projection
lives in `packages/cli/src/tui/adjudication-live-block.ts`.
