konpeki 0.3.0 → 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.
- package/AGENTS.md +21 -28
- package/AUTHORING.md +68 -229
- package/CONTRIBUTING.md +10 -23
- package/README.md +96 -87
- package/SETUP.md +50 -114
- package/docs/development.md +43 -248
- package/docs/workflow.md +6 -108
- package/html/README.md +140 -0
- package/html/browser.ts +103 -0
- package/html/document.ts +38 -0
- package/html/floor.ts +34 -0
- package/html/index.html +5 -0
- package/html/inspect.ts +313 -0
- package/html/preview.css +62 -0
- package/html/preview.tsx +463 -0
- package/html/review-hints.ts +63 -0
- package/html/server.ts +99 -0
- package/html/source.ts +104 -0
- package/html/starter.ts +6 -0
- package/html/theme-authoring.md +176 -0
- package/html/theme.md +61 -0
- package/index.html +9 -9
- package/package.json +21 -35
- package/plugin.json +1 -1
- package/public/og.png +0 -0
- package/runtime/browser-B-29TH1a.mjs +595 -0
- package/runtime/floor-Cmk7G3pU.mjs +41 -0
- package/runtime/konpeki.mjs +90 -1410
- package/runtime/server-BAqC_5WD.mjs +2 -0
- package/runtime/server-DfRpfcY9.mjs +205 -0
- package/runtime/source-B_Ui9tMp.mjs +141 -0
- package/runtime/source-CZQq9GUO.mjs +2 -0
- package/skills/konpeki/SKILL.md +88 -172
- package/skills/konpeki/assets/blank.html +17 -0
- package/skills/konpeki/floor.md +76 -0
- package/skills/konpeki/references/cover.md +27 -0
- package/skills/konpeki/references/long-document.md +40 -0
- package/skills/konpeki/references/one-pager.md +27 -0
- package/skills/konpeki/references/patterns.md +118 -0
- package/skills/konpeki/references/resume.md +28 -0
- package/skills/konpeki/references/slides.md +28 -0
- package/skills/konpeki/scripts/ensure-runtime.mjs +10 -31
- package/skills/konpeki/scripts/prepare-document.mjs +25 -14
- package/src/components/PageBoard.tsx +156 -0
- package/src/lib/alignment.ts +21 -0
- package/src/lib/page-board.ts +25 -0
- package/src/lib/review-position.ts +19 -0
- package/src/styles/base.css +4 -6
- package/src/styles/feedback.css +97 -61
- package/src/styles/shell.css +95 -323
- package/theme-base.css +90 -0
- package/theme.css +56 -0
- package/vite.config.ts +2 -5
- package/composition/README.md +0 -156
- package/composition/compile.ts +0 -227
- package/composition/document.ts +0 -600
- package/composition/schema.json +0 -3001
- package/composition/schema.ts +0 -437
- package/composition/theme-tokens.ts +0 -16
- package/composition/types.ts +0 -269
- package/composition/validate.ts +0 -226
- package/composition/vector.ts +0 -143
- package/composition/visualizations.ts +0 -319
- package/design/README.md +0 -17
- package/design/palettes/README.md +0 -14
- package/design/palettes/base.ts +0 -14
- package/design/palettes/candidates.ts +0 -19
- package/design/palettes/index.ts +0 -78
- package/design/review/color-theme.md +0 -44
- package/design/review/layout.md +0 -16
- package/design/review/text.md +0 -18
- package/design/review/typography.md +0 -15
- package/design/review/visuals.md +0 -31
- package/design/semantic-patterns.md +0 -43
- package/design/themes/README.md +0 -40
- package/design/themes/index.ts +0 -24
- package/design/visual-languages/technical-product.md +0 -17
- package/design/visual-review.md +0 -88
- package/lib/assets.d.ts +0 -8
- package/lib/charts.ts +0 -18
- package/lib/contrast.ts +0 -16
- package/lib/layouts.ts +0 -50
- package/lib/slide.tsx +0 -42
- package/lib/taste.ts +0 -17
- package/lib/text.tsx +0 -89
- package/lib/typeface.ts +0 -44
- package/scripts/migrate-react-page.ts +0 -120
- package/skills/konpeki/assets/blank.json +0 -23
- package/slides/README.md +0 -153
- package/slides/architecture/PROMPT.md +0 -31
- package/slides/architecture/index.tsx +0 -102
- package/slides/article-brief/PROMPT.md +0 -35
- package/slides/article-brief/index.tsx +0 -71
- package/slides/bar-chart/PROMPT.md +0 -39
- package/slides/bar-chart/index.tsx +0 -97
- package/slides/comparison/PROMPT.md +0 -29
- package/slides/comparison/index.tsx +0 -95
- package/slides/decision-memo/PROMPT.md +0 -34
- package/slides/decision-memo/index.tsx +0 -85
- package/slides/delivery-plan/PROMPT.md +0 -45
- package/slides/delivery-plan/index.tsx +0 -105
- package/slides/experiment/PROMPT.md +0 -44
- package/slides/experiment/index.tsx +0 -127
- package/slides/incident-workflow/PROMPT.md +0 -57
- package/slides/incident-workflow/index.tsx +0 -78
- package/slides/introducing-konpeki/PROMPT.md +0 -40
- package/slides/introducing-konpeki/README.md +0 -76
- package/slides/introducing-konpeki/SOURCE.md +0 -26
- package/slides/introducing-konpeki/author.ts +0 -165
- package/slides/introducing-konpeki/composition.json +0 -3270
- package/slides/line-chart/PROMPT.md +0 -40
- package/slides/line-chart/index.tsx +0 -72
- package/slides/migration/PROMPT.md +0 -38
- package/slides/migration/index.tsx +0 -89
- package/slides/og-images/PROMPT.md +0 -21
- package/slides/og-images/index.tsx +0 -76
- package/slides/product-introduction/PROMPT.md +0 -24
- package/slides/product-introduction/index.tsx +0 -105
- package/slides/research-brief/PROMPT.md +0 -40
- package/slides/research-brief/index.tsx +0 -104
- package/slides/results-explanation/PROMPT.md +0 -32
- package/slides/results-explanation/index.tsx +0 -96
- package/slides/retrospective/PROMPT.md +0 -43
- package/slides/retrospective/index.tsx +0 -105
- package/slides/sankey/PROMPT.md +0 -11
- package/slides/sankey/index.tsx +0 -93
- package/slides/teaching/PROMPT.md +0 -45
- package/slides/teaching/index.tsx +0 -124
- package/slides/vertical-bar-charts/PROMPT.md +0 -13
- package/slides/vertical-bar-charts/index.tsx +0 -97
- package/src/app/App.tsx +0 -820
- package/src/components/BuildOrb.tsx +0 -40
- package/src/components/Canvas.tsx +0 -1185
- package/src/components/DiagramTypeIcon.tsx +0 -78
- package/src/components/InspectorPanel.tsx +0 -773
- package/src/components/LeftPanel.tsx +0 -120
- package/src/components/PageSizePicker.tsx +0 -30
- package/src/components/Presentation.tsx +0 -105
- package/src/components/RevisionNotes.tsx +0 -56
- package/src/components/RightPanel.tsx +0 -201
- package/src/components/VectorOverflowWarning.tsx +0 -46
- package/src/components/WorkspaceChrome.tsx +0 -288
- package/src/components/ui.tsx +0 -53
- package/src/lib/examples/react-page-migration.json +0 -1295
- package/src/lib/examples.ts +0 -42
- package/src/lib/export-png.ts +0 -104
- package/src/lib/file-session.ts +0 -87
- package/src/lib/history.ts +0 -53
- package/src/lib/model.ts +0 -188
- package/src/lib/page-size.ts +0 -24
- package/src/lib/presentation.ts +0 -17
- package/src/lib/review.ts +0 -26
- package/src/lib/storage.ts +0 -71
- package/src/lib/theme.ts +0 -25
- package/src/lib/use-file-session.ts +0 -227
- package/src/main.tsx +0 -29
- package/src/styles/canvas.css +0 -299
- package/src/styles/chrome.css +0 -384
- package/src/styles/component-previews.css +0 -386
- package/src/styles/left-panel.css +0 -166
- package/src/styles/presentation.css +0 -72
- package/src/styles/right-panel.css +0 -1215
package/AGENTS.md
CHANGED
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
# Konpeki
|
|
1
|
+
# Konpeki repository guidance
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
the conversation; composition JSON owns the document; the browser edits and
|
|
5
|
-
presents that same document.
|
|
3
|
+
## Read by responsibility
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
- Authoring workflow: [skills/konpeki/SKILL.md](skills/konpeki/SKILL.md)
|
|
6
|
+
- HTML, local files, theme, diagnostics, preview, and CLI:
|
|
7
|
+
[html/README.md](html/README.md)
|
|
8
|
+
- Bans, defaults and review checklist: [skills/konpeki/floor.md](skills/konpeki/floor.md)
|
|
9
|
+
- Editorial and visual judgment: [AUTHORING.md](AUTHORING.md)
|
|
10
|
+
- Environment setup: [SETUP.md](SETUP.md)
|
|
11
|
+
- Implementation work: [docs/development.md](docs/development.md)
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- Changing the application: [development guidance](docs/development.md) and
|
|
13
|
-
the [composition contract](composition/README.md).
|
|
14
|
-
- Browser/file handoff: [canvas workflow](docs/workflow.md).
|
|
13
|
+
Use the toolchain pinned in `mise.toml`; run repository commands through
|
|
14
|
+
`mise exec --` unless it is already active. Use pnpm, preserve the lockfile, and
|
|
15
|
+
do not install tools globally.
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
Preserve unrelated work, supplied facts and provenance, stable IDs, and deliberate
|
|
18
|
+
human edits. Reread source before revising it. Automated checks do not replace
|
|
19
|
+
visual or factual review.
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- Preserve unrelated work, human edits and stable component/vector IDs. Reread
|
|
25
|
-
the current composition before revising it; do not overwrite a newer revision.
|
|
26
|
-
- Complete requested implementation, rendering, inspection and repair unless
|
|
27
|
-
the person requests a checkpoint. Ask when missing facts prevent faithful work.
|
|
28
|
-
- Scale checks using [verification guidance](docs/development.md#verification).
|
|
29
|
-
Inspect affected renders for visual changes; tests alone are not visual review.
|
|
30
|
-
- Keep creative briefs and factual provenance with examples. Exclude private
|
|
31
|
-
chat, coordination transcripts, workspace paths, credentials and agent/model
|
|
32
|
-
or timezone metadata. Label excerpts, adaptations and redactions honestly.
|
|
33
|
-
- Do not push, publish or deploy without permission.
|
|
21
|
+
Keep taste rules in `floor.md`, one ID each. A rule agents keep breaking gets an
|
|
22
|
+
`inspect` check under the same ID, with passing and failing fixtures from real
|
|
23
|
+
output; a rule without a check stays on the review checklist. Name the output
|
|
24
|
+
that prompted a floor change.
|
|
25
|
+
|
|
26
|
+
Never publish, push, deploy, or tag without explicit permission.
|
package/AUTHORING.md
CHANGED
|
@@ -1,233 +1,72 @@
|
|
|
1
|
-
# Authoring
|
|
1
|
+
# Authoring judgment
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
This guide owns editorial and visual judgment that no rule can settle. For
|
|
4
|
+
workflow steps, use the [Konpeki skill](skills/konpeki/SKILL.md); for the bans,
|
|
5
|
+
defaults and review checklist, use its [authoring floor](skills/konpeki/floor.md);
|
|
6
|
+
for source and tool rules, use the [HTML reference](html/README.md).
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Accuracy and editorial judgment
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
Open Graph preview, article header, standalone explanation or presentation.
|
|
12
|
-
Choose page dimensions for that destination, within 256–4096 pixels per side;
|
|
13
|
-
do not assume 16:9 or invent extra pages. Record the destination in
|
|
14
|
-
`intendedViewingSize` (`social`, `article`, `presentation` or `custom`).
|
|
15
|
-
For another aspect ratio, recompose deliberately rather than stretching artwork,
|
|
16
|
-
silently cropping evidence or shrinking essential text. Each page can have its own size.
|
|
17
|
-
|
|
18
|
-
Return finished, inspected output by default. Do not require people to sketch,
|
|
19
|
-
choose component types or approve an outline unless they ask for that checkpoint.
|
|
20
|
-
Treat supplied sketches as partial direction and preserve deliberate human edits.
|
|
21
|
-
The slide-oriented guidance below also applies to single visual pages where relevant.
|
|
22
|
-
|
|
23
|
-
## Requirements
|
|
24
|
-
|
|
25
|
-
- Preserve facts, sources, units, denominators, bounds and meaningful caveats.
|
|
10
|
+
- Preserve facts, sources, units, denominators, bounds, and meaningful caveats.
|
|
26
11
|
Distinguish evidence from interpretation; never invent data or filler.
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
| --- | --- | --- |
|
|
89
|
-
| Unspecified theme | Minimalist white canvas, dark text, sans-serif and one restrained main accent. Beige and light violet only when requested. Additional semantic chart/status colors are allowed. | Same background, font and main-accent defaults. Expressiveness comes from composition and visual explanation, not an automatic theme change. |
|
|
90
|
-
| Emphasis and containers | Prefer typography, placement and whitespace. Keep containers restrained; use fills for state, meaningful boundaries or highlighted evidence, not decorative emphasis. | Color fields, tinted panels and shapes may also provide hierarchy, grouping, rhythm and emphasis. Remove competing layers, not containers as a category. |
|
|
91
|
-
| Subheadings | Give subheadings enough typographic emphasis to distinguish them from supporting text. | Hierarchy may also come from placement, color or grouping without extra type contrast. |
|
|
92
|
-
| Drawing style | Keep text/data crisp; Rough.js is opt-in by user or template choice. | Choose crisp or hand-drawn treatment to suit the direction; text/data remain legible. |
|
|
93
|
-
| Arrows | Use arrows for relationships that placement and wording do not already make clear. Default to open, stroked heads unless the user or notation calls for another form. | Arrows may reinforce prose when useful; open or filled heads are valid. |
|
|
94
|
-
| Framing | No decorative top/bottom ribbons or side rails. Match surrounding padding to differently proportioned artwork rather than adding contrasting bands. | Bands and rails may support composition or emphasis; compose surrounding space deliberately. |
|
|
95
|
-
|
|
96
|
-
Dynamic does not imply a dark or colored canvas. Make the composition more
|
|
97
|
-
expressive before changing the theme. Keep the white canvas and sans-serif
|
|
98
|
-
fallback unless the user supplies another direction; use accent fills locally
|
|
99
|
-
for emphasis, grouping or visual explanation rather than recoloring the page.
|
|
100
|
-
|
|
101
|
-
In both modes, explicit brand, palette, typeface and visual references override
|
|
102
|
-
taste defaults, never accuracy or readability. Choose explanation structure and
|
|
103
|
-
depth from the source, audience and brief, not extra parameters. Tinted text cards
|
|
104
|
-
alone do not constitute a visual explanation. Never invent relationships or
|
|
105
|
-
supporting facts to satisfy a mode.
|
|
106
|
-
|
|
107
|
-
Palette/background, font pairing, illustration style, audience, tone, delivery
|
|
108
|
-
format, viewing size and page count are brief choices or constraints. They are
|
|
109
|
-
not additional numeric knobs.
|
|
110
|
-
Do not expose separate container-count, arrow-count, hue, corner-radius or
|
|
111
|
-
"creativity" sliders: choose these implementation details to serve the brief.
|
|
112
|
-
|
|
113
|
-
Resolve conflicts in this order: accuracy/readability requirements, explicit
|
|
114
|
-
content and delivery constraints, specific visual directions, then authoring mode
|
|
115
|
-
and its default. With a fixed page count, recompose or remove optional repetition
|
|
116
|
-
rather than shrinking text to fit; ask for a scope/page-count decision if required
|
|
117
|
-
content cannot fit legibly. Never silently drop it or add pages.
|
|
118
|
-
|
|
119
|
-
Apply the mode deck-wide, with page-level variation where content warrants it.
|
|
120
|
-
Record the requested setting (or `unspecified`) and resolved setting in the adaptation
|
|
121
|
-
record in `PROMPT.md`, separately from verbatim user wording. Do not retroactively
|
|
122
|
-
label historical outputs as if they were generated with this parameter.
|
|
123
|
-
|
|
124
|
-
The parameter is usable through the existing authoring workflow, but its
|
|
125
|
-
reliability has not been established by earlier examples. Compare actual renders
|
|
126
|
-
on the same brief, not counts of shapes or an aesthetic score.
|
|
127
|
-
|
|
128
|
-
### Palette, type and visual explanation
|
|
129
|
-
|
|
130
|
-
For font-family choices, consider IBM Plex Sans for technical explanations,
|
|
131
|
-
Noto Sans for neutral typography or Hanken Grotesk for a product-oriented feel.
|
|
132
|
-
Reuse the project's established typeface when one exists. Inter is acceptable;
|
|
133
|
-
choose for readability, language coverage and fit with the brief rather than
|
|
134
|
-
novelty. These are suggestions, not a closed list. Keep font roles consistent
|
|
135
|
-
and verify the required weights load.
|
|
136
|
-
|
|
137
|
-
Choose a coherent deck-wide palette and treatment within the selected mode or
|
|
138
|
-
explicit user direction. Keep font roles consistent and the reading order clear.
|
|
139
|
-
Keep chart and status meanings stable, and provide labels or other cues when a
|
|
140
|
-
distinction carries information. Apply the mode table to emphasis and containers.
|
|
141
|
-
|
|
142
|
-
Consider a diagram, annotated artifact or visual comparison when relationships
|
|
143
|
-
are central to the point. Use it when it makes those relationships easier to
|
|
144
|
-
grasp, even if prose could describe them. Supporting words and visuals can
|
|
145
|
-
reinforce each other. Do not require a diagram on every page or invent causal,
|
|
146
|
-
temporal or quantitative meaning to justify one.
|
|
147
|
-
|
|
148
|
-
Use whitespace and alignment for independent paragraphs and heading–description
|
|
149
|
-
pairs; columns alone do not require borders. Use horizontal rules when they help
|
|
150
|
-
readers track corresponding items across columns. When rules establish table
|
|
151
|
-
rows or paired rows, give the group a clear ending before notes or conclusions,
|
|
152
|
-
usually a closing bottom rule. Do not add separators to every paragraph.
|
|
153
|
-
Align a short row heading with the first line of its description, rather than
|
|
154
|
-
centering it against a multiline paragraph. Apply the mode's subheading guidance
|
|
155
|
-
and verify that headings are distinguishable from their supporting text.
|
|
156
|
-
|
|
157
|
-
Use the mode's arrow policy. Keep arrow meaning and treatment consistent, and
|
|
158
|
-
align anchors and labels with the objects they refer to. Do not imply a transition
|
|
159
|
-
or dependency that the evidence does not support.
|
|
160
|
-
|
|
161
|
-
Use the mode's framing policy; do not add recurring metadata strips merely to
|
|
162
|
-
fill space. Use the intended ratio where supported. Inspect both the preview
|
|
163
|
-
and requested export.
|
|
164
|
-
|
|
165
|
-
Find optional themes, palettes and semantic patterns in the
|
|
166
|
-
[design index](design/README.md). Choose visuals for the audience's question
|
|
167
|
-
and the relationships to explain.
|
|
168
|
-
|
|
169
|
-
## Workflow and review
|
|
170
|
-
|
|
171
|
-
Ground the story in the brief and sources: audience, takeaway and delivery needs.
|
|
172
|
-
Use lightweight page drafts when they help resolve story, density or pacing;
|
|
173
|
-
they are not a required deliverable for every edit. State material assumptions
|
|
174
|
-
and proceed with reasonable composition choices within the design defaults.
|
|
175
|
-
Ask when missing evidence or conflicting requirements prevent a faithful result.
|
|
176
|
-
Honor an explicit draft-review checkpoint; otherwise continue to the requested output.
|
|
177
|
-
|
|
178
|
-
Reuse the kit where useful. Use deck-local SVG/React as trusted drawing source
|
|
179
|
-
when existing components weaken the explanation, then convert its supported
|
|
180
|
-
primitives to composition vectors. Do not replace the editable composition with
|
|
181
|
-
framework source. No new runtime or template framework is needed.
|
|
182
|
-
|
|
183
|
-
A completed slide implementation includes runnable source, source notes and
|
|
184
|
-
inspected captures at presentation and review sizes. Check factual fidelity,
|
|
185
|
-
readability, clipping and visual relationships, plus coherence across pages and
|
|
186
|
-
any requested variants. Before delivery, inspect each page's reading order and
|
|
187
|
-
apply the [text review](design/review/text.md), including redundant hierarchy.
|
|
188
|
-
Readable, in-bounds text can still repeat the headline unnecessarily. Record
|
|
189
|
-
the page-level evidence and repair findings without waiting for user feedback.
|
|
190
|
-
Repair consequential issues and inspect fresh renders
|
|
191
|
-
before delivery. Use [development checks](docs/development.md#verification) for relevant code checks
|
|
192
|
-
and [focused visual review](design/visual-review.md) for applicable review guidance.
|
|
193
|
-
Specimen geometry assertions and aesthetic scores are not design requirements.
|
|
194
|
-
Do not add an aesthetic linter.
|
|
195
|
-
|
|
196
|
-
For each new example, save `slides/<name>/PROMPT.md` before authoring: the exact
|
|
197
|
-
initial prompt, supplied source material or links, and explicit visual preferences
|
|
198
|
-
(including none). Preserve creative follow-ups accurately and record material
|
|
199
|
-
assumptions and manual edits separately. Exclude private coordination transcripts,
|
|
200
|
-
agent/model identifiers, generation timestamps and environment metadata. Keep input
|
|
201
|
-
facts and datasets in `SOURCE.md` when substantial. These records explain why
|
|
202
|
-
the example looks and reads as it does, as well as supporting reproduction.
|
|
203
|
-
Mark adaptation prompts and reconstructed history honestly; do not invent an
|
|
204
|
-
original prompt for an inherited specimen. Never commit secrets or private
|
|
205
|
-
material without permission; record any redaction.
|
|
206
|
-
|
|
207
|
-
Report verification limitations and only behavior actually tested. Browser
|
|
208
|
-
images do not establish PDF/PPTX or cross-application fidelity. Inspect requested
|
|
209
|
-
exports separately; if a delivery target is unsupported, explain the limitation.
|
|
210
|
-
|
|
211
|
-
### Explore an uncertain direction
|
|
212
|
-
|
|
213
|
-
When the user is unsure about the mode, offer two candidates of one representative
|
|
214
|
-
page: `default` and `dynamic`. Generate them when requested or accepted, not
|
|
215
|
-
automatically for every deck. Keep wording, evidence, caveats and viewing size
|
|
216
|
-
fixed. Honor the same explicit visual constraints; otherwise let each mode's
|
|
217
|
-
theme policy apply. Render and inspect both, label the modes and explain the
|
|
218
|
-
differences. Let the user choose before applying the mode across the deck.
|
|
219
|
-
|
|
220
|
-
When a design choice matters and the brief does not settle it, choose one page
|
|
221
|
-
and one primary axis: composition, density, hierarchy or wording. Render two or
|
|
222
|
-
three named alternatives with the same facts, evidence and chosen theme.
|
|
223
|
-
Vary the answer, not just the tint. For architecture, an ownership map, request
|
|
224
|
-
journey and failure-boundary view can test which structure explains the point.
|
|
225
|
-
Keep required relationships visible in every candidate.
|
|
226
|
-
|
|
227
|
-
Show candidates at the same viewing size and explain what each makes easier
|
|
228
|
-
and what it sacrifices. For an exploration-only request, recommend a direction
|
|
229
|
-
and let the user choose. When implementation is requested, choose and carry it
|
|
230
|
-
through unless the user requested a selection checkpoint.
|
|
231
|
-
Promote the selected direction and remove temporary comparison scaffolding;
|
|
232
|
-
retain alternatives only when requested. This is optional exploration, not a
|
|
233
|
-
required extra round for every deck.
|
|
12
|
+
- Give each page one identifiable audience question, answered by its headline.
|
|
13
|
+
- Keep names consistent and explain unfamiliar terms. Put citations, units, and
|
|
14
|
+
caveats next to the evidence they qualify; preserve required attribution.
|
|
15
|
+
- If fixed page count and required content conflict, ask for a scope decision
|
|
16
|
+
rather than dropping content or making it illegible.
|
|
17
|
+
|
|
18
|
+
## Adapt content to the format
|
|
19
|
+
|
|
20
|
+
Read the matching [output guide](skills/konpeki/SKILL.md#choose-the-output-guide)
|
|
21
|
+
for slides, résumés, long documents, one-pagers/cards, or covers/social graphics.
|
|
22
|
+
Use [content patterns](skills/konpeki/references/patterns.md) for text with visuals,
|
|
23
|
+
charts, tables, comparisons, processes, systems, or annotations in the work.
|
|
24
|
+
They guide decisions, not fixed templates or a placement grid.
|
|
25
|
+
|
|
26
|
+
Specify required facts per format, not on every page of a multi-format set.
|
|
27
|
+
Keep a qualification wherever its claim appears, and retain required disclosure.
|
|
28
|
+
Preserve the same headline wording across announcement formats; change its
|
|
29
|
+
line breaks, not the promise. Avoid breaks that strand articles or prepositions.
|
|
30
|
+
|
|
31
|
+
Review link cards at about 500px wide, slides at presentation distance and print
|
|
32
|
+
pages at actual size. The minimum-size diagnostic is a floor, not a target for
|
|
33
|
+
body text. Use print running heads, page numbers and recurring source references
|
|
34
|
+
when they help navigate a multi-page document; remove repetitive metadata from
|
|
35
|
+
standalone graphics.
|
|
36
|
+
|
|
37
|
+
## Visual judgment
|
|
38
|
+
|
|
39
|
+
The brief, brand, and references choose the visual language, but never override
|
|
40
|
+
accuracy or readability. The selected theme owns repeatable treatments; this
|
|
41
|
+
guide and other design skills own their use. Konpeki bundles one theme, Cobalt:
|
|
42
|
+
cobalt ink on warm paper. A brief-specific theme adapted from it is an equally
|
|
43
|
+
valid starting point.
|
|
44
|
+
|
|
45
|
+
For Cobalt, use square corners, precise alignment and an asymmetric layout led
|
|
46
|
+
by a strong headline. That is this theme's taste, not a restriction on a
|
|
47
|
+
brief-specific theme or meaningful chart geometry. A custom theme may carry
|
|
48
|
+
short companion `NOTES.md` with its own look-specific guidance.
|
|
49
|
+
|
|
50
|
+
Use complete type roles rather than accumulating near-identical treatments, and
|
|
51
|
+
the same rule treatment for the same purpose. Color distinguishes roles: accent
|
|
52
|
+
for the main claim or path, muted ink for supporting copy, categorical colors
|
|
53
|
+
for identity, sequential colors for amount. Token compliance does not establish
|
|
54
|
+
good composition or honest visual encoding.
|
|
55
|
+
|
|
56
|
+
Budget space for the headline, chart or table, sources and caveats together.
|
|
57
|
+
Prefer flow or grid rows over absolute positions for text that can wrap after a
|
|
58
|
+
theme swap. Avoid guessed fixed-height paragraph boxes and manual line breaks
|
|
59
|
+
that imitate wrapping. Judge visible text as well as its CSS box: line height,
|
|
60
|
+
padding, and font metrics affect perceived gaps and alignment. On contrasting
|
|
61
|
+
fields, explicitly set the ink of nested type roles and code too: their defaults
|
|
62
|
+
may replace the parent's color.
|
|
63
|
+
|
|
64
|
+
Use diagrams, annotated artifacts, charts, or comparisons only when they make
|
|
65
|
+
real relationships easier to grasp. Use arrows sparingly and keep semantic
|
|
66
|
+
colors consistent.
|
|
67
|
+
|
|
68
|
+
Resolve conflicts in this order: accuracy and readability; the floor's bans;
|
|
69
|
+
explicit content and delivery constraints; specific visual direction; then the
|
|
70
|
+
floor's defaults and these taste notes. Finished work is the default: do not
|
|
71
|
+
impose a questionnaire, diagram choice, or outline checkpoint unless the user
|
|
72
|
+
asks for one.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,25 +1,12 @@
|
|
|
1
1
|
# Contributing to Konpeki
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Bug reports and focused improvements are welcome. Search existing issues first,
|
|
4
|
+
and discuss large contract changes before implementing them. Never include
|
|
5
|
+
private documents, credentials, or proprietary source material in issues,
|
|
6
|
+
fixtures, or screenshots. Report vulnerabilities via [SECURITY.md](SECURITY.md).
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- Search existing issues before filing a new one.
|
|
9
|
-
- Use an issue to discuss large features or changes to the composition contract
|
|
10
|
-
before investing in an implementation.
|
|
11
|
-
- Do not include private compositions, credentials or proprietary source material
|
|
12
|
-
in issues, fixtures or screenshots.
|
|
13
|
-
- Report security concerns through the process in [SECURITY.md](SECURITY.md), not
|
|
14
|
-
through a public issue.
|
|
15
|
-
|
|
16
|
-
## Development
|
|
17
|
-
|
|
18
|
-
Follow [docs/development.md](docs/development.md) to install the pinned Node.js and
|
|
19
|
-
pnpm toolchain. Keep changes scoped and preserve existing composition compatibility
|
|
20
|
-
unless a contract change has been agreed in advance.
|
|
21
|
-
|
|
22
|
-
Before opening a pull request, run:
|
|
8
|
+
Follow [docs/development.md](docs/development.md) for the pinned toolchain and
|
|
9
|
+
verification guidance. Before opening a pull request, run:
|
|
23
10
|
|
|
24
11
|
```sh
|
|
25
12
|
mise exec -- pnpm check
|
|
@@ -28,9 +15,9 @@ mise exec -- pnpm build
|
|
|
28
15
|
mise exec -- pnpm check:package
|
|
29
16
|
```
|
|
30
17
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
Include affected states and verification in the pull request description. UI
|
|
19
|
+
changes require visual inspection. Releases and deployments require maintainer
|
|
20
|
+
approval.
|
|
34
21
|
|
|
35
|
-
By submitting a contribution, you agree that it is licensed under the
|
|
22
|
+
By submitting a contribution, you agree that it is licensed under the
|
|
36
23
|
[Apache-2.0 license](LICENSE).
|
package/README.md
CHANGED
|
@@ -1,107 +1,116 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
4
|
-
|
|
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.
|
|
9
|
-
|
|
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.
|
|
12
|
-
|
|
13
|
-
## Use with your agent
|
|
14
|
-
|
|
15
|
-
Requires **Node.js 24+**, npm, a coding agent that can edit files and run commands,
|
|
16
|
-
and a browser.
|
|
17
|
-
|
|
18
|
-
Install the [Konpeki skill](skills/konpeki/) with your agent's
|
|
19
|
-
skill installer. Install the whole directory, including `scripts/` and `assets/`, not just
|
|
20
|
-
`SKILL.md`. For example, ask a Codex skill installer:
|
|
21
|
-
|
|
22
|
-
```text
|
|
23
|
-
Install the konpeki skill from vcfgdev/konpeki, at skills/konpeki.
|
|
45
|
+
```sh
|
|
46
|
+
npm install --save-exact konpeki@0.4.0
|
|
47
|
+
npx --no-install konpeki browser install
|
|
24
48
|
```
|
|
25
49
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
| Workflow | Codex CLI / IDE | Claude Code standalone skill |
|
|
29
|
-
| --- | --- | --- |
|
|
30
|
-
| Open a blank or existing editor; no generation | `$konpeki init` | `/konpeki init` |
|
|
31
|
-
| Create, inspect and revise a visual | `$konpeki generate …` | `/konpeki generate …` |
|
|
32
|
-
|
|
33
|
-
`init` accepts a composition JSON path and preserves existing work. `generate`
|
|
34
|
-
uses the materials already in your conversation and prepares the runtime if
|
|
35
|
-
needed; there is no required init step. Plugin installations may namespace the
|
|
36
|
-
skill. Other hosts can select the skill or use natural language:
|
|
50
|
+
Create a starter with its theme beside it, then run the loop:
|
|
37
51
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
First-run installation, browser permissions and remote preview forwarding depend
|
|
48
|
-
on your agent host. If skills are unavailable, give the agent the public
|
|
49
|
-
[SETUP.md](https://raw.githubusercontent.com/vcfgdev/konpeki/main/SETUP.md) URL and
|
|
50
|
-
your brief together. The setup guide also covers the optional Codex plugin package.
|
|
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
|
+
```
|
|
51
60
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
[authoring modes](AUTHORING.md#authoring-mode) provide defaults without requiring
|
|
55
|
-
you to choose fonts, colors or layouts first.
|
|
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).
|
|
56
63
|
|
|
57
|
-
|
|
58
|
-
button's copyable handoff to resume the agent. Opening the editor alone does not
|
|
59
|
-
connect or wake an agent. The skill modes are not terminal CLI subcommands.
|
|
64
|
+
To let your coding agent do the authoring, install the skill separately:
|
|
60
65
|
|
|
61
|
-
|
|
66
|
+
```sh
|
|
67
|
+
npx skills add vcfgdev/konpeki -g
|
|
68
|
+
```
|
|
62
69
|
|
|
63
|
-
|
|
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.
|
|
64
73
|
|
|
65
|
-
|
|
66
|
-
working copy, import/download editable JSON, export PNG and present. It requires
|
|
67
|
-
no account or AI service. Browser-local data is not cloud backup; download JSON
|
|
68
|
-
to keep or move your work. Continue with your coding agent using that file.
|
|
74
|
+
## Upgrading from 0.3.x
|
|
69
75
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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.
|
|
73
80
|
|
|
74
|
-
|
|
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).
|
|
75
88
|
|
|
76
|
-
|
|
77
|
-
|
|
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.
|
|
78
92
|
|
|
79
|
-
|
|
80
|
-
npm install --save-dev konpeki@latest
|
|
81
|
-
curl -fL https://raw.githubusercontent.com/vcfgdev/konpeki/main/slides/introducing-konpeki/composition.json -o introduction.json
|
|
82
|
-
npm exec --no -- konpeki preview introduction.json
|
|
83
|
-
```
|
|
93
|
+
## Theme
|
|
84
94
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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.
|
|
88
98
|
|
|
89
|
-
|
|
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.
|
|
90
103
|
|
|
91
|
-
|
|
92
|
-
Konpeki introduction. Retained React/SVG examples are drawing references;
|
|
93
|
-
new editable documents use composition JSON.
|
|
94
|
-
- [Agent-led setup](SETUP.md) and [authoring guidance](AUTHORING.md).
|
|
95
|
-
- [Canvas workflow](docs/workflow.md): page sizes, export and agent handoff.
|
|
96
|
-
- [Development](docs/development.md): architecture, demo hosting, packaging and checks.
|
|
97
|
-
- [Composition contract](composition/README.md) and [design resources](design/README.md).
|
|
98
|
-
- [Contributing](CONTRIBUTING.md) and [security policy](SECURITY.md).
|
|
104
|
+
## Documentation
|
|
99
105
|
|
|
100
|
-
Konpeki
|
|
101
|
-
|
|
102
|
-
|
|
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)
|
|
103
113
|
|
|
104
114
|
## License
|
|
105
115
|
|
|
106
|
-
[Apache-2.0](LICENSE).
|
|
107
|
-
external design references are credited where used.
|
|
116
|
+
[Apache-2.0](LICENSE). Fonts and other dependencies retain their own licenses.
|