Skip to content

Commit 0133259

Browse files
committed
Clean up docs
1 parent 1c7e372 commit 0133259

15 files changed

Lines changed: 178 additions & 64 deletions

‎biome.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
"enabled": true
55
},
66
"files": {
7-
"ignore": ["worker-configuration.d.ts", "tsconfig*.json"]
7+
"ignore": [
8+
"worker-configuration.d.ts",
9+
"tsconfig*.json",
10+
"packages/mcp-server-mocks/src/fixtures/trace.json"
11+
]
812
},
913
"vcs": {
1014
"enabled": true,

‎docs/README.md‎

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,21 @@ This directory serves a dual purpose:
1515
## Contents
1616

1717
### Core Guidelines
18-
- `coding-guidelines.mdc` - Coding standards, patterns, and best practices
19-
- `coding-practices.mdc` - General coding practices and conventions
20-
- `package-management.mdc` - Package and dependency management
18+
- @docs/coding-guidelines.mdc - Coding standards, patterns, and best practices
19+
- @docs/common-patterns.mdc - Reusable patterns and conventions
20+
- @docs/quality-checks.mdc - Required checks before changes
2121

2222
### API and Tools
23-
- `adding-new-tools.mdc` - How to add new MCP tools
24-
- `adding-prompts.mdc` - Guidelines for adding new prompts
25-
- `adding-new-resources.mdc` - How to add new MCP resources
26-
- `api-client-patterns.mdc` - Working with the Sentry API client
27-
- `search-events-api-patterns.md` - Comprehensive guide to search_events API patterns
28-
- `using-api-mocks.mdc` - Testing with API mocks
23+
- @docs/adding-tools.mdc - How to add new MCP tools
24+
- @docs/adding-prompts.mdc - Guidelines for adding new prompts
25+
- @docs/adding-resources.mdc - How to add new MCP resources
26+
- @docs/api-patterns.mdc - Working with the Sentry API client
27+
- @docs/search-events-api-patterns.md - search_events API patterns
2928

3029
### Infrastructure and Operations
31-
- `deployment-and-infrastructure.mdc` - Deployment processes and infrastructure
32-
- `observability-and-monitoring.mdc` - Monitoring and telemetry practices
33-
- `security-and-authentication.mdc` - Security best practices
30+
- @docs/deployment.mdc - Deployment processes (Cloudflare)
31+
- @docs/monitoring.mdc - Monitoring and telemetry practices
32+
- @docs/security.mdc - Security and authentication patterns
3433

3534
## For LLMs
3635

@@ -51,9 +50,9 @@ These `.mdc` files are designed to be easily consumed by various AI development
5150
## LLM-Specific Guidelines
5251

5352
The `llms/` subdirectory contains meta-documentation for LLMs:
54-
- `documentation-style-guide.mdc` - How to write effective LLM documentation
55-
- `document-scopes.mdc` - Purpose and content for each doc
56-
- `documentation-todos.mdc` - Tasks for documentation improvement
53+
- @docs/llms/documentation-style-guide.mdc - How to write effective LLM documentation
54+
- @docs/llms/document-scopes.mdc - Purpose and content for each doc
55+
5756

5857
## Maintenance
5958

@@ -65,4 +64,4 @@ These documents should be updated when:
6564

6665
## Note
6766

68-
This documentation supplements but does not replace the root-level CLAUDE.md file, which remains the primary instruction set for Claude Code when working with this repository. The CLAUDE.md file will be refactored into multiple focused documents within this directory.
67+
This documentation supplements but does not replace the root-level @AGENTS.md file, which remains the primary instruction set for agents when working with this repository. The @AGENTS.md file is kept concise and points to focused documents within this directory.

‎docs/adding-tools.mdc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ try {
303303

304304
### Implementation Guidelines
305305

306-
1. **Create a CLAUDE.md file** in the tool directory documenting:
306+
1. **Create an AGENTS.md file** in the tool directory documenting:
307307
- The embedded agent's prompt and behavior
308308
- Common translation patterns
309309
- Known limitations

‎docs/architecture.mdc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ A separate web chat application that uses the MCP server.
5656

5757
**Note**: This is NOT part of the MCP server itself - it's a demonstration of how to build a chat interface that consumes MCP.
5858

59-
See [Cloudflare Web App Documentation](./cloudflare/overview.md) for details.
59+
See "Overview" in @docs/cloudflare/overview.md for details.
6060

6161
### packages/mcp-server-evals
6262

‎docs/cloudflare/architecture.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ SENTRY_CLIENT_SECRET = "..." # OAuth app secret
183183

184184
## Related Documentation
185185

186-
- [Authentication Flow](./authentication.md)
187-
- [Chat Interface Features](./chat-interface.md)
188-
- [Deployment Guide](./deployment.md)
189-
- [Core MCP Server](../architecture.mdc)
186+
- See "OAuth Architecture" in @docs/cloudflare/oauth-architecture.md
187+
- See "Chat Interface" in @docs/cloudflare/architecture.md
188+
- See "Deployment" in @docs/cloudflare/deployment.md
189+
- See "Architecture" in @docs/architecture.mdc

‎docs/cloudflare/mcpagent-architecture.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,12 @@ OAuth Provider McpAgent
308308
## Implementation Reference
309309

310310
The actual implementation can be found in:
311-
- **Main class**: `packages/mcp-cloudflare/src/server/lib/mcp-agent.ts`
312-
- **Constraint utilities**: `packages/mcp-cloudflare/src/server/lib/constraint-utils.ts`
313-
- **Type definitions**: `packages/mcp-cloudflare/src/server/types.ts`
311+
- Main class: @packages/mcp-cloudflare/src/server/lib/mcp-agent.ts
312+
- Constraint utilities: @packages/mcp-cloudflare/src/server/lib/constraint-utils.ts
313+
- Type definitions: @packages/mcp-cloudflare/src/server/types.ts
314314

315315
## Related Documentation
316316

317-
- [OAuth Architecture](./oauth-architecture.md) - How OAuth provider integrates
318-
- [MCP Transport Implementation](../lib/mcp-transport.ts) - Our implementation
319-
- [Constraint DO Analysis](./constraint-do-analysis.md) - Alternative architectures considered
317+
- OAuth Architecture: @docs/cloudflare/oauth-architecture.md — How OAuth provider integrates
318+
- MCP Transport (stdio) Implementation: @packages/mcp-server/src/transports/stdio.ts — Core server transport
319+
- Constraint DO Analysis: @docs/cloudflare/constraint-do-analysis.md — Alternative architectures considered

‎docs/cloudflare/overview.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ Think of it as:
3535

3636
## Documentation Structure
3737

38-
- [Architecture](./architecture.md) - Technical architecture of the web application
39-
- [Authentication](./authentication.md) - OAuth flow and token management
40-
- [Chat Interface](./chat-interface.md) - UI components and features
41-
- [Prompts Integration](./prompts-integration.md) - How the chat app uses MCP prompts
42-
- [Deployment](./deployment.md) - Deploying to Cloudflare Workers
38+
- Architecture: @docs/cloudflare/architecture.md — Technical architecture of the web application
39+
- OAuth Architecture: @docs/cloudflare/oauth-architecture.md — OAuth flow and token management
40+
- Chat Interface: @docs/cloudflare/architecture.md — See "Chat Interface" section
41+
- Prompts Integration: @docs/cloudflare/prompts-integration.md — How the chat app uses MCP prompts
42+
- Deployment: @docs/cloudflare/deployment.md — Deploying to Cloudflare Workers
4343

4444
## Quick Links
4545

4646
- Live deployment: https://mcp.sentry.dev
4747
- Package location: `packages/mcp-cloudflare`
48-
- **For MCP Server docs**: [Core MCP Server Architecture](../architecture.mdc)
48+
- **For MCP Server docs**: See "Architecture" in @docs/architecture.mdc

‎docs/cursor.mdc‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ Sentry MCP is a Model Context Protocol server that provides access to Sentry's f
3636
- **Changing architecture**: Update `docs/architecture.mdc`
3737

3838
### Critical Sync Requirements
39-
- **CLAUDE.md ↔ cursor.mdc**: These files MUST stay synchronized
40-
- **When updating CLAUDE.md**: Also update `cursor.mdc` with equivalent guidance
41-
- **When updating cursor.mdc**: Also update `CLAUDE.md` with equivalent guidance
39+
- **AGENTS.md ↔ cursor.mdc**: These files MUST stay synchronized
40+
- **When updating AGENTS.md**: Also update `cursor.mdc` with equivalent guidance
41+
- **When updating cursor.mdc**: Also update `AGENTS.md` with equivalent guidance
4242
- Both files serve the same purpose for different tools (Claude Code vs Cursor IDE)
4343

4444
### Documentation Update Process
4545
1. **Identify affected docs** while implementing changes
4646
2. **Update documentation in the same session** as code changes
4747
3. **Verify cross-references** remain accurate
48-
4. **Ensure CLAUDE.md ↔ cursor.mdc sync** is maintained
48+
4. **Ensure AGENTS.md ↔ cursor.mdc sync** is maintained
4949
5. **Add examples** for new patterns introduced
5050

5151
**Documentation updates are not optional - they are part of completing any task.**
@@ -75,7 +75,7 @@ You should ALWAYS update docs when they are inaccurate or you have learned new r
7575

7676
## Documentation Maintenance
7777

78-
- **Keep CLAUDE.md and cursor.mdc concise**: These files are navigation aids, not comprehensive docs
78+
- **Keep AGENTS.md and cursor.mdc concise**: These files are navigation aids, not comprehensive docs
7979
- **Reference, don't duplicate**: Point to `docs/` files instead of repeating content
8080
- **Update referenced docs first**: When making changes, update the actual documentation before updating references
8181
- **Avoid redundancy**: Check existing docs before creating new ones (see `docs/llms/documentation-style-guide.mdc`)

‎docs/llms/document-scopes.mdc‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Defines the specific purpose and content for each documentation file.
44

5+
## Reference Style (MANDATORY)
6+
7+
- Use @path for all local file references, repo-root relative (e.g., `@packages/mcp-server/src/server.ts`).
8+
- Refer to sections by name: `See "Error Handling" in @docs/common-patterns.mdc`.
9+
- Keep Markdown links only for external sites.
10+
511
## Core Documents
612

713
### architecture.mdc
@@ -201,14 +207,14 @@ Defines the specific purpose and content for each documentation file.
201207
- General coding guidelines
202208
- Project overview
203209

204-
### CLAUDE.md
205-
**Purpose**: Claude Code entry point
210+
### AGENTS.md
211+
**Purpose**: Agent entry point (Claude Code, Cursor, etc.)
206212

207213
**Must Include**:
208214
- Brief project description
209215
- Documentation directory reference
210216
- Critical quality checks
211-
- Claude Code-specific notes
217+
- Agent-specific notes (tools, transports, auth defaults)
212218

213219
**Must Exclude**:
214220
- Detailed architecture (link to architecture.mdc)
@@ -226,4 +232,4 @@ Key improvements needed:
226232
- **deployment.mdc** (574 lines): Too much CloudFlare docs → focus on config
227233
- **monitoring.mdc** (559 lines): Verbose explanations → code examples
228234

229-
The goal: Each document should be focused enough to be useful in a single context window while remaining comprehensive for its topic.
235+
The goal: Each document should be focused enough to be useful in a single context window while remaining comprehensive for its topic.

‎docs/llms/documentation-style-guide.mdc‎

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This guide defines how to write effective documentation for LLMs working with th
1717

1818
### 3. Show, Don't Tell
1919
- Include minimal, focused code examples
20-
- Reference actual implementations: `See packages/mcp-server/src/tools.ts:45`
20+
- Reference actual implementations: `See @packages/mcp-server/src/server.ts:45`
2121
- Use real patterns from the codebase
2222

2323
## MDC Header Format
@@ -61,12 +61,12 @@ Project-specific rules that must be followed.
6161

6262
## Common Patterns
6363

64-
Link to reusable patterns: See `common-patterns.mdc#error-handling`
64+
Link to reusable patterns: See "Error Handling" in @docs/common-patterns.mdc
6565

6666
## References
6767

68-
- Implementation: `packages/mcp-server/src/[file].ts`
69-
- Tests: `packages/mcp-server/src/[file].test.ts`
68+
- Implementation: `@packages/mcp-server/src/[file].ts`
69+
- Tests: `@packages/mcp-server/src/[file].test.ts`
7070
- Examples in codebase: [specific function/tool names]
7171
```
7272

@@ -115,15 +115,24 @@ export const ParamOrganizationSlug = z
115115

116116
## Cross-References
117117

118-
### Internal Links:
119-
- Use relative references: `See common-patterns.mdc#error-handling`
120-
- Link to specific sections with anchors
121-
- Avoid duplicating content - link instead
118+
### File References (MANDATORY):
119+
- Use @path syntax for local files: `@docs/common-patterns.mdc`
120+
- Always reference from repo root: `@packages/mcp-server/src/server.ts`
121+
- Do NOT use Markdown links for local files (avoid markdown `[text](./...)` patterns)
122+
- Prefer path-only mentions to help agents parse
123+
124+
### Section References:
125+
- Refer to sections by name, not anchors: `See "Error Handling" in @docs/common-patterns.mdc`
126+
- If multiple sections share a name, include a short hint: `("Zod Patterns" in @docs/common-patterns.mdc)`
122127

123128
### Code References:
124-
- Use specific file paths: `packages/mcp-server/src/tools.ts`
125-
- Include line numbers for specific examples: `tools.ts:45-52`
126-
- Reference actual implementations over creating examples
129+
- Use concrete paths and identifiers: `@packages/mcp-server/src/tools/search-events/index.ts:buildQuery`
130+
- Optional line hints for humans: `server.ts:45-52` (agents may ignore)
131+
- Prefer real implementations over fabricated examples
132+
133+
### External Links:
134+
- Keep standard Markdown links for external sites
135+
- Use concise link text; avoid link-only bullets
127136

128137
## Language and Tone
129138

@@ -191,7 +200,15 @@ pnpm install
191200
cp .env.example .env # Add your API keys
192201
```
193202

194-
See `CLAUDE.md#development-setup` for environment variables.
203+
See "Development Setup" in @AGENTS.md for environment variables.
195204
```
196205

197-
This style guide ensures documentation remains focused, valuable, and maintainable for LLM consumption.
206+
## Agent Readability Checklist
207+
208+
- Uses @path for all local file references
209+
- Short, focused sections with concrete examples
210+
- Minimal prose; prefers code and commands
211+
- Clear preconditions and environment notes
212+
- Error handling and validation rules are explicit
213+
214+
This style guide ensures documentation remains focused, valuable, and maintainable for LLM consumption.

0 commit comments

Comments
 (0)