Skip to content

Walking Skeleton — Realm ​

Phase: 1 Generated: 2026-10-21

Applicability ​

Phase-specific applicability for this skeleton (must not be silently ignored):

  • Phase 1 has no runtime, no database, no routing, no UI, and no container. Those belong to Phase 3 (runtime and Anda bridge) and Phase 5 (Omp, MCP, ACP). No database, route, UI interaction, or deployment was added to satisfy the template.
  • The skeleton for this phase is the thinnest end-to-end working path the phase can prove: the strict ESM package builds, the four quality scripts run, one frozen contract (the state table, plus the error catalogue and one schema) is loaded and exercised, and one invalid input is rejected with its typed code.
  • The phase did not inflate its scope to match the template. The phase boundary in 01-CONTEXT.md is fixed.

Capability Proven End-to-End ​

A developer runs the four quality scripts on the strict ESM package and every script passes; one frozen contract loads and accepts a valid input while one invalid input is rejected with its typed error code.

Architectural Decisions ​

DecisionChoiceRationale
Language and modulesTypeScript strict, ESM, single package at repo rootSpec CONSTRAINTS QUALITY and PROJECT.md constraints
Test runnerNode built-in test runner, test/ mirrors src/D-07, no extra dependency to verify
LintESLint flat config with TypeScript parser, no-empty disallowing empty catch blocksD-07, D-08, QUAL-01
ValidationSingle JSON Schema validation library, registry-verified at execution, imported only by src/contract/validate.tsD-12, one-way contract shape
Schema shapetools.schema.json is a map keyed by tool name; every object sets additionalProperties falseD-12, D-13, Claude's Discretion
Numeric defaultsstartupBudgetMs default 10000, toolQueueMs default 2000, read.maxBytes maximum 1048576Claude's Discretion short bounded positive integers; recorded for Phase 7
EnginesSet from docs/integration/hosts.md Node requirement, never guessedD-09
Dependency rootsrc/core/ owns states, errors, policy schema; src/contract/ depends only on src/core/Spec nodes n1, n2, n6

Stack Touched in Phase 1 ​

  • [x] Project scaffold (strict TS, ESM, lint, built-in test runner, build)
  • [ ] Routing — not applicable in Phase 1 (no CLI yet; owned by Phase 6)
  • [ ] Database — not applicable in Phase 1 (session record is a JSON file validated by schema; owned by Phase 2 session store)
  • [ ] UI — not applicable in Phase 1 (status indicator; owned by Phase 5)
  • [ ] Deployment — not applicable in Phase 1 (container and daemon; owned by Phases 3 and 6)
  • [x] Frozen contracts loaded and exercised (state table, error catalogue, schemas, validate wrapper)
  • [x] One invalid input rejected with its typed code (SCHEMA_INVALID; REALM_INVALID_TRANSITION for state pairs)

Out of Scope (Deferred to Later Slices) ​

  • State-machine behavior, events, display mapping (Phase 2)
  • Policy evaluation and defaults enforcement (Phase 2)
  • Path canonicalization, locks, atomic writes (Phase 2)
  • Podman, OpenShell, AgentOS, Anda runtime code and anda-decision.md (Phase 3)
  • Reaper, egress guard, shared dispatcher (Phase 4)
  • Omp plugin, MCP and ACP transports, host snippets (Phases 5 and 6)
  • Policy reference and security review (Phase 7)

Subsequent Slice Plan ​

Each later phase adds one vertical slice on top of this skeleton without altering its architectural decisions:

  • Phase 2: Policy, state machine, filesystem lockdown, and contract tests against an in-memory fake
  • Phase 3: Rootless Podman container, OpenShell, AgentOS, Anda bridge, lifecycle controller
  • Phase 4: Orphan reaper, default-deny egress, single tool dispatcher
  • Phase 5: Omp autostart and status, MCP and ACP over the shared dispatcher
  • Phase 6: Standalone CLI, daemon, control channel, host packaging
  • Phase 7: Policy reference and recorded security and supply-chain reviews

AGPL-3.0-only. Copyright (C) 2026 Spectrum Web Co/swcstudiospace.