Skip to content

Commit 641975b

Browse files
committed
Require src capability discovery and prohibit games, samples, and tools from shadowing reusable shared-source behavior - PR_26146_021-src-capability-growth-and-discovery-rules
1 parent 68be8b1 commit 641975b

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

docs/dev/PROJECT_INSTRUCTIONS.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -502,29 +502,29 @@ Boundary rules:
502502
- shared runtime behavior must not leak through tool-specific abstractions
503503
- tool-specific adapters may wrap stable engine contracts only when the adapter does not own engine behavior
504504

505-
Engine growth governance:
506-
- the engine is a living shared foundation and is expected to grow when reusable runtime behavior is needed
507-
- reusable runtime behavior belongs in the engine, not duplicated in games, samples, or tools
508-
- games, samples, and tools must not override, hide, shadow, or reimplement behavior that already exists in the engine
509-
- games, samples, and tools must not implement behavior that clearly belongs in the engine just to avoid engine changes
510-
511-
Engine growth decision rule:
512-
- when a game, sample, or tool needs runtime behavior that appears reusable, Codex must identify whether it belongs in the engine
513-
- if engine work is required, Codex must state that clearly and include the engine change in the PR scope when authorized
514-
- if engine work is not included, Codex must document why the behavior is intentionally local
515-
- local implementation is allowed only when the behavior is truly game-specific, tool-specific, or sample-specific and not reusable engine behavior
505+
`src/` shared capability growth governance:
506+
- the authoritative term for reusable shared behavior is `src/` shared capability
507+
- `src/` is the living shared foundation for reusable runtime, engine, utility, parsing, rendering, audio, input, timing, asset, and validation capabilities
508+
- reusable behavior belongs in `src/` unless it is intentionally local and documented
509+
- games, samples, and tools must not override, hide, shadow, or reimplement behavior that already exists in `src/`
510+
- games, samples, and tools must not implement behavior that clearly belongs in `src/` just to avoid shared-source changes
511+
512+
Mandatory capability discovery rule:
513+
- before Codex writes new behavior into `games/`, `samples/`, or `tools/`, Codex must check whether equivalent or reusable capability already exists in `src/`
514+
- Codex must reuse or extend existing `src/` capability when appropriate
515+
- 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+
517+
Local implementation rules:
518+
- local implementation is allowed only when behavior is truly game-specific, tool-specific, or sample-specific
519+
- local implementation must not mask a missing `src/` shared capability
520+
- local implementation must not create shadow APIs competing with `src/`
516521

517522
Prohibited no-shadow behaviors:
518-
- local engine-like fallbacks
519-
- duplicate render, input, audio, physics, asset, timing, or parser logic
520-
- wrapper code that hides missing engine capability
521-
- tool, game, or sample custom behavior that masks an engine gap
522-
- shadow APIs that compete with engine APIs
523-
524-
Engine growth enforcement:
525-
- if the correct fix requires adding or updating the engine, Codex must do so when the PR scope allows it
526-
- if PR scope does not allow engine changes, Codex must report the required engine follow-up instead of creating a local workaround
527-
- engine growth should be deliberate, reviewed, and validated through engine-impact testing
523+
- local shared-capability fallbacks
524+
- duplicate render, input, audio, physics, asset, timing, parser, or validation logic
525+
- wrapper code that hides missing `src/` capability
526+
- custom games, samples, or tools behavior that masks a `src/` gap
527+
- shadow APIs that compete with `src/` APIs
528528

529529
Shared infrastructure rules:
530530
- 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

0 commit comments

Comments
 (0)