Out-of-scope finding from #4149, where the PR needed to run the docs site to verify a documented port.
What happens
Running the command QUICK_REFERENCE.md documents for the docs site:
$ pnpm --filter @object-ui/site dev
▲ Next.js 16.3.0 (Turbopack)
- Local: http://localhost:3000
✓ Ready in 684ms
leaves two new files behind:
$ git status --short
?? apps/site/AGENTS.md
?? apps/site/CLAUDE.md
Neither is tracked, and git check-ignore returns nothing for either — they are not in .gitignore. apps/site/CLAUDE.md is one line (@AGENTS.md); apps/site/AGENTS.md is a Next.js-authored block that names its own generator:
This block is written and re-added by next dev — verify at node_modules/next/dist/server/lib/generate-agent-files.js. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
So Next.js expects one of two end states: the files are committed, or they are ignored. This repo is in neither.
Why it is worth a card rather than a shrug
Several agents work this repo in parallel worktrees, and git add -A is a common way to stage. Two untracked files that appear from running the app — not from editing anything — are exactly the shape that gets swept into an unrelated PR by an author who never opened them. The generated text actively encourages that ("committing it with your work keeps the tree clean"), which makes the accident feel like the correct move at the moment it happens.
It also collides with an existing convention: this repo's AGENTS.md / CLAUDE.md are hand-written instruction files that agents are told to treat as binding. A generated apps/site/AGENTS.md carrying Next.js framework rules appears in the same namespace, and apps/site/CLAUDE.md's @AGENTS.md import pulls it in for anyone working under apps/site.
Decisions this needs, deliberately not made here
- Ignore or commit. Ignoring keeps the tree quiet but means the Next.js guidance never reaches an agent working in
apps/site. Committing puts framework-generated content into the repo's instruction namespace, where it will be rewritten by whatever Next.js version runs next. These are different answers with different maintenance stories. - Whether the same generator fires elsewhere. Only
apps/site runs Next.js today, so only that directory was observed. Worth confirming before writing a rule.
Not fixed in #4149's PR — that card is scoped to QUICK_REFERENCE.md, and the two files were deleted from that worktree rather than committed.
Searched for duplicates
generate-agent-files, next dev AGENTS.md, apps/site/CLAUDE.md and gitignore AGENTS over open issues in this repo: no hits.
Generated by Claude Code
Out-of-scope finding from #4149, where the PR needed to run the docs site to verify a documented port.
What happens
Running the command
QUICK_REFERENCE.mddocuments for the docs site:leaves two new files behind:
Neither is tracked, and
git check-ignorereturns nothing for either — they are not in.gitignore.apps/site/CLAUDE.mdis one line (@AGENTS.md);apps/site/AGENTS.mdis a Next.js-authored block that names its own generator:So Next.js expects one of two end states: the files are committed, or they are ignored. This repo is in neither.
Why it is worth a card rather than a shrug
Several agents work this repo in parallel worktrees, and
git add -Ais a common way to stage. Two untracked files that appear from running the app — not from editing anything — are exactly the shape that gets swept into an unrelated PR by an author who never opened them. The generated text actively encourages that ("committing it with your work keeps the tree clean"), which makes the accident feel like the correct move at the moment it happens.It also collides with an existing convention: this repo's
AGENTS.md/CLAUDE.mdare hand-written instruction files that agents are told to treat as binding. A generatedapps/site/AGENTS.mdcarrying Next.js framework rules appears in the same namespace, andapps/site/CLAUDE.md's@AGENTS.mdimport pulls it in for anyone working underapps/site.Decisions this needs, deliberately not made here
apps/site. Committing puts framework-generated content into the repo's instruction namespace, where it will be rewritten by whatever Next.js version runs next. These are different answers with different maintenance stories.apps/siteruns Next.js today, so only that directory was observed. Worth confirming before writing a rule.Not fixed in #4149's PR — that card is scoped to
QUICK_REFERENCE.md, and the two files were deleted from that worktree rather than committed.Searched for duplicates
generate-agent-files,next dev AGENTS.md,apps/site/CLAUDE.mdandgitignore AGENTSover open issues in this repo: no hits.Generated by Claude Code