|
| 1 | +# Toolbox Registry Contract |
| 2 | + |
| 3 | +PR: `PR_26155_006-toolbox-registry-contract` |
| 4 | + |
| 5 | +## Scope |
| 6 | +- This PR is contract-only. |
| 7 | +- Current `toolbox/tools-page-accordions.js` rendering remains unchanged. |
| 8 | +- No runtime behavior was modified. |
| 9 | +- No CSS was added. |
| 10 | +- No tools were added. |
| 11 | +- No database implementation was added. |
| 12 | + |
| 13 | +## Purpose |
| 14 | +Define the minimal Toolbox registry contract needed before replacing the transitional `toolbox/tools-page-accordions.js` rendering path. |
| 15 | + |
| 16 | +The registry must support the same Toolbox page modes: |
| 17 | +- Order |
| 18 | +- Group |
| 19 | +- Progress |
| 20 | +- Build Path |
| 21 | + |
| 22 | +## Minimal Registry Entry |
| 23 | + |
| 24 | +Each active Toolbox tool entry must provide: |
| 25 | + |
| 26 | +| Field | Type | Required | Purpose | |
| 27 | +| --- | --- | --- | --- | |
| 28 | +| `id` | string | Yes | Stable machine-readable tool identifier. Must be unique and should not change when the user-facing label changes. | |
| 29 | +| `label` | string | Yes | User-facing tool name used for visible tiles, navigation, and alphabetical ordering. | |
| 30 | +| `category` | string | Yes | User-facing group name used by Group mode. | |
| 31 | +| `colorGroup` | string | Yes | Theme V2 color/group token key used to select approved visual grouping classes or swatches. | |
| 32 | +| `route` | string | Yes | Active route to the tool page, expected to resolve under `/toolbox/[toolname]/`. | |
| 33 | +| `requiredForPlayable` | boolean | Yes | Marks tools required before a game can be promoted to playable/public release. | |
| 34 | +| `requires` | string[] | Yes | Ordered list of other registry `id` values that this tool depends on or should follow. Empty array when there are no prerequisites. | |
| 35 | +| `deferred` | boolean | Yes | Marks tools that are intentionally listed but not ready for active completion. Deferred tools may still appear in planning views. | |
| 36 | +| `progressChecklist` | object[] | Yes | Static checklist items used by Progress mode to explain readiness. Empty array only when no progress checklist is known yet. | |
| 37 | +| `status` | string | Yes | Current readiness state used by Progress mode. | |
| 38 | + |
| 39 | +## Status Values |
| 40 | + |
| 41 | +Allowed `status` values: |
| 42 | +- `locked` |
| 43 | +- `ready` |
| 44 | +- `in-progress` |
| 45 | +- `complete` |
| 46 | + |
| 47 | +Rules: |
| 48 | +- `locked` means the tool is not ready for active use or depends on unfinished prerequisites. |
| 49 | +- `ready` means the tool is available to use but has not been completed for the current project path. |
| 50 | +- `in-progress` means work has started but the checklist is not complete. |
| 51 | +- `complete` means the required checklist is complete for the current project path. |
| 52 | + |
| 53 | +## Progress Checklist Items |
| 54 | + |
| 55 | +Each `progressChecklist` item should provide: |
| 56 | + |
| 57 | +| Field | Type | Required | Purpose | |
| 58 | +| --- | --- | --- | --- | |
| 59 | +| `id` | string | Yes | Stable checklist item identifier scoped to the tool entry. | |
| 60 | +| `label` | string | Yes | User-facing checklist item text. | |
| 61 | +| `complete` | boolean | Yes | Static readiness flag for Progress mode until runtime project state exists. | |
| 62 | +| `requiredForPlayable` | boolean | Yes | Marks checklist items that block playable/public release. | |
| 63 | + |
| 64 | +No persisted runtime project state is introduced by this contract. Future runtime behavior must define its state source separately. |
| 65 | + |
| 66 | +## Mode Support |
| 67 | + |
| 68 | +### Order |
| 69 | +- Sort registry entries by `label`. |
| 70 | +- Use `id` as the stable identity. |
| 71 | +- Use `route` for tile links. |
| 72 | + |
| 73 | +### Group |
| 74 | +- Group registry entries by `category`. |
| 75 | +- Use `colorGroup` to select existing approved Theme V2 grouping styles. |
| 76 | +- Do not derive grouping from folder names once registry-driven rendering exists. |
| 77 | + |
| 78 | +### Progress |
| 79 | +- Use `status` for the top-level readiness label. |
| 80 | +- Use `progressChecklist` for static checklist rows or readiness summaries. |
| 81 | +- Use `requiredForPlayable` on tools and checklist items to indicate playable/public blockers. |
| 82 | +- Use `deferred` to mark entries that should remain visible but not treated as active completion blockers. |
| 83 | + |
| 84 | +### Build Path |
| 85 | +- Use `requiredForPlayable` to identify core playable-release path items. |
| 86 | +- Use `requires` to establish dependency ordering. |
| 87 | +- Use `deferred` to place non-blocking future tools outside the required path. |
| 88 | +- Use `category` and `colorGroup` only for display grouping, not as dependency truth. |
| 89 | + |
| 90 | +## Contract Guardrails |
| 91 | +- The registry is the data source contract only. |
| 92 | +- This PR does not create a database. |
| 93 | +- This PR does not add persistence. |
| 94 | +- This PR does not add runtime state, project state, `localStorage`, or `sessionStorage`. |
| 95 | +- This PR does not replace `toolbox/tools-page-accordions.js`. |
| 96 | +- This PR does not modify `toolbox/index.html`. |
| 97 | + |
| 98 | +## Current Rendering State |
| 99 | +- `toolbox/index.html` remains transitional. |
| 100 | +- `toolbox/tools-page-accordions.js` still owns current Toolbox rendering for Order, Group, Progress, and Build Path. |
| 101 | +- `toolbox/tools-page-accordions.js` should be removed only after a registry-driven Toolbox runtime replaces the current rendering path. |
| 102 | + |
| 103 | +## Next Implementation Step |
| 104 | +The next implementation PR starts Project Workspace tooling by creating a registry-driven Toolbox runtime for: |
| 105 | +- Order |
| 106 | +- Group |
| 107 | +- Progress |
| 108 | +- Build Path |
| 109 | + |
| 110 | +That implementation must consume a declared registry/data source before any runtime database behavior is introduced. |
| 111 | + |
| 112 | +## Validation |
| 113 | +- PASS: `git diff --check`. |
| 114 | +- SKIPPED: Playwright, because this PR is docs/contract only and Playwright impacted is No. |
0 commit comments