What the console should present — proposed information architecture
Status: PROPOSAL. Nothing in sections 3–8 is built. Written 2026-08-01 by Claude Opus 5 (Claude Code) at Pete's request. Section 2 describes what exists today so the gap is legible. Read with SPATIAL-MODEL-purpose-and-views.md, which covers the map surface itself.
1. The three problems this addresses
Everything runs under one path. The site map holds the site you are looking
at, which of the three views you are in, the zoom level, the pan position, the
layer filters and the current selection — all in React state, all under /. None
of it is in the URL. You cannot send someone *"the Ontario Line, schematic, Don
valley selected"*, the browser Back button does the wrong thing, and no record
anywhere in the console can link to where it is on a plan.
The console is organised by function, and a project is only a filter. Sixteen surfaces answer "how is the programme doing". None answers *"tell me everything about the Ontario Line"* — you assemble it by visiting six surfaces and filtering each one.
There is no way to add a project. The three that exist are hard-coded module literals. A demo can get away with that; a product cannot.
2. What exists today, honestly
| State | |
|---|---|
| Routes | 17 pages, flat, function-first. /projects/[id] exists as one scrolling page |
| Project record | app/lib/projects.ts — a static array. No create, edit or delete |
| Site plans | app/lib/sitePlans.ts — static. Three plans, hand-authored |
| Persistence | None on the deployed host. No DB bindings; everything is a static module plus browser state |
| Field submissions | /submissions reads console-side mock data, not real device tickets (WORKLIST E3) |
| Reports | Generated on the device (apps/esg-field/lib/report). The console cannot produce one |
| Progress / schedule | Does not exist anywhere. No stages, no milestones, no % complete |
| Diagrams | 21 authored SVGs in diagrams/SDMS/ESG/, programme-wide. Not bound to a project |
3. The shift: keep function-first, add project-first
There are two readers and they want opposite shapes.
- A programme or portfolio manager asks "where are my worst NCRs across all sites" — that is function-first, and the current surfaces are right for it.
- A project or site manager asks "everything about my project" — that is project-first, and today it does not exist.
Do not replace one with the other. The proposal is that the existing surfaces become explicitly the portfolio lens, and a new project workspace sits beside them as the project's own console, composed from the same registers.
4. The route table
Portfolio — the programme across all projects
/ portfolio home — the map of all sites
/brief ask · real-time
/my-work what needs you, across projects
/conversations history · memory
/compliance obligations and NCRs, all projects
/obligations sortable register
/permits permit register
/ledger decision log
/dashboard roll-up reporting
/inspections field capture, all projects
/submissions NCRs from the field, all projects
/maps reference sheets — printable drawings
/demoapp · /vui the two device surfaces
Project workspace — one project, everything about it
/projects the portfolio list
/projects/new CREATE A PROJECT ← new process, §6
/projects/[id] overview — the answer to "how is it going"
/projects/[id]/plan the site map (redirects to the default view)
/projects/[id]/plan/planimetric true position, to scale
/projects/[id]/plan/schematic true order and extent
/projects/[id]/plan/tabular no map — features and attributes
/projects/[id]/diagrams every drawing for this project §7
/projects/[id]/diagrams/[slug] one drawing, full size, printable
/projects/[id]/progress stages, milestones, % complete
/projects/[id]/obligations what this project must do
/projects/[id]/permits its permits and their expiry
/projects/[id]/inspections walks on this project
/projects/[id]/submissions NCRs raised from the field here
/projects/[id]/reports reports produced for this project
/projects/[id]/locations the control-area register
/projects/[id]/assets the asset register
/projects/[id]/team who is on it, and who may do what
/projects/[id]/settings identity, boundary, categories
State belongs in the URL
/projects/PRJ-ontario/plan/planimetric
?level=district
&at=612,430
&layers=water,noise,heritage
&zone=z-ol-dewater
Every one of those is component state today. Moving them to the URL buys three things that cannot be had otherwise: a link a colleague can open and see exactly what you saw, a Back button that steps back through what you actually did, and a record able to link to its own position on a plan — which is the thing the whole spatial model exists for and currently has no way to express.
5. What the project overview presents
One page that answers "how is this project going", in the order someone asks:
- Header — name, client, contract, phase, and the one-line status
- The plan, small and live, linking to the full surface. A project's state is spatial before it is tabular
- Progress — stage, % complete, next milestone, and what is late
- The numbers that matter, each derived and each clickable through to its register: open NCRs · findings by category · inspections this period · overdue obligations · permits expiring in 90 days · assets with no history
- From the field — the most recent submissions, as captured
- Reports — what has been produced, and for whom
- The diagram set — §7
- Activity — the project's own feed
Every figure derived, never restated, from the same registers the map draws from, so no two surfaces can disagree. That rule already holds for NCRs (WORKLIST E4) and should be the standing rule here.
6. Create a project — a genuinely new process
This is the largest new build, because it is the first thing in the console that writes.
Proposed steps:
| Step | What it captures | Exists? |
|---|---|---|
| 1 · Identity | name, client, code, contract, phase | trivial |
| 2 · Kind | corridor · building · area site — decides which plan model applies | new |
| 3 · Boundary | corridor: an alignment. Building: a floor plan. Area: a perimeter | new — see below |
| 4 · Control areas | the zones, each with a category | new |
| 5 · Assets | the register of things with histories | new |
| 6 · Applicability | which obligations and permits bind here | partly — registers exist |
| 7 · Team and access | who is on it, who may sign off | new — no role model exists |
Step 3 is the hard one, and it is worth saying plainly. Today every
alignment was recovered by hand from OpenStreetMap and committed as a TypeScript
literal. For a user to create a project the console needs at least one of:
paste GeoJSON · import from an OSM extract by bounding box · draw on a basemap ·
upload a CAD or PDF plan and georeference it. Those are four different projects
with four different costs. Recommendation: start with paste GeoJSON and
import-from-OSM, both of which reuse machinery that already exists in
scripts/build-corridor-basemap.mts. Drawing tools and CAD import are later.
The fork in the road. A create flow needs somewhere to write, and the
deployed host has no database bindings at all (WORKLIST E11 and the
esg-console-deployed-has-no-store note). So before step 1 is worth building,
one decision: D1 via the existing worker, or the event log via
esg-command. The event log is the better fit — a project is a thing whose
history matters, and ProjectCreated / ControlAreaAdded / AssetRegistered
are the natural events. But it is more work, and it is a decision, not a detail.
7. Diagrams, per project
"Every diagram for this project" means four different kinds of thing, and they should be labelled as such rather than mixed into one gallery.
| Kind | Examples | Generated or authored | Exists |
|---|---|---|---|
| The plan, live | planimetric · schematic · tabular | derived from the registers | yes |
| Printable sheets | street overlay · chainage sheet · indoor plan | generated by scripts/build-corridor-sheet.mts | yes, both corridors as of today |
| How work is done here | NCR lifecycle · inspection walk · audit walk · incident investigation | authored, programme-wide | yes (03–06) — not yet bound to a project |
| How the project is shaped | stage/progress diagram · obligation coverage · responsibility map | — | no |
Proposal for /projects/[id]/diagrams: one page, four labelled sections in that
order, each drawing with its provenance line and a full-size link. A drawing
that is generated from the registers should say so, because it means it cannot
be stale — and a drawing that is authored should say that too, because it can.
8. Phasing, in the order I would build it
- Routing and deep links. No new data, no new store. Moves site, view, level, pan, layers and selection into the URL. Immediately makes every plan linkable and fixes the Back button.
- Project workspace, composed.
/projects/[id]/*as filtered views over the existing registers. Still no writes. This is where "everything about a project" becomes true for the data that exists. - The diagram set per project — sections 1–3 of the table in §7. Section 4 waits for a progress model.
- Decide the store, then build create-a-project. Identity and control areas first; boundary import second.
- Progress and stages — needs a programme model that does not exist in this repo in any form. Scope it separately; do not let it block 1–4.
Steps 1–3 are re-arrangements of what is already here and carry little risk. Step 4 is the real product decision. Step 5 is a new domain.
9. What would have to be built that does not exist
Stated plainly so none of the above reads as nearer than it is.
- A store the console can write to. Nothing on the deployed host persists.
- A role and access model. "Who may sign off on this project" has no representation anywhere.
- File upload and georeferencing. No path for a floor plan or a CAD sheet.
- A programme model. Stages, milestones, baseline and progress do not exist.
- Console-side report generation. Reports are produced on the device today.
- A real field-submission path.
/submissionsis console-side mock data; the device's NCR tickets do not reach the console (WORKLIST E3).