MAGIC
SERVICE CONTRACT · VIEW: GOV
Axiom
MAGIC enforces governance at runtime. Every request validated. Every response governed.
Constraints
MUST: Route through governed gateway MUST: Validate every request against governance MUST: Emit telemetry to governed surfaces MUST: Fail closed on validation failure MUST NOT: Hardcode credentials or provider bindings MUST NOT: Bypass governance validation
Capabilities
FAIL_CLOSED, GATEWAY_ROUTE, REQUEST_VALIDATE, TELEMETRY_EMIT
COVERAGE: 255/255
SPEC
Purpose
MAGIC is the infrastructure service. Provider switching, governance validation, tier algebra. Every request validated. Every response governed.
MAGIC enforces 255-bit governance at runtime. It manages the LLM provider landscape (Anthropic, RunPod, Vast.ai, OpenAI), runs the BAKEOFF evaluation harness, and validates that every scope meets its tier contract. Providers are switchable — not hardcoded. Quality is measured — not assumed.
Tier Algebra
| Tier | Score | Artifacts |
|---|---|---|
| COMMUNITY | 051 | CANON.md + VOCAB.md + README.md |
| BUSINESS | 102 | + {SCOPE}.md |
| ENTERPRISE | 153 | + COVERAGE.md + ROADMAP.md |
| AGENT | 204 | + LEARNING.md |
| MAGIC | 255 | + INTEL.md |
255 is the composition: all artifacts present, INTEL bridge connected, full governance.
Provider Landscape
| Provider | Type | Status | Use Case |
|---|---|---|---|
| Anthropic (Claude) | API | ACTIVE | Primary LLM — TALK, AGENT, compilation |
| RunPod | Serverless | ACTIVE | Open-source model inference |
| Vast.ai | Persistent | ACTIVE | Long-running model instances |
| OpenAI | API | Monitoring | Benchmark comparison |
BAKEOFF Harness
The BAKEOFF evaluates providers across latency, throughput, cost/token, and quality. Decision criteria: cost-adjusted quality per governed task. Results drive provider switching — not opinion.
Structure
Root MAGIC domains:
RUNPOD/ (serverless Runpod.io LLM provider scope).
VASTAI/ (Vast.ai persistent-instance LLM provider scope).
BAKEOFF/ (governed provider evaluation harness).
Required closure artifacts per scope:
CANON.md, README.md, {SCOPE}.md, VOCAB.md, ROADMAP.md, COVERAGE.md, LEARNING.md.
Learning lane per governed scope:
LEARNING.md at the scope root is terminal and SHALL NOT nest further LEARNING/.
Routes
web_docs: https://hadleylab.org/
web_surface: https://hadleylab.org/SERVICES/MAGIC/
magic: magic://hadleylab.org/SERVICES/MAGIC/
Ecosystem Connectivity
- Upstream:
canonic-canonic/MAGICcanonical law — the source of tier algebra and MAGIC compliance. - Runtime:
~/.canonicdiscovery/generation/relink workflows — compile-canon-json validates all. - TALK plane: provider switching feeds
/chat— Anthropic primary, fallback chain governed. - LEDGER plane: tier validation results logged — fake 255 fails at the compiler.
- Frontend: Jekyll + remote_theme (canonic-canonic/DESIGN) — governed surface rendering.
Pages
| Page | Sections |
|---|---|
| Overview | Purpose, Structure |
| Ecosystem | Routes, Ecosystem Connectivity |
Default: Overview.
INTEL
Provider Landscape
| Provider | Type | Status | Use Case |
|---|---|---|---|
| Anthropic (Claude) | API | ACTIVE | Primary LLM — TALK, AGENT, compilation |
| RunPod | Serverless | ACTIVE | Open-source model inference |
| Vast.ai | Persistent | ACTIVE | Long-running model instances |
| OpenAI | API | Monitoring | Benchmark comparison |
BAKEOFF Harness
| Dimension | Metric |
|---|---|
| Providers tested | RunPod, Vast.ai, Anthropic, OpenAI |
| Test types | Latency, throughput, cost/token, quality |
| Governance | BAKEOFF/ scope under MAGIC |
| Decision criteria | Cost-adjusted quality per governed task |
Infrastructure Stack
| Layer | Technology | Status |
|---|---|---|
| Compilation | compile-canon-json (Python) | ACTIVE |
| Frontend | Jekyll + remote_theme (canonic-canonic/DESIGN) | ACTIVE |
| API | Cloudflare Workers (api.canonic.org) | ACTIVE |
| Session store | Cloudflare KV (TALK_KV) | ACTIVE |
| Discovery | ~/.canonic discovery/generation/relink | ACTIVE |
| Auth | GitHub OAuth → session token | ACTIVE |
Tier Algebra
| Tier | Score | Artifacts |
|---|---|---|
| COMMUNITY | 051 | CANON.md + VOCAB.md + README.md |
| BUSINESS | 102 | + {SCOPE}.md |
| ENTERPRISE | 153 | + COVERAGE.md + ROADMAP.md |
| AGENT | 204 | + LEARNING.md |
| MAGIC | 255 | + INTEL.md |
MAGIC (255) is the composition: all artifacts present, INTEL bridge connected, full governance.
Fleet Topology
| Site | Repo | Role |
|---|---|---|
| CANONIC | canonic-canonic | Law (MAGIC compliance, LANGUAGE, MAGIC) |
| Foundation | canonic-foundation | IP (patents, disclosures) |
| Industries | canonic-industries | Verticals (REAL_ESTATE, etc.) |
| MAGIC | canonic-magic | Infrastructure (providers, toolchain) |
| Hadley Lab | hadleylab-canonic | Operations (DEXTER, SERVICES, USERS) |
Risk Assessment
| Risk | Severity | Mitigation |
|---|---|---|
| Provider lock-in | MEDIUM | BAKEOFF harness enables switching |
| API cost escalation | HIGH | COIN economy tracks consumption |
| Infrastructure downtime | MEDIUM | Cloudflare edge + static Jekyll fallback |
| Tier inflation (fake 255) | HIGH | Compiler validates actual artifact existence |
Test
| prompt | expect | cross |
|---|---|---|
| What is the tier algebra for governance completeness? | COMMUNITY,BUSINESS,ENTERPRISE,AGENT,255 | |
| What providers are in the BAKEOFF landscape? | Anthropic,RunPod,Vast.ai | |
| What score represents full governance composition? | 255,MAGIC | |
| What infrastructure serves the API layer? | Cloudflare Workers | TALK |
| How many fleet sites compose the governance topology? | canonic-canonic,hadleylab-canonic |
LEARNING
Patterns
| Date | Signal | Pattern | Source |
|---|---|---|---|
| 2026-02-14 | Service scopes need explicit closure artifacts to be machine-verifiable | SERVICES scope audit | |
| 2026-02-14 | Runtime evidence must be linked back to governance scope to avoid implicit assumptions | SERVICES/COVERAGE.md GAP-001 | |
| 2026-02-15 | Coverage truth is commit linkage; gaps are unmatched boundary commits, not missing prose | ~/.canonic/SERVICES/SHOP/IDF/discover.py |
|
| 2026-02-15 | discover relink is the fastest governed refresh path after generation/backpropagation |
~/.canonic/bin/learn discover relink |
|
| 2026-02-15 | Scope pins are required to prevent cross-developer drift during targeted learning ingestion | ~/.canonic/SERVICES/SHOP/IDF/generate.sh (IDF_REPO_PIN) |
|
| 2026-02-15 | Hard close-all mode can reach zero gaps quickly; governance gates must constrain when it is used | ~/.canonic/SERVICES/SHOP/IDF/generate.sh (IDF_CLOSE_ALL) |
|
| 2026-02-15 | Serverless provider adapters belong in governed leaf scopes (for example MAGIC/RUNPOD) so provider swaps do not bypass closure policy |
MAGIC scope update | |
| 2026-02-15 | Persistent-instance providers (for example MAGIC/VASTAI) are a pragmatic fallback when serverless workers fail to initialize |
VASTAI scope addition | |
| 2026-02-15 | Provider bakeoffs must be governed so routing decisions trace to evidence artifacts | BAKEOFF scope addition | |
| 2026-02-15 | NEW_SCOPE | New governance domain: SERVICES | 6673dc4 |
| 2026-02-15 | NEW_COMPOSITION | New composition: RUNPOD + VASTAI | 6673dc4 |
| 2026-02-15 | NEW_CONSTRAINT | New constraint: MUST: Service update SHALL backpropagate to SERVICES/README.md, SERVICES/COVERAGE.md, SERVICES/L | 6673dc4 |
| *LEARNING | MAGIC | 2026-02-17* |
ROADMAP
VOCAB
| Term | Definition |
|---|---|
| MAGIC | The operations layer composing INTEL + CHAT + COIN into governed services. |
INHERITANCE CHAIN
SERVICES
SERVICES compose primitives — INTEL + CHAT + COIN. Every service governed. Every scope discovered.
MUST: Maintain TRIAD integrity (CANON.md + VOCAB.md + README.md)
MUST: Treat SPEC as scope identity (`{SCOPE}` directory), not as a file
MUST: Every SERVICE scope include ROADMAP.md, COVERAGE.md, LEARNING.md, and `{SCOPE}.md` as governed content surfaces
MUST: Discover SERVICE scopes from filesystem only (no manual catalog)
MUST: Keep http:// and magic:// on the same namespace (transport differs, scope path matches)
MUST: CANON.md = axiom + universal constraints (no service names, no paths, no implementation)
MUST: README.md = how to run the CANON (nothing else)
MUST: {SCOPE}.md = SPEC — the interface (purpose, routes, projections, ecosystem)
MUST: SHOP.md = public projection file (per scope, filesystem-discoverable)
MUST: VAULT.md = private projection file (per scope, filesystem-discoverable)
MUST: Runtime implementation remains under ~/.canonic; this workspace is governance-first
MUST NOT: Hardcode service names in CANON constraints (law speaks universals)
MUST NOT: Define ungoverned terms outside VOCAB.md
MUST NOT: Treat `{SCOPE}.md` as SPEC identity
MUST NOT: Move architecture/lifecycle into README
MUST NOT: Leak private projections to public surfaces
MUST NOT: Maintain duplicate mapping tables outside generated manifest outputs
MUST NOT: Add runtime jargon to governance contracts
MUST: Ledger-consuming services declare source ledgers, scope filters, and closure gates
MUST: Learning governance remains live — closure claims require fresh DISCOVER → GENERATE → RELINK evidence
hadleylab-canonic
HADLEYLAB ships software. Every app, book, paper, deal, and patent is PROOF that MAGIC works. COIN = WORK. LEARNING = COMPUTE.
MUST: Every app, book, paper, deal, or patent is evidence of MAGIC MUST: All scopes inherit canonic-canonic/CANONIC.md governance MUST: All users governed under USERS/ via SERVICES/USER MUST: Cross-index INTEL across users (INTEL.md) MUST: Shared events propagate to ALL affected user dashboards MUST: Maintain governance workspace purity (.md files only) MUST: Ledger all COIN (validated work) through MAGIC 255 MUST: Compile all INTEL from governed sources MUST: Keep frontend/runtime implementation under ~/.canonic (hidden runtime) MUST: Surface governed TALK, Library, and SERVICES scopes (no orphan content) MUST: Derive nav labels from governed scope names (no hardcoded strings) MUST NOT: Publish without governance (CANON.md required) MUST NOT: Duplicate primitives — compose from INTEL, CHAT, COIN MUST NOT: Silo intelligence inside a single user when multiple are affected MUST NOT: Expose VAULT contents outside NDA scope MUST NOT: Store runtime artifacts in governance workspace
canonic-canonic
SPEC is governance. `canonic-canonic/` is the spec root.
MUST: Keep this repo governance-only (.md/.pdf) MUST: Publish workspace mapping in CANONIC.git (no hardcoded repo lists) MUST: Preserve three primary lanes: FOUNDATION, INDUSTRIES, MAGIC MUST NOT: Commit runtime artifacts here (runtime belongs in ~/.canonic/) MUST: Sell MAGIC tiers — the product, not the proof (proof is hadleylab-canonic) MUST NOT: Embed beta-test app URLs in platform page content