|
| 1 | +# PLAN_PR_DEBUG_SURFACES_ADVANCED_UX |
| 2 | + |
| 3 | +## Objective |
| 4 | +Plan a reusable advanced UX layer for promoted debug surfaces that improves operator speed while remaining small, opt-in, and boundary-safe. |
| 5 | + |
| 6 | +## Workflow |
| 7 | +PLAN_PR -> BUILD_PR -> APPLY_PR |
| 8 | + |
| 9 | +## PR Purpose |
| 10 | +One PR purpose only: advanced UX planning for debug surfaces. |
| 11 | + |
| 12 | +## Scope |
| 13 | +In scope: |
| 14 | +- panel group infrastructure |
| 15 | +- quick toggles |
| 16 | +- macro registry + macro executor |
| 17 | +- optional shortcut helpers |
| 18 | +- command surfaces |
| 19 | +- naming conventions |
| 20 | +- target structure |
| 21 | + |
| 22 | +Out of scope: |
| 23 | +- implementation in this PR |
| 24 | +- layout editors |
| 25 | +- docking systems |
| 26 | +- 3D-specific UX |
| 27 | +- network-specific UX |
| 28 | +- project-specific workflow implementations in shared layer |
| 29 | + |
| 30 | +## Design Constraints |
| 31 | +- docs-first only |
| 32 | +- keep v1 small and opt-in |
| 33 | +- preserve Dev Console (command/control) and Debug Overlay (telemetry/visual) separation |
| 34 | +- macros compose only public APIs and approved commands/actions |
| 35 | + |
| 36 | +## Advanced UX Components (v1) |
| 37 | +### Panel Group Infrastructure |
| 38 | +Purpose: |
| 39 | +- register reusable panel groups and apply group visibility actions. |
| 40 | + |
| 41 | +Planned shared contracts: |
| 42 | +- `DebugPanelGroupRegistry` |
| 43 | +- `registerStandardPanelGroups()` |
| 44 | + |
| 45 | +Initial shared groups: |
| 46 | +- `group.systems` |
| 47 | +- `group.rendering` |
| 48 | +- `group.scene` |
| 49 | +- `group.input` |
| 50 | +- `group.qa` |
| 51 | + |
| 52 | +### Quick Toggles |
| 53 | +Purpose: |
| 54 | +- fast common workflow switches without manual multi-command sequences. |
| 55 | + |
| 56 | +Initial shared toggles: |
| 57 | +- `toggle.overlay` |
| 58 | +- `toggle.minimal` |
| 59 | +- `toggle.systems` |
| 60 | +- `toggle.rendering` |
| 61 | + |
| 62 | +### Macro Registry + Executor |
| 63 | +Purpose: |
| 64 | +- run named macro workflows composed from approved commands/actions. |
| 65 | + |
| 66 | +Planned shared contracts: |
| 67 | +- `DebugMacroRegistry` |
| 68 | +- `DebugMacroExecutor` |
| 69 | +- `registerStandardDebugMacros()` |
| 70 | + |
| 71 | +Initial shared macros: |
| 72 | +- `macro.minimal.focus` |
| 73 | +- `macro.qa.start` |
| 74 | +- `macro.render.inspect` |
| 75 | +- `macro.scene.inspect` |
| 76 | + |
| 77 | +Macro composition rules (hard): |
| 78 | +1. Macros may call only approved public commands/actions. |
| 79 | +2. Macros may not call private runtime/overlay internals. |
| 80 | +3. Macros may not mutate panel objects directly. |
| 81 | +4. Macro execution reports must be deterministic and structured. |
| 82 | + |
| 83 | +### Optional Shortcut Helpers |
| 84 | +Purpose: |
| 85 | +- optional debug-only shortcut binding helpers for groups/macros/toggles. |
| 86 | + |
| 87 | +Planned shared contracts: |
| 88 | +- `registerDebugShortcutBindings()` |
| 89 | + |
| 90 | +Rules: |
| 91 | +- optional opt-in registration only |
| 92 | +- no mandatory global bindings |
| 93 | +- no shortcut logic in engine-core |
| 94 | + |
| 95 | +## Command Surface (v1) |
| 96 | +### Group Commands |
| 97 | +- `group.list` |
| 98 | +- `group.show <groupId>` |
| 99 | +- `group.hide <groupId>` |
| 100 | +- `group.toggle <groupId>` |
| 101 | + |
| 102 | +### Macro Commands |
| 103 | +- `macro.list` |
| 104 | +- `macro.show <macroId>` |
| 105 | +- `macro.run <macroId>` |
| 106 | + |
| 107 | +### Toggle Commands |
| 108 | +- `toggle.overlay` |
| 109 | +- `toggle.minimal` |
| 110 | +- `toggle.systems` |
| 111 | +- `toggle.rendering` |
| 112 | + |
| 113 | +## Naming Conventions |
| 114 | +- Group IDs: `group.<domain>` (example: `group.rendering`) |
| 115 | +- Macro IDs: `macro.<domain>.<action>` (example: `macro.render.inspect`) |
| 116 | +- Toggle commands: `toggle.<name>` |
| 117 | +- Shared IDs must be generic and reusable (no project-specific names) |
| 118 | + |
| 119 | +## Target Structure |
| 120 | +```text |
| 121 | +engine/ |
| 122 | + debug/ |
| 123 | + advanced/ |
| 124 | + groups/ |
| 125 | + DebugPanelGroupRegistry.js |
| 126 | + registerStandardPanelGroups.js |
| 127 | + macros/ |
| 128 | + DebugMacroRegistry.js |
| 129 | + DebugMacroExecutor.js |
| 130 | + registerStandardDebugMacros.js |
| 131 | + toggles/ |
| 132 | + registerQuickToggleCommands.js |
| 133 | + shortcuts/ |
| 134 | + registerDebugShortcutBindings.js |
| 135 | +``` |
| 136 | + |
| 137 | +Project/sample/tool workflow implementations remain outside shared tree. |
| 138 | + |
| 139 | +## Adoption Models |
| 140 | +### Minimal Adoption |
| 141 | +- register one panel group |
| 142 | +- register one quick toggle |
| 143 | +- optional macro commands |
| 144 | + |
| 145 | +### Standard Adoption |
| 146 | +- register shared groups/macros/toggles |
| 147 | +- optional shortcut helper registration |
| 148 | + |
| 149 | +### Hybrid Adoption |
| 150 | +- register shared advanced UX pieces |
| 151 | +- extend with project-local groups/macros/shortcuts outside shared layer |
| 152 | + |
| 153 | +## Validation Strategy |
| 154 | +- registry/command surfaces register deterministically |
| 155 | +- groups and toggles operate through public APIs only |
| 156 | +- macro execution enforces approved composition boundaries |
| 157 | +- optional shortcuts remain optional and debug-only |
| 158 | +- project-specific workflow implementations remain outside shared layer |
| 159 | + |
| 160 | +## Risk Controls |
| 161 | +- keep v1 narrow to groups/toggles/macros/optional shortcuts |
| 162 | +- block private API access from macros |
| 163 | +- keep shared inventory generic |
| 164 | +- defer complex UX systems to separate tracks |
| 165 | + |
| 166 | +## Rollout Notes |
| 167 | +1. This PLAN PR is docs-only. |
| 168 | +2. BUILD PR defines authoritative implementation inventory and acceptance checks. |
| 169 | +3. APPLY PR implements incrementally: groups -> toggles -> macros -> optional shortcuts. |
| 170 | +4. Excluded scopes require separate PR tracks. |
| 171 | + |
| 172 | +## Next Commands |
| 173 | +1. `BUILD_PR_DEBUG_SURFACES_ADVANCED_UX` |
| 174 | +2. `APPLY_PR_DEBUG_SURFACES_ADVANCED_UX` |
0 commit comments