kitfly 0.1.2 → 0.2.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.
Files changed (209) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +63 -16
  3. package/VERSION +1 -1
  4. package/dist/_raw/content/deployment/preflight.md +134 -0
  5. package/dist/_raw/content/deployment/recipes/aws-s3.md +128 -0
  6. package/dist/_raw/content/deployment/recipes/cloudflare-pages.md +73 -0
  7. package/dist/_raw/content/deployment/recipes/cloudflare-r2.md +156 -0
  8. package/dist/_raw/content/deployment/recipes/fly-io.md +57 -0
  9. package/dist/_raw/content/deployment/recipes/github-pages.md +112 -0
  10. package/dist/_raw/content/deployment/recipes/netlify.md +99 -0
  11. package/dist/_raw/content/deployment/recipes/vercel.md +88 -0
  12. package/dist/_raw/content/deployment/secrets-and-env-vars.md +75 -0
  13. package/dist/_raw/content/deployment.md +128 -0
  14. package/dist/_raw/content/guide/approaches.md +182 -0
  15. package/dist/_raw/content/guide/features.md +121 -0
  16. package/dist/_raw/content/guide/getting-started.md +112 -0
  17. package/dist/_raw/content/guide/kitfly-overview.md +209 -0
  18. package/dist/_raw/content/reference/configuration.md +259 -0
  19. package/dist/_raw/content/reference/design-catalog.md +167 -0
  20. package/dist/_raw/content/reference/environment-variables.md +66 -0
  21. package/dist/_raw/content/reference/glossary.md +92 -0
  22. package/dist/_raw/content/reference/key-concepts.md +118 -0
  23. package/dist/_raw/content/reference/plugins.md +220 -0
  24. package/dist/_raw/content/reference/slides-authoring-guidelines.md +129 -0
  25. package/dist/_raw/content/reference/structure.md +166 -0
  26. package/dist/_raw/content/reference.md +20 -0
  27. package/dist/_raw/content/templates/crucible.md +192 -0
  28. package/dist/_raw/content/templates/handbook.md +83 -0
  29. package/dist/_raw/content/templates/minimal.md +138 -0
  30. package/dist/_raw/content/templates/overview.md +187 -0
  31. package/dist/_raw/content/templates/pipeline.md +151 -0
  32. package/dist/_raw/content/templates/productbook.md +187 -0
  33. package/dist/_raw/content/templates/runbook.md +193 -0
  34. package/dist/_raw/content/templates/servicebook.md +163 -0
  35. package/dist/_raw/docs/decisions/ADR-0001-minimalist-site-code.md +118 -0
  36. package/dist/_raw/docs/decisions/ADR-0002-ai-accessibility.md +153 -0
  37. package/dist/_raw/docs/decisions/ADR-0003-single-file-bundle.md +93 -0
  38. package/dist/_raw/docs/decisions/ADR-0004-bun-runtime.md +98 -0
  39. package/dist/_raw/docs/decisions/ADR-0005-plugin-contract-and-distribution.md +110 -0
  40. package/dist/_raw/docs/decisions/DDR-0001-viewport-locked-layout.md +111 -0
  41. package/dist/_raw/docs/decisions/DDR-0002-theme-system.md +131 -0
  42. package/dist/_raw/docs/decisions/DDR-0003-bounded-logo-slot.md +106 -0
  43. package/dist/_raw/docs/decisions/DDR-0004-slides-rendering-model.md +113 -0
  44. package/dist/_raw/docs/decisions/DDR-0005-deterministic-layout-boundary.md +107 -0
  45. package/dist/_raw/docs/userguide/cli/build.md +85 -0
  46. package/dist/_raw/docs/userguide/cli/bundle.md +81 -0
  47. package/dist/_raw/docs/userguide/cli/dev.md +92 -0
  48. package/dist/_raw/docs/userguide/cli/init.md +116 -0
  49. package/dist/_raw/docs/userguide/cli/servers.md +69 -0
  50. package/dist/_raw/docs/userguide/cli/stop.md +76 -0
  51. package/dist/_raw/docs/userguide/cli/update.md +78 -0
  52. package/dist/_raw/docs/userguide/cli/version.md +65 -0
  53. package/dist/_raw/docs/userguide/cli.md +34 -0
  54. package/dist/_raw/docs/userguide/sharing.md +94 -0
  55. package/dist/_raw/schemas/plugin-schemas-notes.md +71 -0
  56. package/dist/_raw/schemas.md +42 -0
  57. package/dist/assets/brand/kitfly-favicon-32.png +0 -0
  58. package/dist/assets/brand/kitfly-icon-64.png +0 -0
  59. package/dist/assets/brand/kitfly-logo-128.png +0 -0
  60. package/dist/assets/brand/kitfly-logo-512.png +0 -0
  61. package/dist/assets/brand/kitfly-logo.svg +12132 -0
  62. package/dist/assets/brand/kitfly-neon-128.png +0 -0
  63. package/dist/assets/brand/kitfly-neon-192.png +0 -0
  64. package/dist/assets/brand/kitfly-neon-256.png +0 -0
  65. package/dist/assets/brand/kitfly-neon.png +0 -0
  66. package/dist/assets/brand/palette.md +75 -0
  67. package/dist/content/deployment/index.html +11 -0
  68. package/dist/content/deployment/preflight.html +418 -0
  69. package/dist/content/deployment/recipes/aws-s3.html +421 -0
  70. package/dist/content/deployment/recipes/cloudflare-pages.html +372 -0
  71. package/dist/content/deployment/recipes/cloudflare-r2.html +443 -0
  72. package/dist/content/deployment/recipes/fly-io.html +356 -0
  73. package/dist/content/deployment/recipes/github-pages.html +414 -0
  74. package/dist/content/deployment/recipes/index.html +11 -0
  75. package/dist/content/deployment/recipes/netlify.html +394 -0
  76. package/dist/content/deployment/recipes/vercel.html +382 -0
  77. package/dist/content/deployment/secrets-and-env-vars.html +380 -0
  78. package/dist/content/deployment.html +426 -0
  79. package/dist/content/guide/approaches.html +501 -0
  80. package/dist/content/guide/features.html +436 -0
  81. package/dist/content/guide/getting-started.html +403 -0
  82. package/dist/content/guide/index.html +11 -0
  83. package/dist/content/guide/kitfly-overview.html +544 -0
  84. package/dist/content/index.html +11 -0
  85. package/dist/content/reference/configuration.html +580 -0
  86. package/dist/content/reference/design-catalog.html +449 -0
  87. package/dist/content/reference/environment-variables.html +367 -0
  88. package/dist/content/reference/glossary.html +368 -0
  89. package/dist/content/reference/index.html +11 -0
  90. package/dist/content/reference/key-concepts.html +399 -0
  91. package/dist/content/reference/plugins.html +491 -0
  92. package/dist/content/reference/slides-authoring-guidelines.html +418 -0
  93. package/dist/content/reference/structure.html +463 -0
  94. package/dist/content/reference.html +335 -0
  95. package/dist/content/templates/crucible.html +546 -0
  96. package/dist/content/templates/handbook.html +405 -0
  97. package/dist/content/templates/index.html +11 -0
  98. package/dist/content/templates/minimal.html +447 -0
  99. package/dist/content/templates/overview.html +558 -0
  100. package/dist/content/templates/pipeline.html +494 -0
  101. package/dist/content/templates/productbook.html +540 -0
  102. package/dist/content/templates/runbook.html +543 -0
  103. package/dist/content/templates/servicebook.html +523 -0
  104. package/dist/content-index.json +549 -0
  105. package/dist/docs/decisions/ADR-0001-minimalist-site-code.html +491 -0
  106. package/dist/docs/decisions/ADR-0002-ai-accessibility.html +434 -0
  107. package/dist/docs/decisions/ADR-0003-single-file-bundle.html +412 -0
  108. package/dist/docs/decisions/ADR-0004-bun-runtime.html +409 -0
  109. package/dist/docs/decisions/ADR-0005-plugin-contract-and-distribution.html +402 -0
  110. package/dist/docs/decisions/DDR-0001-viewport-locked-layout.html +459 -0
  111. package/dist/docs/decisions/DDR-0002-theme-system.html +452 -0
  112. package/dist/docs/decisions/DDR-0003-bounded-logo-slot.html +423 -0
  113. package/dist/docs/decisions/DDR-0004-slides-rendering-model.html +399 -0
  114. package/dist/docs/decisions/DDR-0005-deterministic-layout-boundary.html +422 -0
  115. package/dist/docs/decisions/index.html +11 -0
  116. package/dist/docs/userguide/cli/build.html +408 -0
  117. package/dist/docs/userguide/cli/bundle.html +419 -0
  118. package/dist/docs/userguide/cli/dev.html +428 -0
  119. package/dist/docs/userguide/cli/index.html +11 -0
  120. package/dist/docs/userguide/cli/init.html +436 -0
  121. package/dist/docs/userguide/cli/servers.html +393 -0
  122. package/dist/docs/userguide/cli/stop.html +408 -0
  123. package/dist/docs/userguide/cli/update.html +406 -0
  124. package/dist/docs/userguide/cli/version.html +406 -0
  125. package/dist/docs/userguide/cli.html +386 -0
  126. package/dist/docs/userguide/index.html +11 -0
  127. package/dist/docs/userguide/sharing.html +465 -0
  128. package/dist/index.html +387 -0
  129. package/dist/llms.txt +18 -0
  130. package/dist/provenance.json +7 -0
  131. package/dist/schemas/index.html +11 -0
  132. package/dist/schemas/plugin-registry.schema.html +327 -0
  133. package/dist/schemas/plugin-schemas-notes.html +364 -0
  134. package/dist/schemas/plugin.schema.html +327 -0
  135. package/dist/schemas/plugins.schema.html +327 -0
  136. package/dist/schemas/v0/common.schema.html +386 -0
  137. package/dist/schemas/v0/index.html +11 -0
  138. package/dist/schemas/v0/plugin-registry.schema.html +547 -0
  139. package/dist/schemas/v0/plugin.schema.html +497 -0
  140. package/dist/schemas/v0/plugins.schema.html +406 -0
  141. package/dist/schemas/v0/site.schema.html +541 -0
  142. package/dist/schemas/v0/theme.schema.html +615 -0
  143. package/dist/schemas.html +351 -0
  144. package/dist/styles.css +1262 -0
  145. package/package.json +4 -2
  146. package/plugins-dist/callouts.css +32 -0
  147. package/plugins-dist/callouts.js +46 -0
  148. package/plugins-dist/slides-visuals.css +390 -0
  149. package/plugins-dist/slides-visuals.js +689 -0
  150. package/registry/plugins.yaml +35 -0
  151. package/schemas/README.md +10 -0
  152. package/schemas/plugin-registry.schema.json +5 -0
  153. package/schemas/plugin-schemas-notes.md +71 -0
  154. package/schemas/plugin.schema.json +5 -0
  155. package/schemas/plugins.schema.json +5 -0
  156. package/schemas/v0/common.schema.json +64 -0
  157. package/schemas/v0/plugin-registry.schema.json +225 -0
  158. package/schemas/v0/plugin.schema.json +175 -0
  159. package/schemas/v0/plugins.schema.json +84 -0
  160. package/schemas/v0/site.schema.json +56 -9
  161. package/schemas/v0/theme.schema.json +105 -22
  162. package/scripts/build.ts +158 -3
  163. package/scripts/bundle.ts +261 -95
  164. package/scripts/dev.ts +301 -11
  165. package/src/__tests__/build.test.ts +220 -1
  166. package/src/__tests__/bundle.test.ts +31 -0
  167. package/src/__tests__/cli.test.ts +14 -3
  168. package/src/__tests__/dev-plugin-errors.test.ts +20 -0
  169. package/src/__tests__/fixtures/fences/slides-visuals/invalid/bad-list-indent.md +5 -0
  170. package/src/__tests__/fixtures/fences/slides-visuals/invalid/blank-line.md +5 -0
  171. package/src/__tests__/fixtures/fences/slides-visuals/invalid/compare-object-items.md +9 -0
  172. package/src/__tests__/fixtures/fences/slides-visuals/invalid/flow-branching-no-source.md +5 -0
  173. package/src/__tests__/fixtures/fences/slides-visuals/invalid/flow-converging-no-target.md +6 -0
  174. package/src/__tests__/fixtures/fences/slides-visuals/invalid/indented-fence.md +4 -0
  175. package/src/__tests__/fixtures/fences/slides-visuals/invalid/staircase-empty-steps.md +3 -0
  176. package/src/__tests__/fixtures/fences/slides-visuals/invalid/stat-grid-missing-fields.md +5 -0
  177. package/src/__tests__/fixtures/fences/slides-visuals/invalid/timeline-horizontal-no-events.md +2 -0
  178. package/src/__tests__/fixtures/fences/slides-visuals/invalid/unknown-type.md +3 -0
  179. package/src/__tests__/fixtures/fences/slides-visuals/valid/compare.md +10 -0
  180. package/src/__tests__/fixtures/fences/slides-visuals/valid/comparison-table.md +14 -0
  181. package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-branching-no-split.md +7 -0
  182. package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-branching.md +8 -0
  183. package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-converging-no-merge.md +7 -0
  184. package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-converging.md +8 -0
  185. package/src/__tests__/fixtures/fences/slides-visuals/valid/funnel.md +7 -0
  186. package/src/__tests__/fixtures/fences/slides-visuals/valid/kpi.md +5 -0
  187. package/src/__tests__/fixtures/fences/slides-visuals/valid/layer-cake.md +6 -0
  188. package/src/__tests__/fixtures/fences/slides-visuals/valid/pyramid.md +6 -0
  189. package/src/__tests__/fixtures/fences/slides-visuals/valid/quadrant-grid.md +8 -0
  190. package/src/__tests__/fixtures/fences/slides-visuals/valid/scorecard.md +13 -0
  191. package/src/__tests__/fixtures/fences/slides-visuals/valid/staircase-down.md +7 -0
  192. package/src/__tests__/fixtures/fences/slides-visuals/valid/staircase.md +8 -0
  193. package/src/__tests__/fixtures/fences/slides-visuals/valid/stat-grid.md +8 -0
  194. package/src/__tests__/fixtures/fences/slides-visuals/valid/timeline-horizontal.md +9 -0
  195. package/src/__tests__/fixtures/fences/slides-visuals/valid/timeline-vertical.md +10 -0
  196. package/src/__tests__/init.test.ts +35 -0
  197. package/src/__tests__/plugin-loader.test.ts +221 -0
  198. package/src/__tests__/shared.test.ts +451 -0
  199. package/src/__tests__/slides-visuals-fence-contract.test.ts +28 -0
  200. package/src/__tests__/slides-visuals-runtime-regressions.bun.test.ts +147 -0
  201. package/src/__tests__/styles.test.ts +35 -0
  202. package/src/cli.ts +9 -4
  203. package/src/plugin-loader.ts +245 -0
  204. package/src/shared.ts +650 -7
  205. package/src/site/styles.css +331 -0
  206. package/src/site/template.html +66 -5
  207. package/src/templates/deck.ts +186 -0
  208. package/src/templates/driver.ts +11 -1
  209. package/src/templates/minimal.ts +1 -0
