Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f3600f9
feat: implement MCP resource for list_sims
claude[bot] Jul 23, 2025
9f9bf79
fix: address review concerns - remove vitest mocking and update docs
claude[bot] Jul 23, 2025
75ed1cd
fix: resolve linting errors and resource handler dependency injection
claude[bot] Jul 23, 2025
77c6a77
fix: resolve test failures by implementing proper dependency injectio…
claude[bot] Jul 23, 2025
eab471b
fix: correct error message expectations in resource tests
claude[bot] Jul 23, 2025
3dfd270
fix: correct spawn error test expectation to match actual list_simsLo…
claude[bot] Jul 23, 2025
a2d2186
refactor: improve resource dependency injection pattern
cameroncooke Jul 23, 2025
a6d9178
feat: implement plugin-based resource architecture
cameroncooke Jul 23, 2025
9716383
feat: implement client capability detection and tool filtering for MC…
cameroncooke Jul 23, 2025
7e534b8
docs: add MCP resources documentation and client compatibility matrix
cameroncooke Jul 23, 2025
82f2749
docs: update architecture and development docs with MCP resources system
cameroncooke Jul 23, 2025
2299a13
fix: correct tool count to 54 canonical tools (consumer-facing)
cameroncooke Jul 23, 2025
fb10785
fix: correct canonical tool count from 54 to 81 across documentation
cameroncooke Jul 23, 2025
9280991
refactor: restructure project to src/mcp/tools and src/mcp/resources
cameroncooke Jul 23, 2025
869ceb0
Remove tool filtering and update docs
cameroncooke Jul 24, 2025
d619454
Update documentation
cameroncooke Jul 24, 2025
fd8b27d
Fix failing tests
cameroncooke Jul 24, 2025
05cbc7f
fix: resolve ESLint errors in generated files and strengthen type che…
cameroncooke Jul 24, 2025
6fcc776
Add BUGBOT.md
cameroncooke Jul 24, 2025
c2c9819
Fix corrupt mock data
cameroncooke Jul 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
82 changes: 82 additions & 0 deletions .cursor/BUGBOT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Bugbot Review Guide for XcodeBuildMCP

## Project Snapshot

XcodeBuildMCP is an MCP server exposing Xcode / Swift workflows as **tools** and **resources**.
Stack: TypeScript · Node.js · plugin-based auto-discovery (`src/mcp/tools`, `src/mcp/resources`).

For full details see [README.md](README.md) and [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).

---

## 1. Security Checklist — Critical

* No hard-coded secrets, tokens or DSNs.
* All shell commands must flow through `CommandExecutor` with validated arguments (no direct `child_process` calls).
* Paths must be sanitised via helpers in `src/utils/validation.ts`.
* Sentry breadcrumbs / logs must **NOT** include user PII.

---

## 2. Architecture Checklist — Critical

| Rule | Quick diff heuristic |
|------|----------------------|
| Dependency injection only | New `child_process` \| `fs` import ⇒ **critical** |
| Handler / Logic split | `handler` > 20 LOC or contains branching ⇒ **critical** |
| Plugin auto-registration | Manual `registerTool(...)` / `registerResource(...)` ⇒ **critical** |

Positive pattern skeleton:

```ts
// src/mcp/tools/foo-bar.ts
export async function fooBarLogic(
params: FooBarParams,
exec: CommandExecutor = getDefaultCommandExecutor(),
fs: FileSystemExecutor = getDefaultFileSystemExecutor(),
) {
// ...
}

export const handler = (p: FooBarParams) => fooBarLogic(p);
```

---

## 3. Testing Checklist

* **Ban on Vitest mocking** (`vi.mock`, `vi.fn`, `vi.spyOn`, `.mock*`) ⇒ critical. Use `createMockExecutor` / `createMockFileSystemExecutor`.
* Each tool must have tests covering happy-path **and** at least one failure path.
* Avoid the `any` type unless justified with an inline comment.

---

## 4. Documentation Checklist

* `docs/TOOLS.md` must exactly mirror the structure of `src/mcp/tools/**` (exclude `__tests__` and `*-shared`).
*Diff heuristic*: if a PR adds/removes a tool but does **not** change `docs/TOOLS.md` ⇒ **warning**.
* Update public docs when CLI parameters or tool names change.

---

## 5. Common Anti-Patterns (and fixes)

| Anti-pattern | Preferred approach |
|--------------|--------------------|
| Complex logic in `handler` | Move to `*Logic` function |
| Re-implementing logging | Use `src/utils/logger.ts` |
| Direct `fs` / `child_process` usage | Inject `FileSystemExecutor` / `CommandExecutor` |
| Chained re-exports | Export directly from source |

---

### How Bugbot Can Verify Rules

1. **Mocking violations**: search `*.test.ts` for `vi.` → critical.
2. **DI compliance**: search for direct `child_process` / `fs` imports outside executors.
3. **Docs accuracy**: compare `docs/TOOLS.md` against `src/mcp/tools/**`.
4. **Style**: ensure ESLint and Prettier pass (`npm run lint`, `npm run format:check`).

---

Happy reviewing 🚀
237 changes: 0 additions & 237 deletions .cursorrules

This file was deleted.

1 change: 1 addition & 0 deletions .cursorrules
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build/
# Auto-generated files
src/version.ts
src/core/generated-plugins.ts
src/core/generated-resources.ts

# IDE and editor files
.idea/
Expand Down
Loading
Loading