# IO-PARSER-22-JIT — milestone IO-PARSER (releases#22)

Board: releases#22 (GREENLIT) ← #12 (IO parser, founding), #226 (commune + additional events),
#233 (now-signal funnel). Fast-follow successor (NOT in this milestone): #234 (harness-adapter
event consumption) — built immediately after this ships, own grill first.
Design of record: CONTEXT.md §IO parser + §now-signal (ratified 2026-07-29) + ADR-0048 (idle-edge
contract) + the OPERATOR RULING RECORD below (grill 2026-08-26/27, confirmed 2026-08-27).
Golden CI (ADR-0050): builder PRs thin lane; full suite on the gater-assembled golden head;
main ff-only to tested sha. Registry-first: REQs mint in the builder PR before evidence (rule 3).

## Operator ruling record (binding, confirmed 2026-08-27)

Scope:
1. #22 = IO event funnel + core consumers + now-signal rendering verb (#233).
2. Adapter (non-shell) consumption = #234, fast-follow immediately after; the funnel's event bus
   is CONSUMER-AGNOSTIC internally (emitters → bus → {shell-link, core consumers}) so #234 lands
   as a new reader, never a funnel rework.
3. TOOL_USE parked: named in the taxonomy, NO emitter; unlock = per-harness digest capability.

Events:
4. Taxonomy: USER_INPUT, AGENT_OUTPUT (hybrid ingest, documented dedup), MSG_IN, MSG_OUT,
   COMMUNE, COMMUNE_FAIL (+ TOOL_USE deferred).
5. COMMUNE fires when spt-core DELETES the commune file; payload = the exact commune file content
   VERBATIM — never Psyche/echo-commune output. Wake markers (`!!wake!!`) are claude-spt's
   construct: zero special treatment from core.
6. COMMUNE_FAIL on failed ingest: named reason, file left in place (the surviving file stays the
   on-disk diagnostic; the event is the push signal).
7. IO frames are COMMAND-CLASS (discrete, durable intent) under ADR-0048's own taxonomy — not
   drive-class. Payload cap 16KB-class + `truncated` flag + digest `seq` pointer (digest stays
   the content surface).

Shortform (`@<targets body @>`):
8. Core owns ONE suppression grammar — inline backtick + fenced block — public-contract
   documented; manifest opt-out for exotic harnesses. The SAME grammar governs `;;`.
9. Core enables shortform per-adapter only on a manifest IO-compliance declaration; adapters
   delete their local parsers in the declaring release (no double-fire window can exist).
10. Dispatch confirmation rides NOW-SIGNAL ONLY: new v1 category DISPATCH_RESULTS (per-target
    delivered/no-perch + seal-mint outcomes/refusals). No other confirmation channel.
11. Parsers run over USER_INPUT + AGENT_OUTPUT ingest ONLY — never MSG_IN bodies: a received
    message containing a tag can never fire a dispatch or ceremony at the receiver.

Seal-mint shortform (`;;text;;`):
12. Each pair mints its own ceremony; multiple pairs run sequentially.
13. Empty pair (`;;;;`): fully ignored — no refusal, no ceremony.
14. Bare unpaired `;;`: ceremony over ALL text after it through end of output. Pairs parse greedy
    left-to-right first; an odd trailing `;;` is the bare case; text between the last pair and
    the bare marker is untouched.
15. No attached controller at mint time: immediate named refusal (never queued — presence is the
    point of the ceremony), surfaced via DISPATCH_RESULTS.

## Waves (todlando; each wave gated before the next dispatches)

- **W1 — funnel + ingest edges + shell frames.** Event bus (consumer-agnostic, ruling 2) +
  taxonomy constants (ruling 4, TOOL_USE named-not-emitted) + ingest edges: USER_INPUT payload on
  `api state busy`, AGENT_OUTPUT hybrid (end-of-turn payload on `api state idle` + `[digest]`
  mid-turn feed, dedup documented), MSG_IN/MSG_OUT accounted at the delivery edges core already
  owns. Shell-link IO frames per ruling 7 (command-class; cap/truncated/seq-pointer).
  ⚠ ADR-0048 decisions 1–3 are perri's LOCKED contract — any deviation is a contract break and
  goes back through the operator. ⚠ The busy/idle report path touches pump plumbing: grep and
  honor REQ-HAZARD-PUMP-IPC-DEADLINE tagged sites before shaping.
- **W2 — commune events.** COMMUNE on the deletion the ingest seam already performs (rulings 5)
  + COMMUNE_FAIL with named reason (ruling 6; the PSYCHE_INGEST_FAIL class is the acceptance
  case: a failed ingest MUST emit).
- **W3 — core shortform parser.** One suppression grammar (ruling 8), manifest IO-compliance
  handshake + opt-out field (ruling 9), dispatch through the normal send path, DISPATCH_RESULTS
  accumulation (ruling 10; rendering lands W5). Ingest-scope guard per ruling 11 (unit: a MSG_IN
  body carrying a live tag fires nothing).
- **W4 — seal-mint shortform.** `;;` grammar per rulings 12–15 (unit the bare-`;;`-to-EOL arm and
  the greedy-pairing arm explicitly) + ceremony wiring through the existing seal mint path +
  no-controller named refusal.
- **W5 — now-signal (#233).** `spt api now-signal` + v1 categories (HINTS w/ `api hint` alias,
  ENDPOINT_MENTIONS, MONICS, SHELLS w/ spt-shells-message deprecation, LAST_MSGS,
  EDGE_TRANSITIONS, DISPATCH_RESULTS) + delta-only per-session seen-sets + `--spec-manifest` /
  `--spec-file`. Deferred categories stay deferred (#16, #17).
- **Docs lane.** Public docs: event vocabulary, manifest fields, shortform + `;;` contract
  (grammar, suppression, refusals), now-signal categories. IR-52 CONDITIONAL RIDER (same terms
  as WAX-SEAL): iff this lane touches the docs-site CLI reference generator, land the shallow-
  render depth fix; else IR-52 stays open in the register.

## Parallel rider (hertz, off critical path)

- IR-66: the two first-chunk-needle latent members — TICK39 at attach.rs:561,
  ALT_VIEWPORT_MARKER at attach.rs:672 — the one-line later-needle treatment proven at v0.63.0.

## Gate discipline (this milestone)

- IR-67: no wave battery leans on a `-p spt --bins` leg as integration coverage (it compiles bin
  harnesses, runs zero e2e). Name the real e2e legs per wave.
- First-execution-cells named before every golden head (runbook rule).
- Wave gates in isolated worktrees under `.worktrees/`, pool-claim from the lane's own tree.

(REQ set mints registry-first in the W1 PR; this plan's doc-stage tag rides that PR with it.)
