Skip to content

ADR 0001: Agent-first runtime, Web, jobs, and deployment convergence

Status: Accepted, 2026-07-17

This decision explains why RIGOR shares infrastructure mechanics while keeping each laboratory domain's API, data, and safety authority separate. Read it when changing Agent runtimes, Web builds, background jobs, or deployment boundaries.

Context

RIGOR had copied generic Agent runtimes, mixed Next.js/Vite builds, module-local in-memory background-task conventions, and eight normal process entry points. Those differences increased drift without representing distinct domain authority.

Decision

  • One pinned Python package owns the generic Agent loop. Module entry-point profiles declare versioned prompts, context/Skill/output policies, budgets, Tool allowlists, and sandbox adapters.
  • ASCEND is the React/TypeScript/Vite primary SPA. Composer uses the same Vite toolchain as an engineering console. ASCEND OpenAPI generates the shared browser types and client.
  • SQLite durable jobs provide idempotency, lease ownership, retry, cancel, expired-worker recovery, and retention for background work.
  • Normal deployment exposes Control, Execution, LabBridge, and Analysis Worker wrappers. Existing domains retain separate processes, APIs, stores, and safety authority.
  • Server-embedded Web assets are deterministic checked-in outputs with a source and output hash manifest; build verification fails on drift.

Alternatives considered

Keeping runtime/Web copies was rejected because fixes and contracts drifted. Celery/Redis and Kubernetes were rejected as unnecessary for current single-node feature development. Immediate process/database merging was rejected because it would blur authority and enlarge migration risk without improving product flow.

Consequences

New Agent roles extend profiles rather than fork the loop. New primary UI API work starts from generated contracts. Background work must use the shared job store when restart recovery matters. Four deployment units may still supervise multiple processes, so process-level health remains visible in unit status.

Migration and rollback

Module run scripts remain compatibility adapters. The shared-runtime migration to installed-package dependencies is complete; role-owned profiles, sessions, tools, workspaces, sandboxes, and audit records remain isolated. Each deployment wrapper can be bypassed with the original module script without changing domain data. OpenAPI and Web manifests are regenerated by their documented scripts.

Affected sources: packages/agent-runtime, packages/job-runtime, packages/ui-contracts, deployments, ASCEND, Composer, PRISM, LabBridge, PACE, and LabFlow Web build definitions.

RIGOR product, architecture, operations, and contributor documentation