konpeki 0.3.1 → 0.4.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 (167) hide show
  1. package/AGENTS.md +21 -28
  2. package/AUTHORING.md +68 -229
  3. package/CONTRIBUTING.md +10 -23
  4. package/README.md +98 -106
  5. package/SETUP.md +49 -129
  6. package/docs/development.md +43 -256
  7. package/docs/workflow.md +6 -108
  8. package/html/README.md +140 -0
  9. package/html/browser.ts +103 -0
  10. package/html/document.ts +38 -0
  11. package/html/floor.ts +34 -0
  12. package/html/index.html +5 -0
  13. package/html/inspect.ts +313 -0
  14. package/html/preview.css +62 -0
  15. package/html/preview.tsx +463 -0
  16. package/html/review-hints.ts +63 -0
  17. package/html/server.ts +99 -0
  18. package/html/source.ts +104 -0
  19. package/html/starter.ts +6 -0
  20. package/html/theme-authoring.md +176 -0
  21. package/html/theme.md +61 -0
  22. package/index.html +9 -9
  23. package/package.json +21 -37
  24. package/plugin.json +1 -1
  25. package/public/og.png +0 -0
  26. package/runtime/browser-B-29TH1a.mjs +595 -0
  27. package/runtime/floor-Cmk7G3pU.mjs +41 -0
  28. package/runtime/konpeki.mjs +90 -1410
  29. package/runtime/server-BAqC_5WD.mjs +2 -0
  30. package/runtime/server-DfRpfcY9.mjs +205 -0
  31. package/runtime/source-B_Ui9tMp.mjs +141 -0
  32. package/runtime/source-CZQq9GUO.mjs +2 -0
  33. package/skills/konpeki/SKILL.md +88 -172
  34. package/skills/konpeki/assets/blank.html +17 -0
  35. package/skills/konpeki/floor.md +76 -0
  36. package/skills/konpeki/references/cover.md +27 -0
  37. package/skills/konpeki/references/long-document.md +40 -0
  38. package/skills/konpeki/references/one-pager.md +27 -0
  39. package/skills/konpeki/references/patterns.md +118 -0
  40. package/skills/konpeki/references/resume.md +28 -0
  41. package/skills/konpeki/references/slides.md +28 -0
  42. package/skills/konpeki/scripts/ensure-runtime.mjs +10 -31
  43. package/skills/konpeki/scripts/prepare-document.mjs +25 -14
  44. package/src/components/PageBoard.tsx +156 -0
  45. package/src/lib/alignment.ts +21 -0
  46. package/src/lib/page-board.ts +25 -0
  47. package/src/lib/review-position.ts +19 -0
  48. package/src/styles/base.css +1 -10
  49. package/src/styles/feedback.css +2 -1
  50. package/src/styles/shell.css +94 -354
  51. package/theme-base.css +90 -0
  52. package/theme.css +56 -0
  53. package/vite.config.ts +2 -5
  54. package/composition/README.md +0 -156
  55. package/composition/compile.ts +0 -227
  56. package/composition/document.ts +0 -600
  57. package/composition/schema.json +0 -3001
  58. package/composition/schema.ts +0 -437
  59. package/composition/theme-tokens.ts +0 -16
  60. package/composition/types.ts +0 -269
  61. package/composition/validate.ts +0 -226
  62. package/composition/vector.ts +0 -143
  63. package/composition/visualizations.ts +0 -319
  64. package/design/README.md +0 -17
  65. package/design/palettes/README.md +0 -14
  66. package/design/palettes/base.ts +0 -14
  67. package/design/palettes/candidates.ts +0 -19
  68. package/design/palettes/index.ts +0 -78
  69. package/design/review/color-theme.md +0 -44
  70. package/design/review/layout.md +0 -16
  71. package/design/review/text.md +0 -18
  72. package/design/review/typography.md +0 -15
  73. package/design/review/visuals.md +0 -31
  74. package/design/semantic-patterns.md +0 -43
  75. package/design/themes/README.md +0 -40
  76. package/design/themes/index.ts +0 -24
  77. package/design/visual-languages/technical-product.md +0 -17
  78. package/design/visual-review.md +0 -88
  79. package/lib/assets.d.ts +0 -8
  80. package/lib/charts.ts +0 -18
  81. package/lib/contrast.ts +0 -16
  82. package/lib/layouts.ts +0 -50
  83. package/lib/slide.tsx +0 -42
  84. package/lib/taste.ts +0 -17
  85. package/lib/text.tsx +0 -89
  86. package/lib/typeface.ts +0 -44
  87. package/scripts/migrate-react-page.ts +0 -120
  88. package/skills/konpeki/assets/blank.json +0 -23
  89. package/slides/README.md +0 -56
  90. package/slides/architecture/PROMPT.md +0 -31
  91. package/slides/architecture/index.tsx +0 -102
  92. package/slides/article-brief/PROMPT.md +0 -35
  93. package/slides/article-brief/index.tsx +0 -71
  94. package/slides/bar-chart/PROMPT.md +0 -39
  95. package/slides/bar-chart/index.tsx +0 -97
  96. package/slides/comparison/PROMPT.md +0 -29
  97. package/slides/comparison/index.tsx +0 -95
  98. package/slides/decision-memo/PROMPT.md +0 -34
  99. package/slides/decision-memo/index.tsx +0 -85
  100. package/slides/delivery-plan/PROMPT.md +0 -45
  101. package/slides/delivery-plan/index.tsx +0 -105
  102. package/slides/drawing-references.md +0 -32
  103. package/slides/experiment/PROMPT.md +0 -44
  104. package/slides/experiment/index.tsx +0 -127
  105. package/slides/github-cover/PROMPT.md +0 -21
  106. package/slides/github-cover/README.md +0 -21
  107. package/slides/github-cover/author.ts +0 -67
  108. package/slides/github-cover/composition.json +0 -595
  109. package/slides/incident-workflow/PROMPT.md +0 -57
  110. package/slides/incident-workflow/index.tsx +0 -78
  111. package/slides/introducing-konpeki/PROMPT.md +0 -30
  112. package/slides/introducing-konpeki/README.md +0 -44
  113. package/slides/introducing-konpeki/SOURCE.md +0 -19
  114. package/slides/introducing-konpeki/author.ts +0 -165
  115. package/slides/introducing-konpeki/composition.json +0 -3270
  116. package/slides/line-chart/PROMPT.md +0 -40
  117. package/slides/line-chart/index.tsx +0 -72
  118. package/slides/migration/PROMPT.md +0 -38
  119. package/slides/migration/index.tsx +0 -89
  120. package/slides/og-images/PROMPT.md +0 -21
  121. package/slides/og-images/index.tsx +0 -76
  122. package/slides/product-introduction/PROMPT.md +0 -24
  123. package/slides/product-introduction/index.tsx +0 -105
  124. package/slides/research-brief/PROMPT.md +0 -40
  125. package/slides/research-brief/index.tsx +0 -104
  126. package/slides/results-explanation/PROMPT.md +0 -32
  127. package/slides/results-explanation/index.tsx +0 -96
  128. package/slides/retrospective/PROMPT.md +0 -43
  129. package/slides/retrospective/index.tsx +0 -105
  130. package/slides/sankey/PROMPT.md +0 -11
  131. package/slides/sankey/index.tsx +0 -93
  132. package/slides/teaching/PROMPT.md +0 -45
  133. package/slides/teaching/index.tsx +0 -124
  134. package/slides/vertical-bar-charts/PROMPT.md +0 -13
  135. package/slides/vertical-bar-charts/index.tsx +0 -97
  136. package/src/app/App.tsx +0 -845
  137. package/src/components/BuildOrb.tsx +0 -40
  138. package/src/components/Canvas.tsx +0 -1191
  139. package/src/components/DiagramTypeIcon.tsx +0 -78
  140. package/src/components/InspectorPanel.tsx +0 -757
  141. package/src/components/LeftPanel.tsx +0 -120
  142. package/src/components/PageSizePicker.tsx +0 -30
  143. package/src/components/Presentation.tsx +0 -105
  144. package/src/components/RevisionNotes.tsx +0 -55
  145. package/src/components/RightPanel.tsx +0 -233
  146. package/src/components/VectorOverflowWarning.tsx +0 -73
  147. package/src/components/WorkspaceChrome.tsx +0 -316
  148. package/src/components/ui.tsx +0 -147
  149. package/src/lib/examples/react-page-migration.json +0 -1295
  150. package/src/lib/examples.ts +0 -42
  151. package/src/lib/export-png.ts +0 -104
  152. package/src/lib/file-session.ts +0 -87
  153. package/src/lib/history.ts +0 -53
  154. package/src/lib/model.ts +0 -188
  155. package/src/lib/page-size.ts +0 -24
  156. package/src/lib/presentation.ts +0 -17
  157. package/src/lib/review.ts +0 -26
  158. package/src/lib/storage.ts +0 -71
  159. package/src/lib/theme.ts +0 -25
  160. package/src/lib/use-file-session.ts +0 -249
  161. package/src/main.tsx +0 -29
  162. package/src/styles/canvas.css +0 -299
  163. package/src/styles/chrome.css +0 -475
  164. package/src/styles/component-previews.css +0 -386
  165. package/src/styles/left-panel.css +0 -187
  166. package/src/styles/presentation.css +0 -72
  167. package/src/styles/right-panel.css +0 -1298
