View B
Architecture

How it’s built — the five layers, the data contract, kernel and shell, and the path from template to a finished cockpit. One load-bearing distinction: kernel and shell are pinned (never edited in the consumer), the template is copied and filled.

The backbone

The five layers

Every cockpit is made of the same five layers. The middle column — pinned or copied — is the most important distinction: it decides what you touch and what you adopt unchanged.

LayerWhatWhereLifecycle
ContractThe 4-axis model + JSON schema — the shape-truth.contract/ + references/versioned
KernelThe pure compute core — Gate·Fit·Cost·Risk scoring + fork narrowing.engine/kernel.jspinned
ShellThe mechanism — boot/render/URL loop, view registry, fork renderers.shell/shell.jspinned
TemplateThe copy-me scaffold — spec over mount() + station renderers + stub data.template/copied
InstanceThe filled template — one engagement’s cockpit.customers/*/site/filled

Pinned vs. copied — kernel and shell are pinned via the _methodology submodule and never edited in the consumer (like brand → website/_brand); improvements flow back, then the consumer re-pins. The template is copied and filled.

The data contract

Schema as shape-truth

The data contract used to be prose documentation you followed by hand. Plan 15 inverted it: the JSON schema (contract/schema/) is now the machine-checkable source of shape-truth, with contract.md the doctrine on top.

Two-tier validation + MR-5
The validator checks shape (JSON Schema 2020-12 via Ajv) and semantics (cross-refs, consistency) — plus an MR-5 doc-lint that guarantees every field carries a description. That guarantee is exactly what makes the field reference generatable.

→ The generated field reference  ·  → The data contract in detail  ·  → The data pipeline & CLIs

The most-trodden path

Build a cockpit

A new solution cockpit is born by copying template/ — never by forking another engagement.

  1. 1

    copy

    Template → site/

    Copy the copy-me scaffold template/ into <engagement>/site/.

  2. 2

    fill

    Fill data/

    Author the data — JSON files, or per-record YAML shards for the big ones (solutions · research).

  3. 3

    build

    Assemble

    assemble.mjs stitches shards → the served JSON; generators emit requirements.md / landscape.json.

  4. 4

    check

    Validate

    node contract/validate.mjs <engagement>/data — shape, semantics, docs.

  5. 5

    live

    Deploy

    CI builds the static site and ships it to the Caddy VM.

→ The data pipeline & CLIs  ·  → The front-end & the build in detail

Consume the engine

Pin kernel & shell

Both cockpits consume kernel + shell through one pinned _methodology submodule — like the website pulls the brand via _brand. The instance supplies only a thin spec.

The shell owns the mechanism (boot → load → render loop, view registry, fork renderers, keyboard nav); the instance supplies the content (the data manifest, the render(ctx) callbacks per view, the cost hooks). app.js is a thin instance spec over DecisionShell.mount(spec).

<!-- Load order: brand tokens → brand CSS → shell CSS → app CSS,
     then kernel → shell → app -->
<link rel="stylesheet" href="styles/tokens.css">
<link rel="stylesheet" href="shell.css">
<script defer src="engine/kernel.js"></script>
<script defer src="shell.js"></script>
<script defer src="app.js"></script>
The one rule — never edit a pinned copy in place. Improvements flow back to engine//shell/, then the consumer re-pins.
Per project

Extend, don’t fork

Whatever an engagement needs on top goes into an extension — not a fork of the core. An extension schema composes the base (allOf + $ref) and adds its own fields; unevaluatedProperties: false rejects anything neither base nor extension documents.

  • skischule — cost engine

    A typed cost model (seasonal seats, annual discount, peak weeks) as a per-project extension of the base solutions schema.

  • ehimare — integration facet

    A 6th facet (integration) alongside the five generic knowledge facets — how the core tool docks the AI layer.

→ The extensions in the field reference

Deeper doctrine

Read on

← Back to the overview