tableau-spec
Step 7 of 8, and non-skippable. It turns the approved mock.html into either a
machine-readable IMPLEMENTATION-SPEC.md for tableau-build, or a Desktop build guide
for an analyst who will author in Tableau Desktop. Choose the route once via spec_mode.
| Reads | Required: mock-version/<v_N>/mock.html (from mock); DASHBOARD-PLAN.md (from plan). |
| Writes | Agent: mock-version/<v_N>/IMPLEMENTATION-SPEC.md. Human: root IMPLEMENTATION-SPEC.md + spec/ tree. |
| STATE.md update | Records spec_mode (agent | human) on first run via set-mode; sets spec = approved; on human also sets build = skipped. On agent re-run, flips an approved build to stale. Does not bump current_version. |
| Entry gate | plan + DASHBOARD-PLAN.md resolved; mock + mock.html at current_version. Agent route also blocks multi-view plans (one-dashboard builder limit). |
| Next step | Agent → tableau-build. Human → pipeline complete (build skipped). |
Spec mode gate (spec_mode) — do this first
| mode | Meaning |
|---|---|
agent | Machine spec (Element Mapping + ## Layout) for tableau-build. Default when unset. |
human | Desktop build guide (root guide + spec/ tree). tableau-build is skipped. |
-
Run precheck — it reports the recorded
spec_mode, or that it is unset:bashpython "${CLAUDE_PLUGIN_ROOT}/skills/tableau-spec/scripts/spec.py" precheck "<project-dir>" -
If unset, ask the analyst once (
agentorhuman), then record it:bashpython "${CLAUDE_PLUGIN_ROOT}/skills/tableau-spec/scripts/spec.py" set-mode "<project-dir>" --mode agent(or
--mode human). Do not hand-editSTATE.md. Later runs do not ask again.
Detail for each route is below; templates hold the full shape.
Agent route
Author mock-version/<v_N>/IMPLEMENTATION-SPEC.md from
references/IMPLEMENTATION-SPEC-TEMPLATE.md.
- One Element Mapping row per mock
data-plan-id(exact id match). ## Layoutfenced JSON container tree (canvas, vert/horz, percentage sizes).- Default to the simplest Tableau primitive; justify Dynamic Zone Visibility, LOD, table calc, or parameter action in the justification cell.
- Equal siblings must be a container's only children.
bashpython "${CLAUDE_PLUGIN_ROOT}/skills/tableau-spec/scripts/spec.py" validate "<project-dir>" python "${CLAUDE_PLUGIN_ROOT}/skills/tableau-spec/scripts/spec.py" commit "<project-dir>"
Show the reconciliation checklist to the analyst before asking for approval. Commit only after they approve.
Human route
Author a Desktop guide from references/HUMAN-IMPLEMENTATION-SPEC-TEMPLATE.md:
- Sheet names (one pass). Derive the full Tableau sheet-name list from the plan (and mock titles). Confirm the entire list in one interaction — never one sheet at a time.
- Root
IMPLEMENTATION-SPEC.md: decision register with rationale, seams, numbered build order (parameters before calculated fields that read them; patterns before the sheets that instantiate them), verification checklist, open-items register. spec/dashboards/<view>.mdper declared view: prose tile table, sidebar blocks, sizing rules (range sizing with a minimum; tiled percentage containers; never floating), and per-sheet slot tables (Text / Colour / Rows / Columns / Filter / Tooltip).- Coverage carrier: every plan id (Elements, Filters, Interactions) must appear on an
Element: <id>line somewhere in the tree. Show the coverage checklist to the analyst before asking for approval. - Simplest-primitive: any DZV / LOD / table calc / parameter action needs a written justification nearby.
spec/dashboards/shared-sidebar.md(optional) when header/sidebar/nav is shared across views.spec/patterns.mdonly when two or more sheets share aPattern: <name>; omit empty support pages rather than stubbing them.- Supporting pages as needed:
calculations.md,parameters.md,fields.md.
bashpython "${CLAUDE_PLUGIN_ROOT}/skills/tableau-spec/scripts/spec.py" commit "<project-dir>"
On success: spec = approved, build = skipped. Re-running mock still stales spec;
re-running spec overwrites the root guide in place.
Notes
- Scripts are the executable contract. Do not hand-edit
STATE.md. - A worked human-route example lives under
demo/human-route/(Sales Performance). - Full schema:
CONTRACT.mdat the repo root.


