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
|
||||
|
||||
@@ -126,7 +126,9 @@ that prevents data loss, or accessibility.
|
||||
**If it must be built — what shape?** Line up the existing instances of the kind (modal,
|
||||
store, service, hook, persistence path), name the canonical shape, list what to reuse, and
|
||||
flag what the new work might make deletable. An abstraction is earned only by ≥ 2 call
|
||||
sites that would use it today (deletion rule 3).
|
||||
sites that would use it today (deletion rule 3). The deletion test settles suspected
|
||||
pass-throughs: imagine the module deleted — if the complexity just vanishes, it was a
|
||||
shallow wrapper; only if it reappears across its callers was it earning its keep.
|
||||
|
||||
No report scaffolding — these two answers are the output.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user