Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions apps/docs/next.config.mjs
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,28 @@ const withMDX = createMDX();
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
// `next dev` otherwise writes `apps/docs/AGENTS.md` and `apps/docs/CLAUDE.md`
// into the working tree whenever it detects an AI coding agent (Next 16
// `ensureAgentRulesForDev`). Neither path is tracked or ignored, so both land
// as `??` and any `git add -A` after booting the docs server sweeps them into
// an unrelated PR. Those two filenames are load-bearing in this repo: the
// root `AGENTS.md` is the binding playbook and agents are told to read the
// `AGENTS.md` governing the files they touch, so a Next-authored stub
// pointing at `node_modules/next/dist/docs/` can be read as this repo's
// discipline -- and the generated text argues for committing itself, which
// nudges an agent the wrong way. The generated `CLAUDE.md` is the single
// line `@AGENTS.md`, an import directive that pulls the stub in.
//
// Disabled at the source rather than gitignored on purpose: an ignore rule
// for `apps/docs/AGENTS.md` would silently swallow a future repo-authored
// `AGENTS.md` for this app, failing invisibly at exactly the moment someone
// was trying to add real guidance there. A visible untracked file is a better
// failure than an invisibly ignored one for this filename specifically.
//
// This only stops future generation: a checkout that already ran `next dev`
// keeps its copies until they are removed once by hand
// (`rm -f apps/docs/AGENTS.md apps/docs/CLAUDE.md`).
agentRules: false,
// No `output: 'standalone'` here on purpose. The standalone packer
// (`writeStandaloneDirectory` -> `copyTracedFiles`) opens
// `.next/next-server.js.nft.json`, and that open is the ONLY thing in a
Expand Down
Loading