Visitar URL original
docs (Skills): stop assuming app/ at the root and port 3000 by aurorascharff · Pull Request #96696 · vercel/next.js · GitHub
Skip to content

docs (Skills): stop assuming app/ at the root and port 3000 - #96696

Merged
aurorascharff merged 8 commits into
canaryfrom
docs/cc-adoption-skill-app-dir
Aug 5, 2026
Merged

aurorascharff merged 8 commits into
canaryfrom
docs/cc-adoption-skill-app-dir

Conversation

@aurorascharff

@aurorascharff aurorascharff commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

What?

Two Skills assumed a default project layout, and both failed silently when it didn't hold.

  • next-cache-components-adoption hardcoded ./app for the cache-components-instant-false codemod, and checked its work under app/ too. It now resolves the app directory from next.config.* and reads the file count the codemod reports.
  • next-dev-loop probed /_next/mcp in preflight, but NEXT_MCP_URL for a non-default port was only mentioned much later. The port is now resolved before the first probe.

The same ./app argument is documented for both 16.3 codemods, so the two guides and the codemods reference get a matching Good to know.

Why?

On a src/app project the codemod matched nothing and no gate caught it. A path that doesn't exist isn't an error for jscodeshift: it prints No files selected, nothing to do, reports 0 ok, and exits 0. The root-layout check looked in the same wrong place, and if the app's routes were prerenderable the build passed too, so a repo the migration never touched came out green.

On a dev server bound to another port, the preflight probe read "unreachable" and refused to verify while next dev was running.

Both are silent failures, which is the worst case for instructions an agent runs top to bottom.

How?

  • Anchor on next.config.* so an agent invoked from a subdirectory doesn't test for app/ against the wrong cwd.
  • When app/ and src/app/ both exist, say so: Next.js builds app/ and never reads src/app/, so those routes are shadowed and unbuilt. Ask which tree to migrate.
  • Treat 0 ok as a wrong path rather than a finished run.
  • Move the NEXT_MCP_URL resolution into the next-dev-loop preflight.

The transforms are fine. Their path regexes match src/app/..., and pointed at ./src/app they convert every segment. remove-partial-prefetch has the same shape and hardcoded path, so it's covered here too.

Fixes #96649

The Skill hardcoded ./app when invoking the cache-components-instant-false
codemod, so on a src/app project it matched zero files. jscodeshift treats a
path that doesn't exist as a clean run, reporting `0 ok` and exiting 0, and the
root-layout check that follows also looked under app/, so an untouched repo
passed every gate.

Point the codemod at the resolved app directory, tell the Skill to read the
reported file count, and make the follow-up checks path-agnostic.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 42641d2

@github-actions

github-actions Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Stats from current PR

🔴 2 regressions, 1 improvement

Metric Canary PR Change Trend
Webpack Build Time 23.805s 24.787s 🔴 +982ms (+4%) ▁▃▂▆▃
Webpack Build Time (cached) 24.054s 24.754s 🔴 +700ms (+3%) ▁▁▂▅▃
Turbo Build Time 5.854s 5.558s 🟢 296ms (-5%) ▁▂▃▁▁
📊 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) 812ms 810ms ✓ ▂▂▂▂▂
Cold (Ready in log) 782ms 777ms ✓ ▂▂▂▂▂
Cold (First Request) 1.276s 1.262s ✓ ▂▂▃▂▁
Warm (Listen) 812ms 812ms ✓ ▂▂▂▂▂
Warm (Ready in log) 771ms 780ms ✓ ▂▂▂▂▁
Warm (First Request) 1.262s 1.253s ✓ ▁▂▃▁▁
📦 Dev Server (Webpack) (Legacy)

📦 Dev Server (Webpack)

Metric Canary PR Change Trend
Cold (Listen) 813ms 813ms ✓ ▄▁▁▅▅
Cold (Ready in log) 794ms 785ms ✓ ▂▁▂▄▃
Cold (First Request) 3.446s 3.396s ✓ ▁▁▁▄▃
Warm (Listen) 814ms 813ms ✓ ▄▁▁█▄
Warm (Ready in log) 797ms 794ms ✓ ▂▁▂▆▃
Warm (First Request) 3.491s 3.496s ✓ ▁▁▁▆▃

⚡ Production Builds

Metric Canary PR Change Trend
Fresh Build 5.854s 5.558s 🟢 296ms (-5%) ▁▂▃▁▁
Cached Build 2.940s 2.907s ✓ ▁▂▄▁▁
📦 Production Builds (Webpack) (Legacy)

📦 Production Builds (Webpack)

Metric Canary PR Change Trend
Fresh Build 23.805s 24.787s 🔴 +982ms (+4%) ▁▃▂▆▃
Cached Build 24.054s 24.754s 🔴 +700ms (+3%) ▁▁▂▅▃
node_modules Size 552 MB 552 MB ✓ ▁▁▁▁▁
📦 Bundle Sizes

Bundle Sizes

⚡ Turbopack

Client

Main Bundles
Canary PR Change
00mwvyrg6ixvj.js gzip 160 B N/A -
0a-p0meqxynjz.js gzip 10.3 kB N/A -
0avtke4yefj4-.js gzip 13.1 kB N/A -
0cz1d0mv5g_q7.js gzip 39.4 kB 39.4 kB ✓
0e67499aes59m.js gzip 153 B N/A -
0ecxt13uk5yi5.js gzip 160 B N/A -
0eh7mct33fy2t.js gzip 65.6 kB N/A -
0g_a4a3kvjhcb.js gzip 170 B N/A -
0hpff96vwf5wg.js gzip 157 B N/A -
0kq_31m4cy1yc.js gzip 156 B N/A -
0pt5of3ch6d2u.js gzip 13.6 kB N/A -
0tth87xhgvqg0.js gzip 154 B N/A -
0xnsdo-6y9r3k.js gzip 5.72 kB N/A -
0yi7is8u4covm.js gzip 8.77 kB N/A -
1biacj8n3mamp.js gzip 155 B N/A -
1elt1qium-r2m.css gzip 115 B 115 B ✓
1fu3grgczuw0q.js gzip 71.4 kB N/A -
1fvcy6mevca8_.js gzip 155 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 -
298kcoenzq53b.js gzip 7.44 kB N/A -
2jpx0_6n0ykra.js gzip 3.66 kB 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 -
3-ukivglqkfeq.js gzip 8.78 kB N/A -
3044_8tfjfw1i.js gzip 158 B N/A -
325xisqrylugu.js gzip 450 B N/A -
3f2c3tys-p419.js gzip 46.3 kB N/A -
3fc7bkh7rw3rf.js gzip 155 B N/A -
3icg_udga0idh.js gzip 156 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 -
3mgnie1ovhj25.js gzip 155 B N/A -
3qn7vntp30gaj.js gzip 1.47 kB N/A -
turbopack-07..gjbk.js gzip 3.86 kB N/A -
turbopack-0e..8-70.js gzip 3.86 kB N/A -
turbopack-0m..l2wg.js gzip 3.86 kB N/A -
turbopack-0p..d0xe.js gzip 3.88 kB N/A -
turbopack-0t..uhga.js gzip 3.86 kB N/A -
turbopack-1_..ll45.js gzip 3.86 kB N/A -
turbopack-13..1gyq.js gzip 3.86 kB N/A -
turbopack-15..cdua.js gzip 3.84 kB N/A -
turbopack-1e..w26b.js gzip 3.86 kB N/A -
turbopack-1m..hraf.js gzip 3.86 kB N/A -
turbopack-2h..2ozq.js gzip 3.86 kB N/A -
turbopack-2z..t6me.js gzip 3.86 kB N/A -
turbopack-3r..lj85.js gzip 3.86 kB N/A -
turbopack-41..5277.js gzip 3.86 kB N/A -
0_sfs0nf236wo.js gzip N/A 3.65 kB -
030a1njeh5b77.js gzip N/A 10 kB -
06s8o-lue6t9e.js gzip N/A 155 B -
0fg7be2iavl6n.js gzip N/A 168 B -
0inldqi6r-n5r.js gzip N/A 156 B -
0ot0qt5np20h7.js gzip N/A 8.78 kB -
0qitnimre00_k.js gzip N/A 156 B -
0uz1o-lwrim3w.js gzip N/A 157 B -
12m9rr7_7cexd.js gzip N/A 8.7 kB -
12ofo5lnnnsfs.js gzip N/A 156 B -
17hod4realhn2.js gzip N/A 161 B -
186r3y_rfvr0b.js gzip N/A 8.78 kB -
19v97848yrjp7.js gzip N/A 8.81 kB -
1nd_0rwgz2ozk.js gzip N/A 9.45 kB -
1oi9pltr_e10m.js gzip N/A 10.6 kB -
1rd9tzqgzsz2w.js gzip N/A 8.77 kB -
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__4f5lh7u29p.js gzip N/A 71.4 kB -
21h56wdn9zddo.js gzip N/A 8.75 kB -
2auhrzpzovkv5.js gzip N/A 46.3 kB -
2g6iw6c8ad64g.js gzip N/A 65.6 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 -
341h71ln1jpl3.js gzip N/A 2.29 kB -
34ttpt_n7605h.js gzip N/A 5.72 kB -
35qkezu10liph.js gzip N/A 162 B -
36ckfq9o-ys-a.js gzip N/A 13.1 kB -
3em63fx-8w_gc.js gzip N/A 156 B -
3nih04zcyby0u.js gzip N/A 156 B -
3ocgf72p_k0py.js gzip N/A 153 B -
3rk7h_t2arfg9.js gzip N/A 155 B -
3vdh6_u50pu5t.js gzip N/A 13.6 kB -
3yq-zkphd72-a.js gzip N/A 7.45 kB -
3zbdf4igr_egf.js gzip N/A 157 B -
turbopack-07..ddhi.js gzip N/A 3.86 kB -
turbopack-09..yxdx.js gzip N/A 3.86 kB -
turbopack-0n..ctrg.js gzip N/A 3.86 kB -
turbopack-0q..89jt.js gzip N/A 3.86 kB -
turbopack-10..mgpj.js gzip N/A 3.86 kB -
turbopack-2-..8tn0.js gzip N/A 3.86 kB -
turbopack-2f..1-rn.js gzip N/A 3.86 kB -
turbopack-2o..s9tc.js gzip N/A 3.86 kB -
turbopack-3_..3ik3.js gzip N/A 3.86 kB -
turbopack-30..6s0l.js gzip N/A 3.86 kB -
turbopack-34..cs2f.js gzip N/A 3.84 kB -
turbopack-3c..d5b2.js gzip N/A 3.86 kB -
turbopack-3v..o7-g.js gzip N/A 3.88 kB -
turbopack-3z..4q95.js gzip N/A 3.86 kB -
Total 450 kB 451 kB ⚠️ +77 B

