Skip to content
Open
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
16 changes: 10 additions & 6 deletions docs/src/content/docs/guides/compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ When you run `apm compile` without specifying a target, APM automatically detect

| Project Structure | Target | What Gets Generated |
|-------------------|--------|---------------------|
| `.github/` folder only | `copilot` | AGENTS.md (instructions only) |
| `.github/` folder only | `copilot` | AGENTS.md + `.github/copilot-instructions.md` (global instructions) |
| `.claude/` folder only | `claude` | CLAUDE.md (instructions only) |
| `.codex/` folder exists | `codex` | AGENTS.md (instructions only) |
| `.gemini/` folder exists | `gemini` | GEMINI.md (instructions only) |
Expand Down Expand Up @@ -53,7 +53,7 @@ target: [claude, copilot] # multiple targets -- only these are compiled

| Target | Files Generated | Consumers |
|--------|-----------------|-----------|
| `copilot` | `AGENTS.md` | GitHub Copilot, Cursor, OpenCode |
| `copilot` | `AGENTS.md` + `.github/copilot-instructions.md` | GitHub Copilot, Cursor, OpenCode |
| `claude` | `CLAUDE.md` | Claude Code, Claude Desktop |
| `gemini` | `GEMINI.md` | Gemini CLI |
| `codex` | `AGENTS.md` | Codex CLI |
Expand All @@ -62,6 +62,8 @@ target: [claude, copilot] # multiple targets -- only these are compiled

> **Aliases**: `vscode` and `agents` are accepted as aliases for `copilot`.

> **Note**: For the `copilot` target, instructions without an `applyTo` pattern (global instructions) are also synthesized into `.github/copilot-instructions.md`. Instructions with `applyTo` patterns continue to flow into per-pattern `.github/instructions/*.instructions.md` files. The generated `.github/copilot-instructions.md` carries a build-id marker so `apm compile` can cleanly remove it when switching to a non-Copilot target -- manually-authored files at the same path are preserved.

Comment on lines 54 to +66
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tables/readme-style text imply .github/copilot-instructions.md is always generated for the copilot target, but the compiler only writes it when there is at least one global instruction (no applyTo); otherwise it will remove a previously-generated file. Consider annotating the table entry (and/or the note) with this condition so users don't expect the file to appear in projects that only use per-pattern instructions.

Copilot uses AI. Check for mistakes.
> **Note**: `AGENTS.md`, `CLAUDE.md`, and `GEMINI.md` contain **only instructions** (grouped by `applyTo` patterns). Prompts, agents, commands, hooks, and skills are integrated by `apm install`, not `apm compile`. See the [Integrations Guide](../../integrations/ide-tool-integration/) for details on how `apm install` populates `.github/prompts/`, `.github/agents/`, `.github/skills/`, `.claude/commands/`, `.cursor/rules/`, `.cursor/agents/`, `.opencode/agents/`, `.opencode/commands/`, `.codex/agents/`, `.gemini/commands/`, and `.agents/skills/`.

### How It Works
Expand All @@ -73,11 +75,13 @@ target: [claude, copilot] # multiple targets -- only these are compiled

### Example Output

**After `apm compile`:**
**After `apm compile` (copilot target):**
```
my-project/
β”œβ”€β”€ AGENTS.md # Instructions only (for Copilot, Cursor, etc.)
└── CLAUDE.md # Instructions only (for Claude)
β”œβ”€β”€ AGENTS.md # Instructions (for Copilot, Cursor, etc.)
β”œβ”€β”€ CLAUDE.md # Instructions (for Claude)
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example is labeled as a copilot-target compile, but it shows CLAUDE.md being generated as well. CLAUDE.md is only produced when the target includes claude (or auto-detection resolves to all). Please either remove CLAUDE.md from this tree or change the caption to reflect a multi-target/all compile.

Suggested change
β”œβ”€β”€ CLAUDE.md # Instructions (for Claude)

Copilot uses AI. Check for mistakes.
└── .github/
└── copilot-instructions.md # Global instructions synthesized from .apm/instructions/ (no applyTo)
```

**After `apm install` (folder integration):**
Expand Down Expand Up @@ -445,7 +449,7 @@ Different AI tools get different levels of support from `apm install` vs `apm co

| AI Tool | What `apm install` deploys | What `apm compile` adds | Support level |
|---------|--------------------------|------------------------|---------------|
| GitHub Copilot | `.github/instructions/`, `.github/prompts/`, agents, hooks, plugins, MCP | `AGENTS.md` (optional) | **Full** |
| GitHub Copilot | `.github/instructions/`, `.github/prompts/`, agents, hooks, plugins, MCP | `AGENTS.md` + `.github/copilot-instructions.md` (global instructions) | **Full** |
| Claude | `.claude/` commands, skills, MCP | `CLAUDE.md` | **Full** |
| Cursor | `.cursor/rules/`, `.cursor/agents/`, `.cursor/skills/`, `.cursor/hooks.json`, `.cursor/mcp.json` | `AGENTS.md` (optional) | **Full** |
| OpenCode | `.opencode/agents/`, `.opencode/commands/`, `.opencode/skills/`, `opencode.json` (MCP) | Via `AGENTS.md` | **Full** |
Expand Down
Loading