A5.3.1 · dive 1/3
The runtime shape
Execution topology opens with a picture of the system while it runs — the supervision tree and the path a request takes from the front door to the domain.
A spec says what a rung must do. The runtime shape says what the running system
looks like: which processes exist, who supervises them, in what order they boot, and how a request flows to
the one domain entry point. The Portal's f6.1.llms.md pins two supervisors and one
request path, so a Claude Author reproduces the tree the brief draws rather than a tree it invents. Toggle
the figure on the right between the two app supervisors to read the tree the brief fixes.
The supervision tree · toggle the supervisor
The runtime shape
Execution topology is the brief's third part, and the runtime shape is its first piece: a picture of the system while it runs. It names two things and fixes both — the supervision tree (the OTP processes and the supervisor over each, with a restart strategy) and the request path (the ordered hops a request takes to the one domain entry point). The companion course teaches how the tree and the lifecycle work; the brief's job is to draw the exact shape this rung must run in.
For the Portal's web bootstrap, F6.1-R2 pins it: the tree splits across two app
supervisors, each strategy: :one_for_one. The :portal app
keeps the three F5 domain children (Portal.Store,
Portal.EventStore.adapter(), {Portal.Engine, []}); the
new :portal_web app supervises PortalWeb.Telemetry and
PortalWeb.Endpoint. The boundary is an app-level dependency arrow,
:portal_web → :portal, and that ordering boots the domain children before the
endpoint — the shape the agent reproduces, not one it chooses.
The principle
The runtime shape names what runs and how a request flows, so the agent builds the tree and the path the brief draws — not a tree it invents.
On the Portal
f6.1.llms.md pins two :one_for_one supervisors and the
boundary as an app-level dependency arrow :portal_web → :portal, so the
domain boots before the endpoint.
This dive draws the shape; the next, The task DAG, fixes the order it is built in — the same topology, read as a build plan.
The request path
The second half of the runtime shape is the request path: the ordered hops a request takes from the
endpoint, through the plug stack, to the one domain entry point. In f6.1.llms.md
that path runs Plug.Static → Plug.RequestId → Plug.Telemetry →
Plug.Parsers → Plug.Session → PortalWeb.Router, and from the router the courses route
reaches CourseController.index/2, which calls only the facade,
Portal.courses_of/1. Every domain path goes through the facade and returns either
data or a %Portal.Error{}.
One path is the exception. The health route — GET /health in the F6.1 brief
— returns 200 "ok" and performs no domain call. The brief names it as the one
path that does not reach the facade, so the agent does not wire a domain call where none belongs. Toggle the
figure below between the two routes to trace where each one ends. (The companion course walks the same hops
as the live request lifecycle through the endpoint.)
Which path reaches the facade · toggle the route
The runtime shape is the brief's picture of the running system the agent must reproduce.
On the Portal
The Portal's web bootstrap ships from f6.1.llms.md, and its runtime topology block
draws the whole shape at once: the two supervisors with their children, the
:portal_web → :portal app dependency that orders the boots, and the request
flow ending at the facade. None of that is in the spec; all of it is in the brief.
# f6.1.llms.md — the runtime shape (F6.1-R2): two app supervisors, both :one_for_one # :portal Portal.Application # apps/portal — domain ├─ Portal.Store # F5 — the read model courses_of/1 reads ├─ Portal.EventStore.adapter() # F5 — unchanged └─ {Portal.Engine, []} # F5 — unchanged (Bandit dropped → three) :portal_web PortalWeb.Application # apps/portal_web — NEW, dep {:portal, in_umbrella: true} ├─ PortalWeb.Telemetry └─ PortalWeb.Endpoint # boots AFTER :portal via the app dependency # # request flow: # Plug.Static → … → Plug.Session → PortalWeb.Router # └─ /courses/:user_id → CourseController.index/2 ──► Portal.courses_of/1 # └─ /health → 200 "ok" (no domain call — the one path that skips the facade)
The principle
The runtime shape draws what runs and how a request flows. Pin it, and the agent assembles the named tree and the named path — never a shape it has to invent under the spec's silence.
On the Portal
f6.1.llms.md pins the two :one_for_one supervisors, the
:portal_web → :portal dependency, and the request flow to
Portal.courses_of/1, with /health as the lone path that
skips the facade.
The runtime shape is the brief's picture of the running system the agent must reproduce.
Recap — the runtime shape draws the running system
The runtime shape is the first piece of a brief's execution topology: the supervision tree and the request
path, both fixed. On the Portal, F6.1-R2 splits the tree across two
:one_for_one app supervisors and orders the boot with the
:portal_web → :portal dependency; the request flows the plug stack to the one
facade, and only /health skips it. The next dive reads the same topology as a build
plan — the task DAG that fixes the order this shape is assembled in.
Next in A5.3: The task DAG — T1→T7, the
build order that keeps the app compiling at every step.
References
Primary sources for the machine-brief form that carries a runtime topology, for pinning the running shape as a contract, and where the request lifecycle this shape describes is taught in the companion course.
Sources
- llmstxt.org — The /llms.txt convention — the links-first machine-brief form that carries the runtime topology an agent reads before building.
- Hunt, A. & Thomas, D. — The Pragmatic Programmer — design by contract: pin the runtime shape so the builder reproduces it rather than inventing one.
- Anthropic — Building effective agents — why a coding agent needs the running shape fixed in the task, not an open-ended goal.
Related in this course
- A5.3 · Execution topology — the module hub this dive opens.
- A5 · The agent brief — the chapter landing.
- A4 · The spec layer — the spec a runtime shape derives from.
- Companion · The request lifecycle (F6) — the lifecycle whose endpoint, plug stack, and facade call this runtime shape describes.