Skip to content

Commit 7a20774

Browse files
committed
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
1 parent 641975b commit 7a20774

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

docs/dev/PROJECT_INSTRUCTIONS.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,15 +509,30 @@ Boundary rules:
509509
- games, samples, and tools must not override, hide, shadow, or reimplement behavior that already exists in `src/`
510510
- games, samples, and tools must not implement behavior that clearly belongs in `src/` just to avoid shared-source changes
511511

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+
512518
Mandatory capability discovery rule:
513519
- before Codex writes new behavior into `games/`, `samples/`, or `tools/`, Codex must check whether equivalent or reusable capability already exists in `src/`
514520
- Codex must reuse or extend existing `src/` capability when appropriate
515521
- 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
516522

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+
517528
Local implementation rules:
518529
- 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
519532
- local implementation must not mask a missing `src/` shared capability
520533
- 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
521536

522537
Prohibited no-shadow behaviors:
523538
- local shared-capability fallbacks
@@ -526,6 +541,12 @@ Prohibited no-shadow behaviors:
526541
- custom games, samples, or tools behavior that masks a `src/` gap
527542
- shadow APIs that compete with `src/` APIs
528543

544+
Architectural intent:
545+
- `src/` is intended to evolve and grow intentionally over time
546+
- shared capabilities should mature upward into `src/`
547+
- Codex should help identify reusable patterns and promote them into `src/` when appropriate
548+
- stabilization and anti-monolith goals depend on strengthening shared `src/` ownership
549+
529550
Shared infrastructure rules:
530551
- allowed shared infrastructure layers are engine/runtime services, shared manifest/runtime parsers, shared asset/input/audio/rendering helpers, shared validation helpers, and reusable non-tool-specific utilities
531552
- circular dependencies between engine/shared infrastructure and tools are prohibited

0 commit comments

Comments
 (0)