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 & Start Talking

First run is conversational-first: Archon inspects the folder, loads governance, checks whether BYOK keys exist locally, and drops you into chat without a required platform login.

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.

v3.0.1: Local-first chat startup, BYOK-only AI path, local usage/privacy, filesystem skills, continuity handoff, and safer parallel local execution.

Smart Onboarding: Three Scenarios

After startup, ArchonDev reads the folder 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 local 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 BYOK Journey Highlights

  • archon mode and archon config ai keep setup local and simple.
  • archon config ai runs guided key setup with optional low-cost Gemini Flash helper prompts.
  • • All AI features run only with user-provided provider keys.
  • • Model routing and preferences are configurable in settings for planning/reasoning/execution tiers.
  • • If no key is configured, CLI provides direct recovery to BYOK setup commands.
  • • 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 config aiGuided BYOK setup and key rotation flow
archon usageLocal usage by period and model
archon keys add <provider>Add API key (BYOK)
archon preferencesSettings menu
archon modeChoose local governance mode or BYOK AI mode
archon index search <query>Local 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.

Context-Aware Intelligence

Instead of requiring slash commands, ArchonDev detects what you're doing and proactively offers help. The AI reads context — file types, error output, milestones, scope changes — and presents relevant options with a skip choice.

Context DetectedWhat You Get
Bug / error / stack traceSystematic debugging protocol
Frontend file changesDesign review + AI slop check
Feature complete / pre-commitFix-first review + ship readiness
New project / empty directoryStrategy questions before coding
Scope change mid-featureScope review (4 modes)
Pre-deploy / publish / launchA11y + SEO/GEO + ship readiness
Milestone reachedProgress reflection
Complex multi-file changeSelf-regulation check-in

Every trigger includes a skip option. The AI never forces a capability — it just makes sure you know what's available.

Fix-First Code Review

Instead of listing issues for you to fix, ArchonDev auto-fixes mechanical problems and only asks about genuinely ambiguous ones.

AUTO-FIX: Unused imports, formatting issues, missing semicolons, simple type errors, console.log in production, empty catch blocks.

ASK FIRST: Ambiguous naming, logic that might be intentional, performance trade-offs, API contract changes.

BLOCK: Security vulnerabilities, architecture violations, data loss risks, broken accessibility.

Output: [N] auto-fixed | [N] need your input | [N] blockers

AI Slop Detection

AI-generated designs have recognizable patterns. ArchonDev checks frontend code against a 10-item blacklist and scores A through F.

#Anti-Pattern
1Purple/blue gradient hero sections
23-column icon grid layouts
3Uniform border radius on everything
4Generic stock illustrations
5Emoji used as visual design elements
6Drop shadow on every element
7All text center-aligned
8Placeholder-quality copy
9Testimonial cards with stock avatars
10Cookie-cutter pricing tables

Grading: A (no patterns, intentional design) through F (7+ patterns, obvious AI slop). Score C or below triggers a flag.

Systematic Debugging

When a bug is detected, the AI follows a structured protocol instead of guessing at fixes.

Phase 1 — Root Cause Investigation: Reproduce, collect evidence, trace data flow, state the root cause. No fixes during this phase.

Phase 2 — Pattern Analysis: Check against 6 common bug patterns (state mutation, race conditions, off-by-one, type mismatch, stale reference, environment delta).

Phase 3 — Hypothesis Testing: Form hypothesis, predict outcome, apply minimal fix, verify. 3-strike rule: after 3 failed attempts, stop and ask for help.

Phase 4 — Regression Prevention: Write a regression test that fails without the fix. Check for sibling bugs elsewhere in the codebase.

Ship Readiness Dashboard

Before deploying, see a dashboard of what's been checked and what's missing.

Ship Readiness Dashboard
========================
[x] Architecture review — no violations
[x] Dependency check — verified safe
[x] Code review — 3 auto-fixed, 0 blockers
[x] Tests — all passing
[ ] Design review — NOT RUN
[x] Accessibility — WCAG 2.2 AA compliant

Ready to ship: NO — Design review pending

Required checks: architecture, dependencies, code review, tests. Conditional: design review (if frontend), accessibility (if web), SEO/GEO (if public), security (if API/auth).

Scope Management

When scope changes mid-feature, the AI detects it and offers four options:

EXPANDAdd all new requirements to the current task
SELECTIVECherry-pick: add some items, defer others
HOLDKeep original scope, log new items for next task
REDUCECut to minimum viable — ship the smallest useful version

The AI recommends based on your project posture: prototype favors EXPAND or REDUCE; production favors HOLD or SELECTIVE.

Self-Regulation Guardrails

Hard limits that prevent the AI from going off the rails during complex tasks.

ThresholdAction
>5 files modifiedPause — present summary and get approval
>15 consecutive changesStop — checkpoint summary, wait for go-ahead
>3 failed fix attemptsStop — present what was learned, ask for guidance
>30 lines in one fixPause — explain why the fix is this large
Unplanned file changeAnnounce — explain why scope expanded

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

Retired Remote Paths

Remote account, GitHub, cloud execution, saved-session, Stripe credits, and Supabase usage paths are retired. Hidden compatibility commands print a retirement message instead of calling Archon-managed Supabase or Fly services.

archon loginRetired platform auth path
archon github connectRetired GitHub integration path
archon execute ATOM-001 --cloudRetired cloud execution path
archon session save [name]Retired saved-session path

Current recommendation:

  • Local governance mode: governance/workflow only, no built-in AI calls
  • BYOK mode: local execution with your provider keys
  • Remote paths: retired for current Free/BYOK usage

Semantic Indexing

Semantic search across your codebase. The primary path is now local-first.

Local Indexing

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

Retired Remote Indexing

Remote indexing through Archon-managed infrastructure is retired. Use the local index commands below; cloud index flags print retirement guidance instead of calling Supabase or Fly.

archon index initInitialize local index
archon index updateIndex changed files locally
archon index search <query>Semantic search
archon index statusShow index stats
archon index clearClear index

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 (Disabled)

archon parallel cloud ATOM-001 ATOM-002Legacy command path (disabled in free/BYOK mode)

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-skills/, 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

Modes & BYOK

FREE

$0

  • • Download/governance workflow
  • • No built-in AI model calls
  • • Works alongside your existing IDE tools

BYOK

$0 to ArchonDev

  • • Use your own API keys
  • • All models available
  • • Archon never bills token usage

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 with your own provider keys.

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.

"No API key configured"

Run archon config ai or archon keys add <provider> to enable BYOK execution.

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

Run archon init in your project root.

Cloud execution not starting

Cloud execution is currently disabled in free/BYOK mode. Use local execution with archon execute <atom-id>.

Need Help?

Email us at techsupport@JumpingAhead.com