Server

Middleware
Canary PR Change
middleware-b..fest.js gzip 779 B 771 B 🟢 8 B (-1%)
Total 779 B 771 B ✅ -8 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 431 B 429 B ✓
Total 431 B 429 B ✅ -2 B
Build Cache
Canary PR Change
00000001.sst gzip 11.5 MB 12.8 MB 🔴 +1.27 MB (+11%)
00000002.sst gzip 14.4 MB 15.8 MB 🔴 +1.37 MB (+9%)
00000003.sst gzip 15.3 MB 14.1 MB 🟢 1.18 MB (-8%)
00000004.sst gzip 14.1 MB 12.6 MB 🟢 1.44 MB (-10%)
00000005.sst gzip 2.83 MB 10.3 MB 🔴 +7.44 MB (+262%)
00000006.sst gzip 10.3 MB 2.83 MB 🟢 7.44 MB (-72%)
00000007.sst gzip 59 B 59 B ✓
00000008.meta gzip 89 B 89 B ✓
00000009.meta gzip 298 kB 298 kB ✓
00000010.meta gzip 299 kB 299 kB ✓
00000011.meta gzip 298 kB 298 kB ✓
00000012.sst gzip 51.4 kB 51 kB ✓
00000013.sst gzip 1.85 MB 1.9 MB 🔴 +49.7 kB (+3%)
00000014.sst gzip 59 B 59 B ✓
00000015.meta gzip 116 B 116 B ✓
00000016.meta gzip 324 kB 324 kB ✓
00000017.meta gzip 404 kB 405 kB ✓
00000018.sst gzip 51.8 kB 51.7 kB ✓
00000019.sst gzip 1.38 MB 1.4 MB 🔴 +18.1 kB (+1%)
00000020.sst gzip 59 B 59 B ✓
00000021.meta gzip 116 B 116 B ✓
00000022.meta gzip 324 kB 324 kB ✓
00000023.meta gzip 370 kB 370 kB ✓
00000024.sst gzip 52 kB 51.7 kB ✓
00000025.sst gzip 1.38 MB 1.39 MB 🔴 +18.4 kB (+1%)
00000026.sst gzip 59 B 59 B ✓
00000027.meta gzip 116 B 116 B ✓
00000028.meta gzip 324 kB 324 kB ✓
00000029.meta gzip 370 kB 370 kB ✓
00000030.sst gzip 51.5 kB 51.1 kB ✓
00000031.sst gzip 1.38 MB 1.39 MB 🔴 +18.3 kB (+1%)
00000032.sst gzip 59 B 59 B ✓
00000033.meta gzip 116 B 116 B ✓
00000034.meta gzip 324 kB 324 kB ✓
00000035.meta gzip 370 kB 370 kB ✓
00000036.sst gzip 51.8 kB 51.6 kB ✓
00000037.sst gzip 1.38 MB 1.39 MB 🔴 +18.3 kB (+1%)
00000038.sst gzip 59 B 59 B ✓
00000039.meta gzip 116 B 116 B ✓
00000040.meta gzip 324 kB 324 kB ✓
00000041.meta gzip 370 kB 370 kB ✓
CURRENT gzip 24 B 24 B ✓
LOG gzip 673 B 669 B ✓
Total 80.4 MB 80.6 MB ⚠️ +127 kB

