[agents-md] Split bundled-docs fast path into `upgrade-agents-md` command
`codemod agents-md` now stays on its original git-clone behavior for older Next.js versions. The bundled-docs fast path moves to a new `codemod upgrade-agents-md` command that anchors strictly on `cwd` — same contract as `codemod upgrade` — so in a monorepo you run it from the app package (`apps/web/`), not the monorepo root. The post-upgrade hook in `codemod upgrade` also uses the strict-cwd helper. Running `upgrade-agents-md` outside a Next.js app directory or on a pre-16.2 install aborts with an actionable error. The runtime dev gate in `app-info-log.ts` drops its walk-up package.json search and now checks `dir` directly (which `next dev` already resolves via `getProjectDir`). The fatal dev error and build warning both point at the new `upgrade-agents-md` command. Legacy `<!-- NEXT-AGENTS-MD-* -->` marker cleanup is preserved so projects that ran the pre-bundled-docs codemod still get their stale block stripped when the new block is upserted.
Showing
This diff is collapsed.
Please
register
or
sign in
to comment