- **No `unwrap()`** in library code — use `?` or `expect("reason")`.
- **No `unsafe`** without `// SAFETY:` comment.
- **Use `alloy-primitives` types** (`Address`, `B256`, `U256`) — never raw `[u8; 32]`.
- **Use `thiserror`** for all library error types.
- **All public items need doc comments** — `cargo doc` must build cleanly.
- **Logging:** `tracing` macros only in library crates — no `println!` or `eprintln!`. Binary crates may use `println!` for user-facing output only.
- **Validate at parse boundaries:** Reject invalid inputs (e.g., out-of-range bit widths, sizes) as early as possible — at parse time, not at render time.
- **Match on types, not strings:** When structured data exists (e.g., a `SolType` enum), inspect it directly. Never scan rendered strings to infer type information.
- **Exhaustive `match` on enums:** When dispatching on enums (e.g., `Target`, `SolType`), prefer exhaustive `match` over `if`/`if let` chains so the compiler catches unhandled variants when new ones are added.
- **Feature flag semantics:** Flags must do exactly what their name says. A `wrappers = false` flag must not suppress all output — only wrapper functions.
- **Tests:** Always fix failing tests or other errors even if they are preexisting
- **Formatting:** Run formatting and linting after making code changes and before committing.
- **Bugs:** When a bug is fixed add a test for it to prevent regressions.