diff --git a/.claude/agents/pencil-designer.md b/.claude/agents/pencil-designer.md index 838bf8788..68227bf09 100644 --- a/.claude/agents/pencil-designer.md +++ b/.claude/agents/pencil-designer.md @@ -1,17 +1,17 @@ --- name: pencil-designer -description: A dashboard or website screen needs a design in Pencil before any frontend code is written. Design in design.pen or website/website.pen, export, and hand off for sign-off; never write React. +description: A dashboard or website screen needs a design before any frontend code is written. Design in design.fig or website/website.fig (OpenPencil), export, and hand off for sign-off; never write React. tools: "*" --- # Pencil Designer Agent -Designs screens in the Pencil canvas before any frontend code exists. You work only through Pencil: the `mcp__pencil__*` tools (local, Pencil app open) or the Pen CLI (`pen interactive`, cloud or local). Both run the same `execute` language; the `design-export` skill has the side-by-side table. You never read, grep, cat, sed, or edit `.pen` files by hand. +Designs screens before any frontend code exists. The dashboard (`design.fig`), telemetry (`telemetry-receiver/telemetry-dashboard.fig`) and website (`website/website.fig`) designs are `.fig` files; you change them only through OpenPencil (the desktop app or `openpencil-mcp` on the maintainer's machine, or headless `openpencil eval -w` / `openpencil tool call` from a [ValgulNecron/open-pencil](https://github.com/ValgulNecron/open-pencil) `master` checkout) or Figma. You never read, grep, cat, sed, or edit a `.fig` file by hand. ## When to use -- A new dashboard screen or component in `design.pen` (canonical dashboard design). -- A new or changed website page in `website/website.pen`. +- A new dashboard screen or component in `design.fig` (canonical dashboard design). +- A new or changed website page in `website/website.fig`. - A design pass for a spec task in `specs/-/tasks.md`. Do not use this agent to write React, routes, or tests. Hand that to `web-builder`. @@ -20,7 +20,7 @@ Do not use this agent to write React, routes, or tests. Hand that to `web-builde Stop and report if any check fails. -1. **Pencil access.** Use the `mcp__pencil__*` tools if they exist in this session (check with ToolSearch or the tool list). Otherwise use the Pen CLI: `pen` on PATH (`npm install -g @pen.dev/cli`) and `pen status` shows the `PEN_CLI_KEY` key as active. Never print the key. If neither works, stop and say: "Design needs Pencil MCP or the Pen CLI with PEN_CLI_KEY." Then offer the `local-prompt` skill. +1. **Design tool access.** An OpenPencil MCP server in this session, or a built OpenPencil `master` checkout for the CLI. If neither works, stop, say so, and offer the `local-prompt` skill. 2. **Spec is complete.** The spec folder `specs/-/` has spec.md, plan.md, and tasks.md written. Its `OPEN-DECISIONS.md` has no open entries that affect the screens. If something is open, ask the maintainer with a direct question, short options, and a recommendation. 3. **Design brief exists.** The brief must name: - branch and repo(s) @@ -40,20 +40,19 @@ Stop and report if any check fails. git fetch origin && git checkout ``` 2. Read the spec's tasks and design notes in `specs/-/`. Read `assets/design-export/MANIFEST.md` to see what is already exported. -3. Inspect the current canvas through Pencil MCP or the Pen CLI only. Do not open the `.pen` file as text. +3. Inspect the current design through `assets/design-export/` (JSON and screenshots) and the design tool. Do not open a `.fig` file as text. 4. Place new nodes as described in the `pen-canvas-layout` skill. Use the same component layout and row order. 5. Reuse existing HeroUI and Gameplane components. Do not draw a copy of something that already exists. 6. Design light and dark themes. Design mobile variants where the brief asks for them. Palette source: the HeroUI theme in `web/src/styles/globals.css`. 7. Run the `pen-componentize` skill at the end of the design pass. It promotes repeated parts to components and replaces copies with instances. -8. Save the file. Pencil MCP: ask the maintainer to save in the Pencil UI (Pencil does not autosave) and wait for the confirmation. Pen CLI: end the edit run with `save()` and `-o` set to the same `.pen` path; try risky edits on a copy (`-o /tmp/out.pen`) first. -9. Run the `design-export` skill. It exports touched nodes to: - - `assets/design-export/json/.json` - - `assets/design-export/screenshots/.png` - - `website/website-export/` for website nodes -10. Check the diff with `git diff --stat` only. Confirm the `.pen` file changed and the exports changed. Do not read the diff contents of `.pen` files. +8. Save the file. OpenPencil app or MCP: save the document (ask the maintainer when it is open on their machine). OpenPencil CLI: `eval -w` writes the file; try risky edits on a copy first. +9. Run the `design-export` skill. It regenerates: + - `assets/design-export/{fig,json,screenshots}/` and `screens.json` for `design.fig` + - `website/website-export/` for `website/website.fig` +10. Check the diff with `git diff --stat` only. Confirm the design file changed and the exports changed. Do not read the diff contents of `.fig` files. 11. Commit the design change and its exports together, signed, in one commit: ```sh - git add design.pen assets/design-export # or website/website.pen website/website-export + git add design.fig assets/design-export # website: website.fig website-export, inside the submodule git commit -s -m "feat(design): Co-Authored-By: " @@ -63,7 +62,7 @@ Stop and report if any check fails. ## Hard rules -- Never hand-edit, read, grep, cat, or sed a `.pen` file. Use Pencil MCP or the Pen CLI only. Inspect `.pen` changes with `git diff --stat` only. +- Never hand-edit, read, grep, cat, or sed a `.fig` file. Use OpenPencil or Figma. Inspect its changes with `git diff --stat` only. - No React, TypeScript, or CSS code in this agent. Handoff goes to `web-builder` after sign-off. - Login and unauthenticated screens follow CLAUDE.md rule 3. They never show cluster names, versions, server counts, or account-existence errors. Use generic copy such as "invalid credentials". - Design only the scope in the brief. Ask before adding anything else. @@ -75,7 +74,7 @@ Stop and report if any check fails. - Every screen and component in the brief is designed in light and dark (and mobile where asked). - `pen-componentize` reports no unreplaced copies. -- Exports for every touched node are committed with the design change. +- The regenerated export is committed with the design change. - Screenshots are posted and the maintainer has approved them in writing. - The handoff note names the screens, export paths, and T-numbers ready for `web-builder`. @@ -85,7 +84,7 @@ Stop and report if any check fails. Design: Spec: specs/-/ T, T Screens: (light, dark, mobile), -Exports: assets/design-export/json/.json, assets/design-export/screenshots/.png +Exports: assets/design-export/{json,screenshots}/.* (file names from screens.json) Commit: Sign-off: ``` diff --git a/.claude/agents/pr-reviewer.md b/.claude/agents/pr-reviewer.md index b46f8a58e..d54187610 100644 --- a/.claude/agents/pr-reviewer.md +++ b/.claude/agents/pr-reviewer.md @@ -40,7 +40,7 @@ gh api repos/GameplanePanel/Gameplane/issues//labels -q '[.[].name]|join(", " ## Core rules to check - **Design first (rule 1):** a UI change in `web/` or `website/` has a design change and `assets/design-export/` (or `website/website-export/`) update in the same PR. -- **No .pen hand edits (rule 2):** any diff touching a `.pen` file is a blocking finding. Inspect only with `git diff --stat`. +- **Design file and export together (rules 1 and 2):** a diff that changes `design.fig` (or `telemetry-dashboard.fig`) without the regenerated `assets/design-export/` (or `telemetry-receiver/design-export/`) is a blocking finding. Inspect `.fig` files only with `git diff --stat`. - **Login privacy (rule 3):** `/login` and unauthenticated views must not show cluster names, versions, server counts or account-existence errors. - **No suppressions (rule 4):** no `//nolint`, `eslint-disable`, `@ts-ignore`, or loosened `.golangci.yml` / `web/eslint.config.js`. - **Strict TypeScript (rule 5):** no unjustified `any`; every promise `await`ed or `void`-prefixed. diff --git a/.claude/agents/web-builder.md b/.claude/agents/web-builder.md index 713c9dedd..6e0af5d93 100644 --- a/.claude/agents/web-builder.md +++ b/.claude/agents/web-builder.md @@ -1,6 +1,6 @@ --- name: web-builder -description: Dashboard React code must be built from an approved Pencil design export. Build the screen, route, data layer, and tests, then compile-check; stop and hand back if no approved design exists. +description: Dashboard React code must be built from an approved design export. Build the screen, route, data layer, and tests, then compile-check; stop and hand back if no approved design exists. tools: "*" --- @@ -13,7 +13,7 @@ Builds dashboard React code from an approved design export. The design is the so - A new dashboard screen whose design is approved (see `pencil-designer`). - A change to an existing `web/` screen that has an approved design export. -Do not use this agent to design. Do not use it to change `design.pen` or anything in `.pen` form. +Do not use this agent to design. Do not use it to change `design.fig` or any `.fig` file. ## Preconditions @@ -68,7 +68,7 @@ Read `docs/agent-architecture.md` first. It maps the component to its `specs.md` - Write code through `Workflow` scripts. Use `parallel()` or `pipeline()` for independent screens. - Start every agent at `haiku`. Set `model:` explicitly on every `agent()` call. - Escalate `haiku` to `sonnet` to `opus` only on a functional failure. `fable` needs the maintainer's explicit permission. -- Brief each fix agent with the exact file paths, the exported design values, and the compile check to run. Tell them not to re-read `CLAUDE.md` or `AGENTS.md`. Tell them these rules again: explicit `model:`, compile-only checks, no `.pen` edits, tests never weakened. +- Brief each fix agent with the exact file paths, the exported design values, and the compile check to run. Tell them not to re-read `CLAUDE.md` or `AGENTS.md`. Tell them these rules again: explicit `model:`, compile-only checks, no `.fig` edits, tests never weakened. - Review one tier up. One reviewer per batch checks `git diff` against the brief. ## Hard rules @@ -79,7 +79,7 @@ Read `docs/agent-architecture.md` first. It maps the component to its `specs.md` - `/login` and unauthenticated views never show cluster names, versions, server counts, or account-existence errors. Use generic messages such as "invalid credentials". - Never edit or delete existing tests, and never change coverage settings, without the maintainer's written sign-off. - Local verification is compile-only: `npx tsc --noEmit` in `web/`. Do not run `npm test`, lint, `make test`, `make lint`, or `make cover`. CI is the verifier. -- Do not touch `.pen` files. Do not call `mcp__pencil__*` or the Pen CLI to edit designs from this agent. +- Do not touch `.fig` files. Do not call OpenPencil to edit designs from this agent. - Do not call `mcp__hearthbot__*` tools. ## Done when diff --git a/.claude/skills/design-export/SKILL.md b/.claude/skills/design-export/SKILL.md index 5f3f58caa..bb92cdfff 100644 --- a/.claude/skills/design-export/SKILL.md +++ b/.claude/skills/design-export/SKILL.md @@ -1,88 +1,28 @@ --- name: design-export -description: "After ANY edit to design.pen or website/website.pen — re-exports touched Pencil nodes to the in-git snapshot. A design edit is not finished until this runs; the export lands in the SAME commit as the design change." +description: "After ANY edit to design.fig, telemetry-receiver/telemetry-dashboard.fig or website/website.fig — regenerates the in-git snapshot of the design. A design edit is not finished until this runs; the export lands in the SAME commit as the design change." --- ## Rule 1 & 2 compliance: design exports -Every edit to `design.pen` (dashboard) or `website/website.pen` (public site) must be followed by incremental export of only the touched nodes. Never hand-edit `.pen` files; all access goes through Pencil, by either of the two paths below. +Every design edit is followed by an export in the same commit. Never hand-edit a design file: `.fig` is binary and changes only through OpenPencil (desktop app, `openpencil-mcp`, or the CLI) or Figma. -### Two ways to reach Pencil +## Regenerating the export -Both paths run the same `execute` language (`Get`, `Insert`, `Update`, `Export`, …) and produce identical exports, so use whichever the session has: +`hack/design/fig-export.ts` regenerates the whole snapshot from the `.fig`: one standalone `.fig`, one JSON dump and one 2x PNG per screen, plus `screens.json`, and the same three files for each layer listed in `parts.json` (the dialogs and badges the browser visual diff compares against). `assets/design-export/MANIFEST.md` explains the layout and the file names. -| | Pencil MCP (local) | Pen CLI (cloud or local) | -|---|---|---| -| Available when | `mcp__pencil__*` tools exist (the maintainer's machine with the Pencil app) | `pen` on PATH (`npm install -g @pen.dev/cli`) and `PEN_CLI_KEY` set (cloud project setting). Never print the key. | -| Run code | `mcp__pencil__execute` with `filePath` | `printf '%s\n' 'execute({ input: "…" })' 'save()' 'exit()' \| pen interactive -i -o ` (headless; no AI calls) | -| Screenshot | `mcp__pencil__export_nodes` (2x) | `Export([""], "png", "")` inside `execute` (2x by default) | -| Saving | Pencil does not autosave: ask the maintainer to save in the Pencil UI | `save()` writes the `-o` file; nothing else touches the file | - -The pen.dev free plan caps agent design at 5 active days a month, shared by the local MCP and the CLI on the same account (any number of calls in one day counts once), so batch design work into as few days as you can. With the CLI, edit a copy first when you are unsure (`-o /tmp/out.pen`), check it, then rerun against the real file. `-o` must equal `-i` to change the committed file in place. Check with `pen status` that the key is active. - -For exports from the CLI, use the helper next to this file. It writes the JSON and the 2x PNG for each node and never writes the `.pen` file. Its JSON is byte-identical to the MCP export: - -```sh -.claude/skills/design-export/pen-cli-export.sh design.pen assets/design-export/json assets/design-export/screenshots […] [--depth N] -# website: website/website.pen website/website-export/json website/website-export/screenshots -``` - -### When to run this skill - -- After editing any screen or component in `design.pen` or `website/website.pen` via the Pencil editor. -- Before committing the `.pen` change. -- As part of the same commit as the design change (export step is not a separate follow-up commit). - -### Pre-export checklist - -1. **Make sure the file on disk is saved.** Pencil MCP: Pencil does not autosave, so ask the user to save the design file in the GUI before exporting. Pen CLI: the edit run must have ended with `save()`. -2. **Collect touched node IDs.** Identify which screens and components were added or modified. Node IDs are visible in Pencil's node inspector or in the Get() output. -3. **Verify against MANIFEST.md.** Check `assets/design-export/MANIFEST.md` to see whether any existing node needs its export refreshed (e.g., a re-exported variant of a screen). - -### Export procedure - -For each touched node ID: - -1. **JSON export** — via `mcp__pencil__execute` running `Get("", {depth: N})` (MCP), or `pen-cli-export.sh` (CLI): - - Choose depth high enough that the node's complete structure comes through with zero `"..."` elision markers. - - Pipe output to `assets/design-export/json/.json` (website screens → `website/website-export/json/.json`). - - Validation: `python3 -m json.tool assets/design-export/json/.json > /dev/null` (or `website/website-export/json/.json` for website screens) must pass. - -2. **Screenshot export** — via `mcp__pencil__export_nodes` (MCP), or `pen-cli-export.sh` / `Export([""], "png", dir)` (CLI): - - Export the node ID at 2x scale. - - Write to `assets/design-export/screenshots/.png` (website → `website/website-export/screenshots/.png`). - - Validation: file must be non-empty with real pixel dimensions. - -3. **Content validation** — grep for a string unique to that node's body text (never in a frame name): - - Screen text, component label, or dialog copy — something that only appears in that object's own design content. - - Example: a new "Capture" screen must grep for `"not enabled"` (its body text), not `"Capture"` (which is in every capture-related frame's *name*). - - All grep hits must come from the relevant `.json` file, nowhere else in the export. - -### Incremental export — touch only what changed - -- Export only the nodes you added or edited — do NOT re-run a full export of every screen and component unless renames or structural changes make wider staleness likely. -- If a re-exported node is a variant of an existing screen (e.g., "Admin Settings — Authentication (Save rejected)"), add a row to `assets/design-export/MANIFEST.md` under an "Incremental export" section documenting the date, nodes touched, what changed, and export method/validation used. -- Keep the MANIFEST always in git so the next session can see what was exported when and why. - -### Same-commit rule - -The export MUST land in the same commit as the `.pen` file change: +It runs from a checkout of [ValgulNecron/open-pencil](https://github.com/ValgulNecron/open-pencil) `master` (`bun install`, then build `packages/pen` and `packages/core` with `bunx tsdown`); the script's header has the exact commands: ```sh -# For dashboard (design.pen) exports: -git add design.pen assets/design-export/json/.json assets/design-export/screenshots/.png assets/design-export/MANIFEST.md - -# For website (website/website.pen) exports: -git add website/website.pen website/website-export/json/.json website/website-export/screenshots/.png assets/design-export/MANIFEST.md - -git commit -s -m "design: " +cp hack/design/fig-export.ts /packages/cli/fig-export.ts +cd /packages/cli +bun fig-export.ts /design.fig /assets/design-export +bun fig-export.ts /telemetry-receiver/telemetry-dashboard.fig /telemetry-receiver/design-export +bun fig-export.ts /website/website.fig /website/website-export # commit inside the website submodule ``` -Do NOT split into two commits (one for .pen, one for export). - -### Lessons from prior passes - -- **Keyword checks must match content, not frame names.** A grep for "Capture" passes even on a hollow JSON file if the frame is named `Screen/...Capture...` — grep for the screen's unique *body text* instead. -- **Depth matters.** If a JSON export still contains `"..."` elision markers, the depth was too shallow — re-export at a higher depth until zero elisions appear. -- **Verify after extract.** Subagents may self-report success (100% completion) while still corrupting output — always re-load() exported JSON files and verify dimension/pixel counts on PNGs. -- **`includePathGeometry: true` for sparklines/paths.** If the JSON file contains vector path nodes, use `{depth: N, includePathGeometry: true}` to avoid `"geometry": "..."` elisions. +- Always re-run the whole export. It is deterministic, so screens you did not touch come out byte-identical and only what changed shows in `git diff --stat`. +- A new screen gets a file named after its `.fig` ID (`1:232` → `1-232`); existing screens keep their file names through `screens.json`. +- When the visual diff needs a new layer below screen level, add `{"file": "", "name": ""}` to `parts.json`. A top-level layer with that name wins; otherwise the name must be unique outside instances, or the script stops. +- Check: open the changed PNGs, and grep the changed JSON for body text unique to the screen (not its frame name). +- Commit together: `git add design.fig assets/design-export` (or the telemetry or website pair), `git commit -s -m "design: …"`. Do not split the design change and its export into two commits. diff --git a/.claude/skills/design-export/pen-cli-export.sh b/.claude/skills/design-export/pen-cli-export.sh deleted file mode 100755 index 08537ee2e..000000000 --- a/.claude/skills/design-export/pen-cli-export.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash -# Export Pencil nodes (JSON + 2x PNG) with the pen.dev CLI, for sessions -# without the Pencil MCP (cloud). Read-only: the .pen file is never written. -# -# Usage: pen-cli-export.sh ... [--depth N] -# Needs: pen on PATH (npm install -g @pen.dev/cli) and PEN_CLI_KEY set. -set -euo pipefail - -if [ "$#" -lt 4 ]; then - echo "usage: $0 ... [--depth N]" >&2 - exit 2 -fi - -pen_file=$1 json_dir=$2 png_dir=$3 -shift 3 -depth=80 -ids=() -while [ "$#" -gt 0 ]; do - case $1 in - --depth) depth=$2; shift 2 ;; - *) ids+=("$1"); shift ;; - esac -done - -command -v pen >/dev/null || { echo "pen CLI not found: npm install -g @pen.dev/cli" >&2; exit 1; } -[ -n "${PEN_CLI_KEY:-}" ] || { echo "PEN_CLI_KEY is not set" >&2; exit 1; } - -work=$(mktemp -d) -trap 'rm -rf "$work"' EXIT -mkdir -p "$json_dir" "$png_dir" - -{ - for id in "${ids[@]}"; do - printf 'execute({ input: "r=Get(\\"%s\\",{depth:%s,includePathGeometry:true}); Print(\\"@@JSON %s@@\\"+JSON.stringify(r)+\\"@@END@@\\")" })\n' "$id" "$depth" "$id" - printf 'execute({ input: "Export([\\"%s\\"], \\"png\\", \\"%s\\")" })\n' "$id" "$work" - done - echo 'exit()' -} | pen interactive -i "$pen_file" -o "$work/scratch.pen" >"$work/log.txt" 2>&1 - -python3 -I - "$work/log.txt" "$json_dir" "${ids[@]}" <<'PY' -import json, re, sys -log, out = sys.argv[1], sys.argv[2] -text = open(log, encoding="utf-8").read() -for node_id in sys.argv[3:]: - m = re.search(r"@@JSON " + re.escape(node_id) + r"@@(.*?)@@END@@", text, re.S) - if not m: - sys.exit(f"no JSON for {node_id}; see pen output") - raw = m.group(1) - data = json.loads(raw) - if '"..."' in raw: - sys.exit(f"{node_id}: elided content, raise --depth") - with open(f"{out}/{node_id}.json", "w", encoding="utf-8") as f: - json.dump(data, f, indent=2, ensure_ascii=False) - f.write("\n") - print(f"json {out}/{node_id}.json") -PY - -for id in "${ids[@]}"; do - [ -s "$work/$id.png" ] || { echo "no PNG for $id" >&2; exit 1; } - mv "$work/$id.png" "$png_dir/$id.png" - echo "png $png_dir/$id.png" -done diff --git a/.claude/skills/local-prompt/SKILL.md b/.claude/skills/local-prompt/SKILL.md index 1d802df0f..428ff7781 100644 --- a/.claude/skills/local-prompt/SKILL.md +++ b/.claude/skills/local-prompt/SKILL.md @@ -1,9 +1,9 @@ --- name: local-prompt -description: "Use when a piece of work needs Pencil design or frontend changes that this session cannot run (no Pencil MCP and no working Pen CLI), or the maintainer asks for a local prompt. Writes a copy-paste prompt for the maintainer's local agent." +description: "Use when a piece of work needs design (OpenPencil, for design.fig or website.fig) or frontend changes that this session cannot run, or the maintainer asks for a local prompt. Writes a copy-paste prompt for the maintainer's local agent." --- -Pencil MCP (`mcp__pencil__*`) runs only on the maintainer's local machine. Cloud sessions can do the same design work with the Pen CLI (`pen interactive`, needs `PEN_CLI_KEY`; see the `design-export` skill), so check that first: if `pen status` shows the key as active, use the `pencil-designer` agent in this session instead. Use this skill when neither path works here, or when the maintainer asks for a local prompt. It writes the prompt the maintainer pastes into a local Claude Code session. +The OpenPencil app and its MCP server run on the maintainer's local machine. Cloud sessions can edit `.fig` designs headlessly with the OpenPencil CLI from a ValgulNecron/open-pencil `master` checkout (see the `design-export` skill), so check that first and use the `pencil-designer` agent in this session when it works. Use this skill when neither path works here, or when the maintainer asks for a local prompt. It writes the prompt the maintainer pastes into a local Claude Code session. ## Steps @@ -12,7 +12,7 @@ Pencil MCP (`mcp__pencil__*`) runs only on the maintainer's local machine. Cloud 3. Collect the T-numbers for the work from `tasks.md` (`- [ ] T012 …` lines). 4. Fill in the template below. Replace every ``. Remove sections that do not apply, but keep Constraints and Done when. 5. Print the filled block in a fenced `text` block so the maintainer can copy it. If the maintainer named a shared folder, also save the same text there. -6. Tell the maintainer: paste the block into a local Claude Code session that has the Pencil MCP connected (or the Pen CLI signed in), and paste the local agent's report back into this thread. +6. Tell the maintainer: paste the block into a local Claude Code session that has OpenPencil connected, and paste the local agent's report back into this thread. ## Template @@ -29,7 +29,7 @@ Task for the local agent. Read the repo CLAUDE.md first and follow it. - Tasks: ## What to design, then build -- Design first in design.pen (dashboard) or website/website.pen (website), using the `pencil-designer` agent. +- Design first in design.fig (dashboard) or website/website.fig (website) with OpenPencil, using the `pencil-designer` agent. - Then build the React code with the `web-builder` agent from the approved design export. - Screens: - Components: @@ -41,7 +41,7 @@ Task for the local agent. Read the repo CLAUDE.md first and follow it. ## Constraints - Design first: nothing in web/ until the maintainer approves the screenshots. -- Never hand-edit or read .pen files. Use Pencil MCP or the Pen CLI only. +- Never hand-edit or read .fig files. Use OpenPencil or Figma. - Use `pen-canvas-layout` for placement, `pen-componentize` at the end of the design pass, and `design-export` in the same commit as the design change. - Compile checks only: `npx tsc --noEmit` in web/. Do not run tests or lint locally. - Signed commits (`git commit -s`), conventional prefixes, one logical unit per commit. diff --git a/.claude/skills/pen-canvas-layout/SKILL.md b/.claude/skills/pen-canvas-layout/SKILL.md index 80b6aba3e..214151053 100644 --- a/.claude/skills/pen-canvas-layout/SKILL.md +++ b/.claude/skills/pen-canvas-layout/SKILL.md @@ -1,15 +1,19 @@ --- name: pen-canvas-layout -description: "How design.pen (and the other .pen files) is organised on the canvas: components on boards at the top, one row per page below in app navigation order, variants left to right. Use whenever you add, move or rename a screen, component or note in a .pen file, or when the canvas looks disorganised." +description: "How design.fig (and the other design files) is organised on the canvas: components on boards at the top, one row per page below in app navigation order, variants left to right. Use whenever you add, move or rename a screen, component or note in design.fig, telemetry-dashboard.fig or website.fig, or when the canvas looks disorganised." --- ## Scope -- Binding for `design.pen` (dashboard). `website/website.pen` and `telemetry-receiver/telemetry-dashboard.pen` - follow the same two-zone principle (components on top, one row per page, variants to the right), with - their own page order (site navigation / dashboard views). The canonical row list below is for `design.pen` only. -- All access through Pencil: the Pencil MCP (`mcp__pencil__execute`) or the Pen CLI (`execute({ input })` in `pen interactive`; see the `design-export` skill). Never Read, grep or edit `.pen` files (CLAUDE.md core rule 2). -- Saving: Pencil does not autosave, so with the MCP ask the user to save in the Pencil UI before committing. With the CLI, end the run with `save()`. +- Binding for `design.fig` (dashboard, page `Dashboard`). `website/website.fig` and + `telemetry-receiver/telemetry-dashboard.fig` follow the same two-zone principle (components on top, one row + per page, variants to the right), with their own page order (site navigation / dashboard views). The canonical + row list below is for `design.fig` only. +- All access through OpenPencil (desktop app, `openpencil-mcp`, or `openpencil eval` with the Figma plugin API: + `figma.currentPage.children`, `node.x`/`node.y`, `node.appendChild`) or Figma. Never Read, grep or edit a `.fig` + file directly (CLAUDE.md core rule 2). +- Row labels and notes are frames named `Row NN ·