Skip to content

AI-native design editor. Open-source Figma alternative.

Sync specs and docs with master: polygon/star tools, resizable panels, code quality

Anton A S6503c9a26735
diff --git a/docs/development/roadmap.md b/docs/development/roadmap.md
index 8705846dd..98fc400df 100644
--- a/docs/development/roadmap.md
+++ b/docs/development/roadmap.md
@@ -73,6 +73,10 @@ Components, instances, overrides, variants, variables, collections, modes/themes
- Effects panel UI (drop shadow, inner shadow, layer/background/foreground blur)
- Independent corner radius controls (per-corner toggle in Appearance section)
- GitHub Actions CI/CD for Windows (x64, arm64) and macOS (x64, arm64) builds
+- Polygon and Star drawing tools with pointCount and starInnerRadius
+- Resizable left/right panels via reka-ui Splitter (persistent layout)
+- @/ import alias, shared types module (src/types.ts, src/global.d.ts)
+- Codebase lint-clean: 0 oxlint warnings, 0 tsgo type errors
**Planned:**
- Variant switching
diff --git a/docs/guide/features.md b/docs/guide/features.md
index 373287fc3..6eb0d5bf9 100644
--- a/docs/guide/features.md
+++ b/docs/guide/features.md
@@ -12,6 +12,10 @@ Copy/paste between OpenPencil and Figma. When you copy in Figma, OpenPencil deco
The pen tool uses Figma's vector network model — not simple paths. Click to place corner points, click+drag for bezier curves with tangent handles. Supports open and closed paths. Vector data uses the same `vectorNetworkBlob` binary format as Figma.
+## Shape Tools
+
+The toolbar provides all basic Figma shape tools: Rectangle (<kbd>R</kbd>), Ellipse (<kbd>O</kbd>), Line (<kbd>L</kbd>), Polygon, and Star. Polygon and Star are in the shapes flyout — click and hold the Rectangle tool to access them. Polygon draws regular polygons (default 3 sides) using a `pointCount` property. Star draws pointed stars (default 5 points) with a configurable `starInnerRadius` (default 0.38). All shapes support fill, stroke, hover highlight, and selection outline.
+
## Auto-Layout
Yoga WASM provides CSS flexbox layout. Frames support:
@@ -49,6 +53,8 @@ HSV color selection with hue slider, alpha slider, hex input, and opacity contro
Tree view of the document hierarchy using Reka UI Tree component. Expand/collapse frames, drag to reorder (changes z-order), toggle visibility per node.
+Both the layers panel and properties panel are resizable — drag the edge between panels and canvas to adjust width (default 15%, range 10–30%). Layout persists across reloads.
+
## Properties Panel
Context-sensitive panel with sections:
diff --git a/docs/guide/figma-comparison.md b/docs/guide/figma-comparison.md
index 0c39a2053..07e84504b 100644
--- a/docs/guide/figma-comparison.md
+++ b/docs/guide/figma-comparison.md
@@ -13,9 +13,9 @@ Feature-by-feature comparison of Figma Design capabilities with Open Pencil's cu
| Feature | Status | Notes |
|---------|--------|-------|
| Toolbar with design tools | ✅ | Bottom toolbar (UI3 style): Select, Frame, Section, Rectangle, Ellipse, Line, Text, Hand, Pen |
-| Layers panel (left sidebar) | ✅ | Tree view with expand/collapse, drag reorder, visibility toggle |
+| Layers panel (left sidebar) | ✅ | Tree view with expand/collapse, drag reorder, visibility toggle; resizable width |
| Pages panel | ✅ | Add, delete, rename pages; per-page viewport state |
-| Properties panel (right sidebar) | ✅ | Sections: Appearance, Fill, Stroke, Typography, Layout, Position |
+| Properties panel (right sidebar) | ✅ | Sections: Appearance, Fill, Stroke, Effects, Typography, Layout, Position; resizable width |
| Zoom & pan | ✅ | Ctrl+scroll, pinch, ⌘+/⌘−/⌘0, space+drag, middle mouse, hand tool (H) |
| Canvas rulers | ✅ | Top/left rulers with selection highlight bands and coordinate badges |
| Canvas background color | ✅ | Per-page background via properties panel |
@@ -33,7 +33,7 @@ Feature-by-feature comparison of Figma Design capabilities with Open Pencil's cu
| Feature | Status | Notes |
|---------|--------|-------|
-| Shape tools (Rectangle, Ellipse, Line, Polygon, Star) | ✅ | All basic shape types supported |
+| Shape tools (Rectangle, Ellipse, Line, Polygon, Star) | ✅ | All basic shape types; polygon side count and star inner radius configurable |
| Frames | ✅ | Clip content, independent coordinate system |
| Groups | ✅ | ⌘G to group, ⇧⌘G to ungroup |
| Sections | ✅ | Title pills, auto-adopt overlapping nodes, luminance-adaptive text |
diff --git a/docs/reference/keyboard-shortcuts.md b/docs/reference/keyboard-shortcuts.md
index cd7f78b2d..167addc15 100644
--- a/docs/reference/keyboard-shortcuts.md
+++ b/docs/reference/keyboard-shortcuts.md
@@ -18,6 +18,8 @@ Full Figma-compatible shortcut map. ✅ = implemented.
| <kbd>R</kbd> | Rectangle | ✅ |
| <kbd>O</kbd> | Ellipse | ✅ |
| <kbd>L</kbd> | Line | ✅ |
+| — | Polygon | ✅ (flyout only) |
+| — | Star | ✅ (flyout only) |
| <kbd>⇧</kbd><kbd>L</kbd> | Arrow | |
| <kbd>P</kbd> | Pen | ✅ |
| <kbd>⇧</kbd><kbd>P</kbd> | Pencil | |
diff --git a/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/.openspec.yaml b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/.openspec.yaml
new file mode 100644
index 000000000..b51d4740b
--- /dev/null
+++ b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/.openspec.yaml
@@ -0,0 +1 @@
+type: change
diff --git a/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/design.md b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/design.md
new file mode 100644
index 000000000..8ec862919
--- /dev/null
+++ b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/design.md
@@ -0,0 +1,25 @@
+# Design: Sync Polygon/Star Tools, Resizable Panels, Code Quality
+
+## Approach
+
+Documentation-only change. Update specs and docs to match already-implemented features.
+
+## Delta-Specs
+
+### editor-ui
+- Add Polygon and Star to toolbar tool list
+- Add flyout shortcut labels
+- Add resizable panels requirement (Splitter)
+- Add throttled surface recreation during resize
+
+### scene-graph
+- Add `pointCount` and `starInnerRadius` fields to SceneNode
+- Add POLYGON/STAR to Tool type
+
+### canvas-rendering
+- Add polygon/star rendering requirement (regular polygon path, star inner radius)
+
+### tooling
+- Add @/ import alias requirement
+- Add shared types module requirement
+- Note lint/typecheck clean state (0 warnings, 0 errors)
diff --git a/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/proposal.md b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/proposal.md
new file mode 100644
index 000000000..6986b44ff
--- /dev/null
+++ b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/proposal.md
@@ -0,0 +1,19 @@
+# Proposal: Sync Polygon/Star Tools, Resizable Panels, Code Quality
+
+## Why
+
+12 commits merged from master (af3db9f..70c88dd) introduce new drawing tools, UI improvements, and codebase-wide quality improvements not yet reflected in specs, docs, or Figma comparison matrix.
+
+## What Changes
+
+### New features
+1. **Polygon and Star tools** — POLYGON (triangle icon) and STAR (star icon) added to shapes flyout. Renderer draws regular polygons and stars using `pointCount` and `starInnerRadius` SceneNode properties. Polygon defaults to 3 sides, Star to 5 points with 0.38 inner ratio. Flyout shows keyboard shortcuts aligned right.
+2. **Resizable panels** — left (layers) and right (properties) panels resizable via reka-ui Splitter. Default 15% width, min 10%, max 30%. Layout persists via auto-save-id. WebGL surface recreation throttled during resize.
+
+### Code quality (no user-facing feature change)
+3. **@/ import alias** — all `../` imports rewritten to `@/` paths via vite resolve alias
+4. **Type consolidation** — shared types (Vector, Matrix, Rect) moved to `src/types.ts`, Window API declarations to `src/global.d.ts`
+5. **Lint/typecheck clean** — 0 warnings, 0 type errors (was 66 + 30+)
+6. **oxfmt formatting** — consistent code formatting across codebase
+7. **Firefox number spinner fix** — global CSS for hiding spinners
+8. **ScrubInput cursor fix** — pointer events moved to container
diff --git a/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/specs/canvas-rendering/spec.md b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/specs/canvas-rendering/spec.md
new file mode 100644
index 000000000..3ad83d15c
--- /dev/null
+++ b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/specs/canvas-rendering/spec.md
@@ -0,0 +1,14 @@
+# canvas-rendering Specification (delta)
+
+## New Requirements
+
+### Requirement: Polygon and Star rendering
+The renderer SHALL draw POLYGON and STAR nodes as regular polygon paths. For POLYGON, a path with `pointCount` vertices is generated equidistant around the node's center. For STAR, `pointCount * 2` vertices alternate between outer radius and inner radius (scaled by `starInnerRadius`). Both types support fill, stroke, hover highlight, and selection outline. The starting vertex is at the top (−π/2 rotation offset).
+
+#### Scenario: Render polygon
+- **WHEN** a POLYGON node with pointCount=3 exists on canvas
+- **THEN** an equilateral triangle is rendered within the node's bounding box
+
+#### Scenario: Render star
+- **WHEN** a STAR node with pointCount=5 and starInnerRadius=0.38 exists
+- **THEN** a 5-pointed star is rendered with inner points at 38% of the outer radius
diff --git a/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/specs/editor-ui/spec.md b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/specs/editor-ui/spec.md
new file mode 100644
index 000000000..b7083c1a8
--- /dev/null
+++ b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/specs/editor-ui/spec.md
@@ -0,0 +1,38 @@
+# editor-ui Specification (delta)
+
+## Modified Requirements
+
+### Requirement: Bottom toolbar (updated)
+The toolbar SHALL include Polygon and Star in the shapes flyout alongside Rectangle, Line, and Ellipse. The flyout dropdown SHALL show keyboard shortcuts right-aligned for each tool (R, L, O). POLYGON and STAR are flyout-only — no dedicated keyboard shortcuts.
+
+#### Scenario: Polygon tool in flyout
+- **WHEN** user opens the shapes flyout
+- **THEN** Polygon (triangle icon) and Star (star icon) are listed with other shape tools
+
+#### Scenario: Draw polygon on canvas
+- **WHEN** user selects Polygon tool and drags on canvas
+- **THEN** a POLYGON node is created with default 3 sides
+
+#### Scenario: Draw star on canvas
+- **WHEN** user selects Star tool and drags on canvas
+- **THEN** a STAR node is created with 5 points and 0.38 inner radius
+
+## New Requirements
+
+### Requirement: Resizable panels
+The left (layers) and right (properties) panels SHALL be resizable via reka-ui Splitter components (SplitterGroup, SplitterPanel, SplitterResizeHandle). Default width: 15%, min: 10%, max: 30%. Layout SHALL persist across reloads via auto-save-id. Resize handle highlights blue on hover. The 8px-wide handle uses negative margins with a centered 1px visible line.
+
+#### Scenario: Resize layers panel
+- **WHEN** user drags the resize handle between layers panel and canvas
+- **THEN** the layers panel width changes and the canvas resizes accordingly
+
+#### Scenario: Panel size persists
+- **WHEN** user resizes panels and reloads the page
+- **THEN** panel widths are restored to the previous sizes
+
+### Requirement: Throttled WebGL surface recreation
+The CanvasKit surface SHALL be recreated at most once per animation frame during panel resize, coalesced via requestAnimationFrame in the ResizeObserver callback.
+
+#### Scenario: Panel resize performance
+- **WHEN** user drags a panel resize handle continuously
+- **THEN** the WebGL surface is recreated at most once per frame, not on every ResizeObserver tick
diff --git a/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/specs/scene-graph/spec.md b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/specs/scene-graph/spec.md
new file mode 100644
index 000000000..0f06095f9
--- /dev/null
+++ b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/specs/scene-graph/spec.md
@@ -0,0 +1,17 @@
+# scene-graph Specification (delta)
+
+## New Requirements
+
+### Requirement: Polygon and Star node properties
+SceneNode SHALL include `pointCount: number` (default 5) and `starInnerRadius: number` (default 0.38). POLYGON nodes use `pointCount` as the number of sides (minimum 3). STAR nodes use `pointCount` as the number of outer points and `starInnerRadius` as the ratio of inner to outer radius.
+
+#### Scenario: Create polygon node
+- **WHEN** a POLYGON node is created with pointCount=6
+- **THEN** the node stores pointCount=6 and renders as a regular hexagon
+
+#### Scenario: Create star node
+- **WHEN** a STAR node is created with pointCount=5 and starInnerRadius=0.38
+- **THEN** the node stores both properties and renders as a 5-pointed star
+
+### Requirement: Tool type includes Polygon and Star
+The Tool type union SHALL include POLYGON and STAR. The TOOLS array SHALL include POLYGON and STAR in the Rectangle flyout. TOOL_SHORTCUTS SHALL NOT include entries for Polygon or Star (flyout-only tools).
diff --git a/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/specs/tooling/spec.md b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/specs/tooling/spec.md
new file mode 100644
index 000000000..808ced3d5
--- /dev/null
+++ b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/specs/tooling/spec.md
@@ -0,0 +1,24 @@
+# tooling Specification (delta)
+
+## New Requirements
+
+### Requirement: @/ import alias
+The project SHALL configure a `@/` → `src/` path alias in both `vite.config.ts` (resolve.alias) and `tsconfig.json` (paths). All cross-directory imports SHALL use `@/` instead of relative `../` paths. Same-directory `./` imports are kept as-is.
+
+#### Scenario: Import with alias
+- **WHEN** a component in `src/components/` imports from `src/engine/`
+- **THEN** the import uses `@/engine/` instead of `../../engine/`
+
+### Requirement: Shared types module
+Shared primitive types (Vector, Matrix, Rect) SHALL be defined in `src/types.ts` and imported across the codebase. Window API declarations (File System Access, queryLocalFonts) SHALL be in `src/global.d.ts`. Inline duplicates SHALL be eliminated.
+
+#### Scenario: Shared Vector type
+- **WHEN** multiple files need a 2D point type
+- **THEN** they import `Vector` from `@/types` instead of defining their own
+
+### Requirement: Zero lint and type errors
+The codebase SHALL maintain 0 oxlint warnings and 0 tsgo type errors. `bun run check` SHALL pass cleanly.
+
+#### Scenario: Clean check
+- **WHEN** `bun run check` is executed
+- **THEN** both lint and typecheck pass with zero issues
diff --git a/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/tasks.md b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/tasks.md
new file mode 100644
index 000000000..b03dccef0
--- /dev/null
+++ b/openspec/changes/archive/2026-02-28-sync-polygon-star-panels/tasks.md
@@ -0,0 +1,21 @@
+# Tasks: Sync Polygon/Star Tools, Resizable Panels, Code Quality
+
+Reference: 12 commits from master (af3db9f..70c88dd).
+
+## 1. Merge Delta-Specs into Main Specs
+
+- [x] 1.1 Update `openspec/specs/editor-ui/spec.md` — add Polygon/Star to toolbar tool list in "Bottom toolbar" requirement, add flyout shortcut labels. Add "Resizable panels" requirement (Splitter, 15% default, 10–30% range, persist). Add "Throttled WebGL surface recreation" requirement.
+- [x] 1.2 Update `openspec/specs/scene-graph/spec.md` — add `pointCount` and `starInnerRadius` fields. Add POLYGON/STAR to Tool type. Note flyout-only (no keyboard shortcut).
+- [x] 1.3 Update `openspec/specs/canvas-rendering/spec.md` — add polygon/star rendering requirement (regular polygon path from pointCount, star inner radius, fill/stroke/hover/selection support).
+- [x] 1.4 Update `openspec/specs/tooling/spec.md` — add @/ import alias requirement, shared types module (src/types.ts, src/global.d.ts), zero lint/type error maintenance requirement.
+
+## 2. Update VitePress Docs
+
+- [x] 2.1 Update `docs/guide/features.md` — add "Shape Tools" section covering all drawing tools including Polygon and Star. Update "Properties Panel" to mention resizable panels. Mention @/ import alias in Desktop App or add brief code quality note.
+- [x] 2.2 Update `docs/guide/figma-comparison.md` — update "Shape tools" row notes to mention Polygon/Star with pointCount and starInnerRadius. Add resizable panels note under "Layers panel" or "Properties panel" rows. Update coverage count and date.
+- [x] 2.3 Update `docs/reference/keyboard-shortcuts.md` — add Polygon and Star tools (no shortcut, flyout only) to Tools table.
+- [x] 2.4 Update `docs/development/roadmap.md` — add Polygon/Star tools, resizable panels, @/ alias, type consolidation, lint-clean codebase to Phase 4 Delivered.
+
+## 3. Verify
+
+- [x] 3.1 Run `bun run docs:build` to verify VitePress build passes.
diff --git a/openspec/specs/canvas-rendering/spec.md b/openspec/specs/canvas-rendering/spec.md
index 14aaa2602..8adb2c018 100644
--- a/openspec/specs/canvas-rendering/spec.md
+++ b/openspec/specs/canvas-rendering/spec.md
@@ -158,3 +158,14 @@ The renderer SHALL coalesce multiple render requests within a single frame using
#### Scenario: Rapid state changes
- **WHEN** 10 state changes trigger renders within one frame
- **THEN** only one actual render occurs
+
+### Requirement: Polygon and Star rendering
+The renderer SHALL draw POLYGON and STAR nodes as regular polygon paths. For POLYGON, a path with `pointCount` vertices (minimum 3) is generated equidistant around the node's center. For STAR, `pointCount * 2` vertices alternate between outer radius and inner radius (scaled by `starInnerRadius`). Both types support fill, stroke, hover highlight, and selection outline. The starting vertex is at the top (−π/2 rotation offset).
+
+#### Scenario: Render polygon
+- **WHEN** a POLYGON node with pointCount=3 exists on canvas
+- **THEN** an equilateral triangle is rendered within the node's bounding box
+
+#### Scenario: Render star
+- **WHEN** a STAR node with pointCount=5 and starInnerRadius=0.38 exists
+- **THEN** a 5-pointed star is rendered with inner points at 38% of the outer radius
diff --git a/openspec/specs/editor-ui/spec.md b/openspec/specs/editor-ui/spec.md
index 6b4dfb6e1..1ed9d8d8a 100644
--- a/openspec/specs/editor-ui/spec.md
+++ b/openspec/specs/editor-ui/spec.md
@@ -11,7 +11,7 @@ The editor UI SHALL be built with Vue 3, VueUse composables, and Reka UI headles
- **THEN** the Vue 3 application renders with canvas, toolbar, layers panel, and properties panel
### Requirement: Bottom toolbar
-The toolbar SHALL be positioned at the bottom of the screen (Figma UI3 style) with tool selection: Select (V), Frame (F), Section (S, in Frame flyout), Rectangle (R), Ellipse (O), Line (L), Text (T), Hand (H), Pen (P).
+The toolbar SHALL be positioned at the bottom of the screen (Figma UI3 style) with tool selection: Select (V), Frame (F), Section (S, in Frame flyout), Rectangle (R), Ellipse (O), Line (L), Polygon (flyout), Star (flyout), Text (T), Hand (H), Pen (P). The shapes flyout (Rectangle, Line, Ellipse, Polygon, Star) SHALL display keyboard shortcuts right-aligned for tools that have them.
#### Scenario: Tool selection via keyboard
- **WHEN** user presses R
@@ -21,6 +21,18 @@ The toolbar SHALL be positioned at the bottom of the screen (Figma UI3 style) wi
- **WHEN** user opens the Frame tool flyout
- **THEN** both Frame and Section tools are available
+#### Scenario: Shapes flyout includes Polygon and Star
+- **WHEN** user opens the shapes flyout
+- **THEN** Polygon (triangle icon) and Star (star icon) are listed alongside Rectangle, Line, and Ellipse
+
+#### Scenario: Draw polygon on canvas
+- **WHEN** user selects Polygon tool and drags on canvas
+- **THEN** a POLYGON node is created with default 3 sides
+
+#### Scenario: Draw star on canvas
+- **WHEN** user selects Star tool and drags on canvas
+- **THEN** a STAR node is created with 5 points and 0.38 inner radius
+
### Requirement: Layers panel with tree view
The layers panel SHALL display a tree view of the document hierarchy using Reka UI Tree with expand/collapse and drag reordering.
@@ -170,3 +182,21 @@ The Appearance section SHALL show a corner radius toggle button for RECTANGLE, R
#### Scenario: Toggle back to uniform
- **WHEN** user clicks the independent corners button while in independent mode
- **THEN** a single corner radius input appears, set to the top-left value
+
+### Requirement: Resizable panels
+The left (layers) and right (properties) panels SHALL be resizable via reka-ui Splitter components (SplitterGroup, SplitterPanel, SplitterResizeHandle). Default width SHALL be 15%, minimum 10%, maximum 30%. Panel layout SHALL persist across reloads via auto-save-id. The resize handle SHALL be 8px wide with negative margins and a centered 1px visible line that highlights blue on hover/drag.
+
+#### Scenario: Resize layers panel
+- **WHEN** user drags the resize handle between layers panel and canvas
+- **THEN** the layers panel width changes and the canvas resizes accordingly
+
+#### Scenario: Panel size persists
+- **WHEN** user resizes panels and reloads the page
+- **THEN** panel widths are restored to the previous sizes
+
+### Requirement: Throttled WebGL surface recreation during resize
+The CanvasKit surface SHALL be recreated at most once per animation frame during panel resize, coalesced via requestAnimationFrame in the ResizeObserver callback.
+
+#### Scenario: Panel resize performance
+- **WHEN** user drags a panel resize handle continuously
+- **THEN** the WebGL surface is recreated at most once per frame
diff --git a/openspec/specs/scene-graph/spec.md b/openspec/specs/scene-graph/spec.md
index 18af8d2f8..2a6badf25 100644
--- a/openspec/specs/scene-graph/spec.md
+++ b/openspec/specs/scene-graph/spec.md
@@ -185,3 +185,17 @@ SceneNode SHALL include `independentCorners` (boolean), `topLeftRadius`, `topRig
#### Scenario: Independent corners
- **WHEN** a rectangle has `independentCorners: true` with topLeftRadius=8 and topRightRadius=0
- **THEN** the rectangle renders with rounded top-left and sharp top-right
+
+### Requirement: Polygon and Star node properties
+SceneNode SHALL include `pointCount: number` (field default 5) and `starInnerRadius: number` (default 0.38). POLYGON nodes use `pointCount` as the number of sides (minimum 3); the Polygon tool overrides pointCount to 3 at creation. STAR nodes use `pointCount` as the number of outer points (default 5) and `starInnerRadius` as the ratio of inner to outer radius.
+
+#### Scenario: Create polygon node
+- **WHEN** a POLYGON node is created with pointCount=6
+- **THEN** the node stores pointCount=6 and renders as a regular hexagon
+
+#### Scenario: Create star node
+- **WHEN** a STAR node is created with pointCount=5 and starInnerRadius=0.38
+- **THEN** the node stores both properties and renders as a 5-pointed star
+
+### Requirement: Tool type includes Polygon and Star
+The Tool type union SHALL include POLYGON and STAR. The TOOLS array SHALL include POLYGON and STAR in the Rectangle shapes flyout. No dedicated keyboard shortcuts are assigned to Polygon or Star.
diff --git a/openspec/specs/tooling/spec.md b/openspec/specs/tooling/spec.md
index 12ae434c9..d2e00a727 100644
--- a/openspec/specs/tooling/spec.md
+++ b/openspec/specs/tooling/spec.md
@@ -57,3 +57,24 @@ Tailwind CSS 4 SHALL be integrated via @tailwindcss/vite plugin.
- **WHEN** a Vue component uses Tailwind utility classes
- **THEN** the corresponding CSS is generated and applied
+### Requirement: @/ import alias
+The project SHALL configure a `@/` → `src/` path alias in both `vite.config.ts` (resolve.alias) and `tsconfig.json` (paths). All cross-directory imports SHALL use `@/` instead of relative `../` paths. Same-directory `./` imports are kept as-is.
+
+#### Scenario: Import with alias
+- **WHEN** a component in `src/components/` imports from `src/engine/`
+- **THEN** the import uses `@/engine/` instead of `../../engine/`
+
+### Requirement: Shared types module
+Shared primitive types (Vector, Matrix, Rect) SHALL be defined in `src/types.ts` and imported across the codebase. Window API declarations (File System Access, queryLocalFonts) SHALL be in `src/global.d.ts`. Inline type duplicates SHALL be eliminated.
+
+#### Scenario: Shared Vector type
+- **WHEN** multiple files need a 2D point type
+- **THEN** they import `Vector` from `@/types` instead of defining their own
+
+### Requirement: Zero lint and type errors
+The codebase SHALL maintain 0 oxlint warnings and 0 tsgo type errors. `bun run check` SHALL pass cleanly.
+
+#### Scenario: Clean check
+- **WHEN** `bun run check` is executed
+- **THEN** both lint and typecheck pass with zero issues
+