Skip to content

Commit 2814537

Browse files
author
DavidQ
committed
docs: build standard library plan for promoted debug surfaces
1 parent f5c11b3 commit 2814537

9 files changed

+186
-235
lines changed

docs/dev/CODEX_COMMANDS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ MODEL: GPT-5.4-codex
22
REASONING: high
33

44
COMMAND:
5-
Create PLAN_PR_DEBUG_SURFACES_STANDARD_LIBRARY
5+
Create BUILD_PR_DEBUG_SURFACES_STANDARD_LIBRARY
66

77
Requirements:
88
- Follow PLAN_PR -> BUILD_PR -> APPLY_PR
99
- Docs-first only
1010
- One PR per purpose
11-
- Plan the first reusable standard library for promoted debug surfaces
12-
- Define shared panels, shared providers, shared operator commands, adoption models, naming conventions, and target structure
11+
- Build the first shared standard library under engine/debug/standard
12+
- Define authoritative target structure, initial inventory, registration pattern, adoption modes, validation goals, and rollback strategy
1313
- Keep the initial library small and opt-in
14-
- Exclude 3D-specific, network-specific, and deep-inspector work from this PR
15-
- Keep project-specific panels/providers/commands outside the shared library
14+
- Exclude 3D-specific, network-specific, deep-inspector, and project-specific logic from this PR
15+
- Use `registerStandardDebugPreset()` as the main shared adoption entry point
1616
- Write outputs under docs/pr and docs/dev/reports
1717
- Put codex command and commit comment under docs/dev
18-
- Package to <project folder>/tmp/PLAN_PR_DEBUG_SURFACES_STANDARD_LIBRARY_delta.zip
18+
- Package to <project folder>/tmp/BUILD_PR_DEBUG_SURFACES_STANDARD_LIBRARY_delta.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
docs: plan first opt-in debug surfaces standard library with clear shared/local boundaries
1+
docs: build standard library plan for promoted debug surfaces

docs/dev/NEXT_COMMAND.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Next:
2-
BUILD_PR_DEBUG_SURFACES_STANDARD_LIBRARY
2+
APPLY_PR_DEBUG_SURFACES_STANDARD_LIBRARY
Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,17 @@
1-
PLAN_PR_DEBUG_SURFACES_STANDARD_LIBRARY change summary
1+
Created docs-only BUILD PR bundle for the first debug surfaces standard library.
22

3-
Summary
4-
- Refreshed docs-only plan bundle for the first debug surfaces standard library.
5-
- Kept one PR purpose: planning only.
6-
- Kept initial shared library small and opt-in.
3+
Included:
4+
- authoritative target structure
5+
- initial shared inventory
6+
- registration pattern
7+
- adoption modes
8+
- validation goals
9+
- rollback strategy
10+
- codex command
11+
- commit comment
12+
- next command
13+
- report files
714

8-
Plan coverage
9-
- shared panel set defined
10-
- shared provider set defined
11-
- shared operator command set defined
12-
- adoption models defined (minimal, preset, hybrid)
13-
- naming conventions defined
14-
- target structure defined
15-
- ownership boundaries reinforced
16-
17-
Constraints preserved
18-
- docs-first only
19-
- no implementation in this PR
20-
- excludes 3D-specific, network-specific, and deep-inspector scope
21-
- keeps project-specific panels/providers/commands outside shared library
22-
23-
Outputs
24-
- docs/pr/PLAN_PR_DEBUG_SURFACES_STANDARD_LIBRARY.md
25-
- docs/dev/codex_commands.md
26-
- docs/dev/commit_comment.txt
27-
- docs/dev/reports/change_summary.txt
28-
- docs/dev/reports/validation_checklist.txt
29-
- docs/dev/reports/file_tree.txt
30-
31-
Next recommended command
32-
- BUILD_PR_DEBUG_SURFACES_STANDARD_LIBRARY
15+
Primary intent:
16+
- create a small opt-in shared baseline of panels, providers, commands, and a preset
17+
- keep custom project logic local

