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
Reinforce src as the authoritative reusable foundation and prohibit hidden capability drift across games, samples, and tools - PR_26146_022-src-boundary-and-reuse-enforcement-closeout
Copy file name to clipboardExpand all lines: docs/dev/PROJECT_INSTRUCTIONS.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -509,15 +509,30 @@ Boundary rules:
509
509
- games, samples, and tools must not override, hide, shadow, or reimplement behavior that already exists in `src/`
510
510
- games, samples, and tools must not implement behavior that clearly belongs in `src/` just to avoid shared-source changes
511
511
512
+
Authoritative `src/` boundary rules:
513
+
-`src/` is the authoritative reusable implementation surface
514
+
- reusable logic should converge into `src/` over time
515
+
-`games/`, `samples/`, and `tools/` are consumers or extensions of `src/`, not alternate engine layers
516
+
-`games/`, `samples/`, and `tools/` must not become parallel runtime frameworks
517
+
512
518
Mandatory capability discovery rule:
513
519
- before Codex writes new behavior into `games/`, `samples/`, or `tools/`, Codex must check whether equivalent or reusable capability already exists in `src/`
514
520
- Codex must reuse or extend existing `src/` capability when appropriate
515
521
- if capability belongs in `src/` but does not exist, Codex must state that and either add or update `src/` when PR scope authorizes it, or document the required `src/` follow-up instead of creating a local workaround
516
522
523
+
Mandatory reuse expectations:
524
+
- before creating new runtime behavior, Codex must check `src/`, existing shared utilities, and existing reusable services
525
+
- if equivalent functionality exists, Codex must reuse or extend it instead of duplicating it
526
+
- if reusable functionality is missing, Codex should prefer growing `src/` over creating local copies
527
+
517
528
Local implementation rules:
518
529
- local implementation is allowed only when behavior is truly game-specific, tool-specific, or sample-specific
530
+
- local implementations must justify why they are intentionally local
531
+
- temporary local implementations must identify required `src/` follow-up work
519
532
- local implementation must not mask a missing `src/` shared capability
520
533
- local implementation must not create shadow APIs competing with `src/`
534
+
- hidden capability forks are prohibited
535
+
- games, tools, and samples must not silently diverge from shared `src/` behavior
0 commit comments