⌘K

Build your backend in one spec, not one week.

You've started a new project. You already know what's coming: the auth module, the migrations, the Dockerfile, the controllers, the DTOs, the validators. You've written it ten times. You'll write it again.

Or you describe it once — and Archon writes all of it for you. And the code is yours to keep.

Day 1, from scratch
  • × Pick a framework
  • × Set up auth (JWT? OAuth? Both?)
  • × Write your first entity + migration
  • × Wire DTOs, validators, controllers
  • × Add Swagger by hand
  • × Write the Dockerfile
  • × Set up CI
  • × Realize you forgot rate limiting
⌛ A week — if nothing surprises you.
Day 1, with Archon
  • Write a 20-line spec
  • Run archon generate
  • Open the generated NestJS project
  • Auth, migrations, DTOs, Swagger — done
  • Dockerfile, CI, rate limiting — done
  • Start writing your actual business logic
⚡ Under a minute. Same output, every time.
📜 Why this guide exists

You don't know us yet. We're not asking you to take anything on faith. This page shows you what Archon actually does, how it does it, where the numbers come from, and exactly how you can leave whenever you want. By the end you'll know whether it fits — without installing anything.

You've already written this backend. Maybe ten times.

Every serious backend project starts with the same ~47 files: a module per domain, an entity per table, CRUD controllers, DTOs with validation, JWT setup, migrations, the Dockerfile, Swagger, error handlers, rate limiting. None of it is novel. None of it is what makes your product different. All of it is required.

So developers reach for one of four shortcuts. Each has a problem:

📦

Use a boilerplate

Save 2 days now, lose 2 weeks later. Boilerplates rot the moment the framework releases a new version, and you've inherited someone else's opinions forever.

🤖

Vibe-code with an LLM

Fine for a prototype. By file 30, the AI has forgotten the field types from file 5, hallucinated an import, and the tests don't compile. You pay tokens to fix tokens.

🏢

Hire an agency

Costs €30,000+ and takes 6 weeks. You get production code. You also get a permanent dependency on someone else's invoice every time you want to add a field.

⌨️

Write it yourself

Honest, slow, and correct. Two weeks before you ship the first feature anyone outside the team cares about. By then your competitor already launched.

Archon was built for the fifth option: describe the system once, generate the code from deterministic templates, own the output forever.

An MCP-native architecture platform. Your AI agent runs the design loop with you.

Archon is not a CLI you learn. It's a set of Model Context Protocol (MCP) servers that your existing AI agent — Claude Desktop, Cursor, Windsurf, any MCP-capable client — plugs into. The agent you already use gains a new capability: "design and build me a backend, properly."

Behind that single capability lives a team of five specialist agents running on a shared memory plane: a vector store for semantic recall, a relational store for historical truth, and local inference for embeddings. They coordinate to take you from a sentence to a production codebase — with the UML class diagram as the contract you approve at every step.

The actual code is produced by the Archon Template Engine — a deterministic compiler we built. Same spec, same output, every time. No LLM is in the code-writing path. That's what makes the engine safe to re-run, predictable to scale, and possible to verify.

In one sentence

Archon turns a conversation into a UML class diagram you approve, and a UML class diagram into a working backend — with deterministic, repeatable, inspectable steps in between.

From a sentence to shipped code — the five-phase governed lifecycle.

You don't write a spec. You describe what you want, in plain language, to your AI agent. The agent then puts on five different hats — one per phase of the governed lifecycle. You approve at the two critical gates. The server refuses to skip a phase.

  1. 00
    You describe what you want. In any words.

    "I need a booking platform with rooms, reservations, and customer profiles." That's it. No syntax to learn. You talk to your AI agent the way you already do.

  2. 01
    Discovery — the Analyst extracts the requirements.

    Asks focused questions to pin down business rules, actors, domain events, and constraints. Scans available platform modules (Redis, BullMQ, Jenkins, Terraform, NewRelic, …). Locks everything into a Requirement Contract. archon_workflow_status shifts to DISCOVERY_DONE.

  3. 02
    System Design — the Architect maps it to bounded contexts.

    Translates the requirements into domain shards, draws the UML class diagram (the contract you will approve), wires module dependencies, picks the Handlebars helpers needed for the templates, and emits the Architecture Contract. Hard rule: a minimum of 12 distinct entities for production workspaces.

  4. You iterate on the diagram until it matches your intent.

    "Add a status field to Reservation." "Make Customer the parent of Booking." Each change redraws the class diagram. The loop ends only when you say the diagram is right. This is the most important step in the whole lifecycle.

  5. 03
    Compilation & Planning — the Tech Lead validates and plans.

    Compiles all shards into a single DesignSpec.json, runs schema validation, and fingerprints the spec for immutability. Then produces an execution plan: the exact diff of files to create, update, or replace. You see it before anything ships.

  6. You approve the execution plan.

    The state machine refuses to materialize until you transition to USER_APPROVED with an explicit token. There is no auto-approve. There is no "trust mode." Archon writes nothing without your green light.

  7. 04
    Materialization — the Orchestrator ships the code.

    Streams the approved execution plan through the governance gateway, writing every file deterministically: NestJS modules, TypeORM entities, controllers, DTOs, JWT auth, PostgreSQL migrations, Dockerfile, Jenkinsfile, Terraform, husky hooks. Your @ArchonManual()-marked code from prior runs is preserved by semantic hashing.

  8. 05
    Verification — the Developer guards against drift.

    Verifies lineage, runs archon_reconcile to detect any file that diverged from the spec, and asks you to decide: align the file with the spec, or protect it (and update the spec instead). Decisions are logged. Your codebase never silently diverges from its source of truth.

