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:
@@ -123,6 +123,12 @@ npm run format # Prettier
|
||||
leads. When in doubt about existing behavior, read the spec. When you ship user-facing
|
||||
behavior, update the matching spec section in the same session; if spec and app
|
||||
disagree, the spec is stale — rewrite it deliberately, never drift silently.
|
||||
- **Reproduce before theorizing** — on a nontrivial bug, first build a command that goes
|
||||
red on the exact symptom (failing test, script, headless-browser driver) and is fast,
|
||||
deterministic, and runnable unattended; minimize the repro, then hypothesize against it.
|
||||
Reading code to build a theory before that command exists is the failure mode. Write the
|
||||
regression test before the fix; tag temporary debug logs with a unique prefix
|
||||
(e.g. `[DEBUG-x7]`) so cleanup is one grep.
|
||||
- **Core-first** — for each feature, build the pure `src/core/` logic with tests before UI.
|
||||
- **Session wrap-up** — when the user signals the session is wrapping, run the review
|
||||
pass before any commit: `/doc-update` in-session first (flush unrecorded rationale),
|
||||
@@ -172,6 +178,11 @@ carries — platform branches, state transitions, config-path writes, render ser
|
||||
not the strings it renders; if that logic is worth guarding, lift it into core/stores and
|
||||
test it there.
|
||||
|
||||
Expected values come from an independent source of truth — a known-good literal, a worked
|
||||
example, the spec — never recomputed the way the implementation computes them. A
|
||||
tautological assertion (`expect(add(a, b)).toBe(a + b)`) passes by construction and can
|
||||
never disagree with the code.
|
||||
|
||||
Component tests (happy-dom) share a harness shape: `createRoot` + `act` with
|
||||
`IS_REACT_ACT_ENVIRONMENT = true` set at module level, stores reset in `beforeEach`, and
|
||||
`vi.mock('../services/chart-renderer', …)` for anything that embeds a chart (vega-embed is
|
||||
|
||||
Reference in New Issue
Block a user