Seraph Project Constitution
Document class: canonical product and architecture contract
Capability sequence: Guardian capability roadmap
Completed foundation: Epic #736
Shipped-state owner: Development Status
Seraph is a local-first proactive guardian: an operator-controlled system that understands the operator's goals, observes permitted context, proposes and executes useful work, remembers outcomes, and explains what it is doing. Seraph is not itself an AGI project. It adapts its behavior and capabilities to the operator's goals, which may include ambitious research goals.
The self-improving guardian vision means becoming more useful through explicit feedback, verified outcomes, and reviewed, reversible changes to memory, procedure preferences, and capability assets within their accepted contracts. It does not grant autonomous code rewriting, permission expansion, or learning from task success alone. Current bounded learning mechanics do not establish measured improvement or generalized autonomous learning; their shipped scope remains owned by Development Status. In particular, reviewed procedure preferences and opportunity feedback follow ADR-015 and ADR-023.
This constitution defines the target architecture. It does not claim that every target capability is shipped. The current implementation is recorded in Development Status, while active work lives only in GitHub issues, pull requests, and the Seraph Execution project. This constitution is Seraph's sole product and accepted-target authority.
No Evals And Provider-Free Implementation
Standing operator direction: do not propose, plan, create, or run evals unless the operator explicitly asks for evals. No money may be spent on evals. This includes unpaid or local campaigns, benchmarks, harness research, hidden quality corpora, model judges, synthetic replacements, and canaries used to measure quality or improvement. Do not turn any of these into a future capability, migration, activation, merge, or release gate. Capability work comes first. Any later eval requires the implemented capability and a new explicit operator request; it is not a planned milestone, reminder, or dependency. This direction stands until the operator changes it.
Implementation and acceptance make no paid, live, free-tier, alternate-provider, or local-model inference calls. Ambient credentials and available credits are not authorization; disable or intercept external inference at the transport boundary. Ordinary isolated regression, integration, and security tests, actual local effects and readback, and independent review remain required. They prove the checked behavior, not model quality, learned improvement, or superiority.
Self-improvement remains a main product feature: implement reviewed, reversible adaptation from ordinary task traces, explicit corrections, and skill or procedure changes under the existing learning authority. It does not depend on an eval campaign or the cancelled harness work in #771, which is closed as not planned and excluded from completed #736.
This boundary governs development and acceptance; it does not disable ordinary operator-approved product inference under existing consent, grants and routing. Historical receipts, capability-proof endpoints, and unverified quality labels authorize neither an eval nor implementation-time model calls. Preserve historical evidence without treating it as an active work requirement.
Product Promise
Seraph should help an operator make sustained progress without becoming an opaque autonomous process. It must:
- maintain explicit goals, constraints, and success measures;
- observe only paired, consented sources and show what was captured;
- turn evidence into bounded proposals, queued work, reports, and actions;
- request approval at declared trust boundaries;
- preserve durable memory, artifacts, checkpoints, and audit receipts;
- remain useful when a model or optional integration is unavailable; and
- report the effective runtime path, not a configured or aspirational one.
- Turn goals into prioritized plans, scheduled work, and evidence-backed progress reviews.
- Monitor consented desktop context and produce searchable summaries that help the operator reflect and recover focus.
- Continuously research operator-selected topics and connect material findings to active goals and decisions.
- Execute bounded software-engineering and knowledge workflows with approvals, artifacts, checkpoints, and audit receipts.
- Continue one trusted conversation across the cockpit, paired voice, and paired messaging surfaces.
A surface is not supported until its implementation ticket has shipped and the status page says so.
Public entry points: docs, contributing, support, security, and GitHub Discussions.
Four-Layer Architecture
| Layer | Responsibility | Must not own |
|---|---|---|
| Guardian kernel | Goals, policy, planning, prioritization, intervention, memory coordination, audit, and operator-visible state | Provider-specific behavior or unbounded side effects |
| Capability runtime | Typed capabilities, durable jobs, checkpoints, artifacts, approvals, sandbox/policy enforcement, and bounded remote-inference admission | Product goals or hidden provider fallback |
| Model fabric | NEAR AI TEE-hosted inference (per NEAR catalog, not verified by Seraph) under ADR-035 with explicit routing, consent and receipts (ADR-025's NEAR text capability retained) | Agent identity, durable state, shell orchestration, or product policy |
| Interfaces and edges | Browser cockpit, API, consented local or paired desktop context, voice, and paired messaging adapters | Canonical memory, authority, or an independent agent runtime |
The guardian kernel decides why and what. The capability runtime controls how work may execute. The model fabric supplies bounded inference. Interfaces and edges provide where the operator interacts and what consented context is available.
All-plugin Cordis Composition
ADR-026 defines the accepted composition target: the agent loop, goals/policy/authority services, capability execution and tools, model integration, persistence and memory, scheduling, audit, and interface/edge adapters are Cordis plugins. Only necessary bootstrap/composition machinery remains outside runtime plugins; shared types and pure libraries are not independent runtime components.
The four layers describe logical responsibilities, not a non-plugin guardian kernel or a prescribed package tree. Mandatory trusted enforcement services must be ready before dependent work is admitted; plugin loading never grants authority and dependency injection is not sandboxing. Reviewed authored capability packs retain ADR-013/020 protections and are not trusted runtime plugins. All existing provider, canonical-state, admission, consent, audit, recovery and portability boundaries remain in force. Migration capabilities are Planned; the current Python/FastAPI runtime and React cockpit are not retroactively Cordis-based.
Locked Decisions
The following architecture decisions are normative:
- ADR-001: Inference-only model providers
- ADR-002: One-GPU serial priority scheduling
- ADR-003: Canonical memory boundary
- ADR-004: GPU core and paired Mac edge (fixed placement superseded by ADR-008)
- ADR-005: Epic integration branch workflow
- ADR-006: OpenRouter-only inference phase (provider choice superseded by ADR-035)
- ADR-007: Bounded Node repair and Linux process supervision
- ADR-008: Portable core and consented context
- ADR-009: Tested repository publication
- ADR-010: Reviewed artifact pipelines
- ADR-011: Finite GitHub consent, recovery and capacity closure
- ADR-012: Finite durable read-only research
- ADR-013: Fixed reviewed local tool package
- ADR-014: Bounded evidence dependencies
- ADR-015: Reviewed procedure preferences
- ADR-016: Exact Gmail reply send and readonly reconciliation
- ADR-017: Private bounded document comparison
- ADR-018: Fixed Moltbook private browser read
- ADR-019: Exact owned-calendar reschedule
- ADR-022: Portable selected-text context
- ADR-020: Reviewed authored capability packages
- ADR-021: Exact Forgejo issue title transaction
- ADR-023: Evidence-bound guardian opportunities
- ADR-024: Purpose-specific OpenRouter routes (OpenRouter slots superseded by ADR-035)
- ADR-025: Optional NEAR HTTPS text inference (absorbed by ADR-035)
- ADR-026: All-plugin Cordis agent architecture
- ADR-027: Finite standing public goal programmes
- ADR-028: Reviewed typed task methods and reusable procedures
- ADR-029: Profiled browser interactions
- ADR-030: Bounded iterative repository work and original-producer recovery
- ADR-031: Bounded general documents
- ADR-032: Repository crash recovery evidence (supersedes selected ADR-030 recovery clauses)
- ADR-033: Optional governed OpenRouter audio transcription (OpenRouter audio never activated under ADR-035)
- ADR-034: Quarantined browser downloads and selected desktop draft actions
- ADR-035: NEAR TEE-hosted inference only (supersedes ADR-006's provider choice and ADR-024's OpenRouter slots)
- ADR-036: DSH-style plugin structure, pinned trust bundle and profiles (refines ADR-026)
- ADR-037: No local cost limits; the provider account holds them (supersedes the budget, reserve, period and overrun clauses of ADR-006, 012, 024, 025, 027, 030, 035)
ADR-033 extends only the versioned setup.v3 target with one optional disabled audio route; under ADR-035 that OpenRouter route is never activated and a NEAR TEE audio slot needs a separate amendment. Existing setup.v1/v2 and text, vision and embedding contracts stay in force. Source-attested exact endpoint/codec and finite chat-audio pricing, original audio native ownership and a separately selected Goal/Task allowance are mandatory. Paired-channel Task capture is Partial; live audio stays disabled as an explicit "Voice route unavailable" state, and scripted mechanics do not establish operational voice readiness.
ADR-023 defines evidence-bound Guardian opportunities. ADR-035 makes NEAR AI TEE-hosted models (per NEAR's dated catalog, not Seraph-verified, plaintext to the NEAR gateway) the only inference target, reusing ADR-024's slot mechanics, absorbing ADR-025's NEAR text capability and retiring OpenRouter by policy. These accepted decisions retain the existing authority, serial admission and accounting boundaries. Development Status owns the implemented capability scope and its limits; acceptance alone does not establish live provider quality or availability.
Changing a locked decision requires a superseding ADR, a tracked issue, an independent Critic/Contrarian review, and updates to every affected active doc.
Capability Vocabulary
Use these terms consistently in APIs, UI copy, issues, and active docs:
- capability: a Seraph-owned, typed unit of work with declared input, output, permissions, limits, and receipts;
- job: a durable invocation of a capability;
- artifact: addressable output produced or consumed by a job;
- checkpoint: durable resumable job state that excludes unsafe secret data;
- model route: an inference endpoint plus model and effective routing state;
- edge: a paired, revocable source or interface outside the canonical core;
- provider: an inference or advisory integration, never Seraph's authority;
- guardian cycle: observe, assess, propose, approve when required, act, read back and record the outcome, and remember.
Capability Status Vocabulary
Capability inventory, APIs, and operator UI use this lifecycle vocabulary:
- Shipped: present on
develop, available to its declared audience, and supported by the named validation receipt. - Partial: usable behavior exists on
develop, with named missing boundaries. - Experimental: runnable only with explicit opt-in; interfaces or persistence may change and the UI must say so.
- Planned: accepted tracked work without a shipped implementation.
- Deprecated: still present for migration, with its replacement and removal issue named.
- Excluded: intentionally outside Seraph's product boundary; it must not be advertised or silently restored as fallback.
“Configured,” a deterministic fixture, or a branch-local change is not evidence of Shipped. A capability cannot be both Shipped and Planned. Experimental and Deprecated capabilities must remain visibly distinct from supported paths.
Document And Decision States
Material documents and decisions may use these states:
- Target: accepted architecture or product intent, not yet shipped.
- Research: evidence or an option under consideration, not a committed product contract.
- Archived: historical context that may contradict the current contract.
- Blocked: accepted work cannot proceed until a named condition changes.
Open branches describe intended post-merge truth and must be identified as such.
Runtime Invariants
- Model providers are inference-only. Seraph does not depend on Codex CLI, Claude Code, or another coding-agent runtime to operate.
- Model inference targets NEAR AI TEE-hosted models from ADR-035's closed allowlist; OpenRouter makes no new contact. Exact canonical model, catalog receipt, modalities and policy must be checked before dispatch; unsupported capabilities remain blocked or degraded rather than falling back silently.
- Remote inference uses one shared bounded admission contract with owner, priority, deadline, cancellation, idempotency, and reconciliation receipts. The initial in-flight limit is one; this is an API admission bound, not a claim about upstream hardware concurrency. The integrated runtime has durable jobs, durable request records and witnessed spend recording. Under ADR-037 Seraph applies no cost limit of its own: spending limits live in the provider account, and recorded spend is history and display only. See the dated source/test baseline for the develop/main boundary and unresolved focused-test failures. The old process-local migration description is historical, not the current target.
- Canonical goals, memory, jobs, artifacts, approvals, and audit records remain in Seraph-owned storage. Advisory memory providers may augment recall but do not become authoritative.
- macOS and Linux are peer core-host targets under ADR-008. The operator chooses
the canonical workspace host;
jupyteris a historical deployment example. Consented context may originate locally or from a paired, revocable edge, without transferring authority. GPU hardware, local model weights, and a VLM wrapper are not active product prerequisites under remote inference (ADR-006, ADR-035). - Effective model, queue, edge, and degraded state must be operator-visible. Silent fallback that makes the UI lie is a contract violation.
Safety And Authority
Observation, inference, and execution are different permissions. Pairing an edge does not grant execution authority. Supplying a provider key does not grant data-egress approval. A capability must declare filesystem, process, network, credential, and external-mutation boundaries, and Seraph must fail closed when required policy or approval is absent.
Definition Of Product Progress
Product progress is a user-visible capability with bounded failure behavior and evidence appropriate to its risk. Documentation, issue creation, proof-only fixtures, and model output are not substitutes for the capability itself. Completion requires the owning issue and project state, focused tests, live or mocked operator receipts as appropriate, and independent review to agree.
Documentation Ownership
docs/implementation/: shipped truth, this constitution, ADRs, and durable operator contracts.docs/research/: evidence, alternatives, and dated comparisons; research cannot accept a target or claim shipping.docs/docs/(/legacy): archive; content may contradict the current system.- GitHub Project, issues, and PRs: execution state; docs never mirror the queue.
Start with Current App Guide to run the existing app, Development Status for shipped truth, and Documentation Contract before changing documentation.