You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dev/PROJECT_INSTRUCTIONS.md
+80Lines changed: 80 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -452,6 +452,18 @@ Affected game fixtures are optional targeted validation only.
452
452
453
453
Samples are never implicit validation gates.
454
454
455
+
Engine test matrix expectations:
456
+
- name the affected engine surface
457
+
- name the targeted engine validation command or manual check
458
+
- name the fixture, manifest, or runtime input source
459
+
- include one valid path and one failure path when applicable
460
+
- state PASS/FAIL/WARN/SKIP criteria
461
+
- identify dependent tool, integration, or sample lanes that are in scope
462
+
463
+
Engine validation expands lane scope when a shared runtime API, shared parser, timing model, asset path rule, input contract, rendering contract, audio contract, or physics/runtime timing behavior changes.
464
+
465
+
Tool validation alone is insufficient when the changed behavior lives in engine/shared runtime code, changes a shared runtime contract, or could affect more than one tool, game, or sample through a shared dependency.
466
+
455
467
### Workspace Contract Test Boundaries
456
468
457
469
Workspace V2 tests validate contract and lifecycle only.
@@ -515,6 +527,28 @@ Affected game fixtures are opt-in only.
515
527
516
528
Fixtures must declare required manifests and toolState inputs.
517
529
530
+
Deterministic runtime cleanup and isolation:
531
+
- each lane owns cleanup for runtime state it creates
532
+
-`localStorage` and `sessionStorage` must be cleared or namespaced before and after tests that touch them
533
+
- parallel tests must isolate browser context, storage keys, ports, output paths, and artifact names
534
+
- tests must not share mutable runtime state across workers unless the shared state is the explicit subject under test
535
+
536
+
Fixture naming and versioning:
537
+
- fixture names must identify the owning lane or tool, scenario, and version
538
+
- shared fixtures must declare a version and owner
539
+
- fixture updates that change expected behavior must bump or clearly annotate the fixture version
540
+
541
+
Retry and timeout governance:
542
+
- hidden retries remain prohibited
543
+
- retries must identify the flaky test label, owner, and failure mode
544
+
- timeouts must be explicit, lane-appropriate, and documented when raised above the local default
545
+
- timeout increases must not hide missing readiness, cleanup, or fixture isolation defects
546
+
547
+
Validation runtime budget guidance:
548
+
- targeted validation should prefer the narrowest command that proves the affected lane
549
+
- long-running validation must state why the extra runtime is necessary
550
+
- reports must identify skipped long-running lanes and the reason they were skipped
551
+
518
552
### Test Failure Reporting Contracts
519
553
520
554
Failure reports must identify the exact tool, fixture, and runtime surface for every `FAIL` or `WARN`.
@@ -589,6 +623,26 @@ Integration-lane escalation is allowed only when an explicit cross-tool, workspa
589
623
590
624
Tool tests must not validate unrelated engine behavior.
- tools own tool UI, tool-specific state, toolState payload interpretation, tool-specific runtime behavior, preview/export actions, and tool diagnostics
629
+
- integration owns workspace launch into a tool, manifest handoff, palette propagation, toolState open/save contracts, and explicit cross-tool handoffs
630
+
631
+
Affected-engine-surface classification rules:
632
+
- classify a change as engine-affecting when it modifies shared runtime code, shared parsers, shared asset/input/audio/rendering/physics behavior, or engine-facing runtime contracts
633
+
- classify a change as tool-only when it uses stable engine contracts without modifying shared runtime behavior
634
+
- if classification is ambiguous, name the likely engine surface and run engine validation before dependent tool validation
635
+
636
+
Integration escalation rules:
637
+
- escalate from tool to integration only when the PR changes a workspace handoff, manifest handoff, palette propagation, toolState open/save contract, or explicit cross-tool workflow
638
+
- integration escalation must name the source lane, target lane, handoff contract, and expected behavior
639
+
- integration failures block only the integration lane unless an identified shared dependency also blocks a dependent lane
640
+
641
+
Shared runtime boundary rules:
642
+
- shared runtime changes must not be accepted solely through one affected tool test
643
+
- shared parser changes require validation of valid and invalid payload handling before dependent tool validation
644
+
- shared runtime failures must identify the root shared dependency and every dependent lane that is blocked
645
+
592
646
Every PR must document:
593
647
- whether full samples test was skipped or run
594
648
- reason for decision
@@ -672,6 +726,15 @@ Every tool completion PR must include:
672
726
- Playwright result
673
727
- manual validation steps
674
728
729
+
Tool completion exit checklist:
730
+
- required toolState payloads validate before render
731
+
- invalid payloads reject without partial render
732
+
- primary tool workflow is covered by targeted validation
733
+
- undo/reset/import/export or equivalent state actions behave as documented when applicable
734
+
- tool diagnostics identify PASS/FAIL/WARN/SKIP outcomes for targeted fixtures
735
+
- no dead controls, dead accordions, hidden bootstrap assumptions, or silent fallback paths remain in the completed surface
736
+
- validation reports identify skipped samples and skipped broad lanes
737
+
675
738
## CODEX ANTI-PATTERN GUARD
676
739
677
740
These rules are mandatory for every Codex BUILD execution:
@@ -718,6 +781,16 @@ Do not expand into:
718
781
- roadmap rewrites
719
782
- sample JSON alignment until tools are complete
720
783
784
+
Recovery lane completion checklist:
785
+
- Workspace V2 contract behavior is stable for launch, manifest handoff, palette propagation, and toolState open/save paths
786
+
- targeted tool completion exit checklists are satisfied for the tools in scope
787
+
- unresolved failures are classified by lane, owner, fixture, and runtime surface
788
+
- unrelated failures are reported as WARN and do not block the recovery lane
789
+
- UI consistency blockers are either fixed or explicitly tracked outside the recovery exit
790
+
- reports clearly state whether samples were skipped
791
+
792
+
Transition into the future sample-alignment phase is allowed only after recovery-lane scope is complete, tool completion blockers are cleared or tracked, and sample work is explicitly named as the PR scope.
793
+
721
794
## ARRAY FORMATTING RULE
722
795
723
796
Primitive-only arrays in JSON must use compact grouped formatting.
@@ -825,6 +898,13 @@ No PR is complete with:
825
898
- Right panel = output/status/logging/diagnostics.
826
899
- Status/log sections belong at the bottom of the right panel unless explicitly justified otherwise.
827
900
901
+
UI consistency validation expectations:
902
+
- header, NAV, panel, accordion, status, and action patterns must be verified for affected tool surfaces
903
+
- fullscreen or expanded modes must preserve header, status, and primary action visibility unless explicitly designed otherwise
904
+
- status areas must report current operation state and actionable failures
905
+
- accordion controls must open, close, preserve state when expected, and expose no dead accordion behavior
906
+
- dead accordion enforcement is mandatory for tool completion and recovery/UAT lanes
0 commit comments