Architectural Drift Protocol
Verify Line Counts: Check all
.rsfiles in the current workspace. Any file > 300 lines MUST be split. Use your bash tools to count lines if needed.Enforce DDD (Scott Wlaschin):
- Identify primitive obsession (e.g.,
String,i32for IDs). Refactor into NewTypes. - Check workflows: Are they explicit state transitions modeled as functions?
- Verify
Parse, don't validateis actually adhered to.
- Identify primitive obsession (e.g.,
Refactor & Split:
- If refactoring is needed: Create new files, update
mod.rsorlib.rs/main.rs, move code, and ensure it still logically aligns with the contract.
- If refactoring is needed: Create new files, update
Status Outputs:
- State
STATUS: REFACTOREDif edits occurred. - State
STATUS: PERFECTif no edits were needed.
- State