@purview-dev/pm-docs-site 0.0.0-stage → 0.1.0-pre.1
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 +167 -2
- package/cli.mjs +120 -0
- package/index.d.ts +49 -0
- package/index.mjs +97 -0
- package/lib/options.mjs +67 -0
- package/lib/repo-docs.mjs +148 -0
- package/lib/schema-version.mjs +29 -0
- package/lib/sidebar.mjs +47 -0
- package/lib/site-options.mjs +38 -0
- package/package.json +62 -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 +18 -0
- package/src/components/RefLink.astro +18 -0
- package/src/components/StateBadge.astro +15 -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/content.config.ts +16 -0
- package/src/env.d.ts +7 -0
- package/src/lib/planning-types.ts +207 -0
- package/src/lib/planning.ts +387 -0
- package/src/lib/references.ts +360 -0
- package/src/loaders/repo-docs.ts +69 -0
- package/src/pages/index.astro +158 -0
- package/src/pages/plan/board.astro +140 -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 +90 -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 +86 -0
- package/src/styles/components.css +374 -0
- package/src/styles/width.css +4 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The shaping record from planning.json's `briefs`: each brief's status, the
|
|
3
|
+
// problem it names, its Done when, its decision, and any revisions.
|
|
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 { briefAnchor, loadPlanning } from '../../lib/planning';
|
|
10
|
+
import '../../styles/components.css';
|
|
11
|
+
|
|
12
|
+
const planning = loadPlanning();
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<StarlightPage frontmatter={{ title: 'Briefs', description: 'Each shaped idea: its status, problem, Done when, decision and revisions.', tableOfContents: false }}>
|
|
16
|
+
<ExportStamp />
|
|
17
|
+
|
|
18
|
+
<p>{planning.briefs.length} briefs, {planning.counts.shapingBriefs} still shaping.</p>
|
|
19
|
+
|
|
20
|
+
{planning.briefs.length === 0 && <p class="plan-empty">No briefs. pm-shape writes one per idea it discusses.</p>}
|
|
21
|
+
|
|
22
|
+
{
|
|
23
|
+
planning.briefs.map((brief) => (
|
|
24
|
+
<section id={briefAnchor(brief.path)}>
|
|
25
|
+
<h2>
|
|
26
|
+
{brief.id && <RefLink ref={brief.id} label="id" />} {brief.title}
|
|
27
|
+
</h2>
|
|
28
|
+
<p class="plan-meta">
|
|
29
|
+
{brief.status ? <LinkedText text={brief.status} /> : 'No status'}
|
|
30
|
+
{brief.updated && <> · updated {brief.updated}</>}
|
|
31
|
+
{brief.origin && (
|
|
32
|
+
<>
|
|
33
|
+
{' '}
|
|
34
|
+
· from <LinkedText text={brief.origin} />
|
|
35
|
+
</>
|
|
36
|
+
)}{' '}
|
|
37
|
+
· <RefLink ref={brief.path} label="id" />
|
|
38
|
+
</p>
|
|
39
|
+
{brief.problem && (
|
|
40
|
+
<p>
|
|
41
|
+
<strong>Problem:</strong> <LinkedText text={brief.problem} />
|
|
42
|
+
</p>
|
|
43
|
+
)}
|
|
44
|
+
{brief.doneWhen && (
|
|
45
|
+
<p>
|
|
46
|
+
<strong>Done when:</strong> <LinkedText text={brief.doneWhen} />
|
|
47
|
+
</p>
|
|
48
|
+
)}
|
|
49
|
+
{brief.decision && (
|
|
50
|
+
<p>
|
|
51
|
+
<strong>Decision:</strong> <LinkedText text={brief.decision} />
|
|
52
|
+
</p>
|
|
53
|
+
)}
|
|
54
|
+
{brief.revisions.length > 0 && (
|
|
55
|
+
<ul>
|
|
56
|
+
{brief.revisions.map((revision) => (
|
|
57
|
+
<li>
|
|
58
|
+
{revision.date && <strong>{revision.date}</strong>} <LinkedText text={revision.text} />
|
|
59
|
+
</li>
|
|
60
|
+
))}
|
|
61
|
+
</ul>
|
|
62
|
+
)}
|
|
63
|
+
</section>
|
|
64
|
+
))
|
|
65
|
+
}
|
|
66
|
+
</StarlightPage>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One roadmap item, wherever the export holds it (Now, Next, Later, Done or
|
|
3
|
+
// Dropped): its summary, result or plan, reason, what it serves, its note, the
|
|
4
|
+
// inbox entries that name it, and the pages that link to it. All from planning.json.
|
|
5
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
6
|
+
|
|
7
|
+
import ExportStamp from '../../../components/ExportStamp.astro';
|
|
8
|
+
import FeatureSummary from '../../../components/FeatureSummary.astro';
|
|
9
|
+
import LinkedFrom from '../../../components/LinkedFrom.astro';
|
|
10
|
+
import LinkedText from '../../../components/LinkedText.astro';
|
|
11
|
+
import { docsHref, FEATURE_STATES, features, loadPlanning } from '../../../lib/planning';
|
|
12
|
+
import config from 'virtual:pm-docs-site/config';
|
|
13
|
+
import '../../../styles/components.css';
|
|
14
|
+
|
|
15
|
+
export function getStaticPaths() {
|
|
16
|
+
return features(loadPlanning()).map((feature) => ({ params: { id: feature.id.toLowerCase() }, props: { id: feature.id } }));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const { id } = Astro.props;
|
|
20
|
+
const planning = loadPlanning();
|
|
21
|
+
const feature = features(planning).find((candidate) => candidate.id === id)!;
|
|
22
|
+
const outcomes = new Map(planning.vision.outcomes.map((outcome) => [outcome.id, outcome.text]));
|
|
23
|
+
const milestone = planning.strategy.milestones.find((candidate) => candidate.id === feature.milestone) ?? null;
|
|
24
|
+
const inbox = planning.inbox.filter((entry) => entry.affects === feature.id || entry.related.includes(feature.id));
|
|
25
|
+
const planLink = docsHref(feature.plan);
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
<StarlightPage
|
|
29
|
+
frontmatter={{
|
|
30
|
+
title: `${feature.id} ${feature.title}`,
|
|
31
|
+
description: feature.doneWhen[0] ?? feature.result ?? feature.reason ?? `${FEATURE_STATES[feature.state]} item ${feature.id}.`,
|
|
32
|
+
tableOfContents: false,
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
35
|
+
<ExportStamp kind="Feature" state={FEATURE_STATES[feature.state]} milestone={milestone ? `${milestone.id} ${milestone.name}` : 'No milestone'} />
|
|
36
|
+
|
|
37
|
+
<FeatureSummary id={feature.id} />
|
|
38
|
+
|
|
39
|
+
{
|
|
40
|
+
(feature.result || feature.plan) && (
|
|
41
|
+
<section>
|
|
42
|
+
<h2>{feature.state === 'done' ? 'Result' : 'Plan'}</h2>
|
|
43
|
+
{feature.result && (
|
|
44
|
+
<p>
|
|
45
|
+
<LinkedText text={feature.result} />
|
|
46
|
+
</p>
|
|
47
|
+
)}
|
|
48
|
+
{feature.plan && <p>Plan: {planLink ? <a href={planLink}>{feature.plan}</a> : <code>{feature.plan}</code>}</p>}
|
|
49
|
+
{feature.state === 'now' && config.views.now && (
|
|
50
|
+
<p>
|
|
51
|
+
<a href="/plan/now/">The plan's tasks and the last checkpoint</a>
|
|
52
|
+
</p>
|
|
53
|
+
)}
|
|
54
|
+
</section>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
{
|
|
59
|
+
feature.reason && (
|
|
60
|
+
<section>
|
|
61
|
+
<h2>Reason</h2>
|
|
62
|
+
<p>
|
|
63
|
+
<LinkedText text={feature.reason} />
|
|
64
|
+
</p>
|
|
65
|
+
</section>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
{
|
|
70
|
+
feature.serves.length > 0 && (
|
|
71
|
+
<section>
|
|
72
|
+
<h2>Serves</h2>
|
|
73
|
+
<ul>
|
|
74
|
+
{feature.serves.map((line) => (
|
|
75
|
+
<li>
|
|
76
|
+
<strong>{line}</strong> {outcomes.get(line)}
|
|
77
|
+
</li>
|
|
78
|
+
))}
|
|
79
|
+
</ul>
|
|
80
|
+
</section>
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
{
|
|
85
|
+
feature.note && (
|
|
86
|
+
<section>
|
|
87
|
+
<h2>Note</h2>
|
|
88
|
+
<p>
|
|
89
|
+
<LinkedText text={feature.note} />
|
|
90
|
+
</p>
|
|
91
|
+
</section>
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
{
|
|
96
|
+
inbox.length > 0 && (
|
|
97
|
+
<section>
|
|
98
|
+
<h2>Inbox</h2>
|
|
99
|
+
<ul>
|
|
100
|
+
{inbox.map((entry) => (
|
|
101
|
+
<li>
|
|
102
|
+
{entry.kind && <strong>{entry.kind}</strong>} <LinkedText text={entry.title} />
|
|
103
|
+
{entry.severity && <> ({entry.severity})</>}
|
|
104
|
+
{entry.captured && <>, captured {entry.captured}</>}
|
|
105
|
+
</li>
|
|
106
|
+
))}
|
|
107
|
+
</ul>
|
|
108
|
+
</section>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
<LinkedFrom ref={feature.id} />
|
|
113
|
+
</StarlightPage>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Every roadmap item in the plan, by state — in progress, Next, Later, Done
|
|
3
|
+
// and Dropped — from planning.json. Each item has its own page, which search indexes.
|
|
4
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
5
|
+
|
|
6
|
+
import ExportStamp from '../../../components/ExportStamp.astro';
|
|
7
|
+
import FeatureTable from '../../../components/FeatureTable.astro';
|
|
8
|
+
import { FEATURE_STATES, features, loadPlanning, type FeatureState } from '../../../lib/planning';
|
|
9
|
+
import '../../../styles/components.css';
|
|
10
|
+
|
|
11
|
+
const planning = loadPlanning();
|
|
12
|
+
const all = features(planning);
|
|
13
|
+
const groups = (Object.keys(FEATURE_STATES) as FeatureState[]).map((state) => ({ state, items: all.filter((feature) => feature.state === state) }));
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<StarlightPage frontmatter={{ title: 'Features', description: 'Every roadmap item: in progress, Next, Later, Done and Dropped.' }}>
|
|
17
|
+
<ExportStamp />
|
|
18
|
+
|
|
19
|
+
{
|
|
20
|
+
groups.map((group) => (
|
|
21
|
+
<section>
|
|
22
|
+
<h2 id={group.state}>
|
|
23
|
+
{FEATURE_STATES[group.state]} <span class="plan-count">{group.items.length}</span>
|
|
24
|
+
</h2>
|
|
25
|
+
<FeatureTable state={group.state} items={group.items} milestones={planning.strategy.milestones} />
|
|
26
|
+
</section>
|
|
27
|
+
))
|
|
28
|
+
}
|
|
29
|
+
</StarlightPage>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The parking lot from planning.json's `inbox`: the ideas waiting for a
|
|
3
|
+
// pm-shape discussion first, then the rest, one card per idea.
|
|
4
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
5
|
+
|
|
6
|
+
import ExportStamp from '../../components/ExportStamp.astro';
|
|
7
|
+
import KanbanItemCard from '../../components/lib/KanbanItemCard.astro';
|
|
8
|
+
import LinkedText from '../../components/LinkedText.astro';
|
|
9
|
+
import RefLink from '../../components/RefLink.astro';
|
|
10
|
+
import { loadPlanning, severityToPriority, sourceInitials } from '../../lib/planning';
|
|
11
|
+
import '../../styles/components.css';
|
|
12
|
+
|
|
13
|
+
const planning = loadPlanning();
|
|
14
|
+
const groups = [
|
|
15
|
+
{ title: 'To discuss', entries: planning.inbox.filter((entry) => entry.discuss === 'yes') },
|
|
16
|
+
{ title: 'Parked', entries: planning.inbox.filter((entry) => entry.discuss !== 'yes') },
|
|
17
|
+
];
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
<StarlightPage frontmatter={{ title: 'Inbox', description: 'Parked ideas, bugs and questions, with those waiting for discussion first.', tableOfContents: false }}>
|
|
21
|
+
<ExportStamp />
|
|
22
|
+
|
|
23
|
+
<p>
|
|
24
|
+
{planning.counts.openInbox} open, {planning.counts.discuss} to discuss, {planning.inbox.length} in all. Last review: {planning.checks.lastReview ?? 'never'}.
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
{
|
|
28
|
+
groups.map((group) => (
|
|
29
|
+
<section>
|
|
30
|
+
<h2>
|
|
31
|
+
{group.title} <span class="plan-count">{group.entries.length}</span>
|
|
32
|
+
</h2>
|
|
33
|
+
{group.entries.length === 0 && <p class="plan-empty">Nothing here</p>}
|
|
34
|
+
<div class="plan-cards not-content">
|
|
35
|
+
{group.entries.map((entry) => (
|
|
36
|
+
<div>
|
|
37
|
+
<KanbanItemCard
|
|
38
|
+
title={entry.title}
|
|
39
|
+
tag={entry.kind ?? 'idea'}
|
|
40
|
+
assignee={sourceInitials(entry.source)}
|
|
41
|
+
dueDate={entry.captured ?? ''}
|
|
42
|
+
priority={severityToPriority(entry.severity)}
|
|
43
|
+
commentsCount={0}
|
|
44
|
+
attachmentsCount={0}
|
|
45
|
+
/>
|
|
46
|
+
{entry.affects && entry.affects !== 'none' && (
|
|
47
|
+
<p class="plan-meta">
|
|
48
|
+
Affects: <LinkedText text={entry.affects} />
|
|
49
|
+
</p>
|
|
50
|
+
)}
|
|
51
|
+
{entry.related.length > 0 && (
|
|
52
|
+
<p class="plan-meta">
|
|
53
|
+
Related:{' '}
|
|
54
|
+
{entry.related.map((ref, index) => (
|
|
55
|
+
<>
|
|
56
|
+
{index > 0 && ', '}
|
|
57
|
+
<RefLink ref={ref} />
|
|
58
|
+
</>
|
|
59
|
+
))}
|
|
60
|
+
</p>
|
|
61
|
+
)}
|
|
62
|
+
{entry.brief && (
|
|
63
|
+
<p class="plan-meta">
|
|
64
|
+
Brief: <RefLink ref={entry.brief} label="id" />
|
|
65
|
+
</p>
|
|
66
|
+
)}
|
|
67
|
+
{entry.idea && (
|
|
68
|
+
<p class="plan-meta">
|
|
69
|
+
<LinkedText text={entry.idea} />
|
|
70
|
+
</p>
|
|
71
|
+
)}
|
|
72
|
+
</div>
|
|
73
|
+
))}
|
|
74
|
+
</div>
|
|
75
|
+
</section>
|
|
76
|
+
))
|
|
77
|
+
}
|
|
78
|
+
</StarlightPage>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One milestone (or the items with none): its status, target, exit criteria,
|
|
3
|
+
// the V lines it serves, its items by state, and the risks that name it.
|
|
4
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
5
|
+
|
|
6
|
+
import ExportStamp from '../../../components/ExportStamp.astro';
|
|
7
|
+
import FeatureTable from '../../../components/FeatureTable.astro';
|
|
8
|
+
import LinkedFrom from '../../../components/LinkedFrom.astro';
|
|
9
|
+
import LinkedText from '../../../components/LinkedText.astro';
|
|
10
|
+
import RefLink from '../../../components/RefLink.astro';
|
|
11
|
+
import { FEATURE_STATES, loadPlanning, milestoneSummaries, type FeatureState } from '../../../lib/planning';
|
|
12
|
+
import '../../../styles/components.css';
|
|
13
|
+
|
|
14
|
+
export function getStaticPaths() {
|
|
15
|
+
return milestoneSummaries(loadPlanning()).map((summary) => ({ params: { milestone: summary.slug }, props: { slug: summary.slug } }));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const { slug } = Astro.props;
|
|
19
|
+
const planning = loadPlanning();
|
|
20
|
+
const summary = milestoneSummaries(planning).find((candidate) => candidate.slug === slug)!;
|
|
21
|
+
const outcomes = new Map(planning.vision.outcomes.map((outcome) => [outcome.id, outcome.text]));
|
|
22
|
+
const title = summary.id ? `${summary.id} ${summary.name}` : summary.name;
|
|
23
|
+
const groups = (Object.keys(FEATURE_STATES) as FeatureState[])
|
|
24
|
+
.map((state) => ({ state, items: summary.features.filter((feature) => feature.state === state) }))
|
|
25
|
+
.filter((group) => group.items.length > 0);
|
|
26
|
+
const risks = summary.id ? [...planning.risks.open, ...planning.risks.closed].filter((risk) => risk.affects === summary.id) : [];
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
<StarlightPage frontmatter={{ title, description: summary.exitCriteria ?? `The items in ${title}.`, tableOfContents: false }}>
|
|
30
|
+
<ExportStamp kind="Milestone" milestone={title} />
|
|
31
|
+
|
|
32
|
+
<p>
|
|
33
|
+
{summary.isFocus && <span class="plan-focus">Focus</span>}
|
|
34
|
+
{summary.isFocus && ' '}
|
|
35
|
+
{summary.id ? 'Status' : 'Items with no milestone'}
|
|
36
|
+
{summary.id && <strong> {summary.status ?? 'none'}</strong>}
|
|
37
|
+
{summary.target && <> · target {summary.target}</>}
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
{
|
|
41
|
+
summary.id === null && <p class="plan-meta">These items have no milestone, or name one that is not in STRATEGY.md.</p>
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
{
|
|
45
|
+
summary.progress.total > 0 && (
|
|
46
|
+
<p>
|
|
47
|
+
<progress class="plan-progress" max={summary.progress.total} value={summary.progress.done}>
|
|
48
|
+
{summary.progress.done} of {summary.progress.total}
|
|
49
|
+
</progress>{' '}
|
|
50
|
+
{summary.progress.done} of {summary.progress.total} done
|
|
51
|
+
</p>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
{
|
|
56
|
+
summary.exitCriteria && (
|
|
57
|
+
<section>
|
|
58
|
+
<h2>Exit criteria</h2>
|
|
59
|
+
<p>
|
|
60
|
+
<LinkedText text={summary.exitCriteria} />
|
|
61
|
+
</p>
|
|
62
|
+
</section>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
{
|
|
67
|
+
summary.serves.length > 0 && (
|
|
68
|
+
<section>
|
|
69
|
+
<h2>Serves</h2>
|
|
70
|
+
<ul>
|
|
71
|
+
{summary.serves.map((line) => (
|
|
72
|
+
<li>
|
|
73
|
+
<strong>{line}</strong> {outcomes.get(line)}
|
|
74
|
+
</li>
|
|
75
|
+
))}
|
|
76
|
+
</ul>
|
|
77
|
+
</section>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
{groups.length === 0 && <p class="plan-empty">No items</p>}
|
|
82
|
+
{
|
|
83
|
+
groups.map((group) => (
|
|
84
|
+
<section>
|
|
85
|
+
<h2 id={group.state}>
|
|
86
|
+
{FEATURE_STATES[group.state]} <span class="plan-count">{group.items.length}</span>
|
|
87
|
+
</h2>
|
|
88
|
+
<FeatureTable state={group.state} items={group.items} milestones={planning.strategy.milestones} hideMilestone />
|
|
89
|
+
</section>
|
|
90
|
+
))
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
{
|
|
94
|
+
risks.length > 0 && (
|
|
95
|
+
<section>
|
|
96
|
+
<h2>Risks</h2>
|
|
97
|
+
<ul>
|
|
98
|
+
{risks.map((risk) => (
|
|
99
|
+
<li>
|
|
100
|
+
<span class={`rag rag--${risk.rag}`}>{risk.rag}</span>{' '}
|
|
101
|
+
<strong>
|
|
102
|
+
<RefLink ref={risk.id} label="id" />
|
|
103
|
+
</strong>{' '}
|
|
104
|
+
<LinkedText text={risk.title} /> — {risk.status}
|
|
105
|
+
</li>
|
|
106
|
+
))}
|
|
107
|
+
</ul>
|
|
108
|
+
</section>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
<LinkedFrom ref={summary.id ?? 'none'} />
|
|
113
|
+
</StarlightPage>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The milestones in strategy order, each with its status, target, exit
|
|
3
|
+
// criteria, the V lines it serves, and its items by state, from planning.json.
|
|
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 { FEATURE_STATES, loadPlanning, milestoneSummaries, type FeatureState } from '../../../lib/planning';
|
|
10
|
+
import '../../../styles/components.css';
|
|
11
|
+
|
|
12
|
+
const planning = loadPlanning();
|
|
13
|
+
const summaries = milestoneSummaries(planning);
|
|
14
|
+
const states = Object.keys(FEATURE_STATES) as FeatureState[];
|
|
15
|
+
const byState = (summary: (typeof summaries)[number]) =>
|
|
16
|
+
states
|
|
17
|
+
.map((state) => ({ state, count: summary.features.filter((feature) => feature.state === state).length }))
|
|
18
|
+
.filter((entry) => entry.count > 0)
|
|
19
|
+
.map((entry) => `${entry.count} ${FEATURE_STATES[entry.state].toLowerCase()}`)
|
|
20
|
+
.join(', ');
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<StarlightPage frontmatter={{ title: 'Milestones', description: 'Each milestone in strategy order, with its exit criteria and its items.', tableOfContents: false }}>
|
|
24
|
+
<ExportStamp />
|
|
25
|
+
|
|
26
|
+
{summaries.length === 0 && <p class="plan-empty">No milestones. pm-strategy sets them in STRATEGY.md.</p>}
|
|
27
|
+
|
|
28
|
+
<div class="plan-cards not-content">
|
|
29
|
+
{
|
|
30
|
+
summaries.map((summary) => (
|
|
31
|
+
<article class="plan-card">
|
|
32
|
+
<h3>
|
|
33
|
+
<RefLink ref={summary.id ?? 'none'} />
|
|
34
|
+
{summary.isFocus && <span class="plan-focus">Focus</span>}
|
|
35
|
+
</h3>
|
|
36
|
+
<p class="plan-meta">
|
|
37
|
+
{summary.status ?? 'No status'}
|
|
38
|
+
{summary.target && <> · target {summary.target}</>} · {summary.progress.done} of {summary.progress.total} done
|
|
39
|
+
</p>
|
|
40
|
+
{summary.progress.total > 0 && (
|
|
41
|
+
<progress class="plan-progress" max={summary.progress.total} value={summary.progress.done}>
|
|
42
|
+
{summary.progress.done} of {summary.progress.total}
|
|
43
|
+
</progress>
|
|
44
|
+
)}
|
|
45
|
+
{summary.exitCriteria && (
|
|
46
|
+
<p>
|
|
47
|
+
Exit: <LinkedText text={summary.exitCriteria} />
|
|
48
|
+
</p>
|
|
49
|
+
)}
|
|
50
|
+
{summary.serves.length > 0 && <p class="plan-meta">Serves {summary.serves.join(', ')}</p>}
|
|
51
|
+
<p class="plan-meta">{byState(summary) || 'No items'}</p>
|
|
52
|
+
</article>
|
|
53
|
+
))
|
|
54
|
+
}
|
|
55
|
+
</div>
|
|
56
|
+
</StarlightPage>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The active item from planning.json's `now` and `plan`: its Done when checks,
|
|
3
|
+
// the last checkpoint, and one task card per task in its plan.
|
|
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 TaskKanbanCard from '../../components/lib/TaskKanbanCard.astro';
|
|
9
|
+
import RefLink from '../../components/RefLink.astro';
|
|
10
|
+
import { docsHref, initials, loadPlanning, planProgress, sizeToPriority } from '../../lib/planning';
|
|
11
|
+
import { siteRefs } from '../../lib/references';
|
|
12
|
+
import '../../styles/components.css';
|
|
13
|
+
|
|
14
|
+
const planning = loadPlanning();
|
|
15
|
+
const { now, plan } = planning;
|
|
16
|
+
const card = planning.board.columns.now[0];
|
|
17
|
+
const priority = ({ low: 'low', medium: 'med', high: 'high' } as const)[sizeToPriority(card?.size ?? null)];
|
|
18
|
+
|
|
19
|
+
const paths = [
|
|
20
|
+
{ label: 'Brief', path: now.brief },
|
|
21
|
+
{ label: 'Spec', path: now.spec },
|
|
22
|
+
{ label: 'Plan', path: now.plan },
|
|
23
|
+
].filter((entry): entry is { label: string; path: string } => entry.path !== null);
|
|
24
|
+
|
|
25
|
+
const checkpoint = now.checkpoint
|
|
26
|
+
? [
|
|
27
|
+
{ label: 'Stopped at', value: now.checkpoint.stoppedAt },
|
|
28
|
+
{ label: 'Next action', value: now.checkpoint.nextAction },
|
|
29
|
+
{ label: 'Start with', value: now.checkpoint.startWith },
|
|
30
|
+
{ label: 'Decisions', value: now.checkpoint.decisions },
|
|
31
|
+
{ label: 'Context', value: now.checkpoint.context },
|
|
32
|
+
{ label: 'Open question', value: now.checkpoint.openQuestion },
|
|
33
|
+
].filter((entry) => entry.value !== null)
|
|
34
|
+
: [];
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
<StarlightPage frontmatter={{ title: 'Now', description: 'The active item: its Done when checks, the last checkpoint, and its plan.', tableOfContents: false }}>
|
|
38
|
+
<ExportStamp />
|
|
39
|
+
|
|
40
|
+
{!now.item && <p class="plan-empty">Nothing is in progress.</p>}
|
|
41
|
+
|
|
42
|
+
{
|
|
43
|
+
now.item && (
|
|
44
|
+
<>
|
|
45
|
+
<h2>
|
|
46
|
+
<RefLink ref={now.item.id} />
|
|
47
|
+
</h2>
|
|
48
|
+
<dl class="plan-facts">
|
|
49
|
+
<div>
|
|
50
|
+
<dt>Stage</dt>
|
|
51
|
+
<dd>{now.stage ?? '–'}</dd>
|
|
52
|
+
</div>
|
|
53
|
+
<div>
|
|
54
|
+
<dt>Started</dt>
|
|
55
|
+
<dd>{now.started ?? '–'}</dd>
|
|
56
|
+
</div>
|
|
57
|
+
<div>
|
|
58
|
+
<dt>Session</dt>
|
|
59
|
+
<dd>{now.session ?? '–'}</dd>
|
|
60
|
+
</div>
|
|
61
|
+
<div>
|
|
62
|
+
<dt>Plan steps</dt>
|
|
63
|
+
<dd>{plan ? `${plan.checked} of ${plan.total} (${planProgress(plan)}%)` : 'No plan'}</dd>
|
|
64
|
+
</div>
|
|
65
|
+
</dl>
|
|
66
|
+
|
|
67
|
+
{paths.length > 0 && (
|
|
68
|
+
<ul>
|
|
69
|
+
{paths.map((entry) => {
|
|
70
|
+
const href = docsHref(entry.path);
|
|
71
|
+
return (
|
|
72
|
+
<li>
|
|
73
|
+
{entry.label}:{' '}
|
|
74
|
+
{siteRefs().known.get(entry.path)?.href ? <RefLink ref={entry.path} label="id" /> : href ? <a href={href}>{entry.path}</a> : <code>{entry.path}</code>}
|
|
75
|
+
</li>
|
|
76
|
+
);
|
|
77
|
+
})}
|
|
78
|
+
</ul>
|
|
79
|
+
)}
|
|
80
|
+
|
|
81
|
+
<section>
|
|
82
|
+
<h2>Done when</h2>
|
|
83
|
+
{now.doneWhen.length === 0 ? (
|
|
84
|
+
<p class="plan-empty">No checks recorded.</p>
|
|
85
|
+
) : (
|
|
86
|
+
<ul>
|
|
87
|
+
{now.doneWhen.map((check) => (
|
|
88
|
+
<li>
|
|
89
|
+
<LinkedText text={check} />
|
|
90
|
+
</li>
|
|
91
|
+
))}
|
|
92
|
+
</ul>
|
|
93
|
+
)}
|
|
94
|
+
</section>
|
|
95
|
+
|
|
96
|
+
<section>
|
|
97
|
+
<h2>{now.checkpoint ? `Checkpoint ${now.checkpoint.at}` : 'Checkpoint'}</h2>
|
|
98
|
+
{checkpoint.length === 0 ? (
|
|
99
|
+
<p class="plan-empty">No checkpoint yet.</p>
|
|
100
|
+
) : (
|
|
101
|
+
<dl class="plan-facts">
|
|
102
|
+
{checkpoint.map((entry) => (
|
|
103
|
+
<div>
|
|
104
|
+
<dt>{entry.label}</dt>
|
|
105
|
+
<dd>
|
|
106
|
+
<LinkedText text={entry.value} />
|
|
107
|
+
</dd>
|
|
108
|
+
</div>
|
|
109
|
+
))}
|
|
110
|
+
</dl>
|
|
111
|
+
)}
|
|
112
|
+
</section>
|
|
113
|
+
|
|
114
|
+
<section>
|
|
115
|
+
<h2>Plan tasks</h2>
|
|
116
|
+
{!plan || plan.tasks.length === 0 ? (
|
|
117
|
+
<p class="plan-empty">{plan ? 'The plan has no Task headings.' : 'No plan in this export.'}</p>
|
|
118
|
+
) : (
|
|
119
|
+
<div class="plan-cards not-content">
|
|
120
|
+
{plan.tasks.map((task) => (
|
|
121
|
+
<TaskKanbanCard
|
|
122
|
+
task={`Task ${task.number}: ${task.title}`}
|
|
123
|
+
date={`${task.checked}/${task.total} steps`}
|
|
124
|
+
assigneeInitials={initials(card?.owner ?? null)}
|
|
125
|
+
priority={priority}
|
|
126
|
+
progress={planProgress(task)}
|
|
127
|
+
/>
|
|
128
|
+
))}
|
|
129
|
+
</div>
|
|
130
|
+
)}
|
|
131
|
+
</section>
|
|
132
|
+
</>
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
</StarlightPage>
|