Skip to content

feat(performance): add react-render-proof skill - #82

Closed
MajorLift wants to merge 1 commit into
mainfrom
jongsun/add/react-render-proof-skill
Closed

feat(performance): add react-render-proof skill#82
MajorLift wants to merge 1 commit into
mainfrom
jongsun/add/react-render-proof-skill

Conversation

@MajorLift

Copy link
Copy Markdown
Contributor

Adds react-render-proof to the performance domain — proving that a rendering or memoization change actually reduced work.

The problem it addresses

"I memoized the selector, the list stopped re-rendering" is an unfalsifiable claim until someone counts. And the obvious way to count is wrong in a specific, silent way.

The falsifier is an arm whose treatment never reached the built bundle. A null result from undelivered treatment is indistinguishable from a null result from a genuinely small effect — and it reports as the second. You conclude "the memoization didn't help" when what actually happened is the memoization wasn't in the binary you measured. So the skill gates on delivery before it reads any delta: verify the mechanism under test is active in each arm (the memo present, the compiler output emitted, the flag evaluated) and only then interpret.

What it covers

  • Re-render countswhy-did-you-render wiring, and what its output does and doesn't establish.
  • Selector recomputes — reselect's real .recomputations() API, which is the direct measurement rather than an inference from render counts.
  • A/B arms at a FIXED commit — both arms toggled at one commit, never compared across a merge boundary. A cross-merge comparison silently varies everything else that landed in between.
  • Reporting a band, not a point — an unreplicated single-run delta is not a result; the skill states the spread and the smallest effect the design could resolve.

Relationship to the existing performance skills

Complementary to the review-time skills, not overlapping: the perf-* skills say what to change, and #43's anti-pattern review skills catch the patterns in a diff. This one proves a change that already landed did what it claimed. It is the measurement counterpart, and it is callable by pr-validate as the engine behind its React render lane.

Files

domains/performance/skills/react-render-proof/skill.md. Shipped experimental; no repos/ overlay. Commits GPG-signed.

Prove a React rendering or memoization change actually reduced work, with a
delivery gate and a reported band. Covers re-render counts via
why-did-you-render, selector recomputes via reselect's `.recomputations()`, and
A/B arms toggled at a FIXED commit rather than across a merge boundary.

The falsifier is an arm whose treatment never reached the built bundle: a null
from undelivered treatment is indistinguishable from a null from a small effect,
and reports as the second. Hence the delivery gate before any delta is read.
MajorLift added a commit to MajorLift/metamask-skills that referenced this pull request Jul 30, 2026
Folds in the react-render-proof skill (was MetaMask#82) and the mobile reference-library
additions (was MetaMask#49). All three were the same effort seen from different ends —
moving performance work earlier in the loop — and they share a substrate, so
reviewing them apart meant reviewing the substrate three times.

The loop this domain now covers:
- catch it at review    — effect/selector anti-pattern review skills, driven by
                          the knowledge taxonomy
- prove it moved        — react-render-proof, with a delivery gate so an arm
                          whose treatment never reached the bundle cannot report
                          as a null
- measure it honestly   — data-analysis, benchmark hygiene, web-vitals framing
- know the codebase     — the mm-* reference library and its audit playbook

Also neutralizes five references to private planning tickets, which do not
belong on a public repository — they named internal epic and audit-ticket
numbers. The surrounding guidance is unchanged; only the identifiers are gone.
@MajorLift MajorLift closed this Jul 30, 2026
@MajorLift
MajorLift deleted the jongsun/add/react-render-proof-skill branch July 30, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant