What was decided, and why
Every decision here is REASONED from the tests and rulings named in its reason.
The picks that moved here from the wiring report
| Pick | Decided | Why |
|---|---|---|
| Merge queue | no queue; the 4 laws, our bot, CI on main | works on every plan |
| Generated files | a file every pull request edits is never committed; Go commits one per context | 0 conflicts measured |
| Observability | inside each context | your model |
| dependency.yaml tool | adopt; one per service, contexts say uses | your earlier pick; removing the last user must never delete a database by itself |
| Secret folder, own dependencies | /{service}/{kind}/{name}; shared stay /{kind}/{name} | two services cannot collide |
| Shared dependencies in a plain landscape | allowed | one sender per platform |
| Email sender | the platform's domain; optional brand domain per platform | works before a brand exists |
| Report style | Durian Hypermedia | the wiring report's look |
Where the model meets older rulings (gap scan section 4)
Your 21 Nov message is newer, so it wins where they clash. Everywhere else the older ruling stays.
| Older ruling | Decided | Kind |
|---|---|---|
| layers are the top folders | layers move inside the context | your model wins |
tests live under tests/, never beside code | contexts/<ctx>/tests/; same tier names; the house checks' globs change in the same step | your model wins |
docs at docs/domain/<context>/ | contexts/<ctx>/docs/; inner folders model/, architecture/, implementation/ | your model wins; model/ is the better name you asked for |
| problem id is snake_case | stays: <ctx>_<id> | ruling stays |
| no policy engine | stays: a policy is a named role check plus the owner check | ruling stays |
| user id passes through, never filled from the token | stays: Scope carries the owner exactly as the caller sent it, after the guard | ruling stays |
| one migration table per service | stays for Go and Bun: ids are <ctx>/<timestamp>_<name>. .NET is trade-off 2 | ruling stays, one question |
| no domain events | stays inside a context; only published integration events cross, through an outbox | narrowed |
| shared services run as their own services | stays: the kernel holds the port, client, definitions and generators; the running engine is a shared service | both hold |
| observability only where Helm exists | stays: the slot is empty in Helm-less templates | ruling stays |
| worker is its own template | one app, several hosts: api, worker, cron, migrate, MCP; each still deploys as its own module | changed |
| "module switch" names | one name: <ctx>.enabled | changed |
| no "organisation" word exists | not invented: Scope has room for a tenant, empty today | ruling stays |
- Renaming a context: the display name can change any time. The folder name never does. A true rename is a new context, then retire the old one.
- Links between owners inside one context: the owner id is in every child row from day 0. Whether they are database links follows the multi-region talk.
Decided from the proofs
| Question | Decided | Why |
|---|---|---|
| A project per layer or per context | per context, in all four | your model; built and run |
| Go: a module per context | no: a package tree in one module | per-context modules conflict |
| .NET: host lock file | none, as in today's template | 0 conflicts without it |
| .NET: slower clean build | accept; cache and test what changed | your model; one edit costs the same |
| How the kernel finds contexts | generated at build time | no reflection; fails early |
| Switching off a needed context | refused | no half-working app |
| Billing | a context-like shared service, not a kernel engine | only some contexts need it |
| Marketing, feedback, flags engines | listmonk, Fider, OpenFeature with flagd files | section 6 |
The four laws
Explorer
- 1. the path is the name
- context.yaml2. a claim is a git conflict: a random id
- 4. never edited once published
- 2. one file per free name
- 3. no file every pull request edits
What was not tested
| Area | Not tested |
|---|---|
| Merging | the bot as a GitHub Action or App; the automatic revert pull request; waiting for the pull request's own CI |
| All languages | the docs framework on a context; real engines behind the ports; MCP over a real client in every language |
| Go | a real Go app (none exists); SIT |
| Bun | real Postgres, Logto, regions with lag; two of four knip configs |
| .NET | the other zinc modules; Docker build; coverage gates; a breach of metric or cache-key names |
| Flutter | tests on a device; the template app as workspace root; generated Dart signals |
| Services | none was installed; costs and efforts are estimates; licences need the lawyer list |
| Multi-region | a job across all owners; nothing was asked of that study |
- The proofs were written before some rulings were folded in. The Flutter proof still uses an "org" field and a "functional" test folder. The design follows the rulings, not the proof.