@@ -0,0 +1,220 @@
1
+ ---
2
+ title: "Plugins"
3
+ description: "Enable small add-ons (CSS/JS) for docs and slides"
4
+ last_updated: "2026-02-12"
5
+ ---
6
+
7
+ # Plugins
8
+
9
+ Kitfly plugins are small, optional add-ons that inject CSS and/or JS into your generated HTML.
10
+
11
+ They are designed to stay minimal:
12
+
13
+ - No build pipeline required
14
+ - Offline-friendly when assets are local
15
+ - You own the files (standalone sites copy `registry/` + `plugins-dist/`)
16
+
17
+ ## Enable a plugin
18
+
19
+ Create `kitfly.plugins.yaml` in your site root:
20
+
21
+ ```yaml
22
+ # yaml-language-server: $schema=./schemas/v0/plugins.schema.json
23
+ plugins:
24
+ - callouts@0.2.0
25
+ ```
26
+
27
+ Canonical plugins are referenced as pinned strings: `name@x.y.z`.
28
+
29
+ ## Registry + assets
30
+
31
+ Canonical plugins come from a registry file:
32
+
33
+ - Site registry: `registry/plugins.yaml` (preferred if present)
34
+ - Engine registry: used as a fallback when the site does not include a registry
35
+
36
+ Registry entries map a plugin id + version to asset locations (`assets.js` and/or `assets.css`) and per-asset checksums (`assetSha256`).
37
+
38
+ For local/offline registries, `baseUrl` may be an empty string.
39
+
40
+ ## Mode allowlist (`modes`)
41
+
42
+ Registry entries may include an optional `modes` allowlist to control where a plugin runs:
43
+
44
+ - Omitted: allowed in `docs` and `slides`
45
+ - Present with values: allowed only in those modes (example: `["slides"]`)
46
+ - Present but empty (`[]`): blocked in all modes (quick disable switch)
47
+
48
+ Example:
49
+
50
+ ```yaml
51
+ plugins:
52
+ slides-widgets:
53
+ version: "0.2.0"
54
+ modes: ["slides"]
55
+ assets:
56
+ js: "plugins-dist/slides-widgets.js"
57
+ assetSha256:
58
+ js: "sha256:..."
59
+ ```
60
+
61
+ ## Integrity checks
62
+
63
+ Kitfly verifies every enabled asset against its `sha256:<hex>` checksum. If a checksum does not match, the build/dev server fails with an integrity error.
64
+
65
+ When iterating on a local plugin (for example, editing `plugins-dist/slides-visuals.js`), you must also update the matching `assetSha256` in `registry/plugins.yaml` (or disable the plugin) for Kitfly to load it.
66
+
67
+ ## Triple-colon fence contract (`slides-visuals`)
68
+
69
+ The `slides-visuals` plugin adds a `:::` block syntax for slides mode (widgets + figures).
70
+
71
+ To keep authoring predictable and make errors actionable, Kitfly defines a strict contract for these blocks.
72
+ When `slides-visuals` is enabled, Kitfly validates blocks before rendering and reports contract violations.
73
+
74
+ ### Valid block shape
75
+
76
+ - Opening fence: `:::<type>` **must** start at column 0 and be the only content on the line.
77
+ - Closing fence: `:::` **must** start at column 0 and be the only content on the line.
78
+ - No blank lines inside a `:::` block.
79
+ - Content is a narrow YAML subset:
80
+ - Scalar: `key: value`
81
+ - List: `key:` followed by list items
82
+ - List item start: exactly two spaces, then `- ` (example: `␠␠- label: Users`)
83
+ - Continuation lines (object fields): exactly four spaces, then `field: value`
84
+
85
+ ### Supported types
86
+
87
+ Widgets:
88
+
89
+ - `kpi` (scalar keys: `label`, `value`, optional `trend`)
90
+ - `stat-grid` (list key: `metrics` of `{label,value,trend?}` objects)
91
+ - `compare` (scalar keys: `left-title`, `right-title`; list keys: `left`, `right` as **strings only**)
92
+
93
+ Notes:
94
+
95
+ - `compare.left` and `compare.right` items are simple strings (not `{label: ..., value: ...}` objects).
96
+ - If you need multi-field items, use `stat-grid` / `scorecard` instead.
97
+ - If an item contains a colon (`:`), quote it as a string.
98
+
99
+ Figures:
100
+
101
+ - `quadrant-grid` (scalar keys: `axis-x`, `axis-y`, `tl`, `tr`, `bl`, `br`)
102
+ - `scorecard` (list key: `metrics` of `{label,value,trend?}` objects)
103
+ - `comparison-table` (list keys: `headers` (strings), `rows` (strings))
104
+ - `layer-cake` (list key: `layers` (strings))
105
+ - `pyramid` (list key: `levels` (strings))
106
+ - `funnel` (list key: `stages` (strings))
107
+
108
+ ### Example (valid)
109
+
110
+ ```markdown
111
+ :::stat-grid
112
+ metrics:
113
+
114
+ - label: Users
115
+ value: 1,234
116
+ - label: Uptime
117
+ value: 99.95%
118
+ trend: +0.3%
119
+ :::
120
+ ```
121
+
122
+ ### How to know it’s correct
123
+
124
+ When `slides-visuals@...` is enabled, Kitfly validates your `:::` blocks before it renders pages.
125
+
126
+ You know your fences are valid if:
127
+
128
+ - `kitfly dev` starts successfully, and pages load normally
129
+ - `kitfly build` completes successfully
130
+ - `kitfly bundle` completes successfully
131
+
132
+ If a block is invalid, Kitfly will fail fast with an error that points to the file and the specific contract rule you violated.
133
+
134
+ ### Common mistakes (and how to fix them)
135
+
136
+ - **Indented fences**: `:::kpi` must start at column 0 (no spaces, no list indentation, no blockquote `>`).
137
+ - **Blank lines inside the block**: remove empty lines between keys/items.
138
+ - **Wrong list indentation**:
139
+ - list items must start with exactly two spaces then `- `
140
+ - fields under an item must use exactly four spaces
141
+ - **Unknown type**: the opening fence `:::<type>` must be one of the supported types.
142
+
143
+ ### Examples (invalid → fixed)
144
+
145
+ #### 1) Indented fence (invalid)
146
+
147
+ ```markdown
148
+ :::kpi
149
+ label: Users
150
+ value: 1,234
151
+ :::
152
+ ```
153
+
154
+ Fixed:
155
+
156
+ ```markdown
157
+ :::kpi
158
+ label: Users
159
+ value: 1,234
160
+ :::
161
+ ```
162
+
163
+ #### 2) Blank line inside block (invalid)
164
+
165
+ ```markdown
166
+ :::kpi
167
+ label: Users
168
+
169
+ value: 1,234
170
+ :::
171
+ ```
172
+
173
+ Fixed:
174
+
175
+ ```markdown
176
+ :::kpi
177
+ label: Users
178
+ value: 1,234
179
+ :::
180
+ ```
181
+
182
+ #### 3) Bad list indentation (invalid)
183
+
184
+ ```markdown
185
+ :::stat-grid
186
+ metrics:
187
+
188
+ - label: Users
189
+ value: 1,234
190
+ :::
191
+ ```
192
+
193
+ Fixed:
194
+
195
+ ```markdown
196
+ :::stat-grid
197
+ metrics:
198
+
199
+ - label: Users
200
+ value: 1,234
201
+ :::
202
+ ```
203
+
204
+ #### 4) Unknown type (invalid)
205
+
206
+ ```markdown
207
+ :::stats
208
+ label: Users
209
+ value: 1,234
210
+ :::
211
+ ```
212
+
213
+ Fixed: use a supported type (for example `kpi`):
214
+
215
+ ```markdown
216
+ :::kpi
217
+ label: Users
218
+ value: 1,234
219
+ :::
220
+ ```
@@ -0,0 +1,129 @@
1
+ ---
2
+ title: "Slides Authoring Guidelines"
3
+ description: "Practical density and layout rules for reliable Kitfly slides"
4
+ last_updated: "2026-02-15"
5
+ ---
6
+
7
+ # Slides Authoring Guidelines
8
+
9
+ This page is for slide authors and AI agents generating slide content.
10
+
11
+ Goal: avoid common layouts that look broken but are actually content-density issues.
12
+
13
+ ## Quick rules
14
+
15
+ - Keep vertical visuals short. If a slide is tall and busy, trim items before adding more styling.
16
+ - Treat highlighted (`.accent`) blocks as emphasis, not interaction.
17
+ - Scroll in slides mode is allowed for dense content. Prefer no scroll for presentation slides.
18
+
19
+ ## DF-006: Single `.accent` in `.block-grid` looks like a tab
20
+
21
+ ### Problem
22
+
23
+ When one block in a row is accented and others are not, users read it as a selected tab and expect click behavior.
24
+
25
+ ### Do this
26
+
27
+ - In one grid row, accent all blocks or accent none.
28
+ - If you need real tabs, treat that as a future widget (`slides-widgets`), not static blocks.
29
+
30
+ ### Avoid this
31
+
32
+ ```html
33
+ <div class="block-grid cols-3">
34
+ <div class="block">Backend</div>
35
+ <div class="block accent">Platform</div>
36
+ <div class="block">SRE</div>
37
+ </div>
38
+ ```
39
+
40
+ ### Prefer this
41
+
42
+ ```html
43
+ <div class="block-grid cols-3">
44
+ <div class="block accent">Backend</div>
45
+ <div class="block accent">Platform</div>
46
+ <div class="block accent">SRE</div>
47
+ </div>
48
+ ```
49
+
50
+ or
51
+
52
+ ```html
53
+ <div class="block-grid cols-3">
54
+ <div class="block">Backend</div>
55
+ <div class="block">Platform</div>
56
+ <div class="block">SRE</div>
57
+ </div>
58
+ ```
59
+
60
+ ## DF-007: `block-flow.vertical` can overflow at 4/3
61
+
62
+ ### Problem
63
+
64
+ `.block-flow.vertical` (HTML: `class="block-flow vertical"`) with 4 steps can exceed the visible frame at `4/3`.
65
+
66
+ ### Do this
67
+
68
+ - At `4/3`: limit vertical flows to 3 blocks.
69
+ - At `16/9`: 4 blocks is usually fine.
70
+ - If the slide also has extra text/callouts, reduce steps further.
71
+
72
+ ### Guidance
73
+
74
+ - If you must keep all steps, scroll is acceptable.
75
+ - For presentation-first slides, split into two slides instead.
76
+
77
+ ### Example target
78
+
79
+ ```html
80
+ <div class="block-flow vertical">
81
+ <div class="block">1. Intake</div>
82
+ <div class="block">2. Validate</div>
83
+ <div class="block">3. Ship</div>
84
+ </div>
85
+ ```
86
+
87
+ ## DF-014: `timeline-vertical` + callout can clip at 16/9
88
+
89
+ ### Problem
90
+
91
+ A 5-event vertical timeline plus a callout often exceeds the frame at `16/9`.
92
+
93
+ ### Do this
94
+
95
+ - At `16/9`: keep `timeline-vertical` to 4 events when the slide also has a callout.
96
+ - At `4/3`: keep to 3 events with a callout.
97
+ - If you need all events, remove the callout or move it to a follow-up slide.
98
+
99
+ ### Example (safe with callout)
100
+
101
+ ```text
102
+ :::timeline-vertical
103
+ events:
104
+ - label: "Detect"
105
+ date: "09:15"
106
+ - label: "Triage"
107
+ date: "09:24"
108
+ - label: "Mitigate"
109
+ date: "09:42"
110
+ - label: "Recover"
111
+ date: "10:08"
112
+ :::
113
+
114
+ > WARNING: External API fallback remained active for 12 minutes.
115
+ ```
116
+
117
+ ## Aspect ratio checklist
118
+
119
+ - `16/9`: medium density, but still cap long vertical stacks.
120
+ - `4/3`: tighter vertical budget. Reduce stacked items first.
121
+ - `16/10`: between `16/9` and `4/3`; apply the same conservative limits when callouts are present.
122
+
123
+ ## Summary
124
+
125
+ These are authoring constraints, not renderer bugs. When a slide clips:
126
+
127
+ 1. Reduce vertical item count.
128
+ 2. Remove or move callouts.
129
+ 3. Split dense content across two slides.
@@ -0,0 +1,166 @@
1
+ ---
2
+ title: "Folder Structure"
3
+ description: "What lives where in a kitfly project"
4
+ last_updated: "2026-02-03"
5
+ ---
6
+
7
+ # Folder Structure
8
+
9
+ Understanding what's in the template and what ends up in your built site.
10
+
11
+ ## Template Repository
12
+
13
+ When you clone kitfly, you get:
14
+
15
+ ```
16
+ kitfly/
17
+ ├── content/ # YOUR DOCS
18
+ │ ├── index.md # Home page
19
+ │ ├── guide/ # Guide section
20
+ │ └── reference/ # Reference section
21
+
22
+ ├── src/ # RENDERING MACHINERY
23
+ │ ├── cli.ts # CLI entry point
24
+ │ ├── commands/ # CLI commands
25
+ │ └── site/ # HTML template + CSS
26
+
27
+ ├── scripts/ # BUILD SCRIPTS
28
+ │ ├── dev.ts # Dev server
29
+ │ └── build.ts # Static build
30
+
31
+ ├── assets/ # BRAND ASSETS
32
+ │ └── brand/ # Logo, favicon
33
+
34
+ ├── dist/ # BUILD OUTPUT (gitignored)
35
+
36
+ ├── .plans/ # PLANNING (gitignored)
37
+
38
+ ├── site.yaml # CONFIGURATION
39
+ ├── package.json # Dependencies
40
+ ├── VERSION # Version number
41
+ ├── README.md # GitHub readme
42
+ ├── AGENTS.md # AI agent guide
43
+ └── LICENSE # MIT license
44
+ ```
45
+
46
+ ## What Gets Built
47
+
48
+ When you run `bun run build`, **only content from `docroot` goes into `dist/`**:
49
+
50
+ ```
51
+ dist/
52
+ ├── index.html # From content/index.md
53
+ ├── guide/
54
+ │ ├── index.html # Redirect to first file
55
+ │ ├── approaches.html # From content/guide/approaches.md
56
+ │ ├── getting-started.html
57
+ │ └── features.html
58
+ ├── reference/
59
+ │ ├── index.html # Redirect to first file
60
+ │ ├── configuration.html
61
+ │ └── structure.html
62
+ ├── styles.css # From src/site/styles.css
63
+ ├── provenance.json # Build metadata
64
+ └── assets/ # Copied from assets/
65
+ └── brand/
66
+ ```
67
+
68
+ **Not in dist/:**
69
+
70
+ - `src/` - rendering code
71
+ - `scripts/` - build scripts
72
+ - `README.md` - GitHub readme
73
+ - `AGENTS.md` - AI guide
74
+ - `package.json` - dependencies
75
+ - `.plans/` - planning files
76
+ - Any other repo files
77
+
78
+ This separation is intentional. Your built site is just documentation - no tooling artifacts.
79
+
80
+ ## The docroot Setting
81
+
82
+ In `site.yaml`:
83
+
84
+ ```yaml
85
+ docroot: "content"
86
+ ```
87
+
88
+ This tells kitfly where to look for markdown files. Options:
89
+
90
+ | Setting | Effect |
91
+ | ----------- | ------------------------------------------ |
92
+ | `"content"` | Render from `content/` (recommended) |
93
+ | `"docs"` | Render from `docs/` (common in code repos) |
94
+ | `"."` | Render from repo root (use with care) |
95
+
96
+ ### Why This Matters
97
+
98
+ With `docroot: "content"`:
99
+
100
+ - Your `README.md` stays on GitHub, not in the docs
101
+ - Your `package.json` isn't exposed
102
+ - You can have code, tests, and docs in the same repo
103
+
104
+ With `docroot: "."`:
105
+
106
+ - Everything in the repo root becomes documentation
107
+ - Useful for pure documentation repos
108
+ - You'll want to configure `sections` explicitly
109
+
110
+ ## Customizing the Template
111
+
112
+ ### The Machinery
113
+
114
+ If you want to modify how kitfly renders:
115
+
116
+ - **HTML template:** `src/site/template.html`
117
+ - **Styles:** `src/site/styles.css`
118
+ - **Dev server:** `scripts/dev.ts`
119
+ - **Build script:** `scripts/build.ts`
120
+
121
+ These are ~500 lines total. Read them, understand them, modify if needed.
122
+
123
+ ### Brand Assets
124
+
125
+ Replace files in `assets/brand/`:
126
+
127
+ - `kitfly-logo.svg` - Vector logo (ensure tight viewBox)
128
+ - `kitfly-logo-512.png` - Used in README
129
+ - `kitfly-logo-128.png` - Sidebar header fallback
130
+ - `kitfly-favicon-32.png` - Browser favicon
131
+
132
+ These are copied to `dist/assets/` during build.
133
+
134
+ ## For Different Use Cases
135
+
136
+ ### Documentation alongside code
137
+
138
+ ```
139
+ my-project/
140
+ ├── src/ # Your code
141
+ ├── tests/ # Your tests
142
+ ├── docs/ # Your documentation
143
+ │ ├── index.md
144
+ │ └── api/
145
+ └── site.yaml # docroot: "docs"
146
+ ```
147
+
148
+ ### Pure documentation repo
149
+
150
+ ```
151
+ my-docs/
152
+ ├── index.md
153
+ ├── guides/
154
+ ├── reference/
155
+ └── site.yaml # docroot: "."
156
+ ```
157
+
158
+ ### Existing markdown
159
+
160
+ Point kitfly at any folder:
161
+
162
+ ```bash
163
+ kitfly dev ./path/to/markdown
164
+ ```
165
+
166
+ No need to restructure anything.
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: "Reference"
3
+ description: "Key concepts and lookup docs for Kitfly"
4
+ last_updated: "2026-02-12"
5
+ ---
6
+
7
+ # Reference
8
+
9
+ Use this section when you want quick definitions, mental models, and “what does this setting mean?” answers.
10
+
11
+ ## Start here
12
+
13
+ - [Configuration](content/reference/configuration.html) — `site.yaml` and common settings
14
+ - [Plugins](content/reference/plugins.html) — enable small CSS/JS add-ons
15
+ - [Structure](content/reference/structure.html) — recommended folder layout and conventions
16
+ - [Environment Variables](content/reference/environment-variables.html) — what they are and how to set them
17
+ - [Key Concepts](content/reference/key-concepts.html) — `docroot`, `dist/`, “bundle vs build”, and more
18
+ - [Design Catalog](content/reference/design-catalog.html) — shapes and deterministic infographic figures
19
+ - [Slides Authoring Guidelines](content/reference/slides-authoring-guidelines.html) — practical do/don't rules for density and visual layout
20
+ - [Glossary](content/reference/glossary.html) — quick definitions