Unverified Commit 9e344c92 authored by Aurora Scharff's avatar Aurora Scharff Committed by GitHub

skill(next-cache-components-adoption): tune skill to mention app router requirement (#95069)

### What

Two small edits in
[`skills/next-cache-components-adoption/SKILL.md`](https://github.com/vercel/next.js/blob/canary/skills/next-cache-components-adoption/SKILL.md):

1. Add **App Router only** bail-out above the **Next.js 16.3+** version
note in the `## requires` section. The Pages-Router check is the hard
bail-out for this skill, so it should run before the version-upgrade
guidance.
2. Remove an accidentally duplicated "End of every milestone: summarize
and ask" paragraph in `## the shape of the work`.

### Why

From a friction log of an agent driving this skill against a Pages
Router project: the agent read past the version note, started the
upgrade, and only hit the App Router incompatibility several steps in.
Surfacing the bail-out first saves that round trip.

<!-- NEXT_JS_LLM_PR -->

---------
Co-authored-by: 's avatarCopilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
parent e169a26f
...@@ -15,6 +15,8 @@ Enable Cache Components on an app and walk it to a clean build. This skill **seq ...@@ -15,6 +15,8 @@ Enable Cache Components on an app and walk it to a clean build. This skill **seq
## requires ## requires
**App Router only.** Cache Components is an App Router feature; `cacheComponents: true` does nothing for `pages/` routes. If the project has a `pages/` or `src/pages/` tree but no `app/` or `src/app/` tree, stop and tell the user — Pages → App migration is its own project, not part of this skill. A hybrid app (both `pages/` and `app/`) is fine: the flag affects the `app/` routes; `pages/` routes are unaffected and don't need opt-outs.
Next.js **16.3+**. That release is where the pieces this skill relies on land: top-level `cacheComponents`, `export const instant`, the dev-overlay instant-navigation validation warnings (including `link-prefetch-partial`), and the `cache-components-instant-false` codemod. Next.js **16.3+**. That release is where the pieces this skill relies on land: top-level `cacheComponents`, `export const instant`, the dev-overlay instant-navigation validation warnings (including `link-prefetch-partial`), and the `cache-components-instant-false` codemod.
If `next --version` reports below 16.3, upgrade first: If `next --version` reports below 16.3, upgrade first:
...@@ -39,8 +41,6 @@ Adoption has two milestones. Each is shippable on its own: ...@@ -39,8 +41,6 @@ Adoption has two milestones. Each is shippable on its own:
**End of every milestone: summarize and ask.** Tell the user which routes changed and how (cached / wrapped in `<Suspense>` / opted out as a documented Block), what they should sanity-check, and ask whether to open a PR before continuing. Each milestone is a real checkpoint, not a step inside one agent run. Don't silently roll on. **End of every milestone: summarize and ask.** Tell the user which routes changed and how (cached / wrapped in `<Suspense>` / opted out as a documented Block), what they should sanity-check, and ask whether to open a PR before continuing. Each milestone is a real checkpoint, not a step inside one agent run. Don't silently roll on.
**End of every milestone: summarize and ask.** Tell the user which routes changed and how (cached / wrapped in `<Suspense>` / opted out as a documented Block), what they should sanity-check, and ask whether to open a PR before continuing. Each milestone is a real checkpoint, not a step inside one agent run. Don't silently roll on.
## background ## background
`cacheComponents: true` requires every route to be prerenderable. A route that reads request-time data outside `<Suspense>` is "blocking" and **fails the build**. `export const instant = false` marks a route as allowed to block, which clears it in both dev and build; on a layout it covers the whole subtree beneath it. `cacheComponents: true` requires every route to be prerenderable. A route that reads request-time data outside `<Suspense>` is "blocking" and **fails the build**. `export const instant = false` marks a route as allowed to block, which clears it in both dev and build; on a layout it covers the whole subtree beneath it.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment