---
name: ram-stop
description: Route an operator halt request to the Warrant & Saturation Governor (S6). This is NOT a stopping authority. S6 evaluates the three gates and returns either STOP (only if all three closed) or CONTINUE with open-gate rationale.
---

# /ram-stop

## Purpose

Operators sometimes want a running inquiry to halt -- because they believe it has run long enough, because external deadlines have shifted, because they have changed their mind about scope, or because they are impatient.

**None of those are valid stopping criteria.** Warrant-based stopping is non-negotiable. S6 is the only component that emits STOP, and only when all three gates are CLOSED.

This command exists to allow operators to formally signal a halt REQUEST. The router packages the request and routes it to S6. S6 re-evaluates. The operator receives whatever verdict S6 emits.

**`/ram-stop` is never authoritative. It is always advisory.**

## Argument Grammar

```
/ram-stop <inquiry_id> [--reason <string>]
```

**Positional:**
- `<inquiry_id>` -- required. The UUID of a currently-running RAM inquiry.

**Named (optional):**
- `--reason <string>` -- optional free-text reason. Logged to the Ledger as `operator_halt_request.reason` and MAY be consulted by S6 as a scope-amendment trigger (for example, if the operator's reason indicates the scope envelope was wrong). NEVER used as a stopping criterion on its own.

**Rejected argument patterns:**
- `--force` -- REJECTED. There is no force-stop. The router declines with an anti-sycophancy note explaining that stopping is warrant-based.
- `--authority operator` -- REJECTED. Operator authority covers Charter authorship and amendment, not stopping authorization.
- `--bypass-s6` -- REJECTED. S6 bypass is a Librarian-regression.

## Parser

```
parse(command):
  first token == "/ram-stop" -> proceed
  consume positional <inquiry_id> (must be a valid UUID in the active-runs registry)
  consume optional --reason <string>
  reject any other flag with anti-sycophancy rejection

validate:
  assert inquiry_id resolves to an active run in state/ram/
  if not: emit "inquiry_id not found or run already closed"; halt
```

## Router behavior on receipt

1. Write `operator_halt_request` event to the run's Search Ledger. Payload: `{inquiry_id, requested_at, reason}`.
2. Invoke S6 with `request_kind = "operator-halt-request"` and the current snapshot of (Charter, yield trace, adversarial verdicts, Surprise Register, Ledger).
3. S6 evaluates the three gates.
4. Route S6's verdict back to the operator:
   - **If `verdict: STOP`:** The run proceeds to Phase 6 (S4 render + Evaluator handoff). The operator receives the artifact reference when render completes. Note: this means S6 was going to emit STOP soon anyway; `/ram-stop` did not cause the stop, it merely triggered the evaluation.
   - **If `verdict: CONTINUE`:** The operator receives the open-gate rationale:
     ```
     S6 verdict: CONTINUE
     Open gates:
       - yield: <per-claim posterior probabilities / directive>
       - scope: <pending amendments>
       - contradiction: <sub-inquiry statuses>
     RAM continues under the Charter. Re-invoke /ram-stop at a later time; the Governor will re-evaluate.
     ```
5. Do NOT halt the pipeline on a CONTINUE verdict. The operator cannot force-close.

## Operator-reason special case (scope amendment hint)

If the operator's `--reason` text indicates the Charter scope is wrong (for example, "we actually only care about US data" or "the time window should be post-2020 only"), S6 MAY classify this as a scope-drift input and route a `CHARTER_AMENDMENT_REQUEST` to the Surprise Register. The amendment then routes back through S5 (Claim-Typing Engine) for operator confirmation. S5 emits a revised Charter; the run resumes under the revised envelope.

This is the ONLY path through which `/ram-stop` can materially change run behavior. It does NOT close the run; it narrows the Charter (subject to S5 + operator confirmation).

## Example A -- contradictions open

```
/ram-stop inq_01HXY2J7ABCD --reason "I've seen enough data."
```

Router invokes S6. S6 finds:
- yield gate: CLOSED at alpha=0.05.
- scope gate: CLOSED; no drift events.
- contradiction gate: OPEN; `sub_002` (claim `clm_002` vs `clm_007`) still open.

S6 emits CONTINUE. Operator receives:
```
S6 verdict: CONTINUE
Open gate: contradiction
  sub_002: claim clm_002 contradicts clm_007; adversarial pass is still saturating the disturbed region.
RAM continues. /ram-stop will re-evaluate on your next invocation.
```

## Example B -- all three gates closed

```
/ram-stop inq_01HXY2J7ABCD
```

Router invokes S6. S6 finds all three gates CLOSED. S6 emits STOP. Router proceeds to Phase 6, S4 renders, artifact drops to bridge, operator receives artifact reference.

Note: S6 would have emitted STOP on its next regular invocation anyway. `/ram-stop` only accelerated the evaluation.

## Example C -- operator-reason triggers amendment

```
/ram-stop inq_01HXY2J7ABCD --reason "I realize now we only care about US workplaces post-2020."
```

Router invokes S6 with the operator reason. S6 classifies the reason as a scope-amendment signal and writes a `CHARTER_AMENDMENT_REQUEST` to the Surprise Register:
```
pending_amendment:
  proposed_envelope: {geography: US-only, time_window: [2020, present]}
  source: operator-halt-request
```

S6 emits CONTINUE with `open_reasons: [{gate: scope, directive: "awaiting operator confirmation of amendment"}]`.

The operator is prompted to confirm the amendment. On confirmation, S5 revises the Charter and the run resumes under the narrower envelope (which typically closes the yield gate quickly since the enlarged envelope's un-examined claims drop out).

## Failure modes

| Failure | Router response |
|---|---|
| `inquiry_id` not found | "inquiry_id not found; has the run already closed?" |
| `inquiry_id` already stopped | Return the existing warrant + artifact reference; no new work |
| S6 returns fatal error (Surprise Register unreachable) | Halt, escalate to operator, DO NOT emit a stop on the router's authority |
| Operator invokes `/ram-stop` in a loop hoping to exhaust S6 | S6 is idempotent; same inputs -> same verdict. Router does NOT rate-limit but DOES write each invocation to the Ledger so the pattern is visible in Phase 9 eval. |

## Exit codes

- `0` -- S6 emitted STOP; artifact produced.
- `2` -- S6 emitted CONTINUE; operator received open-gate rationale; run continues.
- `3` -- Scope-amendment request generated; awaiting operator confirmation.
- `4` -- `inquiry_id` not found or run already closed.

End of command file.
