@hegemonart/get-design-done 1.45.0 → 1.47.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 (35) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +97 -0
  4. package/README.md +4 -0
  5. package/SKILL.md +5 -1
  6. package/dist/claude-code/.claude/skills/figma-extract/SKILL.md +1 -1
  7. package/dist/claude-code/.claude/skills/graphify/SKILL.md +1 -1
  8. package/dist/claude-code/.claude/skills/list-pins/SKILL.md +27 -0
  9. package/dist/claude-code/.claude/skills/live/SKILL.md +98 -0
  10. package/dist/claude-code/.claude/skills/pin/SKILL.md +37 -0
  11. package/dist/claude-code/.claude/skills/unpin/SKILL.md +31 -0
  12. package/package.json +3 -1
  13. package/reference/live-mode-integration.md +80 -0
  14. package/reference/registry.json +14 -0
  15. package/reference/schemas/events.schema.json +1 -1
  16. package/reference/schemas/live-session.schema.json +64 -0
  17. package/reference/skill-metadata.md +117 -0
  18. package/scripts/lib/live/bandit-feed.cjs +64 -0
  19. package/scripts/lib/live/events.cjs +86 -0
  20. package/scripts/lib/live/harness-mode.cjs +93 -0
  21. package/scripts/lib/live/postcheck.cjs +158 -0
  22. package/scripts/lib/live/runtime.cjs +233 -0
  23. package/scripts/lib/live/scope-guard.cjs +145 -0
  24. package/scripts/lib/live/session-store.cjs +364 -0
  25. package/scripts/lib/manifest/schemas/skills.schema.json +42 -1
  26. package/scripts/lib/manifest/skills.json +415 -83
  27. package/scripts/lib/pin/cli.cjs +145 -0
  28. package/scripts/lib/pin/harness-detect.cjs +75 -0
  29. package/scripts/lib/pin/store.cjs +288 -0
  30. package/skills/figma-extract/SKILL.md +1 -1
  31. package/skills/graphify/SKILL.md +1 -1
  32. package/skills/list-pins/SKILL.md +27 -0
  33. package/skills/live/SKILL.md +98 -0
  34. package/skills/pin/SKILL.md +37 -0
  35. package/skills/unpin/SKILL.md +31 -0
@@ -5,14 +5,14 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "Get Design Done — 5-stage agent-orchestrated design pipeline with 9 connections, handoff-first workflow, bidirectional Figma write-back, 22+ specialized agents, queryable knowledge layer (intel store, dependency analysis, learnings extraction), and a self-improvement loop (reflector, frontmatter + budget feedback, global-skills layer). v1.20.0 ships the SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream, and resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) for rate-limit + 429 + context-overflow recovery. Full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows) and release automation (auto-tag + GitHub Release + release-time smoke test).",
8
- "version": "1.45.0"
8
+ "version": "1.47.0"
9
9
  },
