Skip to content

Architecture

This document describes how CRITERION fits together: module structure, data flow, and the agentic audit chain.

LayerStatus
CLIShipped — permanent interface
MCP serverShipped — local integration for execution agents
Public verificationShipped — verify.criteriontrading.com
Local UIFrozen — not a v1.0.0 feature

Key modules under src/criterion/:

  • cli — Command-line interface
  • configRootConfig and domain config models
  • verdictVerdictOutputV1 contract 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.

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)

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.