Skip to content

Commit 1aef2dd

Browse files
author
DavidQ
committed
Update project instructions for PR response and commit formatting - PR 10.6B
1 parent 810e6a3 commit 1aef2dd

7 files changed

Lines changed: 81 additions & 142 deletions

File tree

docs/dev/PROJECT_INSTRUCTIONS.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,23 @@ Output rules:
2222
- Place ZIPs under <project folder>/tmp/
2323
- Preserve exact repo structure inside ZIP
2424

25+
## 🔥 RESPONSE RULES (MANDATORY)
26+
27+
- Print a little detail about the PR (1–3 lines, clear purpose)
28+
- Do NOT present options (assume correct path and proceed)
29+
- Always provide a ZIP that is:
30+
- testable
31+
- pushes the roadmap forward
32+
- ZIP must be placed in the response BEFORE the Next step section
33+
- Keep chat response minimal (ZIP + short summary + next step)
34+
35+
## 🧾 COMMIT COMMENT FORMAT (MANDATORY)
36+
37+
<description> - <PR info>
38+
39+
Example:
40+
Normalize palette contract to manifest SSoT and remove tool-level schema drift - PR 10.6B
41+
2542
Do not:
2643
- Write implementation code unless explicitly asked
2744
- Expand scope beyond the PR
@@ -71,8 +88,8 @@ When producing BUILD, PLAN, or APPLY results:
7188

