Rewrite next-cache-components-optimizer around a test-driven instant() loop (#94721)
Rewrites `skills/next-cache-components-optimizer` in place: an agentic
loop that encodes the goal as a failing `@next/playwright` `instant()`
e2e, works it to green one route at a time, and ships the test as the
regression guard. Covers initial load (hard navigation) and client-side
navigation (soft navigation) with a test variant each, a VERIFY-RED gate
against tests that fail for the wrong reason, and a setup phase that
records the project's build/deploy/test infrastructure in a
project-local `instant-nav.rig.md`, so the skill assumes no platform.
Keeps the existing skill name, so the path from adoption to optimizer
stays one story and there is nothing new to announce. The previous
dev-loop workflow is replaced wholesale. A PREREQS gate requires Next.js
16+ with `cacheComponents` and a matching `@next/playwright`, and
directs an upgrade first when unmet.
Generalized from a burn-down in the v0 codebase, where this loop ran
agent-driven against CI previews; app-specific examples are scrubbed.
Related: #94152 adds `instant-navs`; happy to converge the two.
Also updates the one paragraph in
`docs/01-app/02-guides/instant-navigation.mdx` that describes this skill
to match the new loop.
---------
Co-authored-by: Aurora Scharff <66901228+aurorascharff@users.noreply.github.com>
Co-authored-by: Aurora Scharff <aurora.sofie@gmail.com>