data-vizard 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.claude-plugin/marketplace.json +30 -0
  3. package/LICENSE +21 -0
  4. package/README.md +83 -0
  5. package/bin/data-vizard.js +361 -1
  6. package/package.json +31 -10
  7. package/plugins/data-vizard/.claude-plugin/plugin.json +20 -0
  8. package/plugins/data-vizard/.codex-plugin/plugin.json +36 -0
  9. package/plugins/data-vizard/README.md +146 -0
  10. package/plugins/data-vizard/skills/data-analyst/SKILL.md +63 -0
  11. package/plugins/data-vizard/skills/data-analyst/agents/openai.yaml +4 -0
  12. package/plugins/data-vizard/skills/data-analyst/references/analysis-playbook.md +30 -0
  13. package/plugins/data-vizard/skills/data-curator/SKILL.md +67 -0
  14. package/plugins/data-vizard/skills/data-curator/agents/openai.yaml +4 -0
  15. package/plugins/data-vizard/skills/data-curator/references/dataset-intake-checklist.md +34 -0
  16. package/plugins/data-vizard/skills/data-vizard/SKILL.md +137 -0
  17. package/plugins/data-vizard/skills/data-vizard/agents/openai.yaml +4 -0
  18. package/plugins/data-vizard/skills/data-vizard/references/workflow-map.md +60 -0
  19. package/plugins/data-vizard/skills/designer/SKILL.md +107 -0
  20. package/plugins/data-vizard/skills/designer/agents/openai.yaml +4 -0
  21. package/plugins/data-vizard/skills/designer/assets/html-starter/index.html +95 -0
  22. package/plugins/data-vizard/skills/designer/references/style-directions.md +40 -0
  23. package/plugins/data-vizard/skills/narrator/SKILL.md +62 -0
  24. package/plugins/data-vizard/skills/narrator/agents/openai.yaml +4 -0
  25. package/plugins/data-vizard/skills/narrator/references/anti-ai-tropes.md +43 -0
  26. package/plugins/data-vizard/skills/narrator/references/story-structures.md +29 -0
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: designer
3
+ description: Design and produce HTML-based data visualization artifacts with chart choice, visual encoding, layout, accessibility, interaction, and motion design guidance. Use when the user needs visual directions, style options, chart/interface decisions, motion behavior, or a self-contained HTML visualization built from a curated dataset and narrative brief.
4
+ ---
5
+
6
+ # Designer
7
+
8
+ ## Overview
9
+
10
+ Create the visual and interactive form of the data story. The default final output is a self-contained HTML artifact unless the user asks for a different web stack.
11
+
12
+ ## Core Rule
13
+
14
+ Do not choose the final chart type, style family, layout, color system, interaction model, or motion behavior without consulting the user. Offer options and ask the user to choose. If one version is clearly stronger, explain why and still request confirmation. Ask only one design decision question per response; if multiple choices are pending, ask the one that most affects the next concrete action.
15
+
16
+ ## Button-Ready Choices
17
+
18
+ Present one design decision at a time in this strict format:
19
+
20
+ ```text
21
+ Choose one:
22
+ A. Short option label - one sentence explaining the tradeoff.
23
+ B. Short option label - one sentence explaining the tradeoff.
24
+ C. Short option label - one sentence explaining the tradeoff.
25
+ ```
26
+
27
+ Use no more than four options unless the user asks for a broader menu. Include `D. Something else - describe the visual direction you want.` when the user may want a custom path. Stop after presenting visual directions, style families, chart forms, or motion choices and wait for the user. Do not include a second `Choose one:` block in the same response.
28
+
29
+ ## Workflow
30
+
31
+ 1. Confirm inputs.
32
+ Ask for or review the curated dataset, Analyst story direction, Narrator story brief, project-local `outcome/<project-name>/PRODUCT.md`, audience, target device, and workshop constraints. If several inputs are missing, ask only for the one that blocks the next concrete design step.
33
+
34
+ Before proposing visual directions, ask for either the intended viewer type or a visual reference only when it is the most important missing input. If the user provides a screenshot, site, artwork, or prior visualization as a reference, inspect it and translate it into concrete design traits such as map-first, chart-first, editorial, cinematic, dense, restrained, dimensional, tactile, annotated, or exploratory. Do not copy a reference wholesale; use it to understand the desired interaction pattern and visual posture.
35
+
36
+ For map-led artifacts, ask the user to choose or confirm the map theme before implementation. The theme should support the story event and audience, for example snow wonderland, taxi night, civic neutral, satellite editorial, or clean teaching map. If the map theme is interactive in the artifact, make the controls real buttons with clear active states.
37
+
38
+ For map-led narratives, also confirm the map reading level and focus behavior before building, but do so as a separate one-question decision gate. Ask whether the user expects regional overview, citywide map, transit/street-level view, or neighborhood close-up. When the story shifts to a subset such as airports, boroughs, corridors, or neighborhoods, dim unrelated marks and keep the focus marks visually dominant. Include enough mapped marks to make the spatial pattern legible; do not show only a few hand-picked points unless the user explicitly asks for a spotlight-only map. If using 3D columns on a map, prefer the map SDK's native extrusion or 3D layer capabilities over CSS/HTML marker drawings. Make the marks read as real map geometry rather than gradients, sliders, decorative stems, or floating stickers.
39
+
40
+ Decide whether color means category, magnitude, or narrative focus. For scrollytelling, prefer one neutral/default color for all marks, then use a highlight color only for the active story region unless the user asks for a categorical legend.
41
+
42
+ If the user expects a real map, use an actual map SDK or tile source for the basemap and clearly separate data overlays from basemap features. Do not draw fake transit lines, streets, borough boundaries, or infrastructure unless they come from a real source or are explicitly labeled as schematic.
43
+
44
+ For country maps, use boundary sources and visual treatments that align with the country's official sovereignty position and avoid disputed-boundary surprises from generic global map providers. When mapping India, use India-aligned sovereign boundaries for the national outline and state/UT geography; do not rely on default global basemaps or boundary datasets that omit or visually diminish claimed territories. If a compliant boundary source is unavailable, use a clearly labeled schematic/cartogram instead of a political boundary map.
45
+
46
+ 2. Offer visual directions.
47
+ Present two or three distinct button-ready options with chart form, layout, interaction, motion approach, strengths, and risks.
48
+
49
+ When visual judgment matters, create a small browser-viewable option board or rough HTML prototype under `outcome/<project-name>/options.html`. Open it in the browser when available, show the user the visual options, and ask them to choose using the same button-ready format. Keep the option board lightweight and disposable unless the user asks to preserve it.
50
+
51
+ 3. Ask the user to choose.
52
+ Do not implement until the user selects a direction or asks for variants.
53
+
54
+ 4. Design the artifact.
55
+ Plan chart encodings, hierarchy, annotations, responsive layout, accessibility, color, typography, axis/legend/label attachment, chart hover/focus/selected states, and motion.
56
+
57
+ 5. Build HTML.
58
+ Prefer a single HTML file with embedded CSS and JavaScript. Use vanilla HTML/CSS/JS unless the requested interaction needs a framework. Keep data loading simple and reproducible.
59
+
60
+ 6. Verify the result.
61
+ Open or render the artifact when possible. Check that it is nonblank, readable, responsive, accessible enough for workshop use, faithful to the selected story, that every axis label, tick label, legend, and unit is visibly attached to the marks or plot it describes, and that chart hover/focus states reveal the expected values without layout shift.
62
+
63
+ 7. Add page metadata and identity.
64
+ For HTML artifacts, include a specific `<title>`, meta description, canonical URL when known, Open Graph/Twitter tags, theme color, and a relevant favicon. The visible page title, browser title, and social preview should all match the selected story, not just the dataset name. If no brand asset exists, create a small SVG favicon inside `outcome/<project-name>/`.
65
+
66
+ 8. Store the outcome.
67
+ Save final HTML artifacts under `outcome/<project-name>/`, using `index.html` for the primary artifact. Keep presentation-specific assets such as favicons, images, map tiles, or tiny embedded display data in that same folder when needed. Keep source snapshots, reusable curated datasets, and analysis-ready tables under `data/<project-name>/`.
68
+
69
+ ## Style Families
70
+
71
+ Use style families to avoid repetitive outputs. Present relevant options and let the user choose.
72
+
73
+ - Editorial: publication-like hierarchy, clear annotations, restrained polish.
74
+ - Dashboard: dense, filterable, comparison-heavy, operational.
75
+ - Scrollytelling: progressive sections, guided reveal, motion used with restraint.
76
+ - Studio: expressive composition, stronger visual personality, custom interactions.
77
+ - Teaching: simple, explicit, annotated for explaining the data-vis process.
78
+
79
+ ## Axis And Label Attachment Rules
80
+
81
+ Axes, tick labels, legends, captions, units, and time labels must be visually scoped to the chart, plot area, row, column, or mark set they describe. A reader should be able to answer "what does this label belong to?" from proximity, alignment, grouping, or direct connection without guessing.
82
+
83
+ Do not place shared axis labels or year labels in detached footers unless they are physically attached and aligned to a single plot area. In matrices, dashboards, tables of sparklines, small multiples, or repeated chart rows, prefer per-cell mini axes, direct labels, column headers, or sticky guides that remain visually connected to the relevant marks. Avoid orphaned labels below a matrix or card when they could describe more than one chart.
84
+
85
+ When a chart omits an axis for compactness, replace it with an explicit local cue such as a date range, endpoint labels, direct data labels, a legend label, or a detail tooltip. During verification, scan the rendered artifact at desktop and mobile sizes and remove or relocate any label that feels decorative, random, or disconnected from a specific encoded value.
86
+
87
+ ## Chart Interaction Rules
88
+
89
+ Charts must not ship as static-looking marks when the surrounding artifact is interactive. For every chart, matrix, heatmap, sparkline, map overlay, or dense visual mark set, define the expected default, hover, focus where practical, active or selected, and disabled or missing-data states.
90
+
91
+ Hover and focus states should change the actual mark affordance, such as stroke, outline, point radius, bar border, row emphasis, crosshair, or guide line, and should expose a visible tooltip or detail readout by default. Do not rely only on the browser's native SVG `<title>` tooltip for primary chart interactions. The tooltip or readout should name the entity, period, value, unit, and uncertainty or caveat when relevant.
92
+
93
+ For dense dashboards, make hit targets forgiving without distorting the encoded values. Use transparent overlays, Voronoi-like hit areas, or cell-level targets when tiny marks would be hard to hover. Keep selected states visually distinct from hover states so readers can tell what is currently chosen after the pointer leaves.
94
+
95
+ For touch or keyboard-heavy contexts, provide an equivalent click, selected detail panel, table fallback, or keyboard-focus path with the same value details as the hover tooltip. If a hover-only state is intentionally lightweight, ensure the same data is still available through visible labels, detail panels, or accessible text.
96
+
97
+ ## Motion Design Rules
98
+
99
+ Use motion to explain change, guide attention, or reveal sequence. Avoid decorative animation that distracts from data. Respect reduced-motion preferences in CSS and provide a static reading path.
100
+
101
+ For chart and map transitions, animate the data encoding itself rather than only fading colors or swapping states. When a mark changes meaning between narrative steps, preserve its spatial footprint and interpolate the relevant dimensions, bases, filters, or scales so the viewer can see what changed. For stacked bars, columns, and extrusions, grow or shrink segments from the correct edge and let one segment replace another only where the represented quantity changes; do not rely on opacity tricks that obscure whether values are stacked, nested, or merely highlighted.
102
+
103
+ For scrollytelling charts, prefer scroll-progress-driven transitions when the user is comparing before/after states. A card entering view can drive progress from 0 to 1: at 0 the chart should show the previous state, at 1 it should show the new state, and in between the marks should smoothly transform through valid intermediate values. Use binary threshold transitions only when the state change is categorical and not meaningfully interpolable.
104
+
105
+ ## Reference
106
+
107
+ Read `references/style-directions.md` when proposing visual options, choosing motion behavior, or deciding how to map a narrative brief into an HTML artifact. Use `assets/html-starter/index.html` as a lightweight starting point when a plain HTML artifact is appropriate.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Designer"
3
+ short_description: "Create HTML data visualization artifacts"
4
+ default_prompt: "Use $designer to propose visual directions and build a self-contained HTML data visualization artifact."
@@ -0,0 +1,95 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Data Vizard Artifact</title>
7
+ <style>
8
+ :root {
9
+ color-scheme: light;
10
+ --bg: #f8fafc;
11
+ --ink: #172033;
12
+ --muted: #5b677a;
13
+ --line: #d8dee8;
14
+ --accent: #2563eb;
15
+ --panel: #ffffff;
16
+ }
17
+
18
+ * {
19
+ box-sizing: border-box;
20
+ }
21
+
22
+ body {
23
+ margin: 0;
24
+ background: var(--bg);
25
+ color: var(--ink);
26
+ font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
27
+ }
28
+
29
+ main {
30
+ width: min(1120px, calc(100% - 32px));
31
+ margin: 0 auto;
32
+ padding: 40px 0;
33
+ }
34
+
35
+ header {
36
+ max-width: 760px;
37
+ margin-bottom: 28px;
38
+ }
39
+
40
+ h1 {
41
+ margin: 0 0 8px;
42
+ font-size: clamp(2rem, 5vw, 4rem);
43
+ line-height: 1;
44
+ letter-spacing: 0;
45
+ }
46
+
47
+ .subtitle {
48
+ margin: 0;
49
+ color: var(--muted);
50
+ font-size: 1.08rem;
51
+ }
52
+
53
+ .viz-shell {
54
+ background: var(--panel);
55
+ border: 1px solid var(--line);
56
+ border-radius: 8px;
57
+ padding: 20px;
58
+ }
59
+
60
+ .chart {
61
+ min-height: 420px;
62
+ display: grid;
63
+ place-items: center;
64
+ border: 1px dashed var(--line);
65
+ color: var(--muted);
66
+ }
67
+
68
+ @media (prefers-reduced-motion: reduce) {
69
+ *,
70
+ *::before,
71
+ *::after {
72
+ animation-duration: 0.01ms !important;
73
+ animation-iteration-count: 1 !important;
74
+ scroll-behavior: auto !important;
75
+ transition-duration: 0.01ms !important;
76
+ }
77
+ }
78
+ </style>
79
+ </head>
80
+ <body>
81
+ <main>
82
+ <header>
83
+ <h1>Data Vizard Artifact</h1>
84
+ <p class="subtitle">Replace this starter with the selected story, visual direction, and data.</p>
85
+ </header>
86
+ <section class="viz-shell" aria-label="Data visualization">
87
+ <div class="chart" id="chart">Visualization goes here.</div>
88
+ </section>
89
+ </main>
90
+ <script>
91
+ const chart = document.querySelector("#chart");
92
+ chart.textContent = "Ready for data.";
93
+ </script>
94
+ </body>
95
+ </html>
@@ -0,0 +1,40 @@
1
+ # Style Directions
2
+
3
+ ## Editorial
4
+
5
+ Use for public-facing stories, reports, and explanatory pieces. Favor strong hierarchy, careful typography, whitespace, direct labels, and annotations.
6
+
7
+ ## Dashboard
8
+
9
+ Use for comparison, monitoring, filtering, or repeated use. Favor compact controls, consistent scales, scannable summaries, and clear empty/loading/error states.
10
+
11
+ Dense dashboard marks need explicit hover and selected states. Sparklines, heatmap cells, tiny bars, and map marks should expose a visible tooltip or detail readout with entity, period, value, unit, and any relevant caveat. Use forgiving hit targets so small marks are not frustrating to inspect.
12
+
13
+ Axis labels, year ticks, legends, and units must stay visibly attached to the chart area or matrix cell they describe. In sparkline tables, small multiples, and dense rows, prefer per-cell mini axes, directly labeled endpoints, or column/header guides that align with the marks. Avoid detached footer labels that could feel random or apply to multiple unrelated charts.
14
+
15
+ ## Scrollytelling
16
+
17
+ Use when the story benefits from a guided sequence. Favor sections, progressive reveal, sticky charts, and restrained transitions.
18
+
19
+ When a sticky chart compares two states, let scroll progress drive the visual interpolation whenever possible. The chart should show the prior state before the card arrives, the new state when the card is fully in view, and valid in-between geometry during the scroll. This is especially important for bars, columns, stacked segments, map extrusions, and other area/height encodings where a sudden color swap can misstate the relationship.
20
+
21
+ ## Studio
22
+
23
+ Use when the brief allows expressive form. Favor memorable composition, richer interaction, and bespoke layout while preserving legibility.
24
+
25
+ ## Teaching
26
+
27
+ Use for workshop explanation. Favor simple encodings, visible steps, annotations, and language that names the design reasoning.
28
+
29
+ ## Motion
30
+
31
+ Motion should support:
32
+
33
+ - Change over time
34
+ - Focus transitions
35
+ - Step-by-step reveal
36
+ - Comparison between states
37
+
38
+ Always include a reduced-motion path and avoid loops that compete with reading.
39
+
40
+ Animate chart marks according to their semantic change: heights change by changing height, stacked segments change by moving the segment boundary, and focus changes by filtering or dimming marks without changing the underlying quantity. Avoid using opacity alone to force visibility when the real issue is stacking order, footprint, baseline, or scale.
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: narrator
3
+ description: Structure the language, sequence, framing, titles, annotations, claims, caveats, and audience-facing story for a data visualization after an analytical direction has been selected. Use when the user needs to turn Data Analyst findings into a clear visualization narrative, storyboard, explanatory copy, slide-like sections, or annotation plan.
4
+ ---
5
+
6
+ # Narrator
7
+
8
+ ## Overview
9
+
10
+ Turn a selected analytical direction into a clear visualization story. Narrator is a language and structure skill: it shapes meaning, sequence, and audience understanding without inventing unsupported claims.
11
+
12
+ ## Core Rule
13
+
14
+ Do not choose the story direction before the user has selected one. Do not add claims that Data Analyst has not supported. Ask the user before choosing audience tone, narrative frame, title direction, or section structure. Ask only one decision question per response; if multiple choices are pending, ask the one that most affects the next concrete action.
15
+
16
+ ## Button-Ready Choices
17
+
18
+ Present one narrative decision at a time in this strict format:
19
+
20
+ ```text
21
+ Choose one:
22
+ A. Short option label - one sentence explaining the tradeoff.
23
+ B. Short option label - one sentence explaining the tradeoff.
24
+ C. Short option label - one sentence explaining the tradeoff.
25
+ ```
26
+
27
+ Use no more than four options unless the user asks for a broader menu. Include `D. Something else - describe the tone, frame, or structure you want.` when the user may want a custom path. Stop after presenting choices and wait for the user. Do not include a second `Choose one:` block in the same response.
28
+
29
+ ## Workflow
30
+
31
+ 1. Confirm the chosen analytical direction.
32
+ Ask only which Analyst candidate the user wants to pursue first. Ask about audience in a later turn if it is still needed.
33
+
34
+ 2. Select a narrative frame with the user.
35
+ Offer two or three button-ready frames such as explanatory, investigative, comparative, cautionary, teaching-oriented, or call-to-action.
36
+
37
+ 3. Build the story spine.
38
+ Draft the opening question, key observation, supporting sequence, turning point, caveat, and takeaway.
39
+
40
+ For stories centered on one specific event, day, place, or threshold, make that event the narrative anchor. Do not split the opening across multiple competing labels, tooltips, or section titles that restate the same idea. Merge duplicate framing into one clear opening beat.
41
+
42
+ 4. Draft visualization language.
43
+ Create title options, subtitle, section headers, annotations, tooltip language, captions, and caveat copy.
44
+
45
+ 5. Run an anti-trope edit.
46
+ Remove common AI writing habits before showing copy to the user or handing it to Designer. Prefer concrete nouns, active verbs, specific evidence, and human editorial rhythm. Read `references/anti-ai-tropes.md` when writing or revising visible copy.
47
+
48
+ 6. Ask for approval and revision.
49
+ Let the user choose tone and emphasis with button-ready choices before handing off to Designer.
50
+
51
+ 7. Handoff to Designer.
52
+ Provide a concise story brief: audience, main claim, evidence sequence, annotation priorities, caveats, and any language that must appear in the HTML artifact.
53
+
54
+ ## Boundaries
55
+
56
+ - Do not clean, join, or supplement data.
57
+ - Do not perform primary analysis unless checking whether a phrase is supported.
58
+ - Do not prescribe final visual style; suggest narrative needs that Designer should consider.
59
+
60
+ ## Reference
61
+
62
+ Read `references/story-structures.md` when choosing a narrative frame, writing annotations, or preparing a storyboard. Read `references/anti-ai-tropes.md` before finalizing visible titles, subtitles, section copy, annotations, or caveats.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Narrator"
3
+ short_description: "Shape the visualization story and language"
4
+ default_prompt: "Use $narrator to turn my selected data insight into a clear visualization story."
@@ -0,0 +1,43 @@
1
+ # Anti-AI Writing Pass
2
+
3
+ Run this pass before handing visualization copy to the user or Designer.
4
+
5
+ ## Cut These Habits
6
+
7
+ - Generic openings: "In today's world", "In an era where", "As cities continue to..."
8
+ - Over-signposting: "Let's dive in", "It is important to note", "This highlights", "This underscores"
9
+ - Inflated verbs: "delve", "unlock", "leverage", "utilize", "showcase", "illuminate"
10
+ - Vague stakes: "matters now more than ever", "critical insights", "a powerful reminder"
11
+ - Robotic contrast: "not only... but also..." unless it is genuinely the cleanest sentence
12
+ - Decorative drama: "tells a story of resilience", "paints a picture", "reveals a tapestry"
13
+ - Empty conclusions: "Only time will tell", "the data speaks for itself"
14
+ - Repeated sentence scaffolds: "This is not just X. It is Y."
15
+
16
+ ## Prefer This Instead
17
+
18
+ - Start with the concrete event, number, place, or question.
19
+ - Use short sentences near important claims.
20
+ - Put caveats close to the claims they qualify.
21
+ - Replace abstract nouns with visible specifics.
22
+ - Let the data carry force; do not add theatrical emphasis.
23
+ - Use one strong metaphor at most, and only if it clarifies the chart.
24
+
25
+ ## Rewrite Examples
26
+
27
+ Instead of:
28
+ "This chart highlights the critical impact of snow on urban mobility."
29
+
30
+ Use:
31
+ "On January 25, yellow taxi pickups fell to 43,563, the lowest daily count in the month."
32
+
33
+ Instead of:
34
+ "The data reveals a complex tapestry of mobility patterns across the city."
35
+
36
+ Use:
37
+ "Airport pickups collapsed; a few neighborhood zones held steadier."
38
+
39
+ Instead of:
40
+ "This is not just a story about weather, but also about how cities move."
41
+
42
+ Use:
43
+ "The snow changed where taxi service held up and where it broke down."
@@ -0,0 +1,29 @@
1
+ # Story Structures
2
+
3
+ ## Common Frames
4
+
5
+ - Explanatory: "Here is what changed, and why it matters."
6
+ - Comparative: "These groups look similar until one key measure separates them."
7
+ - Investigative: "We expected one pattern, but the data points elsewhere."
8
+ - Cautionary: "The headline number hides an important caveat."
9
+ - Teaching: "Follow this sequence to understand how the pattern emerges."
10
+ - Action-oriented: "This evidence suggests where attention should go next."
11
+
12
+ ## Story Spine
13
+
14
+ - Opening question
15
+ - Context the audience needs
16
+ - Main observation
17
+ - Supporting evidence
18
+ - Contrast or turning point
19
+ - Caveat
20
+ - Takeaway
21
+
22
+ ## Copy Elements
23
+
24
+ - Title: clear, specific, and supported by data
25
+ - Subtitle: adds context, timeframe, or caveat
26
+ - Section headers: advance the story
27
+ - Annotations: point to evidence, not decoration
28
+ - Tooltips: explain values and definitions
29
+ - Caveats: visible near the claim they qualify