@aexol/spectral 0.9.230 → 0.9.234
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 +2 -0
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +89 -14
- package/dist/backend/generated-images.d.ts +1 -1
- package/dist/backend/generated-images.d.ts.map +1 -1
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +12 -1
- package/dist/designer/data/skills/blog-post.d.ts +3 -0
- package/dist/designer/data/skills/blog-post.d.ts.map +1 -0
- package/dist/designer/data/skills/blog-post.js +84 -0
- package/dist/designer/data/skills/blog-post.ts +87 -0
- package/dist/designer/data/skills/critique.d.ts +3 -0
- package/dist/designer/data/skills/critique.d.ts.map +1 -0
- package/dist/designer/data/skills/critique.js +109 -0
- package/dist/designer/data/skills/critique.ts +112 -0
- package/dist/designer/data/skills/dashboard.d.ts +3 -0
- package/dist/designer/data/skills/dashboard.d.ts.map +1 -0
- package/dist/designer/data/skills/dashboard.js +165 -0
- package/dist/designer/data/skills/dashboard.ts +168 -0
- package/dist/designer/data/skills/design-brief.d.ts +3 -0
- package/dist/designer/data/skills/design-brief.d.ts.map +1 -0
- package/dist/designer/data/skills/design-brief.js +141 -0
- package/dist/designer/data/skills/design-brief.ts +144 -0
- package/dist/designer/data/skills/design-skill.d.ts +10 -0
- package/dist/designer/data/skills/design-skill.d.ts.map +1 -0
- package/dist/designer/data/skills/design-skill.js +1 -0
- package/dist/designer/data/skills/design-skill.ts +9 -0
- package/dist/designer/data/skills/docs-page.d.ts +3 -0
- package/dist/designer/data/skills/docs-page.d.ts.map +1 -0
- package/dist/designer/data/skills/docs-page.js +68 -0
- package/dist/designer/data/skills/docs-page.ts +71 -0
- package/dist/designer/data/skills/index.d.ts +3 -0
- package/dist/designer/data/skills/index.d.ts.map +1 -0
- package/dist/designer/data/skills/index.js +28 -0
- package/dist/designer/data/skills/index.ts +30 -0
- package/dist/designer/data/skills/magazine-poster.d.ts +3 -0
- package/dist/designer/data/skills/magazine-poster.d.ts.map +1 -0
- package/dist/designer/data/skills/magazine-poster.js +70 -0
- package/dist/designer/data/skills/magazine-poster.ts +73 -0
- package/dist/designer/data/skills/mobile-app.d.ts +3 -0
- package/dist/designer/data/skills/mobile-app.d.ts.map +1 -0
- package/dist/designer/data/skills/mobile-app.js +229 -0
- package/dist/designer/data/skills/mobile-app.ts +232 -0
- package/dist/designer/data/skills/motion-frames.d.ts +3 -0
- package/dist/designer/data/skills/motion-frames.d.ts.map +1 -0
- package/dist/designer/data/skills/motion-frames.js +121 -0
- package/dist/designer/data/skills/motion-frames.ts +124 -0
- package/dist/designer/data/skills/pricing-page.d.ts +3 -0
- package/dist/designer/data/skills/pricing-page.d.ts.map +1 -0
- package/dist/designer/data/skills/pricing-page.js +76 -0
- package/dist/designer/data/skills/pricing-page.ts +79 -0
- package/dist/designer/data/skills/saas-landing.d.ts +3 -0
- package/dist/designer/data/skills/saas-landing.d.ts.map +1 -0
- package/dist/designer/data/skills/saas-landing.js +71 -0
- package/dist/designer/data/skills/saas-landing.ts +74 -0
- package/dist/designer/data/skills/slide-deck.d.ts +3 -0
- package/dist/designer/data/skills/slide-deck.d.ts.map +1 -0
- package/dist/designer/data/skills/slide-deck.js +213 -0
- package/dist/designer/data/skills/slide-deck.ts +216 -0
- package/dist/designer/data/skills/social-carousel.d.ts +3 -0
- package/dist/designer/data/skills/social-carousel.d.ts.map +1 -0
- package/dist/designer/data/skills/social-carousel.js +135 -0
- package/dist/designer/data/skills/social-carousel.ts +138 -0
- package/dist/designer/data/skills/web-prototype.d.ts +3 -0
- package/dist/designer/data/skills/web-prototype.d.ts.map +1 -0
- package/dist/designer/data/skills/web-prototype.js +159 -0
- package/dist/designer/data/skills/web-prototype.ts +162 -0
- package/dist/designer/skills.d.ts +4 -10
- package/dist/designer/skills.d.ts.map +1 -1
- package/dist/designer/skills.js +2 -1643
- package/dist/extensions/logic-trace.d.ts +1 -1
- package/dist/extensions/logic-trace.d.ts.map +1 -1
- package/dist/extensions/logic-trace.js +199 -70
- package/dist/extensions/video-generation/index.d.ts +3 -0
- package/dist/extensions/video-generation/index.d.ts.map +1 -0
- package/dist/extensions/video-generation/index.js +299 -0
- package/dist/extensions/wizard/index.js +9 -1
- package/dist/generated/parser/ast/nodes.d.ts +115 -0
- package/dist/generated/parser/ast/nodes.d.ts.map +1 -0
- package/dist/generated/parser/ast/nodes.js +8 -0
- package/dist/generated/parser/lexer/lexer.d.ts +28 -0
- package/dist/generated/parser/lexer/lexer.d.ts.map +1 -0
- package/dist/generated/parser/{lexer.js → lexer/lexer.js} +1 -180
- package/dist/generated/parser/{lexer.d.ts → lexer/tokens.d.ts} +5 -24
- package/dist/generated/parser/lexer/tokens.d.ts.map +1 -0
- package/dist/generated/parser/lexer/tokens.js +187 -0
- package/dist/generated/parser/mod.d.ts +5 -7
- package/dist/generated/parser/mod.d.ts.map +1 -1
- package/dist/generated/parser/mod.js +2 -1
- package/dist/generated/parser/parser/cursor.d.ts +47 -0
- package/dist/generated/parser/parser/cursor.d.ts.map +1 -0
- package/dist/generated/parser/parser/cursor.js +12 -0
- package/dist/generated/parser/parser/definitions.d.ts +16 -0
- package/dist/generated/parser/parser/definitions.d.ts.map +1 -0
- package/dist/generated/parser/parser/definitions.js +353 -0
- package/dist/generated/parser/parser/expressions.d.ts +17 -0
- package/dist/generated/parser/parser/expressions.d.ts.map +1 -0
- package/dist/generated/parser/parser/expressions.js +165 -0
- package/dist/generated/parser/parser.d.ts +18 -133
- package/dist/generated/parser/parser.d.ts.map +1 -1
- package/dist/generated/parser/parser.js +9 -505
- package/dist/generated/parser/tokenizer.d.ts +1 -2
- package/dist/generated/parser/tokenizer.d.ts.map +1 -1
- package/dist/generated/parser/tokenizer.js +2 -1
- package/dist/generated/parser/validator.d.ts +1 -1
- package/dist/generated/parser/validator.d.ts.map +1 -1
- package/dist/generated/zeus/const.d.ts.map +1 -1
- package/dist/generated/zeus/const.js +30 -0
- package/dist/generated/zeus/index.d.ts +140 -0
- package/dist/generated/zeus/index.d.ts.map +1 -1
- package/dist/generated/zeus/index.js +5 -0
- package/dist/mcp/glimpse-ui.js +9 -1
- package/dist/relay/dispatcher.d.ts +23 -104
- package/dist/relay/dispatcher.d.ts.map +1 -1
- package/dist/relay/dispatcher.js +21 -1130
- package/dist/relay/rest.d.ts +31 -0
- package/dist/relay/rest.d.ts.map +1 -0
- package/dist/relay/rest.js +85 -0
- package/dist/relay/routing.d.ts +109 -0
- package/dist/relay/routing.d.ts.map +1 -0
- package/dist/relay/routing.js +669 -0
- package/dist/relay/wizard-login.d.ts +17 -0
- package/dist/relay/wizard-login.d.ts.map +1 -0
- package/dist/relay/wizard-login.js +419 -0
- package/dist/sdk/agent-core/agent-loop.d.ts +2 -9
- package/dist/sdk/agent-core/agent-loop.d.ts.map +1 -1
- package/dist/sdk/agent-core/agent-loop.js +17 -291
- package/dist/sdk/agent-core/agent.d.ts +11 -4
- package/dist/sdk/agent-core/agent.d.ts.map +1 -1
- package/dist/sdk/agent-core/agent.js +16 -4
- package/dist/sdk/agent-core/tool-call-registry.d.ts +75 -0
- package/dist/sdk/agent-core/tool-call-registry.d.ts.map +1 -0
- package/dist/sdk/agent-core/tool-call-registry.js +131 -0
- package/dist/sdk/agent-core/tool-execution.d.ts +33 -0
- package/dist/sdk/agent-core/tool-execution.d.ts.map +1 -0
- package/dist/sdk/agent-core/tool-execution.js +399 -0
- package/dist/sdk/agent-core/types.d.ts +15 -4
- package/dist/sdk/agent-core/types.d.ts.map +1 -1
- package/dist/sdk/ai/env-api-keys.js +9 -1
- package/dist/sdk/ai/index.d.ts +3 -0
- package/dist/sdk/ai/index.d.ts.map +1 -1
- package/dist/sdk/ai/index.js +3 -0
- package/dist/sdk/ai/providers/faux.d.ts.map +1 -1
- package/dist/sdk/ai/providers/faux.js +3 -0
- package/dist/sdk/ai/providers/leaked-tool-call-parser.d.ts +39 -6
- package/dist/sdk/ai/providers/leaked-tool-call-parser.d.ts.map +1 -1
- package/dist/sdk/ai/providers/leaked-tool-call-parser.js +159 -18
- package/dist/sdk/ai/providers/openai/reasoning-replay.d.ts +48 -0
- package/dist/sdk/ai/providers/openai/reasoning-replay.d.ts.map +1 -0
- package/dist/sdk/ai/providers/openai/reasoning-replay.js +209 -0
- package/dist/sdk/ai/providers/openai-completions.d.ts.map +1 -1
- package/dist/sdk/ai/providers/openai-completions.js +23 -211
- package/dist/sdk/ai/providers/openrouter-videos.d.ts +3 -0
- package/dist/sdk/ai/providers/openrouter-videos.d.ts.map +1 -0
- package/dist/sdk/ai/providers/openrouter-videos.js +412 -0
- package/dist/sdk/ai/providers/register-builtins.d.ts.map +1 -1
- package/dist/sdk/ai/providers/register-builtins.js +6 -0
- package/dist/sdk/ai/providers/simple-options.d.ts +1 -6
- package/dist/sdk/ai/providers/simple-options.d.ts.map +1 -1
- package/dist/sdk/ai/providers/simple-options.js +0 -22
- package/dist/sdk/ai/providers/transform-messages.d.ts.map +1 -1
- package/dist/sdk/ai/providers/transform-messages.js +52 -1
- package/dist/sdk/ai/types.d.ts +91 -10
- package/dist/sdk/ai/types.d.ts.map +1 -1
- package/dist/sdk/ai/video-models.d.ts +10 -0
- package/dist/sdk/ai/video-models.d.ts.map +1 -0
- package/dist/sdk/ai/video-models.generated.d.ts +440 -0
- package/dist/sdk/ai/video-models.generated.d.ts.map +1 -0
- package/dist/sdk/ai/video-models.generated.js +441 -0
- package/dist/sdk/ai/video-models.js +22 -0
- package/dist/sdk/ai/videos-api-registry.d.ts +14 -0
- package/dist/sdk/ai/videos-api-registry.d.ts.map +1 -0
- package/dist/sdk/ai/videos-api-registry.js +21 -0
- package/dist/sdk/ai/videos.d.ts +4 -0
- package/dist/sdk/ai/videos.d.ts.map +1 -0
- package/dist/sdk/ai/videos.js +13 -0
- package/dist/sdk/coding-agent/core/agent-session.d.ts +8 -0
- package/dist/sdk/coding-agent/core/agent-session.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/agent-session.js +11 -0
- package/dist/sdk/coding-agent/core/compaction/compaction.d.ts +6 -118
- package/dist/sdk/coding-agent/core/compaction/compaction.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/compaction/compaction.js +11 -733
- package/dist/sdk/coding-agent/core/compaction/cut-points.d.ts +58 -0
- package/dist/sdk/coding-agent/core/compaction/cut-points.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/compaction/cut-points.js +191 -0
- package/dist/sdk/coding-agent/core/compaction/dedupe.d.ts +28 -0
- package/dist/sdk/coding-agent/core/compaction/dedupe.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/compaction/dedupe.js +156 -0
- package/dist/sdk/coding-agent/core/compaction/summarize.d.ts +21 -0
- package/dist/sdk/coding-agent/core/compaction/summarize.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/compaction/summarize.js +181 -0
- package/dist/sdk/coding-agent/core/compaction/tokens.d.ts +47 -0
- package/dist/sdk/coding-agent/core/compaction/tokens.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/compaction/tokens.js +224 -0
- package/dist/sdk/coding-agent/core/extensions/loader.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/extensions/loader.js +14 -0
- package/dist/sdk/coding-agent/core/extensions/native-extensions.d.ts +26 -0
- package/dist/sdk/coding-agent/core/extensions/native-extensions.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/extensions/native-extensions.js +23 -0
- package/dist/sdk/coding-agent/core/extensions/session-events.d.ts +157 -0
- package/dist/sdk/coding-agent/core/extensions/session-events.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/extensions/session-events.js +13 -0
- package/dist/sdk/coding-agent/core/extensions/types.d.ts +10 -367
- package/dist/sdk/coding-agent/core/extensions/types.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/extensions/types.js +2 -10
- package/dist/sdk/coding-agent/core/extensions/ui-types.d.ts +219 -0
- package/dist/sdk/coding-agent/core/extensions/ui-types.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/extensions/ui-types.js +4 -0
- package/dist/sdk/coding-agent/core/messages.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/messages.js +42 -2
- package/dist/sdk/coding-agent/core/package/default-package-manager.d.ts +115 -0
- package/dist/sdk/coding-agent/core/package/default-package-manager.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/package/default-package-manager.js +1184 -0
- package/dist/sdk/coding-agent/core/package/discovery.d.ts +20 -0
- package/dist/sdk/coding-agent/core/package/discovery.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/package/discovery.js +283 -0
- package/dist/sdk/coding-agent/core/package/ignore.d.ts +29 -0
- package/dist/sdk/coding-agent/core/package/ignore.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/package/ignore.js +235 -0
- package/dist/sdk/coding-agent/core/package/types.d.ts +128 -0
- package/dist/sdk/coding-agent/core/package/types.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/package/types.js +18 -0
- package/dist/sdk/coding-agent/core/package/update-check.d.ts +43 -0
- package/dist/sdk/coding-agent/core/package/update-check.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/package/update-check.js +253 -0
- package/dist/sdk/coding-agent/core/package-manager.d.ts +2 -188
- package/dist/sdk/coding-agent/core/package-manager.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/package-manager.js +1 -1940
- package/dist/sdk/coding-agent/core/resource-loader.d.ts +11 -0
- package/dist/sdk/coding-agent/core/resource-loader.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/resource-loader.js +23 -6
- package/dist/sdk/coding-agent/core/sdk.d.ts +24 -2
- package/dist/sdk/coding-agent/core/sdk.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/sdk.js +15 -3
- package/dist/sdk/coding-agent/core/session/migrate.d.ts +18 -0
- package/dist/sdk/coding-agent/core/session/migrate.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/session/migrate.js +78 -0
- package/dist/sdk/coding-agent/core/session/types.d.ts +165 -0
- package/dist/sdk/coding-agent/core/session/types.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/session/types.js +4 -0
- package/dist/sdk/coding-agent/core/session-manager.d.ts +3 -161
- package/dist/sdk/coding-agent/core/session-manager.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/session-manager.js +4 -72
- package/dist/sdk/coding-agent/core/settings-manager.d.ts +0 -8
- package/dist/sdk/coding-agent/core/settings-manager.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/settings-manager.js +3 -3
- package/dist/sdk/coding-agent/index.d.ts +2 -2
- package/dist/sdk/coding-agent/index.d.ts.map +1 -1
- package/dist/sdk/coding-agent/index.js +1 -1
- package/dist/sdk-public.d.ts +96 -0
- package/dist/sdk-public.d.ts.map +1 -0
- package/dist/sdk-public.js +109 -0
- package/dist/server/agent-bridge/rehydrate.d.ts +2 -2
- package/dist/server/agent-bridge/rehydrate.d.ts.map +1 -1
- package/dist/server/agent-bridge/rehydrate.js +14 -0
- package/dist/server/agent-bridge.d.ts +8 -2
- package/dist/server/agent-bridge.d.ts.map +1 -1
- package/dist/server/agent-bridge.js +25 -2
- package/dist/server/session-stream.d.ts +19 -0
- package/dist/server/session-stream.d.ts.map +1 -1
- package/dist/server/session-stream.js +35 -0
- package/dist/server/wire.d.ts +13 -0
- package/dist/server/wire.d.ts.map +1 -1
- package/package.json +8 -2
- package/dist/generated/parser/lexer.d.ts.map +0 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { DesignSkill } from "./design-skill.js";
|
|
2
|
+
|
|
3
|
+
export const critique: DesignSkill = {
|
|
4
|
+
name: "critique",
|
|
5
|
+
scenario: "design",
|
|
6
|
+
description:
|
|
7
|
+
"5-dimension expert design review. Scores any HTML artifact on Philosophy Consistency, Visual Hierarchy, Detail Execution, Functionality, and Innovation (each 0-10). Outputs an HTML report with a radar chart, evidence-backed scores, and three action lists: Keep / Fix / Quick-wins.",
|
|
8
|
+
outputKind: "html",
|
|
9
|
+
workflow: `# Critique Skill · 5-Dimension Expert Review
|
|
10
|
+
|
|
11
|
+
Produce a single-file HTML design review report that scores any artifact across 5 dimensions and proposes actionable fixes.
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
- After generating an artifact (deck, prototype, landing page) and the user asks "what's wrong with this?" or "review this"
|
|
15
|
+
- As a self-check loop before emitting output
|
|
16
|
+
- For comparing two variants of the same design
|
|
17
|
+
|
|
18
|
+
## The 5 Dimensions
|
|
19
|
+
|
|
20
|
+
### 1. Philosophy Consistency
|
|
21
|
+
> Does the artifact pick a clear direction and stick to it through every micro-decision?
|
|
22
|
+
|
|
23
|
+
Look for: one declared design direction vs three styles fighting; chrome/kicker vocabulary in one register; accent/serif/mono used by the same rule throughout.
|
|
24
|
+
0-4: Three styles fighting. 5-6: One direction but elements drift. 7-8: Coherent, occasional drift. 9-10: Every element argues for the same thesis.
|
|
25
|
+
|
|
26
|
+
### 2. Visual Hierarchy
|
|
27
|
+
> Can a stranger figure out what to read first, second, third — without being told?
|
|
28
|
+
|
|
29
|
+
Look for: largest type = most important thing; mono/serif/sans roles match information roles; clear primary/secondary/tertiary tiers.
|
|
30
|
+
0-4: Everything shouts. 5-6: Works on hero pages but breaks on body. 7-8: Clear tiers, occasional collision. 9-10: Eye moves with zero friction.
|
|
31
|
+
|
|
32
|
+
### 3. Detail Execution
|
|
33
|
+
> Alignment, leading, kerning at large sizes, image framing, edge-case spacing.
|
|
34
|
+
|
|
35
|
+
Look for: big numbers on baseline or floating; left/right column tops aligned; proportions consistent across pages; orphaned <br> causing single-character lines.
|
|
36
|
+
0-4: Visible tape and string. 5-6: Most pages clean, 1-2 ragged. 7-8: Polished, expert eye finds 2-3 misses. 9-10: Magazine-grade polish.
|
|
37
|
+
|
|
38
|
+
### 4. Functionality
|
|
39
|
+
> Does the artifact work for its intended use?
|
|
40
|
+
|
|
41
|
+
Look for: keyboard/wheel/touch nav working in decks; CTAs above the fold; phone numbers tappable on mobile; code blocks copyable; critical info readable from 4m away.
|
|
42
|
+
0-4: Visually fine but doesn't accomplish its job. 5-6: Core flow works, edge cases broken. 7-8: Robust through normal use. 9-10: Defensively engineered — handles iframe / fullscreen / paste / print.
|
|
43
|
+
|
|
44
|
+
### 5. Innovation
|
|
45
|
+
> Does this push past the median? Is there one element that makes people lean in?
|
|
46
|
+
|
|
47
|
+
Look for: one unexpected layout/motion/typographic move not required; or 100% safe generic output; innovation earned (matches direction) or grafted on.
|
|
48
|
+
0-4: Generic AI-slop median. 5-6: Competent and unmemorable. 7-8: One memorable moment, the rest solid. 9-10: Multiple moves you'd steal — each serving the thesis.
|
|
49
|
+
|
|
50
|
+
## Scoring Discipline
|
|
51
|
+
- **Always cite evidence** — "scored 4 because hero page mixes Playfair display with Inter sans on the same line" beats "feels inconsistent"
|
|
52
|
+
- **Don't average up** — if Hierarchy is 5 because page 3 is broken, don't bump to 7 because pages 1-2 are fine. The score is the worst sustained band.
|
|
53
|
+
- **Don't grade-inflate** — a 7 means strong, not acceptable. If every score is 7+, you're not reviewing critically.
|
|
54
|
+
- **Innovation is allowed to be low** — 5/10 is fine for production deliverables.
|
|
55
|
+
|
|
56
|
+
## Workflow
|
|
57
|
+
|
|
58
|
+
### Step 1 — Acquire the artifact
|
|
59
|
+
1. **Project file** — user said "review the index.html I just made": read it from the project folder.
|
|
60
|
+
2. **Pasted HTML** — user pasted code in chat: read it from the message.
|
|
61
|
+
3. **Self-critique** — you just emitted an artifact and want to self-critique: re-read your own output.
|
|
62
|
+
|
|
63
|
+
### Step 2 — Read enough to score
|
|
64
|
+
Skim the entire <style>, then read 6-8 representative content blocks. Do not score from intent alone — the score depends on executed design, not declared intent.
|
|
65
|
+
|
|
66
|
+
### Step 3 — Score with evidence
|
|
67
|
+
For each of the 5 dimensions, write the score and a 30-80 word evidence paragraph naming specific elements. Example:
|
|
68
|
+
\`\`\`
|
|
69
|
+
Dimension: Detail execution
|
|
70
|
+
Score: 6 / 10
|
|
71
|
+
Evidence: Stat-cards on page 3 align cleanly, but on page 8 the right column sits 2vh higher than the left because .callout has 3vh top margin while the figure doesn't. Image captions use mono on page 5 but sans on page 7 — pick one.
|
|
72
|
+
\`\`\`
|
|
73
|
+
|
|
74
|
+
### Step 4 — Build action lists
|
|
75
|
+
- **Keep** (3-5 bullets) — concrete things working that the user must not break. Cite by class/page/element.
|
|
76
|
+
- **Fix** (3-6 bullets) — must-do, ordered by visual cost saved per minute. Each bullet ≤ 1 sentence.
|
|
77
|
+
- **Quick wins** (3-5 bullets) — 5-15 minutes each, high signal-to-noise.
|
|
78
|
+
|
|
79
|
+
### Step 5 — Emit the report HTML
|
|
80
|
+
Build a single file with:
|
|
81
|
+
- Header: artifact name + date + reviewer + 1-line verdict
|
|
82
|
+
- Big radar chart (inline SVG, no library)
|
|
83
|
+
- 5 dimension cards in a 1-column or 2-column grid
|
|
84
|
+
- Three action lists at the bottom with checkbox affordance
|
|
85
|
+
|
|
86
|
+
Use the active design system tokens if one exists; otherwise default to a neutral light theme (white background, near-black text, one accent for radar fill).
|
|
87
|
+
|
|
88
|
+
## Radar Chart SVG Template
|
|
89
|
+
\`\`\`svg
|
|
90
|
+
<svg viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg">
|
|
91
|
+
<!-- Pentagon grid lines -->
|
|
92
|
+
<polygon points="200,40 352,152 294,340 106,340 48,152" fill="none" stroke="#e0e0e0" stroke-width="1"/>
|
|
93
|
+
<polygon points="200,80 314,166 267,306 133,306 86,166" fill="none" stroke="#e0e0e0" stroke-width="1"/>
|
|
94
|
+
<polygon points="200,120 276,180 240,272 160,272 124,180" fill="none" stroke="#e0e0e0" stroke-width="1"/>
|
|
95
|
+
<!-- Score polygon (fill with accent at 20% opacity) -->
|
|
96
|
+
<polygon points="..." fill="var(--accent, #3B82F6)" fill-opacity="0.2" stroke="var(--accent, #3B82F6)" stroke-width="2"/>
|
|
97
|
+
<!-- Labels at each vertex -->
|
|
98
|
+
<text x="200" y="30" text-anchor="middle" font-size="11">Philosophy</text>
|
|
99
|
+
<text x="360" y="155" text-anchor="start" font-size="11">Hierarchy</text>
|
|
100
|
+
<text x="300" y="355" text-anchor="middle" font-size="11">Detail</text>
|
|
101
|
+
<text x="100" y="355" text-anchor="middle" font-size="11">Function</text>
|
|
102
|
+
<text x="40" y="155" text-anchor="end" font-size="11">Innovation</text>
|
|
103
|
+
</svg>
|
|
104
|
+
\`\`\`
|
|
105
|
+
|
|
106
|
+
## Hard Rules
|
|
107
|
+
- **5 scores, every time** — partial reports are not allowed.
|
|
108
|
+
- **Evidence per score** — no "feels off" / "needs work". If you can't cite an element, the score is not justified.
|
|
109
|
+
- **Don't grade-inflate** — overall mean above 8 is suspicious.
|
|
110
|
+
- **Single-file HTML only** — no external CSS/JS. Inline everything.
|
|
111
|
+
- **Radar chart is mandatory** — gives the report a recognizable silhouette.`,
|
|
112
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../../src/designer/data/skills/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,SAAS,EAAE,WAqKrB,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
export const dashboard = {
|
|
2
|
+
name: "dashboard",
|
|
3
|
+
scenario: "design",
|
|
4
|
+
description: "Data dashboard with cards, charts, tables, and KPIs. Clean information hierarchy with grid layout.",
|
|
5
|
+
outputKind: "html",
|
|
6
|
+
workflow: `# Dashboard Skill
|
|
7
|
+
|
|
8
|
+
Produce a data dashboard as a single HTML file. Card-based layout with KPIs, charts (CSS-only or SVG), tables, and activity feeds.
|
|
9
|
+
|
|
10
|
+
## Phase 0 — Pre-flight
|
|
11
|
+
|
|
12
|
+
1. Read the design system. Dashboards work best with clean, muted systems (Linear, Notion, Vercel).
|
|
13
|
+
2. Determine: dashboard name, key metrics, sections needed.
|
|
14
|
+
3. Vocalize: "I'll build a [name] dashboard with [N] sections: [section names]."
|
|
15
|
+
|
|
16
|
+
## Phase 1 — Shell
|
|
17
|
+
|
|
18
|
+
Create \`dashboard.html\` with sidebar + main content layout:
|
|
19
|
+
|
|
20
|
+
\`\`\`html
|
|
21
|
+
<!doctype html>
|
|
22
|
+
<html lang="en">
|
|
23
|
+
<head>
|
|
24
|
+
<meta charset="utf-8">
|
|
25
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
26
|
+
<title>Dashboard</title>
|
|
27
|
+
<style>
|
|
28
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; }
|
|
29
|
+
|
|
30
|
+
:root {
|
|
31
|
+
--sidebar-w: 240px;
|
|
32
|
+
/* Design system tokens */
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body {
|
|
36
|
+
display: flex;
|
|
37
|
+
min-height: 100vh;
|
|
38
|
+
font-family: var(--font-sans);
|
|
39
|
+
background: var(--color-bg-secondary);
|
|
40
|
+
color: var(--color-text-primary);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.sidebar {
|
|
44
|
+
width: var(--sidebar-w);
|
|
45
|
+
background: var(--color-bg-primary);
|
|
46
|
+
border-right: 1px solid var(--color-border);
|
|
47
|
+
padding: 24px 16px;
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
position: sticky;
|
|
51
|
+
top: 0;
|
|
52
|
+
height: 100vh;
|
|
53
|
+
}
|
|
54
|
+
.sidebar-logo { font-size: 18px; font-weight: 700; margin-bottom: 32px; }
|
|
55
|
+
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
|
|
56
|
+
.sidebar-link {
|
|
57
|
+
padding: 8px 12px;
|
|
58
|
+
border-radius: 6px;
|
|
59
|
+
font-size: 14px;
|
|
60
|
+
color: var(--color-text-secondary);
|
|
61
|
+
text-decoration: none;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
}
|
|
64
|
+
.sidebar-link:hover, .sidebar-link.active { background: var(--color-bg-hover, rgba(0,0,0,0.04)); color: var(--color-text-primary); }
|
|
65
|
+
|
|
66
|
+
.main {
|
|
67
|
+
flex: 1;
|
|
68
|
+
padding: 32px;
|
|
69
|
+
overflow-y: auto;
|
|
70
|
+
}
|
|
71
|
+
.main-header { margin-bottom: 32px; }
|
|
72
|
+
.main-header h1 { font-size: 28px; font-weight: 700; }
|
|
73
|
+
.main-header p { color: var(--color-text-secondary); margin-top: 4px; }
|
|
74
|
+
</style>
|
|
75
|
+
</head>
|
|
76
|
+
<body>
|
|
77
|
+
<aside class="sidebar">
|
|
78
|
+
<div class="sidebar-logo">Dashboard</div>
|
|
79
|
+
<nav class="sidebar-nav">
|
|
80
|
+
<a class="sidebar-link active">Overview</a>
|
|
81
|
+
<a class="sidebar-link">Analytics</a>
|
|
82
|
+
<a class="sidebar-link">Reports</a>
|
|
83
|
+
<a class="sidebar-link">Settings</a>
|
|
84
|
+
</nav>
|
|
85
|
+
</aside>
|
|
86
|
+
<main class="main">
|
|
87
|
+
<div class="main-header">
|
|
88
|
+
<h1>Overview</h1>
|
|
89
|
+
<p>Last updated: just now</p>
|
|
90
|
+
</div>
|
|
91
|
+
<!-- Content sections here -->
|
|
92
|
+
</main>
|
|
93
|
+
</body>
|
|
94
|
+
</html>
|
|
95
|
+
\`\`\`
|
|
96
|
+
|
|
97
|
+
## Phase 2 — Component Patterns
|
|
98
|
+
|
|
99
|
+
### KPI Cards (4-up row)
|
|
100
|
+
\`\`\`css
|
|
101
|
+
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
|
|
102
|
+
.kpi-card { background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius, 8px); padding: 20px; }
|
|
103
|
+
.kpi-label { font-size: 13px; color: var(--color-text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
|
|
104
|
+
.kpi-value { font-size: 32px; font-weight: 700; margin-top: 8px; }
|
|
105
|
+
.kpi-change { font-size: 13px; margin-top: 4px; }
|
|
106
|
+
.kpi-change.up { color: var(--color-success, #30a46c); }
|
|
107
|
+
.kpi-change.down { color: var(--color-danger, #e5484d); }
|
|
108
|
+
\`\`\`
|
|
109
|
+
|
|
110
|
+
### Chart (CSS-only bar chart)
|
|
111
|
+
\`\`\`css
|
|
112
|
+
.chart-card { background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius, 8px); padding: 24px; margin-bottom: 24px; }
|
|
113
|
+
.chart-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 20px; }
|
|
114
|
+
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding-top: 8px; }
|
|
115
|
+
.bar { flex: 1; border-radius: 4px 4px 0 0; background: var(--color-accent); min-height: 4px; position: relative; transition: height 0.3s; }
|
|
116
|
+
.bar:hover { opacity: 0.8; }
|
|
117
|
+
.bar-label { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--color-text-secondary); }
|
|
118
|
+
\`\`\`
|
|
119
|
+
|
|
120
|
+
### Table
|
|
121
|
+
\`\`\`css
|
|
122
|
+
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
|
|
123
|
+
.data-table th { text-align: left; padding: 12px 16px; font-weight: 600; color: var(--color-text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--color-border); }
|
|
124
|
+
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
|
|
125
|
+
.data-table tr:hover td { background: var(--color-bg-hover, rgba(0,0,0,0.02)); }
|
|
126
|
+
\`\`\`
|
|
127
|
+
|
|
128
|
+
### Activity Feed
|
|
129
|
+
\`\`\`css
|
|
130
|
+
.activity-feed { display: flex; flex-direction: column; }
|
|
131
|
+
.activity-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
|
|
132
|
+
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); margin-top: 6px; flex-shrink: 0; }
|
|
133
|
+
.activity-content { flex: 1; }
|
|
134
|
+
.activity-text { font-size: 14px; }
|
|
135
|
+
.activity-time { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
|
|
136
|
+
\`\`\`
|
|
137
|
+
|
|
138
|
+
## Phase 3 — Layout Patterns
|
|
139
|
+
|
|
140
|
+
### Two-column main area
|
|
141
|
+
\`\`\`css
|
|
142
|
+
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
|
|
143
|
+
\`\`\`
|
|
144
|
+
|
|
145
|
+
### Responsive
|
|
146
|
+
\`\`\`css
|
|
147
|
+
@media (max-width: 1200px) {
|
|
148
|
+
.kpi-grid { grid-template-columns: repeat(2, 1fr); }
|
|
149
|
+
.dashboard-grid { grid-template-columns: 1fr; }
|
|
150
|
+
}
|
|
151
|
+
@media (max-width: 768px) {
|
|
152
|
+
.sidebar { display: none; }
|
|
153
|
+
.main { padding: 16px; }
|
|
154
|
+
.kpi-grid { grid-template-columns: 1fr; }
|
|
155
|
+
}
|
|
156
|
+
\`\`\`
|
|
157
|
+
|
|
158
|
+
## Phase 4 — Dashboard Design Rules
|
|
159
|
+
|
|
160
|
+
- Information hierarchy: KPIs → Main chart → Detail tables → Activity
|
|
161
|
+
- Use consistent card padding (24px)
|
|
162
|
+
- Numbers should be right-aligned in table columns
|
|
163
|
+
- Color code only the most important KPI change (1-2 per row max)
|
|
164
|
+
- Tables: max 6 columns, zebra striping optional, hover row highlight`,
|
|
165
|
+
};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { DesignSkill } from "./design-skill.js";
|
|
2
|
+
|
|
3
|
+
export const dashboard: DesignSkill = {
|
|
4
|
+
name: "dashboard",
|
|
5
|
+
scenario: "design",
|
|
6
|
+
description:
|
|
7
|
+
"Data dashboard with cards, charts, tables, and KPIs. Clean information hierarchy with grid layout.",
|
|
8
|
+
outputKind: "html",
|
|
9
|
+
workflow: `# Dashboard Skill
|
|
10
|
+
|
|
11
|
+
Produce a data dashboard as a single HTML file. Card-based layout with KPIs, charts (CSS-only or SVG), tables, and activity feeds.
|
|
12
|
+
|
|
13
|
+
## Phase 0 — Pre-flight
|
|
14
|
+
|
|
15
|
+
1. Read the design system. Dashboards work best with clean, muted systems (Linear, Notion, Vercel).
|
|
16
|
+
2. Determine: dashboard name, key metrics, sections needed.
|
|
17
|
+
3. Vocalize: "I'll build a [name] dashboard with [N] sections: [section names]."
|
|
18
|
+
|
|
19
|
+
## Phase 1 — Shell
|
|
20
|
+
|
|
21
|
+
Create \`dashboard.html\` with sidebar + main content layout:
|
|
22
|
+
|
|
23
|
+
\`\`\`html
|
|
24
|
+
<!doctype html>
|
|
25
|
+
<html lang="en">
|
|
26
|
+
<head>
|
|
27
|
+
<meta charset="utf-8">
|
|
28
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
29
|
+
<title>Dashboard</title>
|
|
30
|
+
<style>
|
|
31
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; }
|
|
32
|
+
|
|
33
|
+
:root {
|
|
34
|
+
--sidebar-w: 240px;
|
|
35
|
+
/* Design system tokens */
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
body {
|
|
39
|
+
display: flex;
|
|
40
|
+
min-height: 100vh;
|
|
41
|
+
font-family: var(--font-sans);
|
|
42
|
+
background: var(--color-bg-secondary);
|
|
43
|
+
color: var(--color-text-primary);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.sidebar {
|
|
47
|
+
width: var(--sidebar-w);
|
|
48
|
+
background: var(--color-bg-primary);
|
|
49
|
+
border-right: 1px solid var(--color-border);
|
|
50
|
+
padding: 24px 16px;
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
position: sticky;
|
|
54
|
+
top: 0;
|
|
55
|
+
height: 100vh;
|
|
56
|
+
}
|
|
57
|
+
.sidebar-logo { font-size: 18px; font-weight: 700; margin-bottom: 32px; }
|
|
58
|
+
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
|
|
59
|
+
.sidebar-link {
|
|
60
|
+
padding: 8px 12px;
|
|
61
|
+
border-radius: 6px;
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
color: var(--color-text-secondary);
|
|
64
|
+
text-decoration: none;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
}
|
|
67
|
+
.sidebar-link:hover, .sidebar-link.active { background: var(--color-bg-hover, rgba(0,0,0,0.04)); color: var(--color-text-primary); }
|
|
68
|
+
|
|
69
|
+
.main {
|
|
70
|
+
flex: 1;
|
|
71
|
+
padding: 32px;
|
|
72
|
+
overflow-y: auto;
|
|
73
|
+
}
|
|
74
|
+
.main-header { margin-bottom: 32px; }
|
|
75
|
+
.main-header h1 { font-size: 28px; font-weight: 700; }
|
|
76
|
+
.main-header p { color: var(--color-text-secondary); margin-top: 4px; }
|
|
77
|
+
</style>
|
|
78
|
+
</head>
|
|
79
|
+
<body>
|
|
80
|
+
<aside class="sidebar">
|
|
81
|
+
<div class="sidebar-logo">Dashboard</div>
|
|
82
|
+
<nav class="sidebar-nav">
|
|
83
|
+
<a class="sidebar-link active">Overview</a>
|
|
84
|
+
<a class="sidebar-link">Analytics</a>
|
|
85
|
+
<a class="sidebar-link">Reports</a>
|
|
86
|
+
<a class="sidebar-link">Settings</a>
|
|
87
|
+
</nav>
|
|
88
|
+
</aside>
|
|
89
|
+
<main class="main">
|
|
90
|
+
<div class="main-header">
|
|
91
|
+
<h1>Overview</h1>
|
|
92
|
+
<p>Last updated: just now</p>
|
|
93
|
+
</div>
|
|
94
|
+
<!-- Content sections here -->
|
|
95
|
+
</main>
|
|
96
|
+
</body>
|
|
97
|
+
</html>
|
|
98
|
+
\`\`\`
|
|
99
|
+
|
|
100
|
+
## Phase 2 — Component Patterns
|
|
101
|
+
|
|
102
|
+
### KPI Cards (4-up row)
|
|
103
|
+
\`\`\`css
|
|
104
|
+
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
|
|
105
|
+
.kpi-card { background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius, 8px); padding: 20px; }
|
|
106
|
+
.kpi-label { font-size: 13px; color: var(--color-text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
|
|
107
|
+
.kpi-value { font-size: 32px; font-weight: 700; margin-top: 8px; }
|
|
108
|
+
.kpi-change { font-size: 13px; margin-top: 4px; }
|
|
109
|
+
.kpi-change.up { color: var(--color-success, #30a46c); }
|
|
110
|
+
.kpi-change.down { color: var(--color-danger, #e5484d); }
|
|
111
|
+
\`\`\`
|
|
112
|
+
|
|
113
|
+
### Chart (CSS-only bar chart)
|
|
114
|
+
\`\`\`css
|
|
115
|
+
.chart-card { background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius, 8px); padding: 24px; margin-bottom: 24px; }
|
|
116
|
+
.chart-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 20px; }
|
|
117
|
+
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding-top: 8px; }
|
|
118
|
+
.bar { flex: 1; border-radius: 4px 4px 0 0; background: var(--color-accent); min-height: 4px; position: relative; transition: height 0.3s; }
|
|
119
|
+
.bar:hover { opacity: 0.8; }
|
|
120
|
+
.bar-label { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--color-text-secondary); }
|
|
121
|
+
\`\`\`
|
|
122
|
+
|
|
123
|
+
### Table
|
|
124
|
+
\`\`\`css
|
|
125
|
+
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
|
|
126
|
+
.data-table th { text-align: left; padding: 12px 16px; font-weight: 600; color: var(--color-text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--color-border); }
|
|
127
|
+
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
|
|
128
|
+
.data-table tr:hover td { background: var(--color-bg-hover, rgba(0,0,0,0.02)); }
|
|
129
|
+
\`\`\`
|
|
130
|
+
|
|
131
|
+
### Activity Feed
|
|
132
|
+
\`\`\`css
|
|
133
|
+
.activity-feed { display: flex; flex-direction: column; }
|
|
134
|
+
.activity-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
|
|
135
|
+
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); margin-top: 6px; flex-shrink: 0; }
|
|
136
|
+
.activity-content { flex: 1; }
|
|
137
|
+
.activity-text { font-size: 14px; }
|
|
138
|
+
.activity-time { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
|
|
139
|
+
\`\`\`
|
|
140
|
+
|
|
141
|
+
## Phase 3 — Layout Patterns
|
|
142
|
+
|
|
143
|
+
### Two-column main area
|
|
144
|
+
\`\`\`css
|
|
145
|
+
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
|
|
146
|
+
\`\`\`
|
|
147
|
+
|
|
148
|
+
### Responsive
|
|
149
|
+
\`\`\`css
|
|
150
|
+
@media (max-width: 1200px) {
|
|
151
|
+
.kpi-grid { grid-template-columns: repeat(2, 1fr); }
|
|
152
|
+
.dashboard-grid { grid-template-columns: 1fr; }
|
|
153
|
+
}
|
|
154
|
+
@media (max-width: 768px) {
|
|
155
|
+
.sidebar { display: none; }
|
|
156
|
+
.main { padding: 16px; }
|
|
157
|
+
.kpi-grid { grid-template-columns: 1fr; }
|
|
158
|
+
}
|
|
159
|
+
\`\`\`
|
|
160
|
+
|
|
161
|
+
## Phase 4 — Dashboard Design Rules
|
|
162
|
+
|
|
163
|
+
- Information hierarchy: KPIs → Main chart → Detail tables → Activity
|
|
164
|
+
- Use consistent card padding (24px)
|
|
165
|
+
- Numbers should be right-aligned in table columns
|
|
166
|
+
- Color code only the most important KPI change (1-2 per row max)
|
|
167
|
+
- Tables: max 6 columns, zebra striping optional, hover row highlight`,
|
|
168
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-brief.d.ts","sourceRoot":"","sources":["../../../../src/designer/data/skills/design-brief.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,WAAW,EAAE,WA6IvB,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
export const designBrief = {
|
|
2
|
+
name: "design-brief",
|
|
3
|
+
scenario: "design",
|
|
4
|
+
description: "Parse a design brief into concrete tokens. Resolves 8 design dimensions (palette, accent, typography, display, layout, mood, density, constraints) from natural language or I-Lang structured format, then generates a DESIGN.md and visual preview.",
|
|
5
|
+
outputKind: "html",
|
|
6
|
+
workflow: `# Design Brief Skill
|
|
7
|
+
|
|
8
|
+
Parse a structured or natural-language design brief into a concrete DESIGN.md and optional visual preview HTML.
|
|
9
|
+
|
|
10
|
+
## Background
|
|
11
|
+
|
|
12
|
+
This skill resolves the 8 key design dimensions that every design artifact needs, using a closed vocabulary of symbolic values that map to concrete CSS tokens. It eliminates ambiguity from vague requests like "make it clean" or "make it professional."
|
|
13
|
+
|
|
14
|
+
## Phase 1 — Accept input
|
|
15
|
+
|
|
16
|
+
The user provides a design brief in one of two formats:
|
|
17
|
+
|
|
18
|
+
### Option A: I-Lang structured brief
|
|
19
|
+
\`\`\`
|
|
20
|
+
[PLAN:@DESIGN|type=saas_landing]
|
|
21
|
+
|palette=navy_and_white|accent=coral
|
|
22
|
+
|typography=inter|display=space_grotesk
|
|
23
|
+
|layout=single_column|max_width=1200px
|
|
24
|
+
|mood=professional_minimal
|
|
25
|
+
|density=spacious|section_gap=96px
|
|
26
|
+
|hero=headline+subhead+cta
|
|
27
|
+
|sections=features,pricing,testimonials,footer
|
|
28
|
+
|exclude=animations,parallax,gradients
|
|
29
|
+
|responsive=mobile_first
|
|
30
|
+
\`\`\`
|
|
31
|
+
|
|
32
|
+
### Option B: Natural language
|
|
33
|
+
> "I need a landing page for a developer tool. Clean, minimal, dark mode. Inter font. No flashy animations."
|
|
34
|
+
|
|
35
|
+
If the user provides Option B, convert it using the mapping table below, then proceed.
|
|
36
|
+
|
|
37
|
+
### Natural language → I-Lang mapping
|
|
38
|
+
|
|
39
|
+
| Natural language phrase | Dimension | I-Lang value |
|
|
40
|
+
|------------------------|-----------|-------------|
|
|
41
|
+
| "dark mode", "dark theme" | palette | \`monochrome_dark\` |
|
|
42
|
+
| "light", "white background" | palette | \`light_clean\` |
|
|
43
|
+
| "earthy", "warm tones" | palette | \`earth_tones\` |
|
|
44
|
+
| "pop of color", "vibrant" | accent | \`electric_blue\` or \`coral\` |
|
|
45
|
+
| "subtle accent" | accent | \`muted_sage\` or \`slate\` |
|
|
46
|
+
| "clean", "minimal", "simple" | mood | \`professional_minimal\` |
|
|
47
|
+
| "playful", "fun", "friendly" | mood | \`playful\` |
|
|
48
|
+
| "bold", "brutalist", "raw" | mood | \`brutalist\` |
|
|
49
|
+
| "editorial", "magazine-like" | mood | \`editorial\` |
|
|
50
|
+
| "spacious", "lots of whitespace" | density | \`spacious\` |
|
|
51
|
+
| "compact", "dense", "information-rich" | density | \`compact\` |
|
|
52
|
+
| "Inter", "system font" | typography | \`inter\` or \`system_ui\` |
|
|
53
|
+
| "serif", "traditional" | typography | \`georgia\` or \`playfair\` |
|
|
54
|
+
| "monospace", "code-like" | typography | \`jetbrains_mono\` |
|
|
55
|
+
| "no animations", "static" | exclude | \`animations\` |
|
|
56
|
+
| "no gradients" | exclude | \`gradients\` |
|
|
57
|
+
| "single page" | layout | \`single_column\` |
|
|
58
|
+
| "two columns", "sidebar" | layout | \`two_column\` |
|
|
59
|
+
| "mobile first" | responsive | \`mobile_first\` |
|
|
60
|
+
|
|
61
|
+
## Phase 2 — Validate 8 dimensions
|
|
62
|
+
|
|
63
|
+
Every design brief must resolve these 8 dimensions. If any are missing, select sensible defaults:
|
|
64
|
+
|
|
65
|
+
| # | Dimension | Key | Example values |
|
|
66
|
+
|---|-----------|-----|---------------|
|
|
67
|
+
| 1 | Color palette | \`palette\` | navy_and_white, earth_tones, monochrome_dark, light_clean |
|
|
68
|
+
| 2 | Accent color | \`accent\` | coral, electric_blue, emerald, muted_sage, slate |
|
|
69
|
+
| 3 | Body typography | \`typography\` | inter, system_ui, dm_sans, georgia |
|
|
70
|
+
| 4 | Display typography | \`display\` | space_grotesk, clash_display, same_as_body, playfair |
|
|
71
|
+
| 5 | Layout model | \`layout\` | single_column, two_column, asymmetric |
|
|
72
|
+
| 6 | Mood | \`mood\` | professional_minimal, playful, brutalist, editorial |
|
|
73
|
+
| 7 | Density | \`density\` | compact, balanced, spacious |
|
|
74
|
+
| 8 | Constraints | \`exclude\` | animations, gradients, stock_photos, carousel |
|
|
75
|
+
|
|
76
|
+
### Symbolic → concrete token resolution
|
|
77
|
+
|
|
78
|
+
| Symbolic value | Concrete tokens |
|
|
79
|
+
|---------------|----------------|
|
|
80
|
+
| \`palette=navy_and_white\` | Background: #0F172A, Surface: #1E293B, Text: #F8FAFC, Secondary: #94A3B8 |
|
|
81
|
+
| \`palette=monochrome_dark\` | Background: #09090B, Surface: #18181B, Text: #FAFAFA, Secondary: #A1A1AA |
|
|
82
|
+
| \`palette=light_clean\` | Background: #FFFFFF, Surface: #F8FAFC, Text: #0F172A, Secondary: #64748B |
|
|
83
|
+
| \`palette=earth_tones\` | Background: #FFFBEB, Surface: #FEF3C7, Text: #451A03, Secondary: #92400E |
|
|
84
|
+
| \`accent=coral\` | Accent: #F97316, Hover: #EA580C |
|
|
85
|
+
| \`accent=electric_blue\` | Accent: #3B82F6, Hover: #2563EB |
|
|
86
|
+
| \`accent=emerald\` | Accent: #10B981, Hover: #059669 |
|
|
87
|
+
| \`accent=muted_sage\` | Accent: #84A98C, Hover: #6B8F73 |
|
|
88
|
+
| \`accent=slate\` | Accent: #64748B, Hover: #475569 |
|
|
89
|
+
| \`density=compact\` | Section spacing: 48px, Content padding: 16px/24px |
|
|
90
|
+
| \`density=balanced\` | Section spacing: 72px, Content padding: 24px/40px |
|
|
91
|
+
| \`density=spacious\` | Section spacing: 96px, Content padding: 24px/48px |
|
|
92
|
+
|
|
93
|
+
### Default resolution rules
|
|
94
|
+
|
|
95
|
+
| Unspecified dimension | Default rule |
|
|
96
|
+
|----------------------|-------------|
|
|
97
|
+
| \`palette\` | If mood=editorial → \`light_clean\`. If mood=brutalist → \`monochrome_dark\`. Else → \`light_clean\`. |
|
|
98
|
+
| \`accent\` | If palette is dark → \`coral\`. If palette is light → \`electric_blue\`. |
|
|
99
|
+
| \`typography\` | Always → \`inter\` (highest cross-platform legibility). |
|
|
100
|
+
| \`display\` | If mood=editorial → \`playfair\`. If mood=brutalist → \`space_grotesk\`. Else → \`same_as_body\`. |
|
|
101
|
+
| \`layout\` | Always → \`single_column\`. |
|
|
102
|
+
| \`mood\` | Always → \`professional_minimal\`. |
|
|
103
|
+
| \`density\` | Always → \`balanced\`. |
|
|
104
|
+
| \`exclude\` | Always → none (no constraints unless specified). |
|
|
105
|
+
|
|
106
|
+
## Phase 3 — Generate DESIGN.md
|
|
107
|
+
|
|
108
|
+
Produce a DESIGN.md with these sections:
|
|
109
|
+
1. **Visual Theme & Atmosphere** — mood, feel, references
|
|
110
|
+
2. **Color Palette & Roles** — background, surface, text, accent, semantic colors
|
|
111
|
+
3. **Typography Rules** — display, body, mono font specs with sizes
|
|
112
|
+
4. **Component Stylings** — buttons, cards, inputs with concrete CSS values
|
|
113
|
+
5. **Layout Principles** — max width, grid, section spacing, content padding
|
|
114
|
+
6. **Depth & Elevation** — shadows, borders
|
|
115
|
+
7. **Do's and Don'ts** — 5-6 rules for agents
|
|
116
|
+
8. **Responsive Behavior** — breakpoints at 640px, 768px, 1024px, 1280px
|
|
117
|
+
9. **Agent Prompt Guide** — constraints for code generation
|
|
118
|
+
|
|
119
|
+
All color hex values, font stacks, and spacing values must come from the resolved tokens in Phase 2 — do not invent values.
|
|
120
|
+
|
|
121
|
+
## Phase 4 — Generate brief-preview.html
|
|
122
|
+
|
|
123
|
+
Create a single HTML file visualizing the resolved tokens with 4 sections:
|
|
124
|
+
1. **Color palette swatches** — labeled with role and hex code
|
|
125
|
+
2. **Typography specimens** — Display, Body, and Mono at declared sizes
|
|
126
|
+
3. **Spacing ruler** — section spacing and content padding, labeled
|
|
127
|
+
4. **Component preview** — 2-3 live components (button, card, input) using the resolved tokens
|
|
128
|
+
|
|
129
|
+
Style the preview itself with the resolved design system tokens.
|
|
130
|
+
|
|
131
|
+
## Phase 5 — Report defaults applied
|
|
132
|
+
|
|
133
|
+
List any dimensions the user did not specify and the defaults applied:
|
|
134
|
+
\`\`\`
|
|
135
|
+
Dimensions resolved from defaults:
|
|
136
|
+
- display: set to "same_as_body" (rule: mood=professional_minimal → same_as_body)
|
|
137
|
+
- density: set to "balanced" (rule: no spacing preference given)
|
|
138
|
+
\`\`\`
|
|
139
|
+
|
|
140
|
+
This transparency prevents silent assumptions from propagating into the final design.`,
|
|
141
|
+
};
|