package/README.md CHANGED
@@ -1,124 +1,116 @@
1
- ![Konpeki — Create clear visuals with your coding agent](slides/github-cover/cover.png)
1
+ # Konpeki
2
+
3
+ Konpeki helps a coding agent turn a brief and source material into finished
4
+ visuals: covers, social graphics, diagrams, charts, explainers, documents, and
5
+ presentations. Ordinary HTML and CSS are the editable source. Konpeki validates
6
+ that source, inspects the rendered pages, opens a review preview, and exports PNG
7
+ or PDF.
8
+
9
+ PNG and PDF are the delivery artifacts; recipients do not need Konpeki,
10
+ Playwright, or Chromium to view them. Konpeki requires no account or hosted AI
11
+ service. Your coding agent's pricing and data handling still apply.
12
+
13
+ ## How it works
14
+
15
+ The [Konpeki skill](skills/konpeki/SKILL.md) owns the authoring workflow. The
16
+ agent reads shared guidance, the matching [output guide](skills/konpeki/SKILL.md#choose-the-output-guide),
17
+ and relevant content patterns. Guides cover landscape slides, résumés, multi-page
18
+ documents, one-pagers/cards, and covers/social graphics without imposing fixed
19
+ layouts. The agent writes static HTML with fixed-size pages, then repeats a
20
+ short loop until the pages are sound:
21
+
22
+ 1. `validate` checks the source contract: explicit pages, stable IDs, local
23
+ resources, and no scripts.
24
+ 2. `inspect` renders the pages in the pinned Chromium and reports overflow,
25
+ clipping, text overlap, low contrast, small text, font fallback, theme
26
+ compliance, and [authoring floor](skills/konpeki/floor.md) rules as JSON.
27
+ 3. `render` exports a page or document and prints the review checklist for the
28
+ judgment calls no check covers. It refuses to write output while errors
29
+ remain and never overwrites an existing file.
30
+
31
+ `preview` opens a local board where a person can comment on elements and make
32
+ small source-backed moves, then copy that feedback back to the agent.
33
+
34
+ Automated checks do not establish factual correctness or visual quality. Supply
35
+ the facts and approved assets; examples and placeholders are not evidence about
36
+ real products.
37
+
38
+ ## Quick start
39
+
40
+ Use Node.js 24+ and install the exact version in your document workspace.
41
+ Check availability with `npm view konpeki@0.4.0 version`; if the registry does not
42
+ have it, use a [source checkout or local tarball](SETUP.md) instead. The 0.3.x
43
+ runtime is incompatible with this workflow.
2
44
 
3
- **Create clear visuals with your coding agent.** Konpeki is an opinionated design
4
- framework for covers, social graphics, visual explanations and presentations.
5
-
6
- Give your coding agent notes, source material and a brief. Konpeki provides the
7
- canvas, design guidance, typography and semantic components for the intended
8
- format and dimensions.
45
+ ```sh
46
+ npm install --save-exact konpeki@0.4.0
47
+ npx --no-install konpeki browser install
48
+ ```
9
49
 
10
- People and agents edit the same composition. Export a page as PNG, download its
11
- editable JSON, or use **Present** for a chrome-free presentation.
50
+ Create a starter with its theme beside it, then run the loop:
12
51
 
13
- ## Use with your agent
52
+ ```sh
53
+ node node_modules/konpeki/skills/konpeki/scripts/prepare-document.mjs node_modules/konpeki/runtime/konpeki.mjs work/document.html
54
+ npx --no-install konpeki validate work/document.html
55
+ npx --no-install konpeki inspect work/document.html
56
+ npx --no-install konpeki render work/document.html --page 1 --format png --scale 2 --output work/page-1.png
57
+ npx --no-install konpeki render work/document.html --format pdf --output work/document.pdf
58
+ npx --no-install konpeki preview work/document.html
59
+ ```
14
60
 
15
- Requires **Node.js 24+**, npm, a coding agent that can edit files and run commands,
16
- and a browser.
61
+ The browser is needed for `inspect`, `check` and `render`, not for `preview`. On
62
+ minimal Linux hosts, Chromium may need system libraries; see [SETUP.md](SETUP.md).
17
63
 
18
- Install once, choosing your agent when prompted:
64
+ To let your coding agent do the authoring, install the skill separately:
19
65
 
20
66
  ```sh
21
67
  npx skills add vcfgdev/konpeki -g
22
68
  ```
23
69
 
24
- Start a new conversation or reload your agent's skills. **Send this to your agent:**
25
-
26
- > Use Konpeki to create a one-page explainer of how a browser, API and database work together.
27
-
28
- Replace the example with your own brief and materials. Your agent prepares the
29
- runtime, creates editable JSON in your workspace, opens the canvas and checks the
30
- result. No clone or separate `init` step. First use may require installation and
31
- browser permissions; remote workspaces need authenticated preview forwarding.
32
-
33
- Keep revisions in the same conversation. Canvas notes use **Build it** and its
34
- copyable handoff unless an agent listener is active; the button cannot wake an
35
- idle agent. See [setup details and optional commands](SETUP.md) for other install
36
- methods, or give that guide's [raw URL](https://raw.githubusercontent.com/vcfgdev/konpeki/main/SETUP.md)
37
- to your agent with your brief.
38
-
39
- ## Try the editor in your browser
40
-
41
- [Open the editable Konpeki example](https://vcfgdev.github.io/konpeki/?example=introducing-konpeki).
42
-
43
- The browser-only playground lets you edit an example or start blank, keep a local
44
- working copy, import/download editable JSON, export PNG and present. It requires
45
- no account or AI service. Browser-local data is not cloud backup; download JSON
46
- to keep or move your work. Continue with your coding agent using that file.
47
-
48
- The [GitHub Pages playground](docs/development.md#github-pages) does not connect
49
- to an agent or expose **Build it**. The agent-led workflow above is the route
50
- from a prompt to a finished visual.
51
-
52
- ## Showcase
53
-
54
- Illustrative examples with editable text and vector artwork. Click a preview to
55
- view it full-size, or download its JSON and choose **Demo Mode → Import** in the
56
- [playground](https://vcfgdev.github.io/konpeki/).
57
-
58
- <table>
59
- <tr>
60
- <td width="50%" align="center" valign="top">
61
- <a href="slides/gallery/architecture.png"><img src="slides/gallery/architecture.png" width="420" alt="Harbor Market order-platform architecture"></a><br>
62
- <strong>Explain a system</strong><br>
63
- Order handling, events and fulfillment<br>
64
- <a href="slides/gallery/architecture.json">Editable JSON</a>
65
- </td>
66
- <td width="50%" align="center" valign="top">
67
- <a href="slides/gallery/sankey.png"><img src="slides/gallery/sankey.png" width="420" alt="Proportional Sankey showing a fictional 1,000-user trial cohort"></a><br>
68
- <strong>Communicate data</strong><br>
69
- Trial users, activation and outcomes<br>
70
- <a href="slides/gallery/sankey.json">Editable JSON</a>
71
- </td>
72
- </tr>
73
- <tr>
74
- <td width="50%" align="center" valign="top">
75
- <a href="slides/gallery/release.png"><img src="slides/gallery/release.png" width="420" alt="Clearpath 0.4 portrait release announcement in orange"></a><br>
76
- <strong>Announce a release</strong><br>
77
- A portrait social graphic for Clearpath<br>
78
- <a href="slides/gallery/release.json">Editable JSON</a>
79
- </td>
80
- <td width="50%" align="center" valign="top">
81
- <a href="slides/gallery/explainer.png"><img src="slides/gallery/explainer.png" width="420" alt="Folio one-page explainer showing accepted and rejected document saves"></a><br>
82
- <strong>Teach a concept</strong><br>
83
- One-page guide to preventing stale saves<br>
84
- <a href="slides/gallery/explainer.json">Editable JSON</a>
85
- </td>
86
- </tr>
87
- </table>
88
-
89
- [Browse the gallery](slides/README.md) for briefs, sources and more examples.
90
-
91
- ## Manual npm start
92
-
93
- For a manual start, install [Konpeki from npm](https://www.npmjs.com/package/konpeki)
94
- in your workspace (run `npm init -y` first in a new, empty directory):
70
+ Installing the skill does not install the runtime. The skill's
71
+ `ensure-runtime.mjs` finds a Konpeki 0.4.0 checkout or a `konpeki` package
72
+ installed in the current workspace, and never downloads one.
95
73
 
96
- ```sh
97
- npm install --save-dev konpeki@latest
98
- curl -fL https://raw.githubusercontent.com/vcfgdev/konpeki/main/slides/introducing-konpeki/composition.json -o introduction.json
99
- npm exec --no -- konpeki preview introduction.json
100
- ```
74
+ ## Upgrading from 0.3.x
75
+
76
+ 0.4.0 replaces JSON compositions and the previous editing engine with static
77
+ HTML/CSS. Old JSON files do not open in this version, and there is no automatic
78
+ conversion. Keep an isolated 0.3.x installation for old work, or recreate it in
79
+ HTML while preserving its facts, assets and intended layout.
80
+
81
+ - Delivery formats are PNG and PDF; SVG can be authored inline, but is not an
82
+ export format. Inspection and export require the pinned Chromium.
83
+ - Review uses browser-local comments and **Copy & clear**, not the old
84
+ `wait` / `request` / `finish` CLI protocol. Update the skill and runtime together.
85
+ - Cobalt is the single bundled theme. Its Google Fonts dependency requires
86
+ network access unless you adapt the theme to local or embedded fonts.
87
+ - Review includes opt-in [Vim keyboard navigation and element hints](html/README.md#keyboard-review).
88
+
89
+ The [public comment preview](https://vcfgdev.github.io/konpeki/) opens the
90
+ packaged starter. Use the CLI's `preview` to review your own document; local
91
+ changes stay local until a separately authorized release or deployment.
92
+
93
+ ## Theme
101
94
 
102
- Open the exact URL printed by `preview`. Browser edits save to your downloaded file;
103
- valid agent edits appear on the same canvas. In a remote environment, use its
104
- authenticated preview mechanism rather than sharing a local address.
95
+ Konpeki bundles one theme, Cobalt: cobalt blue on a light canvas with IBM Plex
96
+ Sans and Mono from Google Fonts. Its CSS contract lets a brief supply its own
97
+ visual treatment by adapting a copy; composition stays in HTML and page-owned CSS.
105
98
 
106
- ## Examples and guides
99
+ The default theme needs access to Google Fonts during preview, inspection, and
100
+ export. Exports fail if fonts cannot load or glyphs fall back to installed fonts.
101
+ For offline or reproducible rendering, use licensed local or embedded fonts in
102
+ the document's theme. Finished PNGs and PDFs need no network access.
107
103
 
108
- - [Native example gallery](slides/README.md): editable diagrams, data graphics,
109
- a social announcement and a one-page explainer, plus the product introduction
110
- and repository cover. Older React/SVG drawing references remain separate.
111
- - [Agent-led setup](SETUP.md) and [authoring guidance](AUTHORING.md).
112
- - [Canvas workflow](docs/workflow.md): page sizes, export and agent handoff.
113
- - [Development](docs/development.md): architecture, demo hosting, packaging and checks.
114
- - [Composition contract](composition/README.md) and [design resources](design/README.md).
115
- - [Contributing](CONTRIBUTING.md) and [security policy](SECURITY.md).
104
+ ## Documentation
116
105
 
117
- Konpeki requires no account or hosted AI service. Your coding agent's pricing
118
- and data handling still apply. Supply facts and approved assets; examples and
119
- component placeholders are not evidence about real products.
106
+ - [Konpeki skill](skills/konpeki/SKILL.md): the authoring and revision workflow
107
+ - [HTML, files, theme, and CLI](html/README.md)
108
+ - [Theme contract](html/theme.md) and [theme authoring](html/theme-authoring.md)
109
+ - [Authoring floor: bans, defaults and review checklist](skills/konpeki/floor.md)
110
+ - [Editorial and visual judgment](AUTHORING.md)
111
+ - [Setup](SETUP.md), [development](docs/development.md) and
112
+ [contributing](CONTRIBUTING.md)
120
113
 
121
114
  ## License
122
115
 
123
- [Apache-2.0](LICENSE). Dependencies and bundled fonts retain their own licenses;
124
- external design references are credited where used.
116
+ [Apache-2.0](LICENSE). Fonts and other dependencies retain their own licenses.
package/SETUP.md CHANGED
@@ -1,163 +1,83 @@
1
- # Set up Konpeki for your coding agent
1
+ # Set up Konpeki
2
2
 
3
- Requires **Node.js 24+**, npm, a coding agent with file and command access, and a browser.
3
+ Use Node.js 24+ and the matching Konpeki 0.4.0 runtime and skill. A repository
4
+ version or locally packed tarball does not establish that the npm release exists.
4
5
 
5
- Install once, choosing your agent when prompted:
6
+ ## npm package
6
7
 
7
- ```sh
8
- npx skills add vcfgdev/konpeki -g
9
- ```
10
-
11
- Start a new conversation or reload your agent's skills. **Send this to your agent:**
12
-
13
- > Use Konpeki to create a one-page explainer of how a browser, API and database work together.
14
-
15
- Or use your own brief and materials. The agent prepares the runtime, creates the
16
- document, opens the canvas and checks the result; no separate `init` step is
17
- needed. Allow any required installation/browser permissions. Remote workspaces
18
- need authenticated preview forwarding. Keep revisions in the same conversation.
19
-
20
- ## Other installers
21
-
22
- For an unattended install, select a single agent (Amp example):
8
+ Check the exact version before installing:
23
9
 
24
10
  ```sh
25
- npx skills add vcfgdev/konpeki -g -a amp -y
26
- ```
27
-
28
- This avoids auto-selecting unrelated agent targets when no terminal prompt is available.
29
-
30
- You can also use your agent's native skill installer:
31
-
32
- ```text
33
- Install the konpeki skill from vcfgdev/konpeki, at skills/konpeki.
11
+ npm view konpeki@0.4.0 version
34
12
  ```
35
13
 
36
- Install the complete [`skills/konpeki`](skills/konpeki/) directory, including
37
- `scripts/` and `assets/`. Follow the host's documented skill location; if it does
38
- not discover skills, read the installed `SKILL.md` directly. Do not overwrite
39
- existing agent guidance.
40
-
41
- If you previously installed `authoring-visuals`, replace that installed skill
42
- with `konpeki` rather than keeping both copies. The runtime package is unchanged.
43
-
44
- ## Optional commands
45
-
46
- | Mode | Codex CLI / IDE | Claude Code standalone skill |
47
- | --- | --- | --- |
48
- | Open the editor without generating | `$konpeki init [composition.json]` | `/konpeki init [composition.json]` |
49
- | Create or revise from your materials | `$konpeki generate [brief]` | `/konpeki generate [brief]` |
50
-
51
- `generate` automatically prepares the runtime when needed. It uses materials
52
- already supplied in chat, referenced files and the current canvas; it does not
53
- require `init` first or a repeated brief. Natural-language “Use Konpeki to…”
54
- creation requests also select generate. Follow-up feedback continues the same
55
- document without another command. Other GUIs may use skill selection, and plugin
56
- installations may namespace the skill. These modes are not terminal subcommands.
57
-
58
- For `init`, choose the supplied path or the document already active in the
59
- conversation; otherwise use `slides/untitled/composition.json`. After resolving
60
- the runtime below, run:
14
+ If it returns `0.4.0`, install in the workspace that will author your documents:
61
15
 
62
16
  ```sh
63
- node "<installed-skill>/scripts/prepare-document.mjs" "<cli>" "<composition.json>"
64
- node "<cli>" preview "<composition.json>"
17
+ npm install --save-exact konpeki@0.4.0
18
+ npx --no-install konpeki browser install
65
19
  ```
66
20
 
67
- The helper validates existing files without rewriting them. For a missing file,
68
- it validates and writes the bundled blank document without overwriting a file
69
- created concurrently. Invalid data is preserved, not replaced with a sample.
70
- Reuse an already running preview for the same file. Open and verify its exact
71
- session URL as described below, then stop: init does not generate or start a
72
- review listener. The starter works with the pinned published runtime; it does
73
- not import TypeScript from `node_modules` or require an unreleased `init` CLI.
21
+ Run commands with `npx --no-install konpeki`. If the version is unavailable, use
22
+ one of the local paths below; do not substitute the incompatible 0.3.x runtime.
74
23
 
75
- ### Optional Codex plugin packaging
24
+ ## Source checkout
76
25
 
77
- The root `plugin.json` packages that same skill, without MCP servers, hooks or
78
- credentials. `.agents/plugins/marketplace.json` exposes it as a repo marketplace.
79
- On a compatible Codex client, add the repository marketplace with:
26
+ With [mise](https://mise.jdx.dev/) installed, use the pinned toolchain:
80
27
 
81
28
  ```sh
82
- codex plugin marketplace add vcfgdev/konpeki
29
+ git clone https://github.com/vcfgdev/konpeki.git
30
+ cd konpeki
31
+ mise trust
32
+ mise install
33
+ mise exec -- pnpm install --frozen-lockfile
34
+ mise exec -- node bin/konpeki.mjs browser install
83
35
  ```
84
36
 
85
- Then install Konpeki from that source in the desktop plugin directory and test it
86
- in a new conversation. Install either the standalone skill or the plugin, not
87
- both. This is repository distribution, not a listing in OpenAI's public directory.
88
- It becomes available from the remote repository after these files are published.
89
- Native Codex GUI installation needs a separate client smoke test; package checks
90
- alone do not establish host compatibility.
91
-
92
- ## Agent setup reference
37
+ The browser is needed for inspection and export, not preview or artifact viewing.
38
+ On minimal Linux hosts, its system libraries may require administrator-approved
39
+ installation with `mise exec -- pnpm exec playwright install-deps chromium`.
93
40
 
94
- The installed skill handles these steps; the person does not need to run them manually.
41
+ Run the checkout CLI as `mise exec -- node bin/konpeki.mjs`. The authoring loop
42
+ is in the [skill](skills/konpeki/SKILL.md); CLI rules are in
43
+ [html/README.md](html/README.md).
95
44
 
96
- ### Prepare the runtime
45
+ ## Local tarball
97
46
 
98
- Check Node.js 24+, npm, command/file access and the host's browser capabilities.
99
- Follow host approval and toolchain rules if prerequisites are missing.
100
-
101
- From the user's document workspace, run:
47
+ From a prepared trusted checkout, build and pack without publishing:
102
48
 
103
49
  ```sh
104
- node "<installed-skill>/scripts/ensure-runtime.mjs"
50
+ mise exec -- pnpm install --frozen-lockfile
51
+ mise exec -- pnpm pack
105
52
  ```
106
53
 
107
- The script reuses a compatible workspace installation, surrounding Konpeki
108
- checkout, or cached runtime. If none exists, obtain any required host approval
109
- and rerun with `--install`. It installs the pinned `konpeki@0.3.1` release in a
110
- user cache, without adding project dependencies or changing project guidance.
111
- Missing/incompatible runtimes are never reported ready. The script prints JSON
112
- with `root`, `cli` and `version`; installation diagnostics go to stderr.
113
-
114
- Use the returned absolute `root` for resources and `cli` for commands. Do not rely
115
- on repo-relative paths from a copied skill. Keep documents outside the runtime.
116
- For manual project-local npm installation, see [Manual npm start](README.md#manual-npm-start).
117
- Repository contributors instead use the [mise setup](docs/development.md); users
118
- of the published package do not need mise.
119
-
120
- ### Generate, validate and open the visual
54
+ Install the resulting `.tgz` by local path in the workspace that will author the
55
+ document, for example `npm install --no-save /path/to/konpeki-0.4.0.tgz`. This is
56
+ a local package install, not evidence of an npm release. Run its CLI with
57
+ `npx --no-install konpeki` and install its browser before inspection or export.
121
58
 
122
- Follow the installed skill and the runtime's `AUTHORING.md`, composition contract
123
- and design resources. Use the brief already supplied; ask only for information
124
- needed for faithful work. Do not ask the person to repeat their prompt in the
125
- canvas. Continue the current document when revising or following init. Save new
126
- work to an unused `slides/<name>/composition.json`, with brief/source notes,
127
- unless the person chooses another destination. Preserve existing documents.
59
+ ## Skill helpers
128
60
 
129
- For an installation check, validate the bundled example:
61
+ Install the authoring skill separately:
130
62
 
131
63
  ```sh
132
- node "<cli>" validate "<root>/slides/introducing-konpeki/composition.json"
64
+ npx skills add vcfgdev/konpeki -g
133
65
  ```
134
66
 
135
- After authoring the user's document:
67
+ `ensure-runtime.mjs` takes no arguments. It discovers either the containing
68
+ checkout or a compatible locally installed `konpeki` package and prints its CLI
69
+ location; it does not download or modify a runtime.
70
+
71
+ `prepare-document.mjs` takes `<cli> <document.html>`. It creates the starter HTML,
72
+ `theme.css`, and `theme-base.css` beside the document. It validates the result
73
+ and never overwrites existing files. The default theme loads IBM Plex Sans and
74
+ Mono from Google Fonts, so preview and export need network access. For offline
75
+ rendering, adapt the document's theme to use licensed local or embedded fonts.
136
76
 
137
77
  ```sh
138
- node "<cli>" validate "slides/<name>/composition.json"
139
- node "<cli>" preview "slides/<name>/composition.json"
78
+ node node_modules/konpeki/skills/konpeki/scripts/prepare-document.mjs node_modules/konpeki/runtime/konpeki.mjs document.html
140
79
  ```
141
80
 
142
- Reuse an existing preview for that file when available. Keep the process running
143
- using the host's supported service mechanism. Open the exact printed session URL
144
- in the in-app browser when supported, otherwise the regular browser. Preserve its
145
- query string and never publish its capability token. In remote workspaces, use
146
- authenticated preview/port forwarding, not a remote loopback address.
147
-
148
- Verify that the browser loads the intended document, then render, inspect and
149
- repair the result as directed by the skill. The file-backed canvas saves browser
150
- edits to that document and loads valid external edits. Setup is complete when
151
- validation succeeds and the intended composition opens—not merely when a server
152
- process starts. If browser inspection is unavailable, report that limitation.
153
-
154
- Return the document path, usable preview link and verification outcome. Continue
155
- revisions in agent chat. For submitted canvas reviews, generate checks `request`,
156
- claims a `submitted` request with `wait`, applies the notes against the latest
157
- document, and acknowledges it with `finish` only after validation and inspection.
158
- Coordinate ownership before resuming an already `working` request.
159
-
160
- An ongoing listener runs only when explicitly requested and supported by the host.
161
- Otherwise, use **Copy prompt** after **Build it**, or resume generate in agent chat.
162
- The [canvas workflow](docs/workflow.md) describes this handoff; the button cannot
163
- wake an idle agent, and an open preview is not a live agent connection.
81
+ From a source checkout, use
82
+ `mise exec -- node skills/konpeki/scripts/prepare-document.mjs bin/konpeki.mjs document.html`.
83
+ See [Upgrading from 0.3.x](README.md#upgrading-from-03x) before migrating old work.