Skip to content

docs: link the optimizer skill to the insight docs and rework the AI agents skills section - #96032

Merged
aurorascharff merged 7 commits into
jude/instant-nav-skillfrom
dedepucliate-skill
Jul 21, 2026
Merged

docs: link the optimizer skill to the insight docs and rework the AI agents skills section#96032
aurorascharff merged 7 commits into
jude/instant-nav-skillfrom
dedepucliate-skill

Conversation

@aurorascharff

@aurorascharff aurorascharff commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Stacked on #94721. Two docs-only changes.

next-cache-components-optimizer skill — stop re-implementing what the docs own.

  • The per-blocker fixes are kind: insight pages that already surface in the build output (and the dev overlay) with a docs/messages/<slug> link, so the skill now points at them instead of carrying a before→after table. Deleted reference/patterns.md and folded the parts the insights don't cover into the D (FIX) phase: client-nav boundary placement, keep-the-LCP-in-shell, "a green check isn't always instant," and the runtime-prefetch escape hatch with its instant()-specific gotchas.
  • Kept it consistently build-only: removed the next dev Navigation Inspector observation and the stale instant = true "regression marker" edge case (validation runs by default, so the opt-in was pointless). Detection stays on the build (--debug-prerender for the full frame, --debug-build-paths "app/<route>/**" to scope it).
  • Accuracy: soft-navigation payload is the App Shell (not "static shell"), Next.js 16.3+, and instant() comes from @next/playwright.
  • Added a "Reporting to the user" section: the loop runs unattended, so it's about wording and showing before/after results, not per-route check-ins.

AI agents guide (ai-agents.mdx). Reworked the skills table into per-skill sections, each with an install command and a copyable agent prompt (matching the 16.3 AI blog). Plain headings with the GitHub link in the description, per review.

Verification

Docs-only; no build/test. Rendered the AI agents guide locally against the docs site to confirm it renders.

@aurorascharff
aurorascharff marked this pull request as ready for review July 21, 2026 22:58
Copilot AI review requested due to automatic review settings July 21, 2026 22:58
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Stats from current PR

🔴 2 regressions, 2 improvements

Metric Canary PR Change Trend
Webpack Cold (First Request) 3.756s 4.284s 🔴 +528ms (+14%) █▁▁▁▄
Webpack Warm (First Request) 3.709s 3.943s 🔴 +234ms (+6%) █▁▁▁▃
Turbo Build Time 5.819s 5.324s 🟢 495ms (-9%) ▁▇▃▂▁
Turbo Build Time (cached) 5.978s 5.484s 🟢 494ms (-8%) ▁▇▃▁▁
📊 All Metrics
📖 Metrics Glossary

Dev Server Metrics:

  • Listen = TCP port starts accepting connections
  • First Request = HTTP server returns successful response
  • Cold = Fresh build (no cache)
  • Warm = With cached build artifacts

Build Metrics:

  • Fresh = Clean build (no .next directory)
  • Cached = With existing .next directory

Change Thresholds:

  • Time: Changes < 50ms AND < 10%, OR < 2% are insignificant
  • Size: Changes < 1KB AND < 1% are insignificant
  • All other changes are flagged to catch regressions

⚡ Dev Server

Metric Canary PR Change Trend
Cold (Listen) 814ms 813ms ▂▇▂▁▂
Cold (Ready in log) 807ms 798ms ▁█▁▁▁
Cold (First Request) 1.386s 1.353s ▁▇▁▁▁
Warm (Listen) 813ms 812ms ▁▇▁▁▁
Warm (Ready in log) 803ms 795ms ▁▇▁▁▁
Warm (First Request) 1.346s 1.350s ▁▇▂▁▁
📦 Dev Server (Webpack) (Legacy)

📦 Dev Server (Webpack)

