Skip to main content
Archon Dev

Documentation

Everything you need to captain your AI workflow and stop regressions before they board your codebase.

Quick Start

1

Install

npm install -g archondev
2

Run & Login

First run is conversational-first: login, pick tier (FREE/BYOK/Credits), state your goal in plain English, and continue with guided next actions.

cd your-project && archon
3

Plan and Execute

archon plan "Add user authentication"

Plans now require design approval before execution. Content-only requests (stories, lessons, outlines, visuals) use lightweight planning so momentum stays high.

v2.19.4: New command discipline: design approval gate, stronger plan structure, root-cause bug intake, and staged AI review (spec first, then quality).

Smart Onboarding: Three Scenarios

After login and tier selection, ArchonDev reads the waters and routes you to the right workflow without guesswork.

New Project

Empty folder -> guided interview that generates `.archon/active/architecture.md` and sets your governance baseline.

Adapt Existing

Existing codebase -> review-first onboarding with governance adapted to your live structure.

Continue Session

Returning session -> restores context, surfaces last activity, and resumes pending atoms cleanly.

User Journey Governance (Lite + CLI)

ArchonDev is optimized as a full journey system, not just command docs. Both Lite and CLI flows are designed to reduce decision fatigue, prevent dead ends, and move users from setup to confident execution quickly.

Journey Sequence

  1. Anchor trigger, job, and desired outcome.
  2. Recommend the best path (continue, review, setup).
  3. Confirm intent and risks before implementation.
  4. Recover gracefully from ambiguity or failure.
  5. Close with a clear outcome and next action.

Why It Converts Better

  • • Faster first success moment for new users
  • • Clearer progress narrative in every session
  • • Better trust through transparent recovery behavior
  • • Lower cognitive load through explicit recommendations

CLI Billing Journey Highlights

  • • Tier selection: Free, BYOK, or Credits at onboarding and anytime via upgrade/settings.
  • • Credits preflight shows estimated cost and current balance before heavy operations.
  • • Guided payment/top-up flow for Credits users with browser checkout launch.
  • • Model routing and preferences in settings for planning/reasoning/execution tiers.
  • • Insufficient-funds path prompts immediate recovery: top up, switch to BYOK, or cancel, then auto re-checks before continuing.
  • • Major workflow checkpoints end with clear next-best-action suggestions.

Quality Level / Posture

Set how strict your AI should be. Run lean in prototypes and lock discipline in production and enterprise.

Posture When to Use AI Behavior
prototype Learning, experimenting Fast iteration, minimal governance
production Real users (default) Secure defaults, basic monitoring
enterprise Mission-critical, regulated Full governance: audit logging, RBAC, SLOs

5-Phase Interview System

A conversational interview that guides you through defining your project, then generates a formal specification.

💡

Discovery

Vision & users

Features

MVP scope

🔧

Technical

Tech stack

🎨

Branding

Name & style

Review

Validate & freeze

archon interviewStart or resume interview
archon interview showDisplay current Constitution
archon interview validateCheck for completeness
archon interview export [file]Export to JSON

✨ Challenge Mode

During review, the AI challenges scope creep: too many features, high complexity, vague requirements. Aims for ~20% feature reduction to keep MVPs lean.

Project Constitution

The Constitution is a formal, immutable specification generated from the interview. It's the contract between you and the AI for what gets built.

What's Inside

  • Discovery: Elevator pitch, target user, core problem
  • MVP Features: Features with user stories & acceptance criteria
  • Tech Stack: Framework, database, hosting, auth
  • Branding: Project name, tagline, colors
  • Complexity: Tier rating, estimated hours, costs

Complexity Tiers

  • SIMPLE — ≤10 routes, ≤5 tables
  • MODERATE — ≤25 routes, ≤10 tables
  • COMPLEX — ≤50 routes, ≤20 tables
  • ENTERPRISE — 50+ routes, 20+ tables

Generate prd.json from Constitution

Once frozen, transform your Constitution into executable atoms:

archon generateGenerate prd.json from frozen Constitution
archon generate --include-post-mvpInclude POST_MVP features
archon generate --dry-runPreview without writing
archon generate --output path.jsonCustom output path

CLI Reference

Use these commands to keep execution on course: approve design, execute with gates, and review in the right order.

CommandDescription
archonInteractive mode
archon initInitialize in your project
archon interview5-phase project interview
archon generateGenerate prd.json from Constitution
archon plan <description>Create a work item with AI planning
archon execute <atom-id>Execute with quality gates
archon listList all work items
archon show <atom-id>Show details
archon bug report <title>Bug report with RCA
archon review initInitialize code review
archon creditsView credit balance
archon usageUsage by period and model (BYOK/Credits)
archon keys add <provider>Add API key (BYOK)
archon preferencesSettings menu
archon github connectConnect GitHub for cloud execution
archon index search <query>Semantic code search

