POLY · ARCHITECTURE

How Poly is put together

Thirteen diagrams, each answering one question about Poly v1.3.1: which way a program travels, what a check does in order, why the checker does not agree with the compiler by accident, and what the design names that the code does not yet build. Each opens as its own interactive page.

The diagrams

One question each

In reading order. Components link to the source they were drawn from, at the revision analysed.

01diagram · 6 components

How the parts fit together

What are the parts of poly, and which way does a program travel through them?

Source is checked and lowered by the pipeline, admitted into a signed certificate, loaded only by the runtime, and every step it takes is chained in the ledger, which feeds the next check.

Open the diagram ↗
02sequence · 8 participants

A check, in order

What happens, in order, when poly check runs on a machine?

The pipeline parses and lowers the machine, has sam-pattern validate it, has poly-ref compare it with the semantics, and only then lets polygraph explore it, with poly-ref confirming what polygraph finds.

Open the sequence ↗
03diagram · 6 components

Why the checker does not agree by accident

What keeps poly-ref from sharing the compiler's mistakes?

poly-ref imports no compiler code, only erased types from core, and the import-boundary script enforces it; the pipeline then requires poly-ref and polygraph to agree on counts and findings.

Open the diagram ↗
04diagram · 4 components

From a clean check to a loadable program

How does a clean check become something the runtime will load?

Admission re-runs the pipeline, refuses any check not run, signs a certificate over the digests, and the runtime refuses any file that no longer matches it.

Open the diagram ↗
05sequence · 5 participants

One effect, in order

What happens, in order, to a single effect a machine emits?

The kernel records the step, the worker checks and proposes the effect to the gate, the handler runs only on allow, and the worker settles the result and completes the intent.

Open the sequence ↗
06diagram · 9 components

From what ran to the next rule

How does a running program's history become a checked rule, workflow or calibration?

The feedback commands export the ledger as traces, a pinned tool proposes, a person signs a verdict, and the result goes back into the source and through the pipeline and admission like any edit.

Open the diagram ↗
07diagram · 4 components

How an agent reaches poly

How does a coding agent or an editor reach the checker and the runtime?

Through one command registry served three ways: the command line, an MCP server and a language server, plus a workflow server for work orders. A host adapter is a JSON file that launches one of them.

Open the diagram ↗
08diagram · 5 components

Which engines poly runs and which it checks itself

Which checks come from the vendored engines, and which does poly do on its own?

The engines explore, validate and decide policy; poly-ref confirms or contradicts what they report and alone decides deadlock, liveness and configurations.

Open the diagram ↗
09diagram · 4 components

What can refuse an effect before the policy

What can refuse or escalate an effect before the Polyaxion engine is asked?

The worker applies origin, memory, budget, grant and mandate checks first, each from the runtime, and each final whatever a policy says.

Open the diagram ↗
10diagram · 6 components

Where poly starts a process or opens a socket

Which parts may start a child process or touch the network?

Only poly-mine and poly-new start processes, and only poly-io opens sockets; the check path imports neither, and the scripts that enforce it run in CI.

Open the diagram ↗
11diagram · 6 components

What the design names and the code does not build

Which parts of docs/02-architecture.md have no code behind them at v1.1.0?

The version gate, the adequacy grade, the Polyx advisor and the Polytrion twin are not built, and the commands explain, grade, deploy and dispatch are listed as not built.

Open the diagram ↗
12diagram · 8 components

Why a retried refund runs once

How does poly keep an effect that cannot be undone from running twice when a delivery is retried?

The check refuses an irreversible effect with two or more attempts that names no guarantee, and the runtime puts the same key on every attempt.

Open the diagram ↗
13diagram · 4 components

How the demo uses poly

How does the refund demo run a checked program without being part of poly?

It admits a demo copy of the concierge through the ordinary admission, loads it on the ordinary runtime, and only supplies the room, the stand-in and the providers around it.

Open the diagram ↗

Generated from an analysis of the repository at 116bb50 (Poly v1.3.1) with archlens. The diagrams show what the code does, and mark what the design describes but the code does not build.

What the architecture commits to

Doctrines, guarantees and constraints

The statements the diagrams are drawn to support, as the architecture document gives them, with the risks it names against itself.

Doctrines

Guarantees

Constraints

Trade-offs

Risks