mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Skills: fold in four external-skills-review borrows; record the comparison memo
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user