-
Precheck. From the project directory, run:
python "${CLAUDE_SKILL_DIR}/scripts/mock.py" precheck "<project-dir>"
(Use python3 if python is unavailable.) If it prints [BLOCKED], relay the reason
and stop — the analyst must resolve the named upstream step (tableau-plan for the
blueprint, tableau-data for the samples) first. Otherwise note its signals: the
canvas size to render at, the coverage targets (element/filter/interaction
counts), the target version path to write mock.html into (and whether this run
bumps the version because the mock was already approved), and whether
DESIGN-TOKENS.md is present.
-
Read the inputs. Read DASHBOARD-PLAN.md in full — its Screen Size, Layout Grid,
Elements, Filters, and Interactions tables are your build list; use the ids verbatim.
Read the sample CSVs (data/*.csv, or scaffold/sample-data/*.csv — if you fall
back to the demo samples, say so) and populate every chart/KPI from the real rows —
do not invent numbers. If DESIGN-TOKENS.md is present, apply its colors/typography;
if absent, use neutral styling.
-
Author mock.html at the precheck's target version path
(mock-version/<v_N>/mock.html). Render at the plan's screen size, lay out every
element in its planned slot, wire the filters and interactions, and tag everything with
data-plan-id + embed the mock-layout manifest (see the two conventions above and
references/MOCK-SKELETON.html). When refining an existing mock at this version,
Edit it in place. Keep the file self-contained (inline CSS/JS; no external fetches)
so the analyst can open and share it directly.
-
Slot sizing. Give each element a readable box inside the canvas — not so small it
compresses (the guard rejects boxes under ~80×56px), not overflowing the canvas
(out-of-bounds), and collectively filling the canvas (the guard rejects layouts that
leave it mostly empty). Make the manifest boxes match what you actually render.
-
Self-check, then present. Validate the draft before showing it:
python "${CLAUDE_SKILL_DIR}/scripts/mock.py" validate "<project-dir>"
It prints the coverage checklist (one line per screen size / element / filter /
interaction, each [x] rendered or [ ] <- MISSING) and the slot-sizing guard
result. If it prints [INVALID], fix the flagged gaps/violations and re-run. When it
prints [OK], show the checklist to the analyst (it's the proof nothing was
dropped) and present the mock for approval.
-
Commit — only after the analyst approves:
python "${CLAUDE_SKILL_DIR}/scripts/mock.py" commit "<project-dir>"
Commit re-runs the full coverage + guard check (mock is non-skippable, so it only ever
sets approved). If it prints [REFUSED], fix what the checklist names and re-run. On
success it records mock = approved, sets current_version to the target v_N, and
reports any downstream steps it marked stale. Relay the summary and tell the analyst
to open a fresh conversation and run the next step (tableau-spec, or tableau-route
to confirm).
The plan's interactions use these intent-level terms; render each so its intent is
demonstrable in the demo (the Tableau construct is chosen later, in spec):