Metric Canary PR Change Trend
Cold (Listen) 814ms 813ms █▂▂▂▂
Cold (Ready in log) 791ms 799ms █▁▁▁▁
Cold (First Request) 3.756s 4.284s 🔴 +528ms (+14%) █▁▁▁▄
Warm (Listen) 813ms 814ms █▂▂▁▂
Warm (Ready in log) 788ms 813ms █▁▁▁▂
Warm (First Request) 3.709s 3.943s 🔴 +234ms (+6%) █▁▁▁▃

⚡ Production Builds

Metric Canary PR Change Trend
Fresh Build 5.819s 5.324s 🟢 495ms (-9%) ▁▇▃▂▁
Cached Build 5.978s 5.484s 🟢 494ms (-8%) ▁▇▃▁▁
📦 Production Builds (Webpack) (Legacy)

📦 Production Builds (Webpack)

Metric Canary PR Change Trend
Fresh Build 26.286s 26.165s █▁▁▁▁
Cached Build 26.362s 26.640s █▁▁▁▁
node_modules Size 527 MB 527 MB █████
📦 Bundle Sizes

Bundle Sizes

⚡ Turbopack

Client

Main Bundles
Canary PR Change
03frh1tm1pkvs.js gzip 65.6 kB N/A -
0a-p0meqxynjz.js gzip 10.3 kB N/A -
0avtke4yefj4-.js gzip 13.1 kB N/A -
0ban--bx2qns6.js gzip 155 B N/A -
0cz1d0mv5g_q7.js gzip 39.4 kB 39.4 kB
0ke29q58efn1a.js gzip 156 B N/A -
0m3evdsbel0p0.js gzip 153 B N/A -
0p6ivy9lb7-ut.js gzip 157 B N/A -
0pt5of3ch6d2u.js gzip 13.6 kB N/A -
0sug3ihj23mvn.js gzip 154 B N/A -
0xnsdo-6y9r3k.js gzip 5.72 kB N/A -
0y25v1ej71uft.js gzip 155 B N/A -
0yi7is8u4covm.js gzip 8.77 kB N/A -
12zd-d7xicsb4.js gzip 158 B N/A -
1elt1qium-r2m.css gzip 115 B 115 B
1g2ea05dkmmwi.js gzip 45.2 kB N/A -
1mqxdmso4160h.js gzip 160 B N/A -
1prv-wg6jgtt2.js gzip 8.77 kB N/A -
1t47vod02e_4a.js gzip 8.75 kB N/A -
1tf1phijqlx9j.js gzip 220 B 220 B
1tw002sq5bo4l.js gzip 10 kB N/A -
1wlerik1n7zbr.js gzip 8.7 kB N/A -
2d91wcgx6lf2k.js gzip 153 B N/A -
2koflviradwt3.js gzip 7.4 kB N/A -
2lviwqiqxm904.js gzip 3.52 kB N/A -
2ocpv0tylryvn.js gzip 160 B N/A -
2pevdqjpbf3xk.js gzip 9.45 kB N/A -
2qd2anu9eizlz.js gzip 8.75 kB N/A -
2sv39ae5_8vfj.js gzip 8.81 kB N/A -
2utx6n7w65xqa.js gzip 8.7 kB N/A -
2xsvwiy3-s105.js gzip 156 B N/A -
2zhsfsomo6g1v.js gzip 169 B N/A -
3-ukivglqkfeq.js gzip 8.78 kB N/A -
325xisqrylugu.js gzip 450 B N/A -
3jc9ghvds1spf.js gzip 2.29 kB N/A -
3juwkvkgvywfe.js gzip 10.6 kB N/A -
3kbove7q58uqh.js gzip 13.2 kB N/A -
3qn7vntp30gaj.js gzip 1.47 kB N/A -
3s5fbzg2qit8e.js gzip 156 B N/A -
3xtfvhlgn22av.js gzip 71.1 kB N/A -
turbopack-0z.._-wk.js gzip 3.78 kB N/A -
turbopack-0z..g5ya.js gzip 3.8 kB N/A -
turbopack-10..hlo9.js gzip 3.8 kB N/A -
turbopack-11..yksz.js gzip 3.81 kB N/A -
turbopack-1k..5le3.js gzip 3.8 kB N/A -
turbopack-2p..8e3n.js gzip 3.8 kB N/A -
turbopack-2s..l7od.js gzip 3.8 kB N/A -
turbopack-2u..c9m0.js gzip 3.8 kB N/A -
turbopack-39..3ysu.js gzip 3.8 kB N/A -
turbopack-3i..u_md.js gzip 3.8 kB N/A -
turbopack-3l..z_a8.js gzip 3.81 kB N/A -
turbopack-3w..t926.js gzip 3.8 kB N/A -
turbopack-3y..v370.js gzip 3.82 kB N/A -
turbopack-40..h7ed.js gzip 3.8 kB N/A -
030a1njeh5b77.js gzip N/A 10 kB -
0ceaj3rmii5dl.js gzip N/A 157 B -
0ot0qt5np20h7.js gzip N/A 8.78 kB -
0po7u01wwhl8s.js gzip N/A 157 B -
12m9rr7_7cexd.js gzip N/A 8.7 kB -
15-b7iytymgp5.js gzip N/A 65.6 kB -
186r3y_rfvr0b.js gzip N/A 8.78 kB -
19v97848yrjp7.js gzip N/A 8.81 kB -
1b9oo_n-opj3l.js gzip N/A 156 B -
1mvdo2etbyclo.js gzip N/A 156 B -
1nd_0rwgz2ozk.js gzip N/A 9.45 kB -
1oi9pltr_e10m.js gzip N/A 10.6 kB -
1qow5vb4es1bl.js gzip N/A 152 B -
1rd9tzqgzsz2w.js gzip N/A 8.77 kB -
1rewgj8du8r7b.js gzip N/A 157 B -
1rq1g_cwv642d.js gzip N/A 10.3 kB -
1uojw_uabeg93.js gzip N/A 450 B -
1w-7lusgyl81y.js gzip N/A 8.7 kB -
2-4bvun4utbsg.js gzip N/A 157 B -
20pls2cco-oyl.js gzip N/A 71.1 kB -
21h56wdn9zddo.js gzip N/A 8.75 kB -
21kc-4x8zf_oh.js gzip N/A 155 B -
22nt-vwpfkpq5.js gzip N/A 155 B -
2j9dbydew6g_b.js gzip N/A 162 B -
2lg10omv7xu14.js gzip N/A 3.52 kB -
2ovff1533zvno.js gzip N/A 13.2 kB -
2s4z8jy0z7v93.js gzip N/A 1.46 kB -
2y6gb5bs4mnam.js gzip N/A 8.75 kB -
2zvoj8k1z3cei.js gzip N/A 7.41 kB -
341h71ln1jpl3.js gzip N/A 2.29 kB -
34ttpt_n7605h.js gzip N/A 5.72 kB -
36ckfq9o-ys-a.js gzip N/A 13.1 kB -
37pm_isc9xj9i.js gzip N/A 163 B -
3vdh6_u50pu5t.js gzip N/A 13.6 kB -
3zbnmofunn_bw.js gzip N/A 158 B -
441_xec6sd6zp.js gzip N/A 45.1 kB -
45148p5lps61x.js gzip N/A 170 B -
turbopack-00..m1m7.js gzip N/A 3.81 kB -
turbopack-0d..4kzx.js gzip N/A 3.81 kB -
turbopack-0z..p79s.js gzip N/A 3.81 kB -
turbopack-1c..77uv.js gzip N/A 3.81 kB -
turbopack-1i..3kn6.js gzip N/A 3.81 kB -
turbopack-2d..v5q3.js gzip N/A 3.82 kB -
turbopack-2f..v9c_.js gzip N/A 3.78 kB -
turbopack-2k..d454.js gzip N/A 3.81 kB -
turbopack-2t..j9f5.js gzip N/A 3.81 kB -
turbopack-3_..5w5s.js gzip N/A 3.81 kB -
turbopack-39..bm8d.js gzip N/A 3.81 kB -
turbopack-3e..0dhh.js gzip N/A 3.8 kB -
turbopack-3t..czon.js gzip N/A 3.81 kB -
turbopack-3v..bfyi.js gzip N/A 3.81 kB -
Total 448 kB 448 kB ⚠️ +98 B

