npm run build- Build (tsup, ESM)npm run test- Unit/integration tests (Vitest)npm run test:smoke- Smoke tests (builds first, serial execution)npm run lint/npm run lint:fix- ESLintnpm run format- Prettiernpm run typecheck- TypeScript type checking (tsc --noEmit)npm run docs:update- Regeneratedocs/TOOLS.mdfrom manifestsnpm run docs:check- Validate docs match CLI surface
ESM TypeScript project (type: module). Key layers:
src/cli/- CLI entrypoint, yargs wiring, daemon routingsrc/server/- MCP stdio server, lifecycle, workflow/resource registrationsrc/runtime/- Config bootstrap, session state, tool catalog assemblysrc/core/manifest/- YAML manifest loading, validation, tool module importssrc/mcp/tools/- Tool implementations grouped by workflow (mirrorsmanifests/workflows/)src/mcp/resources/- MCP resource implementationssrc/integrations/- External integrations (Xcode mcpbridge proxy)src/utils/- Shared helpers (execution, logging, validation, responses)src/visibility/- Tool/workflow exposure predicatessrc/daemon/- Background daemon for persistent sessionssrc/types/- Shared type definitions
See docs/ for detailed documentation (architecture, configuration, tools, troubleshooting).
docs/dev/CONTRIBUTING.md- Full contributing guide (setup, debugging, PR submission)docs/dev/ARCHITECTURE.md- Detailed architectural overview and component designdocs/dev/TESTING.md- Testing guidelines, dependency injection patterns, coverage standardsdocs/dev/MANIFEST_FORMAT.md- YAML manifest schema reference for tools and workflowsdocs/dev/MANUAL_TESTING.md- Manual testing proceduresdocs/dev/RELEASE_PROCESS.md- Release workflowdocs/dev/CODE_QUALITY.md- Code quality standards and ESLint rules
- Create a branch from
main - Make changes following the conventions in this file
- Run the pre-commit checklist before committing:
npm run lint:fix npm run typecheck npm run format npm run build npm run docs:check npm test - Update
CHANGELOG.mdunder## [Unreleased] - Update documentation if adding or modifying features
- Clone and test against example projects (e.g.,
XcodeBuildMCP-iOS-Template) when changes affect runtime behavior - Push and create a pull request with a clear description
- Link any related issues
For full setup, debugging with Reloaderoo, and plugin development details, see docs/dev/CONTRIBUTING.md.
- No
anytypes unless absolutely necessary - Check node_modules for external API type definitions instead of guessing
- NEVER use inline imports - no
await import("./foo.js"), noimport("pkg").Typein type positions, no dynamic imports for types. Always use standard top-level imports. - NEVER remove or downgrade code to fix type errors from outdated dependencies; upgrade the dependency instead
- Always ask before removing functionality or code that appears to be intentional
- Follow TypeScript best practices
- ESM with explicit
.tsextensions insrc/(tsup rewrites to.jsat build) - No
.jsimports insrc/(enforced by ESLint) - No barrel imports from
utils/index- import from specific submodules (e.g.,src/utils/execution/index.ts,src/utils/logging/index.ts)
- Vitest with colocated
__tests__/directories using*.test.ts - Smoke tests in
src/smoke-tests/__tests__/(separate Vitest config, serial execution) - Use
vi.mock/vi.hoistedfor isolation; inject executors and mock file systems - MCP integration tests use
McpServer,InMemoryTransport, andClient - External dependencies (command execution, file system) must use dependency injection via
createMockExecutor()/createMockFileSystemExecutor() - See
docs/dev/TESTING.mdfor full testing guidelines
- Tool manifests in
manifests/tools/*.yamldefineid,module,names.mcp(snake_case), optionalnames.cli(kebab-case), predicates, and annotations - Workflow manifests in
manifests/workflows/*.yamlgroup tools and define exposure rules - Tool modules export a Zod schema, a pure
*Logicfunction, and ahandlerviacreateTypedToolorcreateSessionAwareTool - Resources export
{ uri, name, description, mimeType, handler }
- NEVER commit unless user asks
When reading issues:
- Always read all comments on the issue
- GitHub CLI for issues/PRs
- CLI design note: do not rely on CLI session-default writes. CLI is intentionally deterministic for CI/scripting and should use explicit command arguments as the primary input surface.
- When working on skill sources in
skills/, use theskill-creatorskill workflow. - After modifying any skill source, run
npx skill-check <skill-directory>and address all errors/warnings before handoff.
- Keep answers short and concise
- No emojis in commits, issues, PR comments, or code
- No fluff or cheerful filler text
- Technical prose only, be kind but direct (e.g., "Thanks @user" not "Thanks so much @user!")
- If modifying or adding/removing tools run
npm run docs:updateto update the TOOLS.md file, never edit this file directly.
Location: CHANGELOG.md
Use these sections under ## [Unreleased]:
### Added- New features### Changed- Changes to existing functionality### Fixed- Bug fixes### Removed- Removed features
- Before adding entries, read the full
[Unreleased]section to see which subsections already exist - New entries ALWAYS go under
## [Unreleased]section - Append to existing subsections (e.g.,
### Fixed), do not create duplicates - NEVER modify already-released version sections (e.g.,
## [0.12.2]) - Each version section is immutable once released
- Internal changes (from issues):
Fixed foo bar ([#123](https://github.com/getsentry/XcodeBuildMCP/issues/123)) - External contributions:
Added feature X ([#456](https://github.com/getsentry/XcodeBuildMCP/pull/456) by [@username](https://github.com/username))
- NEVER use sed/cat to read a file or a range of a file. Always use the native read tool.
- You MUST read every file you modify in full before editing.