@ggts-sh/skill 0.43.1 → 0.43.2
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/SKILL.md
CHANGED
|
@@ -21,9 +21,15 @@ and Svelte adapters. A chart spec carries the same grammar between surfaces.
|
|
|
21
21
|
4. In every agent sandbox, install `@ggts-sh/cli` and `@ggts-sh/skill`
|
|
22
22
|
at matching local versions and keep the lockfile. Expose
|
|
23
23
|
the installed skill to the agent, refreshing any copied skill on upgrades.
|
|
24
|
-
Run `ggts check chart.json`, apply relevant diagnostics, then
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
Run `ggts check chart.json`, apply relevant diagnostics, then render at the
|
|
25
|
+
intended final width and height with
|
|
26
|
+
`ggts render chart.json --width W --height H > chart.svg` and inspect that
|
|
27
|
+
SVG. Re-render and visually inspect after every width, layout, or theme
|
|
28
|
+
change, including responsive reflow: label wrapping, rotation, thinning,
|
|
29
|
+
temporal ticks, and legend placement are width-dependent. Apply the ≤480px
|
|
30
|
+
viewport and <320px panel rules at that final size. Headless SVG cannot
|
|
31
|
+
validate tooltip content; hover and pin in a browser. A local npm install
|
|
32
|
+
exposes these commands through `npm exec -- ggts`.
|
|
27
33
|
|
|
28
34
|
## Registration (call these)
|
|
29
35
|
|
|
@@ -187,7 +193,7 @@ or linked-view code.
|
|
|
187
193
|
[themes.md](references/themes.md) (every product theme name, shells,
|
|
188
194
|
role overrides),
|
|
189
195
|
[composition-surfaces.md](references/composition-surfaces.md) (coords,
|
|
190
|
-
facets, guides, merge semantics),
|
|
196
|
+
facets, multi-chart layout, guides, labs, merge semantics),
|
|
191
197
|
[interactions.md](references/interactions.md) (tooltips, selection, linking),
|
|
192
198
|
[recipes.md](references/recipes.md) (long-tail chart recipes).
|
|
193
199
|
Registration calls live in the [registration reference](references/registration.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggts-sh/skill",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.2",
|
|
4
4
|
"description": "Agent skill for the shared grammar of graphics: TypeScript, React, Svelte, portable JSON, and the ggts check/render feedback loop. Versions with all framework adapters.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-skill",
|
|
@@ -102,6 +102,20 @@ with `facet-form-missing`.
|
|
|
102
102
|
(left/right strips take layout space rather than overlaying the panel);
|
|
103
103
|
`show` (default true) — set false when direct labels are authored elsewhere.
|
|
104
104
|
|
|
105
|
+
## Multi-chart layout review
|
|
106
|
+
|
|
107
|
+
Allocate space by chart density and comparison relationships when composing
|
|
108
|
+
independent charts into a dashboard:
|
|
109
|
+
|
|
110
|
+
- Give dense time series and long-category charts a full-width or otherwise
|
|
111
|
+
spacious panel instead of forcing every chart into a 2×2 grid.
|
|
112
|
+
- Choose panel spans from density and which charts readers compare. Repetition
|
|
113
|
+
of an appropriate encoding across panels is not a defect.
|
|
114
|
+
- Align shared label gutters and keep heights matched within a comparison row;
|
|
115
|
+
mismatched fixed heights distort visual comparisons.
|
|
116
|
+
- Inspect the whole dashboard and each chart at its final rendered size.
|
|
117
|
+
Repeat both inspections after resizing or responsive reflow.
|
|
118
|
+
|
|
105
119
|
## Guides, legend, labs
|
|
106
120
|
|
|
107
121
|
Guides are keyed by aesthetic channel: `x`, `y`, `color`, `fill`, `size`,
|
|
@@ -113,13 +127,35 @@ channel). `<GuideLegend channel="color" position="bottom"/>` assembles
|
|
|
113
127
|
`guides: {"color": {"type": "legend", "position": "bottom"}}`.
|
|
114
128
|
|
|
115
129
|
- Top-level `guides` override a scale-local `guide`.
|
|
116
|
-
- Shared options: `title`, `theme`
|
|
117
|
-
|
|
118
|
-
`
|
|
119
|
-
|
|
130
|
+
- Shared options: `title`, `theme`, `collision`; non-position guides add
|
|
131
|
+
integer `order` (placement rank), `position` `"auto"|"right"|"bottom"`,
|
|
132
|
+
`direction` `"auto"|"vertical"|"horizontal"`, and `force` (show a guide
|
|
133
|
+
suppressed by default, e.g. identity scales).
|
|
134
|
+
- Axis `collision`: on a horizontal band `x` axis, `auto` uses measured
|
|
135
|
+
band-label escalation and `ellipsis` forces single-line labels truncated to
|
|
136
|
+
fit. `preserve` keeps full single-line labels on either axis even when they
|
|
137
|
+
overlap or overflow. Setting any explicit collision value drops a scale-local
|
|
138
|
+
band guide pin; omitting `collision` leaves that pin in place, so the default
|
|
139
|
+
`auto` behavior does not override it. A `y` axis `ellipsis` value does not
|
|
140
|
+
select a separate band-collision path.
|
|
141
|
+
- `GuideThemeSpec` bounds one guide's presentation:
|
|
142
|
+
|
|
143
|
+
| Option | Range | Controls |
|
|
144
|
+
| ------------------- | ------ | ------------------------------- |
|
|
145
|
+
| `titleSize` | 8–32 | Guide title font size |
|
|
146
|
+
| `labelSize` | 8–24 | Guide label font size |
|
|
147
|
+
| `keyGap` | 0–32 | Gap between a key and its label |
|
|
148
|
+
| `rowGap` | 0–32 | Gap between legend rows |
|
|
149
|
+
| `blockGap` | 0–64 | Gap between guide blocks |
|
|
150
|
+
| `colorbarThickness` | 4–48 | Colorbar thickness |
|
|
151
|
+
| `colorbarLength` | 48–512 | Colorbar length |
|
|
152
|
+
|
|
120
153
|
- Responsive rule: `auto`-positioned non-position guides move below the panel
|
|
121
154
|
when the viewport is 480px wide or less, or when a right guide would leave
|
|
122
155
|
under 320px of panel (after an estimated 80px of other chrome).
|
|
156
|
+
- For long legends, shorten series names, remove redundant guide titles, use
|
|
157
|
+
direct labels where practical, or reduce the series/small-multiple structure.
|
|
158
|
+
Keep labels readable; change the content or layout before shrinking text.
|
|
123
159
|
- `<Legend order="stable-domain"|"present-first-seen"|"sorted"/>` is the
|
|
124
160
|
plot-wide legend ENTRY-SORT enum (default `stable-domain`; ordering never
|
|
125
161
|
changes color assignments). Distinct from `<GuideLegend order={2}/>`, a
|
|
@@ -127,6 +163,12 @@ channel). `<GuideLegend channel="color" position="bottom"/>` assembles
|
|
|
127
163
|
- `Labs` takes flat string props: `title`, `subtitle`, `caption`, `x`, `y`,
|
|
128
164
|
`color`, `fill`, `size`, `linewidth`, `alpha`, `shape`, `linetype`. The
|
|
129
165
|
spec type is re-exported from `@ggts-sh/svelte` as `LabsSpec`.
|
|
166
|
+
Give each text field one role: title carries the chart's message or subject;
|
|
167
|
+
optional subtitle carries measure, scope, period, or units; caption carries
|
|
168
|
+
only a unique source or caveat. Keep adjacent disclosures, axis titles,
|
|
169
|
+
subtitle content, and hedging prose out of the caption. Default tooltips and
|
|
170
|
+
humanized axis/legend titles also read from `labs`, so concise field labels
|
|
171
|
+
improve both chart chrome and tooltip content.
|
|
130
172
|
|
|
131
173
|
```svelte fragment
|
|
132
174
|
<GGPlot
|
|
@@ -19,6 +19,13 @@ params from `GEOM_PARAM_KEYS` — do not hand-edit `packages/svelte/src/lib/geom
|
|
|
19
19
|
/>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
`color` and `fill` are aesthetics, not geom `params` keys or direct component
|
|
23
|
+
props. Use the canonical constant form, for example
|
|
24
|
+
`aes: { fill: { value: "#0072B2" } }` in JSON or
|
|
25
|
+
`aes={{ fill: { value: "#0072B2" } }}` on a component. Map a column of raw hex
|
|
26
|
+
values only when the colors vary with the data; a repeated column adds an
|
|
27
|
+
unnecessary identity mapping when a constant aesthetic would suffice.
|
|
28
|
+
|
|
22
29
|
Omit `stat`/`position` to get the geom's defaults (normalize fills them in). Each layer
|
|
23
30
|
declaration allows only its own stat and position values — anything else is a schema error.
|
|
24
31
|
|
|
@@ -52,6 +52,33 @@ events use semantic values.
|
|
|
52
52
|
"scales": { "x": { "type": "linear", "transform": "log10", "limits": [1, 1000] } }
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
Band axes also accept a scale-local `guide` with `mode`, `angle`, and `wrap`:
|
|
56
|
+
|
|
57
|
+
```json fragment
|
|
58
|
+
"scales": {
|
|
59
|
+
"x": {
|
|
60
|
+
"type": "band",
|
|
61
|
+
"guide": { "mode": "auto", "angle": -45, "wrap": 2 }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
- `mode`: `auto` (default), `single`, `wrap`, `rotate`, or `off` (hide labels).
|
|
67
|
+
On a horizontal band axis, auto escalates from single-line labels to wrapping,
|
|
68
|
+
wrap-then-rotate, full-string rotation, truncation, and label thinning; if
|
|
69
|
+
labels still cannot fit, layout can warn about overlap or margin overflow.
|
|
70
|
+
An explicit mode pins that presentation instead of auto-escalating. On a
|
|
71
|
+
vertical band axis (native `y`, or categorical `x` after `coord_flip`), only
|
|
72
|
+
`off` changes label visibility; the other modes use the legacy vertical path.
|
|
73
|
+
- `angle`: rotation in degrees, normalized to −90…0 (positive values mirror to
|
|
74
|
+
negative). It sets the angle for horizontal `rotate`; in `auto`, the
|
|
75
|
+
wrap-then-rotate stage can still choose −45°, so use `mode: "rotate"` when
|
|
76
|
+
the angle must be enforced.
|
|
77
|
+
- `wrap`: maximum wrapped lines on a horizontal band axis, from 1–8 (default 2).
|
|
78
|
+
|
|
79
|
+
The top-level axis guide's `collision` policy can override this layout; see
|
|
80
|
+
[Guides, legend, labs](composition-surfaces.md#guides-legend-labs).
|
|
81
|
+
|
|
55
82
|
### Color and fill scales
|
|
56
83
|
|
|
57
84
|
Five types, each gating its own option set (`ColorScaleSpec`; forbidden
|