Engineered part by part. Every layer materializes before your eyes.

This is the actual Archon lifecycle — not a diagram, not a flowchart. Each step shows you exactly what one specialist agent produces before handing off to the next. Step through it yourself or watch it auto-advance.

Intent Analyst Architect Tech Lead Orchestrator Developer
Your intent
1 of 6

Use ← → arrow keys or click the dots to jump to any phase. Auto-advances every 3 seconds when idle.

One AI agent. Five hats. Strict separation of duties.

Archon's contract with your AI agent is precise: each phase has exactly one persona, and the personas don't bleed into each other. The Analyst doesn't write code. The Builder doesn't renegotiate requirements. This is what makes the lifecycle auditable — at any moment, the workflow state tells you which persona is active and what's allowed next.

Phase 1 · Discovery
🧭
The Analyst

Extracts business rules, actors, domain events, and constraints from your description. Discovers which platform modules and Handlebars helpers your project needs. Locks the Requirement Contract — the foundation everything else rests on.

archon_workflow_start · archon_list_modules · archon_create_requirement_contract
moves state to DISCOVERY_DONE
Phase 2 · System Design
📐
The Architect

Maps requirements into bounded contexts and domain shards. Draws the UML class diagram you'll approve. Wires module dependencies and cross-cutting concerns. Emits the Architecture Contract — minimum 12 distinct entities for production-grade output.

archon_create_architecture_contract · archon_create_domain_shard · archon_validate_shard
moves state to ARCHITECTURE_CONTRACT_CREATED
Phase 3 · Compilation & Planning
🛡️
The Tech Lead

Compiles every shard into a single DesignSpec.json. Runs schema validation, fingerprints the spec for immutability, produces the execution plan. The quality gate that catches design issues before any code is written.

archon_compile_spec_shards · archon_validate_spec · archon_fingerprint_spec · archon_plan_project
moves state to PLAN_CREATED
Phase 4 · Materialization
⚙️
The Orchestrator

Presents the plan, collects your approval token, then streams the entire codebase to disk via the governance gateway. Hard server block: rejects materialize calls that aren't in USER_APPROVED state. Monitors the SSE stream end to end.

archon_workflow_continue · archon_workflow_materialize · archon_materialization_status
moves state to DELIVERED
Phase 5 · Verification
🔬
The Developer

Verifies lineage on the delivered workspace. Runs reconciliation to detect any file that drifted from the spec. Asks whether each drift should be aligned (revert the file) or protected (update the spec). Every decision is logged to .antigravity/decisions/.

archon_verify_local · archon_reconcile · archon_diff_spec
state stays at DELIVERED · drift detected → loops to Analyst
🔒 The governance state machine is the source of truth.

Every persona's tools only run in the right state. NEW → WORKSPACE_INITIALIZED → DISCOVERY_DONE → ARCHITECTURE_CONTRACT_CREATED → SPEC_COMPILED → SPEC_VALIDATED → PLAN_CREATED → USER_APPROVED → GENERATED → DELIVERED. The server rejects any tool call that doesn't match the current state. There is no way to "skip a phase" — not for the agent, not for the user, not for us.

Your AI agent already knows how to use Archon.

Archon is built on the Model Context Protocol — the open standard for how AI agents talk to external tools. That means:

No new editor. No new CLI to learn.

If you use Claude Desktop, Cursor, Windsurf, Zed, or any other MCP-capable client, you already have the interface to Archon. Configure once, talk normally.

