Skip to content

Commit 4bd8101

Browse files
dcramerclaude
andauthored
fix: remove @ prefix from doc references to reduce context bloat (#722)
Remove `@` prefix from all doc references in AGENTS.md to prevent automatic context expansion. The `@docs/` syntax tells Claude Code to pre-load referenced files as "memory files" into every conversation's context. This was consuming ~22,000 tokens per session just for documentation that may not be needed. With this change, AGENTS.md remains lean (~600 tokens) while docs are still accessible on-demand via the Read tool when actually needed. No information loss - just on-demand loading instead of eager pre-loading. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 70ac6ff commit 4bd8101

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

‎AGENTS.md‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Sentry MCP is a Model Context Protocol server that exposes Sentry's error tracki
55
## Principles
66

77
- **Type Safety**: Prefer strict types over `any` - they catch bugs and improve tooling. Use `unknown` for truly unknown types.
8-
- **Security**: Never log secrets. Validate external input. See @docs/security.md.
8+
- **Security**: Never log secrets. Validate external input. See docs/security.md.
99
- **Simplicity**: Follow existing patterns. Check neighboring files before inventing new approaches.
1010

1111
## Constraints
@@ -35,19 +35,19 @@ sentry-mcp/
3535
## Essential Documentation
3636

3737
**Read before making changes:**
38-
- @docs/adding-tools.md — Tool implementation guide
39-
- @docs/testing.md — Testing requirements
40-
- @docs/common-patterns.md — Error handling, Zod schemas, response formatting
41-
- @docs/error-handling.md — Error types and propagation
38+
- docs/adding-tools.md — Tool implementation guide
39+
- docs/testing.md — Testing requirements
40+
- docs/common-patterns.md — Error handling, Zod schemas, response formatting
41+
- docs/error-handling.md — Error types and propagation
4242

4343
**Reference:**
44-
- @docs/architecture.md — System design
45-
- @docs/api-patterns.md — Sentry API client usage
46-
- @docs/quality-checks.md — Pre-commit checklist
47-
- @docs/pr-management.md — Commit/PR guidelines
48-
- @docs/security.md — Authentication patterns
49-
- @docs/releases/stdio.md — npm package release
50-
- @docs/releases/cloudflare.md — Cloudflare deployment
44+
- docs/architecture.md — System design
45+
- docs/api-patterns.md — Sentry API client usage
46+
- docs/quality-checks.md — Pre-commit checklist
47+
- docs/pr-management.md — Commit/PR guidelines
48+
- docs/security.md — Authentication patterns
49+
- docs/releases/stdio.md — npm package release
50+
- docs/releases/cloudflare.md — Cloudflare deployment
5151

5252
## Commands
5353

@@ -72,8 +72,8 @@ pnpm run measure-tokens # Check tool definition size
7272

7373
1. Check neighboring files for existing patterns before writing new code.
7474
2. Update relevant docs when changing functionality.
75-
3. Follow @docs/error-handling.md for error types.
76-
4. Follow @docs/pr-management.md for commits and PRs.
75+
3. Follow docs/error-handling.md for error types.
76+
4. Follow docs/pr-management.md for commits and PRs.
7777

7878
## Commit Attribution
7979

0 commit comments

Comments
 (0)