mr-onion

Engineering concerns

Skills about how code is structured and where it’s likely to break, as distinct from what a test covers (see skills/testing/ for that category). Two skills, promoted here from skills/proposed/ by TFP-039 after a real trial run — see CALIBRATION.md for the full output that decision was based on.

  What it does When it runs
code-structure decides where new code goes, before it is written while building
refactor-audit finds drift and files it as issues after the fact

They are a pair. The first prevents; the second catches what got past it.

Where they came from

A conversation about useRun.ts — 442 lines holding 17 useState calls in four unrelated groups, one of which (a set-label-then-revert-after-2s pattern) is written three times in that file.

The observation that prompted both: the monolith was useful. Those four groups were discovered by letting the hook grow until they were visible. Splitting it earlier would have put the boundary in the wrong place, and nobody would have guessed useTransientLabel up front. The seams were found, not designed.

That is why code-structure frames its thresholds as conversation triggers rather than limits — the point is to notice at 250 lines rather than 4,700, not to forbid the file from growing.

What to be sceptical about, and what the trial changed