---
id: fvcms.pact.panel-system.001
freshvibe_way_version: v8
date: 2026-08-04
last_rewritten: 2026-08-04 (Phase 4 of plan a452, FWV v8.3 alignment)
applies_to: [panel-system, fvcms-panel-manager, all app-fragments/*-panel]
---

# Rule: Panel System Singleton

## Rule

The Panel System (the multi-panel state machine that mounts, docks, hides, and removes panels) is a SINGLETON.

There must be exactly one `fvcms-panel-manager` instance per freshvibe-cms mount. No exceptions. The `mountPanel(id, options)` function refuses to create a second instance.

## Reason

Multiple panel managers cause:

- State desync (which manager is "in charge" of panel X?)
- Event handler conflicts (two managers listening to the same mouse events)
- Visual glitches (panels docked to different edges fighting for screen real estate)
- Memory leaks (each manager retains references to panels it no longer knows about)

The Constitution (`app-pact.md` §3) establishes the panel system as a "single owner" component. This rule is the testable form of that.

## How to verify

1. After chrome.mount, count the `fvcms-panel-manager` instances in the DOM. Must be exactly 1.
2. Call `window.__oscarPanelManager` (the exposed global). It must return the same object on every call.
3. The Atlas (`app-trace-atlas/atlas.json`) lists the panel-system as a single module. If it ever shows two, the rule is violated.

## How to fix a violation

1. Find the second instance (grep for `fvcms-panel-manager` in any file)
2. Remove the second instance OR merge it into the first
3. Verify only one instance remains
4. Update the Atlas if the panel-system was split into multiple modules

## Related

- F-03 (Failure Mode): Multiple chrome instances mounted (the broader principle this rule enforces)
- I-001 (Invariant): The engine doesn't depend on any specific page builder (parallel principle for engine layer)
- G-10 (Hard Gate): Every panel mounts via the panel manager (not direct DOM) — the rule that operationalises this

## History

- 2026-08-04: Created as part of Phase 4 of plan a452 (FWV v8.3 alignment)
- (no prior versions — first formalisation)
