Skills: fold in four external-skills-review borrows; record the comparison memo

This commit is contained in:
2026-07-04 16:57:57 +03:00
parent 74b810f8c9
commit acf14a8b13
4 changed files with 97 additions and 1 deletions
+10
View File
@@ -54,6 +54,16 @@ Review all changes in scope. If changes span multiple patterns below, apply all
only within their module (including `as const` arrays that exist to derive a type) stay
unexported — `export type` the type, not its source array. Verify with Grep before
exporting "for future use"; the future caller can add the export.
- **Smell baseline** (Fowler, _Refactoring_ ch. 3 — judgement calls, never hard
violations; a documented project rule overrides, and skip anything eslint/Prettier
already enforces): mysterious name (rename — if no honest name comes, the design is
murky); data clumps (the same few params traveling together → one type); primitive
obsession (a string/number standing in for a domain concept); feature envy (a function
reaching into another module's data more than its own); repeated switches (the same
discriminant cascade at multiple sites → one shared map); message chains
(`a.b().c().d()` → hide the walk behind the first object); middle man (a layer that
only delegates → call the target directly). Duplication and speculative generality are
covered by the cleanup rules above.
5. **Styles and UI**: When altering CSS or layout, follow or generalize existing patterns
(CSS Modules + design tokens in `styles/tokens.css`) rather than writing from scratch. Don't