📦 Webpack

Client

Main Bundles
Canary PR Change
3322-HASH.js gzip 65 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 63.2 kB N/A -
framework-HASH.js gzip 59.7 kB 59.7 kB ✓
main-app-HASH.js gzip 254 B 254 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 65.8 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 63.2 kB -
Total 240 kB 241 kB ⚠️ +707 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 129 kB 128 kB ✓
page.js gzip 293 kB 294 kB ✓
Total 422 kB 422 kB ⚠️ +248 B
Middleware
Canary PR Change
middleware-b..fest.js gzip 616 B 619 B ✓
middleware-r..fest.js gzip 156 B 156 B ✓
middleware.js gzip 45.6 kB 45.3 kB ✓
edge-runtime..pack.js gzip 842 B 842 B ✓
Total 47.2 kB 46.9 kB ✅ -299 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.86 MB 4.86 MB ✓
index.pack gzip 122 kB 123 kB ✓
index.pack.old gzip 122 kB 122 kB ✓
Total 5.11 MB 5.1 MB ✅ -4.29 kB

🔄 Shared (bundler-independent)

Runtimes
Canary PR Change
app-page-exp...dev.js gzip 374 kB 374 kB ✓
app-page-exp..prod.js gzip 206 kB 206 kB ✓
app-page-tur...dev.js gzip 373 kB 373 kB ✓
app-page-tur..prod.js gzip 206 kB 206 kB ✓
app-page-tur...dev.js gzip 370 kB 370 kB ✓
app-page-tur..prod.js gzip 204 kB 204 kB ✓
app-page.run...dev.js gzip 370 kB 370 kB ✓
app-page.run..prod.js gzip 204 kB 204 kB ✓
app-route-ex...dev.js gzip 83 kB 83 kB ✓
app-route-ex..prod.js gzip 56.2 kB 56.2 kB ✓
app-route-tu...dev.js gzip 83.1 kB 83.1 kB ✓
app-route-tu..prod.js gzip 56.2 kB 56.2 kB ✓
app-route-tu...dev.js gzip 82.6 kB 82.6 kB ✓
app-route-tu..prod.js gzip 55.9 kB 55.9 kB ✓
app-route.ru...dev.js gzip 82.6 kB 82.6 kB ✓
app-route.ru..prod.js gzip 55.9 kB 55.9 kB ✓
dev-validati...dev.js gzip 133 kB 133 kB ✓
dev-validati...dev.js gzip 133 kB 133 kB ✓
dev-validati...dev.js gzip 131 kB 131 kB ✓
dev-validati...dev.js gzip 131 kB 131 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 46 kB 46 kB ✓
pages-api-tu..prod.js gzip 34.3 kB 34.3 kB ✓
pages-api.ru...dev.js gzip 45.9 kB 45.9 kB ✓
pages-api.ru..prod.js gzip 34.3 kB 34.3 kB ✓
pages-turbo....dev.js gzip 54.7 kB 54.7 kB ✓
pages-turbo...prod.js gzip 39.8 kB 39.8 kB ✓
pages.runtim...dev.js gzip 54.7 kB 54.7 kB ✓
pages.runtim..prod.js gzip 39.8 kB 39.8 kB ✓
server.runti..prod.js gzip 66.9 kB 66.9 kB ✓
use-cache-pr...dev.js gzip 72.3 kB 72.3 kB ✓
use-cache-pr...dev.js gzip 72.3 kB 72.3 kB ✓
use-cache-pr...dev.js gzip 70.6 kB 70.6 kB ✓
use-cache-pr...dev.js gzip 70.6 kB 70.6 kB ✓
Total 4.09 MB 4.09 MB ✓
📎 Tarball URL
https://vercel-packages.vercel.app/next/commits/42641d2805801f8618a92af2327e113d82974be1/next

