@purview-dev/pm-docs-site 0.0.0-stage → 0.1.0-pre.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +9 -0
- package/README.md +219 -2
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +90 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +118 -0
- package/dist/options.d.ts +5 -0
- package/dist/options.js +46 -0
- package/dist/repo-docs.d.ts +33 -0
- package/dist/repo-docs.js +94 -0
- package/dist/schema-version.d.ts +10 -0
- package/dist/schema-version.js +19 -0
- package/dist/sidebar.d.ts +10 -0
- package/dist/sidebar.js +30 -0
- package/dist/site-options.d.ts +9 -0
- package/dist/site-options.js +39 -0
- package/dist/types.d.ts +47 -0
- package/dist/types.js +4 -0
- package/lib/repo-docs.ts +124 -0
- package/lib/schema-version.ts +24 -0
- package/package.json +68 -5
- package/src/components/ExportStamp.astro +29 -0
- package/src/components/FeatureSummary.astro +160 -0
- package/src/components/FeatureTable.astro +64 -0
- package/src/components/ItemDetail.astro +16 -0
- package/src/components/ItemDialog.astro +16 -0
- package/src/components/LinkedFrom.astro +33 -0
- package/src/components/LinkedText.astro +12 -0
- package/src/components/PlanInteractions.astro +30 -0
- package/src/components/RefLink.astro +18 -0
- package/src/components/StateBadge.astro +15 -0
- package/src/components/board/Board.tsx +244 -0
- package/src/components/board/KanbanItemCard.tsx +129 -0
- package/src/components/board/LinkRuns.tsx +21 -0
- package/src/components/board/TaskKanbanCard.tsx +81 -0
- package/src/components/board/useBoardUrlState.ts +41 -0
- package/src/components/lib/KanbanItemCard.astro +264 -0
- package/src/components/lib/StatusTimelineFeed.astro +194 -0
- package/src/components/lib/TaskKanbanCard.astro +215 -0
- package/src/components/timeline/Timeline.tsx +159 -0
- package/src/components/timeline/useTimelineLayout.ts +39 -0
- package/src/content.config.ts +16 -0
- package/src/env.d.ts +7 -0
- package/src/lib/board-data.ts +84 -0
- package/src/lib/board.ts +209 -0
- package/src/lib/planning-types.ts +207 -0
- package/src/lib/planning.ts +415 -0
- package/src/lib/references.ts +360 -0
- package/src/lib/timeline.ts +156 -0
- package/src/loaders/repo-docs.ts +69 -0
- package/src/pages/index.astro +158 -0
- package/src/pages/plan/board.astro +41 -0
- package/src/pages/plan/log.astro +83 -0
- package/src/pages/plan/risks/[id].astro +72 -0
- package/src/pages/plan/risks.astro +263 -0
- package/src/pages/plan/roadmap.astro +108 -0
- package/src/routes/plan/briefs.astro +66 -0
- package/src/routes/plan/features/[id].astro +113 -0
- package/src/routes/plan/features/index.astro +29 -0
- package/src/routes/plan/inbox.astro +78 -0
- package/src/routes/plan/milestones/[milestone].astro +113 -0
- package/src/routes/plan/milestones/index.astro +56 -0
- package/src/routes/plan/now.astro +135 -0
- package/src/routes/plan/strategy.astro +194 -0
- package/src/scripts/plan.ts +40 -0
- package/src/styles/components.css +491 -0
- package/src/styles/kanban.css +277 -0
- package/src/styles/timeline.css +210 -0
- package/src/styles/width.css +4 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The site's front page: where the project is, from planning.json, and the
|
|
3
|
+
// way into the plan and the repository docs (the integration's options).
|
|
4
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
5
|
+
|
|
6
|
+
import ExportStamp from '../components/ExportStamp.astro';
|
|
7
|
+
import LinkedText from '../components/LinkedText.astro';
|
|
8
|
+
import RefLink from '../components/RefLink.astro';
|
|
9
|
+
import { loadPlanning, milestoneId } from '../lib/planning';
|
|
10
|
+
import config from 'virtual:pm-docs-site/config';
|
|
11
|
+
import '../styles/components.css';
|
|
12
|
+
|
|
13
|
+
const planning = loadPlanning();
|
|
14
|
+
const { counts, checks } = planning;
|
|
15
|
+
const focusId = milestoneId(planning.strategy.focus.milestone, planning.strategy.milestones);
|
|
16
|
+
|
|
17
|
+
const figures = [
|
|
18
|
+
{ label: 'In Next', value: `${counts.next} of ${counts.nextMax}` },
|
|
19
|
+
{ label: 'In Later', value: counts.later },
|
|
20
|
+
{ label: 'Done', value: counts.done },
|
|
21
|
+
{ label: 'Open ideas', value: counts.openInbox },
|
|
22
|
+
{ label: 'Blocked', value: counts.blockers },
|
|
23
|
+
{ label: 'Red risks', value: `${counts.redRisks} of ${counts.openRisks}` },
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
const redRisks = planning.risks.open.filter((risk) => risk.rag === 'red');
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
<StarlightPage
|
|
30
|
+
frontmatter={{
|
|
31
|
+
title: config.title,
|
|
32
|
+
...(config.description ? { description: config.description } : {}),
|
|
33
|
+
template: 'splash',
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
<ExportStamp />
|
|
37
|
+
|
|
38
|
+
<section>
|
|
39
|
+
<h2>Focus</h2>
|
|
40
|
+
<p>
|
|
41
|
+
<strong>
|
|
42
|
+
{focusId ? <RefLink ref={focusId} /> : planning.strategy.focus.milestone ? <LinkedText text={planning.strategy.focus.milestone} /> : 'No focus set'}
|
|
43
|
+
</strong>
|
|
44
|
+
</p>
|
|
45
|
+
{planning.strategy.focus.whyNow && (
|
|
46
|
+
<p>
|
|
47
|
+
<LinkedText text={planning.strategy.focus.whyNow} />
|
|
48
|
+
</p>
|
|
49
|
+
)}
|
|
50
|
+
<p>
|
|
51
|
+
{
|
|
52
|
+
planning.now.item ? (
|
|
53
|
+
<>
|
|
54
|
+
Now:{' '}
|
|
55
|
+
<strong>
|
|
56
|
+
{config.views.now ? (
|
|
57
|
+
<a href="/plan/now/">
|
|
58
|
+
{planning.now.item.id} {planning.now.item.title}
|
|
59
|
+
</a>
|
|
60
|
+
) : (
|
|
61
|
+
<RefLink ref={planning.now.item.id} />
|
|
62
|
+
)}
|
|
63
|
+
</strong>{' '}
|
|
64
|
+
({planning.now.stage})
|
|
65
|
+
</>
|
|
66
|
+
) : (
|
|
67
|
+
'Nothing is in progress.'
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
</p>
|
|
71
|
+
</section>
|
|
72
|
+
|
|
73
|
+
<section>
|
|
74
|
+
<h2>Figures</h2>
|
|
75
|
+
<dl class="home-figures">
|
|
76
|
+
{
|
|
77
|
+
figures.map((figure) => (
|
|
78
|
+
<div>
|
|
79
|
+
<dt>{figure.label}</dt>
|
|
80
|
+
<dd>{figure.value}</dd>
|
|
81
|
+
</div>
|
|
82
|
+
))
|
|
83
|
+
}
|
|
84
|
+
</dl>
|
|
85
|
+
</section>
|
|
86
|
+
|
|
87
|
+
<section>
|
|
88
|
+
<h2>Ready to start</h2>
|
|
89
|
+
{checks.claimable.length === 0 && <p class="plan-empty">Nothing in Next can be started.</p>}
|
|
90
|
+
<ul>
|
|
91
|
+
{
|
|
92
|
+
checks.claimable.map((id) => (
|
|
93
|
+
<li>
|
|
94
|
+
<RefLink ref={id} />
|
|
95
|
+
</li>
|
|
96
|
+
))
|
|
97
|
+
}
|
|
98
|
+
</ul>
|
|
99
|
+
</section>
|
|
100
|
+
|
|
101
|
+
<section>
|
|
102
|
+
<h2>Red risks</h2>
|
|
103
|
+
{redRisks.length === 0 && <p class="plan-empty">No open risk is red.</p>}
|
|
104
|
+
<ul>
|
|
105
|
+
{
|
|
106
|
+
redRisks.map((risk) => (
|
|
107
|
+
<li>
|
|
108
|
+
<span class="rag rag--red">red</span> <strong><RefLink ref={risk.id} label="id" /></strong>{' '}
|
|
109
|
+
<LinkedText text={risk.title} /> — mitigation: {risk.mitigation ? <LinkedText text={risk.mitigation} /> : 'none'}
|
|
110
|
+
</li>
|
|
111
|
+
))
|
|
112
|
+
}
|
|
113
|
+
</ul>
|
|
114
|
+
</section>
|
|
115
|
+
|
|
116
|
+
<section>
|
|
117
|
+
<h2>Read on</h2>
|
|
118
|
+
<ul>
|
|
119
|
+
{config.views.now && <li><a href="/plan/now/">Now</a> — the active item, its checkpoint and its plan</li>}
|
|
120
|
+
<li><a href="/plan/board/">Board</a> — Now, Next, For you, Waiting and Done</li>
|
|
121
|
+
<li><a href="/plan/roadmap/">Roadmap</a> — milestones in order</li>
|
|
122
|
+
{config.views.milestones && <li><a href="/plan/milestones/">Milestones</a> — each milestone, its exit criteria and its items</li>}
|
|
123
|
+
{config.views.features && <li><a href="/plan/features/">Features</a> — every item, with a page each</li>}
|
|
124
|
+
<li><a href="/plan/log/">Log</a> — done, dropped and reviews</li>
|
|
125
|
+
<li><a href="/plan/risks/">Risks</a> — the risk register by RAG status</li>
|
|
126
|
+
{config.views.inbox && <li><a href="/plan/inbox/">Inbox</a> — parked ideas, bugs and questions</li>}
|
|
127
|
+
{config.views.briefs && <li><a href="/plan/briefs/">Briefs</a> — shaped ideas and their decisions</li>}
|
|
128
|
+
{config.views.strategy && <li><a href="/plan/strategy/">Strategy</a> — the vision, bets, assumptions and decisions</li>}
|
|
129
|
+
<li>Search — every page above is in the site search once it is built (<code>just docs-preview</code>)</li>
|
|
130
|
+
{config.docs !== null && <li>Documentation — the repository's Markdown, grouped in the sidebar</li>}
|
|
131
|
+
</ul>
|
|
132
|
+
</section>
|
|
133
|
+
</StarlightPage>
|
|
134
|
+
|
|
135
|
+
<style>
|
|
136
|
+
.home-figures {
|
|
137
|
+
display: grid;
|
|
138
|
+
grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
|
|
139
|
+
gap: 0.75rem;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.home-figures > div {
|
|
143
|
+
padding: 0.75rem 1rem;
|
|
144
|
+
border: 1px solid var(--sl-color-hairline);
|
|
145
|
+
border-radius: 10px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.home-figures dt {
|
|
149
|
+
color: var(--sl-color-gray-3);
|
|
150
|
+
font-size: var(--sl-text-sm);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.home-figures dd {
|
|
154
|
+
margin: 0;
|
|
155
|
+
font-size: var(--sl-text-2xl);
|
|
156
|
+
font-weight: 700;
|
|
157
|
+
}
|
|
158
|
+
</style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The task board, column by column, from planning.json's `board.columns` —
|
|
3
|
+
// the same columns the pm-board skill renders — as a server-rendered React
|
|
4
|
+
// island (src/components/board/Board.tsx) that filters the cards and
|
|
5
|
+
// collapses columns. Each card links to its item's page; a plain click opens
|
|
6
|
+
// the item popup (src/scripts/plan.ts) from the templates below.
|
|
7
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
8
|
+
|
|
9
|
+
import Board from '../../components/board/Board';
|
|
10
|
+
import ExportStamp from '../../components/ExportStamp.astro';
|
|
11
|
+
import ItemDetail from '../../components/ItemDetail.astro';
|
|
12
|
+
import ItemDialog from '../../components/ItemDialog.astro';
|
|
13
|
+
import PlanInteractions from '../../components/PlanInteractions.astro';
|
|
14
|
+
import { boardCards } from '../../lib/board-data';
|
|
15
|
+
import { loadPlanning } from '../../lib/planning';
|
|
16
|
+
import { siteRefs } from '../../lib/references';
|
|
17
|
+
import '../../styles/components.css';
|
|
18
|
+
import '../../styles/kanban.css';
|
|
19
|
+
|
|
20
|
+
const planning = loadPlanning();
|
|
21
|
+
const { known } = siteRefs();
|
|
22
|
+
const cards = boardCards(planning, known);
|
|
23
|
+
const milestones = planning.strategy.milestones.map(({ id, name }) => ({ id, name }));
|
|
24
|
+
// One popup template per item with a page, even when the same item is on two cards.
|
|
25
|
+
const details = [...new Set(cards.filter((card) => card.href && card.id).map((card) => card.id!))];
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
<StarlightPage
|
|
29
|
+
frontmatter={{ title: 'Board', description: 'Now, Next, For you, Waiting and Done.', tableOfContents: false }}
|
|
30
|
+
>
|
|
31
|
+
<ExportStamp />
|
|
32
|
+
<PlanInteractions />
|
|
33
|
+
|
|
34
|
+
<!-- `not-content`: Starlight's prose spacing would push every column after the first down. -->
|
|
35
|
+
<div class="plan-columns not-content">
|
|
36
|
+
<Board client:load cards={cards} milestones={milestones} />
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
{details.map((id) => <ItemDetail id={id} />)}
|
|
40
|
+
<ItemDialog />
|
|
41
|
+
</StarlightPage>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Done, dropped and reviews, newest first, from planning.json's
|
|
3
|
+
// `board.activity`. A done item's plan links to its page on this site.
|
|
4
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
5
|
+
|
|
6
|
+
import ExportStamp from '../../components/ExportStamp.astro';
|
|
7
|
+
import LinkedText from '../../components/LinkedText.astro';
|
|
8
|
+
import RefLink from '../../components/RefLink.astro';
|
|
9
|
+
import { docsHref, loadPlanning } from '../../lib/planning';
|
|
10
|
+
import '../../styles/components.css';
|
|
11
|
+
|
|
12
|
+
const planning = loadPlanning();
|
|
13
|
+
// `activity` carries no plan path; the Done log does.
|
|
14
|
+
const plans = new Map(planning.log.done.filter((entry) => entry.id).map((entry) => [entry.id, entry.plan]));
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<StarlightPage frontmatter={{ title: 'Log', description: 'What was done, dropped and reviewed, newest first.', tableOfContents: false }}>
|
|
18
|
+
<ExportStamp />
|
|
19
|
+
|
|
20
|
+
<table class="log-table">
|
|
21
|
+
<thead>
|
|
22
|
+
<tr>
|
|
23
|
+
<th scope="col">Date</th>
|
|
24
|
+
<th scope="col">Kind</th>
|
|
25
|
+
<th scope="col">Item</th>
|
|
26
|
+
<th scope="col">Result</th>
|
|
27
|
+
</tr>
|
|
28
|
+
</thead>
|
|
29
|
+
<tbody>
|
|
30
|
+
{
|
|
31
|
+
planning.board.activity.map((entry) => {
|
|
32
|
+
const plan = entry.kind === 'done' && entry.id ? docsHref(plans.get(entry.id) ?? null) : null;
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<tr>
|
|
36
|
+
<td>{entry.date}</td>
|
|
37
|
+
<td>
|
|
38
|
+
<span class={`log-kind log-kind--${entry.kind}`}>{entry.kind}</span>
|
|
39
|
+
</td>
|
|
40
|
+
<td>
|
|
41
|
+
{entry.id ? <RefLink ref={entry.id} /> : <LinkedText text={entry.title} />}
|
|
42
|
+
{plan && (
|
|
43
|
+
<>
|
|
44
|
+
{' '}
|
|
45
|
+
(<a href={plan}>plan</a>)
|
|
46
|
+
</>
|
|
47
|
+
)}
|
|
48
|
+
</td>
|
|
49
|
+
<td>
|
|
50
|
+
<LinkedText text={entry.result} />
|
|
51
|
+
</td>
|
|
52
|
+
</tr>
|
|
53
|
+
);
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
</tbody>
|
|
57
|
+
</table>
|
|
58
|
+
</StarlightPage>
|
|
59
|
+
|
|
60
|
+
<style>
|
|
61
|
+
.log-table td:first-child {
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.log-kind {
|
|
66
|
+
padding: 0.1rem 0.45rem;
|
|
67
|
+
border-radius: 4px;
|
|
68
|
+
font-size: var(--sl-text-xs);
|
|
69
|
+
text-transform: uppercase;
|
|
70
|
+
letter-spacing: 0.03em;
|
|
71
|
+
border: 1px solid var(--sl-color-hairline);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.log-kind--done {
|
|
75
|
+
color: #047857;
|
|
76
|
+
border-color: #10b98166;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.log-kind--dropped {
|
|
80
|
+
color: #b91c1c;
|
|
81
|
+
border-color: #ef444466;
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One open or closed risk from planning.json's `risks`: its rating, owner and
|
|
3
|
+
// dates, what it affects, its trigger and mitigation, and what links to it.
|
|
4
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
5
|
+
|
|
6
|
+
import ExportStamp from '../../../components/ExportStamp.astro';
|
|
7
|
+
import LinkedFrom from '../../../components/LinkedFrom.astro';
|
|
8
|
+
import LinkedText from '../../../components/LinkedText.astro';
|
|
9
|
+
import { loadPlanning } from '../../../lib/planning';
|
|
10
|
+
import type { Risk } from '../../../lib/planning-types';
|
|
11
|
+
import '../../../styles/components.css';
|
|
12
|
+
|
|
13
|
+
export function getStaticPaths() {
|
|
14
|
+
const { risks } = loadPlanning();
|
|
15
|
+
|
|
16
|
+
return [...risks.open, ...risks.closed].map((risk) => ({ params: { id: risk.id.toLowerCase() }, props: { risk } }));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const { risk } = Astro.props as { risk: Risk };
|
|
20
|
+
|
|
21
|
+
const facts: { label: string; value: string }[] = [
|
|
22
|
+
{ label: 'Likelihood', value: risk.likelihood },
|
|
23
|
+
{ label: 'Impact', value: risk.impact },
|
|
24
|
+
...(risk.ragOverride ? [{ label: 'RAG override', value: risk.ragOverride }] : []),
|
|
25
|
+
{ label: 'Status', value: risk.status },
|
|
26
|
+
{ label: 'Owner', value: risk.owner },
|
|
27
|
+
...(risk.raised ? [{ label: 'Raised', value: risk.raised }] : []),
|
|
28
|
+
{ label: 'Reviewed', value: risk.reviewed ?? 'never' },
|
|
29
|
+
...(risk.closed ? [{ label: 'Closed', value: risk.closed }] : []),
|
|
30
|
+
];
|
|
31
|
+
const prose = [
|
|
32
|
+
{ label: 'Affects', text: risk.affects },
|
|
33
|
+
{ label: 'Trigger', text: risk.trigger },
|
|
34
|
+
{ label: 'Mitigation', text: risk.mitigation },
|
|
35
|
+
];
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
<StarlightPage
|
|
39
|
+
frontmatter={{ title: `${risk.id} ${risk.title}`, description: `${risk.rag} risk, ${risk.status}.`, tableOfContents: false }}
|
|
40
|
+
>
|
|
41
|
+
<ExportStamp kind="Risk" />
|
|
42
|
+
|
|
43
|
+
<p>
|
|
44
|
+
<span class={`rag rag--${risk.rag}`}>{risk.rag}</span>
|
|
45
|
+
{' '}
|
|
46
|
+
<a href="/plan/risks/">All risks</a>
|
|
47
|
+
</p>
|
|
48
|
+
|
|
49
|
+
<dl class="plan-facts">
|
|
50
|
+
{
|
|
51
|
+
facts.map((fact) => (
|
|
52
|
+
<div>
|
|
53
|
+
<dt>{fact.label}</dt>
|
|
54
|
+
<dd>
|
|
55
|
+
<LinkedText text={fact.value} />
|
|
56
|
+
</dd>
|
|
57
|
+
</div>
|
|
58
|
+
))
|
|
59
|
+
}
|
|
60
|
+
</dl>
|
|
61
|
+
|
|
62
|
+
{
|
|
63
|
+
prose.map((entry) => (
|
|
64
|
+
<section>
|
|
65
|
+
<h2>{entry.label}</h2>
|
|
66
|
+
<p>{entry.text ? <LinkedText text={entry.text} /> : 'none'}</p>
|
|
67
|
+
</section>
|
|
68
|
+
))
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
<LinkedFrom ref={risk.id} />
|
|
72
|
+
</StarlightPage>
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The risk register from planning.json's `risks`: the RAG counts, the
|
|
3
|
+
// likelihood × impact matrix of open risks, then open, closed and removed risks.
|
|
4
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
5
|
+
|
|
6
|
+
import ExportStamp from '../../components/ExportStamp.astro';
|
|
7
|
+
import LinkedText from '../../components/LinkedText.astro';
|
|
8
|
+
import RefLink from '../../components/RefLink.astro';
|
|
9
|
+
import { loadPlanning, riskMatrix } from '../../lib/planning';
|
|
10
|
+
import '../../styles/components.css';
|
|
11
|
+
|
|
12
|
+
const planning = loadPlanning();
|
|
13
|
+
const { risks, counts } = planning;
|
|
14
|
+
const matrix = riskMatrix(risks.open);
|
|
15
|
+
|
|
16
|
+
const figures = [
|
|
17
|
+
{ label: 'Red', value: counts.redRisks, rag: 'red' },
|
|
18
|
+
{ label: 'Amber', value: counts.amberRisks, rag: 'amber' },
|
|
19
|
+
{ label: 'Green', value: counts.greenRisks, rag: 'green' },
|
|
20
|
+
{ label: 'Closed', value: risks.closed.length, rag: null },
|
|
21
|
+
];
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<StarlightPage frontmatter={{ title: 'Risks', description: 'The risk register: open risks by RAG status, then closed and removed risks.', tableOfContents: false }}>
|
|
25
|
+
<ExportStamp />
|
|
26
|
+
|
|
27
|
+
<section>
|
|
28
|
+
<h2>Open risks: {counts.openRisks}</h2>
|
|
29
|
+
<dl class="risk-figures">
|
|
30
|
+
{
|
|
31
|
+
figures.map((figure) => (
|
|
32
|
+
<div class={figure.rag ? `risk-figure--${figure.rag}` : undefined}>
|
|
33
|
+
<dt>{figure.label}</dt>
|
|
34
|
+
<dd>{figure.value}</dd>
|
|
35
|
+
</div>
|
|
36
|
+
))
|
|
37
|
+
}
|
|
38
|
+
</dl>
|
|
39
|
+
</section>
|
|
40
|
+
|
|
41
|
+
<section>
|
|
42
|
+
<h2>Likelihood × impact</h2>
|
|
43
|
+
<div class="risk-matrix not-content" role="table" aria-label="Open risks by likelihood and impact">
|
|
44
|
+
<div role="row" class="risk-matrix__row">
|
|
45
|
+
<span role="columnheader" class="risk-matrix__corner">Impact ↓ / Likelihood →</span>
|
|
46
|
+
{matrix[0]!.map((cell) => <span role="columnheader" class="risk-matrix__axis">{cell.likelihood}</span>)}
|
|
47
|
+
</div>
|
|
48
|
+
{
|
|
49
|
+
matrix.map((row) => (
|
|
50
|
+
<div role="row" class="risk-matrix__row">
|
|
51
|
+
<span role="rowheader" class="risk-matrix__axis">{row[0]!.impact}</span>
|
|
52
|
+
{row.map((cell) => (
|
|
53
|
+
<div role="cell" class={`risk-matrix__cell risk-matrix__cell--${cell.rag}`}>
|
|
54
|
+
{cell.risks.length === 0 ? (
|
|
55
|
+
<span class="plan-empty">–</span>
|
|
56
|
+
) : (
|
|
57
|
+
cell.risks.map((risk) => (
|
|
58
|
+
<RefLink ref={risk.id} label="id" />
|
|
59
|
+
))
|
|
60
|
+
)}
|
|
61
|
+
</div>
|
|
62
|
+
))}
|
|
63
|
+
</div>
|
|
64
|
+
))
|
|
65
|
+
}
|
|
66
|
+
</div>
|
|
67
|
+
<p class="plan-empty">A cell's colour is the RAG its likelihood and impact derive; a risk's own RAG can differ when it is overridden.</p>
|
|
68
|
+
</section>
|
|
69
|
+
|
|
70
|
+
<section>
|
|
71
|
+
<h2>Open</h2>
|
|
72
|
+
{risks.open.length === 0 && <p class="plan-empty">No open risks.</p>}
|
|
73
|
+
{
|
|
74
|
+
risks.open.length > 0 && (
|
|
75
|
+
<table class="risk-table">
|
|
76
|
+
<thead>
|
|
77
|
+
<tr>
|
|
78
|
+
<th scope="col">RAG</th>
|
|
79
|
+
<th scope="col">Risk</th>
|
|
80
|
+
<th scope="col">Likelihood</th>
|
|
81
|
+
<th scope="col">Impact</th>
|
|
82
|
+
<th scope="col">Status</th>
|
|
83
|
+
<th scope="col">Owner</th>
|
|
84
|
+
<th scope="col">Mitigation</th>
|
|
85
|
+
<th scope="col">Reviewed</th>
|
|
86
|
+
</tr>
|
|
87
|
+
</thead>
|
|
88
|
+
<tbody>
|
|
89
|
+
{risks.open.map((risk) => (
|
|
90
|
+
<tr id={risk.id.toLowerCase()}>
|
|
91
|
+
<td>
|
|
92
|
+
<span class={`rag rag--${risk.rag}`}>{risk.rag}</span>
|
|
93
|
+
</td>
|
|
94
|
+
<td>
|
|
95
|
+
<strong><RefLink ref={risk.id} label="id" /></strong> <LinkedText text={risk.title} />
|
|
96
|
+
{risk.affects && <div class="risk-detail">Affects: <LinkedText text={risk.affects} /></div>}
|
|
97
|
+
{risk.trigger && <div class="risk-detail">Trigger: <LinkedText text={risk.trigger} /></div>}
|
|
98
|
+
{risk.ragOverride && (
|
|
99
|
+
<div class="risk-detail">
|
|
100
|
+
RAG override: <LinkedText text={risk.ragOverride} />
|
|
101
|
+
</div>
|
|
102
|
+
)}
|
|
103
|
+
</td>
|
|
104
|
+
<td>{risk.likelihood}</td>
|
|
105
|
+
<td>{risk.impact}</td>
|
|
106
|
+
<td>{risk.status}</td>
|
|
107
|
+
<td>{risk.owner}</td>
|
|
108
|
+
<td>{risk.mitigation ? <LinkedText text={risk.mitigation} /> : 'none'}</td>
|
|
109
|
+
<td>{risk.reviewed}</td>
|
|
110
|
+
</tr>
|
|
111
|
+
))}
|
|
112
|
+
</tbody>
|
|
113
|
+
</table>
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
</section>
|
|
117
|
+
|
|
118
|
+
<section>
|
|
119
|
+
<h2>Closed</h2>
|
|
120
|
+
{risks.closed.length === 0 && <p class="plan-empty">No closed risks.</p>}
|
|
121
|
+
{
|
|
122
|
+
risks.closed.length > 0 && (
|
|
123
|
+
<table class="risk-table">
|
|
124
|
+
<thead>
|
|
125
|
+
<tr>
|
|
126
|
+
<th scope="col">RAG</th>
|
|
127
|
+
<th scope="col">Risk</th>
|
|
128
|
+
<th scope="col">Closed</th>
|
|
129
|
+
</tr>
|
|
130
|
+
</thead>
|
|
131
|
+
<tbody>
|
|
132
|
+
{risks.closed.map((risk) => (
|
|
133
|
+
<tr id={risk.id.toLowerCase()}>
|
|
134
|
+
<td>
|
|
135
|
+
<span class={`rag rag--${risk.rag}`}>{risk.rag}</span>
|
|
136
|
+
</td>
|
|
137
|
+
<td>
|
|
138
|
+
<strong><RefLink ref={risk.id} label="id" /></strong> <LinkedText text={risk.title} />
|
|
139
|
+
</td>
|
|
140
|
+
<td>
|
|
141
|
+
<LinkedText text={risk.closed} />
|
|
142
|
+
</td>
|
|
143
|
+
</tr>
|
|
144
|
+
))}
|
|
145
|
+
</tbody>
|
|
146
|
+
</table>
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
</section>
|
|
150
|
+
|
|
151
|
+
{
|
|
152
|
+
risks.removed.length > 0 && (
|
|
153
|
+
<section>
|
|
154
|
+
<h2>Removed</h2>
|
|
155
|
+
<ul>
|
|
156
|
+
{risks.removed.map((entry) => (
|
|
157
|
+
<li id={entry.id.toLowerCase()}>
|
|
158
|
+
{entry.date} <strong><RefLink ref={entry.id} label="id" /></strong> <LinkedText text={entry.title} />
|
|
159
|
+
{entry.reason && (
|
|
160
|
+
<>
|
|
161
|
+
. Reason: <LinkedText text={entry.reason} />
|
|
162
|
+
</>
|
|
163
|
+
)}
|
|
164
|
+
</li>
|
|
165
|
+
))}
|
|
166
|
+
</ul>
|
|
167
|
+
</section>
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
</StarlightPage>
|
|
171
|
+
|
|
172
|
+
<style>
|
|
173
|
+
.risk-figures {
|
|
174
|
+
display: grid;
|
|
175
|
+
grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
|
|
176
|
+
gap: 0.75rem;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.risk-figures > div {
|
|
180
|
+
padding: 0.75rem 1rem;
|
|
181
|
+
border: 1px solid var(--sl-color-hairline);
|
|
182
|
+
border-left-width: 4px;
|
|
183
|
+
border-radius: 10px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.risk-figures dt {
|
|
187
|
+
color: var(--sl-color-gray-3);
|
|
188
|
+
font-size: var(--sl-text-sm);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.risk-figures dd {
|
|
192
|
+
margin: 0;
|
|
193
|
+
font-size: var(--sl-text-2xl);
|
|
194
|
+
font-weight: 700;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.risk-figure--red {
|
|
198
|
+
border-left-color: #ef4444 !important;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.risk-figure--amber {
|
|
202
|
+
border-left-color: #f59e0b !important;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.risk-figure--green {
|
|
206
|
+
border-left-color: #10b981 !important;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.risk-matrix {
|
|
210
|
+
display: grid;
|
|
211
|
+
gap: 0.35rem;
|
|
212
|
+
max-width: 36rem;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.risk-matrix__row {
|
|
216
|
+
display: grid;
|
|
217
|
+
grid-template-columns: 8rem repeat(3, 1fr);
|
|
218
|
+
gap: 0.35rem;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.risk-matrix__corner,
|
|
222
|
+
.risk-matrix__axis {
|
|
223
|
+
color: var(--sl-color-gray-3);
|
|
224
|
+
font-size: var(--sl-text-xs);
|
|
225
|
+
text-transform: capitalize;
|
|
226
|
+
align-self: center;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.risk-matrix__cell {
|
|
230
|
+
display: flex;
|
|
231
|
+
flex-wrap: wrap;
|
|
232
|
+
gap: 0.35rem;
|
|
233
|
+
align-content: center;
|
|
234
|
+
justify-content: center;
|
|
235
|
+
min-height: 3.5rem;
|
|
236
|
+
padding: 0.4rem;
|
|
237
|
+
border-radius: 8px;
|
|
238
|
+
border: 1px solid var(--sl-color-hairline);
|
|
239
|
+
font-size: var(--sl-text-sm);
|
|
240
|
+
font-weight: 600;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.risk-matrix__cell--red {
|
|
244
|
+
background: #ef444426;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.risk-matrix__cell--amber {
|
|
248
|
+
background: #f59e0b26;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.risk-matrix__cell--green {
|
|
252
|
+
background: #10b98126;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.risk-table td:first-child {
|
|
256
|
+
white-space: nowrap;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.risk-detail {
|
|
260
|
+
color: var(--sl-color-gray-3);
|
|
261
|
+
font-size: var(--sl-text-xs);
|
|
262
|
+
}
|
|
263
|
+
</style>
|