Documentation Index
Fetch the complete documentation index at: https://archonspecs.dev/llms.txt
Use this file to discover all available pages before exploring further.
Welcome to ArchonSpecs
Choose the right Archon starting point, capability, and configuration specs for your workflow.
ArchonSpecs is an AI-native software development platform that works everywhere you do. Use this page to pick the right starting point, then drill into the capability and configuration docs that match your workflow.
Archon has crossed the boundary from a simple scaffold tool into a control-plane architecture. By integrating state lineage, reconciliation, and deterministic execution plans, we have transformed the developer experience from manual boilerplate to governed system evolution.
Start with your surface
Archon CLI
Run Archon in your terminal and get productive in minutes.
Desktop App
Download the Archon Desktop App and connect to your local machine.
Explore core capabilities
UML Modeling
Visualize architecture with Mermaid and transform diagrams into code.
Sharding Process
Compile distributed domain shards into a unified, validated DesignSpec.
Materialization
Seamlessly push intent from agents and specs directly into your project.
Incremental Compiler
Evolve your codebase safely with deterministic materialization.
Configure and extend
Settings
Control models, tools, permissions, and defaults.
AGENTS.md
Teach Archon your repo conventions and project context.
Design Specs
Maintain a deterministic source of truth for your system.
MCP
Connect external tools and services with Model Context Protocol.
Guides, reference, and support
Governed Architecture
Archon is built on a three-layer governed architecture that ensures every line of code generated is traceable, compliant, and architecturally sound.
The Conceptual Shift
In traditional AI coding, the LLM carries the architecture in its context window. In Archon, the Control Plane carries the architecture, and the LLM carries only the intent. State is internal and canonical.
The Mental Model
Archon converges the best practices of modern infrastructure and build systems into a single architectural platform:
The Materialized Stack
Archon doesn't just generate boilerplate; it materializes a production-grade NestJS Enterprise Ecosystem. Every project comes pre-configured with a battle-tested technical stack:
Remote Layer
The Gateway handles high-speed SSE streaming, S3 artifact persistence, and secure worker pool orchestration.
Core Archon
The Governance Engine enforces Requirement and Architecture contracts using an incremental compiler.
UML Engine
The Visual DSL Layer parses ASCII diagrams into structured IR for spec generation and Mermaid visualization.
1. Remote Layer (SSE & S3)
The Remote Layer acts as the orchestrator for all architectural missions. It manages the lifecycle of a materialization pass and provides the infrastructure for high-scale generation.
- SSE Stream: A persistent real-time channel that pushes file-system mutations directly to the CLI.
- S3 Artifacts: Stores immutable snapshots of compiled project ZIPs and specifications.
- Worker Pool: A pool of specialized MCP workers that execute heavy-duty compilation and validation tasks in isolation.
2. Core Archon (Governance)
This is the "Brain" of the system. It ensures that the generated code adheres to the Design Specification v1.
3. UML Layer (Parsing & Visuals)
The UML Layer translates human-readable ASCII diagrams into machine-readable DiagramIR.
ASCII Text ➔ DiagramIR ➔ DesignSpec ➔ Materialization
Key tools include uml_parse_ascii for parsing and archon_generate_diagram for
rendering high-fidelity Mermaid class and sequence diagrams.
| Contract | Responsibility |
|---|---|
| Requirement Contract | Defines business rules, actors, and events in manifest.json. |
| Architecture Contract | Defines technical boundaries, domain shards, and cross-cutting concerns. |
| Incremental Compiler | Reconciles architectural drift and materializes only what has changed. |
CLI Reference
The Archon CLI (`archonspecs`) is a high-performance bridge that connects your local development environment to the Archon Governance remote. It handles secure tool proxying, local shard management, and real-time file-system mutations.
Installation
Install the Archon CLI globally via npm to use it across all your projects.
npm install -g archonspecs
Or run it directly using npx:
npx archonspecs -token <YOUR_SECRET_TOKEN>
Archon Desktop
The ultimate command center for architectural engineering. Archon Desktop provides a visual control plane that goes beyond the limitations of traditional IDEs.
Full Observability
Monitor your materialization streams, worker health, and architectural drift in real-time through a dedicated dashboard.
Local Model Support
Connect directly to local LLMs (Ollama, LM Studio) for 100% private, air-gapped architecture compilation.
Project Control
Take control of your projects from a unified interface. Visualize shards, manage contracts, and trigger materialization without ever touching a terminal.
MCP Proxy Mode
By default, running archonspecs starts the MCP Proxy. This mode bridges
standard Model
Context Protocol (stdio) communication from IDEs like Claude Desktop to the Archon SSE backend.
Local Tool Injection
The proxy automatically augments the remote toolset with local-only capabilities that have direct access to your file system:
| Local Tool | Description |
|---|---|
archon_read_local_lineage |
Reads the immutable project identity and revision from .archon/lineage.json. |
archon_verify_local |
Ensures local code integrity by comparing the disk state against the lineage manifest. |
archon_create_requirement_contract |
Generates a local Requirement Contract (manifest.json) for governed projects. |
archon_compile_spec_shards |
Compiles individual domain shards into a unified DesignSpec.json. |
archon_sync_via_artifact |
Smart-merges a remote ZIP artifact into the workspace while preserving manual code blocks. |
Even in Proxy mode, the CLI maintains a background connection to the Archon stream. This allows the remote governance engine to "push" file changes (Create/Update/Delete) directly to your local workspace as the AI agent works.
Core Runtime Layers
Archon's reliability stems from a multi-layered runtime that provides a deterministic and transactional environment for AI agents.
1. VFS (Virtual File System)
Your transactional memory workspace. Stages changes in RAM for atomic commits, rollbacks, and dry-runs.
2. AST Layer (ts-morph)
Your semantic code manipulation engine. Performs intelligent code injection and patching instead of simple text replacement.
3. CLA (Capsule Linking Architecture)
Your orchestration model. Splits monolithic architectures into semantic capsules for modular execution.
4. Execution Plan Protocol
Your synchronization protocol. Transfers intent instead of files, providing replay protection and state lineage.
5. Drift Detection & Reconciliation
Your state governance layer. Detects manual mutations and enforces ownership to prevent "split-brain" codebases.
6. Fingerprinting & Hashing
Your cryptographic identity layer. Verifies canonical state and ensures an immutable chain-of-custody.
7. Incremental Mutation Engine
Your scoped evolution engine. Patches specific entities and fields without loading the entire project spec.
8. Layered Validation System
Your contract enforcement engine. Tiers validation from fragments to full-system graphs.
9. Materializer
Your local authority boundary. Enforces convergence, path safety, and syntax validation at the disk edge.
10. MCP Control Plane
Your orchestration API layer. Coordinates tool contracts and distributed semantics between remote and local.
UML Modeling & Visualization
In the early days of AI coding, developers were forced to explain complex architectures through long, ambiguous prompts. We changed that by introducing the UML Visual DSL.
By parsing simple ASCII diagrams into high-fidelity Mermaid visualizations, Archon gives
you a bird's-eye view of your system before a single line of code is written. This isn't just about pretty
pictures—it's about creating a machine-readable DiagramIR that powers the rest of the
compilation pipeline.
{
"entities": [
{ "name": "Order", "fields": [...] }
],
"services": [
{ "name": "OrderService", "operations": [...] }
]
}
This journey from Visualization to Validation is where the magic happens. Once your diagrams are structurally sound, Archon takes full control of the materialization pipeline—ensuring that every service, entity, and relationship matches your design with zero drift.
Materialization Engine
The bridge between intent and reality. Materialization is not a one-time generation; it is a persistent stream of architectural decisions flowing directly into your file system.
Whether it's a new entity requested by an agent or a structural change in your JSON spec, the Materialization Engine calculates the exact delta and applies it via a secure SSE channel.
AGENTS.md, Rules, Context] ME --> O2[Full Specs
Shards, DesignSpec.json] ME --> O3[Project Code
Entities, Services, DTOs] style ME fill:#ff5d01,stroke:#fff,stroke-width:2px,color:#fff style O1 fill:#1a1a1a,stroke:#ff5d01,stroke-width:1px style O2 fill:#1a1a1a,stroke:#ff5d01,stroke-width:1px style O3 fill:#1a1a1a,stroke:#ff5d01,stroke-width:1px
The Three Levels of Materialization
| Level | Target | Outcome |
|---|---|---|
| 1. Workspace | Bootstrapping | Initializes AGENTS.md, IDE rules, and project context. |
| 2. Specification | System Design | Materializes domain shards and the compiled source-of-truth. |
| 3. Evolution | Codebase | Real-time injection of features, entities, and services. |
archonspecs materialize <projectId> --key <authKey>
Incremental Compiler
Codebases should evolve, not rot. The Incremental Compiler is designed for the long-term
health of your project. Unlike traditional generators that overwrite your work, our compiler is
region-aware—preserving your manual customizations (marked with
// @archon-manual) while updating the governed structural code around them.
From O(N) to O(C)
In legacy systems, every small change triggered a "recompile the universe" event. At enterprise scale (100+ domains, 2,000+ entities), this monolithic approach collapses. Archon V2 recompiles only what changed and its immediate affected dependencies.
O(N) ➔ All Specs ➔ Full Parse ➔ Full Validate ➔ Full Compile
O(C) ➔ Changed Shards ➔ Affected Deps ➔ Cached Partials ➔ Parallel Merge
1. Architecture Sharding
Instead of a single DesignSpec.json, the architecture is split into independent compilation
units (Shards) stored in spec/domains/.
2. Deterministic Fingerprinting
Every shard is normalized and hashed before compilation. The compiler uses these fingerprints to instantly detect if a shard needs processing without parsing the entire tree.
3. DAG-Based Dependency Resolution
Shards declare their dependencies explicitly. Archon builds a Directed Acyclic Graph (DAG) to guarantee a deterministic compilation order and detect circular dependencies.
4. Transitive Invalidation
If the Identity shard changes, Archon automatically invalidates downstream shards
(Billing, Invoices). This ensures that architectural changes propagate safely and
the final system remains consistent.
Parallel Compilation
Because shards are isolated, non-dependent branches (like Notifications and Analytics) compile simultaneously, drastically reducing latency for large swarms.
Validation Gates
Before entering the DAG, every shard passes through a strict validation gate that checks schema correctness, naming rules, and architectural invariants.
The Conceptual Shift
V1 treated architecture as a document.
V2 treats architecture as a compilable state graph.
Configuration
Archon discovers configuration in a specific order: 1. Command-line flags, 2. Environment variables, 3.
.env files, and 4. .archon/config.json.
Environment Variables
| Variable | Description |
|---|---|
ARCHON_URL |
The target Archon server URL (Default: http://localhost:3001/mcp/sse). |
ARCHON_TOKEN |
Authentication Bearer token for secure governance remotes. |
Core Project Files
.archon/lineage.json: The "DNA" of your project. Tracks identity and architectural version..archon/sync.lock: Prevents concurrent materialization passes from corrupting the workspace..archon/config.json: Local persistent settings for the CLI bridge.
AI Agents & Workspace
Archon doesn't just generate code; it materializes a complete AI-native workspace. It provides your agents with the instructional foundation and context they need to operate autonomously.
What we materialize
When you initialize a project, Archon materializes a "System of Record" into your workspace root:
| File / Directory | Purpose |
|---|---|
AGENTS.md |
The Master Instruction Set. Contains your repo conventions, workflow rules, and architectural mandates. |
CONTEXT.md |
High-level project summary and mental model for new agents joining the mission. |
.cursorrules / .clinerules |
IDE-specific configuration that enforces Archon governance rules in real-time as the agent works. |
spec/ |
The source of truth for your architecture. Contains the manifest.json and domain
shards. |
*.schema.json |
JSON Schemas that ensure all architectural edits are valid and compliant. |
By materializing these files, Archon transforms a standard repository into a governed environment where AI agents can safely plan, edit, and verify code without human hand-holding.
MCP Installation
Connect Archon directly to your AI agents (like Claude Desktop) using the Model Context Protocol. This allows your agent to perform architectural analysis, validation, and materialization directly within your workspace.
Claude Desktop Configuration
Add the following configuration to your claude_desktop_config.json file:
{
"mcpServers": {
"archonspecs-mcp": {
"command": "archonspecs",
"args": [
"https://archonspecs.dev/mcp/sse?apiKey=<TOKEN>"
]
}
}
}
Ensure the paths to node and archon-mcp-client are correct for your system. You
can find them by running which node and which archonspecs in your terminal.
Prerequisites
- Node.js v18+: Required to run the MCP client bridge.
- Archon API Key: A valid
sk_litoken from your Archon dashboard. - Global CLI: Ensure you have installed the CLI via
npm install -g archon-mcp-client.
Future Roadmap
Archon is evolving from a code generator into a full-scale Architectural Operating System. Our mission is to eliminate the gap between high-level intent and production-grade reality.