portalStaging
Vision · where portal is heading

The spec is the plan. The code is the proof.

The spec states the plan first; the map shows how far the code has come. What a parser can read is drawn without AI, what only runs in production comes from traces, and anything in the spec that isn't in the code yet is shown as planned, never as built.

Drawn on an example system. Most of it runs today, for Cloudflare Workers and Docker Compose: see How it works. What's left is on the Roadmap. The spec below is a sketch; in a repo it's your architecture/*.c4, with rules as element metadata (only_writes_from, never_calls).

Planned dashed border

A box or call in the spec, not in the code yet. Turns solid when the code lands; stale if it stays planned for 28 days.

In the code solid border

Read from code and config by a parser. Links to the file and line.

Seen in traces solid border

Seen in traces only: calls the code makes through config or discovery. Shows the call count.

Unresolved dotted border

A call the parser found but can't name the target of. Listed, not guessed, until the spec names it.

1 · Intent first · the spec is the plan

A person (or their agent) writes the plan. Domains group the boxes (on the real map, each domain is a column); a declared box or call with no code yet is planned. The map shows both gaps: planned but not built, and built but not planned.

architecture/intent.c4the plan · written by a person
// the plan: what we intend
domain Checkout {
  orders-api, payments-api, postgres
  fraud-check  // new, not built yet
  orders-api -> fraud-check "screens orders"
}
domain Messaging {
  notifier, order-events
}
rule only Checkout writes postgres
rule payments-api never calls orders-api

Arrows the code already makes are drawn from the code. A box or call it doesn't make yet stays planned, dashed, until it does.

Checkout domain · intent.c4:2
orders-apiorders/wrangler.jsonc
payments-apipayments/wrangler…
postgreshyperdrive · :18
planned · 12 daysfraud-checkintent.c4:4 · no code
orders-api will call fraud-checkPlanned call · intent.c4:5 · "screens orders". Dashed until the code makes it.
Messaging domain · intent.c4:7
notifiertraces · 3,102 calls
order-eventswrangler.jsonc:31
Unplanned · in the code, not in the spec · PR #212
✕ breaks a ruleledger-syncsync/wrangler.jsonc

ledger-sync writes postgres, but the spec says only Checkout does.

src/sync.ts:30 · rule at intent.c4:10
Suggested · not confirmed from AI, changes intent only

Put ledger-sync in Checkout? It writes the same tables as orders-api.

The check portal facts fails on PR #212 until a person decides: move the write, or change the intent. The suggestion never draws a box or passes a check by itself.

2 · An existing repo · no spec yet

Code first works too: install the App and the map is there on the first push, read from the repo with no agent and no tokens. Write the intent afterwards. orders-api is selected; the panel lists each connection and how portal knows it.

Services
orders-apiorders/wrangler.jsonc
orders-api callspayments-apipayments/wrangler…
orders-api callsnotifiertraces · 3,102 calls
orders-api calls?Unresolved targetfetch(env.FRAUD_URL)
Events
orders-api publishesorder-eventswrangler.jsonc:31
Data
orders-api writespostgreshyperdrive · :18
ledgerpayments · d1 · :22