Commit: 42641d2

@aurorascharff
aurorascharff marked this pull request as ready for review August 5, 2026 00:49
@aurorascharff
aurorascharff marked this pull request as draft August 5, 2026 00:50
aurorascharff and others added 2 commits August 5, 2026 02:53
…odemod

The documented command hardcoded ./app, which matches nothing on a src/app
project. A path that doesn't exist is not an error for jscodeshift, so the run
reports 0 ok and exits 0, and the migration looks like it succeeded.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Same hardcoded ./app as the cache-components-instant-false command, with the
same silent result on a src/app project.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@aurorascharff
aurorascharff force-pushed the docs/cc-adoption-skill-app-dir branch from 2c7657d to 0602045 Compare August 5, 2026 00:56
@aurorascharff
aurorascharff marked this pull request as ready for review August 5, 2026 00:56
@aurorascharff
aurorascharff requested a review from icyJoseph August 5, 2026 00:56
The preflight probed /_next/mcp before the document mentioned NEXT_MCP_URL, so
a dev server on a non-default port was read as unreachable and the skill
refused to verify while next dev was running.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@aurorascharff aurorascharff changed the title docs: resolve the app directory in the Cache Components adoption Skill docs: stop assuming app/ at the root and port 3000 in the Skills Aug 5, 2026
@aurorascharff aurorascharff changed the title docs: stop assuming app/ at the root and port 3000 in the Skills docs (Skills): stop assuming app/ at the root and port 3000 Aug 5, 2026
aurorascharff and others added 4 commits August 5, 2026 14:13
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Anchor on next.config so an agent invoked from a subdirectory doesn't test for
app/ against the wrong cwd, and handle the case where both app/ and src/app/
exist: Next.js builds app/ and never looks at src/app/, so the skill surfaces
the shadowing instead of silently migrating one of them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…rences

The dev-only validation sweep built its route queue from the `app/` tree, which
finds nothing on a src/app project.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@aurorascharff
aurorascharff requested a review from gaojude August 5, 2026 13:43
@aurorascharff
aurorascharff merged commit 55ff2d2 into canary Aug 5, 2026
132 checks passed
@aurorascharff
aurorascharff deleted the docs/cc-adoption-skill-app-dir branch August 5, 2026 15:00
m-kawafuji pushed a commit to m-kawafuji/next.js that referenced this pull request Aug 8, 2026
…6696)

### What?

Two Skills assumed a default project layout, and both failed silently
when it didn't hold.