docs/dev/reports/file_tree.txt

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
HTML-JavaScript-Gaming/
2-
|-- docs/
3-
| |-- pr/
4-
| | `-- PLAN_PR_DEBUG_SURFACES_STANDARD_LIBRARY.md
5-
| `-- dev/
6-
| |-- codex_commands.md
7-
| |-- commit_comment.txt
8-
| `-- reports/
9-
| |-- change_summary.txt
10-
| |-- validation_checklist.txt
11-
| `-- file_tree.txt
12-
`-- tmp/
13-
`-- PLAN_PR_DEBUG_SURFACES_STANDARD_LIBRARY_delta.zip
1+
BUILD_PR_DEBUG_SURFACES_STANDARD_LIBRARY_delta/
2+
└── docs/
3+
├── dev/
4+
│ ├── codex_commands.md
5+
│ ├── commit_comment.txt
6+
│ ├── next_command.txt
7+
│ └── reports/
8+
│ ├── change_summary.txt
9+
│ ├── file_tree.txt
10+
│ └── validation_checklist.txt
11+
└── pr/
12+
├── APPLY_PR_DEBUG_SURFACES_STANDARD_LIBRARY.md
13+
├── BUILD_PR_DEBUG_SURFACES_STANDARD_LIBRARY.md
14+
└── PLAN_PR_DEBUG_SURFACES_STANDARD_LIBRARY.md
Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,12 @@
1-
PLAN_PR_DEBUG_SURFACES_STANDARD_LIBRARY validation checklist
2-
3-
Workflow
4-
- [done] PLAN_PR -> BUILD_PR -> APPLY_PR structure referenced
5-
- [done] Docs-first only
6-
- [done] One PR per purpose
7-
8-
Plan Content
9-
- [done] Shared panels defined
10-
- [done] Shared providers defined
11-
- [done] Shared operator commands defined
12-
- [done] Adoption models defined
13-
- [done] Naming conventions defined
14-
- [done] Target structure defined
15-
- [done] Initial library is small and opt-in
16-
17-
Boundaries
18-
- [done] Project-specific panels/providers/commands remain outside shared library
19-
- [done] Dev Console vs Debug Overlay separation preserved
20-
21-
Exclusions
22-
- [done] 3D-specific scope excluded
23-
- [done] network-specific scope excluded
24-
- [done] deep-inspector scope excluded
25-
26-
Outputs
27-
- [done] Plan doc under docs/pr
28-
- [done] Codex command under docs/dev
29-
- [done] Commit comment under docs/dev
30-
- [done] Reports under docs/dev/reports
31-
- [done] Delta zip generated at <project folder>/tmp/PLAN_PR_DEBUG_SURFACES_STANDARD_LIBRARY_delta.zip
1+
Validation Checklist
2+
3+
[x] Authoritative target structure is defined
4+
[x] Initial shared inventory is explicit
5+
[x] Registration pattern is defined
6+
[x] Adoption modes are defined
7+
[x] Initial library remains small
8+
[x] Shared logic remains opt-in
9+
[x] Project-specific logic stays outside shared library
10+
[x] Validation goals are documented
11+
[x] Rollback strategy is documented
12+
[x] APPLY_PR follow-up is identified

docs/pr/APPLY_PR_DEBUG_SURFACES_STANDARD_LIBRARY.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Purpose
44

5-
Apply the approved standard library plan by creating the first reusable set of shared panels, providers, and operator commands in `engine/debug/standard`.
5+
Apply the approved standard library plan by creating the first reusable set of shared panels, providers, commands, and preset registration in `engine/debug/standard`.
66

77
## Apply Scope
88

@@ -25,17 +25,23 @@ Apply the approved standard library plan by creating the first reusable set of s
2525

2626
### Create Shared Commands
2727
- debug help/status
28-
- overlay status/list/show/hide/toggle/showAll/hideAll
28+
- overlay list/status/show/hide/toggle/showAll/hideAll
2929

30-
### Keep Local
30+
### Create Shared Preset
31+
- `registerStandardDebugPreset()`
32+
33+
## Keep Local
3134
- game-specific panels
3235
- game-specific providers
3336
- game-specific commands
34-
- scene-specific adapters
37+
- tool-specific panels
38+
- tool-specific adapters
39+
- scene-specific wiring
3540

3641
## Apply Rules
3742

3843
- keep adoption opt-in
3944
- preserve public API boundaries
40-
- do not pull custom game logic into the shared library
45+
- do not pull custom project logic into the shared library
4146
- validate through sample and tool integrations
47+
- do not expand beyond the approved initial inventory

