Skip to content
Saim Sheikh
Client
Open source
Year
2026
Role
Author and maintainer
Website
npmjs.com
Stack
  • TypeScript
  • Node.js
  • MCP SDK
  • Mermaid
  • Zod
  • Vitest

Case study, Published on npm, MIT licensed

Built ArchPilot, an open-source MCP server that makes coding agents plan the architecture before they write code

Context

AI coding agents start building the moment you describe an idea. ArchPilot is my open-source tool for the step that usually gets skipped: deciding how the system should be built first.

Problem

When an agent jumps straight to code, nobody asks about scale, budget, data sensitivity or the one thing that must not fail. Those gaps show up weeks later as rewrites. Planning also needs to survive the session: the agent should follow the plan, and say so when it can't.

What I built

  • A Claude Code skill that interviews you in short rounds of at most 3 to 4 questions, each with a sensible default.
  • Reference architectures: nine opinionated patterns, from a RAG app and multi-tenant SaaS to an agent system with tools, each with trade-offs, failure modes and a tested diagram. The skill picks the closest one, or none.
  • A pre-mortem that names the top five ways the design will fail, each with a mitigation, and a checklist of commonly forgotten concerns such as auth, rate limits, idempotency, backups and data deletion.
  • An MCP server with deterministic tools that validate and render Mermaid diagrams, return structured error codes so the model can repair a broken diagram, and export the plan.
  • An ARCHITECTURE.md contract with components, data flow, key decisions and rejected alternatives, risks, open questions and rules telling the coding agent to flag any deviation instead of silently changing the design.

Result

  • Published on npm as archpilot-mcp, MIT licensed.
  • Installs into Claude Code with two commands and works with other MCP clients as a standard stdio server.

Need something similar?

Tell me what you're building. If I'm not the right fit, I'll say so and point you to someone who is.