Owner: specification agent. Autonomous stage (P6 — not a creative gate). Upstream:
vision/vision.md,brand/brand.md. Downstream: ARCHITECTURE. Executable (P3): if the
implementation differs from this spec, the implementation is wrong. Scope: v1 only
(Observe tier-1 + Terminal). Every requirement here is testable; acceptance criteria are
measurable; there are zero TBDs.
In (v1): read-only Observe of Orion (runtime) + PRISM (factory) in one cockpit, plus an
embedded VPS terminal, secured by defense-in-depth, reading only existing stores.
Out (v1, trigger-gated fast-follows): approve/reject gates (Review, tier 2), replay
(tier 3), submit PrismTask (Create, tier 4). Out (forever): any file-editing IDE surface
— the terminal is the escape hatch (Vision Lock 1).
never writes to Orion's stores in v1. Truth = Orion's DB + Directus, surfaced verbatim.
tasks / agent_runs) with: run id (trace_id),project, status, started-at, duration, total cost, total tokens.
Observe API exposes a stream; no manual reload required.
(not blank, not spinner-forever): no runs yet / orion observe API unreachable.
shadow_logs (trace_id/parent_trace_id hierarchy), each step a tool-call card: agent/step name, status,
duration, cost, token delta, and expandable metadata (JSONB payload).
klaus.repair · 4/6).--ember mark and surface the failure taxonomy (classify_failure output: type/subtype/origin/confidence) when present.
(Research→Vision→Brand→Spec→Architecture→Tasks→Implement→Review→Evaluate→Knowledge).
read-only "needs you" indicator. (Acting on them = tier 2, out of v1.)
memory/ (patterns / evaluations / playbooks /decisions) read-only, rendered from the repo files.
shadow_logs rows under the prism-studio project — orion-integration-map.md §5).
the same secured surface as the Studio.
Studio UI itself exposes no file editor and no write to Orion's DB.
wraps the same functions Sherlock uses). The Studio holds no Orion data store of its own.
(Dependency: §6.)
the repo files. No second source of truth is created.
unknown — it isnever computed or inferred locally.
Caddy auto-TLS.
TLS → passkey → ttyd auth.)
workspace (trace detail / terminal), per brand.md §3`.
brand.md tokens (graphite + single amber signal, IBM Plex Sans/Mono, instrument motion gated on prefers-reduced-motion).
no functionality lost on a phone-width viewport.
≤ 5s on a warm Observe API, with zero terminal commands required (Vision metric).
the Studio (no separate SSH / psql / browser tab).
field; no transformation that changes meaning. Verified by a drift check (§5 AC-Trust).
genuinely required (brand-isolation; automatable check).
aa-on-brand-color); full keyboard reach;reduced-motion honored.
has an explicit calm failure state (FR-1.4 pattern); no infinite spinners, no blank panels.
Full contract + drift-guard ask: architecture/observe-api-contract.md (grounded in the real
agent_runs/tasks/shadow_logs columns, read from orion-os source). Read-only surface:
GET /observe/runs?status=&project=&limit= → Run[] where `Run = { trace_id, project, title,agent_name, status, source_channel, cost_usd, started_at, completed_at }`.
GET /observe/runs/{trace_id} → { run, steps }; Step (from shadow_logs) = `{ trace_id,parent_trace_id, agent_name, task_type, tool_used, outcome, failure_category, error_message,
duration_seconds, cost_usd, model_used, latency_ms, tokens_in, tokens_out, retry_count,
fallback_used, metadata }, ordered by created_at, tree via parent_trace_id`.
GET /observe/runs/stream (SSE) → live run created/updated events (FR-1.3 push path).GET /observe/health → liveness for FR-1.4.All fields map 1:1 to existing Orion columns — no field is invented by PRISM. (Note: per-step
duration is duration_seconds; tokens are tokens_in+tokens_out.)
field names are discovered from the live instance at ARCH time; the Studio adds no
collections and writes nothing in v1.
memory/** and products/*/ rendered for the memory browser and factory state (FR-3).fields; a running run shows the amber live signal. (pass/fail)
status matching the Observe API response byte-for-byte on those fields. (diff = 0)
every displayed field to the API value; 0 discrepancies. Studio holds no Orion store
(verified: no Orion-data persistence layer in the codebase). (pass/fail)
products//; memory browser lists every file under memory/. (pass/fail)*
works in localhost and remote modes. (pass/fail)
the Studio is reachable only via the Tailscale address. (0 ports)
terminal. (401/redirect on 100% of routes)
rest. (≤1)
prefers-reduced-motiondisables breathe/tick. (pass/fail)
panel shows its calm failure message; no spinner-forever, no blank. (pass/fail, 3 cases)
API** (explicit non-goal); observability today is the Sherlock CLI over shadow_logs. The real
dependency is therefore **"Orion builds the Observe API (Observe tier) per
architecture/observe-api-contract.md"** — Orion-owned (P10), triggered by this product's
existence. Until it ships, the Observe panels run against a fixture/stub shaped to the real
Orion columns; live cutover = config flip OBSERVE_BACKEND=live (no code change — the seam).
PRISM also proposes Orion publish observe_api.v1.schema.json + a drift-guard (mirror
prism_task.v1) so the contract cannot silently rot.
installed on the VPS (ARCH specifies versions/config).
(in/beside orion-os vs standalone talking to the Observe API — Vision says both are valid;
ARCH picks v1's home with reasoning).
mechanism for passkeys; ttyd embedding approach; fixture/stub design for D-1.
brief), and CI gates to carry forward (js-budget-gate, lighthouse/a11y where applicable).