Implement Workstream Health Index (WHI) KPI card

Add a live WHI card to the Workstreams page TOC sidebar. All six base
metrics from the spec (workstream-kpi.md) computed client-side from
existing data — no API or schema changes required.

Computation (workstreams.md):
- DD: dependency edges / open workstreams (normalised at DD_crit=1.0)
- BR: blocked workstreams / open workstreams
- SPR: max inbound deps on one incomplete workstream / open count
- PEP: active workstreams with all deps completed / open count
- CDDR: cross-domain edges / total edges
- CPI: DFS cycle detection (back-edge = 1, halves WHI as hard penalty)
- WHI = 0.30(1-DDnorm) + 0.25(1-BR) + 0.15(1-SPR) + 0.20·PEP + 0.10(1-CDDR)
- Per-domain breakdown using intra-domain edges only

Card UI: global WHI % with green/orange/red health label, sub-metric
rows with per-spec warning thresholds, cycle alert panel, per-domain
breakdown rows with coloured dots.

Also add src/docs/workstream-health-index.md reference page (formula,
thresholds, improvement guidance) and wire ? button on the card.
Add "Workstream Health" to Reference nav.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 00:03:27 +01:00
parent fc7dfa1b64
commit efd13b13dd
3 changed files with 328 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ export default {
pages: [
{ name: "Live Data", path: "/docs/live-data" },
{ name: "Workstreams", path: "/docs/workstreams" },
{ name: "Workstream Health", path: "/docs/workstream-health-index" },
{ name: "Decisions", path: "/docs/decisions" },
{ name: "Decision Health", path: "/docs/decisions-kpi" },
{ name: "Progress Log", path: "/docs/progress-log" },