The agent does the talking.

You describe what you want. The agent figures out which Archon tools to call, in what order, with what arguments. You see the diagrams. You approve the gates. The orchestration is invisible.

One gateway, many tools.

The Archon gateway exposes ~40 MCP tools (parse, validate, compile, plan, generate, reconcile, search memory, find decisions, manage workflows, …). Your agent picks them up automatically.

Open protocol = no vendor lock.

MCP is an open spec. The same protocol that lets your agent talk to Archon lets it talk to GitHub, Slack, Postgres, anything. We didn't invent the wire format. We just speak it fluently.

⚡ The CLI is the back door, not the front door.

Yes, there's an archon CLI — useful for CI, scripted runs, and power users. But the intended way to use Archon is through your AI agent. The CLI exists for the day you want it, not the day you start.

From spec to working backend in six stages.

Every generation goes through the same six stages. Each stage is inspectable. Each stage is reversible. Each stage produces an artifact you can read.

1 Parse 2 Transform 3 Validate 4 Plan 5 Generate 6 Materialize ASCII / spec → DiagramIR DiagramIR → DesignSpec Schema rules enforced Diff vs. state → ExecutionPlan Templates → TypeScript Write + hash + verify

Each box is a separate, testable Archon component. Click any stage to see exactly what it does. Every artifact between stages is written to disk so you can open it, diff it, and reason about it. There is no magic step — there is no LLM at any of these stages.

Watch a spec become a diagram, then a codebase — live.

In a real project, your AI agent describes your intent to the Archon MCP servers; the Architect persona drafts a UML class diagram inside an Architecture Contract; you iterate until the diagram matches what you meant; then the Tech Lead compiles it and the Orchestrator ships the code. This is that loop, compressed into one interactive panel:

  1. Edit the spec on the top — entities, fields, relations.
  2. Watch the class diagram redraw in real time — same algorithm the Architect uses to produce the contract you'll approve.
  3. Browse the generated files below — 60+ production files from 22 lines of spec.
spec.archon 0 files
class diagram
rendering diagram…
tour src/user/user.controller.ts 1 / 8
Generated files
preview click any file or use ◀ ▶
// loading…
Files are color-coded by tier. entity CRUD scaffolding per domain · platform auth, health, error envelopes, logging, correlation IDs, config validation · infra Dockerfile, docker-compose, Jenkinsfile, Frogbot, Terraform, SonarQube, NewRelic, husky hooks, migration SQL · config root package.json, tsconfig, ESLint, Prettier, .env.example, README, VS Code launch.

How this differs from a real run: in production, your AI agent calls Archon's MCP servers, which run schema validation, retrieve past architectural decisions via semantic search, apply your platform feature flags, manage workflow state, and stream changes back to your workspace with governance gates. This panel shows the shape and scope of that output, locally — so you can feel what Archon produces without installing anything.

What "describe a booking system" actually means.

Let's say you're building a booking platform — rooms, reservations, customers. You write this:

spec.archon
Customer {
  id: uuid primary
  email: string
  name: string
}

Room {
  id: uuid primary
  name: string
  capacity: int
  pricePerNight: decimal
}

Reservation {
  id: uuid primary
  customerId: Customer
  roomId: Room
  checkIn: date
  checkOut: date
  status: string
}

And Archon writes all of this, ready to run:

  • 3 NestJS modules wired into the root AppModule
  • 3 TypeORM entity classes with foreign-key columns and indexes
  • 3 service classes with full CRUD methods and repository injection
  • 3 REST controllers exposing GET / POST / PATCH / DELETE with typed routes
  • 6 DTO classes (Create + Update for each entity) with class-validator decorators
  • 3 PostgreSQL migration files with proper foreign keys and rollback
  • Swagger / OpenAPI decorators on every endpoint
  • JWT auth guard wired and ready to attach
  • Dockerfile, docker-compose.yml, package.json, tsconfig.json
  • Jenkinsfile with build, lint, test, and deploy stages
  • NGINX reverse-proxy config, environment variable validation
  • Rate limiting, CORS, security headers, error handler, logger

That's roughly 47 files. From 22 lines of spec. The next time you change one field, only the affected files re-generate — your manual code in between is preserved.

Because we're not paying an LLM to write your boilerplate.

Other AI code-gen tools call a large language model for every file they produce. If your project has 47 files, that's 47 prompts, 47 round-trips, and 47 chances for the model to hallucinate. You pay for the tokens. You pay again when it gets one wrong and you re-prompt. You pay forever, every time you regenerate.