.archon/active/architecture.md Format

Your source of truth for governance. Uses YAML frontmatter.

---
name: My Project
version: "1.0"

boundaries:
  - path: "src/db/**"
    protection: STRICT
    description: "Database layer"

invariants:
  - id: INV-001
    type: NO_DIRECT_IMPORT
    path: "@supabase/supabase-js"
    enforcement: BLOCKING

protectedPaths:
  - pattern: "src/db/schema.ts"
    reason: "Schema changes require migration"
---

DEPENDENCIES.md

Track file-level dependencies to prevent regressions.

archon deps listView dependency rules
archon deps addAdd a new rule
archon deps check --files <list>Check downstream impacts
archon deps graphGenerate Mermaid diagram

Code Review

AI-powered code review for any codebase. Non-destructive analysis.

archon review initCreate SQLite database
archon review analyzeScan project
archon review run --allAI reviews all files
archon review planGenerate fix plan
archon review exportExport report

Task Extraction Protocol

AI confirms all items from multi-part requests before starting. Nothing gets forgotten.

When you say "fix the login bug, add dark mode, and update the docs", the AI will list all 3 tasks and confirm before proceeding.

Accessibility Check

If Archon detects a web project, it will prompt you to run A11y/SEO/GEO checks and remember your preference in .archon/config.yaml.

WCAG 2.2 AA compliance checks with legal liability warnings.

archon a11y checkRun accessibility audit
archon a11y fixAuto-fix common issues
archon a11y badgeAdd compliance badge
archon a11y pre-deployPre-deployment check

SEO Optimization

archon seo checkRun SEO meta tag audit
archon seo fixApply recommended fixes

GEO for AI Search

Generative Engine Optimization — get your product cited by AI assistants.

archon geo identityGenerate brand identity phrases
archon geo schemaGenerate JSON-LD schemas

GitHub Integration

Connect your GitHub account for cloud execution with automatic PR creation.

archon github connectLink your GitHub account
archon github statusCheck connection status
archon github disconnectUnlink account

How it works:

  1. Run archon github connect to authorize ArchonDev
  2. Cloud agents can now clone your repos and push changes
  3. Completed work is submitted as a Pull Request

Cloud Agents

Run AI agents in the cloud. Close your laptop while work continues.

archon execute ATOM-001 --cloudExecute in cloud
archon execute ATOM-001 --cloud --watchExecute and stream logs
archon cloud statusList cloud executions
archon cloud cancel [id]Cancel execution
archon cloud logs [id]View execution logs

Requirements: Credits tier + connect GitHub first with archon github connect

Billing:

  • Credits Users: Token cost + 10% fee + compute
  • BYOK/Free: Cloud execution not available (local-only)

Session Management

Save your session and continue on another device.

archon session save [name]Save current session
archon session listList saved sessions
archon session resume [id]Resume a session
archon session syncSync to cloud

Semantic Indexing

Semantic search across your codebase. Local (free) or cloud options.

Local Indexing (Free with Ollama)

# Install Ollama first: https://ollama.ai
ollama pull nomic-embed-text
archon index init --local
archon index update
archon index search "authentication flow"

Cloud Indexing (pgvector)

Uses OpenAI embeddings stored in Supabase. Requires Supabase Pro plan.

archon index init --cloud
archon index update --cloud
archon index search "authentication flow" --cloud
archon index init [--local|--cloud]Initialize index
archon index update [--cloud]Index changed files
archon index search <query> [--cloud]Semantic search
archon index status [--cloud]Show index stats
archon index clear [--cloud]Clear index

Cloud Indexing Costs:

  • Storage: ~$0.01-0.30/month per project
  • Embeddings: ~$0.10-0.15/million tokens (only when indexing)
  • Queries: Free (uses existing Supabase compute)

Smart Model Routing

Automatically routes operations to the optimal AI model tier for cost optimization. Simple tasks use cheap/fast models; complex planning uses powerful models.

Model Tiers

Tier Operations Default Models Cost
PLANNING plan, init, design, architect_debate, interview, constitution Claude Opus, GPT-5.2, Gemini Pro $$$
REASONING review, validate, sentinel_check, analyze, geo, seo Claude Sonnet, GPT-5, Gemini Pro $$
EXECUTION execute, execute_atom, deps, a11y, format, cleanup Claude Haiku, GPT-4o Mini, Gemini Flash $

Configure Preferences

archon preferencesOpen preferences menu, select "Smart Routing"
--model <model-id>Override routing for a single command

