|
1 | 1 | <!-- |
2 | 2 | Sync Impact Report |
3 | 3 | =================== |
4 | | - Version change: 1.3.0 -> 1.3.1 |
| 4 | + Version change: 1.3.1 -> 1.4.0 |
5 | 5 |
|
6 | | - Modified principles: |
7 | | - - VI. Minimal Code: Added explicit NO DEPRECATED FUNCTIONS, NO BACKWARDS-COMPAT SHIMS, |
8 | | - DELETE TESTS FOR DELETED CODE rules. Updated rationale to emphasize single maintainer. |
| 6 | + Modified principles: N/A |
9 | 7 |
|
10 | 8 | Added sections: |
11 | 9 | - Core Principles V. Dogfooding (1.1.0) |
12 | 10 | - Core Principles VI. Minimal Code (1.2.0) |
13 | 11 | - Core Principles VII. Single Code Path (1.3.0) |
| 12 | + - Core Principles VIII. Fail Fast (1.4.0) |
14 | 13 |
|
15 | 14 | Removed sections: N/A |
16 | 15 |
|
17 | 16 | Templates requiring updates: |
18 | 17 | - .specify/templates/plan-template.md: Add Dogfooding to Constitution Check table [DONE] |
19 | 18 | - .specify/templates/plan-template.md: Add Minimal Code to Constitution Check table |
20 | 19 | - .specify/templates/plan-template.md: Add Single Code Path to Constitution Check table |
| 20 | + - .specify/templates/plan-template.md: Add Fail Fast to Constitution Check table |
21 | 21 |
|
22 | 22 | Follow-up TODOs: None |
23 | 23 | --> |
@@ -160,6 +160,21 @@ parse → validate → execute |
160 | 160 |
|
161 | 161 | **Rationale**: We don't want command-specific bugs. We don't want to maintain multiple code paths. Keep it simple. Keep it DRY. No one wants wet code. |
162 | 162 |
|
| 163 | +### VIII. Fail Fast |
| 164 | + |
| 165 | +Code MUST fail immediately and loudly when something is wrong. Silent failures and deferred errors are bugs. |
| 166 | + |
| 167 | +- Use assertions liberally. If a condition should never happen, assert it. |
| 168 | +- Validate inputs at the boundary. Reject garbage immediately, don't propagate it. |
| 169 | +- Panic on impossible states rather than returning meaningless defaults. |
| 170 | +- Error messages MUST be specific: what failed, why, and where. |
| 171 | +- NO defensive coding that papers over bugs. If caller passes nil, panic. Don't check and silently return. |
| 172 | +- NO "graceful degradation" that hides broken behavior. If it's broken, STOP. |
| 173 | +- Prefer hard crashes over corrupted state. A crash is debuggable. Corrupted data is a nightmare. |
| 174 | +- Tests MUST assert behavior, not just "run without error". A test that doesn't assert is not a test. |
| 175 | + |
| 176 | +**Rationale**: The earlier you find a bug, the cheaper it is to fix. Assertions and hard failures surface bugs at development time, not in production. Whimsy code that "handles" errors by ignoring them creates debugging nightmares. Fail hard, fail fast, fix it now. |
| 177 | + |
163 | 178 | ## Quality Standards |
164 | 179 |
|
165 | 180 | ### Testing Requirements |
@@ -230,4 +245,4 @@ All contributions MUST comply with these principles. |
230 | 245 | - Complexity MUST be justified in PR descriptions |
231 | 246 | - Principle violations require explicit exemption with documented rationale |
232 | 247 |
|
233 | | -**Version**: 1.3.1 | **Ratified**: 2025-10-14 | **Last Amended**: 2026-01-03 |
| 248 | +**Version**: 1.4.0 | **Ratified**: 2025-10-14 | **Last Amended**: 2026-01-04 |
0 commit comments