Server

Middleware
Canary PR Change
middleware-b..fest.js gzip 778 B 777 B
Total 778 B 777 B ✅ -1 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 436 B 435 B
Total 436 B 435 B ✅ -1 B

📦 Webpack

Client

Main Bundles
Canary PR Change
3322-HASH.js gzip 63.7 kB N/A -
4191.HASH.js gzip 169 B N/A -
7920-HASH.js gzip 4.68 kB N/A -
9784-HASH.js gzip 5.63 kB N/A -
b1ad9f4c-HASH.js gzip 62.9 kB N/A -
framework-HASH.js gzip 59.7 kB 59.7 kB
main-app-HASH.js gzip 254 B 253 B
main-HASH.js gzip 40 kB 40 kB
webpack-HASH.js gzip 1.68 kB 1.68 kB
3577.HASH.js gzip N/A 168 B -
578-HASH.js gzip N/A 64.4 kB -
8590-HASH.js gzip N/A 5.61 kB -
9750-HASH.js gzip N/A 4.69 kB -
a8984546-HASH.js gzip N/A 62.9 kB -
Total 239 kB 239 kB ⚠️ +630 B
Polyfills
Canary PR Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Total 39.4 kB 39.4 kB
Pages
Canary PR Change
_app-HASH.js gzip 194 B 193 B
_error-HASH.js gzip 181 B 182 B
css-HASH.js gzip 334 B 331 B
dynamic-HASH.js gzip 1.81 kB 1.81 kB
edge-ssr-HASH.js gzip 255 B 253 B
head-HASH.js gzip 349 B 351 B
hooks-HASH.js gzip 382 B 384 B
image-HASH.js gzip 581 B 582 B
index-HASH.js gzip 260 B 259 B
link-HASH.js gzip 2.48 kB 2.48 kB
routerDirect..HASH.js gzip 317 B 318 B
script-HASH.js gzip 384 B 386 B
withRouter-HASH.js gzip 316 B 315 B
1afbb74e6ecf..834.css gzip 106 B 106 B
Total 7.95 kB 7.95 kB ⚠️ +1 B