- `next-cache-components-adoption` hardcoded `./app` for the
`cache-components-instant-false` codemod, and checked its work under
`app/` too. It now resolves the app directory from `next.config.*` and
reads the file count the codemod reports.
- `next-dev-loop` probed `/_next/mcp` in preflight, but `NEXT_MCP_URL`
for a non-default port was only mentioned much later. The port is now
resolved before the first probe.

The same `./app` argument is documented for both 16.3 codemods, so the
two guides and the codemods reference get a matching Good to know.

### Why?

On a `src/app` project the codemod matched nothing and no gate caught
it. A path that doesn't exist isn't an error for jscodeshift: it prints
`No files selected, nothing to do`, reports `0 ok`, and exits `0`. The
root-layout check looked in the same wrong place, and if the app's
routes were prerenderable the build passed too, so a repo the migration
never touched came out green.

On a dev server bound to another port, the preflight probe read
"unreachable" and refused to verify while `next dev` was running.

Both are silent failures, which is the worst case for instructions an
agent runs top to bottom.

### How?

- Anchor on `next.config.*` so an agent invoked from a subdirectory
doesn't test for `app/` against the wrong `cwd`.
- When `app/` and `src/app/` both exist, say so: Next.js builds `app/`
and never reads `src/app/`, so those routes are shadowed and unbuilt.
Ask which tree to migrate.
- Treat `0 ok` as a wrong path rather than a finished run.
- Move the `NEXT_MCP_URL` resolution into the `next-dev-loop` preflight.

The transforms are fine. Their path regexes match `src/app/...`, and
pointed at `./src/app` they convert every segment.
`remove-partial-prefetch` has the same shape and hardcoded path, so it's
covered here too.

Fixes vercel#96649

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
icyJoseph pushed a commit that referenced this pull request Aug 20, 2026
### What?

Two Skills assumed a default project layout, and both failed silently
when it didn't hold.

- `next-cache-components-adoption` hardcoded `./app` for the
`cache-components-instant-false` codemod, and checked its work under
`app/` too. It now resolves the app directory from `next.config.*` and
reads the file count the codemod reports.
- `next-dev-loop` probed `/_next/mcp` in preflight, but `NEXT_MCP_URL`
for a non-default port was only mentioned much later. The port is now
resolved before the first probe.

The same `./app` argument is documented for both 16.3 codemods, so the
two guides and the codemods reference get a matching Good to know.

### Why?

On a `src/app` project the codemod matched nothing and no gate caught
it. A path that doesn't exist isn't an error for jscodeshift: it prints
`No files selected, nothing to do`, reports `0 ok`, and exits `0`. The
root-layout check looked in the same wrong place, and if the app's
routes were prerenderable the build passed too, so a repo the migration
never touched came out green.

On a dev server bound to another port, the preflight probe read
"unreachable" and refused to verify while `next dev` was running.

Both are silent failures, which is the worst case for instructions an
agent runs top to bottom.

### How?

- Anchor on `next.config.*` so an agent invoked from a subdirectory
doesn't test for `app/` against the wrong `cwd`.
- When `app/` and `src/app/` both exist, say so: Next.js builds `app/`
and never reads `src/app/`, so those routes are shadowed and unbuilt.
Ask which tree to migrate.
- Treat `0 ok` as a wrong path rather than a finished run.
- Move the `NEXT_MCP_URL` resolution into the `next-dev-loop` preflight.

The transforms are fine. Their path regexes match `src/app/...`, and
pointed at `./src/app` they convert every segment.
`remove-partial-prefetch` has the same shape and hardcoded path, so it's
covered here too.

Fixes #96649

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 55ff2d2)
icyJoseph added a commit that referenced this pull request Aug 25, 2026
## Summary