💡 Cost Savings

Routing simple code execution to Haiku/Flash instead of Opus/GPT-5 can reduce costs by 80-95% with no quality loss for routine tasks.

Parallel Execution

Run multiple agents simultaneously using git worktrees with dependency-aware scheduling.

Dependency Scheduling

ArchonDev analyzes atom dependencies and file conflicts to schedule execution in parallel waves.

archon parallel scheduleShow execution schedule
archon parallel schedule --mermaidOutput dependency graph as Mermaid
archon parallel schedule --only-readyOnly READY atoms
archon parallel run-wavesExecute in dependency order
archon parallel run-waves --dry-runPreview without executing

Manual Parallel

archon execute --parallel ATOM-001 ATOM-002Execute in parallel
archon parallel statusShow status
archon parallel merge [atomId]Merge worktrees
archon parallel cleanRemove all worktrees

Parallel Cloud (Credits)

archon parallel cloud ATOM-001 ATOM-002Queue multiple atoms in the cloud

History & Revert

Each atom execution creates a git commit. Revert individual atoms without affecting other changes.

CLI Users

archon historyShow atom execution history
archon revert <atom-id>Revert a specific atom
archon revert <commit-hash>Revert by git commit hash
archon revertableList atoms that can be reverted

Lite Package Users

Say show atom history or revert atom to your AI. Uses git under the hood:

# List atom commits
git log --oneline | grep -E '\[(ATOM|US)-[0-9]+\]'

# Revert specific commit
git revert <commit-hash>

Eject

Remove all ArchonDev metadata, leaving a clean standalone codebase you fully own.

CLI Users

archon ejectRemove ArchonDev from project
archon eject --dry-runPreview what would be removed
archon eject --keep-architectureKeep .archon/active/architecture.md

Lite Package Users

Say eject archondev to your AI, or manually remove:

  • .archon/, archondev-scenarios/, AGENTS.md
  • • IDE rules: .cursorrules / .windsurfrules / CLAUDE.md / etc.

Keep: .archon/active/architecture.md (useful standalone), progress.txt (history)

Deploy

One-click deployment with automatic platform detection.

Supported: Fly.io, Vercel, Netlify, Railway, Render

archon deployAuto-detect and deploy
archon deploy --platform flyDeploy to specific platform
archon deploy --previewDeploy to staging
archon deploy --dry-runShow what would happen

Cleanup

Keep your workspace lean for optimal AI performance. Large files consume context.

archon cleanup checkAnalyze workspace for bloat
archon cleanup runExecute cleanup (archive old entries, clear cache)
archon cleanup auto enableEnable auto check on start

Thresholds:

  • progress.txt > 100KB — archive old entries to docs/archive/
  • .archon/ > 10MB — clear stale cache files
  • • Cache files > 7 days — auto-deleted on cleanup run

Working with Existing Projects

Add governance to projects created by other AI agents or manual coding.

# Step 1: Review existing code
archon review init
archon review analyze
archon review run --all

# Step 2: Set up governance
archon init --analyze

# Step 3: Fix issues
archon plan "fix critical issues from review"

VS Code Extension

Real-time architectural governance with quick-fix suggestions.

  • • Real-time violation detection in Problems panel
  • • Quick-fix suggestions (Ctrl+. / Cmd+.)
  • • Protected path warnings
  • • Boundary enforcement for cross-module imports

Installation: Download archondev-0.2.0.vsix from the downloads page, then Extensions → ... → Install from VSIX

Tiers & Billing

FREE

$0

  • • Ultra-cheap models only
  • • 10,000 atoms/month
  • • No credit card required

CREDITS

Pay-as-you-go

  • • All models available
  • • Unlimited atoms
  • • 10% service fee

BYOK

$0

  • • Use your own API keys
  • • All models available
  • • No service fee

BYOK Key Security

  • • Your API keys stay on your machine and are never uploaded to ArchonDev servers.
  • • Keys are encrypted at rest with AES-256-GCM in ~/.archon/keys.json.
  • • The key file is set to owner-only permissions (0600).
  • • BYOK runs locally; cloud execution is Credits-only.

If your device is compromised, an attacker could access local files. Treat API keys as sensitive secrets.

Troubleshooting

"Command not found: archon"

Ensure npm global bin is in your PATH. Run npm bin -g to check.

"Insufficient credits"

CLI now opens a guided recovery flow in-command: add credits now, switch to BYOK and add a key, or cancel safely. You can still run archon credits add manually anytime.

".archon/active/architecture.md not found"

Run archon init in your project root.

Cloud execution not starting

Ensure GitHub is connected: archon github status

Need Help?

Email us at techsupport@JumpingAhead.com