@compilr-dev/sdk 0.17.11 → 0.17.13
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.
|
@@ -5,3 +5,6 @@
|
|
|
5
5
|
* rendered from sandboxed HTML/SVG, optionally with live "Tweaks" controls.
|
|
6
6
|
*/
|
|
7
7
|
export declare const canvasSkill: import("@compilr-dev/agents").Skill;
|
|
8
|
+
export declare const infographicSkill: import("@compilr-dev/agents").Skill;
|
|
9
|
+
export declare const carouselSkill: import("@compilr-dev/agents").Skill;
|
|
10
|
+
export declare const boardSkill: import("@compilr-dev/agents").Skill;
|
|
@@ -29,7 +29,9 @@ export const canvasSkill = defineSkill({
|
|
|
29
29
|
## Canvas types (pick one)
|
|
30
30
|
- **infographic** — a single self-contained composition (poster / stat card / one-pager). Default when unsure.
|
|
31
31
|
- **carousel** — multiple slide "sheets"; author each slide as a top-level \`<section data-sheet>…</section>\`.
|
|
32
|
-
- **board** — an infinite 2D
|
|
32
|
+
- **board** — an infinite 2D coordinate space of absolutely-positioned node cards + inline-SVG connectors (mind-map / diagram / UI sketch). Wrap in \`<div data-board style="position:relative;width:Wpx;height:Hpx">\`.
|
|
33
|
+
|
|
34
|
+
**Once you've picked the type, consult its craft guide for the design rules that make it good** — the \`infographic\` skill (hierarchy, grid, stat tiles, restrained color, correct charts), the \`carousel\` skill (one idea per slide, narrative arc, consistent master layout, 16:9 discipline), or the \`board\` skill (declared coordinate space, absolutely-positioned node cards, inline-SVG connectors, clustering). This general skill covers the mechanics (tools, structure, theme, Tweaks); the per-type skill covers the craft.
|
|
33
35
|
|
|
34
36
|
## STEPS
|
|
35
37
|
|
|
@@ -67,3 +69,125 @@ export const canvasSkill = defineSkill({
|
|
|
67
69
|
- Keep \`html\` self-contained and within the sandbox limits above — anything that needs the network or same-origin will silently fail to render.
|
|
68
70
|
- One canvas per request unless the user asks for several.`,
|
|
69
71
|
});
|
|
72
|
+
// =============================================================================
|
|
73
|
+
// /infographic — craft guide for a single-composition canvas
|
|
74
|
+
// =============================================================================
|
|
75
|
+
export const infographicSkill = defineSkill({
|
|
76
|
+
name: 'infographic',
|
|
77
|
+
description: 'Craft guidance for authoring a GREAT infographic canvas — visual hierarchy, grid & rhythm, ' +
|
|
78
|
+
'type scale, stat tiles, restrained color, and correct charts. Consult this after choosing the ' +
|
|
79
|
+
'infographic canvas type; the general "canvas" skill covers the mechanics, this covers the design.',
|
|
80
|
+
tags: ['visual', 'canvas', 'infographic', 'design'],
|
|
81
|
+
prompt: `Craft guide for an INFOGRAPHIC — a single self-contained composition (poster / stat card / one-pager). This is design guidance; author with the canvas tools (see the \`canvas\` skill for mechanics, structure, theme vars, and Tweaks).
|
|
82
|
+
|
|
83
|
+
## The one rule above all
|
|
84
|
+
**Decide the single takeaway, then build a hierarchy around it.** One element must dominate — a hero stat, a headline, a key chart — and everything else visibly supports it. If everything is the same weight, it's a wall of noise. A viewer should get the point in 3 seconds, then find detail.
|
|
85
|
+
|
|
86
|
+
## Layout — grid & rhythm
|
|
87
|
+
- Use a real **CSS grid**, not free-floating boxes. Consistent gutters; align everything to the grid.
|
|
88
|
+
- One **spacing scale** (multiples of 8px). Generous whitespace is a feature — don't fill every pixel.
|
|
89
|
+
- Group related content into **cards** (\`var(--canvas-card)\` background, \`var(--canvas-border)\` hairline, consistent padding). Cards create structure and scannability.
|
|
90
|
+
|
|
91
|
+
## Type
|
|
92
|
+
- Strong **contrast between levels**: a big display number/headline (48–96px) → uppercase, letter-spaced **section labels** (12–14px, \`var(--canvas-muted)\`) → body (14–16px).
|
|
93
|
+
- 1–2 families (system stack is fine). Use \`font-variant-numeric: tabular-nums\` for figures so numbers align.
|
|
94
|
+
- Few words. Labels are short; let the numbers and shapes carry meaning.
|
|
95
|
+
|
|
96
|
+
## Numbers & data
|
|
97
|
+
- Prefer **stat tiles**: big value + small label + optional delta (▲/▼ with \`var(--canvas-accent)\`/muted). Don't decorate numbers with chartjunk.
|
|
98
|
+
- **Charts only when they earn it**, as inline SVG, with the right form: bar = compare categories, line = trend over time, donut = 2–3 parts of a whole (never more). **Label directly** on the marks; avoid legends when you can. No 3D, no gradients-as-data, no needless axes.
|
|
99
|
+
|
|
100
|
+
## Color
|
|
101
|
+
- Structure with \`var(--canvas-bg)\` / \`var(--canvas-fg)\` / \`var(--canvas-card)\` / \`var(--canvas-border)\`.
|
|
102
|
+
- **ONE accent** (\`var(--canvas-accent)\`) used sparingly — for the focal point and one or two emphases. Resist coloring everything.
|
|
103
|
+
- Use multiple colors ONLY to encode categories, and then from a small restrained set — never rainbow for decoration.
|
|
104
|
+
|
|
105
|
+
## Icons & shapes
|
|
106
|
+
- Inline **SVG**, filled/stroked with the theme vars, a consistent stroke width. No emoji as primary iconography.
|
|
107
|
+
|
|
108
|
+
## Before you finish
|
|
109
|
+
- Set the background explicitly to \`var(--canvas-bg)\` (see the canvas skill's export note).
|
|
110
|
+
- Add 2–4 **bound** Tweaks (accent color, headline size, a section toggle) — declared AND referenced in the HTML.
|
|
111
|
+
|
|
112
|
+
## Anti-patterns (fix on sight)
|
|
113
|
+
- No focal point / everything equal weight. • Inconsistent spacing or off-grid boxes. • Paragraphs of body text. • A chart where a single number would do. • Hardcoded dark colors or decorative gradients. • Legends where direct labels fit.`,
|
|
114
|
+
});
|
|
115
|
+
// =============================================================================
|
|
116
|
+
// /carousel — craft guide for a slide-deck canvas
|
|
117
|
+
// =============================================================================
|
|
118
|
+
export const carouselSkill = defineSkill({
|
|
119
|
+
name: 'carousel',
|
|
120
|
+
description: 'Craft guidance for authoring a GREAT slide carousel / presentation canvas — one idea per slide, ' +
|
|
121
|
+
'a narrative arc, a consistent master layout, and 16:9 discipline. Consult this after choosing the ' +
|
|
122
|
+
'carousel canvas type; the general "canvas" skill covers the mechanics, this covers the design.',
|
|
123
|
+
tags: ['visual', 'canvas', 'carousel', 'presentation', 'design'],
|
|
124
|
+
prompt: `Craft guide for a CAROUSEL / presentation — a sequence of slide "sheets". This is design guidance; author with the canvas tools (see the \`canvas\` skill). Each slide is a top-level \`<section data-sheet>…</section>\`; add one per \`canvas_edit\` append.
|
|
125
|
+
|
|
126
|
+
## The two rules above all
|
|
127
|
+
1. **One idea per slide.** If a sheet is making two points, split it into two sheets. A slide is a beat, not a page.
|
|
128
|
+
2. **Consistency is the whole game.** Every slide shares the same master layout — identical margins, title position, type scale, and footer. That repetition is what makes a set of slides read as ONE deck instead of a pile of unrelated images.
|
|
129
|
+
|
|
130
|
+
## Narrative arc
|
|
131
|
+
Structure the sequence like a story, not a list:
|
|
132
|
+
- **Cover** (title + one-line premise) → **context / problem** → **key points, one per slide** → **payoff / summary** → **close / CTA**.
|
|
133
|
+
- Order the middle so each slide sets up the next. If two slides can swap freely, the arc is weak.
|
|
134
|
+
|
|
135
|
+
## The 16:9 frame
|
|
136
|
+
- Slides are a fixed **16:9** page — design *within* it, with safe margins (don't run content to the edge).
|
|
137
|
+
- **Don't overfill.** One headline + a few supporting elements + breathing room. Whitespace reads as confidence.
|
|
138
|
+
- Give **every slide a visual anchor** — a big number, a simple chart, an icon, a diagram — not just text.
|
|
139
|
+
|
|
140
|
+
## Type (read-at-a-glance)
|
|
141
|
+
- Big **slide titles** (32–44px), few words. Short bullets (≤ ~6 words each, a handful at most). Body ≥ 18px.
|
|
142
|
+
- High contrast; \`var(--canvas-fg)\` on \`var(--canvas-bg)\`. \`var(--canvas-accent)\` for emphasis and section dividers.
|
|
143
|
+
|
|
144
|
+
## Consistency toolkit
|
|
145
|
+
- A shared header zone (title, optional kicker/section label) in the same spot on every slide.
|
|
146
|
+
- A shared footer (page number \`n / N\`, optional brand) — small, \`var(--canvas-muted)\`.
|
|
147
|
+
- The same card/grid system reused slide to slide.
|
|
148
|
+
|
|
149
|
+
## Before you finish
|
|
150
|
+
- Set \`background: var(--canvas-bg)\` on EACH \`<section data-sheet>\` (see the canvas skill's export note — transparent slides export white).
|
|
151
|
+
- Add 2–4 **bound** Tweaks (accent color, title size, a toggle for footer/page numbers).
|
|
152
|
+
|
|
153
|
+
## Anti-patterns (fix on sight)
|
|
154
|
+
- Paragraphs on a slide. • Slides with inconsistent layouts/margins. • Text too small to read at a glance. • Edge-to-edge clutter with no whitespace. • One giant slide doing the work of five. • A deck with no arc (slides in interchangeable order).`,
|
|
155
|
+
});
|
|
156
|
+
// =============================================================================
|
|
157
|
+
// /board — craft guide for an infinite-board canvas (Phase 5)
|
|
158
|
+
// =============================================================================
|
|
159
|
+
export const boardSkill = defineSkill({
|
|
160
|
+
name: 'board',
|
|
161
|
+
description: 'Craft guidance for authoring a GREAT infinite-board canvas — a pannable/zoomable 2D space for ' +
|
|
162
|
+
'mind-maps, system diagrams, and UI-layout sketches. Nodes are absolutely positioned in a declared ' +
|
|
163
|
+
'coordinate space; connectors are inline SVG. Consult after choosing the board canvas type.',
|
|
164
|
+
tags: ['visual', 'canvas', 'board', 'diagram', 'design'],
|
|
165
|
+
prompt: `Craft guide for an INFINITE BOARD — a pannable/zoomable 2D space (mind-map, system/architecture diagram, UI-layout sketch). This is design guidance; author with the canvas tools (see the \`canvas\` skill). YOU author the board; the user pans, zooms, and lightly restyles — they do NOT drag nodes, so your layout is the final layout.
|
|
166
|
+
|
|
167
|
+
## The coordinate-space contract (REQUIRED)
|
|
168
|
+
- The board is ONE HTML document laid out in a logical pixel coordinate space. Wrap everything in a root with an EXPLICIT declared size:
|
|
169
|
+
\`<div data-board style="position:relative;width:2400px;height:1500px">…</div>\`
|
|
170
|
+
The \`data-board\` element and its px \`width\`/\`height\` ARE the board's extent — the host uses them to fit-to-view and to export. Pick a size that comfortably holds your content with margins (e.g. 2000–4000 wide). Keep all content INSIDE these bounds.
|
|
171
|
+
- **Nodes** are self-contained blocks, ABSOLUTELY positioned inside the board: \`position:absolute; left:Xpx; top:Ypx; width:Wpx\`. Snap X/Y/W to a grid (e.g. multiples of 20) so the board reads as ordered, not scattered.
|
|
172
|
+
- Do NOT paint the board background — the host draws a dot-grid backdrop on \`var(--canvas-bg)\`. Style the NODE CARDS with the theme vars (\`var(--canvas-card)\` fill, \`var(--canvas-border)\` edge, \`var(--canvas-fg)\` text, \`var(--canvas-accent)\` for emphasis).
|
|
173
|
+
|
|
174
|
+
## Connectors — inline SVG overlay
|
|
175
|
+
- Draw relationships as ONE inline-SVG layer spanning the whole board, BEHIND the nodes:
|
|
176
|
+
\`<svg style="position:absolute;inset:0;width:100%;height:100%;pointer-events:none" viewBox="0 0 2400 1500">…</svg>\`
|
|
177
|
+
- Connect node edge-points with \`<line>\`/\`<path>\` in \`var(--canvas-border)\` or \`var(--canvas-muted)\`; add \`<polygon>\`/marker arrowheads for direction. Keep the viewBox equal to the board size so SVG coordinates match node coordinates.
|
|
178
|
+
- Route to avoid crossing nodes; prefer orthogonal (elbow) paths for diagrams, straight/curved for mind-maps.
|
|
179
|
+
|
|
180
|
+
## Layout craft
|
|
181
|
+
- **Cluster by meaning.** Group related nodes into visual clusters with shared proximity (and optionally a faint labeled region). Space clusters apart so the structure is legible at fit-zoom.
|
|
182
|
+
- **A clear reading order / center of gravity.** Mind-map: a central node with branches radiating out. Architecture: layered (client → service → data), left-to-right or top-to-bottom. UI sketch: screens laid out in flow order.
|
|
183
|
+
- **Label everything** — every node has a short title; every cluster/region a heading; connectors labeled when the relationship isn't obvious.
|
|
184
|
+
- **Legible at a glance.** Node titles ~16–20px, body ~13–14px. Don't rely on the user zooming in to read essential labels — the board should make sense at fit-view.
|
|
185
|
+
- Consistent node sizing within a cluster; consistent card style board-wide.
|
|
186
|
+
|
|
187
|
+
## Before you finish
|
|
188
|
+
- Confirm all content sits inside the declared \`data-board\` bounds (nothing clipped at the edges).
|
|
189
|
+
- Add 2–4 **bound** Tweaks (accent color, node title size, a toggle for connector labels or a cluster).
|
|
190
|
+
|
|
191
|
+
## Anti-patterns (fix on sight)
|
|
192
|
+
- No \`data-board\` wrapper / no declared size (breaks fit + export). • Content outside the declared bounds. • Nodes scattered off-grid with no clusters. • Painting a full-board background (the host owns the backdrop). • Connectors that cross through nodes or are unlabeled where the relation is ambiguous. • Text only readable when zoomed in. • Reinventing a whiteboard — this is an authored diagram, not a drag-and-drop surface.`,
|
|
193
|
+
});
|
|
@@ -11,8 +11,8 @@ export { businessVisionSkill, marketAnalysisSkill, competitorAnalysisSkill, fina
|
|
|
11
11
|
export { brandSetupSkill, contentStrategySkill, contentCalendarSkill, createContentSkill, contentReviewSkill, } from './content-skills.js';
|
|
12
12
|
export { curriculumDesignSkill, lessonPlanSkill, assessmentDesignSkill, courseReviewSkill, } from './course-skills.js';
|
|
13
13
|
export { bookOutlineSkill, characterDesignSkill, plotThreadsSkill, sceneBreakdownSkill, bookReviewSkill, } from './book-skills.js';
|
|
14
|
-
export { canvasSkill } from './canvas-skills.js';
|
|
14
|
+
export { canvasSkill, infographicSkill, carouselSkill, boardSkill } from './canvas-skills.js';
|
|
15
15
|
/**
|
|
16
|
-
* All platform-specific skills (
|
|
16
|
+
* All platform-specific skills (38 total).
|
|
17
17
|
*/
|
|
18
18
|
export declare const platformSkills: Skill[];
|
|
@@ -17,7 +17,7 @@ export { curriculumDesignSkill, lessonPlanSkill, assessmentDesignSkill, courseRe
|
|
|
17
17
|
// Book
|
|
18
18
|
export { bookOutlineSkill, characterDesignSkill, plotThreadsSkill, sceneBreakdownSkill, bookReviewSkill, } from './book-skills.js';
|
|
19
19
|
// Canvas (visual)
|
|
20
|
-
export { canvasSkill } from './canvas-skills.js';
|
|
20
|
+
export { canvasSkill, infographicSkill, carouselSkill, boardSkill } from './canvas-skills.js';
|
|
21
21
|
// Import all for the aggregate array
|
|
22
22
|
import { designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, } from './software-skills.js';
|
|
23
23
|
import { outlineSkill, literatureReviewSkill, draftSectionSkill, peerReviewSkill, researchScaffoldSkill, } from './research-skills.js';
|
|
@@ -25,9 +25,9 @@ import { businessVisionSkill, marketAnalysisSkill, competitorAnalysisSkill, fina
|
|
|
25
25
|
import { brandSetupSkill, contentStrategySkill, contentCalendarSkill, createContentSkill, contentReviewSkill, } from './content-skills.js';
|
|
26
26
|
import { curriculumDesignSkill, lessonPlanSkill, assessmentDesignSkill, courseReviewSkill, } from './course-skills.js';
|
|
27
27
|
import { bookOutlineSkill, characterDesignSkill, plotThreadsSkill, sceneBreakdownSkill, bookReviewSkill, } from './book-skills.js';
|
|
28
|
-
import { canvasSkill } from './canvas-skills.js';
|
|
28
|
+
import { canvasSkill, infographicSkill, carouselSkill, boardSkill } from './canvas-skills.js';
|
|
29
29
|
/**
|
|
30
|
-
* All platform-specific skills (
|
|
30
|
+
* All platform-specific skills (38 total).
|
|
31
31
|
*/
|
|
32
32
|
export const platformSkills = [
|
|
33
33
|
// Software (9)
|
|
@@ -70,6 +70,9 @@ export const platformSkills = [
|
|
|
70
70
|
plotThreadsSkill,
|
|
71
71
|
sceneBreakdownSkill,
|
|
72
72
|
bookReviewSkill,
|
|
73
|
-
// Canvas (
|
|
73
|
+
// Canvas (4)
|
|
74
74
|
canvasSkill,
|
|
75
|
+
infographicSkill,
|
|
76
|
+
carouselSkill,
|
|
77
|
+
boardSkill,
|
|
75
78
|
];
|