System architecture and component boundaries
Status: normative · Owns: logical planes, module ownership and deployment separation.
Logical diagram
Human operator
│ natural language / structured review
▼
MAISTRO ── authenticated experience/API boundary
│ proposes immutable TaskSpec and candidate plan
▼
UNIFIED CONTROL HARNESS — persistent, economical PHP 8.4
├─ policy/approval verifier ├─ capabilities & pinned registry
├─ planner & cost/quality router ├─ durable state/transactional outbox
├─ provenance & retrieval ├─ evidence/receipt/accounting ledger
├─ capture/variant proposal ├─ static PHP rule catalogue
└─ independent lease/stop guardian └─ quality oracle and audit
│ authorised typed commands only
▼
ISOLATED WORKLOAD PLANE
├─ Small: local PHP/CPU + tiny optional burst
├─ Medium: specialist CPU and rented modest GPU workers
├─ Large: bounded high-memory / parallel workers
└─ Ultra: high-memory, high-throughput and multi-node GPU
│ events, results, attested receipts
▼
Durable evidence + review → human-gated PHP compilation → safe local reuse
A system is logically unified without sharing process memory, privileges, provider accounts or runtimes. The cheap CPU host should not carry the weight of a GPU model. Maistro remains on a persistent coordinator while individual DAG nodes may execute elsewhere. Intermediate envelopes need not be powered on during a direct Small-to-Ultra transfer.
The reference 18 subsystems
| # | Subsystem | Responsibility and authoritative boundary |
|---|---|---|
| 01 | Maistro conversation | Clarify intent, state, progress; never independently approve effects. |
| 02 | Intent & decomposition | Typed TaskSpec and bounded DAG; ambiguity routed to operator. |
| 03 | Harness registry | Versioned inputs, outputs, effects, artifacts, provenance. |
| 04 | Four-envelope router | Hard-gate candidate selection and fallback rationale. |
| 05 | Model/runtime catalogue | Exact revisions, formats, licensing and compatibility. |
| 06 | Cost and resource optimizer | Forecast entire job cost, not merely GPU-hour price. |
| 07 | Approval/secrets authority | Owner-scoped policies, short-lived grants and secret refs. |
| 08 | Provider adapters | Private connectors; cannot act without effect outbox authorization. |
| 09 | Durable queue/dispatcher | Transactional jobs, dedupe, fencing and retry state. |
| 10 | Lease and termination guardian | Independent paid resource inventory and safe retire. |
| 11 | Execution/checkpoint | Isolated jobs, typed input/output, resumable artifacts. |
| 12 | Outcome oracle | Quality tests and acceptance evidence. |
| 13 | Provenance/retrieval | Allowed context and evidence; memory is never a grant. |
| 14 | Reuse opportunity engine | Identify repeated session mechanics, cacheable results and capture proposals. |
| 15 | Static PHP compiler/test gate | Generate drafts, fixture corpus, run checks, obtain human promotion. |
| 16 | Receipts/telemetry/accounting | Forecast/actual, resource history, data lineage and audit. |
| 17 | Backup/recovery | Verified restore, replica separation and retention. |
| 18 | Idle/retreat | Stop new leases, drain, checkpoint, reconcile, return to economical baseline. |
Community package exchange (if introduced) is a registry ingestion function, not a second product or a right to execute unreviewed code. Every submitted artifact enters quarantine and dependency, license, effects, provenance and test review.
Trust zones
Zone P—Public: marketing pages, published docs and explicit no-effects examples; no credentials or operator state. Zone C—Control: authenticated PHP API, SQLite state, protected secrets references, owner policies, durable outbox and receipts. Zone W—Worker: fenced CPU/GPU executors without blanket control-plane rights. Zone E—Evidence: immutability, retention policy, encryption and access checks. Zone B—Build: offline generation, security scanning, tests and signed releases. A public URL never crosses into C merely by rendering an API-shaped example.
Reference Small deployment
Debian + Caddy + PHP 8.4/FPM + SQLite WAL/FTS5 + supervised CLI worker + cron/systemd scheduling. Vector search is optional and derived. A FastAPI sidecar is permitted for Python-specific worker functions but is not the system of record. vLLM and llama.cpp are subordinate runtime adapters. Restic/Git/PHPUnit are operational tools; worker storage and backups remain separate. The minimum must fit its purchased host's RAM, storage IOPS, disk/backup budget and realistic concurrency.
Scale transition
SQLite on one host is the accepted single-writer pilot; higher concurrency or geographically distributed workers can justify Postgres and a dedicated queue behind stable interfaces. Adding Kubernetes or cloud orchestration MAY be useful for verified Large/Ultra needs but MUST NOT become mandatory to run Small. The public site is static HTML and runs locally without a server; the PHP demonstration is an offline CLI, not an operational controller.
Related
Envelopes · Harnesses · Jobs · Data and storage.