diff --git a/docs/agents/adr-0019-unit.md b/docs/agents/adr-0019-unit.md index 8a3ae7c6a..207bdfedc 100644 --- a/docs/agents/adr-0019-unit.md +++ b/docs/agents/adr-0019-unit.md @@ -45,9 +45,9 @@ Each step names its declaration site; read that, not prose. §4–5 lifecycle evidence. Importing durable machinery promotes the tier — say so. - Planted-red for anything new that is *not* a table row (a facet, a package boundary): revert, run, quote the failing line. A row needs no planted-red of its own. -- Size: root-bytes-removed vs package-bytes-added and the four checkpoint metrics - (`pnpm size --compare` against the base build), against the posted budget. Move-dominated is the - rule; net growth is itemized, not explained away. +- Size: use the CI Size workflow's root-bytes-removed vs package-bytes-added and four checkpoint + metrics against the posted budget. Do not build a base checkout or run a local size comparison by + default. Move-dominated is the rule; net growth is itemized, not explained away. - Live evidence for the changed path on at least one real target per family the denominator claims (`docs/agents/device-verification.md`); fixture-backed parity does not replace it. - Layering: `pnpm check:layering` green — R3 seam list narrows in the unit that removes an area's diff --git a/docs/agents/pull-requests.md b/docs/agents/pull-requests.md index 285ac3d7e..8baa9ac5b 100644 --- a/docs/agents/pull-requests.md +++ b/docs/agents/pull-requests.md @@ -83,3 +83,11 @@ asked or when the work is intentionally incomplete. before/after evidence when an issue reports a concrete divergence. - Green CI is necessary but insufficient for device-facing or routing-sensitive work. - Check whether the tightening pass removed code/tests the change made obsolete. +- Treat the CI Size workflow as review evidence; local size comparisons are not required by default. + Escalate scrutiny when a PR adds roughly 700 or more net production lines (excluding tests, + generated data, fixtures, and documentation) or increases npm unpacked size by more than 3 kB. + Consider gross additions and deletions too, so a move-dominated change is not mistaken for pure + growth. These thresholds trigger investigation, not automatic rejection: ask an independent + reviewer whether a deeper owning interface, stronger types, less ceremony, reuse of an existing + construction path, or deletion of superseded code can make the change materially smaller. The PR + should itemize justified growth and record why a smaller design was rejected. diff --git a/docs/agents/testing.md b/docs/agents/testing.md index 9bd5f7ef8..9ec84e26c 100644 --- a/docs/agents/testing.md +++ b/docs/agents/testing.md @@ -136,6 +136,12 @@ the generator, where every property inherits it — not in a new hand-pinned cas ## Affected-check selector (`pnpm check:affected`) +Fast local feedback is a project value: the default developer loop should run the smallest relevant +gate set and return as quickly as correctness allows. Expensive informational measurements belong in +CI unless they are needed to diagnose a reported result. In particular, do not build a base checkout +or run package-size comparisons locally by default; use the authoritative Size workflow report during +review. + `pnpm check:affected --base ` derives which local checks a diff needs, so agents stop interpreting the testing matrix by hand. It is a **fail-open advisory**: existing GitHub CI stays authoritative and required, and this only