10
10
  "plugins": [
11
11
  {
12
12
  "name": "get-design-done",
13
13
  "source": "./",
14
14
  "description": "Agent-orchestrated 5-stage design pipeline: Brief → Explore → Plan → Design → Verify. 22+ specialized agents, 9 connections (Figma, Refero, Preview, Storybook, Chromatic, Figma Writer, Graphify, Pinterest, Claude Design), Claude Design handoff, bidirectional Figma write-back, and a queryable intel store (.design/intel/) for dependency and learnings queries. Standalone commands: style, darkmode, compare, figma-write, graphify, handoff, analyze-dependencies, skill-manifest, extract-learnings. Embeds NNG heuristics, WCAG thresholds, typographic systems, motion framework, and anti-pattern catalog. Ships with a full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows) and release automation. Optimization layer (v1.0.4.1, retroactive): gdd-router + gdd-cache-manager skills, PreToolUse budget-enforcer hook, tier-aware agent frontmatter, lazy checker gates, streaming synthesizer, /gdd:warm-cache + /gdd:optimize commands, and cost telemetry at .design/telemetry/costs.jsonl — targeting 50-70% per-task token-cost reduction with no quality-floor regression. v1.20.0 SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream at .design/telemetry/events.jsonl, resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) with rate-limit + 429 + context-overflow recovery, and TypeScript toolchain.",
15
- "version": "1.45.0",
15
+ "version": "1.47.0",
16
16
  "author": {
17
17
  "name": "hegemonart"
18
18
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "get-design-done",
3
3
  "short_name": "gdd",
4
- "version": "1.45.0",
4
+ "version": "1.47.0",
5
5
  "description": "Agent-orchestrated 5-stage design pipeline: Brief → Explore → Plan → Design → Verify. 22+ specialized agents, 9 connections (Figma, Refero, Preview, Storybook, Chromatic, Figma Writer, Graphify, Pinterest, Claude Design), handoff-first workflow via Claude Design bundles, bidirectional Figma write-back (annotations, Code Connect), queryable intel store (`.design/intel/`) for O(1) design surface lookups, and self-improvement loop (reflector agent, frontmatter + budget feedback, global-skills layer at `~/.claude/gdd/global-skills/`). Standalone commands: style, darkmode, compare, figma-write, graphify, handoff, analyze-dependencies, skill-manifest, extract-learnings, reflect, apply-reflections. Embeds NNG heuristics, WCAG thresholds, typographic systems, motion framework, and anti-pattern catalog. Ships with a full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows, lint + schema + frontmatter + stale-ref + shellcheck + gitleaks + injection-scan + blocking size-budget) and release automation (auto-tag + GitHub Release + release-time smoke test). Optimization layer (v1.0.4.1, retroactive): gdd-router + gdd-cache-manager skills, PreToolUse budget-enforcer hook, tier-aware agent frontmatter, lazy checker gates, streaming synthesizer, /gdd:warm-cache + /gdd:optimize commands, and cost telemetry at .design/telemetry/costs.jsonl — targeting 50-70% per-task token-cost reduction with no quality-floor regression. v1.20.0 SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream at .design/telemetry/events.jsonl, resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) with rate-limit + 429 + context-overflow recovery, and TypeScript toolchain. v1.27.7 ships gdd-mcp (Phase 27.7): 12 read-only MCP tools for sub-3s priming. v1.28.0 (Phase 28): Foundational References Tier 2 — 5 new reference files (color-theory, composition, proportion-systems, i18n, contrast-advanced), 2 verifier i18n probes + 1 explore i18n-readiness probe, 12 additive cross-link insertions across 10 existing references, 2 orthogonal audit-scoring lens-tags (composition_alignment + i18n_readiness).",
6
6
  "author": {
7
7
  "name": "hegemonart",
package/CHANGELOG.md CHANGED
@@ -4,6 +4,103 @@ All notable changes to get-design-done are documented here. Versions follow [sem
4
4
 
5
5
  ---
6
6
 
7
+ ## [1.47.0] - 2026-06-03
8
+
9
+ ### Phase 47 - In-Browser Design Iteration (Live Mode)
10
+
11
+ GDD's design loop was repo-bound (edit, save, preview, screenshot) with no tight in-browser iteration. Phase 47
12
+ ships `/gdd:live`: pick an element on a running dev server, generate N variants in one batch, post-check each with
13
+ gdd-detect, hot-swap via HMR, accept or discard, and the session persists for resume. It drives the existing Preview
14
+ MCP connection at runtime (the same surface verify screenshots and darkmode injection already use), so there is no
15
+ new runtime dependency and no new egress. Planned and executed via the GSD pipeline (2 research agents + 3 parallel
16
+ executor subagents).
17
+
18
+ ### Breaking changes
19
+
20
+ - **`capability_matrix.mcp_support` now also gates live mode.** A harness declared `mcp_support: false` runs
21
+ `/gdd:live` in degraded screenshot-only mode (no element-pick or HMR swap). Harness authors adding a runtime must
22
+ set `mcp_support` honestly, since it now drives this behavioral split in addition to MCP tool availability.
23
+ - **The live-session schema joins the validated set.** `reference/schemas/live-session.schema.json` is registered in
24
+ `validate:schemas`, and the six `live_*` event types are seeded into `reference/schemas/events.schema.json`.
25
+ Editing either must keep them valid (CI-gated).
26
+
27
+ ### Added
28
+
29
+ - **`/gdd:live`** at `source/skills/live/SKILL.md`: boot (probe Preview, detect dev server Vite/Next/Bun/static,
30
+ degraded mode if no MCP), element pick, single-batch N-variant generation (default 3, loads the Phase 45 canonical
31
+ reference first), per-variant gdd-detect post-check (findings inline; `error` flagged, never auto-rejected),
32
+ accept/discard with canonical-edit selection, session persistence, and resume.
33
+ - **`scripts/lib/live/` substrate** (all dependency-free, all unit-tested): `session-store` (the
34
+ `.design/live-sessions/<id>.json` lifecycle + resume), `scope-guard` (blocks writes outside the picked element's
35
+ implicated source set), `postcheck` (wraps the gdd-detect engine in-memory), `events` (the six typed `live_*`
36
+ emitters), `bandit-feed` (accepted variants call the Phase 38 store's `observe(..., {source:'dev_time'})` at a 0.5
37
+ dev-time weight; the `Beta(2,8)` prior keeps them advisory), `harness-mode` (mcp_support to puppeteer/degraded),
38
+ `runtime` (the browser-side pick/swap script injected via `preview_eval`, keyed on `data-gdd-variant`).
39
+ - **`reference/live-mode-integration.md`** documents the loop, the Preview surface, the events, the session file, the
40
+ bandit feed, degraded mode, and the scope guard.
41
+
42
+ ### Notes
43
+
44
+ - 6-manifest lockstep at **v1.47.0** + `OFF_CADENCE_VERSIONS.add('1.47.0')` + 37 `manifests-version.txt` baselines +
45
+ tarball golden 884 -> 895 (the `live` skill in `skills/` + `dist/claude-code/`, 7 `scripts/lib/live/*.cjs`,
46
+ `reference/live-mode-integration.md`, `reference/schemas/live-session.schema.json`).
47
+ - Testability: the deterministic substrate is fully unit-tested (session, scope, postcheck, events, bandit-feed,
48
+ harness-mode, runtime shape) plus a deterministic session-replay baseline at `test/fixtures/baselines/phase-47/`.
49
+ Live element-pick, HMR swap, and screenshots are runtime behaviors driven by the skill through the Preview
50
+ connection, exercised by the existing conditional main-branch E2E rather than new browserless CI suites.
51
+
52
+ ---
53
+
54
+ ## [1.46.0] - 2026-06-03
55
+
56
+ ### Phase 46 - Skill UX Polish
57
+
58
+ 70+ skills under one `/gdd:` namespace had three friction points at one surface (skill frontmatter): no
59
+ shortcut for power users, 83 frontmatter blocks as 83 places to edit a description, and a description budget
60
+ that was enforced but not gated explicitly. Phase 46 ships a metadata single source of truth, an
61
+ order-preserving frontmatter generator, three pin shortcut skills, and an explicit budget gate. Planned and
62
+ executed via the GSD pipeline (parallel research + three parallel executor subagents). No new runtime dependency,
63
+ no new egress.
64
+
65
+ ### Breaking changes
66
+
67
+ - **A new CI drift gate guards skill frontmatter.** `npm run generate:skill-frontmatter:check` fails if any
68
+ `source/skills/<id>/SKILL.md` frontmatter no longer matches `scripts/lib/manifest/skills.json`. Edit the
69
+ description, argument hint, or tools allow-list in `skills.json`, then run `npm run generate:skill-frontmatter`
70
+ and `npm run build:skills` to regenerate. Hand-editing the managed frontmatter keys directly now fails CI.
71
+ - **The skill description budget is now an explicit blocking gate.** `npm run lint:agentskills` runs in CI and
72
+ fails (R4) on any description over 1024 characters. The cap existed since Phase 28.5; it is now a first-class
73
+ gate rather than an in-process check.
74
+
75
+ ### Added
76
+
77
+ - **`scripts/lib/manifest/skills.json` as the skill-metadata single source of truth.** All 86 skills carry
78
+ `{description, argument_hint?, tools?, user_invocable?, disable_model_invocation?, ...}`; the JSON Schema
79
+ (`scripts/lib/manifest/schemas/skills.schema.json`) documents the enriched fields and is validated by
80
+ `npm run validate:manifest`.
81
+ - **`scripts/generate-skill-frontmatter.cjs`** (maintainer-only): forward mode regenerates each skill's
82
+ frontmatter from `skills.json`; `--extract` reseeds the manifest from current frontmatter; `--check` is the CI
83
+ drift gate. It is **order-preserving** (each skill keeps its own frontmatter key order; only `name` leads and
84
+ non-managed lines like `quality-gate`'s `writes:` block are carried verbatim), so the committed tree is a
85
+ byte-for-byte fixed point and existing frontmatter-snapshot baselines never churn.
86
+ - **`/gdd:pin <skill>`, `/gdd:unpin <skill>`, `/gdd:list-pins`** power-user shortcut skills. `pin` writes
87
+ standalone alias stubs across every installed harness skills dir (so `/audit` resolves alongside
88
+ `/gdd:audit`), each carrying a `<!-- gdd-pinned-skill source=<id> -->` marker; descriptions and tools come
89
+ from the `skills.json` catalogue, never a live frontmatter scrape. `unpin` removes only marked stubs.
90
+ `list-pins` shows pinned aliases per harness with source and timestamp. Backed by `scripts/lib/pin/`
91
+ (harness discovery via `scripts/lib/manifest/harnesses.cjs`, atomic `.tmp`+rename writes, cross-platform).
92
+ - **`reference/skill-metadata.md`** documents the SoT, the generator, the build chain, and the budget.
93
+
94
+ ### Notes
95
+
96
+ - 6-manifest lockstep at **v1.46.0**, `OFF_CADENCE_VERSIONS.add('1.46.0')`, 37 `manifests-version.txt`
97
+ baselines, tarball golden 874 -> 884 (the 3 pin skills land in `skills/` and `dist/claude-code/`, plus 3
98
+ `scripts/lib/pin/*.cjs` and `reference/skill-metadata.md`). The maintainer-only generator is correctly not shipped.
99
+ - Description budget (SC#5): already enforced since Phase 28.5 (`validate-skill-length.cjs` + `lint-agentskills-spec.cjs`,
100
+ both cap at 1024); Phase 46 hardens it into an explicit CI gate and a SoT-layer regression test. No skill needed trimming.
101
+
102
+ ---
103
+
7
104
  ## [1.45.0] - 2026-06-02
8
105
 
9
106
  ### Phase 45 - Canonical Domain Reference Index
package/README.md CHANGED
@@ -251,6 +251,10 @@ All 14 runtimes receive their native artifact layout (`skills/`, `command/`, `ag
251
251
 
252
252
  **Domain reference index (v1.45.0).** The 38+ reference docs are now navigated through 7 canonical entry-points - `reference/{typography,color,spatial,motion,interaction,responsive,ux-writing}.md` - each indexing its subordinate fragments with a "use this when" pointer plus a handful of rules-of-thumb. Design skills load the relevant domain index first and drill into a fragment only when needed (motion-mapper dropped roughly 89% of its up-front reference tokens this way). The indexes link, never copy: `check:domain-links` fails CI on a broken cross-link and `check:no-duplication` fails on large copy-paste. The detailed fragments stay in place as the drill-in targets. **No new runtime dependency.**
253
253
 
254
+ **Skill UX polish (v1.46.0).** Skill frontmatter now has a single source of truth at `scripts/lib/manifest/skills.json` (description, argument hint, tools allow-list per skill); `scripts/generate-skill-frontmatter.cjs` regenerates each `source/skills/<id>/SKILL.md` from it, and `generate:skill-frontmatter:check` drift-gates the two in CI. The generator is order-preserving, so the committed tree stays a byte-for-byte fixed point and existing snapshots never churn. Power users get `/gdd:pin <skill>`, which writes standalone shortcut aliases (for example `/audit` alongside `/gdd:audit`) across every installed harness dir, each carrying a `gdd-pinned-skill` marker, plus `/gdd:unpin` and `/gdd:list-pins`. The 1024-character description budget (in place since the skill-authoring contract) is now an explicit `lint:agentskills` CI gate. **No new runtime dependency.**
255
+
256
+ **In-browser design iteration (v1.47.0).** `/gdd:live` tightens the design loop: pick an element on a running dev server, generate N variants in one batch (default 3, grounded in the Phase 45 canonical reference), post-check each with `gdd-detect`, hot-swap them via HMR, then accept or discard. Accepted variants are applied as the canonical edit and feed the Phase 38 bandit store with a `dev_time` source tag (a conservative `Beta(2,8)` prior keeps them advisory until production outcomes accumulate). The session persists to `.design/live-sessions/<id>.json` with resume, a scope guard blocks writes outside the picked element's source files, and harnesses without MCP fall back to a screenshot-only degraded mode. It drives the existing Preview connection, so there is **no new runtime dependency**.
257
+
254
258
  Verify with:
255
259
 
256
260
  ```
package/SKILL.md CHANGED
@@ -2,7 +2,7 @@
2
2
  name: get-design-done
3
3
  short_name: gdd
4
4
  description: "Master design pipeline for Claude Code. 5-stage workflow: Brief → Explore → Plan → Design → Verify. Run 'brief' first in any new project to capture the design problem, then 'explore' to inventory the codebase and interview for context. Invoke without arguments for status and auto-routing."
5
- argument-hint: "[brief|explore|plan|design|verify|handoff|map|next|help|status|style|darkmode|compare|figma-write|graphify|discuss|list-assumptions|progress|health|todo|stats|note|plant-seed|add-backlog|review-backlog|scan|discover|settings|update|reapply-patches|audit|pause|resume|new-cycle|debug|quick|new-project|complete-cycle|fast|do|ship|undo|pr-branch|sketch|sketch-wrap-up|spike|spike-wrap-up|reflect|apply-reflections|analyze-dependencies|extract-learnings|skill-manifest|warm-cache|optimize|cache-manager|watch-authorities|check-update|benchmark|recall|timeline|continue|zoom-out]"
5
+ argument-hint: "[brief|explore|plan|design|verify|handoff|map|next|help|status|style|darkmode|live|compare|figma-write|graphify|discuss|list-assumptions|progress|health|todo|stats|note|plant-seed|add-backlog|review-backlog|scan|discover|settings|update|reapply-patches|audit|pause|resume|new-cycle|debug|quick|new-project|complete-cycle|fast|do|ship|undo|pr-branch|sketch|sketch-wrap-up|spike|spike-wrap-up|reflect|apply-reflections|analyze-dependencies|extract-learnings|skill-manifest|pin|unpin|list-pins|warm-cache|optimize|cache-manager|watch-authorities|check-update|benchmark|recall|timeline|continue|zoom-out]"
6
6
  user-invocable: true
7
7
  ---
8
8
 
@@ -33,6 +33,7 @@ Each stage produces artifacts in `.design/` inside the current project.
33
33
  | `help` | `get-design-done:gdd-help` | List all commands with one-line descriptions |
34
34
  | `style [ComponentName]` | `get-design-done:gdd-style` | Generate component handoff doc → .design/DESIGN-STYLE-[Name].md |
35
35
  | `darkmode` | `get-design-done:gdd-darkmode` | Audit dark mode architecture + contrast + anti-patterns → .design/DARKMODE-AUDIT.md |
36
+ | `live [--variants N] [--resume <id>] [url]` | `get-design-done:gdd-live` | Phase 47 - in-browser design iteration: pick an element on a running dev server (via the Preview connection), generate N variants, hot-swap via HMR, accept/discard; session persists to .design/live-sessions/. Degraded screenshot-only mode on harnesses without MCP |
36
37
  | `compare` | `get-design-done:gdd-compare` | Delta between DESIGN.md baseline and DESIGN-VERIFICATION.md → .design/COMPARE-REPORT.md |
37
38
  | `figma-write <mode>` | `get-design-done:gdd-figma-write` | Write design decisions to Figma (annotate/tokenize/mappings) |
38
39
  | `figma-extract <file-url-or-key>` | `get-design-done:gdd-figma-extract` | Off-context Figma design-system extraction → compact local digest (DESIGN.md + tokens.json + components.json), zero raw JSON in context |
@@ -89,6 +90,9 @@ Each stage produces artifacts in `.design/` inside the current project.
89
90
  | `analyze-dependencies [--slice <name>]` | `get-design-done:analyze-dependencies` | Query the `.design/intel/` store - dependency slices, graph queries, phase-scoped reads |
90
91
  | `extract-learnings [--cycle <slug>]` | `get-design-done:extract-learnings` | Extract decisions, lessons, patterns, and surprises from a completed cycle → `.design/cycles/<slug>/LEARNINGS.md` |
91
92
  | `skill-manifest [--refresh]` | `get-design-done:skill-manifest` | List or refresh the local skill manifest used by the router for discovery |
93
+ | `pin <skill>` | `get-design-done:gdd-pin` | Phase 46 - write standalone shortcut aliases for a gdd skill across every installed harness dir (so `/audit` resolves alongside `/gdd:audit`); metadata comes from the skills.json catalogue |
94
+ | `unpin <skill>` | `get-design-done:gdd-unpin` | Phase 46 - remove pinned aliases for a skill (only files carrying the gdd-pinned-skill marker) |
95
+ | `list-pins` | `get-design-done:gdd-list-pins` | Phase 46 - show pinned aliases per harness with their source skill and last-pinned timestamp |
92
96
  | `quality-gate` | `get-design-done:quality-gate` | Phase 25 - parallel lint/type/test/visual command runner; classifies failures via quality-gate-runner agent |
93
97
  | `turn-closeout` | `get-design-done:turn-closeout` | Phase 25 - Stop-hook mirror skill; finalizes per-turn STATE blocks and emits closeout events |
94
98
  | `bandit-status` | `get-design-done:bandit-status` | Phase 27.5 - read-only diagnostic surface for the bandit posterior; per-(agent, bin, delegate, tier) snapshots (alpha, beta, mean, stddev, count, last-used). Use `/gdd:bandit-reset` to mutate. |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: gdd-figma-extract
3
- description: Off-context Figma design-system extraction into a compact local digest (DESIGN.md + tokens.json + components.json). Pulls the file via the Figma REST API and digests it without the raw JSON ever entering the model context.
3
+ description: "Off-context Figma design-system extraction into a compact local digest (DESIGN.md + tokens.json + components.json). Pulls the file via the Figma REST API and digests it without the raw JSON ever entering the model context."
4
4
  ---
5
5
 
6
6
  # gdd-figma-extract
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: gdd-graphify
3
- description: Manage the Graphify knowledge graph for the current project. Build, query, status, diff. When available, design-planner and design-integration-checker use the graph for pre-search consultation.
3
+ description: "Manage the Graphify knowledge graph for the current project. Build, query, status, diff. When available, design-planner and design-integration-checker use the graph for pre-search consultation."
4
4
  ---
5
5
 
6
6
  # gdd-graphify
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: gdd-list-pins
3
+ description: "Lists pinned skill aliases per harness with their source skill and pin timestamp. Use when you want to see which gdd skills have been pinned as standalone shortcuts and where."
4
+ tools: Read, Bash
5
+ ---
6
+
7
+ # /gdd:list-pins
8
+
9
+ **Role:** Show every pinned skill alias across the installed harness `skills/` directories. For each one, report the harness it lives in, the on-disk alias directory name, the source skill it points at (from the `<!-- gdd-pinned-skill source=<skill> -->` marker), and when it was pinned (the file modification time).
10
+
11
+ ## Steps
12
+
13
+ 1. **Run the list CLI.** Invoke the shipped script (it takes no arguments). The plugin root resolves via `CLAUDE_PLUGIN_ROOT` (falling back to the current directory when that variable is absent):
14
+
15
+ ```bash
16
+ node "${CLAUDE_PLUGIN_ROOT:-$(pwd)}/scripts/lib/pin/cli.cjs" list
17
+ ```
18
+
19
+ The CLI scans each harness `skills/` directory under the current project, finds the stubs carrying the gdd pin marker, and prints one line per pinned alias in the form `[<config-dir>] <alias> -> source=<skill> (pinned <timestamp>)`.
20
+
21
+ 2. **Report the result.** Relay the CLI output verbatim. Exit codes: 0 means one or more pinned aliases were found, 1 means none were found (nothing has been pinned yet), 2 means an error.
22
+
23
+ ## Do Not
24
+
25
+ - Do not scan the harness directories by hand. The CLI already enforces the marker check, so only genuine gdd pins are listed.
26
+
27
+ ## LIST-PINS COMPLETE
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: gdd-live
3
+ description: "Live in-browser design mode. The user picks a DOM element on a running dev server (via the Claude Preview MCP), the agent generates N design variants in one batch, they hot-swap in place through HMR or preview_eval using a data-gdd-variant marker, the user accepts or discards, and the whole pick-generate-accept loop persists to .design/live-sessions so it survives a crash or resume. Use when the user wants to iterate on the look of a live component against a real running server, asks to try variants on a page, or runs the live command with a url; falls back to a screenshot-only degraded mode on harnesses without MCP support."
4
+ argument-hint: "[--variants N] [--resume <session-id>] [url]"
5
+ tools: Read, Write, Edit, Bash, Glob, Grep, Task
6
+ user-invocable: true
7
+ ---
8
+
9
+ # gdd-live - Live In-Browser Design Mode
10
+
11
+ Pick a DOM element on a running dev server, generate competing design variants, hot-swap them in place, and accept the winner as a real source edit. Every step persists to `.design/live-sessions/<id>.json` so the session survives a crash or a later resume.
12
+
13
+ The browser-side runtime, the harness-mode gate, the session store, the events feed, the post-check, the scope guard, and the bandit feed are all separate modules under `scripts/lib/live/`. This skill describes the loop and names the module that owns each step; it does not import them.
14
+
15
+ For the full surface (the Preview MCP tools, the six `live_*` events, the session file, the bandit feed, degraded mode, the scope guard), see `../../reference/live-mode-integration.md`. For the SKILL.md structural contract, see `../../reference/skill-authoring-contract.md`.
16
+
17
+ ---
18
+
19
+ ## Arguments
20
+
21
+ - `[url]` - the page to drive. Optional. When omitted, detect the dev server and use its root.
22
+ - `--variants N` - how many variants to generate per pick. Default 3.
23
+ - `--resume <session-id>` - reattach to an in-progress session in `.design/live-sessions/`.
24
+
25
+ ---
26
+
27
+ ## BOOT
28
+
29
+ 1. Probe the Preview MCP per `../../connections/preview.md`: `ToolSearch({ query: "Claude_Preview" })`, then `mcp__Claude_Preview__preview_list`. Empty ToolSearch means the MCP is not loaded.
30
+ 2. Resolve the harness live mode. The capability signal is `capability_matrix.mcp_support` in `scripts/lib/manifest/harnesses.json`, projected by `scripts/lib/live/harness-mode.cjs` (`liveModeFor(harnessId)`). A `puppeteer` result means full live mode; a `degraded` result means screenshot-only.
31
+ 3. If `mcp_support` is false for this harness, or Preview is unavailable, enter DEGRADED mode and say so plainly: variants are generated and captured as static screenshots, with no in-page hot-swap. Skip the INJECT and PICK steps; generate against the file the user names instead.
32
+ 4. Detect the dev server. Look for Vite, Next, Bun, or a static server (check `package.json` scripts plus a `preview_list` entry). Record the server descriptor on the session.
33
+ 5. Open or create the session via `scripts/lib/live/session-store.cjs` (`.design/live-sessions/<id>.json`). On `--resume`, load the named session (see RESUME).
34
+
35
+ ---
36
+
37
+ ## INJECT
38
+
39
+ Inject the browser runtime once. Read `RUNTIME_JS` from `scripts/lib/live/runtime.cjs` and evaluate it in the page with `mcp__Claude_Preview__preview_eval`. The runtime is an idempotent IIFE bound to `window.__gddLive`, so a re-inject after navigation rebinds the same singleton rather than stacking listeners. It installs the pick handler and the variant-swap helpers, and stamps the live variant on the element via the `data-gdd-variant` attribute.
40
+
41
+ ---
42
+
43
+ ## PICK
44
+
45
+ 1. Arm the picker (`window.__gddLive.pick()`), then guide the user to click the target element. Use `preview_click` and `preview_inspect` to confirm the element and read its computed styles and bounding box.
46
+ 2. Read the pick report back. Its fields are documented in `pickReportShape` (selector, tagName, classList, boundingRect, computedStyle subset, current variant). The selector strategy prefers id, then a data-testid, then a tag plus class plus nth-of-type path.
47
+ 3. Emit a `live_pick` event through `scripts/lib/live/events.cjs` and append a `pick` entry to the session.
48
+
49
+ ---
50
+
51
+ ## GENERATE (one batch)
52
+
53
+ 1. Load the relevant Phase 45 canonical reference index FIRST, so variants are grounded in real guidance: the domain index that matches the picked element (for example `../../reference/spatial.md` for layout, `../../reference/interaction.md` for components and a11y, `../../reference/color.md` for color, `../../reference/typography.md` for type, `../../reference/motion.md` for animation).
54
+ 2. Generate all N variants in ONE batch (default 3), each a distinct, hypothesis-tagged design direction for the picked element. Do not generate them one at a time.
55
+ 3. For each variant: write the change atomically to the implicated source file, then make it live. With HMR running, the file write is enough; otherwise apply the variant in place with `window.__gddLive.swapVariant({ n, style, html })`, which sets `data-gdd-variant="n"` and applies the variant's style or markup.
56
+
57
+ ---
58
+
59
+ ## POST-CHECK
60
+
61
+ Run the post-check on each variant via `scripts/lib/live/postcheck.cjs`, which invokes `gdd-detect`. Show the findings inline next to each variant. A variant that trips a finding is flagged, NOT auto-rejected: the user still decides. Append a `live_postcheck` event per variant.
62
+
63
+ ---
64
+
65
+ ## ACCEPT / DISCARD
66
+
67
+ - ACCEPT one variant: apply the chosen variant as the canonical source edit, and revert the others in the page (`window.__gddLive.revert()` on each non-chosen element). Emit a `live_accept` event and feed the outcome to the design-variants bandit via `scripts/lib/live/bandit-feed.cjs` (a dev-time signal). Append an `accept` entry.
68
+ - DISCARD: revert every variant in the page back to its captured original and leave the source untouched. Emit a `live_discard` event and append a `discard` entry.
69
+
70
+ Either way, persist the result through `scripts/lib/live/session-store.cjs` before continuing.
71
+
72
+ ---
73
+
74
+ ## PERSIST
75
+
76
+ Every step (boot, pick, generate, post-check, accept, discard) is written to the session file through `scripts/lib/live/session-store.cjs` as it happens. The on-disk event log uses the `pick`, `generate`, `accept`, `discard` kinds; the telemetry stream uses the six `live_*` event types. Writes are atomic, so an interrupted step never leaves a half-written session.
77
+
78
+ ---
79
+
80
+ ## RESUME
81
+
82
+ With `--resume <session-id>`, load the named session from `.design/live-sessions/`. Only an `in_progress` session is resumable. Offer the user two choices: continue from the last recorded event (report what that was, for example "last pick was the primary button"), or start fresh (open a new session and leave the old one intact). Never silently replay completed events.
83
+
84
+ ---
85
+
86
+ ## SCOPE GUARD
87
+
88
+ Never write outside the source files implicated by the picked element. Run every proposed write through `scripts/lib/live/scope-guard.cjs`, which maps the picked selector to its owning source files and rejects edits that fall outside them. If a variant would need a change beyond that scope (a shared token, a parent layout, a new dependency), stop and surface it to the user rather than widening the blast radius.
89
+
90
+ ## Constraints
91
+
92
+ - Do NOT edit files outside the picked element's implicated sources (enforced by the scope guard).
93
+ - Do NOT generate variants one at a time; generate the full batch, then swap.
94
+ - Do NOT auto-reject a variant on a post-check finding; flag it and let the user decide.
95
+ - In DEGRADED mode, state up front that hot-swap is unavailable and fall back to screenshots.
96
+ - Persist before every user-facing prompt so a crash never loses accepted work.
97
+
98
+ ## LIVE COMPLETE
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: gdd-pin
3
+ description: "Writes standalone shortcut aliases for a gdd skill across installed harness skill dirs. Use when you want a skill directly discoverable as its own command in every installed runtime."
4
+ argument-hint: "<skill-name>"
5
+ tools: Read, Bash
6
+ ---
7
+
8
+ # /gdd:pin
9
+
10
+ **Role:** Write a standalone shortcut alias (a small SKILL.md stub) for one gdd skill into every installed harness `skills/` directory, so that skill is directly discoverable as its own command in each runtime (Claude Code, Codex, Cursor, Gemini, and the rest).
11
+
12
+ Each pinned stub starts with the marker line `<!-- gdd-pinned-skill source=<skill> -->`, then carries frontmatter (name, description, argument-hint, tools) pulled from the manifest source of truth, then a one-line body pointing back at the canonical skill. Stubs are written atomically (temp file plus rename), so a failed write never leaves a half-written file.
13
+
14
+ ## Steps
15
+
16
+ 1. **Read the argument.** The skill name to pin comes from `$ARGUMENTS` (for example `darkmode`). If it is empty, ask the user which skill to pin and stop.
17
+
18
+ 2. **Run the pin CLI.** Invoke the shipped script, passing the skill name. The plugin root resolves via `CLAUDE_PLUGIN_ROOT` (falling back to the current directory when that variable is absent):
19
+
20
+ ```bash
21
+ node "${CLAUDE_PLUGIN_ROOT:-$(pwd)}/scripts/lib/pin/cli.cjs" pin "<skill-name>"
22
+ ```
23
+
24
+ The CLI detects every harness `skills/` directory that exists under the current project (`.claude/skills`, `.cursor/skills`, and so on) and writes the stub into each. Pass `--user` to also create the harness directories that do not exist yet:
25
+
26
+ ```bash
27
+ node "${CLAUDE_PLUGIN_ROOT:-$(pwd)}/scripts/lib/pin/cli.cjs" pin "<skill-name>" --user
28
+ ```
29
+
30
+ 3. **Report the result.** The CLI prints one line per harness it wrote to, plus any skips. Relay that summary verbatim. Exit codes: 0 means at least one stub was written, 1 means nothing was written (no harness dirs found, suggest `--user`), 2 means an error (for example an unknown skill name).
31
+
32
+ ## Do Not
33
+
34
+ - Do not hand-write the stub files. Always go through the CLI so the marker, the manifest-sourced frontmatter, and the atomic write stay consistent.
35
+ - Do not pin a skill that is not in the manifest. The CLI rejects unknown skill names with exit code 2; surface that error rather than inventing a stub.
36
+
37
+ ## PIN COMPLETE
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: gdd-unpin
3
+ description: "Removes pinned skill aliases across harness dirs, deleting only stubs that carry the gdd pin marker. Use when you no longer want a pinned shortcut and want hand-written skills left untouched."
4
+ argument-hint: "<skill-name>"
5
+ tools: Read, Bash
6
+ ---
7
+
8
+ # /gdd:unpin
9
+
10
+ **Role:** Remove the pinned shortcut aliases for one gdd skill from every installed harness `skills/` directory. Only stubs that carry the marker line `<!-- gdd-pinned-skill source=<skill> -->` as their first non-empty line are deleted, so a hand-authored or unrelated SKILL.md is never touched.
11
+
12
+ ## Steps
13
+
14
+ 1. **Read the argument.** The skill name to unpin comes from `$ARGUMENTS` (for example `darkmode`). If it is empty, ask the user which skill to unpin and stop.
15
+
16
+ 2. **Run the unpin CLI.** Invoke the shipped script, passing the skill name. The plugin root resolves via `CLAUDE_PLUGIN_ROOT` (falling back to the current directory when that variable is absent):
17
+
18
+ ```bash
19
+ node "${CLAUDE_PLUGIN_ROOT:-$(pwd)}/scripts/lib/pin/cli.cjs" unpin "<skill-name>"
20
+ ```
21
+
22
+ The CLI scans every harness `skills/` directory under the current project, checks each candidate stub for the gdd pin marker, deletes the ones that carry it, and refuses (skips with a warning) any file that does not.
23
+
24
+ 3. **Report the result.** The CLI prints one line per harness it removed a stub from, plus a warning for any file it refused to delete. Relay that summary verbatim. Exit codes: 0 means at least one stub was removed, 1 means nothing was removed (no matching pinned stubs found), 2 means an error.
25
+
26
+ ## Do Not
27
+
28
+ - Do not delete skill files by hand. Always go through the CLI so the marker check protects hand-written skills.
29
+ - Do not force-remove a file the CLI refused. A refusal means the file lacks the gdd pin marker and is not a pinned alias; leave it in place.
30
+
31
+ ## UNPIN COMPLETE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hegemonart/get-design-done",
3
- "version": "1.45.0",
3
+ "version": "1.47.0",
4
4
  "description": "A design-quality pipeline for AI coding agents: brief, plan, implement, and verify UI work against your design system.",
5
5
  "author": "Hegemon",
6
6
  "homepage": "https://github.com/hegemonart/get-design-done",
@@ -50,6 +50,8 @@
50
50
  "build:bundles": "node scripts/build-distribution-bundles.cjs",
51
51
  "build:skills": "node scripts/build-skills.cjs",
52
52
  "build:skills:check": "node scripts/build-skills.cjs --check",
53
+ "generate:skill-frontmatter": "node scripts/generate-skill-frontmatter.cjs",
54
+ "generate:skill-frontmatter:check": "node scripts/generate-skill-frontmatter.cjs --check",
53
55
  "build:sdk": "node scripts/build-sdk-bins.cjs",
54
56
  "prepack": "npm run build:sdk",
55
57
  "postpack": "node scripts/build-sdk-bins.cjs --clean",
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: live-mode-integration
3
+ type: meta-rules
4
+ version: 1.0.0
5
+ phase: 47
6
+ tags: [live, preview-mcp, hot-swap, session, bandit, scope-guard, degraded-mode]
7
+ last_updated: 2026-06-03
8
+ ---
9
+
10
+ # Live Mode Integration
11
+
12
+ This file is the meta-rules companion to the `gdd-live` skill (`source/skills/live/SKILL.md`). It describes how `/gdd:live` turns a running dev server into a live design surface: the user picks a DOM element, the agent generates N variants in one batch, the variants hot-swap in place, the user accepts or discards, and the whole session persists. For the SKILL.md structural contract (line cap, description budget, frontmatter), see `./skill-authoring-contract.md`. The variants themselves are grounded in the Phase 45 domain indexes (`./spatial.md`, `./interaction.md`, `./color.md`, `./typography.md`, `./motion.md`).
13
+
14
+ There is NO bundled browser automation. The skill drives the Claude Preview MCP at runtime; the modules under `scripts/lib/live/` are pure and dependency-free.
15
+
16
+ ## The live loop
17
+
18
+ The loop is seven stages, each owned by one module under `scripts/lib/live/`:
19
+
20
+ 1. BOOT. Probe the Preview MCP (see below), resolve the harness live mode, and detect the dev server (Vite, Next, Bun, or static). Open or create the session.
21
+ 2. INJECT. Read `RUNTIME_JS` from `scripts/lib/live/runtime.cjs` and evaluate it in the page via `preview_eval`. The runtime is an idempotent IIFE on `window.__gddLive`; re-injecting after a navigation rebinds the same singleton.
22
+ 3. PICK. The runtime arms a one-shot click handler. The clicked element is reported back as `{selector, tagName, classList, boundingRect, computedStyle subset, variant}` (the `pickReportShape` contract). The selector strategy prefers id, then a data-testid, then a tag plus class plus nth-of-type path.
23
+ 4. GENERATE. Load the matching domain index first, then generate all N variants (default 3) in ONE batch. Each variant is written atomically to its source file and made live, either through HMR or through the runtime swap helper.
24
+ 5. POST-CHECK. Each variant runs through `scripts/lib/live/postcheck.cjs`, which invokes `gdd-detect`. Findings show inline. A finding flags a variant; it never auto-rejects it.
25
+ 6. ACCEPT or DISCARD. Accept applies the chosen variant as the canonical source edit, reverts the others, and feeds the bandit. Discard reverts everything and leaves the source untouched.
26
+ 7. PERSIST. Every stage is written to the session file as it happens.
27
+
28
+ ## The Preview MCP surface
29
+
30
+ Live mode drives the built-in Claude Preview MCP, the same connection documented in `../connections/preview.md`. The tools it uses:
31
+
32
+ - `preview_list` and `ToolSearch` for the availability probe.
33
+ - `preview_eval` to inject `RUNTIME_JS` and to read the pick report back.
34
+ - `preview_inspect` and `preview_click` to confirm the picked element and read its computed styles.
35
+ - `preview_navigate` to move between routes (the runtime re-inject is idempotent across navigations).
36
+ - `preview_screenshot` for evidence, and as the only output in degraded mode.
37
+
38
+ The `data-gdd-variant` attribute is the hot-swap marker. The runtime stamps `data-gdd-variant="N"` on the picked element when it applies variant N, and reads it back to know which variant is live.
39
+
40
+ ## The six live events
41
+
42
+ Live mode emits six telemetry event types through `scripts/lib/live/events.cjs` onto the standard `.design/telemetry/events.jsonl` stream:
43
+
44
+ | Event | Emitted when |
45
+ |---|---|
46
+ | `live_boot` | A session opens (BOOT completes). |
47
+ | `live_pick` | The user picks an element. |
48
+ | `live_generate` | A batch of N variants is generated. |
49
+ | `live_postcheck` | A variant clears or trips its post-check. |
50
+ | `live_accept` | The user accepts a variant. |
51
+ | `live_discard` | The user discards the batch. |
52
+
53
+ These telemetry events are distinct from the on-disk session log. The session file records the four lifecycle kinds (`pick`, `generate`, `accept`, `discard`); the telemetry stream carries the six `live_*` types above.
54
+
55
+ ## The session file
56
+
57
+ `scripts/lib/live/session-store.cjs` owns one JSON document per session at `.design/live-sessions/<session-id>.json`, conforming to `./schemas/live-session.schema.json`. It carries `{schema_version, session_id, status, started_at, ended_at, url, dev_server, events[]}`. `status` is one of `in_progress`, `completed`, or `abandoned`; only an `in_progress` session is resumable. Writes are atomic (write to a temp file, then rename), so an interrupted step never leaves a half-written session.
58
+
59
+ On `--resume <session-id>`, the skill loads the named session and offers two choices: continue from the last recorded event, or start fresh. It never silently replays completed events.
60
+
61
+ ## The bandit dev-time feed
62
+
63
+ When the user accepts a variant, `scripts/lib/live/bandit-feed.cjs` feeds that outcome to the design-variants bandit described in `./design-variants.md`. This is a dev-time signal: it records which design pattern the developer chose during live iteration. It is advisory and separate from the user-outcome A/B loop and from the routing bandit. The user always wins; the bandit only learns.
64
+
65
+ ## Degraded mode
66
+
67
+ Live mode is gated on `capability_matrix.mcp_support` in `scripts/lib/manifest/harnesses.json`. `scripts/lib/live/harness-mode.cjs` projects each harness onto a mode: `liveModeFor(harnessId)` returns `puppeteer` (full live mode) when `mcp_support` is true, and `degraded` otherwise. `degradedHarnesses()` lists every screenshot-only harness.
68
+
69
+ In degraded mode there is no Preview MCP, so there is no runtime injection and no hot-swap. The skill states this up front, then generates variants against the file the user names and captures static screenshots for comparison. Degraded mode never errors; it is a documented fallback.
70
+
71
+ ## Scope guard
72
+
73
+ `scripts/lib/live/scope-guard.cjs` maps the picked selector to its owning source files and rejects any write that falls outside them. A variant that would need a change beyond that scope (a shared token, a parent layout, a new dependency) stops the loop and surfaces the decision to the user, rather than silently widening the blast radius. The guard is the hard boundary on what live mode may edit.
74
+
75
+ ## See also
76
+
77
+ - `./skill-authoring-contract.md` for the SKILL.md authoring rules.
78
+ - `./design-variants.md` for the bandit the accept step feeds.
79
+ - `../connections/preview.md` for the full Preview MCP connection spec.
80
+ - The Phase 45 domain indexes (`./spatial.md`, `./interaction.md`, `./color.md`, `./typography.md`, `./motion.md`) the generate step loads.
@@ -849,6 +849,20 @@
849
849
  "phase": 28.5,
850
850
  "description": "Phase 28.5 skill-authoring contract — adapted from mattpocock/skills (MIT). SKILL.md <=100-line cap (warn >=100, block >=250 in CI), 1024-char description cap, <what>. Use when <triggers>. form (lax-mode default per Phase 33 A/B pending), frontmatter required fields, progressive-disclosure one-level-deep rule. Validator at scripts/validate-skill-length.cjs."
851
851
  },
852
+ {
853
+ "name": "skill-metadata",
854
+ "path": "reference/skill-metadata.md",
855
+ "type": "meta-rules",
856
+ "phase": 46,
857
+ "description": "Phase 46 skill-metadata single source of truth: scripts/lib/manifest/skills.json record shape, the generate-skill-frontmatter.cjs forward/extract/check modes, the skills.json to generator to build:skills to skills/+dist build chain, the six managed frontmatter keys (canonical order, always-quoted strings) vs extra_frontmatter passthrough, the 20..1024 description budget (validate-skill-length.cjs + lint-agentskills-spec.cjs R4, lint:agentskills CI gate), and the pin metadata catalogue consumer."
858
+ },
859
+ {
860
+ "name": "live-mode-integration",
861
+ "path": "reference/live-mode-integration.md",
862
+ "type": "meta-rules",
863
+ "phase": 47,
864
+ "description": "Phase 47 live-mode contract for /gdd:live: the seven-stage pick to generate to accept loop, the Claude Preview MCP surface (preview_eval injects scripts/lib/live/runtime.cjs RUNTIME_JS, hot-swap via the data-gdd-variant marker), the six live_* telemetry events vs the four on-disk session kinds, the .design/live-sessions session file (scripts/lib/live/session-store.cjs + live-session.schema.json), the dev-time bandit feed (bandit-feed.cjs into design-variants), degraded screenshot-only mode gated on capability_matrix.mcp_support (harness-mode.cjs), and the scope guard (scope-guard.cjs)."
865
+ },
852
866
  {
853
867
  "name": "capability-gap-stage-gate",
854
868
  "path": "reference/capability-gap-stage-gate.md",
@@ -10,7 +10,7 @@
10
10
  "type": {
11
11
  "type": "string",
12
12
  "minLength": 1,
13
- "description": "Free-form event type identifier. Pre-registered seeds: state.mutation, state.transition, stage.entered, stage.exited, hook.fired, error, capability_gap, kfm-candidate, router_pick, verify_outcome, rollout_started, rollout_advanced, rollout_stuck, budget_forecast, project_cap_warning, project_cap_halt."
13
+ "description": "Free-form event type identifier. Pre-registered seeds: state.mutation, state.transition, stage.entered, stage.exited, hook.fired, error, capability_gap, kfm-candidate, router_pick, verify_outcome, rollout_started, rollout_advanced, rollout_stuck, budget_forecast, project_cap_warning, project_cap_halt, live_session_start, live_pick, live_generate, live_accept, live_discard, live_session_end."
14
14
  },
15
15
  "timestamp": {
16
16
  "type": "string",
@@ -0,0 +1,64 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://github.com/hegemonart/get-design-done/reference/schemas/live-session.schema.json",
4
+ "title": "Live Session",
5
+ "description": "A single `/gdd:live` session record persisted at .design/live-sessions/<session-id>.json. Captures the pick -> generate -> accept/discard loop as an append-only event log so a session survives a crash or --resume. Written atomically by scripts/lib/live/session-store.cjs.",
6
+ "type": "object",
7
+ "required": ["schema_version", "session_id", "status", "started_at", "ended_at", "events"],
8
+ "properties": {
9
+ "schema_version": {
10
+ "type": "string",
11
+ "description": "Schema version of this session record (e.g. \"47.0\")."
12
+ },
13
+ "session_id": {
14
+ "type": "string",
15
+ "minLength": 1,
16
+ "description": "Stable id; also the basename of the on-disk file (no path separators)."
17
+ },
18
+ "status": {
19
+ "type": "string",
20
+ "enum": ["in_progress", "completed", "abandoned"],
21
+ "description": "Lifecycle status. Only in_progress sessions are resumable."
22
+ },
23
+ "started_at": {
24
+ "type": "string",
25
+ "format": "date-time",
26
+ "description": "ISO-8601 timestamp the session was created."
27
+ },
28
+ "ended_at": {
29
+ "type": ["string", "null"],
30
+ "format": "date-time",
31
+ "description": "ISO-8601 timestamp the session was closed; null while in_progress."
32
+ },
33
+ "url": {
34
+ "type": "string",
35
+ "description": "The page the element was picked from (optional)."
36
+ },
37
+ "dev_server": {
38
+ "description": "Dev-server descriptor (url/port/command, or a plain string). Free-form by design.",
39
+ "type": ["string", "object", "null"]
40
+ },
41
+ "events": {
42
+ "type": "array",
43
+ "description": "Append-only log of session events, oldest first.",
44
+ "items": {
45
+ "type": "object",
46
+ "required": ["kind", "at"],
47
+ "properties": {
48
+ "kind": {
49
+ "type": "string",
50
+ "enum": ["pick", "generate", "accept", "discard"],
51
+ "description": "Event kind."
52
+ },
53
+ "at": {
54
+ "type": "string",
55
+ "format": "date-time",
56
+ "description": "ISO-8601 timestamp the event was recorded."
57
+ }
58
+ },
59
+ "additionalProperties": true
60
+ }
61
+ }
62
+ },
63
+ "additionalProperties": false
64
+ }