by ContextForge (LX AI)
Every AI coding tool now reads a config file from your repo before it does anything: Claude Code reads CLAUDE.md, Codex reads AGENTS.md, Gemini CLI reads GEMINI.md, Cursor reads .cursorrules, and GitHub Copilot reads copilot-instructions.md. A context pack is the set of those files, generated from your actual file tree so each agent opens a session with your stack, commands, and hard rules already loaded. The part teams get wrong is not writing them, but filling them with architecture overviews that the model ignores.
AGENTS.md has become the cross-tool standard, stewarded by the Linux Foundation and read natively by Codex, Copilot's coding agent, Cursor, and Windsurf, with adoption across a large share of open-source projects. Claude Code reads it as a fallback when no CLAUDE.md is present, and Anthropic's own bridge puts @AGENTS.md as the first line of CLAUDE.md so a single source stays in sync. The practical setup is two files: an AGENTS.md with stack, commands, and hard rules kept under roughly 200 lines, and a thin CLAUDE.md that imports it and adds Claude-specific notes.
Beyond AGENTS.md, the formats differ in name and discovery order but not in purpose. Copilot uses .github/copilot-instructions.md for in-editor chat and .github/instructions/*.instructions.md for applyTo-scoped rules. Cursor has moved from the legacy .cursorrules to .cursor/rules/*.mdc with glob-based auto-attach, which is the feature worth using because conventions load only where they apply. Gemini CLI reads GEMINI.md, and a checked-in .gemini/settings.json can point its context file at AGENTS.md. Writing the pack once and generating each surface from it avoids drift between formats.
The content that changes agent behavior is concrete: the commands to run, the constraints that differ from tool defaults, and the pitfalls specific to your repo. Architecture overviews, directory layouts, and dependency lists are the content every template loves to generate and the model already discovers by reading three files. A 2026 ETH Zurich study (arXiv:2602.11988) found that context files did not generally raise task success while adding more than 20% to inference cost, and that repository overviews in particular were not helpful. Both Anthropic's and Cursor's guidance now say to cut overviews and keep conventions and gotchas. Write commands and constraints, not descriptions.
A hand-maintained file drifts, and a wrong instruction file is worse than none because the agent trusts it. Generating every surface from one deterministic source, with no model in the build step, keeps re-runs byte-stable so CI can regenerate and fail on any diff. That is the posture ContextForge takes: a deterministic first stage reads your file tree and tags facts as detected or inferred, and a model stage only drafts prose, never presenting a guess as a fact.
Start with the commands your team already types: install, build, test, lint, typecheck, and the one-liner that boots the app locally. Put those near the top of AGENTS.md so an agent does not invent npm run verify when your script is named ci. Next, list hard constraints that differ from tool defaults: forbidden paths (migrations, generated clients, lockfiles), naming conventions that are already enforced in CI, and the branch or PR rules humans expect. Then add two or three repo-specific pitfalls — the flaky test suite that needs a seed flag, the monorepo package that must be built before its consumers, the env var that is required only in staging. Skip marketing copy about “clean architecture.” Agents follow concrete instructions more reliably than slogans.
Keep the shared file short enough to stay in context. Cursor’s own guidance for project rules prefers focused files and file references over pasting entire docs. Nested AGENTS.md files in large monorepos can add package-local notes without bloating the root. If you need glob-scoped Cursor behavior, use .cursor/rules/*.mdc as thin wrappers that point back to the shared markdown rather than duplicating paragraphs. That pattern matches what many teams settled on in 2026: one source of truth, tool-specific adapters only where metadata is required. See the official Cursor rules documentation for globs and alwaysApply flags.
When you paste a file tree into ContextForge, stage one looks for package manifests, CI configs, and common entry points. A package.json scripts block upgrades the build and test lines from inferred to detected. A GitHub Actions workflow that runs vitest is stronger evidence than a tests/ folder alone. The Context Score then shows coverage gaps: missing lint command, no forbidden-paths section, unclear entry points. Those gaps become open questions in the draft instead of invented prose. Stage two may polish wording when a model key is configured; if not, you still get a labelled rule-based draft. Either way, you should read every inferred line before commit.
Teams often ask whether to generate all five formats every time. Generate the surfaces your org actually installs. A Cursor-only shop can ship AGENTS.md plus .cursorrules (or modern .mdc rules). A mixed shop should keep AGENTS.md as the backbone and regenerate CLAUDE.md / copilot-instructions.md from the same facts so Copilot Chat and Claude Code do not diverge. Re-run the generator when the stack changes — after a package-manager migration, a new test runner, or a CI rewrite — because stale context files are a quiet source of agent mistakes.
Do not market a context pack as a guarantee of fewer hallucinations. The honest metrics are operational: time-to-first-draft for a new repo, how often seniors edit the generated files, and whether CI regenerates the pack without drift. If agents keep violating a rule, the fix is usually a clearer constraint or a CI gate, not a longer overview section. ContextForge’s honesty rule is explicit: the product produces a draft from what you paste; it does not claim agents will never invent APIs. That stance matches both the ETH Zurich findings on limited task-success lifts and the fleet-wide ban on efficacy exaggeration.
For privacy, prefer pasting trees and a few key files over dumping secrets or full source trees into any SaaS form. ContextForge is designed without a durable code archive for pastes. Still treat the paste channel as untrusted input under OWASP LLM01 thinking: comments that say “ignore previous instructions” should never become policy. Review security.html for the fail-closed status codes and the support disclaimer.
Confirm install, build, test, and lint commands by running them once. Confirm forbidden paths cover generated folders and lockfiles. Confirm each inferred line against a real file. Confirm the target formats match tools your team installs this quarter. Confirm AGENTS.md stays under a size your agents can keep in context. Confirm CLAUDE.md either imports AGENTS.md or stays intentionally thin. Confirm Copilot instructions live under .github/ where Copilot looks. Confirm Cursor teams know whether they still rely on .cursorrules or have moved to .cursor/rules. Confirm nobody pasted API keys into the generator form. Confirm the PR that adds the pack includes at least one agent-driven change so humans see follow-through.
If any checkbox fails, fix the pack before calling the repo agent-ready. A half-true context file trains agents to ignore your docs. ContextForge can accelerate the first draft; it cannot replace that checklist. Product Hunt launches amplify mistakes: visitors will clone the demo repo and trust whatever you committed. Treat 2026-10-06 as a deadline for a reviewed pack, not a deadline for unread markdown.
When onboarding contractors, point them at the committed pack before opening Cursor. When rotating package managers, regenerate the pack the same day. When a senior overrides an agent, ask whether the pack should absorb that override as a constraint. Small loops beat annual rewrites.
AGENTS.md. It is the cross-tool standard read natively by Codex, Copilot's coding agent, Cursor, and Windsurf, and Claude Code reads it as a fallback. A thin CLAUDE.md that imports it covers the one major tool that does not read AGENTS.md directly.
Architecture overviews, directory layouts, and dependency lists. The model can read those from the repository, and a 2026 ETH Zurich study found overviews did not improve task success while raising inference cost. Keep commands, constraints, and repo-specific pitfalls.
No. Research shows context files do not generally raise task success rates, though agents follow the instructions in them well. The value is consistency and avoiding repeated setup, not automatic quality gains.
A hand-written file drifts, and a wrong instruction file is worse than none because the agent trusts it. Generating every surface from one deterministic source keeps re-runs stable so CI can catch drift.
Try the product: ContextForge
2026-09-16 · primary sources only · no fabricated traffic metrics