7289
All detailed content must be placed inside the ZIP, including:
7390
- docs/pr/*
74-
- docs/operations/dev/codex_commands.md
75-
- docs/operations/dev/commit_comment.txt
91+
- docs/dev/codex_commands.md
92+
- docs/dev/commit_comment.txt
7693
- docs/dev/reports/*
7794

7895
If a ZIP cannot be produced:
@@ -89,8 +106,8 @@ ZIP STANDARD (ENFORCED)
89106
- No extra files outside defined structure
90107

91108
Commit Comment:
92-
<change details>
93-
<PR Details>
109+
<description> - <PR info>
110+
94111
## 🔒 EXECUTION DEFAULTS (MANDATORY)
95112

96113
### ALWAYS CONTINUE
@@ -127,7 +144,6 @@ Commit Comment:
127144
- Do not modify roadmap content during cleanup work.
128145
- Only update status [ ] [.] [x] in roadmap content during cleanup work.
129146

130-
131147
## EXECUTION EFFICIENCY
132148

133149
- Bundle PRs whenever it is safe and testable to reduce overall timeline and churn.
@@ -193,4 +209,4 @@ These rules are mandatory for every Codex BUILD execution:
193209
## Current Recovery Lane
194210

195211
The active UAT lane is opening Workspace Manager from a `games/index.html` game tile.
196-
Treat this as a recovery/stabilization PR only. Do not expand into a broader games hub, tool registry, template, or roadmap rewrite.
212+
Treat this as a recovery/stabilization PR only. Do not expand into a broader games hub, tool registry, template, or roadmap rewrite.

docs/dev/reports/launch_smoke_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Launch Smoke Report
22

3-
Generated: 2026-04-27T16:35:23.621Z
3+
Generated: 2026-04-27T16:40:59.455Z
44

55
Filters: games=true, samples=false, tools=false, sampleRange=all
66

Lines changed: 28 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,15 @@
1-
# LEVEL 10.6B Palette Contract Alignment
1+
# Level 10.6B - Palette Contract Alignment
22

33
## PR Purpose
4-
Close the largest standalone sample generic-failure cluster by removing palette contract drift between manifest payloads and tool palette JSON files.
5-
6-
## Scope
7-
This PR is limited to palette payload contract alignment for standalone sample/tool stability.
8-
9-
## Problem
10-
Palette-bearing samples fail because the palette object passed through the manifest does not match the shape used by tool palette JSON files.
11-
12-
Observed manifest shape:
13-
14-
```json
15-
"palette-browser": {
16-
"schema": "html-js-gaming.tool.palette-browser",
17-
"version": 1,
18-
"name": "Palette Browser",
19-
"source": "manifest",
20-
"palette": {
21-
"schema": "html-js-gaming.palette",
22-
"version": 1,
23-
"name": "Asteroids Palette",
24-
"source": "singleton-merged-from-tool-palettes",
25-
"swatches": []
26-
}
27-
}
28-
```
29-
30-
Observed tool JSON shape:
31-
32-
```json
33-
{
34-
"$schema": "../../../tools/schemas/palette.schema.json",
35-
"schema": "html-js-gaming.palette",
36-
"version": 1,
37-
"name": "Sample 0302 Palette",
38-
"source": "engine/paletteList",
39-
"swatches": []
40-
}
41-
```
42-
43-
The leading metadata and legacy `source` value cause standalone samples to look loaded while tool state/UI receives a mismatched contract.
4+
Normalize palette runtime payload contracts so manifest palette input and standalone tool palette input use one canonical shape.
445

456
## Canonical Runtime Palette Shape
46-
Palette runtime payloads should use one canonical shape:
477

488
```json
499
{
5010
"schema": "html-js-gaming.palette",
5111
"version": 1,
52-
"name": "Asteroids Palette",
12+
"name": "Example Palette",
5313
"source": "manifest",
5414
"swatches": [
5515
{
@@ -61,40 +21,37 @@ Palette runtime payloads should use one canonical shape:
6121
}
6222
```
6323

64-
## Contract Rule
24+
## Changed Files
6525

66-
```text
67-
sample -> manifest -> normalized input -> tool -> UI/state
68-
```
26+
- `tools/Palette Browser/main.js`
27+
- `docs/dev/reports/level_10_6_standalone_tool_data_flow_report.md`
28+
- `docs/dev/reports/level_10_6B_palette_contract_alignment.md`
6929

70-
For palette tools:
30+
## What Was Aligned
7131

72-
```text
73-
payload.palette -> state.palette -> UI
74-
```
32+
- Palette Browser preset import path now preserves canonical `payload.palette.source` instead of forcing `custom`, keeping manifest-derived source identity through UI binding.
33+
- Palette-bearing standalone sample payloads were verified as canonical (`schema`, `version`, `name`, `source`, `swatches`) with no contract failures.
34+
- Standalone data-flow validation passed with zero schema, contract, roundtrip, or generic failures.
7535

76-
The tool must not silently reshape, merge, inject fallback palettes, or auto-load hidden palette data.
36+
## Validation
7737

78-
## Codex Implementation Requirements
79-
- Normalize palette-bearing sample/tool data to the canonical runtime palette shape.
80-
- Remove `$schema` from runtime palette payloads where it creates tool/manifest mismatch.
81-
- Remove legacy `source: engine/paletteList` runtime usage.
82-
- Ensure Palette Browser consumes `payload.palette` directly.
83-
- Ensure palette-dependent tools do not read `paletteList`, `colors`, or `data.palette` unless explicitly normalized before tool entry.
84-
- Preserve explicit empty state behavior when no palette is provided.
85-
- Do not introduce new features, schemas, tools, hardcoded asset paths, or fallback data.
86-
- Update standalone data-flow test/report expectations only where they enforce the corrected contract.
38+
Commands run:
8739

88-
## Expected Validation
89-
```powershell
90-
npm run test:launch-smoke:games
91-
npm run test:sample-standalone:data-flow
92-
```
40+
- `npm run test:launch-smoke:games`
41+
- `npm run test:sample-standalone:data-flow`
9342

94-
Expected direction:
43+
Results:
9544

96-
```text
97-
Generic failure signals detected: 0
98-
```
45+
- `test:launch-smoke:games` -> `PASS=12 FAIL=0 TOTAL=12`
46+
- `test:sample-standalone:data-flow` ->
47+
- `schemaFailures=[]`
48+
- `contractFailures=[]`
49+
- `roundtripPathFailures=[]`
50+
- `genericFailures=[]`
51+
52+
## Guardrails
9953

100-
If not zero, remaining failures should be non-palette path/event-stream issues and should be handled in the next PR.
54+
- No new schemas added.
55+
- No fallback/demo data added.
56+
- No hardcoded asset paths added.
57+
- No start_of_day changes.

docs/dev/reports/level_10_6_standalone_tool_data_flow_report.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Level 10.6 Standalone Tool Data Flow Report
22

3+
## 10.6B Status Update (2026-04-27)
4+
5+
- BUILD: `LEVEL_10_6B_PALETTE_CONTRACT_ALIGNMENT`
6+
- Palette contract alignment applied to canonical runtime shape:
7+
- `schema`
8+
- `version`
9+
- `name`
10+
- `source`
11+
- `swatches`
12+
- Palette Browser sample preset ingestion now reads `payload.palette` canonical shape and binds swatches to UI/state.
13+
- Palette Browser standalone sample payloads (`0213`, `0308`, `0313`) now use `config.palette.swatches` and manifest-derived `source`.
14+
15+
Validation rerun:
16+
17+
- `npm run test:launch-smoke:games` -> `PASS=12 FAIL=0 TOTAL=12`
18+
- `npm run test:sample-standalone:data-flow` -> `genericFailures=[]`, `schemaFailures=[]`, `contractFailures=[]`
19+
320
- Generated: 2026-04-26
421
- BUILD: `BUILD_PR_LEVEL_10_6_SAMPLE_SCHEMA_AND_STANDALONE_TOOL_DATA_FLOW_VALIDATION`
522
- Test command: `npm run test:sample-standalone:data-flow`
Lines changed: 8 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,10 @@
1-
MODEL: GPT-5.3-codex
2-
REASONING: high
1+
# Codex Commands — PR 10.6B Project Instructions Response Rules
32

4-
TASK:
5-
Apply BUILD_PR_LEVEL_10_6B_STANDALONE_SAMPLE_GENERIC_FAILURE_CLOSEOUT.
3+
Model: GPT-5.4
4+
Reasoning: medium
65

7-
INPUT CONTEXT:
8-
Use the Level 10.6 delta result. It fixed targeted flows but reported 25 generic standalone data-flow failures.
9-
10-
NON-NEGOTIABLE RULES:
11-
- Do not use silent fallback data.
12-
- Do not add hardcoded asset paths.
13-
- Do not mask invalid samples with defaults.
14-
- Valid sample payload must explicitly reach the tool state/UI slot.
15-
16-
STEPS:
17-
1. Read docs/pr/PLAN_PR_LEVEL_10_6B_STANDALONE_SAMPLE_GENERIC_FAILURE_CLOSEOUT.md.
18-
2. Read docs/pr/BUILD_PR_LEVEL_10_6B_STANDALONE_SAMPLE_GENERIC_FAILURE_CLOSEOUT.md.
19-
3. Run or inspect `npm run test:sample-standalone:data-flow`.
20-
4. Expand `tests/runtime/SampleStandaloneToolDataFlow.test.mjs` to include tool-specific contracts for all 25 generic failures.
21-
5. Fix each listed sample/tool binding:
22-
- 3d-camera-path-editor: 0201,0202,0220
23-
- 3d-asset-viewer: 0204,1208,1413
24-
- physics-sandbox: 0210,0303,1606
25-
- tile-model-converter: 0221,0305,1209
26-
- 3d-json-payload-normalizer: 0221,0305,1208
27-
- parallax-editor: 0306,1204,1205,1208
28-
- performance-profiler: 0512,1319,1407
29-
- replay-visualizer: 0708,1315,1406
30-
6. Fix root causes:
31-
- stale sample paths
32-
- wrong payload shape
33-
- missing required payload data
34-
- tool binding to wrong input slot
35-
- UI state not reflecting loaded payload
36-
7. Re-run the standalone data-flow test until generic failure signals are zero, or document exact remaining blockers with file names.
37-
8. Write reports:
38-
- docs/dev/reports/level_10_6b_standalone_generic_failure_closeout_report.md
39-
- docs/dev/reports/level_10_6b_tool_contract_matrix.md
40-
9. Update docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md status only if needed:
41-
- [ ] -> [.]
42-
- [.] -> [x]
43-
- no prose rewrite/delete
44-
10. Do not add runtime validators.
45-
11. Do not modify start_of_day.
46-
12. Create Codex delta ZIP:
47-
tmp/BUILD_PR_LEVEL_10_6B_STANDALONE_SAMPLE_GENERIC_FAILURE_CLOSEOUT_delta.zip
48-
49-
ACCEPTANCE:
50-
- generic failure signals after = 0, or exact remaining blocker report
51-
- delta ZIP exists
6+
Apply this repo-structured bundle exactly:
7+
1. Replace PROJECT_INSTRUCTIONS.md with the bundled PROJECT_INSTRUCTIONS.md.
8+
2. Verify the response rules and commit comment format are present.
9+
3. Do not modify implementation code.
10+
4. Return a repo-structured ZIP artifact at tmp/PR_10_6B_PROJECT_INSTRUCTIONS_RESPONSE_RULES.zip.
Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1 @@
1-
BUILD_PR_LEVEL_10_6B_STANDALONE_SAMPLE_GENERIC_FAILURE_CLOSEOUT
2-
3-
- Expanded standalone sample contract harness to cover all generic failures
4-
- Added tool-specific contracts for remaining failing tools
5-
- Fixed remaining standalone sample payload/binding issues
6-
7-
PR Details:
8-
- Closes Level 10.6 generic failure set
9-
- No silent fallback data
10-
- No hardcoded asset paths
11-
- No start_of_day changes
1+
Update project instructions for PR response and commit formatting - PR 10.6B

tools/Palette Browser/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,11 @@ function setSelectedPalette(paletteId) {
459459
renderSelectedPalette();
460460
}
461461

462-
function createCustomPalette(name, swatches) {
462+
function createCustomPalette(name, swatches, source = "custom") {
463463
return {
464464
id: `custom:${Date.now().toString(36)}`,
465465
name,
466-
source: "custom",
466+
source: typeof source === "string" && source.trim() ? source.trim() : "custom",
467467
swatches: swatches.map((entry) => ({
468468
symbol: entry.symbol || "",
469469
hex: entry.hex || "#ffffff",
@@ -563,7 +563,7 @@ function importPaletteFromPresetPayload(rawPalette) {
563563
nextName = "imported-palette";
564564
}
565565
nextName = makeUniquePaletteName(nextName);
566-
const importedPalette = createCustomPalette(nextName, imported.swatches);
566+
const importedPalette = createCustomPalette(nextName, imported.swatches, imported.source || "manifest");
567567
state.customPalettes.unshift(importedPalette);
568568
saveCustomPalettes();
569569
setSelectedPalette(importedPalette.id);
@@ -627,7 +627,7 @@ async function importPaletteJsonFromFile(file) {
627627
}
628628
}
629629
nextName = makeUniquePaletteName(nextName);
630-
const importedPalette = createCustomPalette(nextName, imported.swatches);
630+
const importedPalette = createCustomPalette(nextName, imported.swatches, imported.source || "custom");
631631
state.customPalettes.unshift(importedPalette);
632632
saveCustomPalettes();
633633
setSelectedPalette(importedPalette.id);

0 commit comments

Comments
 (0)