Architecture
CRITERION System Architecture
Section titled “CRITERION System Architecture”This document describes how CRITERION fits together: module structure, data flow, and the agentic audit chain.
Product surface (v1.0.0)
Section titled “Product surface (v1.0.0)”| Layer | Status |
|---|---|
| CLI | Shipped — permanent interface |
| MCP server | Shipped — local integration for execution agents |
| Public verification | Shipped — verify.criteriontrading.com |
| Local UI | Frozen — not a v1.0.0 feature |
Module structure
Section titled “Module structure”Key modules under src/criterion/:
- cli — Command-line interface
- config —
RootConfigand domain config models - verdict —
VerdictOutputV1contract and builder - daemon — Scheduled verdict generation (
criterion serve) - mcp — Local MCP server and tools
- audit — Shareability, execution events, public registration client
- engines, io, portfolio, backtest, data — engine and artifact pipeline
Hosted infrastructure (not Python): infra/verify-service/ — Cloudflare Worker at verify.criteriontrading.com.
Agentic pipeline
Section titled “Agentic pipeline”config.yaml → criterion run → run_manifest.json, execution_bundle.json → criterion verdict → verdict.json → criterion mcp serve → MCP tools → agent → broker → report_execution_event → execution_events.json → public verification (verify.criteriontrading.com)CLI commands (v1.0.0)
Section titled “CLI commands (v1.0.0)”Core agentic commands: criterion run, criterion verdict, criterion serve, criterion preflight, criterion mcp, criterion verify, criterion confirm-live, criterion doctor.
Full reference: architecture.md on GitHub.