Skip to content

Commit bc165dd

Browse files
committed
Update lesson-6-project-onboarding.md
1 parent 7a1e2af commit bc165dd

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

website/docs/practical-techniques/lesson-6-project-onboarding.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,48 @@ This lesson covers context files and how to structure them across user, project,
1717

1818
## The Context File Ecosystem
1919

20-
Context files are markdown documents that inject project-specific knowledge between the system prompt and your input, giving AI agents "project memory" without requiring repeated explanations of your tech stack, conventions, and architecture. The industry has converged on two approaches: `AGENTS.md` (vendor-neutral standard working across all AI tools) and tool-specific extensions like `CLAUDE.md` (for advanced features like hierarchical context).
20+
Context files are markdown documents that inject project-specific knowledge between the system prompt and your input, giving AI agents "project memory" without requiring repeated explanations of your tech stack, conventions, and architecture. The industry has converged on two approaches: `AGENTS.md` (vendor-neutral standard working across most major AI tools like Cursor, Windsurf, and GitHub Copilot) and tool-specific extensions like `CLAUDE.md` (for advanced features like hierarchical context in Claude Code).
2121

2222
<Tabs groupId="ai-tool">
2323
<TabItem value="agents" label="AGENTS.md (Standard)" default>
2424

25-
`AGENTS.md` is the vendor-neutral standard adopted by 20,000+ open-source projects, working across OpenAI Codex, GitHub Copilot, Cursor, and other AI coding tools. Keep it minimal—your README should contain 90% of what AI needs; AGENTS.md adds only AI-specific operational context like MCP server configurations, environment variables, modified test commands for non-interactive execution, and warnings about non-obvious dependencies. Place it in your repository root for maximum compatibility.
25+
`AGENTS.md` is the vendor-neutral standard adopted by 20,000+ open-source projects, working across GitHub Copilot, Cursor, Windsurf, and most other AI coding tools (note: Claude Code does not support AGENTS.md—use CLAUDE.md instead). Keep it minimal—your README should contain 90% of what AI needs; AGENTS.md adds only AI-specific operational context like MCP server configurations, environment variables, modified test commands for non-interactive execution, and warnings about non-obvious dependencies. Place it in your repository root for maximum compatibility.
2626

2727
</TabItem>
2828
<TabItem value="claude" label="Claude Code (CLAUDE.md)">
2929

30-
Claude Code's `CLAUDE.md` uses hierarchical context where multiple files from different directories (global `~/.claude/CLAUDE.md`, project root, subdirectories) are automatically loaded and merged based on your working directory, with more specific instructions overriding general ones while non-conflicting rules from all levels remain active. This layered system lets you define universal preferences globally, project standards at the root, and module-specific overrides in subdirectories—without duplicating rules. Reference `AGENTS.md` from `CLAUDE.md` to maintain cross-tool compatibility (see Cross-Referencing section below).
30+
Claude Code's `CLAUDE.md` uses hierarchical context where multiple files from different directories (global `~/.claude/CLAUDE.md`, project root, subdirectories) are automatically loaded and merged based on your working directory, with more specific instructions overriding general ones while non-conflicting rules from all levels remain active. This layered system lets you define universal preferences globally, project standards at the root, and module-specific overrides in subdirectories—without duplicating rules.
3131

3232
</TabItem>
3333
</Tabs>
3434

3535
**Quick Comparison:**
3636

37-
| Feature | AGENTS.md | CLAUDE.md |
38-
| --------------------- | ------------------------------ | ----------------------------- |
39-
| **File location** | Single file at repository root | Multiple files at any level |
40-
| **Context loading** | One file only | All applicable files merged |
41-
| **Hierarchy** | No | Yes (global → root → subdirs) |
42-
| **Override behavior** | N/A (single file) | Specific overrides general |
43-
| **Merge behavior** | N/A (single file) | All files injected together |
44-
| **Tool support** | Universal (all AI tools) | Claude Code only |
37+
| Feature | AGENTS.md | CLAUDE.md |
38+
| --------------------- | -------------------------------------------------------- | ----------------------------- |
39+
| **File location** | Single file at repository root | Multiple files at any level |
40+
| **Context loading** | One file only | All applicable files merged |
41+
| **Hierarchy** | No | Yes (global → root → subdirs) |
42+
| **Override behavior** | N/A (single file) | Specific overrides general |
43+
| **Merge behavior** | N/A (single file) | All files injected together |
44+
| **Tool support** | GitHub Copilot, Cursor, Windsurf, etc. (not Claude Code) | Claude Code only |
4545

4646
**Key takeaway:** AGENTS.md is one universal file. CLAUDE.md is a hierarchical system where multiple files are loaded and merged based on your working directory.
4747

48+
:::tip Mixed Ecosystem: Using Claude Code with AGENTS.md
49+
Claude Code is the only major AI coding assistant that doesn't support AGENTS.md natively. If you're working in a mixed-tool environment (e.g., team members use Codex/Copilot while you use Claude Code), avoid duplicating content by using **@linking** in your `CLAUDE.md` to reference the shared `AGENTS.md`:
50+
51+
```markdown
52+
# CLAUDE.md - Claude-specific configurations
53+
54+
@/AGENTS.md
55+
56+
# Additional Claude Code-specific context below
57+
```
58+
59+
This imports the entire AGENTS.md content into Claude's context, maintaining a single source of truth while supporting both file formats.
60+
:::
61+
4862
:::warning Security Consideration
4963
Context files are injected directly into system prompts. Security researchers have identified "Rules File Backdoor" attacks where malicious instructions are injected using Unicode characters or evasion techniques. Keep context files minimal, version-controlled, and code-reviewed like any other code.
5064
:::

0 commit comments

Comments
 (0)