Maturity Epic Sealed + Cockpit Systems Tab
Maturity Epic #104 sealed: all 12 profile-types covered, age-tier-cap, admin-tunable weights, history sparklines. Plus Cockpit Systems tab with FAIR/ISMS scoring and 3-tier cost analysis.
Added
- Maturity profiles for the 7 remaining ecosystem-roles (`district`, `association`, `organisation`, `transform_consultant`, `agency`, `government`, `solution_provider`) — no more silent business-fallback
- Workspace-age tier cap (silver under 3mo, gold under 12mo, unlimited ≥12mo) with would-be-tier display in Cockpit Maturity hero
- Admin-tunable maturity weights via Cybernetic Core — per-profile, per-dimension override with 1.0 sum validation
- `Admin → Cybernetic Core → Weights` tab with profile selector + dimension table + sum-indicator + reset
- Maturity history snapshots (`workspaceMaturitySnapshots` collection) with daily-deduped 4-hour scheduler over active workspaces
- Inline sparkline trend in Cockpit Maturity hero — per-dimension and overall score
- `GET /api/spaces/[id]/maturity/history?days=N` endpoint with 5-min client-side TTL cache
- Cockpit **Systems** tab — CMDB-sourced view of every IT system with FAIR / ISMS / contract / ESG / AI metadata
- FAIR dimension visualization (5-segment horizontal bars per dimension, color-coded by level)
- Framework filter toggles on Systems tab (GDPR / NIS2 / DORA / ISO27001) with OR-semantics across multi-select
- Sort options on Systems tab — sovereignty / FAIR-score / name / cost / criticality, with rated-first / unrated-last for sovereignty + FAIR
- Header counter badges on Systems tab — `X low sovereignty · Y not assessed` for at-a-glance pain-point context
- 3-tier cost analysis with execution multipliers and time-window calculations (path / process / global metrics)
- `src/lib/bpmn/cost-math.ts` — pure-math helpers extracted as testable module (21 unit tests)
Changed
- Maturity engine `getProfileFor` async-resolves admin overrides via derived-config; sync `getDefaultProfile` exposed for tests; `getProfileFor` kept as `@deprecated` alias
- Maturity engine `getProfileFor()` default branch now only catches `null` / `undefined` ecosystem-role; all 12 roles resolve to dedicated profiles
Fixed
- Age-cap notice rendering "workspace is 1 months old" — fixed via `plugin-message-format` structured plurals across all three locales
Maturity Epic #104 — Sealed (M4–M6)
Three closing milestones for the Digital Maturity Level System:
M4 — Profile Round 2 + Age Cap: the engine grows from 5 to all 12 ecosystem-role profiles. district, association, organisation, transform_consultant, agency, government, and solution_provider join the existing five — no more silent business-fallback for these roles. Each profile is hand-tuned (agencies weight process pipelines, transform-consultants weight expertise, government leans hard into compliance, solution-providers prioritize the GTT capability tree). A workspace-age tier cap prevents template-spawn gaming: under 3 months cap at silver, under 12 months cap at gold, ≥12 months unlimited. The cap is a time gate, not a score penalty, and surfaces in the hero with the would-be tier shown alongside.
M5 — Cybernetic Core admin-tunable weights: maturity weights are no longer hardcoded. A new Admin → Cybernetic Core → Weights tab lets platform admins override any dimension weight per profile. The maturity engine reads merged profiles at runtime via a derived-config layer with 1-min TTL — no redeploy needed for tuning. Validation enforces complete weight-sets that sum to 1.0; orphan-key protection guards against schema-drift. Hardcoded defaults remain as fallback.
M6 — History snapshots + sparkline trend: a new workspaceMaturitySnapshots collection records daily-deduped score snapshots via a 4-hour scheduler over active workspaces. The Cockpit Maturity hero gains inline sparklines per dimension (and overall), backed by a GET /api/spaces/[id]/maturity/history endpoint with a 5-minute client-side TTL cache.
Cockpit Systems Tab — CMDB-sourced
The Systems tab pivots from analytics-derived (only systems referenced in validated processes) to CMDB-sourced (every IT system in the workspace, with full FAIR / ISMS / contract / ESG / AI metadata). Default sort surfaces lowest-sovereignty systems first — the actual pain points — with not-yet-assessed systems pushed to the end with a clear visual treatment. Four-state UX (loading / error / no-data / no-matches), framework filter toggles for GDPR / NIS2 / DORA / ISO27001 with OR-semantics, header counter badges (X low sovereignty · Y not assessed).
3-tier Cost Analysis
A path / process / global cost analysis with execution multipliers and time-window calculations is now part of the codebase. Pure-math helpers (path traversal, weighted gateway merge, per-time multipliers) live in a new src/lib/bpmn/cost-math.ts module — 21 unit tests cover gateway semantics, loops, multipliers, and global aggregation. The Svelte 5 component is fully internationalised across en/de/es and uses theme tokens.
Polish
Age-cap plural rendering migrated to plugin-message-format structured plurals — fixes "workspace is 1 months old" across all three locales.