kitfly 0.2.3 → 0.2.4
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/CHANGELOG.md +23 -0
- package/README.md +13 -11
- package/VERSION +1 -1
- package/dist/_raw/content/reference/gantt-widget.md +468 -0
- package/dist/_raw/content/reference/plugins.md +157 -2
- package/dist/content/deployment/preflight.html +5 -6
- package/dist/content/deployment/recipes/aws-s3.html +5 -6
- package/dist/content/deployment/recipes/cloudflare-pages.html +5 -6
- package/dist/content/deployment/recipes/cloudflare-r2.html +5 -6
- package/dist/content/deployment/recipes/fly-io.html +5 -6
- package/dist/content/deployment/recipes/github-pages.html +5 -6
- package/dist/content/deployment/recipes/netlify.html +5 -6
- package/dist/content/deployment/recipes/vercel.html +5 -6
- package/dist/content/deployment/secrets-and-env-vars.html +5 -6
- package/dist/content/deployment.html +5 -6
- package/dist/content/guide/approaches.html +5 -6
- package/dist/content/guide/branding.html +5 -6
- package/dist/content/guide/data-driven-content.html +5 -6
- package/dist/content/guide/features.html +5 -6
- package/dist/content/guide/getting-started.html +5 -6
- package/dist/content/guide/kitfly-overview.html +5 -6
- package/dist/content/reference/configuration.html +5 -6
- package/dist/content/reference/design-catalog.html +5 -6
- package/dist/content/reference/environment-variables.html +5 -6
- package/dist/content/reference/gantt-widget.html +899 -0
- package/dist/content/reference/glossary.html +5 -6
- package/dist/content/reference/key-concepts.html +5 -6
- package/dist/content/reference/plugins.html +245 -9
- package/dist/content/reference/slides-authoring-guidelines.html +5 -6
- package/dist/content/reference/structure.html +5 -6
- package/dist/content/reference.html +5 -6
- package/dist/content/templates/crucible.html +5 -6
- package/dist/content/templates/handbook.html +5 -6
- package/dist/content/templates/minimal.html +5 -6
- package/dist/content/templates/overview.html +5 -6
- package/dist/content/templates/pipeline.html +5 -6
- package/dist/content/templates/productbook.html +5 -6
- package/dist/content/templates/runbook.html +5 -6
- package/dist/content/templates/servicebook.html +5 -6
- package/dist/content-index.json +10 -2
- package/dist/docs/decisions/ADR-0001-minimalist-site-code.html +5 -6
- package/dist/docs/decisions/ADR-0002-ai-accessibility.html +5 -6
- package/dist/docs/decisions/ADR-0003-single-file-bundle.html +5 -6
- package/dist/docs/decisions/ADR-0004-bun-runtime.html +5 -6
- package/dist/docs/decisions/ADR-0005-plugin-contract-and-distribution.html +5 -6
- package/dist/docs/decisions/ADR-0006-data-driven-content.html +5 -6
- package/dist/docs/decisions/DDR-0001-viewport-locked-layout.html +5 -6
- package/dist/docs/decisions/DDR-0002-theme-system.html +5 -6
- package/dist/docs/decisions/DDR-0003-bounded-logo-slot.html +5 -6
- package/dist/docs/decisions/DDR-0004-slides-rendering-model.html +5 -6
- package/dist/docs/decisions/DDR-0005-deterministic-layout-boundary.html +5 -6
- package/dist/docs/userguide/cli/build.html +5 -6
- package/dist/docs/userguide/cli/bundle.html +5 -6
- package/dist/docs/userguide/cli/dev.html +5 -6
- package/dist/docs/userguide/cli/init.html +5 -6
- package/dist/docs/userguide/cli/servers.html +5 -6
- package/dist/docs/userguide/cli/stop.html +5 -6
- package/dist/docs/userguide/cli/update.html +5 -6
- package/dist/docs/userguide/cli/version.html +5 -6
- package/dist/docs/userguide/cli.html +5 -6
- package/dist/docs/userguide/sharing.html +5 -6
- package/dist/index.html +5 -6
- package/dist/llms.txt +3 -3
- package/dist/provenance.json +4 -5
- package/dist/reports/license-inventory.csv +199 -0
- package/dist/schemas/plugin-registry.schema.html +5 -6
- package/dist/schemas/plugin-schemas-notes.html +5 -6
- package/dist/schemas/plugin.schema.html +5 -6
- package/dist/schemas/plugins.schema.html +5 -6
- package/dist/schemas/v0/common.schema.html +5 -6
- package/dist/schemas/v0/plugin-registry.schema.html +5 -6
- package/dist/schemas/v0/plugin.schema.html +5 -6
- package/dist/schemas/v0/plugins.schema.html +5 -6
- package/dist/schemas/v0/site.schema.html +5 -6
- package/dist/schemas/v0/theme.schema.html +5 -6
- package/dist/schemas.html +5 -6
- package/package.json +1 -1
- package/plugins-dist/planning-visuals.css +261 -0
- package/plugins-dist/planning-visuals.js +669 -0
- package/registry/plugins.yaml +15 -1
- package/scripts/build-all.ts +5 -0
- package/scripts/build.ts +73 -11
- package/scripts/bundle.ts +73 -10
- package/scripts/dev.ts +49 -5
- package/scripts/embed-docs.ts +119 -0
- package/src/__tests__/build.test.ts +124 -0
- package/src/__tests__/bundle.test.ts +61 -0
- package/src/__tests__/docs.test.ts +117 -0
- package/src/__tests__/fixtures/fences/planning-visuals/invalid/bad-month-format.md +10 -0
- package/src/__tests__/fixtures/fences/planning-visuals/invalid/marker-format-mismatch.md +13 -0
- package/src/__tests__/fixtures/fences/planning-visuals/invalid/milestone-format-mismatch.md +13 -0
- package/src/__tests__/fixtures/fences/planning-visuals/invalid/missing-tracks.md +5 -0
- package/src/__tests__/fixtures/fences/planning-visuals/invalid/track-reversed.md +10 -0
- package/src/__tests__/fixtures/fences/planning-visuals/valid/markers-basic.md +15 -0
- package/src/__tests__/fixtures/fences/planning-visuals/valid/markers-no-milestones.md +13 -0
- package/src/__tests__/fixtures/fences/planning-visuals/valid/month-basic.md +16 -0
- package/src/__tests__/fixtures/fences/planning-visuals/valid/no-milestones.md +10 -0
- package/src/__tests__/fixtures/fences/planning-visuals/valid/week-basic.md +20 -0
- package/src/__tests__/planning-visuals-fence-contract.test.ts +28 -0
- package/src/__tests__/planning-visuals-runtime-regressions.bun.test.ts +68 -0
- package/src/__tests__/planning-visuals-runtime.bun.test.ts +192 -0
- package/src/__tests__/shared.test.ts +121 -0
- package/src/cli.ts +113 -18
- package/src/commands/docs.ts +71 -0
- package/src/generated/embedded-docs.ts +2384 -0
- package/src/server-registry.ts +50 -10
- package/src/shared.ts +449 -25
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Kitfly are documented here.
|
|
4
4
|
|
|
5
|
+
## [0.2.4] - 2026-03-08
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **Planning visuals plugin** (`planning-visuals`): Gantt charts for docs and slides with `:::gantt` fenced blocks
|
|
10
|
+
- Week and month time-axis support with ISO week date parsing (`YYYY-Www`) and month ordinals (`YYYY-MM`)
|
|
11
|
+
- Hierarchical depth filtering (`max-depth`) — same dataset drives summary views (depth 1) and detail views (depth 2+)
|
|
12
|
+
- Track status colors: `planned`, `active`, `complete`, `blocked` with dark mode adaptation
|
|
13
|
+
- Milestones as distinct point-in-time markers (diamond icons, separate from duration tracks)
|
|
14
|
+
- Chart-level markers with custom colors for highlighting key dates
|
|
15
|
+
- `max-tracks` truncation with "+N more" overflow indicator for dense timelines
|
|
16
|
+
- `today` marker: vertical dashed line at specified date
|
|
17
|
+
- Dual-mode rendering: works in both docs mode (`<main class="content">`) and slides mode (`.slide` containers)
|
|
18
|
+
- Comprehensive fence validation with semantic date/range checking in build/dev/bundle pipelines
|
|
19
|
+
- Sparse week-axis labeling (every Nth week when >16 units) with abbreviated format and edge alignment
|
|
20
|
+
- Test fixtures and contract tests for planning visuals fence validation
|
|
21
|
+
- **Embedded CLI documentation** (`kitfly docs`): `kitfly docs list` and `kitfly docs show <slug>` for offline access to curated documentation from the compiled binary, with build-time codegen from `docs/embed-manifest.yaml`
|
|
22
|
+
|
|
23
|
+
### Docs
|
|
24
|
+
|
|
25
|
+
- New `content/reference/gantt-widget.md` with complete authoring reference, schema, and examples
|
|
26
|
+
- Updated plugin registry documentation with `planning-visuals` contract and usage
|
|
27
|
+
|
|
5
28
|
## [0.2.3] - 2026-02-17
|
|
6
29
|
|
|
7
30
|
### Added
|
package/README.md
CHANGED
|
@@ -115,17 +115,19 @@ For full contributor setup (toolchain, bootstrap, local CLI), see [docs/developm
|
|
|
115
115
|
|
|
116
116
|
## What You Get
|
|
117
117
|
|
|
118
|
-
| Feature | How
|
|
119
|
-
| ------------------- |
|
|
120
|
-
| Hot reload | Edit markdown, see changes instantly
|
|
121
|
-
| Navigation | Auto-generated from folder structure
|
|
122
|
-
| Table of contents | Extracted from headings
|
|
123
|
-
| Dark mode | System preference + toggle
|
|
124
|
-
| Slides mode | `mode: slides` for fixed-aspect decks (v0.2.0+)
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
118
|
+
| Feature | How |
|
|
119
|
+
| ------------------- | ------------------------------------------------------------------------------------------------ |
|
|
120
|
+
| Hot reload | Edit markdown, see changes instantly |
|
|
121
|
+
| Navigation | Auto-generated from folder structure |
|
|
122
|
+
| Table of contents | Extracted from headings |
|
|
123
|
+
| Dark mode | System preference + toggle |
|
|
124
|
+
| Slides mode | `mode: slides` for fixed-aspect decks (v0.2.0+) |
|
|
125
|
+
| Gantt charts | Wave-based planning with `max-depth` filtering — one dataset, summary and detail views (v0.2.4+) |
|
|
126
|
+
| Plugins | Optional add-ons via `kitfly.plugins.yaml` (pinned + integrity-checked) |
|
|
127
|
+
| Diagrams | Mermaid via CDN |
|
|
128
|
+
| Syntax highlighting | Prism.js via CDN |
|
|
129
|
+
| Embedded docs | `kitfly docs list` and `kitfly docs show <slug>` — offline CLI reference (v0.2.4+) |
|
|
130
|
+
| Offline-ready | Static HTML, no server required |
|
|
129
131
|
|
|
130
132
|
## What You Don't Get
|
|
131
133
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.4
|
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Gantt Widget Examples"
|
|
3
|
+
description: "Usage patterns for the :::gantt planning widget"
|
|
4
|
+
last_updated: "2026-03-06"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Gantt Widget Examples
|
|
8
|
+
|
|
9
|
+
The `:::gantt` widget renders a horizontal bar chart on a shared time axis. It ships in the `planning-visuals` plugin and works in both docs and slides mode.
|
|
10
|
+
|
|
11
|
+
Enable the plugin in `kitfly.plugins.yaml`:
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
plugins:
|
|
15
|
+
- planning-visuals@0.2.4
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Minimal example (week)
|
|
19
|
+
|
|
20
|
+
The smallest valid gantt — three required fields plus at least one track:
|
|
21
|
+
|
|
22
|
+
```markdown
|
|
23
|
+
:::gantt
|
|
24
|
+
time-unit: week
|
|
25
|
+
time-start: "2026-W20"
|
|
26
|
+
time-end: "2026-W28"
|
|
27
|
+
tracks:
|
|
28
|
+
|
|
29
|
+
- label: "Sprint 1"
|
|
30
|
+
depth: 1
|
|
31
|
+
start: "2026-W20"
|
|
32
|
+
end: "2026-W23"
|
|
33
|
+
- label: "Sprint 2"
|
|
34
|
+
depth: 1
|
|
35
|
+
start: "2026-W24"
|
|
36
|
+
end: "2026-W28"
|
|
37
|
+
:::
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
No label, no milestones, no today marker — all optional. Tracks default to `status: planned` (muted/gray bars).
|
|
41
|
+
|
|
42
|
+
## Minimal example (month)
|
|
43
|
+
|
|
44
|
+
Same structure, different time unit. Dates use `YYYY-MM` format:
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
:::gantt
|
|
48
|
+
time-unit: month
|
|
49
|
+
time-start: "2026-06"
|
|
50
|
+
time-end: "2026-12"
|
|
51
|
+
tracks:
|
|
52
|
+
|
|
53
|
+
- label: "Discovery"
|
|
54
|
+
depth: 1
|
|
55
|
+
start: "2026-06"
|
|
56
|
+
end: "2026-08"
|
|
57
|
+
- label: "Build"
|
|
58
|
+
depth: 1
|
|
59
|
+
start: "2026-09"
|
|
60
|
+
end: "2026-12"
|
|
61
|
+
:::
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Month mode is natural for business audiences — no ISO week numbers to decode.
|
|
65
|
+
|
|
66
|
+
## Status colors
|
|
67
|
+
|
|
68
|
+
Four statuses control bar color. Use them to show progress at a glance:
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
:::gantt
|
|
72
|
+
label: "Status Reference"
|
|
73
|
+
time-unit: week
|
|
74
|
+
time-start: "2026-W14"
|
|
75
|
+
time-end: "2026-W26"
|
|
76
|
+
tracks:
|
|
77
|
+
|
|
78
|
+
- label: "Completed work"
|
|
79
|
+
depth: 1
|
|
80
|
+
start: "2026-W14"
|
|
81
|
+
end: "2026-W17"
|
|
82
|
+
status: complete
|
|
83
|
+
- label: "In progress"
|
|
84
|
+
depth: 1
|
|
85
|
+
start: "2026-W18"
|
|
86
|
+
end: "2026-W21"
|
|
87
|
+
status: active
|
|
88
|
+
- label: "Waiting on vendor"
|
|
89
|
+
depth: 1
|
|
90
|
+
start: "2026-W19"
|
|
91
|
+
end: "2026-W23"
|
|
92
|
+
status: blocked
|
|
93
|
+
- label: "Not started"
|
|
94
|
+
depth: 1
|
|
95
|
+
start: "2026-W22"
|
|
96
|
+
end: "2026-W26"
|
|
97
|
+
status: planned
|
|
98
|
+
:::
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
| Status | Color | Use for |
|
|
102
|
+
| ---------- | ------------ | --------------------- |
|
|
103
|
+
| `complete` | Green | Done, signed off |
|
|
104
|
+
| `active` | Accent/blue | Currently in progress |
|
|
105
|
+
| `blocked` | Amber/orange | Waiting, at risk |
|
|
106
|
+
| `planned` | Muted/gray | Not started (default) |
|
|
107
|
+
|
|
108
|
+
All colors adapt to dark mode automatically.
|
|
109
|
+
|
|
110
|
+
## Hierarchy and depth filtering
|
|
111
|
+
|
|
112
|
+
The key feature: `depth` + `max-depth` lets one data set produce multiple views.
|
|
113
|
+
|
|
114
|
+
### Full detail (`max-depth: 2`)
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
:::gantt
|
|
118
|
+
label: "Client Rollout — Detail View"
|
|
119
|
+
time-unit: week
|
|
120
|
+
time-start: "2026-W18"
|
|
121
|
+
time-end: "2026-W40"
|
|
122
|
+
max-depth: 2
|
|
123
|
+
today: "2026-W28"
|
|
124
|
+
tracks:
|
|
125
|
+
|
|
126
|
+
- label: "Wave 1 — Pilot"
|
|
127
|
+
depth: 1
|
|
128
|
+
start: "2026-W20"
|
|
129
|
+
end: "2026-W30"
|
|
130
|
+
status: active
|
|
131
|
+
- label: "Apex Advisory (45 sites)"
|
|
132
|
+
depth: 2
|
|
133
|
+
start: "2026-W20"
|
|
134
|
+
end: "2026-W26"
|
|
135
|
+
status: complete
|
|
136
|
+
- label: "Beacon Logistics (80 sites)"
|
|
137
|
+
depth: 2
|
|
138
|
+
start: "2026-W24"
|
|
139
|
+
end: "2026-W30"
|
|
140
|
+
status: active
|
|
141
|
+
milestones:
|
|
142
|
+
- label: "Pilot Review"
|
|
143
|
+
date: "2026-W31"
|
|
144
|
+
tracks:
|
|
145
|
+
- label: "Wave 2 — Scale"
|
|
146
|
+
depth: 1
|
|
147
|
+
start: "2026-W33"
|
|
148
|
+
end: "2026-W40"
|
|
149
|
+
status: planned
|
|
150
|
+
- label: "Crestview Energy (120 sites)"
|
|
151
|
+
depth: 2
|
|
152
|
+
start: "2026-W33"
|
|
153
|
+
end: "2026-W37"
|
|
154
|
+
status: planned
|
|
155
|
+
- label: "Dunmore Foods (90 sites)"
|
|
156
|
+
depth: 2
|
|
157
|
+
start: "2026-W36"
|
|
158
|
+
end: "2026-W40"
|
|
159
|
+
status: planned
|
|
160
|
+
:::
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Summary view (`max-depth: 1`)
|
|
164
|
+
|
|
165
|
+
Use the same data with `max-depth: 1` to show only wave-level bars — ideal for executive slides:
|
|
166
|
+
|
|
167
|
+
```markdown
|
|
168
|
+
:::gantt
|
|
169
|
+
label: "Client Rollout — Summary View"
|
|
170
|
+
time-unit: week
|
|
171
|
+
time-start: "2026-W18"
|
|
172
|
+
time-end: "2026-W40"
|
|
173
|
+
max-depth: 1
|
|
174
|
+
today: "2026-W28"
|
|
175
|
+
tracks:
|
|
176
|
+
|
|
177
|
+
- label: "Wave 1 — Pilot"
|
|
178
|
+
depth: 1
|
|
179
|
+
start: "2026-W20"
|
|
180
|
+
end: "2026-W30"
|
|
181
|
+
status: active
|
|
182
|
+
- label: "Apex Advisory (45 sites)"
|
|
183
|
+
depth: 2
|
|
184
|
+
start: "2026-W20"
|
|
185
|
+
end: "2026-W26"
|
|
186
|
+
status: complete
|
|
187
|
+
- label: "Beacon Logistics (80 sites)"
|
|
188
|
+
depth: 2
|
|
189
|
+
start: "2026-W24"
|
|
190
|
+
end: "2026-W30"
|
|
191
|
+
status: active
|
|
192
|
+
milestones:
|
|
193
|
+
- label: "Pilot Review"
|
|
194
|
+
date: "2026-W31"
|
|
195
|
+
tracks:
|
|
196
|
+
- label: "Wave 2 — Scale"
|
|
197
|
+
depth: 1
|
|
198
|
+
start: "2026-W33"
|
|
199
|
+
end: "2026-W40"
|
|
200
|
+
status: planned
|
|
201
|
+
- label: "Crestview Energy (120 sites)"
|
|
202
|
+
depth: 2
|
|
203
|
+
start: "2026-W33"
|
|
204
|
+
end: "2026-W37"
|
|
205
|
+
status: planned
|
|
206
|
+
- label: "Dunmore Foods (90 sites)"
|
|
207
|
+
depth: 2
|
|
208
|
+
start: "2026-W36"
|
|
209
|
+
end: "2026-W40"
|
|
210
|
+
status: planned
|
|
211
|
+
:::
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Depth-2 tracks and milestones are hidden. The data is identical — only `max-depth` changes.
|
|
215
|
+
|
|
216
|
+
## Milestones
|
|
217
|
+
|
|
218
|
+
Milestones are point-in-time markers (diamonds). They have a `date` instead of `start`/`end`, and they're listed separately from tracks. Interleave freely — source order controls layout:
|
|
219
|
+
|
|
220
|
+
```markdown
|
|
221
|
+
:::gantt
|
|
222
|
+
time-unit: month
|
|
223
|
+
time-start: "2026-03"
|
|
224
|
+
time-end: "2026-12"
|
|
225
|
+
milestones:
|
|
226
|
+
|
|
227
|
+
- label: "Kick-off"
|
|
228
|
+
date: "2026-03"
|
|
229
|
+
tracks:
|
|
230
|
+
- label: "Design Phase"
|
|
231
|
+
depth: 1
|
|
232
|
+
start: "2026-04"
|
|
233
|
+
end: "2026-06"
|
|
234
|
+
status: complete
|
|
235
|
+
milestones:
|
|
236
|
+
- label: "Design Sign-off"
|
|
237
|
+
date: "2026-07"
|
|
238
|
+
tracks:
|
|
239
|
+
- label: "Build Phase"
|
|
240
|
+
depth: 1
|
|
241
|
+
start: "2026-07"
|
|
242
|
+
end: "2026-10"
|
|
243
|
+
status: active
|
|
244
|
+
milestones:
|
|
245
|
+
- label: "Launch"
|
|
246
|
+
date: "2026-11"
|
|
247
|
+
:::
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Milestones respect `max-depth` filtering. A milestone with `depth: 2` is hidden when `max-depth: 1`.
|
|
251
|
+
|
|
252
|
+
## Chart-level markers
|
|
253
|
+
|
|
254
|
+
Markers are vertical annotation lines that span the full chart height — use them for gates, deadlines, and phase boundaries. Unlike row-level milestones (diamonds), markers are chart-level annotations with a label at the top:
|
|
255
|
+
|
|
256
|
+
```markdown
|
|
257
|
+
:::gantt
|
|
258
|
+
label: "Platform Migration"
|
|
259
|
+
time-unit: week
|
|
260
|
+
time-start: "2026-W14"
|
|
261
|
+
time-end: "2026-W30"
|
|
262
|
+
markers:
|
|
263
|
+
|
|
264
|
+
- label: "Go/No-Go"
|
|
265
|
+
date: "2026-W18"
|
|
266
|
+
color: "#f59e0b"
|
|
267
|
+
- label: "Phase 1 Sign-Off"
|
|
268
|
+
date: "2026-W26"
|
|
269
|
+
color: "var(--color-link)"
|
|
270
|
+
tracks:
|
|
271
|
+
- label: "Phase 1 — Foundation"
|
|
272
|
+
depth: 1
|
|
273
|
+
start: "2026-W14"
|
|
274
|
+
end: "2026-W24"
|
|
275
|
+
status: active
|
|
276
|
+
- label: "Phase 2 — Integration"
|
|
277
|
+
depth: 1
|
|
278
|
+
start: "2026-W25"
|
|
279
|
+
end: "2026-W30"
|
|
280
|
+
status: planned
|
|
281
|
+
:::
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Markers are **not** subject to `max-depth` or `max-tracks` — they always render if their date is within the axis range. A marker whose date falls outside the axis produces a build-time warning and is silently omitted.
|
|
285
|
+
|
|
286
|
+
Labels default to the right of the line. Near the right edge of the chart (~85%+), labels automatically flip to the left. Keep labels short (~20 chars) — longer text is truncated with ellipsis.
|
|
287
|
+
|
|
288
|
+
`color` is optional on each marker. If provided, it tints the marker line and label. Supported values are any valid CSS color (`#hex`, `rgb(...)`, `hsl(...)`, named color, or CSS variable like `var(--color-link)`).
|
|
289
|
+
|
|
290
|
+
## Truncation with `max-tracks`
|
|
291
|
+
|
|
292
|
+
For slides, cap the visible rows to avoid overflow:
|
|
293
|
+
|
|
294
|
+
```markdown
|
|
295
|
+
:::gantt
|
|
296
|
+
label: "Regional Deployment"
|
|
297
|
+
time-unit: month
|
|
298
|
+
time-start: "2026-01"
|
|
299
|
+
time-end: "2026-12"
|
|
300
|
+
max-tracks: 4
|
|
301
|
+
tracks:
|
|
302
|
+
|
|
303
|
+
- label: "North America"
|
|
304
|
+
depth: 1
|
|
305
|
+
start: "2026-01"
|
|
306
|
+
end: "2026-04"
|
|
307
|
+
status: complete
|
|
308
|
+
- label: "Europe"
|
|
309
|
+
depth: 1
|
|
310
|
+
start: "2026-03"
|
|
311
|
+
end: "2026-06"
|
|
312
|
+
status: active
|
|
313
|
+
- label: "Asia Pacific"
|
|
314
|
+
depth: 1
|
|
315
|
+
start: "2026-05"
|
|
316
|
+
end: "2026-09"
|
|
317
|
+
status: planned
|
|
318
|
+
- label: "Latin America"
|
|
319
|
+
depth: 1
|
|
320
|
+
start: "2026-07"
|
|
321
|
+
end: "2026-10"
|
|
322
|
+
status: planned
|
|
323
|
+
- label: "Middle East"
|
|
324
|
+
depth: 1
|
|
325
|
+
start: "2026-09"
|
|
326
|
+
end: "2026-12"
|
|
327
|
+
status: planned
|
|
328
|
+
:::
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
Rows 5+ are hidden and replaced with a "+1 more" indicator. `max-tracks` applies after `max-depth` filtering.
|
|
332
|
+
|
|
333
|
+
## Cross-year ranges
|
|
334
|
+
|
|
335
|
+
Both week and month mode handle year boundaries. The axis shows the year at transitions:
|
|
336
|
+
|
|
337
|
+
```markdown
|
|
338
|
+
:::gantt
|
|
339
|
+
label: "Multi-Year Program"
|
|
340
|
+
time-unit: month
|
|
341
|
+
time-start: "2026-10"
|
|
342
|
+
time-end: "2027-06"
|
|
343
|
+
tracks:
|
|
344
|
+
|
|
345
|
+
- label: "Phase 3 — Consolidation"
|
|
346
|
+
depth: 1
|
|
347
|
+
start: "2026-10"
|
|
348
|
+
end: "2027-01"
|
|
349
|
+
status: active
|
|
350
|
+
- label: "Phase 4 — Expansion"
|
|
351
|
+
depth: 1
|
|
352
|
+
start: "2027-02"
|
|
353
|
+
end: "2027-06"
|
|
354
|
+
status: planned
|
|
355
|
+
:::
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
## Today marker
|
|
359
|
+
|
|
360
|
+
The `today` parameter draws a vertical dashed line. Useful when set by a generator to the build date:
|
|
361
|
+
|
|
362
|
+
```markdown
|
|
363
|
+
:::gantt
|
|
364
|
+
time-unit: week
|
|
365
|
+
time-start: "2026-W20"
|
|
366
|
+
time-end: "2026-W32"
|
|
367
|
+
today: "2026-W26"
|
|
368
|
+
tracks:
|
|
369
|
+
|
|
370
|
+
- label: "Current Sprint"
|
|
371
|
+
depth: 1
|
|
372
|
+
start: "2026-W24"
|
|
373
|
+
end: "2026-W28"
|
|
374
|
+
status: active
|
|
375
|
+
:::
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
## Data-driven usage
|
|
379
|
+
|
|
380
|
+
Generators can emit `:::gantt` blocks as snippets. The template author places them without understanding the data model:
|
|
381
|
+
|
|
382
|
+
```yaml
|
|
383
|
+
# In a data file (e.g., data/rollout.yaml)
|
|
384
|
+
snippets:
|
|
385
|
+
- slot: "rollout-summary"
|
|
386
|
+
content: ":::gantt\ntime-unit: week\ntime-start: \"2026-W18\"\ntime-end: \"2026-W40\"\nmax-depth: 1\ntracks:\n - label: \"Wave 1\"\n depth: 1\n start: \"2026-W20\"\n end: \"2026-W30\"\n status: active\n:::"
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
```markdown
|
|
390
|
+
<!-- In a markdown file -->
|
|
391
|
+
|
|
392
|
+
## Rollout Timeline
|
|
393
|
+
|
|
394
|
+
{{ snippet:rollout-summary }}
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
## Milestones vs markers
|
|
398
|
+
|
|
399
|
+
Both are point-in-time features — here's when to use which:
|
|
400
|
+
|
|
401
|
+
| | Milestones (`milestones:`) | Markers (`markers:`) |
|
|
402
|
+
| ---------------------------- | ----------------------------------------------- | ------------------------------------------------ |
|
|
403
|
+
| **What it draws** | Diamond icon in a single row | Vertical line spanning the full chart |
|
|
404
|
+
| **Where the label goes** | Left column (same as tracks) | Above the axis, next to the line |
|
|
405
|
+
| **Has depth?** | Yes — subject to `max-depth` | No — always visible |
|
|
406
|
+
| **Counted by `max-tracks`?** | Yes | No |
|
|
407
|
+
| **Use for** | Per-track events: "Acme go-live", "QA sign-off" | Chart-wide gates: "Go/No-Go", "Funding deadline" |
|
|
408
|
+
|
|
409
|
+
Rule of thumb: if it belongs to a specific track or wave, use a milestone. If it's a date the whole chart cares about, use a marker.
|
|
410
|
+
|
|
411
|
+
## Edge cases and errors
|
|
412
|
+
|
|
413
|
+
Kitfly validates `:::gantt` blocks at build time. If something is wrong, `bun run build` (or `bun run dev`) fails fast with an error pointing to the file and line.
|
|
414
|
+
|
|
415
|
+
**Build errors** (block will not render):
|
|
416
|
+
|
|
417
|
+
| What you wrote | Error | Fix |
|
|
418
|
+
| ---------------------------------------------------------- | ------------------------- | ------------------------------------------ |
|
|
419
|
+
| Missing `time-unit`, `time-start`, `time-end`, or `tracks` | Required field missing | Add the field |
|
|
420
|
+
| `time-unit: weeks` (plural) | Invalid time-unit | Use `week` or `month` |
|
|
421
|
+
| `2026-14` with `time-unit: week` | Invalid time-start format | Use `2026-W14` (capital W, two-digit week) |
|
|
422
|
+
| `2026-4` with `time-unit: month` | Invalid time-start format | Use `2026-04` (two-digit month) |
|
|
423
|
+
| Week date with `time-unit: month` (or vice versa) | Format mismatch | All dates must match the `time-unit` |
|
|
424
|
+
| `time-start` after `time-end` | Range error | Swap them |
|
|
425
|
+
| Track with `start` after `end` | Range error | Swap them |
|
|
426
|
+
| Track missing `label`, `depth`, `start`, or `end` | Required field missing | Add the field |
|
|
427
|
+
| Milestone missing `label` or `date` | Required field missing | Add the field |
|
|
428
|
+
| Marker missing `label` or `date` | Required field missing | Add the field |
|
|
429
|
+
|
|
430
|
+
**Build warnings** (block renders, but something may look wrong):
|
|
431
|
+
|
|
432
|
+
| What you wrote | Warning | What happens |
|
|
433
|
+
| ------------------------------------- | ------------------------------------------------- | ----------------------------- |
|
|
434
|
+
| Track extends outside the axis range | "Track range is outside axis and will be clipped" | Bar clips to the visible axis |
|
|
435
|
+
| Milestone date outside the axis range | "Milestone date is outside axis" | Diamond not rendered |
|
|
436
|
+
| Marker date outside the axis range | "Marker date is outside axis" | Line and label not rendered |
|
|
437
|
+
|
|
438
|
+
**Silent defaults** (no error, no warning):
|
|
439
|
+
|
|
440
|
+
| What you wrote | What happens |
|
|
441
|
+
| ------------------------------------------------- | ---------------------------- |
|
|
442
|
+
| Omit `status` on a track | Defaults to `planned` (gray) |
|
|
443
|
+
| Omit `depth` on a milestone | Defaults to 1 |
|
|
444
|
+
| Omit `max-depth` | All depths rendered |
|
|
445
|
+
| Omit `max-tracks` | All rows rendered |
|
|
446
|
+
| Omit `milestones`, `markers`, `today`, or `label` | Feature simply absent |
|
|
447
|
+
| Unknown `status` value (e.g., `status: done`) | Treated as `planned` |
|
|
448
|
+
|
|
449
|
+
For the full fence contract (indentation rules, block shape, supported types), see [Plugins — planning-visuals](plugins.md#triple-colon-fence-contract-planning-visuals).
|
|
450
|
+
|
|
451
|
+
## Quick reference
|
|
452
|
+
|
|
453
|
+
| What you want | How |
|
|
454
|
+
| ---------------------- | ------------------------------------------- |
|
|
455
|
+
| Week axis | `time-unit: week`, dates as `YYYY-Www` |
|
|
456
|
+
| Month axis | `time-unit: month`, dates as `YYYY-MM` |
|
|
457
|
+
| Title above chart | `label: "My Title"` |
|
|
458
|
+
| Executive summary | `max-depth: 1` |
|
|
459
|
+
| Detail view | `max-depth: 2` (or omit for all) |
|
|
460
|
+
| Cap rows for slides | `max-tracks: 6` |
|
|
461
|
+
| Progress marker | `today: "2026-W26"` |
|
|
462
|
+
| Done bar (green) | `status: complete` |
|
|
463
|
+
| In-progress bar (blue) | `status: active` |
|
|
464
|
+
| At-risk bar (amber) | `status: blocked` |
|
|
465
|
+
| Not started (gray) | `status: planned` (or omit) |
|
|
466
|
+
| Point-in-time marker | Use `milestones:` list with `date:` |
|
|
467
|
+
| Chart-level gate line | Use `markers:` list with `label:` + `date:` |
|
|
468
|
+
| Marker-specific color | Add optional `color:` per marker |
|