- docs: remove experimental note from runtime prefetching (#96615)
- docs: proxy event argument (#96435)
- docs: correction to dynamicParams migration (#96624)
- docs: quote the dynamicParams build error in a blockquote (#96633)
- docs: use relative doc links in instant-navigation error pages
(#96672)
- docs: document ! exclusion and src/ prefix for --debug-build-paths
(#96703)
- docs: instant navigation quick start with an adoption prompt (#96663)
- docs (Skills): stop assuming app/ at the root and port 3000 (#96696)
- docs: present each Skill as steps in the AI agents guide (#96751)
- docs: update redirected links to current targets (#96723)
- docs: add authentication with Cache Components guide and iron-session
example (#95802)
- docs: link View Transitions skill on skills.sh and clarify the example
prompt (#96863)
- Add a `turbopackChunking` documentation page for pages router (#96698)
- docs: add `export const dynamic = 'force-static'` to Route Handlers
example on Static Exports (#96964)
- docs: runtime prefetching -> optimizing prefetching (#96934)
- Fix typo in Data Access Layer section (#87202)
- docs: rename repo to repository for consistency (#87849)
- docs(mdx): fix package name in .md handling section (#97131)
- docs: fix Link prefetch grammar and Client Components wording (#97132)
- docs: align Cache Components authentication guide title (#97143)
- docs: create client-side fetching guide (#96341)
- docs: clarify client cache freshness after hydration (#97180)
- docs: server client and directives (#96145)
- Update authentication diagram URL (#97320)
- docs: align SPA guide reducer example with React conventions (#97341)
- docs: app router reference accuracy (#97477)
- docs: mention Valibot as validation library option in forms guides
(#97468)
- docs: warn when catching permanentRedirect (#97496)
- [docs] fix: grammar typos in linking and navigating guide (#95544)
- docs: rename Vercel Edge Config to Global Config in redirecting guide
(#97456)
- docs: document metadata pagination field (#95509)
- docs: outlining and lcp (#96942)
- docs: adjust interactive app guide (#97558)
- docs: generateMetadata values should be serializable with use cache
(#97551)
- Fix stale cross-references in skills/ (#97566)
- Improve Cache Components sync IO migration guidance (#97572)
- docs: Explicit cache output description (#97548)
- docs: document deploymentId build ID override and Pages Router skew in
16.2 (#97645)
- docs: drop stale Route Handlers restriction from `use cache: private`
(docs part of #97349)
- docs: clarify beforeInteractive placement for root layouts (#97643)
- docs: Adapters entry page lists its children pages twice (#97677)
- docs: correct the upper stale bound for App Shell exclusion in
cacheLife (#97653)
- Improve Partial Prefetching adoption checks (#97637)
- docs: fix parallelRouteKey parameter name in
useSelectedLayoutSegment(s) (#97710)
- docs(adapters): document assetsHashes and routing.middlewareMatchers
(#96536)
- docs: note that response headers must be set before calling handle()
in a custom server (#97693)
- Document catchError for the Pages Router (#97748)
- docs: fix typos and correctness issues in App Router docs (#97823)
- docs: param access on use-server (#97865)
- docs: clarify revalidateTag profile expire semantics (#97836)

---------

Co-authored-by: Aurora Scharff <66901228+aurorascharff@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Rich Haines <hello@richardhaines.dev>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Aurora Scharff <aurora.sofie@gmail.com>
Co-authored-by: Sam Poder <sampoder@berkeley.edu>
Co-authored-by: Masashi Kawafuji <masashikawafuji@proton.me>
Co-authored-by: Akseli Palmer <akseli@toddsden.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Jarren <sanjose.jarren@gmail.com>
Co-authored-by: Marcos Hernanz <96699542+marcoshernanz@users.noreply.github.com>
Co-authored-by: Pavan Shinde <pavann97@gmail.com>
Co-authored-by: Reza Karimzadeh <r.karimzadeh1998@gmail.com>
Co-authored-by: Fabian Hiller <hillerfabian11@gmail.com>
Co-authored-by: David Alexandru Ilie <david@davidilie.com>
Co-authored-by: Sean Beirnes <127370575+seanbeirnes@users.noreply.github.com>
Co-authored-by: Rich Haines <22930449+molebox@users.noreply.github.com>
Co-authored-by: KAM <biukam.w@gmail.com>
Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>
Co-authored-by: Jude Gao <jude.gao@vercel.com>
Co-authored-by: Said Nasser <sdnssr001@gmail.com>
Co-authored-by: Eddy (Frontend Engineer) <101346918+leejpsd@users.noreply.github.com>
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
@github-actions github-actions Bot added the locked label Sep 6, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Agent skills assume default project layout and port (app/ root, :3000) — silent false progress on src/app repos

2 participants