Archon doesn't call an LLM at generation time. The actual code is produced by the Archon Template Engine — a deterministic compiler we built specifically to translate a validated spec into production-grade TypeScript. It runs locally, on your machine, in milliseconds. The only AI step is optional and lives in front of the spec (helping you draft it), not behind it.

Token cost to generate a 50-file backend
Vibe-coding with an LLM≈ $4–8 per attempt
Cursor / Copilot subscription$20/mo × everyone
Archon templates$0.00
Cost to regenerate after adding 1 field
LLM agent (full re-prompt)≈ $4–8 again
Boilerplatemanual edits, ~30 min
Archon (incremental)$0.00, < 1 second
Bottom line The cost of generation is not the cost of inference. Archon's generation step is essentially free because the expensive part — designing the templates — happened once, by us. You inherit it forever.

Because there's no model to wait for.

These numbers are pulled from the live benchmarks page, last measured on 2026-05-15. They are not marketing claims — they're reproducible by anyone who clones the repo.

Spec compilation (200-entity enterprise spec)
Average0.38 ms
Throughput520,000 entities/sec
Sourcebenchmark.ts → B1
Materializing 50 files to disk
Total wall-clock≈ 4 ms
Throughput12,500 ops/sec
Sourcebenchmark.ts → B4
Drift scan over a 10,000-file workspace
Total scan time2 ms
ResultLinear, predictable
Sourcebenchmark-scaling.ts → B5
Compared to an LLM agent
LLM per file2–8 sec network round-trip
LLM for 50 files≈ 2–6 minutes
Archon for 50 files≈ 4 ms (≈ 30,000× faster)

Because templates can be tested. Hallucinations can't.

An LLM produces a different file every time you ask. You can't write a unit test against "what the model felt like writing this morning." A template, on the other hand, is just code. We run a real ESLint pass and a real TypeScript compile against the actual output of every Archon release.

TypeScript compiler pass rate
Archon generated code94 %
Generic LLM scaffold (est.)~55 %
What this meansThe output type-checks before you touch it
ESLint clean rate
Archon generated code100 %
Generic LLM scaffold (est.)~70 %
What this meansNo phantom imports, no unused vars
Architectural drift over 100 spec mutations
Archon0 % drift
Generic LLM scaffold82 % drifted
What this meansFiles stay in sync with the spec, always
Manual code preservation
Marked manual blocks100 % preserved
Re-generation overwritesNever
What this meansYour business logic survives every regen

What happens if Archon disappears tomorrow?

Nothing breaks. Here's exactly why — no marketing language, just facts:

1
The generated code has no runtime dependency on Archon.

What you ship to production is plain NestJS + TypeScript + PostgreSQL. Open package.json — Archon is not in it. There's no SDK, no client library, no required service call. The code that runs in your container has never heard of us.

2
You can delete the .archon/ directory at any time.

That folder holds the spec, the state manifest, and the lineage data. Delete it and you have a clean NestJS repo with no trace of Archon. Your git history still works. Your tests still pass. The only thing you lose is the ability to re-generate from the spec — which is fine, because the code is already there.

3
The CLI is open-source and self-hostable.

The entire Archon engine — parser, validator, generator, materializer — is published under archonspecs on npm and the source is on GitHub. If our hosted service vanishes, you can keep generating locally forever. Fork it. Change templates. Make it yours.

4
What goes in and what comes out — both belong to you.

The spec you write is yours. The TypeScript we produce is yours — plain code in your repo, under your git, with no Archon symbols inside it. Between them sits the Archon Template Engine, the compiler we've spent years sharpening so a 22-line spec becomes 47 working files in milliseconds. The inputs are open. The outputs are yours forever. The craft in the middle is ours — and it's why this works at all.

5
The spec format is open and documented.

The contract you write against is published JSON Schema (ArchitectureContract.schema.json) — public, versioned, and stable. You can read it, validate against it, and tool around it. If one day you want to build something on top of Archon-format specs, the door is wide open.

🪶 The principle

The cost of leaving Archon should always be lower than the cost of staying for the wrong reasons. If one day you outgrow it, hate it, or just want to write code by hand again — you don't owe us a thing. You walk away with a clean codebase, full git history, and zero unwinding to do.

How Archon compares to the alternatives.

An honest table. Where the alternative is better at something, we say so.

