mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Eng-council: alignment checks from sweep findings + metrics baseline
This commit is contained in:
@@ -40,6 +40,10 @@ Review all changes in scope. If changes span multiple patterns below, apply all
|
||||
over-engineering from iterative development — dead code, try/catch around internal calls
|
||||
that can't throw, abstraction layers wrapping a single implementation. Proceed with caution;
|
||||
ask if unsure.
|
||||
- **Export hygiene**: a symbol is exported only if another module imports it. Symbols used
|
||||
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.
|
||||
|
||||
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
|
||||
@@ -128,6 +132,9 @@ Update relevant docs if the feature is significant:
|
||||
If `package.json` changed:
|
||||
|
||||
- Flag each new dependency; explain what it does and why it's needed.
|
||||
- Every package imported directly in `src/` must be declared in `dependencies` — never rely
|
||||
on a transitive install (it can vanish or drift on any lockfile churn). Declaring a package
|
||||
the bundle already carries adds no weight.
|
||||
- Could a small custom implementation avoid it? Note the trade-off.
|
||||
- Prefer dependencies that solve genuinely hard problems (parsing, rendering) over those that
|
||||
save boilerplate.
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Codebase Metrics
|
||||
|
||||
One row per `/eng-council` sweep. The trend is the point: accretion becomes visible
|
||||
instead of felt. Methodology: LOC excludes `*.test.*`; "dead exports" is `npx knip`
|
||||
unused **runtime** exports (unused exported _types_ tracked in the sweep report, not
|
||||
here); "dup %" is `npx jscpd src --min-tokens 50 --format "typescript,tsx"` (tests
|
||||
included — they dominate the clones; non-test clones are itemized in the sweep report).
|
||||
|
||||
| date | src files | src LOC | core LOC | app LOC | deps | knip dead exports | jscpd dup % |
|
||||
| ---------- | --------- | ------- | -------- | ------- | ---- | ----------------- | ----------- |
|
||||
| 2026-06-12 | 105 | 16876 | 4669 | 12130 | 12 | 0 | 2.69 |
|
||||
| 2026-06-12 | 106 | 16695 | 4655 | 11963 | 12 | 0 | 2.03 |
|
||||
|
||||
The second 2026-06-12 row is the same sweep after its structural proposals landed
|
||||
(usePopover/useColResizeDrag extraction, modal-cycle break, dead service deletion).
|
||||
Reference in New Issue
Block a user