Server

Edge SSR
Canary PR Change
edge-ssr.js gzip 128 kB 128 kB
page.js gzip 287 kB 287 kB
Total 415 kB 414 kB ✅ -630 B
Middleware
Canary PR Change
middleware-b..fest.js gzip 616 B 616 B
middleware-r..fest.js gzip 156 B 156 B
middleware.js gzip 45.4 kB 45 kB
edge-runtime..pack.js gzip 842 B 842 B
Total 47 kB 46.6 kB ✅ -440 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 718 B 718 B
Total 718 B 718 B
Build Cache
Canary PR Change
0.pack gzip 4.82 MB 4.82 MB
index.pack gzip 120 kB 119 kB
index.pack.old gzip 118 kB 120 kB 🔴 +1.53 kB (+1%)
Total 5.06 MB 5.06 MB ✅ -508 B

🔄 Shared (bundler-independent)

Runtimes
Canary PR Change
app-page-exp...dev.js gzip 366 kB 366 kB
app-page-exp..prod.js gzip 202 kB 202 kB
app-page-tur...dev.js gzip 365 kB 365 kB
app-page-tur..prod.js gzip 202 kB 202 kB
app-page-tur...dev.js gzip 362 kB 362 kB
app-page-tur..prod.js gzip 200 kB 200 kB
app-page.run...dev.js gzip 362 kB 362 kB
app-page.run..prod.js gzip 200 kB 200 kB
app-route-ex...dev.js gzip 81.7 kB 81.7 kB
app-route-ex..prod.js gzip 55.6 kB 55.6 kB
app-route-tu...dev.js gzip 81.8 kB 81.8 kB
app-route-tu..prod.js gzip 55.6 kB 55.6 kB
app-route-tu...dev.js gzip 81.4 kB 81.4 kB
app-route-tu..prod.js gzip 55.4 kB 55.4 kB
app-route.ru...dev.js gzip 81.3 kB 81.3 kB
app-route.ru..prod.js gzip 55.3 kB 55.3 kB
dist_client_...dev.js gzip 324 B 324 B
dist_client_...dev.js gzip 326 B 326 B
dist_client_...dev.js gzip 318 B 318 B
dist_client_...dev.js gzip 317 B 317 B
pages-api-tu...dev.js gzip 45.4 kB 45.4 kB
pages-api-tu..prod.js gzip 34.1 kB 34.1 kB
pages-api.ru...dev.js gzip 45.4 kB 45.4 kB
pages-api.ru..prod.js gzip 34.1 kB 34.1 kB
pages-turbo....dev.js gzip 54.9 kB 54.9 kB
pages-turbo...prod.js gzip 39.7 kB 39.7 kB
pages.runtim...dev.js gzip 54.8 kB 54.8 kB
pages.runtim..prod.js gzip 39.7 kB 39.7 kB
server.runti..prod.js gzip 67.8 kB 67.8 kB
use-cache-pr...dev.js gzip 71.6 kB 71.6 kB
use-cache-pr...dev.js gzip 71.6 kB 71.6 kB
use-cache-pr...dev.js gzip 69.9 kB 69.9 kB
use-cache-pr...dev.js gzip 69.9 kB 69.9 kB
Total 3.51 MB 3.51 MB
📎 Tarball URL
https://vercel-packages.vercel.app/next/commits/84f351655931ac3a6a88a174b4af22cffb64bebe/next