Archon Specs Boilerplate LLM agent Agency
Setup time ~1 min ~10 min ~30 min ~2 weeks
Cost per project free CLI / cheap hosted free–$200 one-time $20/mo + tokens €30k+
Deterministic output yes — same spec → same code yes no depends on the dev
Regenerate safely after spec change yes, incremental + drift-aware no, manual merge no, prompt drift only with another invoice
Code quality (TSC + lint clean) 94 % / 100 % varies wildly ~55 % / ~70 % usually high
Runtime dependency on the tool none none none none
You can leave at any time yes, code is plain NestJS yes yes yes — at hand-over
Good for: prototyping excellent okay excellent overkill
Good for: long-lived production excellent decays fast drifts fast excellent

Connect Archon to your AI agent. World-class standard install.

Three steps, once. After that, Archon lives inside the AI agent you already use — no new editor, no new chat window, no context-switching.

works with any MCP-capable agent: Claude Desktop Claude Code Cursor Antigravity OpenClaw Windsurf VS Code (Cline / Continue) Zed + anything that speaks MCP
1

Install the Archon CLI bridge — one line

The CLI is a tiny stdio ↔ SSE proxy that lets any MCP-capable agent talk to the Archon remote gateway. Installing it globally exposes the archonspecs command anywhere on your machine.

terminal
npm install -g archonspecs

Already installed? Skip ahead. Want to verify? archonspecs --version.

2

Get your API token from the dashboard

Sign in at archonspecs.dev and generate a token from the dashboard. Tokens are scoped, revocable, and tied to your account — keep yours private. You'll paste it into the MCP config in the next step.

3

Add Archon to your agent's MCP config

Drop the snippet below into your agent's MCP configuration and replace <YOUR_TOKEN> with the token from step 2. Same JSON, every client. Whether it's claude_desktop_config.json, Cursor's settings, Antigravity's MCP panel, OpenClaw's config — the snippet is identical. World-class standard, no custom wrappers.

claude_desktop_config.json  ·  cursor settings  ·  any MCP client
{
  "mcpServers": {
    "archonspecs-mcp": {
      "command": "archonspecs",
      "args": [
        "https://archonspecs.dev/mcp/sse?apiKey=<YOUR_TOKEN>"
      ]
    }
  }
}

The token travels inside the SSE URL — the bridge keeps it local; only the remote gateway ever sees it. Restart your agent and Archon's ~40 tools appear in the tool drawer.

Open your agent. Describe what you want.

That's it. You don't run a CLI. You don't open Archon's UI. You talk to the AI agent you already use, the way you already talk to it:

"Design me a booking platform with rooms, reservations, and customer profiles. Use JWT auth, PostgreSQL, and a worker queue for email confirmations."

The Analyst captures the intent. The Architect draws the diagram. You iterate. The Tech Lead validates and plans. You approve. The Orchestrator ships the code. The Developer guards against drift. That whole five-phase loop happens inside the AI agent you already use.

The full MCP reference and tool catalog are in the documentation. The reproducible benchmark numbers are on the benchmarks page. The source is on GitHub.

The questions people actually ask.

Is the generated code production-ready or "just a scaffold"?

Production-ready. The templates produce code with proper error handling, validation, security headers, rate limiting, structured logging, and JWT auth wired by default. We use the same templates for our own production services. Where it stops is your business logic — Archon doesn't pretend to know what your app actually does.

What if I need a framework other than NestJS?

Today, NestJS + PostgreSQL is the only supported stack. Templates for Express + Prisma and Fastify + MongoDB are on the roadmap. The architecture supports it — it's just template work.

Can I edit the generated code by hand?

Yes, and it survives re-generation. Mark a block with the @ArchonManual decorator and Archon will preserve its contents across every future archon generate run. It uses semantic hashing to detect manual edits separately from drift.

What does Archon look at to figure out what changed?

A state manifest — .archon/state.json — stores a SHA-256 hash of every file Archon wrote, plus the spec fingerprint that produced it. On the next generation, the ChangePlanner diffs the new spec against the manifest, and only the affected files are touched. Nothing else moves.

Do you call an LLM during generation?

No. The optional AI features (spec drafting helpers, design review) happen before generation, never during. The code-producing path is 100 % deterministic templates.

Why is this open source?

Because trust requires it. A code-gen tool you can't read is a code-gen tool you can't trust. The CLI, the templates, the schemas — all of it is on GitHub. Read it. Fork it. Send a PR.

What's the catch?

You have to write the spec. Archon doesn't read your mind, doesn't scrape your Figma, doesn't guess what tables you need. The investment moves upstream — from typing code to thinking clearly about your domain. If that's not the trade-off you want, Archon won't feel worth it.

Still on the fence? Open the benchmarks page — every number on this guide is reproducible.