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.
- package/CHANGELOG.md +34 -0
- package/README.md +63 -16
- package/VERSION +1 -1
- package/dist/_raw/content/deployment/preflight.md +134 -0
- package/dist/_raw/content/deployment/recipes/aws-s3.md +128 -0
- package/dist/_raw/content/deployment/recipes/cloudflare-pages.md +73 -0
- package/dist/_raw/content/deployment/recipes/cloudflare-r2.md +156 -0
- package/dist/_raw/content/deployment/recipes/fly-io.md +57 -0
- package/dist/_raw/content/deployment/recipes/github-pages.md +112 -0
- package/dist/_raw/content/deployment/recipes/netlify.md +99 -0
- package/dist/_raw/content/deployment/recipes/vercel.md +88 -0
- package/dist/_raw/content/deployment/secrets-and-env-vars.md +75 -0
- package/dist/_raw/content/deployment.md +128 -0
- package/dist/_raw/content/guide/approaches.md +182 -0
- package/dist/_raw/content/guide/features.md +121 -0
- package/dist/_raw/content/guide/getting-started.md +112 -0
- package/dist/_raw/content/guide/kitfly-overview.md +209 -0
- package/dist/_raw/content/reference/configuration.md +259 -0
- package/dist/_raw/content/reference/design-catalog.md +167 -0
- package/dist/_raw/content/reference/environment-variables.md +66 -0
- package/dist/_raw/content/reference/glossary.md +92 -0
- package/dist/_raw/content/reference/key-concepts.md +118 -0
- package/dist/_raw/content/reference/plugins.md +220 -0
- package/dist/_raw/content/reference/structure.md +166 -0
- package/dist/_raw/content/reference.md +19 -0
- package/dist/_raw/content/templates/crucible.md +192 -0
- package/dist/_raw/content/templates/handbook.md +83 -0
- package/dist/_raw/content/templates/minimal.md +138 -0
- package/dist/_raw/content/templates/overview.md +187 -0
- package/dist/_raw/content/templates/pipeline.md +151 -0
- package/dist/_raw/content/templates/productbook.md +187 -0
- package/dist/_raw/content/templates/runbook.md +193 -0
- package/dist/_raw/content/templates/servicebook.md +163 -0
- package/dist/_raw/docs/decisions/ADR-0001-minimalist-site-code.md +118 -0
- package/dist/_raw/docs/decisions/ADR-0002-ai-accessibility.md +153 -0
- package/dist/_raw/docs/decisions/ADR-0003-single-file-bundle.md +93 -0
- package/dist/_raw/docs/decisions/ADR-0004-bun-runtime.md +98 -0
- package/dist/_raw/docs/decisions/ADR-0005-plugin-contract-and-distribution.md +110 -0
- package/dist/_raw/docs/decisions/DDR-0001-viewport-locked-layout.md +111 -0
- package/dist/_raw/docs/decisions/DDR-0002-theme-system.md +131 -0
- package/dist/_raw/docs/decisions/DDR-0003-bounded-logo-slot.md +106 -0
- package/dist/_raw/docs/decisions/DDR-0004-slides-rendering-model.md +113 -0
- package/dist/_raw/docs/decisions/DDR-0005-deterministic-layout-boundary.md +107 -0
- package/dist/_raw/docs/userguide/cli/build.md +85 -0
- package/dist/_raw/docs/userguide/cli/bundle.md +81 -0
- package/dist/_raw/docs/userguide/cli/dev.md +92 -0
- package/dist/_raw/docs/userguide/cli/init.md +116 -0
- package/dist/_raw/docs/userguide/cli/servers.md +69 -0
- package/dist/_raw/docs/userguide/cli/stop.md +76 -0
- package/dist/_raw/docs/userguide/cli/update.md +78 -0
- package/dist/_raw/docs/userguide/cli/version.md +65 -0
- package/dist/_raw/docs/userguide/cli.md +34 -0
- package/dist/_raw/docs/userguide/sharing.md +94 -0
- package/dist/_raw/schemas/plugin-schemas-notes.md +71 -0
- package/dist/_raw/schemas.md +42 -0
- package/dist/assets/brand/kitfly-favicon-32.png +0 -0
- package/dist/assets/brand/kitfly-icon-64.png +0 -0
- package/dist/assets/brand/kitfly-logo-128.png +0 -0
- package/dist/assets/brand/kitfly-logo-512.png +0 -0
- package/dist/assets/brand/kitfly-logo.svg +12132 -0
- package/dist/assets/brand/kitfly-neon-128.png +0 -0
- package/dist/assets/brand/kitfly-neon-192.png +0 -0
- package/dist/assets/brand/kitfly-neon-256.png +0 -0
- package/dist/assets/brand/kitfly-neon.png +0 -0
- package/dist/assets/brand/palette.md +75 -0
- package/dist/content/deployment/index.html +11 -0
- package/dist/content/deployment/preflight.html +418 -0
- package/dist/content/deployment/recipes/aws-s3.html +421 -0
- package/dist/content/deployment/recipes/cloudflare-pages.html +372 -0
- package/dist/content/deployment/recipes/cloudflare-r2.html +443 -0
- package/dist/content/deployment/recipes/fly-io.html +356 -0
- package/dist/content/deployment/recipes/github-pages.html +414 -0
- package/dist/content/deployment/recipes/index.html +11 -0
- package/dist/content/deployment/recipes/netlify.html +394 -0
- package/dist/content/deployment/recipes/vercel.html +382 -0
- package/dist/content/deployment/secrets-and-env-vars.html +380 -0
- package/dist/content/deployment.html +426 -0
- package/dist/content/guide/approaches.html +501 -0
- package/dist/content/guide/features.html +436 -0
- package/dist/content/guide/getting-started.html +403 -0
- package/dist/content/guide/index.html +11 -0
- package/dist/content/guide/kitfly-overview.html +544 -0
- package/dist/content/index.html +11 -0
- package/dist/content/reference/configuration.html +580 -0
- package/dist/content/reference/design-catalog.html +449 -0
- package/dist/content/reference/environment-variables.html +367 -0
- package/dist/content/reference/glossary.html +368 -0
- package/dist/content/reference/index.html +11 -0
- package/dist/content/reference/key-concepts.html +399 -0
- package/dist/content/reference/plugins.html +491 -0
- package/dist/content/reference/structure.html +463 -0
- package/dist/content/reference.html +334 -0
- package/dist/content/templates/crucible.html +546 -0
- package/dist/content/templates/handbook.html +405 -0
- package/dist/content/templates/index.html +11 -0
- package/dist/content/templates/minimal.html +447 -0
- package/dist/content/templates/overview.html +558 -0
- package/dist/content/templates/pipeline.html +494 -0
- package/dist/content/templates/productbook.html +540 -0
- package/dist/content/templates/runbook.html +543 -0
- package/dist/content/templates/servicebook.html +523 -0
- package/dist/content-index.json +540 -0
- package/dist/docs/decisions/ADR-0001-minimalist-site-code.html +491 -0
- package/dist/docs/decisions/ADR-0002-ai-accessibility.html +434 -0
- package/dist/docs/decisions/ADR-0003-single-file-bundle.html +412 -0
- package/dist/docs/decisions/ADR-0004-bun-runtime.html +409 -0
- package/dist/docs/decisions/ADR-0005-plugin-contract-and-distribution.html +402 -0
- package/dist/docs/decisions/DDR-0001-viewport-locked-layout.html +459 -0
- package/dist/docs/decisions/DDR-0002-theme-system.html +452 -0
- package/dist/docs/decisions/DDR-0003-bounded-logo-slot.html +423 -0
- package/dist/docs/decisions/DDR-0004-slides-rendering-model.html +399 -0
- package/dist/docs/decisions/DDR-0005-deterministic-layout-boundary.html +422 -0
- package/dist/docs/decisions/index.html +11 -0
- package/dist/docs/userguide/cli/build.html +408 -0
- package/dist/docs/userguide/cli/bundle.html +419 -0
- package/dist/docs/userguide/cli/dev.html +428 -0
- package/dist/docs/userguide/cli/index.html +11 -0
- package/dist/docs/userguide/cli/init.html +436 -0
- package/dist/docs/userguide/cli/servers.html +393 -0
- package/dist/docs/userguide/cli/stop.html +408 -0
- package/dist/docs/userguide/cli/update.html +406 -0
- package/dist/docs/userguide/cli/version.html +406 -0
- package/dist/docs/userguide/cli.html +386 -0
- package/dist/docs/userguide/index.html +11 -0
- package/dist/docs/userguide/sharing.html +465 -0
- package/dist/index.html +387 -0
- package/dist/llms.txt +18 -0
- package/dist/provenance.json +7 -0
- package/dist/schemas/index.html +11 -0
- package/dist/schemas/plugin-registry.schema.html +327 -0
- package/dist/schemas/plugin-schemas-notes.html +364 -0
- package/dist/schemas/plugin.schema.html +327 -0
- package/dist/schemas/plugins.schema.html +327 -0
- package/dist/schemas/v0/common.schema.html +386 -0
- package/dist/schemas/v0/index.html +11 -0
- package/dist/schemas/v0/plugin-registry.schema.html +547 -0
- package/dist/schemas/v0/plugin.schema.html +497 -0
- package/dist/schemas/v0/plugins.schema.html +406 -0
- package/dist/schemas/v0/site.schema.html +541 -0
- package/dist/schemas/v0/theme.schema.html +615 -0
- package/dist/schemas.html +351 -0
- package/dist/styles.css +1262 -0
- package/package.json +4 -2
- package/plugins-dist/callouts.css +32 -0
- package/plugins-dist/callouts.js +46 -0
- package/plugins-dist/slides-visuals.css +224 -0
- package/plugins-dist/slides-visuals.js +598 -0
- package/registry/plugins.yaml +35 -0
- package/schemas/README.md +10 -0
- package/schemas/plugin-registry.schema.json +5 -0
- package/schemas/plugin-schemas-notes.md +71 -0
- package/schemas/plugin.schema.json +5 -0
- package/schemas/plugins.schema.json +5 -0
- package/schemas/v0/common.schema.json +64 -0
- package/schemas/v0/plugin-registry.schema.json +225 -0
- package/schemas/v0/plugin.schema.json +175 -0
- package/schemas/v0/plugins.schema.json +84 -0
- package/schemas/v0/site.schema.json +56 -9
- package/schemas/v0/theme.schema.json +105 -22
- package/scripts/build.ts +155 -3
- package/scripts/bundle.ts +258 -95
- package/scripts/dev.ts +203 -1
- package/src/__tests__/build.test.ts +158 -1
- package/src/__tests__/bundle.test.ts +31 -0
- package/src/__tests__/cli.test.ts +14 -3
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/bad-list-indent.md +5 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/blank-line.md +5 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/compare-object-items.md +9 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/indented-fence.md +4 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/stat-grid-missing-fields.md +5 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/unknown-type.md +3 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/compare.md +10 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/comparison-table.md +14 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/funnel.md +7 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/kpi.md +5 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/layer-cake.md +6 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/pyramid.md +6 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/quadrant-grid.md +8 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/scorecard.md +13 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/stat-grid.md +8 -0
- package/src/__tests__/init.test.ts +35 -0
- package/src/__tests__/plugin-loader.test.ts +221 -0
- package/src/__tests__/shared.test.ts +428 -0
- package/src/__tests__/slides-visuals-fence-contract.test.ts +28 -0
- package/src/__tests__/slides-visuals-runtime-regressions.bun.test.ts +114 -0
- package/src/__tests__/styles.test.ts +35 -0
- package/src/cli.ts +9 -4
- package/src/plugin-loader.ts +245 -0
- package/src/shared.ts +614 -7
- package/src/site/styles.css +331 -0
- package/src/site/template.html +66 -5
- package/src/templates/deck.ts +186 -0
- package/src/templates/driver.ts +11 -1
- package/src/templates/minimal.ts +1 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "DDR-0004: Slides Rendering Model"
|
|
3
|
+
description: "Defines slides mode rendering, segmentation, and navigation behavior across dev/build/bundle"
|
|
4
|
+
author: "devlead"
|
|
5
|
+
supervised_by: "@3leapsdave"
|
|
6
|
+
date: "2026-02-11"
|
|
7
|
+
status: "proposed"
|
|
8
|
+
tags: ["ddr", "slides", "layout", "routing", "rendering"]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# DDR-0004: Slides Rendering Model
|
|
12
|
+
|
|
13
|
+
## Status
|
|
14
|
+
|
|
15
|
+
Proposed
|
|
16
|
+
|
|
17
|
+
## Context
|
|
18
|
+
|
|
19
|
+
Kitfly is adding a new `mode: slides` experience for fixed-aspect presentation output while preserving existing docs mode behavior.
|
|
20
|
+
|
|
21
|
+
A design-level decision is needed so all render paths (`dev`, `build`, `bundle`) behave consistently and remain minimal.
|
|
22
|
+
|
|
23
|
+
## Decision
|
|
24
|
+
|
|
25
|
+
### 1. Single-page, hash-routed slides
|
|
26
|
+
|
|
27
|
+
Slides mode renders as a single-page deck with hash navigation (`#slide-n`).
|
|
28
|
+
|
|
29
|
+
Behavior:
|
|
30
|
+
|
|
31
|
+
- prev/next controls update active slide,
|
|
32
|
+
- keyboard navigation supports ArrowLeft/ArrowRight/Space/Home/End,
|
|
33
|
+
- URL hash deep-links and restores slide state on reload.
|
|
34
|
+
|
|
35
|
+
### 2. Explicit slide segmentation delimiter
|
|
36
|
+
|
|
37
|
+
Within a markdown file, slide boundaries use:
|
|
38
|
+
|
|
39
|
+
`--- slide ---`
|
|
40
|
+
|
|
41
|
+
Rules:
|
|
42
|
+
|
|
43
|
+
- standard YAML frontmatter remains unchanged,
|
|
44
|
+
- plain markdown `---` is treated as content (horizontal rule),
|
|
45
|
+
- one file per slide remains a first-class authoring model.
|
|
46
|
+
|
|
47
|
+
### 3. Frontmatter metadata for slide behavior
|
|
48
|
+
|
|
49
|
+
Per-slide frontmatter supports:
|
|
50
|
+
|
|
51
|
+
- `title` for sidebar/counter labels,
|
|
52
|
+
- `class` for slide-level layout/style hooks.
|
|
53
|
+
|
|
54
|
+
Rendered slide wrapper form:
|
|
55
|
+
|
|
56
|
+
`<section class="slide {frontmatter.class?}"> ... </section>`
|
|
57
|
+
|
|
58
|
+
### 4. Mode branch with parity requirement
|
|
59
|
+
|
|
60
|
+
Slides mode is a rendering branch, not a separate engine.
|
|
61
|
+
|
|
62
|
+
Parity requirement:
|
|
63
|
+
|
|
64
|
+
- `scripts/dev.ts`, `scripts/build.ts`, and `scripts/bundle.ts` must produce equivalent slide ordering, segmentation, and navigation semantics.
|
|
65
|
+
- Shared logic should live in `src/shared.ts` where feasible to avoid divergence.
|
|
66
|
+
|
|
67
|
+
### 5. Overflow policy
|
|
68
|
+
|
|
69
|
+
Default slide frame behavior is scrollable overflow (`overflow: auto`) to avoid silent content clipping. Optional strict clipping can be enabled via slide class if needed.
|
|
70
|
+
|
|
71
|
+
## Consequences
|
|
72
|
+
|
|
73
|
+
### Positive
|
|
74
|
+
|
|
75
|
+
- Deterministic routing and shareable deep links.
|
|
76
|
+
- Lower ambiguity for authors/agents due to explicit delimiter.
|
|
77
|
+
- Consistent output across dev/build/bundle.
|
|
78
|
+
- Keeps core implementation compact and understandable.
|
|
79
|
+
|
|
80
|
+
### Negative
|
|
81
|
+
|
|
82
|
+
- Authors must learn a non-standard delimiter token for intra-file slides.
|
|
83
|
+
- Very dense slides may still need manual content shaping for best presentation quality.
|
|
84
|
+
|
|
85
|
+
### Neutral
|
|
86
|
+
|
|
87
|
+
- Slides mode does not aim to replace full presentation suites; it optimizes markdown-native, web-first decks.
|
|
88
|
+
|
|
89
|
+
## Non-Goals
|
|
90
|
+
|
|
91
|
+
- Animated transitions in core,
|
|
92
|
+
- presenter mode/speaker notes in core,
|
|
93
|
+
- runtime slide master system,
|
|
94
|
+
- swipe gestures requirement for v1.
|
|
95
|
+
|
|
96
|
+
## Alternatives Considered
|
|
97
|
+
|
|
98
|
+
### Multi-page slide routing
|
|
99
|
+
|
|
100
|
+
Rejected for v1 due to higher complexity and weaker parity with single-file bundle behavior.
|
|
101
|
+
|
|
102
|
+
### Reusing plain `---` as slide break
|
|
103
|
+
|
|
104
|
+
Rejected due to ambiguity with frontmatter and horizontal-rule markdown usage.
|
|
105
|
+
|
|
106
|
+
### Hidden overflow by default
|
|
107
|
+
|
|
108
|
+
Rejected because clipped content fails silently and is hard to debug during authoring.
|
|
109
|
+
|
|
110
|
+
## References
|
|
111
|
+
|
|
112
|
+
- v0.2.0 slides mode plan (`.plans/active/v0.2.0/`)
|
|
113
|
+
- [DDR-0001: Viewport-Locked Layout](DDR-0001-viewport-locked-layout.md)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "DDR-0005: Deterministic Layout Boundary"
|
|
3
|
+
description: "Defines the boundary between CSS layout primitives/figures and diagramming engines for slide visual composition"
|
|
4
|
+
author: "deliverylead"
|
|
5
|
+
supervised_by: "@3leapsdave"
|
|
6
|
+
date: "2026-02-12"
|
|
7
|
+
status: "proposed"
|
|
8
|
+
tags: ["ddr", "slides", "layout", "primitives", "figures", "diagrams"]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# DDR-0005: Deterministic Layout Boundary
|
|
12
|
+
|
|
13
|
+
## Status
|
|
14
|
+
|
|
15
|
+
Proposed
|
|
16
|
+
|
|
17
|
+
## Context
|
|
18
|
+
|
|
19
|
+
Kitfly generates slidesites — fixed-aspect pages that are not “infinite scroll” documents. A key use case is AI agents generating presentation-quality slides, including infographic-style layouts with shapes, connectors, and composed visual patterns. (If content is long, it may scroll _within_ the slide frame; the page layout remains slide-like.)
|
|
20
|
+
|
|
21
|
+
Kitfly is not trying to recreate diagram engines like Mermaid or PlantUML. Those tools compute layout from relationships, which is powerful but hard to control precisely in slide composition and hard for agents to predict.
|
|
22
|
+
|
|
23
|
+
We need to decide how far to push CSS-based shapes and figures before delegating to diagram engines. The risk on one side is rebuilding a diagram engine inside CSS; the risk on the other is forcing all visual compositions through tools whose auto-layout is difficult for agents to control precisely.
|
|
24
|
+
|
|
25
|
+
### Observed Problems
|
|
26
|
+
|
|
27
|
+
1. **Mermaid/PlantUML alignment** — Auto-layout engines optimize for their own constraints. Achieving pixel-precise placement within a slide's visual design is unreliable. Agents cannot predict where nodes will land.
|
|
28
|
+
2. **Agent reasoning** — AI agents generate better results when they can specify placement explicitly ("put X at grid position 2,1") rather than describing relationships and hoping the layout engine produces the desired visual.
|
|
29
|
+
3. **Scope creep** — Without a clear boundary, CSS primitives could grow into a general-purpose diagramming system, duplicating work better handled by existing engines.
|
|
30
|
+
|
|
31
|
+
## Decision
|
|
32
|
+
|
|
33
|
+
**Kitfly will maintain two distinct tiers of visual building blocks, separated by a deterministic layout boundary.**
|
|
34
|
+
|
|
35
|
+
### Tier 1: Shapes (Primitives)
|
|
36
|
+
|
|
37
|
+
Atomic visual elements (shapes, connectors, text treatments, decorators) with **no internal layout logic**. The author or agent specifies position explicitly. These are analogous to icons in an icon library.
|
|
38
|
+
|
|
39
|
+
Examples: box, circle, diamond, chevron, block-arrow, line-connector, callout, badge.
|
|
40
|
+
|
|
41
|
+
### Tier 2: Figures (Deterministic Infographic Patterns)
|
|
42
|
+
|
|
43
|
+
Parameterized layout templates built from primitives. The figure owns its **internal arrangement** via a deterministic algorithm (CSS Grid, flexbox, trigonometric placement). The agent fills named slots; the figure handles spacing, sizing, and connector routing within its bounding box.
|
|
44
|
+
|
|
45
|
+
Examples: cycle-wheel, quadrant-grid, layer-cake, funnel, hub-spoke, horizontal-flow, timeline.
|
|
46
|
+
|
|
47
|
+
### The Boundary Rule
|
|
48
|
+
|
|
49
|
+
> **If you can name the pieces and where they go (explicit positions or slots), it is a figure. If layout must be computed from relationships between a variable set of nodes, it is a diagram engine.**
|
|
50
|
+
|
|
51
|
+
| Criterion | Primitives / Figures | Diagramming Engine |
|
|
52
|
+
| ------------------------------------------- | --------------------------- | ------------------- |
|
|
53
|
+
| Agent knows element count | Yes | Maybe not |
|
|
54
|
+
| Agent controls placement | Yes (explicit or via slots) | No (engine decides) |
|
|
55
|
+
| Adding a node requires recalculating others | No | Yes |
|
|
56
|
+
| Relationships determine layout | No | Yes |
|
|
57
|
+
| Topology is fixed per figure type | Yes | No |
|
|
58
|
+
|
|
59
|
+
### Diagramming Engine Integration
|
|
60
|
+
|
|
61
|
+
For compositions that cross the boundary (flowcharts with variable branching, org charts, dependency graphs, state machines), kitfly's **plugin model** will wrap diagramming engines with a constrained contract:
|
|
62
|
+
|
|
63
|
+
- The plugin renders into a **declared bounding box** within the slide grid.
|
|
64
|
+
- The plugin accepts a **kitfly theme** (colors, fonts, stroke styles) for visual consistency.
|
|
65
|
+
- Internal layout is fully delegated to the engine.
|
|
66
|
+
- The agent does not attempt to micro-position nodes within the engine's output.
|
|
67
|
+
|
|
68
|
+
## Consequences
|
|
69
|
+
|
|
70
|
+
### Implementation Notes (M1.1)
|
|
71
|
+
|
|
72
|
+
- Core ships **shape primitives** as `.block` modifiers (for example `circle`, `diamond`, `chevron`, `block-arrow`) with deterministic CSS-only behavior.
|
|
73
|
+
- Simple directional flows use existing `block-flow` glyph arrows plus directional shapes; general connector routing remains deferred to plugin/engine phases.
|
|
74
|
+
- This keeps Tier 1 in core without crossing into layout-engine responsibilities.
|
|
75
|
+
|
|
76
|
+
### Benefits
|
|
77
|
+
|
|
78
|
+
1. **Agent reliability** — Agents produce consistent, predictable visual output for common infographic patterns that are deterministic layouts.
|
|
79
|
+
2. **Clear plugin contract** — Diagramming engines are scoped to a bounding box with theme passthrough, avoiding the "Mermaid vs. slide layout" fight.
|
|
80
|
+
3. **No engine rebuild** — We explicitly stop before reimplementing graph layout, edge routing, or constraint solving in CSS.
|
|
81
|
+
4. **Catalog-driven authoring** — The figure catalog acts as a vocabulary. Agents pick a pattern and fill slots, similar to choosing an icon from a set.
|
|
82
|
+
|
|
83
|
+
### Trade-offs
|
|
84
|
+
|
|
85
|
+
1. **Figure library maintenance** — Each new infographic pattern requires a new figure implementation. This is intentional — it's the cost of deterministic quality.
|
|
86
|
+
2. **Boundary edge cases** — Some compositions (e.g., a flow diagram with exactly 2 branch points) could go either way. Default to figures when topology is fixed and small; to engines when variable.
|
|
87
|
+
3. **Two rendering paths** — Slides mixing figures and engine-rendered diagrams have two rendering subsystems. The plugin model must ensure visual coherence (shared theme tokens).
|
|
88
|
+
|
|
89
|
+
## Alternatives Considered
|
|
90
|
+
|
|
91
|
+
### A. CSS-only, no diagramming engines
|
|
92
|
+
|
|
93
|
+
Rejected. Connector routing and auto-layout for arbitrary graphs is a solved problem in existing engines. Rebuilding it in CSS is high effort, low quality.
|
|
94
|
+
|
|
95
|
+
### B. Diagramming engine-only (Mermaid/PlantUML for everything)
|
|
96
|
+
|
|
97
|
+
Rejected. Agents cannot control output placement precisely enough for slide-quality layouts. Simple compositions (4-box grid, layer cake) become unnecessarily complex in diagram DSLs.
|
|
98
|
+
|
|
99
|
+
### C. Canvas/SVG drawing API exposed to agents
|
|
100
|
+
|
|
101
|
+
Rejected for primary use. Too low-level — agents generating raw SVG coordinates produce inconsistent results. However, primitives may use inline SVG internally (especially for connectors), hidden behind the primitive's API.
|
|
102
|
+
|
|
103
|
+
## References
|
|
104
|
+
|
|
105
|
+
- [Design Catalog: Shapes and Figures](../../content/reference/design-catalog.md)
|
|
106
|
+
- [ADR-0005: Plugin Contract and Distribution Strategy](ADR-0005-plugin-contract-and-distribution.md)
|
|
107
|
+
- [DDR-0004: Slides Rendering Model](DDR-0004-slides-rendering-model.md)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# kitfly build
|
|
2
|
+
|
|
3
|
+
Build static site to output directory.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
kitfly build [folder] [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
Generates a complete static HTML site from your markdown files. The output can be deployed to any static hosting service (GitHub Pages, Netlify, S3, etc.).
|
|
14
|
+
|
|
15
|
+
## Arguments
|
|
16
|
+
|
|
17
|
+
| Argument | Description |
|
|
18
|
+
| -------- | -------------------------------------------------------------------------------- |
|
|
19
|
+
| `folder` | Content folder to build (default: current directory or `docroot` from site.yaml) |
|
|
20
|
+
|
|
21
|
+
## Options
|
|
22
|
+
|
|
23
|
+
| Option | Environment Variable | Default | Description |
|
|
24
|
+
| ------------- | -------------------- | ------- | -------------------------------- |
|
|
25
|
+
| `--out <dir>` | `KITFLY_BUILD_OUT` | dist | Output directory |
|
|
26
|
+
| `--no-raw` | - | false | Don't include raw markdown files |
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
### Basic usage
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Build current project
|
|
34
|
+
kitfly build
|
|
35
|
+
|
|
36
|
+
# Build specific folder
|
|
37
|
+
kitfly build ./docs
|
|
38
|
+
|
|
39
|
+
# Custom output directory
|
|
40
|
+
kitfly build --out ./public
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Without raw markdown
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# HTML only, no .md files in output
|
|
47
|
+
kitfly build --no-raw
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Output Structure
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
dist/
|
|
54
|
+
├── index.html
|
|
55
|
+
├── guide/
|
|
56
|
+
│ ├── getting-started.html
|
|
57
|
+
│ └── getting-started.md # (if --no-raw not specified)
|
|
58
|
+
├── reference/
|
|
59
|
+
│ └── ...
|
|
60
|
+
└── assets/
|
|
61
|
+
└── ...
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Raw Markdown Files
|
|
65
|
+
|
|
66
|
+
By default, kitfly includes the original `.md` files alongside the generated HTML. This allows:
|
|
67
|
+
|
|
68
|
+
- Downloading source for offline editing
|
|
69
|
+
- Transparency about content source
|
|
70
|
+
- Easy content migration
|
|
71
|
+
|
|
72
|
+
Use `--no-raw` to exclude these files if not needed.
|
|
73
|
+
|
|
74
|
+
## Plugin validation errors (triple-colon fences)
|
|
75
|
+
|
|
76
|
+
Some plugins add special block syntax (for example, `slides-visuals` uses `:::` fences).
|
|
77
|
+
|
|
78
|
+
When a plugin is enabled, kitfly may validate your content during the build. If validation fails, `kitfly build` will exit with a clear error message so you can fix the content and re-run the build.
|
|
79
|
+
|
|
80
|
+
See the exact contract (with examples): `../../../content/reference/plugins.html#triple-colon-fence-contract-slides-visuals`.
|
|
81
|
+
|
|
82
|
+
## See Also
|
|
83
|
+
|
|
84
|
+
- [kitfly dev](dev.md) - Development server
|
|
85
|
+
- [kitfly bundle](bundle.md) - Single-file output
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# kitfly bundle
|
|
2
|
+
|
|
3
|
+
Build single-file HTML bundle.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
kitfly bundle [folder] [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
Creates a single, self-contained HTML file with all content, styles, and navigation embedded. Perfect for sharing via email, Slack, or file sharing services.
|
|
14
|
+
|
|
15
|
+
## Arguments
|
|
16
|
+
|
|
17
|
+
| Argument | Description |
|
|
18
|
+
| -------- | --------------------------------------------------------------------------------- |
|
|
19
|
+
| `folder` | Content folder to bundle (default: current directory or `docroot` from site.yaml) |
|
|
20
|
+
|
|
21
|
+
## Options
|
|
22
|
+
|
|
23
|
+
| Option | Environment Variable | Default | Description |
|
|
24
|
+
| --------------- | -------------------- | ----------- | ------------------------------ |
|
|
25
|
+
| `--out <dir>` | `KITFLY_BUILD_OUT` | dist | Output directory |
|
|
26
|
+
| `--name <file>` | - | bundle.html | Output filename |
|
|
27
|
+
| `--raw` | `KITFLY_BUILD_RAW` | true | Include raw markdown in bundle |
|
|
28
|
+
| `--no-raw` | - | - | Don't include raw markdown |
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
### Basic usage
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Create bundle.html in dist/
|
|
36
|
+
kitfly bundle
|
|
37
|
+
|
|
38
|
+
# Custom filename
|
|
39
|
+
kitfly bundle --name my-docs.html
|
|
40
|
+
|
|
41
|
+
# Custom output location
|
|
42
|
+
kitfly bundle --out ./release --name handbook.html
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Output
|
|
46
|
+
|
|
47
|
+
A single HTML file containing:
|
|
48
|
+
|
|
49
|
+
- All page content with images inlined as base64 data URIs
|
|
50
|
+
- Embedded CSS styles
|
|
51
|
+
- Syntax highlighting (Prism.js, inlined)
|
|
52
|
+
- Diagram rendering (Mermaid, inlined)
|
|
53
|
+
- Navigation and table of contents
|
|
54
|
+
- Dark mode support
|
|
55
|
+
- Brand logo and favicon (inlined)
|
|
56
|
+
- No external dependencies (works fully offline)
|
|
57
|
+
|
|
58
|
+
## Use Cases
|
|
59
|
+
|
|
60
|
+
- **Email attachment**: Share documentation without hosting
|
|
61
|
+
- **Offline reading**: Works without internet connection
|
|
62
|
+
- **Review cycles**: Send to stakeholders for feedback
|
|
63
|
+
- **Archival**: Single-file snapshot of documentation
|
|
64
|
+
- **Client handoff**: Portable single-file deliverable with all images embedded
|
|
65
|
+
|
|
66
|
+
## File Size
|
|
67
|
+
|
|
68
|
+
Bundle size depends on content volume and images. Typical documentation sites produce bundles of 100KB-1MB. Sites with many images will be larger due to base64 encoding (~33% overhead per image).
|
|
69
|
+
|
|
70
|
+
## Plugin validation errors (triple-colon fences)
|
|
71
|
+
|
|
72
|
+
Some plugins add special block syntax (for example, `slides-visuals` uses `:::` fences).
|
|
73
|
+
|
|
74
|
+
When a plugin is enabled, kitfly may validate your content before bundling. If validation fails, `kitfly bundle` will exit with a clear error message so you can fix the content and re-run the bundle.
|
|
75
|
+
|
|
76
|
+
See the exact contract (with examples): `../../../content/reference/plugins.html#triple-colon-fence-contract-slides-visuals`.
|
|
77
|
+
|
|
78
|
+
## See Also
|
|
79
|
+
|
|
80
|
+
- [kitfly build](build.md) - Multi-file static build
|
|
81
|
+
- [kitfly dev](dev.md) - Development server
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# kitfly dev
|
|
2
|
+
|
|
3
|
+
Start development server with hot reload.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
kitfly dev [folder] [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
Launches a local development server that renders your markdown files and automatically reloads when content changes. This is the primary command for authoring documentation.
|
|
14
|
+
|
|
15
|
+
## Arguments
|
|
16
|
+
|
|
17
|
+
| Argument | Description |
|
|
18
|
+
| -------- | -------------------------------------------------------------------------------- |
|
|
19
|
+
| `folder` | Content folder to serve (default: current directory or `docroot` from site.yaml) |
|
|
20
|
+
|
|
21
|
+
## Options
|
|
22
|
+
|
|
23
|
+
| Option | Environment Variable | Default | Description |
|
|
24
|
+
| ---------------- | -------------------- | --------- | ------------------------------------- |
|
|
25
|
+
| `--port <n>` | `KITFLY_DEV_PORT` | 3333 | Server port |
|
|
26
|
+
| `--host <h>` | `KITFLY_DEV_HOST` | localhost | Server host |
|
|
27
|
+
| `--daemon`, `-d` | - | false | Run in background, return immediately |
|
|
28
|
+
| `--json` | - | false | Output JSON (implies --daemon) |
|
|
29
|
+
| `--no-open` | - | false | Don't open browser automatically |
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
### Basic usage
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Serve current directory
|
|
37
|
+
kitfly dev
|
|
38
|
+
|
|
39
|
+
# Serve specific folder
|
|
40
|
+
kitfly dev ./docs
|
|
41
|
+
|
|
42
|
+
# Custom port
|
|
43
|
+
kitfly dev --port 8080
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Background mode
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Run as daemon
|
|
50
|
+
kitfly dev --daemon
|
|
51
|
+
|
|
52
|
+
# Get JSON output for scripting
|
|
53
|
+
kitfly dev --json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Output (JSON mode)
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"pid": 12345,
|
|
61
|
+
"port": 3333,
|
|
62
|
+
"url": "http://localhost:3333"
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Port Conflict Detection
|
|
67
|
+
|
|
68
|
+
If the specified port is already in use, kitfly will report an error rather than silently choosing another port. Use `kitfly servers` to see what's running.
|
|
69
|
+
|
|
70
|
+
## Hot Reload
|
|
71
|
+
|
|
72
|
+
The dev server watches for changes to:
|
|
73
|
+
|
|
74
|
+
- Markdown files (`.md`)
|
|
75
|
+
- Configuration (`site.yaml`, `theme.yaml`)
|
|
76
|
+
- Template files
|
|
77
|
+
|
|
78
|
+
Changes are reflected immediately without manual refresh.
|
|
79
|
+
|
|
80
|
+
## Plugin validation errors (triple-colon fences)
|
|
81
|
+
|
|
82
|
+
Some plugins add special block syntax (for example, `slides-visuals` uses `:::` fences).
|
|
83
|
+
|
|
84
|
+
When a plugin is enabled, kitfly may validate your content before rendering. If validation fails, `kitfly dev` will exit with a clear error message so you can fix the content and restart.
|
|
85
|
+
|
|
86
|
+
See the exact contract (with examples): `../../../content/reference/plugins.html#triple-colon-fence-contract-slides-visuals`.
|
|
87
|
+
|
|
88
|
+
## See Also
|
|
89
|
+
|
|
90
|
+
- [kitfly build](build.md) - Build static site
|
|
91
|
+
- [kitfly servers](servers.md) - List running servers
|
|
92
|
+
- [kitfly stop](stop.md) - Stop servers
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# kitfly init
|
|
2
|
+
|
|
3
|
+
Create new project from template.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
kitfly init [name] [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
Initializes a new kitfly project with all necessary files and folder structure. Creates a standalone site that you own and can customize.
|
|
14
|
+
|
|
15
|
+
## Arguments
|
|
16
|
+
|
|
17
|
+
| Argument | Description |
|
|
18
|
+
| -------- | --------------------------------------------------- |
|
|
19
|
+
| `name` | Project directory name (default: current directory) |
|
|
20
|
+
|
|
21
|
+
## Options
|
|
22
|
+
|
|
23
|
+
| Option | Description |
|
|
24
|
+
| ------------------- | -------------------------------------------------------------------- |
|
|
25
|
+
| `--template <name>` | Template to use: `minimal`, `handbook`, `runbook` (default: minimal) |
|
|
26
|
+
| `--standalone` | Create self-contained site with rendering code (default: true) |
|
|
27
|
+
| `--brand <name>` | Set brand name |
|
|
28
|
+
| `--brand-url <url>` | Set brand URL |
|
|
29
|
+
|
|
30
|
+
## Templates
|
|
31
|
+
|
|
32
|
+
### minimal
|
|
33
|
+
|
|
34
|
+
Basic documentation site with simple structure:
|
|
35
|
+
|
|
36
|
+
- Single content section
|
|
37
|
+
- Clean starting point
|
|
38
|
+
- Minimal example content
|
|
39
|
+
|
|
40
|
+
### handbook
|
|
41
|
+
|
|
42
|
+
Team/company handbook template:
|
|
43
|
+
|
|
44
|
+
- Multiple sections (About, Policies, Guides, Resources)
|
|
45
|
+
- Onboarding-focused structure
|
|
46
|
+
- Sample policies and guides
|
|
47
|
+
|
|
48
|
+
### runbook
|
|
49
|
+
|
|
50
|
+
Operations runbook template:
|
|
51
|
+
|
|
52
|
+
- Procedures, Troubleshooting, Reference, Incidents sections
|
|
53
|
+
- Operations-focused structure
|
|
54
|
+
- Incident response templates
|
|
55
|
+
|
|
56
|
+
## Examples
|
|
57
|
+
|
|
58
|
+
### Basic usage
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Create in new directory
|
|
62
|
+
kitfly init my-docs
|
|
63
|
+
|
|
64
|
+
# Create in current directory
|
|
65
|
+
kitfly init .
|
|
66
|
+
|
|
67
|
+
# Use handbook template
|
|
68
|
+
kitfly init company-handbook --template handbook
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### With branding
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
kitfly init my-docs --brand "Acme Corp" --brand-url "https://acme.com"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Output Structure
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
my-docs/
|
|
81
|
+
├── content/
|
|
82
|
+
│ └── index.md
|
|
83
|
+
├── scripts/
|
|
84
|
+
│ ├── dev.ts
|
|
85
|
+
│ ├── build.ts
|
|
86
|
+
│ └── bundle.ts
|
|
87
|
+
├── src/
|
|
88
|
+
│ └── ...
|
|
89
|
+
├── site.yaml
|
|
90
|
+
├── theme.yaml
|
|
91
|
+
├── package.json
|
|
92
|
+
└── README.md
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## After Initialization
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
cd my-docs
|
|
99
|
+
bun install
|
|
100
|
+
bun run dev
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Standalone Mode
|
|
104
|
+
|
|
105
|
+
By default, `kitfly init` creates a standalone site with its own copy of:
|
|
106
|
+
|
|
107
|
+
- Rendering scripts (dev, build, bundle)
|
|
108
|
+
- Engine and theme code
|
|
109
|
+
- Configuration schemas
|
|
110
|
+
|
|
111
|
+
This means your site is independent - no kitfly CLI required after setup.
|
|
112
|
+
|
|
113
|
+
## See Also
|
|
114
|
+
|
|
115
|
+
- [kitfly update](update.md) - Update site code
|
|
116
|
+
- [kitfly dev](dev.md) - Start development
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# kitfly servers
|
|
2
|
+
|
|
3
|
+
List running dev servers.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
kitfly servers [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
Displays all kitfly dev servers currently running on this machine. Useful for managing multiple documentation projects or finding orphaned servers.
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
| Option | Description |
|
|
18
|
+
| -------- | -------------- |
|
|
19
|
+
| `--json` | Output as JSON |
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
### Basic usage
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
$ kitfly servers
|
|
27
|
+
PORT PID PROJECT
|
|
28
|
+
3333 12345 /Users/me/docs/handbook
|
|
29
|
+
3340 12346 /Users/me/docs/runbook
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### JSON output
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
$ kitfly servers --json
|
|
36
|
+
[
|
|
37
|
+
{"port": 3333, "pid": 12345, "project": "/Users/me/docs/handbook"},
|
|
38
|
+
{"port": 3340, "pid": 12346, "project": "/Users/me/docs/runbook"}
|
|
39
|
+
]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### No servers running
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
$ kitfly servers
|
|
46
|
+
No kitfly servers running
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Output Fields
|
|
50
|
+
|
|
51
|
+
| Field | Description |
|
|
52
|
+
| --------- | ---------------------- |
|
|
53
|
+
| `PORT` | Server port number |
|
|
54
|
+
| `PID` | Process ID |
|
|
55
|
+
| `PROJECT` | Project directory path |
|
|
56
|
+
|
|
57
|
+
## Server Registry
|
|
58
|
+
|
|
59
|
+
Kitfly maintains a registry of running servers at:
|
|
60
|
+
|
|
61
|
+
- macOS/Linux: `~/.kitfly/servers.json`
|
|
62
|
+
- Windows: `%USERPROFILE%\.kitfly\servers.json`
|
|
63
|
+
|
|
64
|
+
The registry is automatically cleaned up when servers stop normally.
|
|
65
|
+
|
|
66
|
+
## See Also
|
|
67
|
+
|
|
68
|
+
- [kitfly dev](dev.md) - Start a server
|
|
69
|
+
- [kitfly stop](stop.md) - Stop servers
|