File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,3 +82,12 @@ document is the source of truth for intended behavior when one exists.
8282 without obscuring data flow or creating excessive argument lists.
8383- [ ] If a large function should remain intact, add inline comments that mark
8484 the major steps and explain the relevant invariants.
85+ - [ ] Define a trait only when it has at least two concrete implementations.
86+ Otherwise, prefer a plain struct with methods.
87+ - [ ] Add a single-field wrapper only with a specific intent. Document that
88+ intent in a comment, even when the wrapper is internal-only, so the code
89+ stays concise.
90+ - [ ] After implementation, compare the changed code with existing snippets
91+ that do the same or a similar thing. Extract and call a shared method or
92+ function when suitable; if sharing is not suitable, leave a comment that
93+ explains why.
You can’t perform that action at this time.
0 commit comments