Commit: 84f3516

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Failing test suites

Commit: 84f3516 | About building and testing Next.js

pnpm test-dev-turbo test/development/acceptance/server-component-compiler-errors-in-pages.test.ts (turbopack) (job)

  • Error Overlay for server components compiler errors in pages > importing 'server-only' in pages (DD)
  • Error Overlay for server components compiler errors in pages > importing 'next/cache' APIs in pages > revalidateTag is not allowed (DD)
  • Error Overlay for server components compiler errors in pages > importing 'next/cache' APIs in pages > revalidateTag is not allowed (DD)
Expand output

● Error Overlay for server components compiler errors in pages › importing 'server-only' in pages

Expected Redbox but found no visible one.

  133 |     )
  134 |
> 135 |     await session.waitForRedbox()
      |     ^
  136 |     await expect(session.getRedboxSource()).resolves.toMatch(
  137 |       /This API is only available in Server Components/
  138 |     )

  at Object.<anonymous> (development/acceptance/server-component-compiler-errors-in-pages.test.ts:135:5)

● Error Overlay for server components compiler errors in pages › importing 'next/cache' APIs in pages › revalidateTag is not allowed

Expected Redbox but found no visible one.

  405 |       )
  406 |
> 407 |       await session.waitForRedbox()
      |       ^
  408 |       await expect(session.getRedboxSource()).resolves.toMatch(
  409 |         `You're importing a module that depends on "${api}". This API is only available in Server Components in the App Router, but you are using it in the Pages Router.`
  410 |       )

  at development/acceptance/server-component-compiler-errors-in-pages.test.ts:407:7

● Error Overlay for server components compiler errors in pages › importing 'next/cache' APIs in pages › revalidateTag is not allowed

Expected Redbox but found no visible one.

  405 |       )
  406 |
> 407 |       await session.waitForRedbox()
      |       ^
  408 |       await expect(session.getRedboxSource()).resolves.toMatch(
  409 |         `You're importing a module that depends on "${api}". This API is only available in Server Components in the App Router, but you are using it in the Pages Router.`
  410 |       )

  at development/acceptance/server-component-compiler-errors-in-pages.test.ts:407:7

