|
| 1 | +--- |
| 2 | +title: "<short, descriptive title>" |
| 3 | +document_id: "<stable-id, e.g., subsystem-YYYY-MM-DD>" |
| 4 | +status: "draft" # draft | living | frozen | deprecated |
| 5 | +created: "<UTC ISO-8601>" # e.g., 2025-10-17T00:00:00Z |
| 6 | +last_updated: "<UTC ISO-8601>" |
| 7 | +version: "0.1.0" |
| 8 | +engine_workspace_version: "2023.1.30" |
| 9 | +wgpu_version: "26.0.1" |
| 10 | +shader_backend_default: "naga" |
| 11 | +winit_version: "0.29.10" |
| 12 | +repo_commit: "<git sha at update>" |
| 13 | +owners: ["lambda-sh"] |
| 14 | +reviewers: ["engine", "rendering"] |
| 15 | +tags: ["spec", "<area>"] |
| 16 | +--- |
| 17 | + |
| 18 | +# <Specification Title> |
| 19 | + |
| 20 | +Summary |
| 21 | +- State the problem and the desired outcome in one paragraph. |
| 22 | +- Include a concise rationale for introducing or changing behavior. |
| 23 | + |
| 24 | +## Scope |
| 25 | + |
| 26 | +- Goals |
| 27 | + - List concrete, testable goals. |
| 28 | +- Non-Goals |
| 29 | + - List items explicitly out of scope. |
| 30 | + |
| 31 | +## Terminology |
| 32 | + |
| 33 | +- Define domain terms and acronyms on first use (for example, uniform buffer |
| 34 | + object (UBO)). Use the acronym thereafter. |
| 35 | + |
| 36 | +## Architecture Overview |
| 37 | + |
| 38 | +- Describe components, data flow, and boundaries with existing modules. |
| 39 | +- Include a small ASCII diagram if it materially aids understanding. |
| 40 | + |
| 41 | +## Design |
| 42 | + |
| 43 | +- API Surface |
| 44 | + - Enumerate public types, builders, functions, and commands. |
| 45 | + - Use code identifiers with backticks (for example, `RenderCommand`). |
| 46 | +- Behavior |
| 47 | + - Specify observable behavior, constraints, and edge cases. |
| 48 | + - Use normative language (MUST/SHOULD/MAY) where appropriate. |
| 49 | +- Validation and Errors |
| 50 | + - Document validation rules and the layer that enforces them. |
| 51 | + - Describe error conditions and error types. |
| 52 | + |
| 53 | +## Constraints and Rules |
| 54 | + |
| 55 | +- Platform and device limits that apply (for example, alignments, size caps). |
| 56 | +- Data layout or serialization rules, if any. |
| 57 | + |
| 58 | +## Performance Considerations |
| 59 | + |
| 60 | +- Recommendations |
| 61 | + - State performance guidance succinctly. |
| 62 | + - Rationale: Provide a short reason for each recommendation. |
| 63 | + |
| 64 | +## Requirements Checklist |
| 65 | + |
| 66 | +- Functionality |
| 67 | + - [ ] Feature flags defined (if applicable) |
| 68 | + - [ ] Core behavior implemented |
| 69 | + - [ ] Edge cases handled (list) |
| 70 | +- API Surface |
| 71 | + - [ ] Public types and builders implemented |
| 72 | + - [ ] Commands/entry points exposed |
| 73 | + - [ ] Backwards compatibility assessed |
| 74 | +- Validation and Errors |
| 75 | + - [ ] Input validation implemented |
| 76 | + - [ ] Device/limit checks implemented |
| 77 | + - [ ] Error reporting specified and implemented |
| 78 | +- Performance |
| 79 | + - [ ] Critical paths profiled or reasoned |
| 80 | + - [ ] Memory usage characterized |
| 81 | + - [ ] Recommendations documented |
| 82 | +- Documentation and Examples |
| 83 | + - [ ] User-facing docs updated |
| 84 | + - [ ] Minimal example(s) added/updated |
| 85 | + - [ ] Migration notes (if applicable) |
| 86 | + |
| 87 | +For each checked item, include a reference to a commit, pull request, or file |
| 88 | +path that demonstrates the implementation. |
| 89 | + |
| 90 | +## Verification and Testing |
| 91 | + |
| 92 | +- Unit Tests |
| 93 | + - Describe coverage targets and representative cases. |
| 94 | + - Commands: `cargo test -p <crate> -- --nocapture` |
| 95 | +- Integration Tests |
| 96 | + - Describe scenarios and expected outputs. |
| 97 | + - Commands: `cargo test --workspace` |
| 98 | +- Manual Checks (if necessary) |
| 99 | + - Short, deterministic steps to validate behavior. |
| 100 | + |
| 101 | +## Compatibility and Migration |
| 102 | + |
| 103 | +- Enumerate breaking changes and migration steps, or state “None”. |
| 104 | +- Note interactions with feature flags or environment variables. |
| 105 | + |
| 106 | +## Changelog |
| 107 | + |
| 108 | +- <YYYY-MM-DD> (v0.1.0) — Initial draft. |
0 commit comments