kitfly 0.1.2 → 0.2.0

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 (194) hide show
  1. package/CHANGELOG.md +34 -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/structure.md +166 -0
  25. package/dist/_raw/content/reference.md +19 -0
  26. package/dist/_raw/content/templates/crucible.md +192 -0
  27. package/dist/_raw/content/templates/handbook.md +83 -0
  28. package/dist/_raw/content/templates/minimal.md +138 -0
  29. package/dist/_raw/content/templates/overview.md +187 -0
  30. package/dist/_raw/content/templates/pipeline.md +151 -0
  31. package/dist/_raw/content/templates/productbook.md +187 -0
  32. package/dist/_raw/content/templates/runbook.md +193 -0
  33. package/dist/_raw/content/templates/servicebook.md +163 -0
  34. package/dist/_raw/docs/decisions/ADR-0001-minimalist-site-code.md +118 -0
  35. package/dist/_raw/docs/decisions/ADR-0002-ai-accessibility.md +153 -0
  36. package/dist/_raw/docs/decisions/ADR-0003-single-file-bundle.md +93 -0
  37. package/dist/_raw/docs/decisions/ADR-0004-bun-runtime.md +98 -0
  38. package/dist/_raw/docs/decisions/ADR-0005-plugin-contract-and-distribution.md +110 -0
  39. package/dist/_raw/docs/decisions/DDR-0001-viewport-locked-layout.md +111 -0
  40. package/dist/_raw/docs/decisions/DDR-0002-theme-system.md +131 -0
  41. package/dist/_raw/docs/decisions/DDR-0003-bounded-logo-slot.md +106 -0
  42. package/dist/_raw/docs/decisions/DDR-0004-slides-rendering-model.md +113 -0
  43. package/dist/_raw/docs/decisions/DDR-0005-deterministic-layout-boundary.md +107 -0
  44. package/dist/_raw/docs/userguide/cli/build.md +85 -0
  45. package/dist/_raw/docs/userguide/cli/bundle.md +81 -0
  46. package/dist/_raw/docs/userguide/cli/dev.md +92 -0
  47. package/dist/_raw/docs/userguide/cli/init.md +116 -0
  48. package/dist/_raw/docs/userguide/cli/servers.md +69 -0
  49. package/dist/_raw/docs/userguide/cli/stop.md +76 -0
  50. package/dist/_raw/docs/userguide/cli/update.md +78 -0
  51. package/dist/_raw/docs/userguide/cli/version.md +65 -0
  52. package/dist/_raw/docs/userguide/cli.md +34 -0
  53. package/dist/_raw/docs/userguide/sharing.md +94 -0
  54. package/dist/_raw/schemas/plugin-schemas-notes.md +71 -0
  55. package/dist/_raw/schemas.md +42 -0
  56. package/dist/assets/brand/kitfly-favicon-32.png +0 -0
  57. package/dist/assets/brand/kitfly-icon-64.png +0 -0
  58. package/dist/assets/brand/kitfly-logo-128.png +0 -0
  59. package/dist/assets/brand/kitfly-logo-512.png +0 -0
  60. package/dist/assets/brand/kitfly-logo.svg +12132 -0
  61. package/dist/assets/brand/kitfly-neon-128.png +0 -0
  62. package/dist/assets/brand/kitfly-neon-192.png +0 -0
  63. package/dist/assets/brand/kitfly-neon-256.png +0 -0
  64. package/dist/assets/brand/kitfly-neon.png +0 -0
  65. package/dist/assets/brand/palette.md +75 -0
  66. package/dist/content/deployment/index.html +11 -0
  67. package/dist/content/deployment/preflight.html +418 -0
  68. package/dist/content/deployment/recipes/aws-s3.html +421 -0
  69. package/dist/content/deployment/recipes/cloudflare-pages.html +372 -0
  70. package/dist/content/deployment/recipes/cloudflare-r2.html +443 -0
  71. package/dist/content/deployment/recipes/fly-io.html +356 -0
  72. package/dist/content/deployment/recipes/github-pages.html +414 -0
  73. package/dist/content/deployment/recipes/index.html +11 -0
  74. package/dist/content/deployment/recipes/netlify.html +394 -0
  75. package/dist/content/deployment/recipes/vercel.html +382 -0
  76. package/dist/content/deployment/secrets-and-env-vars.html +380 -0
  77. package/dist/content/deployment.html +426 -0
  78. package/dist/content/guide/approaches.html +501 -0
  79. package/dist/content/guide/features.html +436 -0
  80. package/dist/content/guide/getting-started.html +403 -0
  81. package/dist/content/guide/index.html +11 -0
  82. package/dist/content/guide/kitfly-overview.html +544 -0
  83. package/dist/content/index.html +11 -0
  84. package/dist/content/reference/configuration.html +580 -0
  85. package/dist/content/reference/design-catalog.html +449 -0
  86. package/dist/content/reference/environment-variables.html +367 -0
  87. package/dist/content/reference/glossary.html +368 -0
  88. package/dist/content/reference/index.html +11 -0
  89. package/dist/content/reference/key-concepts.html +399 -0
  90. package/dist/content/reference/plugins.html +491 -0
  91. package/dist/content/reference/structure.html +463 -0
  92. package/dist/content/reference.html +334 -0
  93. package/dist/content/templates/crucible.html +546 -0
  94. package/dist/content/templates/handbook.html +405 -0
  95. package/dist/content/templates/index.html +11 -0
  96. package/dist/content/templates/minimal.html +447 -0
  97. package/dist/content/templates/overview.html +558 -0
  98. package/dist/content/templates/pipeline.html +494 -0
  99. package/dist/content/templates/productbook.html +540 -0
  100. package/dist/content/templates/runbook.html +543 -0
  101. package/dist/content/templates/servicebook.html +523 -0
  102. package/dist/content-index.json +540 -0
  103. package/dist/docs/decisions/ADR-0001-minimalist-site-code.html +491 -0
  104. package/dist/docs/decisions/ADR-0002-ai-accessibility.html +434 -0
  105. package/dist/docs/decisions/ADR-0003-single-file-bundle.html +412 -0
  106. package/dist/docs/decisions/ADR-0004-bun-runtime.html +409 -0
  107. package/dist/docs/decisions/ADR-0005-plugin-contract-and-distribution.html +402 -0
  108. package/dist/docs/decisions/DDR-0001-viewport-locked-layout.html +459 -0
  109. package/dist/docs/decisions/DDR-0002-theme-system.html +452 -0
  110. package/dist/docs/decisions/DDR-0003-bounded-logo-slot.html +423 -0
  111. package/dist/docs/decisions/DDR-0004-slides-rendering-model.html +399 -0
  112. package/dist/docs/decisions/DDR-0005-deterministic-layout-boundary.html +422 -0
  113. package/dist/docs/decisions/index.html +11 -0
  114. package/dist/docs/userguide/cli/build.html +408 -0
  115. package/dist/docs/userguide/cli/bundle.html +419 -0
  116. package/dist/docs/userguide/cli/dev.html +428 -0
  117. package/dist/docs/userguide/cli/index.html +11 -0
  118. package/dist/docs/userguide/cli/init.html +436 -0
  119. package/dist/docs/userguide/cli/servers.html +393 -0
  120. package/dist/docs/userguide/cli/stop.html +408 -0
  121. package/dist/docs/userguide/cli/update.html +406 -0
  122. package/dist/docs/userguide/cli/version.html +406 -0
  123. package/dist/docs/userguide/cli.html +386 -0
  124. package/dist/docs/userguide/index.html +11 -0
  125. package/dist/docs/userguide/sharing.html +465 -0
  126. package/dist/index.html +387 -0
  127. package/dist/llms.txt +18 -0
  128. package/dist/provenance.json +7 -0
  129. package/dist/schemas/index.html +11 -0
  130. package/dist/schemas/plugin-registry.schema.html +327 -0
  131. package/dist/schemas/plugin-schemas-notes.html +364 -0
  132. package/dist/schemas/plugin.schema.html +327 -0
  133. package/dist/schemas/plugins.schema.html +327 -0
  134. package/dist/schemas/v0/common.schema.html +386 -0
  135. package/dist/schemas/v0/index.html +11 -0
  136. package/dist/schemas/v0/plugin-registry.schema.html +547 -0
  137. package/dist/schemas/v0/plugin.schema.html +497 -0
  138. package/dist/schemas/v0/plugins.schema.html +406 -0
  139. package/dist/schemas/v0/site.schema.html +541 -0
  140. package/dist/schemas/v0/theme.schema.html +615 -0
  141. package/dist/schemas.html +351 -0
  142. package/dist/styles.css +1262 -0
  143. package/package.json +4 -2
  144. package/plugins-dist/callouts.css +32 -0
  145. package/plugins-dist/callouts.js +46 -0
  146. package/plugins-dist/slides-visuals.css +224 -0
  147. package/plugins-dist/slides-visuals.js +598 -0
  148. package/registry/plugins.yaml +35 -0
  149. package/schemas/README.md +10 -0
  150. package/schemas/plugin-registry.schema.json +5 -0
  151. package/schemas/plugin-schemas-notes.md +71 -0
  152. package/schemas/plugin.schema.json +5 -0
  153. package/schemas/plugins.schema.json +5 -0
  154. package/schemas/v0/common.schema.json +64 -0
  155. package/schemas/v0/plugin-registry.schema.json +225 -0
  156. package/schemas/v0/plugin.schema.json +175 -0
  157. package/schemas/v0/plugins.schema.json +84 -0
  158. package/schemas/v0/site.schema.json +56 -9
  159. package/schemas/v0/theme.schema.json +105 -22
  160. package/scripts/build.ts +155 -3
  161. package/scripts/bundle.ts +258 -95
  162. package/scripts/dev.ts +203 -1
  163. package/src/__tests__/build.test.ts +158 -1
  164. package/src/__tests__/bundle.test.ts +31 -0
  165. package/src/__tests__/cli.test.ts +14 -3
  166. package/src/__tests__/fixtures/fences/slides-visuals/invalid/bad-list-indent.md +5 -0
  167. package/src/__tests__/fixtures/fences/slides-visuals/invalid/blank-line.md +5 -0
  168. package/src/__tests__/fixtures/fences/slides-visuals/invalid/compare-object-items.md +9 -0
  169. package/src/__tests__/fixtures/fences/slides-visuals/invalid/indented-fence.md +4 -0
  170. package/src/__tests__/fixtures/fences/slides-visuals/invalid/stat-grid-missing-fields.md +5 -0
  171. package/src/__tests__/fixtures/fences/slides-visuals/invalid/unknown-type.md +3 -0
  172. package/src/__tests__/fixtures/fences/slides-visuals/valid/compare.md +10 -0
  173. package/src/__tests__/fixtures/fences/slides-visuals/valid/comparison-table.md +14 -0
  174. package/src/__tests__/fixtures/fences/slides-visuals/valid/funnel.md +7 -0
  175. package/src/__tests__/fixtures/fences/slides-visuals/valid/kpi.md +5 -0
  176. package/src/__tests__/fixtures/fences/slides-visuals/valid/layer-cake.md +6 -0
  177. package/src/__tests__/fixtures/fences/slides-visuals/valid/pyramid.md +6 -0
  178. package/src/__tests__/fixtures/fences/slides-visuals/valid/quadrant-grid.md +8 -0
  179. package/src/__tests__/fixtures/fences/slides-visuals/valid/scorecard.md +13 -0
  180. package/src/__tests__/fixtures/fences/slides-visuals/valid/stat-grid.md +8 -0
  181. package/src/__tests__/init.test.ts +35 -0
  182. package/src/__tests__/plugin-loader.test.ts +221 -0
  183. package/src/__tests__/shared.test.ts +428 -0
  184. package/src/__tests__/slides-visuals-fence-contract.test.ts +28 -0
  185. package/src/__tests__/slides-visuals-runtime-regressions.bun.test.ts +114 -0
  186. package/src/__tests__/styles.test.ts +35 -0
  187. package/src/cli.ts +9 -4
  188. package/src/plugin-loader.ts +245 -0
  189. package/src/shared.ts +614 -7
  190. package/src/site/styles.css +331 -0
  191. package/src/site/template.html +66 -5
  192. package/src/templates/deck.ts +186 -0
  193. package/src/templates/driver.ts +11 -1
  194. 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,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,19 @@
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
+ - [Glossary](content/reference/glossary.html) — quick definitions
@@ -0,0 +1,192 @@
1
+ ---
2
+ title: Crucible Template
3
+ description: Information architecture SSOT with specs, schemas, config, and governance
4
+ ---
5
+
6
+ # Crucible Template
7
+
8
+ The `crucible` template creates a **layer-0 information architecture site** — the single source of truth (SSOT) for an ecosystem's specifications, schemas, configuration, and governance. It extends `minimal` with six sections and a four-zone layout that separates rendered documentation from machine-consumable artifacts.
9
+
10
+ ## When to Use
11
+
12
+ - Establishing the foundational standards for a new ecosystem or platform
13
+ - Centralizing specs, schemas, and config that multiple projects depend on
14
+ - Governing an organization's technical standards, policies, and decision records
15
+ - Creating a reference architecture that AI agents and humans consume together
16
+ - Any situation where you need a "layer 0" that everything else builds on
17
+
18
+ ## What You Get
19
+
20
+ Everything from `minimal`, plus:
21
+
22
+ ```
23
+ my-crucible/
24
+ ├── site.yaml # Configured with 6 sections
25
+ ├── index.md # Home page with standards status and zone overview
26
+ ├── CUSTOMIZING.md # Four-zone layout guide (AI + human friendly)
27
+ ├── content/
28
+ │ ├── specs/
29
+ │ │ ├── overview.md # Standards catalog with status table
30
+ │ │ └── spec-template.md # Specification template (RFC 2119)
31
+ │ ├── schemas/
32
+ │ │ ├── index.md # Schema catalog linking to raw files
33
+ │ │ └── versioning.md # Schema versioning policy
34
+ │ ├── config/
35
+ │ │ ├── overview.md # Config catalog overview
36
+ │ │ ├── roles.md # Role definitions documentation
37
+ │ │ └── prompts.md # Prompt templates documentation
38
+ │ ├── policies/
39
+ │ │ ├── security-model.md # Security baseline
40
+ │ │ ├── dependency-policy.md # Dependency governance
41
+ │ │ └── change-procedure.md # How changes are approved
42
+ │ ├── guides/
43
+ │ │ ├── getting-started.md # Consuming the crucible
44
+ │ │ └── contributing.md # Adding specs, schemas, config
45
+ │ └── reference/
46
+ │ ├── decisions/
47
+ │ │ ├── index.md # Decision log (ADR pattern)
48
+ │ │ └── adr-template.md # ADR template
49
+ │ ├── changelog/
50
+ │ │ └── index.md # Release log
51
+ │ └── glossary.md # Terminology
52
+ ├── internal/
53
+ │ └── ops/
54
+ │ └── README.md # Explains the internal zone
55
+ └── ...
56
+ ```
57
+
58
+ ## Sections
59
+
60
+ | Section | Purpose | Typical Content |
61
+ | ------------- | ---------------------- | --------------------------------------------------------------- |
62
+ | **Specs** | What the standards are | Specifications, technical definitions, RFC 2119 requirements |
63
+ | **Schemas** | The contracts | Schema catalog, versioning policy, field documentation |
64
+ | **Config** | The data | Configuration catalogs, taxonomies, role and prompt definitions |
65
+ | **Policies** | The rules | Security model, dependency governance, change procedures |
66
+ | **Guides** | How to use it | Getting started, contributing, integration guides |
67
+ | **Reference** | Look-up material | Decision records, changelog, glossary |
68
+
69
+ ## The Four-Zone Model
70
+
71
+ This is what makes crucible different from every other template. Crucibles serve two audiences simultaneously — **humans reading documentation** and **machines consuming schemas and config**. The four-zone layout makes this explicit:
72
+
73
+ ```
74
+ my-crucible/
75
+ ├── content/ ← RENDERED: kitfly documentation sections
76
+ ├── schemas/ ← MACHINE: JSON Schema files (consumed by code)
77
+ ├── config/ ← MACHINE: YAML catalogs, roles, prompts
78
+ ├── internal/ ← PROJECT: repo ops, project code, automation
79
+ ├── src/ ← KITFLY: site engine (standalone only)
80
+ └── scripts/ ← KITFLY: build scripts (standalone only)
81
+ ```
82
+
83
+ **Zone rules:**
84
+
85
+ - `content/` documents the artifacts in other zones (e.g., `content/schemas/` documents `schemas/`)
86
+ - `schemas/` and `config/` are machine-consumable — other projects `$ref` or import from these paths
87
+ - `internal/` holds repo housekeeping, project code (lang wrappers, code generators), and automation
88
+ - `src/` and `scripts/` are kitfly's territory (standalone mode only)
89
+
90
+ For a WASM skill platform, this might look like:
91
+
92
+ - **Machine zone**: `schemas/ipc/v0/control.schema.json`, `config/agentic/roles/devlead.yaml`
93
+ - **Content zone**: `content/schemas/ipc-protocol.md` documenting those schemas
94
+ - **Internal zone**: `internal/src/` for language-specific SDK generators
95
+
96
+ ## The Config Section
97
+
98
+ Crucibles define the **agentic catalog** — roles and prompts that AI agents use across the ecosystem:
99
+
100
+ ```
101
+ config/agentic/
102
+ ├── roles/ # WHO — role definitions (scope, mindset, anti-patterns)
103
+ ├── prompts/ # HOW — reusable prompt templates for specific tasks
104
+ └── README.md
105
+ ```
106
+
107
+ Roles define identity ("I am a devlead"). Prompts define approach ("Write a spec following this template"). The `content/config/` section documents these for human consumption.
108
+
109
+ ## Usage
110
+
111
+ ```bash
112
+ kitfly init my-crucible --template crucible
113
+ kitfly init my-crucible --template crucible --brand "Lanyte Standards"
114
+
115
+ # With AI assistance instrumentation
116
+ kitfly init my-crucible --template crucible --standalone --ai-assist
117
+ ```
118
+
119
+ ## Crucible vs. Other Templates
120
+
121
+ | Aspect | Handbook | Productbook | Crucible |
122
+ | --------------------- | ------------ | -------------- | ------------------------------- |
123
+ | **Orientation** | How we work | What we build | What everything is built on |
124
+ | **Assumes** | Team exists | Product exists | Ecosystem starting |
125
+ | **Key section** | Guides | Domain | Specs |
126
+ | **Audience** | Team members | Product team | All consumers + machines |
127
+ | **Tone** | Explanatory | Analytical | Prescriptive (RFC 2119) |
128
+ | **Machine artifacts** | None | None | Schemas + config alongside docs |
129
+
130
+ ## Growing Your Crucible
131
+
132
+ As the ecosystem matures, the sections grow naturally:
133
+
134
+ **Specs accumulate as standards are defined** — each standard gets its own page:
135
+
136
+ ```
137
+ content/specs/
138
+ ├── overview.md
139
+ ├── spec-template.md
140
+ ├── skill-abi-v1.md
141
+ ├── ipc-protocol.md
142
+ ├── autonomy-model.md
143
+ └── capability-model.md
144
+ ```
145
+
146
+ **Schemas grow with the type system** — organized by domain and version:
147
+
148
+ ```
149
+ schemas/
150
+ ├── ipc/v0/
151
+ │ ├── control.schema.json
152
+ │ ├── command.schema.json
153
+ │ └── telemetry.schema.json
154
+ ├── skill/v0/
155
+ │ ├── manifest.schema.json
156
+ │ └── capability.schema.json
157
+ └── config/v0/
158
+ └── autonomy-gates.schema.json
159
+ ```
160
+
161
+ **Policies solidify through experience** — security model, dependency rules, and change procedures evolve.
162
+
163
+ **Decisions capture the "why"** — the ADR log becomes the institutional memory.
164
+
165
+ ## Example Use Cases
166
+
167
+ **WASM Skill Platform (Lanyte)**
168
+
169
+ - Specs: Skill ABI, IPC protocol, autonomy model, capability taxonomy
170
+ - Schemas: IPC message schemas, skill manifest, assessment pipeline
171
+ - Config: Autonomy gates, delegation rules, proxy policies
172
+ - Policies: Security model, dependency policy, skill assessment criteria
173
+ - Guides: Writing skills, deployment, skill assessment process
174
+ - Reference: ADRs for architecture choices, CalVer changelog
175
+
176
+ **Enterprise Ecosystem (FulmenHQ-style)**
177
+
178
+ - Specs: Coding standards, repository category standards, testing standards
179
+ - Schemas: Logging schemas, config schemas, error handling schemas
180
+ - Config: Repository taxonomy, fixture catalog, branding ecosystem
181
+ - Policies: Stream output policy, dependency governance, publishing standards
182
+ - Guides: Bootstrap guide, integration patterns, consuming assets
183
+ - Reference: Two-tier ADR system, release notes, glossary
184
+
185
+ **Open Source Foundation**
186
+
187
+ - Specs: API standards, data format specifications, interop requirements
188
+ - Schemas: API schemas, event schemas, config schemas
189
+ - Config: Project taxonomy, maintainer roles
190
+ - Policies: Contribution policy, security disclosure, licensing
191
+ - Guides: Getting started, SDK integration, migration guides
192
+ - Reference: Governance decisions, release history, terminology
@@ -0,0 +1,83 @@
1
+ ---
2
+ title: Handbook Template
3
+ description: Team documentation with overview, guides, and reference sections
4
+ ---
5
+
6
+ # Handbook Template
7
+
8
+ The `handbook` template creates a structured documentation site for teams. It extends `minimal` with three predefined sections.
9
+
10
+ ## When to Use
11
+
12
+ - Team onboarding documentation
13
+ - Internal knowledge bases
14
+ - Product documentation
15
+ - Developer handbooks
16
+ - Any docs that explain "what" and "how"
17
+
18
+ ## What You Get
19
+
20
+ Everything from `minimal`, plus:
21
+
22
+ ```
23
+ my-handbook/
24
+ ├── site.yaml # Configured with sections
25
+ ├── index.md # Home page linking to sections
26
+ ├── CUSTOMIZING.md # How to customize this site (AI + human friendly)
27
+ ├── content/
28
+ │ ├── overview/
29
+ │ │ └── introduction.md # High-level concepts
30
+ │ ├── guides/
31
+ │ │ └── getting-started.md # Step-by-step tutorials
32
+ │ └── reference/
33
+ │ └── glossary.md # Terminology and definitions
34
+ └── ...
35
+ ```
36
+
37
+ ## Sections
38
+
39
+ | Section | Purpose | Typical Content |
40
+ | ------------- | --------------------- | --------------------------------------- |
41
+ | **Overview** | Big picture, concepts | Architecture, key decisions, principles |
42
+ | **Guides** | How to do things | Tutorials, walkthroughs, recipes |
43
+ | **Reference** | Look-up information | API docs, glossaries, specifications |
44
+
45
+ This follows the [Diátaxis](https://diataxis.fr/) documentation framework's distinction between explanation (Overview), how-to guides (Guides), and reference material (Reference).
46
+
47
+ ## Usage
48
+
49
+ ```bash
50
+ kitfly init team-docs --template handbook
51
+ kitfly init team-docs --template handbook --brand "Engineering"
52
+ ```
53
+
54
+ ## Customization
55
+
56
+ After creation, you can:
57
+
58
+ - **Add sections**: Edit `site.yaml` to add more sections
59
+ - **Rename sections**: Change the `name` field in `site.yaml`
60
+ - **Restructure**: Move folders and update paths in `site.yaml`
61
+ - **Add files**: Create new `.md` files in any section folder
62
+
63
+ The starter files are placeholders with `<!-- ← CUSTOMIZE -->` comments showing where to add your content.
64
+
65
+ ## Example Use Cases
66
+
67
+ **Engineering Handbook**
68
+
69
+ - Overview: Team principles, tech stack decisions
70
+ - Guides: Development setup, deployment process, code review
71
+ - Reference: API contracts, environment variables, tooling
72
+
73
+ **Product Documentation**
74
+
75
+ - Overview: Product vision, target users
76
+ - Guides: Getting started, common workflows
77
+ - Reference: Feature specs, integration docs
78
+
79
+ **Onboarding Docs**
80
+
81
+ - Overview: Company culture, team structure
82
+ - Guides: First week checklist, tool setup
83
+ - Reference: Glossary, org chart, contacts