# Panel System — DNA (D-2026-08-16-557)

**Module id:** `system.panel-system`
**Version:** 1.0.0 (v0.6 Day 1)
**Purpose:** Single unified panel runtime. Manages every panel in the workspace — Edge Panel, CMS Panel, Dev Panel, VibeChat, custom panels. No S1/S2/S3. No special-case chrome surfaces. One module, one runtime.

## Invariants (DNA-level, not negotiable)

- I-PS-001: All panels are runtime objects. Panels are NOT modules. A module is content; a panel is a UI surface that hosts one or more modules in its tabs.
- I-PS-002: Tabs are UI wrappers inside a panel. Tabs are NOT modules. A tab may reference a module.
- I-PS-003: The Panel System module is the ONLY place where `createPanel`, `destroyPanel`, `float`, `pin`, `dock`, `minimize`, `maximize`, `resize` exist. No duplicate logic anywhere.
- I-PS-004: The Panel System module is reachable from any module that needs to spawn a panel via `import { PanelSystem } from '@fvcms/system/panel-system'`.
- I-PS-005: Pill state and panel state are stored in the same map (`panelStates`). Pills are not separate runtime entities; they are always-visible handles for docked panels.

## What this module is NOT

- NOT a chrome surface (no UI of its own)
- NOT a multi-surface OS (no S1/S2/S3, no surfaces-as-docks)
- NOT a coordinator for the Edge Panel's internal surfaces (those are Edge Panel internals, see Edge Panel module)
- NOT the same as the ID43 `fvcms-panel-manager` (that one is for CMS dev panels only, a sibling, not a parent)

## Coverage

- All 5 panel states: floating, pinned L/R, docked T/B, minimized, maximized
- All 4 dock edges (right-only by default for Edge Panel; L/R for CMS, Dev, VibeChat; T/B for VibeChat only)
- Resize: left, right, top edges
- Mobile 45% rule for pinned panels
- Pill minimize/maximize transitions
- Pro Mode lock (`minimize()` returns `reason: 'pro_mode_locked'` when `operatingMode === 'pro'`)