docs/pr/BUILD_PR_DEBUG_SURFACES_STANDARD_LIBRARY.md

Lines changed: 110 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,123 @@
22

33
## Purpose
44

5-
Turn the standard library plan into a docs-only build bundle for Codex.
5+
Convert the approved standard library plan into an implementation-ready docs bundle for Codex.
66

7-
## Build Scope
7+
## Authoritative Target Structure
88

9-
Define:
9+
```text
10+
src/
11+
engine/
12+
debug/
13+
standard/
14+
panels/
15+
SystemFpsPanel.js
16+
SystemTimingPanel.js
17+
SceneSummaryPanel.js
18+
SceneEntitiesPanel.js
19+
RenderLayersPanel.js
20+
InputSummaryPanel.js
21+
DebugStatusPanel.js
22+
providers/
23+
SystemTimingProvider.js
24+
SceneSummaryProvider.js
25+
EntityCountProvider.js
26+
RenderLayerSummaryProvider.js
27+
InputSummaryProvider.js
28+
DebugStatusProvider.js
29+
commands/
30+
registerStandardDebugCommands.js
31+
presets/
32+
registerStandardDebugPreset.js
33+
```
1034

11-
- the first shared library contents
12-
- exact ownership
13-
- target structure
14-
- registration patterns
15-
- adoption presets
16-
- validation rules
35+
## Initial Inventory
1736

18-
## Required Deliverables
37+
### Shared Panels
38+
- `system.fps`
39+
- `system.timing`
40+
- `scene.summary`
41+
- `scene.entities`
42+
- `render.layers`
43+
- `input.summary`
44+
- `debug.status`
1945

20-
- authoritative target tree
21-
- shared component inventory
22-
- adoption models
23-
- validation checklist
24-
- rollback notes
25-
- codex command
26-
- commit comment
27-
- next command
46+
### Shared Providers
47+
- `systemTiming`
48+
- `sceneSummary`
49+
- `entityCount`
50+
- `renderLayerSummary`
51+
- `inputSummary`
52+
- `debugStatus`
53+
54+
### Shared Commands
55+
- `debug.help`
56+
- `debug.status`
57+
- `overlay.list`
58+
- `overlay.status`
59+
- `overlay.show <panelId>`
60+
- `overlay.hide <panelId>`
61+
- `overlay.toggle <panelId>`
62+
- `overlay.showAll`
63+
- `overlay.hideAll`
64+
65+
## Registration Pattern
66+
67+
Use one shared registration entry point:
68+
69+
- `registerStandardDebugPreset()`
70+
71+
This preset should:
72+
1. register shared providers
73+
2. register shared panels
74+
3. register shared commands
75+
76+
This keeps adoption simple and consistent.
77+
78+
## Adoption Modes
79+
80+
### Minimal Adoption
81+
Consumer registers:
82+
- 1–2 standard providers
83+
- 1–2 standard panels
84+
- optional shared commands
85+
86+
### Standard Adoption
87+
Consumer registers:
88+
- full `registerStandardDebugPreset()`
89+
90+
### Custom Adoption
91+
Consumer registers:
92+
- selected shared providers/panels/commands
93+
- local project-specific additions
2894

2995
## Build Rules
3096

3197
- one PR purpose only
3298
- docs-first only
33-
- keep the initial shared library small
34-
- no 3D/network-specific features in this PR
35-
- no deep inspectors in this PR
36-
- preserve opt-in adoption
99+
- keep the initial library small
100+
- no 3D-specific diagnostics
101+
- no network-specific diagnostics
102+
- no deep inspectors
103+
- no game-specific logic in shared panels
104+
- no direct runtime access from shared panels
105+
- shared panels consume shared/public providers only
106+
- shared commands act through public APIs only
107+
108+
## Validation Goals
109+
110+
- shared preset registers end-to-end
111+
- panels render from provider data only
112+
- commands operate through public overlay/debug APIs
113+
- partial adoption works
114+
- full adoption works
115+
- local project extensions remain possible
116+
- no project-specific logic leaks into the shared library
117+
118+
## Rollback Strategy
119+
120+
If the initial library is too broad or unstable:
121+
- keep the directory structure
122+
- reduce the initial inventory
123+
- preserve preset entry point
124+
- revalidate minimal adoption before re-expanding

0 commit comments

Comments
 (0)