pnpm test-dev-turbo test/development/tsconfig-path-reloading/index.test.ts (turbopack) (job)

  • tsconfig-path-reloading > tsconfig > should recover from module not found when paths is updated (DD)
  • tsconfig-path-reloading > tsconfig added after starting dev > should recover from module not found when paths is updated (DD)
Expand output

● tsconfig-path-reloading › tsconfig › should recover from module not found when paths is updated

Expected Redbox but found no visible one.

  87 |         )
  88 |
> 89 |         await waitForRedbox(browser)
     |         ^
  90 |         expect(await getRedboxSource(browser)).toContain("'@lib/second-data'")
  91 |
  92 |         await next.patchFile(

  at Object.<anonymous> (development/tsconfig-path-reloading/index.test.ts:89:9)

● tsconfig-path-reloading › tsconfig added after starting dev › should recover from module not found when paths is updated

Expected Redbox but found no visible one.

  87 |         )
  88 |
> 89 |         await waitForRedbox(browser)
     |         ^
  90 |         expect(await getRedboxSource(browser)).toContain("'@lib/second-data'")
  91 |
  92 |         await next.patchFile(

  at Object.<anonymous> (development/tsconfig-path-reloading/index.test.ts:89:9)

pnpm test-start-turbo test/e2e/app-dir/navigation/navigation.test.ts (turbopack) (job)

  • app dir - navigation > hash > should scroll to the specified hash (DD)
Expand output

● app dir - navigation › hash › should scroll to the specified hash

expect(received).toBe(expected) // Object.is equality

Expected: false
Received: true

  197 |           url.includes('with-query-param')
  198 |         )
> 199 |         expect(hasQueryParamRscRequest).toBe(false)
      |                                         ^
  200 |       }
  201 |
  202 |       await checkLink('query-param', 2284)

  at Object.toBe (e2e/app-dir/navigation/navigation.test.ts:199:41)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR streamlines the next-cache-components-optimizer skill docs by removing embedded “how-to” content and replacing it with links to the canonical Next.js documentation, while also expanding the AI agents guide to show how to install/use each skill.

Changes:

  • Replace large in-repo fix “recipes” with concise link-based references to Next.js docs/insights.
  • Update wording/terminology around instant navigation (e.g. App Shell vs static shell) and prerequisites.
  • Expand ai-agents documentation to include per-skill install commands and example prompts.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
skills/next-cache-components-optimizer/test-template.md Updates soft-navigation description to refer to the prefetched App Shell.
skills/next-cache-components-optimizer/SKILL.md Tightens prerequisites and points readers to canonical docs + related adoption skill.
skills/next-cache-components-optimizer/reference/real-app-patterns.md Replaces detailed devtools instructions with doc links; refreshes blocker references.
skills/next-cache-components-optimizer/reference/patterns.md Collapses detailed before/after patterns into a table of doc links + runtime-prefetching notes.
docs/01-app/02-guides/ai-agents.mdx Reworks the skills section into per-skill subsections with install + prompt examples.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/01-app/02-guides/ai-agents.mdx Outdated
Comment thread docs/01-app/02-guides/ai-agents.mdx Outdated
Comment thread docs/01-app/02-guides/ai-agents.mdx Outdated
Comment thread docs/01-app/02-guides/ai-agents.mdx Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread skills/next-cache-components-optimizer/SKILL.md Outdated
@aurorascharff
aurorascharff marked this pull request as draft July 21, 2026 23:23
@aurorascharff
aurorascharff marked this pull request as ready for review July 21, 2026 23:28
@aurorascharff aurorascharff changed the title Remove docs content and link to docs instead docs: link the optimizer skill to the insight docs and rework the AI agents skills section Jul 21, 2026
@aurorascharff
aurorascharff merged commit ea69691 into jude/instant-nav-skill Jul 21, 2026
110 of 113 checks passed
@aurorascharff
aurorascharff deleted the dedepucliate-skill branch July 21, 2026 23:30
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.

4 participants