Created
May 4, 2026 22:53
-
-
Save limcheekin/42807d33979eb83ded9c47f2b025d82b to your computer and use it in GitHub Desktop.
Archon Repository Wiki — generated by GitNexus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Archon — Wiki</title> | |
| <script src="https://cdn.jsdelivr.net/npm/marked@11.0.0/marked.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js"></script> | |
| <style> | |
| *{margin:0;padding:0;box-sizing:border-box} | |
| :root{ | |
| --bg:#ffffff;--sidebar-bg:#f8f9fb;--border:#e5e7eb; | |
| --text:#1e293b;--text-muted:#64748b;--primary:#2563eb; | |
| --primary-soft:#eff6ff;--hover:#f1f5f9;--code-bg:#f1f5f9; | |
| --radius:8px;--shadow:0 1px 3px rgba(0,0,0,.08); | |
| } | |
| body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; | |
| line-height:1.65;color:var(--text);background:var(--bg)} | |
| .layout{display:flex;min-height:100vh} | |
| .sidebar{width:280px;background:var(--sidebar-bg);border-right:1px solid var(--border); | |
| position:fixed;top:0;left:0;bottom:0;overflow-y:auto;padding:24px 16px; | |
| display:flex;flex-direction:column;z-index:10} | |
| .content{margin-left:280px;flex:1;padding:48px 64px;max-width:960px} | |
| .sidebar-header{margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid var(--border)} | |
| .sidebar-title{font-size:16px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:8px} | |
| .sidebar-title svg{flex-shrink:0} | |
| .sidebar-meta{font-size:11px;color:var(--text-muted);margin-top:6px} | |
| .nav-section{margin-bottom:2px} | |
| .nav-item{display:block;padding:7px 12px;border-radius:var(--radius);cursor:pointer; | |
| font-size:13px;color:var(--text);text-decoration:none;transition:all .15s; | |
| white-space:nowrap;overflow:hidden;text-overflow:ellipsis} | |
| .nav-item:hover{background:var(--hover)} | |
| .nav-item.active{background:var(--primary-soft);color:var(--primary);font-weight:600} | |
| .nav-item.overview{font-weight:600;margin-bottom:4px} | |
| .nav-children{padding-left:14px;border-left:1px solid var(--border);margin-left:12px} | |
| .nav-group-label{font-size:11px;font-weight:600;color:var(--text-muted); | |
| text-transform:uppercase;letter-spacing:.5px;padding:12px 12px 4px;user-select:none} | |
| .sidebar-footer{margin-top:auto;padding-top:16px;border-top:1px solid var(--border); | |
| font-size:11px;color:var(--text-muted);text-align:center} | |
| .content h1{font-size:28px;font-weight:700;margin-bottom:8px;line-height:1.3} | |
| .content h2{font-size:22px;font-weight:600;margin:32px 0 12px;padding-bottom:6px;border-bottom:1px solid var(--border)} | |
| .content h3{font-size:17px;font-weight:600;margin:24px 0 8px} | |
| .content h4{font-size:15px;font-weight:600;margin:20px 0 6px} | |
| .content p{margin:12px 0} | |
| .content ul,.content ol{margin:12px 0 12px 24px} | |
| .content li{margin:4px 0} | |
| .content a{color:var(--primary);text-decoration:none} | |
| .content a:hover{text-decoration:underline} | |
| .content blockquote{border-left:3px solid var(--primary);padding:8px 16px;margin:16px 0; | |
| background:var(--primary-soft);border-radius:0 var(--radius) var(--radius) 0; | |
| color:var(--text-muted);font-size:14px} | |
| .content code{font-family:'SF Mono',Consolas,'Courier New',monospace;font-size:13px; | |
| background:var(--code-bg);padding:2px 6px;border-radius:4px} | |
| .content pre{background:#1e293b;color:#e2e8f0;border-radius:var(--radius);padding:16px; | |
| overflow-x:auto;margin:16px 0} | |
| .content pre code{background:none;padding:0;font-size:13px;line-height:1.6;color:inherit} | |
| .content table{border-collapse:collapse;width:100%;margin:16px 0} | |
| .content th,.content td{border:1px solid var(--border);padding:8px 12px;text-align:left;font-size:14px} | |
| .content th{background:var(--sidebar-bg);font-weight:600} | |
| .content img{max-width:100%;border-radius:var(--radius)} | |
| .content hr{border:none;border-top:1px solid var(--border);margin:32px 0} | |
| .content .mermaid{margin:20px 0;text-align:center} | |
| .menu-toggle{display:none;position:fixed;top:12px;left:12px;z-index:20; | |
| background:var(--bg);border:1px solid var(--border);border-radius:var(--radius); | |
| padding:8px 12px;cursor:pointer;font-size:18px;box-shadow:var(--shadow)} | |
| @media(max-width:768px){ | |
| .sidebar{transform:translateX(-100%);transition:transform .2s} | |
| .sidebar.open{transform:translateX(0);box-shadow:2px 0 12px rgba(0,0,0,.1)} | |
| .content{margin-left:0;padding:24px 20px;padding-top:56px} | |
| .menu-toggle{display:block} | |
| } | |
| .empty-state{text-align:center;padding:80px 20px;color:var(--text-muted)} | |
| .empty-state h2{font-size:20px;margin-bottom:8px;border:none} | |
| </style> | |
| </head> | |
| <body> | |
| <button class="menu-toggle" id="menu-toggle" aria-label="Toggle menu">☰</button> | |
| <div class="layout"> | |
| <nav class="sidebar" id="sidebar"> | |
| <div class="sidebar-header"> | |
| <div class="sidebar-title"> | |
| <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M2 3h6a4 4 0 014 4v14a3 3 0 00-3-3H2z"/><path d="M22 3h-6a4 4 0 00-4 4v14a3 3 0 013-3h7z"/></svg> | |
| Archon | |
| </div> | |
| <div class="sidebar-meta" id="meta-info"></div> | |
| </div> | |
| <div id="nav-tree"></div> | |
| <div class="sidebar-footer">Generated by GitNexus</div> | |
| </nav> | |
| <main class="content" id="content"> | |
| <div class="empty-state"><h2>Loading…</h2></div> | |
| </main> | |
| </div> | |
| <script> | |
| var PAGES = {"api-server-auth-service":"# API Server — auth-service\n\n# API Server — auth-service\n\nThe `auth-service` is a lightweight, standalone Node.js module designed to act as a security sidecar for the Caddy web server. It implements a cookie-based authentication flow using Caddy's `forward_auth` directive.\n\n## Overview\n\nThe service manages user sessions by issuing and verifying HMAC-signed cookies. It provides a built-in login UI, credential validation via `bcryptjs`, and protection against common web vulnerabilities like open redirects and timing attacks.\n\n```mermaid\ngraph TD\n Client[Client Request] --> Caddy{Caddy Server}\n Caddy -- forward_auth --> Auth[/verify]\n Auth -- 200 OK --> Caddy\n Auth -- 302 Redirect --> Login[/login]\n Caddy -- Proxy --> App[Backend Service]\n```\n\n## Configuration\n\nThe module requires several environment variables to function. It performs a validation check at startup to ensure credentials and secrets are provided and that the password hash is a valid bcrypt string.\n\n| Variable | Description | Default |\n| :--- | :--- | :--- |\n| `AUTH_PORT` | Port the service listens on. | `9000` |\n| `AUTH_USERNAME` | The single authorized username. | (Required) |\n| `AUTH_PASSWORD_HASH` | Bcrypt hash of the authorized password. | (Required) |\n| `COOKIE_SECRET` | Secret key used for HMAC signing. | (Required) |\n| `COOKIE_MAX_AGE` | Session duration in seconds. | `86400` |\n\n### Generating a Password Hash\nTo generate a compatible bcrypt hash for the `AUTH_PASSWORD_HASH` variable:\n```bash\ndocker compose --profile auth run --rm auth-service \\\n node -e \"require('bcryptjs').hash('YOUR_PASSWORD', 12).then(h => console.log(h))\"\n```\n\n## Core Endpoints\n\n### `GET /verify`\nThis is the primary integration point for Caddy. \n- **Success**: If a valid signed cookie is present, it returns `200 OK` and sets the `X-Auth-User` header.\n- **Failure**: If the cookie is missing or invalid, it returns `302 Redirect` to the `/login` page. It captures the original URI from the `X-Forwarded-Uri` header to facilitate a return redirect after login.\n\n### `GET /login`\nServes a self-contained, styled HTML login form. It accepts an optional `rd` query parameter to track where the user should be sent after successful authentication.\n\n### `POST /login`\nProcesses form submissions.\n1. Reads the request body using `readBody` (limited to 4KB to prevent DoS).\n2. Validates the username and password using `bcrypt.compare`.\n3. If valid, generates a signed cookie via `signCookie` and redirects the user to the path specified in the `rd` parameter.\n\n### `GET /logout`\nClears the `archon_auth` cookie by setting its `Max-Age` to `0` and redirects the user to the login page.\n\n## Security Implementation\n\n### Cookie Signing and Verification\nThe service does not store sessions in a database. Instead, it uses stateless signed cookies.\n- **`signCookie(value)`**: Appends a Base64URL-encoded HMAC-SHA256 signature to the cookie value using the `COOKIE_SECRET`.\n- **`verifyCookie(signed)`**: Splits the value and signature, re-calculates the HMAC, and compares them using `crypto.timingSafeEqual` to prevent timing attacks.\n\n### Redirect Validation\nTo prevent \"Open Redirect\" attacks where the service could be used to bounce users to malicious external domains, the `isSafeRedirect(rd)` function enforces:\n- Only relative paths starting with `/` are allowed.\n- Protocol-relative URLs (e.g., `//evil.com`) are blocked.\n- Backslash tricks and absolute URLs containing `://` are rejected.\n\n### Cookie Attributes\nCookies are issued with strict security flags:\n- `HttpOnly`: Prevents JavaScript access (mitigates XSS).\n- `Secure`: Ensures cookies are only sent over HTTPS.\n- `SameSite=Lax`: Provides a balance between security and usability for cross-site requests.\n\n## Development and Testing\n\nThe module includes a test suite in `test.js` that validates the core logic of redirect safety and cookie integrity.\n\nRun tests locally:\n```bash\nnode auth-service/test.js\n```\n\n### Key Internal Functions\n- `parseCookies(header)`: Manually parses the `Cookie` header into a key-value object.\n- `escapeHtml(s)`: Sanitizes user input before injecting it into the login page HTML.\n- `readBody(req)`: A Promise-based wrapper for consuming the request stream with a hard size limit.","api-server-server":"# API Server — server\n\n# API Server — server\n\nThe `@archon/server` module is the central execution hub for the Archon platform. It provides a high-performance, multi-platform gateway that bridges AI orchestrators with various communication interfaces, including a specialized Web UI, chat platforms (Telegram, Discord, Slack), and forge webhooks (GitHub, GitLab, Gitea).\n\n## Core Architecture\n\nThe server is built on **Hono** and **Bun**, utilizing an adapter-based architecture to normalize communication across different protocols.\n\n```mermaid\ngraph TD\n Client[Web UI / Chat / Forge] -->|HTTP/SSE/Socket| Server[Archon Server]\n Server -->|Locking| Core[Archon Core: handleMessage]\n Core -->|Events| WebAdapter[Web Adapter]\n WebAdapter -->|SSE| SSETransport[SSE Transport]\n WebAdapter -->|Buffer| Persistence[Message Persistence]\n Persistence -->|Batch Write| DB[(Database)]\n```\n\n## Server Lifecycle (`src/index.ts`)\n\nThe entry point manages environment bootstrapping, provider registration, and graceful shutdown.\n\n### Bootstrapping Sequence\n1. **Environment Stripping**: Calls `stripCwdEnv()` to prevent environment variables from the target repository (where Archon might be running) from leaking into the server process.\n2. **Credential Validation**: Checks for Claude (API Key or Global OAuth) or Codex credentials. The server will fail fast if no AI provider is configured.\n3. **Provider Registration**: Initializes built-in and community providers via `@archon/providers`.\n4. **Adapter Initialization**:\n * **WebAdapter**: Always enabled; manages the SSE bridge.\n * **Platform Adapters**: Conditionally starts Telegram, Discord, Slack, and Forge adapters based on environment variables.\n5. **HTTP Listener**: Starts the Hono server on the configured port (defaulting to an available port via `getPort()`).\n\n### Graceful Shutdown\nOn `SIGINT` or `SIGTERM`, the server:\n1. Stops the cleanup scheduler.\n2. Flushes all pending message buffers to the database.\n3. Closes all active SSE streams and platform connections.\n4. Shuts down telemetry and closes the database pool.\n\n## Web Platform Adapter\n\nThe `WebAdapter` is a specialized implementation of `IWebPlatformAdapter` designed for the React-based dashboard. It manages real-time communication via Server-Sent Events (SSE) and handles complex message persistence.\n\n### SSE Transport (`src/adapters/web/transport.ts`)\nThe `SSETransport` class manages active `EventSource` connections.\n* **Reconnection Grace Period**: Implements a 5-second grace period (`RECONNECT_GRACE_MS`) during which persistence state is maintained even if a socket drops.\n* **Event Buffering**: Buffers up to 500 events per conversation for 60 seconds. This ensures that if a client reconnects (e.g., due to network flap), they receive missed `tool_result` or `workflow_status` events.\n* **Zombie Reaping**: Periodically cleans up closed stream references to prevent memory leaks.\n\n### Message Persistence (`src/adapters/web/persistence.ts`)\nTo minimize database IO and preserve message structure, the server uses a buffered persistence layer.\n* **Segmentation**: Messages are stored in \"segments.\" A new segment (and thus a new database row/UI bubble) is created when:\n * A tool call is initiated.\n * Text follows a tool call.\n * A workflow status update occurs.\n* **Atomic Flushing**: The `flush()` method snapshots the buffer before performing async database writes to prevent race conditions with incoming message chunks.\n* **Periodic Flush**: A 30-second timer ensures messages are saved even if a conversation lock is held for an extended duration.\n\n### Workflow Event Bridge (`src/adapters/web/workflow-bridge.ts`)\nThis component subscribes to the `WorkflowEventEmitter` and maps internal workflow events to SSE-compatible JSON payloads.\n* **Event Mapping**: Converts `node_started`, `loop_iteration_completed`, and `workflow_artifact` events into structured SSE types (`dag_node`, `workflow_step`, `workflow_artifact`).\n* **Worker Bridging**: Supports `bridgeWorkerEvents`, which forwards events from a background worker conversation to a parent conversation's stream, allowing users to see progress from sub-agents.\n\n## Concurrency and Locking\n\nThe server utilizes the `ConversationLockManager` from `@archon/core` to ensure that a single conversation does not process multiple primary messages simultaneously.\n\n* **Lock Acquisition**: API routes and platform adapters must acquire a lock before calling `handleMessage`.\n* **Lock Events**: The `WebAdapter.emitLockEvent` notifies the frontend when a conversation is locked or queued, allowing the UI to display appropriate \"Assistant is thinking\" states.\n* **Queueing**: If `MAX_CONCURRENT_CONVERSATIONS` is reached, requests are queued. The queue position is sent to the client via SSE.\n\n## API Routes and Webhooks\n\nThe server exposes an OpenAPI-compliant interface via `registerApiRoutes`.\n\n| Path | Method | Description |\n| :--- | :--- | :--- |\n| `/api/conversations` | GET/POST | List and create chat sessions. |\n| `/api/messages` | GET/POST | Retrieve history or send new messages. |\n| `/api/workflows` | GET/POST | Manage and trigger automated workflows. |\n| `/api/codebases` | GET/POST | Register local paths or clone remote repositories. |\n| `/webhooks/github` | POST | Handles GitHub App/Webhook events for PR automation. |\n| `/health` | GET | Basic liveness check. |\n\n## Error Handling\n\nThe server implements a \"Fail Fast\" philosophy:\n* **Unhandled Rejections**: Specifically catches SDK cleanup races (e.g., \"Operation aborted\" during subprocess pipe closure) and logs them as errors without crashing. All other unhandled rejections trigger a fatal log and process exit.\n* **Request Errors**: A global Hono error handler catches exceptions during request processing, logs the method/path, and returns a 500 status to the client.\n* **Message Failures**: `createMessageErrorHandler` ensures that if an AI processing task fails, a formatted error message is sent back to the originating platform (Telegram, Slack, etc.) so the user is not left without feedback.","api-server":"# API Server\n\n# API Server\n\nThe **API Server** module serves as the primary entry point and security boundary for the Archon platform. It integrates identity management with a high-performance communication gateway to facilitate secure, real-time interactions between users and AI orchestrators.\n\n## Architecture Overview\n\nThe module is divided into two distinct functional units: a security sidecar for authentication and a core execution server for application logic.\n\n```mermaid\ngraph LR\n Client[Client/Web UI] --> Caddy{Caddy Proxy}\n Caddy -- forward_auth --> Auth[auth-service]\n Auth -- Session Valid --> Caddy\n Caddy --> Server[server]\n Server --> Core[Archon Core]\n Server --> DB[(Database)]\n```\n\n### Sub-Modules\n\n* **[API Server — auth-service](auth-service.md)**: A lightweight security sidecar that implements cookie-based authentication. It integrates with the Caddy web server via the `forward_auth` directive to protect all platform endpoints.\n* **[API Server — server](server.md)**: The central execution hub built on Hono and Bun. It manages multi-platform adapters (Web, Telegram, Discord) and handles the lifecycle of AI messages and workflow events.\n\n## Key Integrated Workflows\n\n### 1. Secure Request Pipeline\nWhen a request hits the platform, the `auth-service` validates the user's session using HMAC-signed cookies. Once verified, the request is proxied to the `server`, which utilizes the `WebAdapter` to bridge the incoming HTTP/Socket request to the Archon Core.\n\n### 2. Real-Time Event Streaming\nThe `server` manages stateful connections through its `SSETransport` and `workflow-bridge` components. As the Archon Core processes tasks, the server emits real-time updates to the client. This flow is supported by:\n* **Persistence**: The `server` periodically flushes conversation logs to the database via `persistence.ts`.\n* **Cleanup**: Automated schedules (`scheduleCleanup`) ensure that inactive streams and buffers are cleared to maintain performance.\n\n### 3. Unified Logging and Error Handling\nBoth sub-modules feed into a shared logging and database architecture. For instance, when a message fails in the `server`, the `createMessageErrorHandler` triggers a sequence that logs the event via the central `createLogger` and updates the message status in the PostgreSQL database.\n\n## Shared Execution Flows\n\nThe sub-modules interact through several critical execution paths:\n* **Server Initialization**: The `startServer` routine in the core server initializes the `WebAdapter`, starts periodic database flushes, and prepares the transport layer for incoming authenticated traffic.\n* **Conversation Management**: Actions like `clearConversation` span the transport and persistence layers, ensuring that both the active user stream and the underlying database records are synchronized.","cli-tooling-cli":"# CLI Tooling — cli\n\n# CLI Tooling — cli\n\nThe `@archon/cli` module is the primary entry point and user interface for Archon. It provides a command-line interface for running AI-driven workflows, managing isolated development environments (git worktrees), and configuring the system.\n\n## Architecture Overview\n\nThe CLI acts as a thin orchestration layer that translates user input into calls to `@archon/core` and `@archon/workflows`. It utilizes a specialized adapter to bridge the gap between the terminal's standard output and the orchestrator's message-based architecture.\n\n```mermaid\ngraph TD\n CLI[cli.ts] --> Commands[Commands Folder]\n CLI --> Adapter[CLIAdapter]\n Commands --> Core[@archon/core]\n Commands --> Workflows[@archon/workflows]\n Adapter --> Core\n Adapter --> DB[(SQLite/Postgres)]\n```\n\n## Bootstrapping and Environment\n\nThe CLI implements a strict boot sequence to ensure environment variables from a target project do not interfere with Archon's internal configuration (specifically `DATABASE_URL`).\n\n1. **Environment Stripping**: Imports `@archon/paths/strip-cwd-env-boot` first to clear `process.env` of keys auto-loaded by Bun from the current working directory.\n2. **Archon Env Loading**: Calls `loadArchonEnv(process.cwd())` to load configuration from `~/.archon/.env` and `<repo>/.archon/.env`.\n3. **Provider Registration**: Executes `registerBuiltinProviders()` and `registerCommunityProviders()` to populate the AI provider registry.\n\n## The CLI Adapter\n\nThe `CLIAdapter` class (in `src/adapters/cli-adapter.ts`) implements the `IPlatformAdapter` interface. It allows the core orchestrator to communicate with the user via the terminal.\n\n### Key Features:\n- **Output**: `sendMessage` prints directly to `console.log`.\n- **Persistence**: It maintains a `dbIdMap` (mapping platform conversation IDs to DB UUIDs). This allows messages sent via the CLI to be persisted in the database, making them visible in the Web UI history.\n- **Streaming**: Supports both `batch` (default) and `stream` modes.\n- **Thread Management**: CLI is inherently single-threaded; `ensureThread` acts as a passthrough.\n\n## Command Modules\n\nThe CLI logic is partitioned into command-specific files within `src/commands/`.\n\n### Workflow Management (`workflow.ts`)\nHandles the discovery and execution of workflows.\n- `workflowRunCommand`: The primary execution path. It configures isolation (via `@archon/isolation`), initializes the conversation, and triggers the workflow engine.\n- `workflowListCommand`: Discovers and displays available workflows in the current repository.\n\n### Contextual Continuation (`continue.ts`)\nThe `continue` command allows a user to resume work on an existing branch with automated context injection.\n- **Context Preamble**: It builds a Markdown summary including the last 15 commits, git diff stats vs. upstream, open PR information (via `gh` CLI), and summaries of `.md` artifacts from the previous run.\n- **Execution**: It delegates to `workflowRunCommand` using the enriched message.\n\n### Isolation Management (`isolation.ts`)\nManages the lifecycle of git worktrees used for task isolation.\n- `isolationListCommand`: Displays active environments and their age.\n- `isolationCompleteCommand`: A safety-first cleanup tool. Before removing a worktree and deleting branches, it checks for:\n - Uncommitted changes.\n - Active workflow runs.\n - Open Pull Requests.\n - Unmerged/Unpushed commits.\n- `isolationCleanupMergedCommand`: Automatically removes environments whose branches have already been merged into the default branch.\n\n### System Setup (`setup.ts`)\nAn interactive wizard for configuring Archon.\n- **Credential Management**: Handles API keys for Claude and Codex.\n- **Platform Config**: Configures integrations for GitHub, Slack, Discord, and Telegram.\n- **Binary Detection**: Probes the system for the `claude` executable path to ensure the AI provider can invoke the underlying CLI tools.\n\n### Web UI Server (`serve.ts`)\nProvides the `archon serve` command to run the Web UI.\n- **Dynamic Distribution**: If the web assets are not found locally, it automatically downloads the correct version of `archon-web.tar.gz` from GitHub releases, verifies the SHA-256 checksum, and extracts it to the Archon storage directory.\n- **Server Start**: Dynamically imports `@archon/server` to keep the base CLI startup fast.\n\n## Binary Distribution & Skills\n\nTo support standalone binary distribution, the module includes `src/bundled-skill.ts`. This file uses Bun's `type: 'text'` import attributes to embed the contents of `.claude/skills/archon/` directly into the compiled executable.\n\nThe `skill install` command (via `src/commands/skill.ts`) uses these bundled strings to \"eject\" the Archon skill into a target repository, allowing Claude Code to recognize Archon's capabilities without requiring the full source code to be present.\n\n## Error Handling and Telemetry\n\nThe main entry point in `cli.ts` wraps all commands in a global try/catch block. It ensures that:\n1. **Telemetry**: `shutdownTelemetry()` is called to flush buffered events before exit.\n2. **Database**: `closeDatabase()` is called to safely release file locks or connection pools.\n3. **Update Checks**: `printUpdateNotice()` is called (in non-quiet mode) to alert users of newer versions.","cli-tooling-homebrew":"# CLI Tooling — homebrew\n\n# Homebrew Distribution (Archon Formula)\n\nThe `homebrew/archon.rb` file defines the Homebrew formula for the Archon CLI. It manages the automated download, verification, and installation of pre-built binaries for macOS and Linux systems.\n\n## Overview\n\nThe formula is structured to support cross-platform distribution by mapping specific system architectures to their corresponding GitHub release artifacts. It ensures that users receive a native binary optimized for their hardware (Intel or Apple Silicon/ARM).\n\n### Supported Platforms\n\n| Operating System | Architecture | Binary Artifact |\n| :--- | :--- | :--- |\n| macOS | ARM64 (Apple Silicon) | `archon-darwin-arm64` |\n| macOS | x64 (Intel) | `archon-darwin-x64` |\n| Linux | ARM64 | `archon-linux-arm64` |\n| Linux | x64 | `archon-linux-x64` |\n\n## Formula Logic\n\n### Resource Selection\nThe formula uses Homebrew's `on_macos` and `on_linux` blocks combined with `on_arm` and `on_intel` helpers to define the `url` and `sha256` checksum for each platform. This ensures that only the relevant binary is downloaded during the `brew install` process.\n\n```mermaid\ngraph TD\n A[brew install archon] --> B{Operating System?}\n B -- macOS --> C{Architecture?}\n B -- Linux --> D{Architecture?}\n C -- ARM64 --> E[Download darwin-arm64]\n C -- Intel --> F[Download darwin-x64]\n D -- ARM64 --> G[Download linux-arm64]\n D -- Intel --> H[Download linux-x64]\n```\n\n### The `install` Method\nThe `install` method identifies the downloaded file based on the host environment and symlinks it into the Homebrew `bin` directory.\n\n1. **Detection**: Uses `OS.mac?`, `OS.linux?`, `Hardware::CPU.arm?`, and `Hardware::CPU.intel?` to determine which binary was downloaded.\n2. **Renaming**: Maps the platform-specific filename (e.g., `archon-darwin-arm64`) to the generic command name `archon`.\n3. **Deployment**: Executes `bin.install`, which moves the binary to the appropriate location in the user's PATH (typically `/usr/local/bin` or `/opt/homebrew/bin`).\n\n### Verification\nThe `test` block provides a smoke test for the installation. It executes `archon version` and validates that the output matches the version string defined in the formula. This ensures the binary is executable and correctly linked.\n\n## Maintenance and Updates\n\nTo release a new version of the Archon CLI via Homebrew, developers must update the following fields in `archon.rb`:\n\n1. **`version`**: Update to the new semantic version (e.g., `\"0.3.11\"`).\n2. **`sha256`**: Every platform block must be updated with the new SHA256 checksum of the corresponding binary. These hashes are generated during the CI/CD build process for GitHub releases.\n\n### Manual Checksum Generation\nIf updating manually, the checksum for a binary can be generated using:\n```bash\nshasum -a 256 archon-darwin-arm64\n```\n\n## Usage\nUsers can install the CLI using the following command (assuming the formula is hosted in the `coleam00/archon` tap):\n```bash\nbrew install coleam00/archon/archon\n```","cli-tooling":"# CLI Tooling\n\n# CLI Tooling\n\nThe CLI Tooling module group provides the user-facing interface and distribution infrastructure for Archon. It encompasses the logic for command execution, environment configuration, and cross-platform installation.\n\n## Overview\n\nThis module group bridges the gap between the user's terminal and the underlying AI orchestration engine. It is responsible for translating high-level user intent into actionable workflows while ensuring the local environment is correctly provisioned.\n\n* **[CLI](cli.md)**: The core logic of the `@archon/cli` package. It contains the command definitions (e.g., `workflow`, `setup`, `skill`), the `CLIAdapter` for message handling, and the orchestration logic that connects to `@archon/core`.\n* **[Homebrew](homebrew.md)**: The distribution layer. It provides the Ruby formula (`archon.rb`) required to install pre-built Archon binaries on macOS and Linux via the Homebrew package manager.\n\n## Integration Architecture\n\nThe CLI acts as the primary consumer of the system's core libraries, while the Homebrew module ensures those libraries are delivered in a functional, platform-specific binary format.\n\n```mermaid\ngraph LR\n HB[Homebrew Formula] -- Installs --> Bin[Archon Binary]\n Bin -- Invokes --> CLI[CLI Module]\n CLI -- Commands --> Adapter[CLIAdapter]\n Adapter -- Orchestrates --> Core[@archon/core]\n CLI -- Configures --> Env[.env / Worktrees]\n```\n\n## Key Tooling Workflows\n\n### 1. Distribution and Setup\nThe lifecycle begins with the **Homebrew** module, which maps the user's architecture (e.g., ARM64 or x64) to the correct release artifact. Once installed, the **CLI**'s `setupCommand` handles environment initialization, including binary path detection (via `detectClaudeExecutablePath`) and credential management.\n\n### 2. Workflow Orchestration\nWhen a user executes a command like `archon workflow run`, the CLI utilizes `workflowRunCommand` to discover available workflows. It then initializes a `CLIAdapter`, which serves as the communication bridge. This adapter captures logs and messages from the orchestrator and redirects them to the terminal or the local SQLite database.\n\n### 3. Environment Management\nThe CLI manages isolated development environments through git worktrees. Commands such as `workflowAbandonCommand` and `workflowCleanupCommand` interact with the local file system and the database to ensure that AI-driven code changes remain isolated from the user's primary working branch until approved.\n\n### 4. Validation and Skills\nThe tooling includes specialized commands for system health and extensibility. The `validateWorkflowsCommand` ensures that workflow definitions are schema-compliant, while `skillInstallCommand` allows users to extend the CLI's capabilities by injecting new tools into the environment.","core-orchestration":"# Core Orchestration\n\n# Core Orchestration\n\nThe Core Orchestration module is the central intelligence and routing hub of Archon. It serves as the single entry point for messages arriving from any platform (CLI, Web, Slack, GitHub, etc.) and is responsible for determining whether to respond directly using an LLM or to invoke a specific automated workflow.\n\n## Core Responsibilities\n\n- **Message Routing:** Distinguishes between deterministic slash commands and natural language queries.\n- **Workflow Dispatch:** Resolves project contexts, manages isolation environments (worktrees), and executes workflows.\n- **Context Management:** Injects codebase metadata, recent workflow results, and thread history into AI prompts.\n- **State Synchronization:** Ensures local worktrees are synchronized with remote repositories before execution.\n- **Interactive Approvals:** Intercepts natural language to handle approval gates for paused workflows.\n\n## Message Execution Flow\n\nWhen a message is received via `handleMessage`, the orchestrator follows a prioritized execution path:\n\n```mermaid\ngraph TD\n A[Incoming Message] --> B{Is Slash Command?}\n B -- Yes --> C[commandHandler.handleCommand]\n B -- No --> D{Paused Workflow?}\n D -- Yes --> E[Natural Language Approval]\n D -- No --> F[AI Orchestration]\n F --> G[Parse AI Commands]\n G --> H{Invoke Workflow?}\n H -- Yes --> I[dispatchOrchestratorWorkflow]\n H -- No --> J[Send AI Response]\n```\n\n### 1. Natural Language Approvals\nBefore involving the LLM, the orchestrator checks `workflowDb.getPausedWorkflowRun`. If a workflow is waiting for user input in the current conversation, the message is treated as an approval/rejection signal. The orchestrator records the event via `workflowEventDb.createWorkflowEvent` and resumes the workflow using `executeWorkflow`.\n\n### 2. Deterministic Command Handling\nIf the message starts with `/`, it is routed through `commandHandler.parseCommand`. Commands like `/register-project`, `/update-project`, and `/workflow run` are handled deterministically to ensure predictable behavior for power users.\n\n### 3. AI Orchestration\nIf no deterministic path is matched, the orchestrator builds a comprehensive system prompt using `buildFullPrompt`. This includes:\n- **Project Scoping:** If a codebase is attached, it uses `buildProjectScopedPrompt`.\n- **Workflow Discovery:** It calls `discoverAllWorkflows`, which merges global workflows (`~/.archon/workflows`) with repository-specific workflows, allowing local overrides.\n- **Context Injection:** Recent workflow results (up to 3) are fetched via `messageDb.getRecentWorkflowResultMessages` and formatted into the prompt.\n\n## Workflow Dispatch & Isolation\n\nThe function `dispatchOrchestratorWorkflow` is the primary mechanism for transitioning from a chat conversation to an automated task.\n\n1. **Project Attachment:** Automatically associates the codebase with the conversation via `db.updateConversation`.\n2. **Isolation Resolution:** Calls `validateAndResolveIsolation`. Unless a workflow explicitly disables worktrees (`worktree.enabled: false`), the orchestrator ensures a clean, isolated environment is prepared.\n3. **Execution Mode:**\n * **Web Platform:** Interactive workflows run in the foreground via `executeWorkflow`. Non-interactive workflows are offloaded to `dispatchBackgroundWorkflow`.\n * **Other Platforms:** All workflows typically run via `executeWorkflow` to maintain the connection to the user's chat thread.\n\n## Command Parsing Logic\n\nThe orchestrator uses `parseOrchestratorCommands` to extract structured instructions from LLM responses. It specifically looks for:\n\n- **`/invoke-workflow {name} --project {project}`**: Triggers a workflow. The regex requires `--project` to appear before the optional `--prompt` argument.\n- **`/register-project {name} {path}`**: Allows the AI to suggest adding new local directories to Archon's management.\n\n## Platform Adaptation: Streaming vs. Batch\n\nThe module supports two distinct interaction patterns via `handleStreamMode` and `handleBatchMode`:\n\n| Feature | Streaming Mode | Batch Mode |\n| :--- | :--- | :--- |\n| **Target Platforms** | Web, Telegram | Slack, GitHub, CLI |\n| **UX** | Real-time character delivery | Single consolidated response |\n| **Tool Visibility** | Formatted tool calls sent as events | Tool indicators filtered out |\n| **Command Handling** | Retracts stream if command detected | Parses final text before sending |\n\n### Tool Indicator Filtering\nIn Batch Mode, the orchestrator uses `filterToolIndicators` to strip emoji-prefixed metadata (e.g., 🔧, 💭, 📝) generated by the underlying SDK. This prevents \"garbled\" text on platforms that do not support sophisticated streaming UI components.\n\n## Session Management\n\nThe orchestrator maintains LLM session continuity using `sessionDb`. \n- It tracks `assistant_session_id` to allow the LLM to remember previous tool outputs within a single request cycle.\n- If an `error_during_execution` occurs, the orchestrator automatically clears the session ID via `tryPersistSessionId(session.id, null)` to prevent stale state from breaking subsequent attempts.\n\n## Environment Variable Injection\n\nThe module merges environment variables from multiple sources before calling the AI provider:\n1. **Global Config:** Loaded via `loadConfig`.\n2. **Codebase Secrets:** Fetched from `getCodebaseEnvVars(codebaseId)`.\n3. **Provider Capabilities:** Verified via `getProviderCapabilities`. If a provider does not support `envInjection`, a warning is logged, but execution continues.","database-layer-core":"# Database Layer — core\n\n# Database Layer — core\n\nThe Database Layer provides a unified abstraction over PostgreSQL and SQLite, allowing the application to run in both high-concurrency server environments and standalone CLI modes. It handles connection pooling, transaction management, and dialect-specific SQL generation.\n\n## Architecture\n\nThe module is structured into a core connection manager, database-specific adapters, and domain-specific logic files.\n\n```mermaid\ngraph TD\n Domain[Domain Logic: codebases, conversations, etc.] --> Conn[connection.ts]\n Conn --> AdapterInterface[IDatabase Interface]\n AdapterInterface --> PG[PostgresAdapter]\n AdapterInterface --> SL[SqliteAdapter]\n PG --> Postgres[(PostgreSQL)]\n SL --> SQLite[(SQLite)]\n```\n\n### Connection Management\n\nThe `connection.ts` module acts as a singleton manager. It auto-detects the appropriate database engine based on environment variables:\n\n- **PostgreSQL**: Selected if `DATABASE_URL` is present. Used for shared server deployments.\n- **SQLite**: Selected by default. The database is stored at `~/.archon/archon.db`.\n\nKey functions:\n- `getDatabase()`: Returns the active `IDatabase` instance.\n- `getDialect()`: Returns the `SqlDialect` helper for the active connection.\n- `pool`: A legacy export providing a `query` and `end` interface for backward compatibility.\n\n## Database Adapters\n\nAll database interactions go through the `IDatabase` interface, ensuring that domain logic remains agnostic of the underlying engine.\n\n### IDatabase Interface\n```typescript\nexport interface IDatabase {\n query<T>(sql: string, params?: unknown[]): Promise<QueryResult<T>>;\n withTransaction<T>(fn: (query: TransactionQuery) => Promise<T>): Promise<T>;\n close(): Promise<void>;\n readonly dialect: 'postgres' | 'sqlite';\n readonly sql: SqlDialect;\n}\n```\n\n### PostgreSQL Adapter\nUses the `pg` library with a connection pool. It supports native `$1, $2` placeholders and standard JSONB operations.\n\n### SQLite Adapter\nUses `bun:sqlite`. Because `bun:sqlite` is synchronous and uses `?` placeholders, the adapter performs several transformations:\n- **Placeholder Conversion**: Automatically converts `$1, $2` syntax to `?` and reorders parameters to match positional requirements.\n- **WAL Mode**: Enables Write-Ahead Logging for better concurrency.\n- **Busy Timeout**: Set to 5000ms to prevent `SQLITE_BUSY` errors during parallel workflow execution.\n- **Type Casting**: Strips PostgreSQL-specific casts like `::jsonb` or `::INTERVAL`.\n\n## SQL Dialects\n\nTo handle syntax differences in time math and JSON manipulation, the `SqlDialect` interface provides helper methods that return the correct SQL fragments for the active database.\n\n| Feature | PostgreSQL Implementation | SQLite Implementation |\n| :--- | :--- | :--- |\n| `now()` | `NOW()` | `datetime('now')` |\n| `jsonMerge` | `col \\|\\| $n::jsonb` | `json_patch(col, $n)` |\n| `jsonArrayContains` | `col->'path' ? $n` | `instr(json_extract(col, '$.path'), $n) > 0` |\n| `nowMinusDays` | `NOW() - ($n \\|\\| ' days')::INTERVAL` | `datetime('now', '-' \\|\\| $n \\|\\| ' days')` |\n| `daysSince` | `EXTRACT(EPOCH FROM (NOW() - col)) / 86400` | `(julianday('now') - julianday(col))` |\n\n## Domain Modules\n\nThe database logic is partitioned by entity:\n\n- **`codebases.ts`**: Manages repository metadata, default working directories, and AI assistant configurations.\n- **`conversations.ts`**: Handles platform-specific chat sessions (Telegram, Discord, Slack, CLI). Supports context inheritance (e.g., a Discord thread inheriting the codebase from its parent channel).\n- **`isolation-environments.ts`**: Tracks active worktrees and containers. Implements `IIsolationStore` for the isolation module.\n- **`sessions.ts`**: Manages LLM session state and history.\n- **`workflows.ts` & `workflow-events.ts`**: Tracks the execution state, steps, and logs of background tasks.\n- **`env-vars.ts`**: Manages per-codebase environment variables with encrypted/plain-text storage.\n\n## SQLite Schema & Migrations\n\nSince SQLite is often used in a standalone context without external migration tools, the `SqliteAdapter` manages its own schema:\n\n1. **`createSchema()`**: Executes a large block of `CREATE TABLE IF NOT EXISTS` statements.\n2. **`migrateColumns()`**: Checks for missing columns in existing databases using `PRAGMA table_info` and issues `ALTER TABLE` commands. This ensures that users upgrading the CLI get new schema features without losing data.\n\n## Transaction Pattern\n\nTransactions should be handled using the `withTransaction` method to ensure proper cleanup and rollback.\n\n```typescript\nawait database.withTransaction(async (txQuery) => {\n await txQuery('INSERT INTO table1 ...', [val1]);\n await txQuery('UPDATE table2 ...', [val2]);\n // If this block throws, ROLLBACK is issued automatically.\n // Otherwise, COMMIT is issued.\n});\n```\n\n## Implementation Notes\n\n- **Logging**: Loggers are lazy-initialized within functions (e.g., `getLog()`) to allow test mocks to intercept `createLogger` before it is called.\n- **JSON Handling**: PostgreSQL returns JSONB columns as objects, while SQLite returns them as strings. Domain modules (like `codebases.ts`) include logic to `JSON.parse` results when the adapter is SQLite.\n- **Object Mutability**: `bun:sqlite` returns frozen objects. Domain functions often spread results `{ ...row }` to ensure the rest of the application can modify the data if needed.","database-layer-migrations":"# Database Layer — migrations\n\n# Database Layer — Migrations\n\nThe migrations module defines the relational schema for the Remote Coding Agent. It uses a series of incremental SQL scripts to manage the lifecycle of the database, ensuring idempotency and supporting evolution from simple chat tracking to complex, multi-step workflow orchestration.\n\n## Schema Overview\n\nThe database is structured around four primary domains: **Codebase Management**, **Conversation State**, **Isolation Environments**, and **Workflow Execution**.\n\n### Core Entity Relationship\n```mermaid\nerDiagram\n CODEBASE ||--o{ CONVERSATION : \"contains\"\n CODEBASE ||--o{ ISOLATION_ENVIRONMENT : \"hosts\"\n CONVERSATION ||--o{ SESSION : \"tracks\"\n CONVERSATION ||--o{ MESSAGE : \"stores\"\n CONVERSATION ||--o| ISOLATION_ENVIRONMENT : \"uses\"\n WORKFLOW_RUN ||--|| CONVERSATION : \"manages\"\n WORKFLOW_RUN ||--o{ WORKFLOW_EVENT : \"emits\"\n```\n\n## Table Definitions\n\n### 1. Codebase Management\n* **`remote_agent_codebases`**: The root configuration for a project. Stores repository URLs, default working directories (`default_cwd`), and AI assistant preferences.\n * `allow_env_keys`: A security toggle (default `FALSE`) that controls whether subprocesses are permitted to access sensitive environment keys.\n* **`remote_agent_codebase_env_vars`**: Stores per-project environment variables. These are injected into the `Options.env` during AI SDK calls, allowing for project-specific secrets or configurations without hardcoding.\n\n### 2. Conversation & Messaging\n* **`remote_agent_conversations`**: The primary container for user-AI interaction.\n * `platform_conversation_id`: Maps the internal conversation to external platforms (e.g., Slack, GitHub).\n * `isolation_env_id`: A foreign key to the specific environment where code execution occurs.\n * `hidden`: Boolean used to filter \"worker\" conversations (background tasks) from the primary UI sidebar.\n* **`remote_agent_messages`**: Flat storage for message history, including roles (system, user, assistant) and metadata.\n\n### 3. Session & Audit Trail\n* **`remote_agent_sessions`**: Represents a specific window of AI interaction. Sessions are designed to be immutable for auditing.\n * `parent_session_id`: Links sessions in a chain, allowing the system to reconstruct the history of a conversation even if the context was reset or branched.\n * `transition_reason`: Records why a new session was created (e.g., `plan-to-execute`, `isolation-changed`).\n * `ended_reason`: Records why a session was deactivated (e.g., `reset-requested`, `cwd-changed`).\n\n### 4. Isolation Environments\n* **`remote_agent_isolation_environments`**: Manages the lifecycle of isolated workspaces (typically Git worktrees).\n * `workflow_type` & `workflow_id`: Identifies the specific task (e.g., `issue`, `42`) the environment serves.\n * `status`: Tracks if the environment is `active` or `destroyed`.\n * **Partial Index**: `unique_active_workflow` ensures that only one *active* environment exists per codebase/workflow pair, while allowing historical records of destroyed environments to persist.\n\n### 5. Workflow Orchestration\n* **`remote_agent_workflow_runs`**: Tracks the state of long-running autonomous tasks.\n * `status`: Transitions from `pending` to `running`, then `completed` or `failed`.\n * `working_path`: Stores the filesystem path to allow a workflow to resume in the correct directory after a failure or restart.\n* **`remote_agent_workflow_events`**: A lean event log for UI observability. It captures step transitions and artifacts without the verbosity of full tool-call logs.\n\n## Migration Patterns\n\n### Idempotency\nThe module provides `000_combined.sql`, which represents the final state of the schema. It uses `CREATE TABLE IF NOT EXISTS` and `ALTER TABLE ... ADD COLUMN IF NOT EXISTS` patterns. This allows the schema to be initialized on a fresh database or synchronized on an existing one without manual intervention.\n\n### Evolution Highlights\n* **Migration 007**: Removed legacy columns (`worktree_path`, `isolation_provider`) from the conversations table, consolidating isolation logic into the dedicated `remote_agent_isolation_environments` table.\n* **Migration 010 & 016**: Introduced the \"Immutable Session\" pattern, adding parent linkage and reason codes to provide a verifiable audit trail of AI behavior.\n* **Migration 017**: Deprecated the `remote_agent_command_templates` table. Commands are now managed as file-based assets within the repository's `.archon/commands` directory to ensure they are version-controlled alongside the code.\n\n## Implementation Notes for Developers\n\n1. **Foreign Keys**: Most relationships use `ON DELETE CASCADE` (e.g., messages belonging to a conversation) or `ON DELETE SET NULL` (e.g., codebases linked to sessions) to maintain referential integrity during cleanup.\n2. **Timestamps**: All tables include `created_at` and `updated_at`. Tables involved in background processing (Workflows, Conversations) include `last_activity_at` to facilitate staleness detection and automated cleanup of abandoned environments.\n3. **JSONB Usage**: Metadata columns in `sessions`, `workflow_runs`, and `workflow_events` use `JSONB` for flexibility, allowing platform-specific data to be stored without schema changes.","database-layer":"# Database Layer\n\n# Database Layer\n\nThe Database Layer provides a unified persistence engine for the Remote Coding Agent. It abstracts the underlying storage technology to support both high-concurrency server environments (via PostgreSQL) and standalone CLI modes (via SQLite), ensuring consistent state management across codebase indexing, agent conversations, and workflow execution.\n\n## Module Organization\n\nThe layer is divided into two primary functional areas:\n\n* **[Migrations](migrations.md)**: Defines the relational schema and manages the database lifecycle. It ensures that the four primary domains—Codebase Management, Conversation State, Isolation Environments, and Workflow Execution—are consistently structured across different database dialects.\n* **[Core](core.md)**: Implements the `IDatabase` interface through `PostgresAdapter` and `SqliteAdapter`. It handles connection pooling, transaction management, and dialect-specific SQL generation via `connection.ts`.\n\n## Integrated Architecture\n\nThe sub-modules work together to provide a seamless API for the application's orchestrators and adapters. While **Migrations** defines the \"what\" (the tables and relationships), **Core** provides the \"how\" (the execution engine).\n\n```mermaid\ngraph TD\n subgraph \"Application Logic\"\n Orchestrator[Orchestrator]\n Agent[Agent]\n end\n\n subgraph \"Database Layer\"\n Domain[Domain Logic: workflows, messages, isolation-envs]\n Core[Core: connection.ts]\n Mig[Migrations: SQL Scripts]\n Adapters[Adapters: Postgres / SQLite]\n end\n\n Orchestrator --> Domain\n Agent --> Domain\n Domain --> Core\n Core --> Adapters\n Adapters -.-> Mig\n```\n\n## Key Cross-Module Workflows\n\n### 1. Environment Lifecycle Management\nWhen the Orchestrator validates an environment, it triggers a flow through `isolation-environments.ts`. This module uses the **Core** `getDatabase()` and `getDialect()` methods to track the state of containers. It relies on the schema defined in **Migrations** to link `ISOLATION_ENVIRONMENT` records to specific `CODEBASE` and `CONVERSATION` entities.\n\n### 2. Conversation and Message Persistence\nAs the Agent processes streams, it invokes `addMessage` (from `messages.ts`). This function interacts with the **Core** connection manager to persist data. Because the **Migrations** module ensures identical table structures in both SQLite and Postgres, the Agent can transition from a local CLI session to a hosted environment without logic changes.\n\n### 3. Workflow Orchestration\nThe system tracks multi-step operations using `workflows.ts` and `workflow-events.ts`. These modules utilize the **Core** transaction management to ensure that workflow state updates (e.g., `failWorkflowRun`, `updateStatus`) are atomic. They query the relational schema to resolve orphaned runs and track the progress of complex coding tasks.\n\n### 4. Configuration and Environment Variables\nThe `env-vars.ts` and `codebases.ts` modules provide the metadata required for the agent to operate. By calling `setCodebaseEnvVar` or `updateCodebaseCommands`, the system stores operational context that is retrieved by the **Core** adapters during session initialization.","documentation-adapters":"# Documentation — adapters\n\n# Platform Adapters\n\nAdapters serve as the bridge between the Archon core and external communication platforms. They normalize platform-specific events (like Slack messages or GitHub PR comments) into a standard format that Archon can process.\n\nAdapters are categorized into two primary types: **Chat Adapters** and **Forge Adapters**.\n\n## Core Interface: `IPlatformAdapter`\n\nAll adapters must implement the `IPlatformAdapter` interface defined in `@archon/core`. This ensures the server can interact with any platform using a consistent API for sending messages and managing lifecycle states.\n\n```mermaid\ngraph LR\n Platform[External Platform] -->|Events/Webhooks| Adapter[Platform Adapter]\n Adapter -->|Normalized Context| Server[Archon Server]\n Server -->|sendMessage| Adapter\n Adapter -->|API Call| Platform\n```\n\n## Chat Adapters\n\nChat adapters connect to messaging platforms (Discord, Slack, Telegram) typically via long-polling or WebSockets. They are characterized by persistent connections and real-time message streams.\n\n### Implementation Pattern\n- **`onMessage(handler)`**: Registers a callback that the adapter invokes whenever a new message is received.\n- **`start()`**: Establishes the connection to the platform's gateway.\n- **`sendMessage(conversationId, text)`**: Routes a response back to a specific channel or thread.\n\n### Registration\nChat adapters are initialized in the server entry point (`packages/server/src/index.ts`). Because chat platforms often lack built-in concurrency control, incoming messages should be wrapped in a `lockManager` to prevent race conditions on a per-conversation basis:\n\n```typescript\nmyAdapter.onMessage(async (ctx) => {\n lockManager.acquireLock(ctx.conversationId, async () => {\n await handleMessage(myAdapter, ctx.conversationId, ctx.message);\n });\n});\n```\n\n## Forge Adapters\n\nForge adapters connect to code hosting platforms (GitHub, GitLab). Unlike chat adapters, these are primarily **webhook-driven** and manage complex entities like repositories and pull requests.\n\n### Key Characteristics\n- **Webhook Handling**: Instead of a persistent listener, they expose a `handleWebhook(payload, signature)` method.\n- **Conversation IDs**: Use a structured format, typically `owner/repo#number` (e.g., `archon-labs/archon#42`).\n- **Security**: Must implement signature verification to validate that incoming HTTP requests originate from the trusted forge platform.\n\n### Registration\nForge adapters require an HTTP route in the server to receive payloads:\n\n```typescript\napp.post('/webhooks/github', async (c) => {\n const signature = c.req.header('x-hub-signature-256');\n const payload = await c.req.text();\n await githubAdapter.handleWebhook(payload, signature);\n return c.text('OK', 200);\n});\n```\n\n## Development Standards\n\n### Lazy Logger Pattern\nTo support unit testing where `createLogger` might be mocked, adapters must use a module-level cached getter for logging. This prevents the logger from being instantiated before the test environment has a chance to intercept the factory function.\n\n```typescript\nlet cachedLog: ReturnType<typeof createLogger> | undefined;\n\nfunction getLog() {\n if (!cachedLog) cachedLog = createLogger('adapter.name');\n return cachedLog;\n}\n```\n\n### Logging Conventions\nEvents should follow the `{domain}.{action}_{state}` pattern:\n- `adapter.message_received`\n- `adapter.comment_post_started`\n- `adapter.comment_post_completed`\n- `adapter.comment_post_failed`\n\n### Directory Structure\nNew adapters should follow this layout within `src/community/[chat|forge]/`:\n- `adapter.ts`: The main class implementation.\n- `auth.ts`: Logic for token management or webhook signature verification.\n- `types.ts`: Platform-specific API interfaces.\n- `adapter.test.ts`: Unit tests.\n\n## Testing & Isolation\n\nArchon uses **Bun** for testing. A critical constraint of `bun test` is that `mock.module()` calls are process-global and cannot be fully reset. \n\nIf an adapter test mocks global modules (like `@archon/paths` or `@archon/git`), it **must** be isolated into its own test execution batch in `package.json` to avoid side effects on other tests:\n\n```json\n\"test\": \"bun test src/existing-tests && bun test src/community/chat/my-new-adapter/adapter.test.ts\"\n```","documentation-claude-md":"# Documentation — CLAUDE.md\n\n# Archon Project Standards & Architecture (CLAUDE.md)\n\nThe `CLAUDE.md` file serves as the \"Source of Truth\" and engineering specification for the Archon project. It defines the architectural boundaries, coding standards, and operational procedures required for maintaining the Remote Agentic Coding Platform.\n\n## Purpose and Scope\n\n`CLAUDE.md` is designed to guide both human developers and AI coding assistants (like Claude Code) in maintaining consistency across the Bun-based monorepo. It prioritizes a **Single-Developer Tool** philosophy, favoring simplicity and explicit control over multi-tenant complexity.\n\n## Engineering Philosophy\n\nThe project adheres to several strict implementation constraints:\n* **KISS & YAGNI**: Avoid speculative abstractions. Do not add configuration keys or interface methods without a concrete, immediate use case.\n* **Fail Fast**: Silent fallbacks are prohibited in agent runtimes to prevent unsafe or costly AI behavior. Errors must be explicit and localized.\n* **No Autonomous Lifecycle Mutation**: Processes must not autonomously mark work as failed/cancelled if they cannot distinguish between a crash and active execution by another process (e.g., CLI vs. Web UI).\n* **Reversibility**: Changes must have a clear rollback path and limited blast radius.\n\n## Package Architecture\n\nArchon is structured as a Bun monorepo with clear separation between the workflow engine, AI providers, and platform adapters.\n\n```mermaid\ngraph TD\n CLI[@archon/cli] --> Server[@archon/server]\n Server --> Adapters[@archon/adapters]\n Adapters --> Core[@archon/core]\n Core --> Providers[@archon/providers]\n Core --> Workflows[@archon/workflows]\n Workflows --> Git[@archon/git]\n Workflows --> ProvidersTypes[@archon/providers/types]\n Isolation[@archon/isolation] --> Git\n Web[@archon/web] -.-> Server\n```\n\n### Key Packages\n* **`@archon/core`**: The central business logic layer. Manages the database (SQLite/PostgreSQL), orchestrates AI conversations, and provides the `IWorkflowStore` implementation.\n* **`@archon/workflows`**: The DAG-based execution engine. It handles YAML loading, variable substitution (e.g., `$ARTIFACTS_DIR`, `$nodeId.output`), and node execution logic.\n* **`@archon/providers`**: Translation layer for AI SDKs (Claude, Codex, Pi). It abstracts vendor-specific logic into a unified `IAgentProvider` interface.\n* **`@archon/git` & `@archon/isolation`**: Low-level utilities for git operations and worktree-based environment isolation.\n* **`@archon/server`**: A Hono-based API server that uses `@hono/zod-openapi` for type-safe routing and documentation.\n\n## Type Safety & Schema Conventions\n\nStrict TypeScript and Zod usage is mandatory to ensure system stability.\n\n### Zod Standards\n* **Source**: Always import `z` from `@hono/zod-openapi`.\n* **Derivation**: Use `z.infer<typeof schema>` exclusively. Manual interface duplication is forbidden.\n* **Naming**: Use camelCase with descriptive suffixes (e.g., `workflowRunSchema`).\n* **Location**: Route schemas reside in `packages/server/src/routes/schemas/`; engine schemas reside in `packages/workflows/src/schemas/`.\n\n### API Implementation\nAll new API routes must be registered using the local `registerOpenApiRoute` wrapper. This ensures that the Hono `TypedResponse` bypass is handled correctly while maintaining OpenAPI spec generation.\n\n## Git & Release Workflow\n\nThe project uses a structured branch and release model:\n1. **`main`**: The release-only branch. No direct commits.\n2. **`dev`**: The primary integration branch. Feature branches merge here.\n3. **Releases**: Triggered via the `/release` skill, which automates version bumping (SemVer), changelog generation, and the PR from `dev` to `main`.\n4. **Worktrees**: Used for parallel development. The system automatically creates worktrees for agent tasks to prevent branch conflicts in the main working directory.\n\n## Workflow Engine & Commands\n\nWorkflows are defined in YAML and stored in `.archon/workflows/`.\n\n### Node Types\n* **`prompt:`**: Inline AI instructions.\n* **`command:`**: References a named command file in `.archon/commands/`.\n* **`bash:` / `script:`**: Executes shell scripts or Bun/Python scripts with captured output.\n* **`loop:`**: Iterative AI execution until a completion signal is met.\n* **`approval:`**: A human-in-the-loop gate that pauses execution.\n\n### Variable Substitution\nThe engine supports dynamic variables:\n* `$1`, `$2`, `$ARGUMENTS`: Positional and bulk arguments.\n* `$nodeId.output`: Accesses the result of a previous DAG node.\n* `$ARTIFACTS_DIR`: A dedicated path for non-git output files.\n\n## Development Lifecycle\n\n### Validation\nBefore any Pull Request, developers must run:\n```bash\nbun run validate\n```\nThis command executes a suite of checks: `check:bundled` (verifying embedded defaults), type-checking, linting (zero-warning policy), formatting, and tests.\n\n### Test Isolation\nBun's `mock.module()` is process-global. To prevent cross-test pollution, tests are split into batches. **Never run `bun test` from the root**; use `bun run test` to ensure package-level isolation via `bun --filter`.\n\n### Database\nThe system auto-detects the database:\n* **Default**: SQLite at `~/.archon/archon.db`.\n* **Production/Cloud**: PostgreSQL via the `DATABASE_URL` environment variable.","documentation-docs-web":"# Documentation — docs-web\n\n# Documentation — docs-web\n\nThe `docs-web` module is the central documentation hub for Archon. It is built using [Astro](https://astro.build/) and the [Starlight](https://starlight.astro.build/) documentation framework. It provides a developer-focused site containing \"The Book of Archon,\" platform adapter guides, and technical references.\n\n## Tech Stack\n\n- **Framework**: Astro 6.1+\n- **Theme**: Starlight (Documentation-optimized UI)\n- **Content**: Markdown/MDX with Zod-validated frontmatter\n- **Image Processing**: Sharp\n\n## Content Configuration\n\nThe module uses Astro's Content Layer API. The schema is defined in `packages/docs-web/src/content.config.ts` and extends the base Starlight schema to include Archon-specific metadata.\n\n### Metadata Schema (`docsSchema`)\n\nThe documentation uses a custom schema to align with the project's GitHub label taxonomy and lifecycle management:\n\n| Field | Type | Description |\n| :--- | :--- | :--- |\n| `category` | `enum` | Determines sidebar placement (e.g., `getting-started`, `guides`, `adapters`). |\n| `area` | `enum` | Maps to `area:*` GitHub labels (e.g., `orchestrator`, `cli`, `isolation`). |\n| `audience` | `array` | Targets `user`, `developer`, or `operator`. |\n| `status` | `enum` | Lifecycle state: `current`, `deprecated`, or `research`. |\n| `part` | `enum` | Narrative grouping for \"The Book of Archon\" (e.g., `orientation`, `advanced`). |\n\n```typescript\n// src/content.config.ts\nexport const collections = {\n docs: defineCollection({\n loader: docsLoader(),\n schema: docsSchema({\n extend: z.object({\n category: z.enum(['getting-started', 'guides', 'adapters', 'deployment', 'reference', 'contributing', 'book']).optional(),\n area: z.enum(['adapters', 'cli', 'clients', 'config', 'database', 'handlers', 'infra', 'isolation', 'orchestrator', 'server', 'services', 'web', 'workflows']).optional(),\n audience: z.array(z.enum(['user', 'developer', 'operator'])).optional(),\n status: z.enum(['current', 'deprecated', 'research']).default('current'),\n }),\n }),\n }),\n};\n```\n\n## Site Structure\n\nThe site is organized into logical sections defined in `astro.config.mjs` using Starlight's `sidebar` configuration. Most sections use `autogenerate` to map directory structures directly to the navigation menu.\n\n### The Book of Archon\nA narrative, 10-chapter guide designed to take a user from installation to authoring complex DAG workflows. It is located in `src/content/docs/book/`.\n\n### Platform Adapters\nDocumentation for connecting Archon to external communication channels.\n- **Core Adapters**: Web UI, CLI, Slack, Telegram, GitHub.\n- **Community Adapters**: Discord, Gitea, GitLab (located in `src/content/docs/adapters/community/`).\n\n### Reference\nTechnical specifications for the CLI, API, and environment variable configurations.\n\n## Architecture Overview\n\nThe documentation site acts as a static site generator that consumes Markdown files and outputs a highly optimized web interface.\n\n```mermaid\ngraph TD\n MD[Markdown Content] -->|Validated by| Zod[Zod Schema]\n Zod -->|Processed by| Astro[Astro/Starlight]\n Astro -->|Generates| Static[Static HTML/JS/CSS]\n Static -->|Deployed to| Web[archon.diy]\n```\n\n## Development Workflow\n\n### Local Development\nTo run the documentation site locally with hot-reloading:\n\n```bash\ncd packages/docs-web\nbun install\nbun run dev\n```\nThe site will be available at `http://localhost:4321`.\n\n### Building for Production\nTo generate the static build:\n\n```bash\nbun run build\n```\nThe output is located in the `dist/` directory.\n\n### Adding New Content\n1. Create a `.md` or `.mdx` file in the appropriate subdirectory of `src/content/docs/`.\n2. Populate the frontmatter. Ensure the `category` matches the directory to maintain sidebar consistency.\n3. If adding a new Platform Adapter, ensure it is placed in `src/content/docs/adapters/` and assigned a `sidebar.order`.\n\n## Customizations\n\n### Theme Initialization\nThe site includes a blocking script in the `head` (configured in `astro.config.mjs`) to force a dark theme on first load, ensuring visual consistency with the Archon Web UI.\n\n```javascript\nhead: [\n {\n tag: 'script',\n content: `if(!localStorage.getItem('archon-theme-init')){\n localStorage.setItem('archon-theme-init','1');\n localStorage.setItem('starlight-theme','dark');\n document.documentElement.dataset.theme='dark';\n }`,\n },\n],\n```\n\n### Edit Links\nThe `editLink` property is configured to point directly to the GitHub repository's `main` branch, allowing developers to contribute documentation fixes directly from the browser.","documentation-graphify-out":"# Documentation — graphify-out\n\n# Documentation — graphify-out\n\nThe `graphify-out` module contains the structural and semantic analysis of the **Archon** codebase. It serves as a map for developers to understand the relationships between disparate packages, identify core abstractions (\"God Nodes\"), and navigate the logical clusters (Communities) that define the system's architecture.\n\n## System Overview\n\nThe Archon project is a large-scale TypeScript application comprising 508 files and approximately 588,364 words. The analysis identifies 1,818 distinct entities (nodes) and 2,946 relationships (edges), organized into 87 functional communities.\n\n### Core Abstractions (God Nodes)\n\nThe following entities represent the most connected components in the system. They act as the primary bridges between different modules:\n\n1. **`createLogger()` / `getLog()`**: The central telemetry and logging backbone, connecting almost every community from CLI adapters to isolation logic.\n2. **`String()`**: Extensively used across UI event handling and database persistence, often inferred as a data transformation bridge.\n3. **`execFileAsync()`**: The primary interface for shell execution, central to the Git and Isolation modules.\n4. **`WorktreeProvider`**: The core abstraction for managing isolated development environments.\n5. **`GitHubAdapter` / `GiteaAdapter`**: The primary integration points for external version control forges.\n6. **`getDialect()`**: The database abstraction layer, bridging codebase management with the underlying persistence engine.\n\n## Functional Communities\n\nThe codebase is partitioned into several high-cohesion communities. Understanding these clusters is essential for localized development.\n\n### 1. Workflow Engine & DAG Execution\n* **Community 3 (Workflow Bridge & DAG Execution)**: Handles the execution of Directed Acyclic Graphs (DAGs). Key functions include `executeDagWorkflow`, `executeNodeInternal`, and specialized node handlers like `executeBashNode` and `executeLoopNode`.\n* **Community 18 (Workflow Control)**: Manages the parsing and validation of workflows via `parseWorkflow` and `parseDagNode`.\n\n### 2. Isolation & Repository Management\n* **Community 0 (Isolation & Repo Management)**: The largest cluster, focused on Git worktree lifecycle. It includes `isolationCleanupCommand`, `formatRepoContext`, and `getCurrentBranch`.\n* **Community 17 (Isolation Errors)**: Specialized logic for handling environment-specific failures, featuring the `IsolationResolver` and `IsolationBlockedError`.\n\n### 3. Persistence & Database\n* **Community 2 (Database & Conversation Persistence)**: Manages the lifecycle of the application state. Key entities include `getOrCreateConversation`, `listConversations`, and the `getDialect` abstraction for SQL compatibility.\n\n### 4. Adapter Integrations\n* **Community 5 & 6 (External Adapters)**: Contains the logic for connecting Archon to external platforms.\n * **Chat**: `DiscordAdapter`, `SlackAdapter`, `TelegramAdapter`.\n * **IO**: `CLIAdapter`, `PostgresAdapter`, `WebAdapter`.\n\n### 5. Chat & Prompt Orchestration\n* **Community 9 (Prompt Orchestration)**: The interface between user intent and workflow execution. It includes `buildFullPrompt`, `dispatchOrchestratorWorkflow`, and `filterToolIndicators`.\n\n## Logical Pipelines (Hyperedges)\n\nBeyond static code structure, the analysis identifies several \"Hyperedges\"—logical sequences of operations that span multiple communities:\n\n* **PR Review Pipeline**: Links `maintainer_review_gate`, `maintainer_review_pr`, and `maintainer_review_synthesize`.\n* **Workflow Planning Loop**: Connects `cmd_plan_feature`, `cmd_execute`, and `cmd_handoff`.\n* **Archon Priming**: Orchestrates the initialization of the backend, frontend, and isolation layers.\n\n## Architecture Diagram\n\nThe following diagram illustrates the high-level interaction between the primary functional communities:\n\n```mermaid\ngraph TD\n subgraph UI_Layer\n C9[Chat & Prompt Orchestration]\n C1[UI Event Handling]\n end\n\n subgraph Core_Engine\n C3[Workflow & DAG Execution]\n C0[Isolation & Repo Management]\n end\n\n subgraph Persistence\n C2[Database & Conversations]\n end\n\n subgraph Adapters\n C5[Chat Adapters]\n C6[CLI/IO Adapters]\n end\n\n C9 --> C3\n C3 --> C0\n C3 --> C2\n C6 --> C9\n C5 --> C9\n C0 --> C2\n```\n\n## Development Insights\n\n### Cross-Community Bridges\nThe `createLogger` and `String` nodes have the highest \"betweenness centrality\" (0.214 and 0.177 respectively). Changes to these utilities have a high probability of impacting the entire system.\n\n### Inferred Relationships\nApproximately 24% of the graph edges (707 edges) are **inferred**. These represent semantic connections where one module likely depends on another's output or state without a direct AST-level import. Developers should pay particular attention to:\n* `updateCodebase()` calling `getDialect()` (Database connection).\n* `listConversations()` interacting with `WorkflowProgressCard` (UI/Data bridge).\n\n### Knowledge Gaps\nThe analysis identifies 51 isolated nodes, including `WorkflowRunGuardError` and `CustomError`. These represent areas where error handling or specific utility classes may be under-integrated or require better documentation within the source code.","documentation-readme-md":"# Documentation — README.md\n\n# Archon: AI Coding Workflow Engine\n\nArchon is a workflow orchestration engine designed to make AI-driven software development deterministic, repeatable, and scalable. It bridges the gap between raw LLM capabilities and structured software engineering processes by wrapping AI agents in defined execution graphs.\n\n## Core Philosophy\n\nArchon treats AI coding as a series of stateful transitions. Instead of relying on a single long-running prompt, Archon decomposes tasks into **Workflows** (YAML-defined Directed Acyclic Graphs) and **Commands** (Markdown-defined instructions).\n\n### Key Technical Pillars\n* **Determinism:** Non-AI tasks (testing, linting, git operations) are handled via bash nodes, while AI tasks are constrained by specific prompts and context windows.\n* **Isolation:** Every workflow execution operates within an isolated Git worktree. This allows for parallel task execution without workspace pollution.\n* **Human-in-the-Loop:** Workflows support interactive gates (`interactive: true`) where the engine pauses for manual approval or feedback.\n* **Platform Agnostic:** The core orchestrator is decoupled from the interface, allowing the same workflow to be triggered via CLI, Web UI, Slack, or GitHub Webhooks.\n\n## Workflow Architecture\n\nWorkflows are defined in `.archon/workflows/*.yaml`. They consist of a series of nodes that define the execution logic.\n\n### Node Types\n1. **AI Nodes (`prompt`):** Sends instructions to the configured AI assistant (e.g., Claude Code).\n2. **Deterministic Nodes (`bash`):** Executes shell commands directly in the environment.\n3. **Loop Nodes (`loop`):** Iterates a prompt or set of actions until a specific condition is met (e.g., `until: ALL_TASKS_COMPLETE` or `until: APPROVED`).\n\n### Execution Flow\nThe Orchestrator manages the lifecycle of a workflow run, handling dependency resolution and state persistence in the database (SQLite or PostgreSQL).\n\n```mermaid\ngraph TD\n A[Trigger: CLI/Web/Webhook] --> B[Orchestrator]\n B --> C{Workflow Executor}\n C --> D[Node: Plan]\n D --> E[Node: Implement]\n E --> F{Loop Condition?}\n F -- No --> G[Node: Test/Bash]\n F -- Yes --> E\n G --> H[Node: PR/Review]\n H --> I[Completion]\n```\n\n## System Components\n\n### 1. The Orchestrator\nThe central hub responsible for message routing and context management. it maintains the conversation history and ensures that AI assistants have the necessary context from previous nodes in the DAG.\n\n### 2. AI Assistant Clients\nArchon currently integrates deeply with **Claude Code**. It manages the lifecycle of the `claude` binary, communicating via a structured interface.\n* **Configuration:** Requires `CLAUDE_BIN_PATH` or configuration via `assistants.claude.claudeBinaryPath` in `~/.archon/config.yaml`.\n\n### 3. Platform Adapters\nAdapters translate platform-specific events (a Slack message, a GitHub Issue comment, a CLI command) into a standardized internal format for the Orchestrator.\n* **Web UI:** A React-based dashboard for real-time monitoring and visual workflow building.\n* **CLI:** The primary entry point for local development.\n\n### 4. Persistence Layer\nArchon uses a relational schema (7 tables) to track:\n* **Codebases:** Registered projects and their local/remote paths.\n* **Conversations & Messages:** Full history of AI and human interactions.\n* **Workflow Runs & Events:** State tracking for every node execution, including logs and artifacts.\n* **Isolation Environments:** Metadata for active Git worktrees.\n\n## Extensibility\n\n### Custom Workflows\nUsers can override default behaviors by placing YAML files in `.archon/workflows/`. A workflow defines the \"how\" of a process:\n```yaml\nnodes:\n - id: test_node\n bash: \"npm test\"\n - id: fix_node\n depends_on: [test_node]\n prompt: \"The tests failed with {{test_node.output}}. Fix the code.\"\n```\n\n### Custom Commands\nCommands are defined in `.archon/commands/` as Markdown files. These act as reusable system prompts or \"skills\" that the AI assistant can invoke to perform specific sub-tasks.\n\n## Operational Modes\n\n### CLI Usage\nThe CLI is used to initialize the environment and run workflows locally:\n```bash\narchon workflow run archon-idea-to-pr --input \"Add OAuth2 support\"\n```\n\n### Web & Server Mode\nRunning `archon serve` starts the web server, providing:\n* **Mission Control:** A dashboard to view all active and historical workflow runs.\n* **Workflow Builder:** A visual editor for DAG construction.\n* **Unified Chat:** A single interface to interact with agents across all connected platforms.\n\n## Telemetry and Privacy\nArchon implements an opt-out telemetry system (honoring `DO_NOT_TRACK=1`). It collects anonymous `workflow_invoked` events containing the workflow name and platform. It does **not** collect code, prompts, or sensitive environment data.","documentation":"# Documentation\n\n# Documentation System\n\nThe Archon documentation ecosystem provides a multi-layered framework for understanding, maintaining, and extending the AI coding workflow engine. It transitions from high-level engineering philosophy to automated structural analysis, culminating in a centralized web-based delivery platform.\n\n## System Architecture\n\nThe documentation is structured into three functional layers:\n\n1. **Standards & Philosophy**: The [README.md](README.md) and [CLAUDE.md](CLAUDE.md) define the core mission—deterministic AI workflows—and the strict engineering constraints (KISS/YAGNI) required to maintain the monorepo.\n2. **Technical Reference & Analysis**: The [adapters](adapters.md) documentation defines the normalization of external events via `IPlatformAdapter`, while [graphify-out](graphify-out.md) provides a data-driven map of the system's 1,818 entities and their relationships.\n3. **Presentation Layer**: The [docs-web](docs-web.md) module aggregates these insights into \"The Book of Archon,\" a searchable Astro-based site.\n\n```mermaid\ngraph TD\n Standards[README.md / CLAUDE.md] -->|Engineering Rules| DocsWeb[docs-web Hub]\n Analysis[graphify-out] -->|Codebase Mapping| DocsWeb\n Technical[adapters] -->|Interface Specs| DocsWeb\n DocsWeb -->|Output| DevPortal[Developer Documentation Portal]\n```\n\n## Key Components\n\n### Knowledge Management\n* **[README.md](README.md)**: Acts as the entry point, explaining the transition from raw LLM capabilities to structured, stateful transitions using YAML-defined Workflows and Markdown-defined Commands.\n* **[CLAUDE.md](CLAUDE.md)**: Serves as the \"Source of Truth\" for development. It ensures that both human contributors and AI coding assistants adhere to the Bun-based monorepo standards and the \"Single-Developer Tool\" philosophy.\n\n### Technical Specifications\n* **[Platform Adapters](adapters.md)**: Details the normalization layer. It explains how platform-specific events (Slack, GitHub) are converted into a standard format for the Archon core using the `IPlatformAdapter` interface.\n* **[Graphify-Out](graphify-out.md)**: Provides a structural audit of the codebase. It identifies \"God Nodes\" (highly connected components) and functional communities, allowing developers to navigate the 500+ files in the project through semantic analysis.\n\n### Documentation Delivery\n* **[Docs-Web](docs-web.md)**: The central hub built on Astro and Starlight. It utilizes a Zod-validated content layer to ingest Markdown/MDX files from across the repository, providing a unified interface for platform adapter guides and technical references.","git-environment-isolation-core":"# Git & Environment Isolation — core\n\n# Git & Environment Isolation — Core\n\nThe **Isolation Operations** module provides the core business logic for managing isolated Git environments (worktrees). It serves as the orchestration layer between the database state (`isolation-environments`), the physical filesystem (`@archon/git`), and the cleanup policies defined in the `cleanup-service`.\n\n## Core Concepts\n\n### Isolation Environments\nAn isolation environment is a dedicated Git worktree associated with a specific branch and workflow. This module ensures that the metadata stored in the database remains synchronized with the actual state of the filesystem.\n\n### Ghost Reconciliation\nA \"ghost\" environment is a database record marked as active for which the corresponding directory on disk no longer exists (e.g., manual deletion by a user). \n- The module automatically detects these during listing and cleanup operations.\n- Ghost records are updated to a `destroyed` status in the database.\n- This reconciliation prevents the system from attempting operations on non-existent paths.\n\n---\n\n## Architecture and Data Flow\n\nThe module acts as a coordinator, ensuring that before any listing or cleanup occurs, the system has an accurate view of what is actually on disk.\n\n```mermaid\ngraph TD\n A[CLI / Command Handler] --> B[isolation-operations]\n B --> C{Reconcile Ghosts}\n C -->|Check Disk| D[@archon/git]\n C -->|Update DB| E[DB: isolation-environments]\n B --> F[cleanup-service]\n F --> D\n```\n\n---\n\n## Primary Operations\n\n### `listEnvironments()`\nRetrieves all active isolation environments, grouped by their parent codebase.\n\n1. **Fetch:** Queries the database for all active environments and unique codebases.\n2. **Reconcile:** For every environment found, it verifies the existence of the `working_path` via `worktreeExists`.\n3. **Update:** If a path is missing, the environment status is set to `destroyed`.\n4. **Group:** Returns a structured `EnvironmentListData` object containing `CodebaseEnvironments[]`, total counts, and the number of ghosts reconciled.\n\n**Note on Performance:** This function currently follows an N+1 pattern where it fetches codebase IDs first and then queries activity ages per codebase. This is a known area for future optimization via JOIN queries.\n\n### `cleanupStaleEnvironments(codebaseId, mainPath)`\nRemoves worktrees that have exceeded the allowed inactivity period.\n\n- **Pre-check:** Runs `reconcileGhosts` for the specific codebase to ensure the cleanup service doesn't process stale DB entries.\n- **Delegation:** Calls `cleanupStaleWorktrees` from the `cleanup-service`.\n- **Safety:** The underlying service checks for uncommitted changes before removal.\n\n### `cleanupMergedEnvironments(codebaseId, mainPath, options)`\nRemoves worktrees associated with branches that have already been merged into the main branch.\n\n- **Options:** Supports `includeClosed`, which allows cleaning up environments linked to closed Pull Requests even if the branch hasn't been fully merged.\n- **Delegation:** Directly wraps `cleanupMergedWorktrees`.\n\n---\n\n## Internal Helpers\n\n### `reconcileGhosts(envs)`\nThe primary synchronization logic. It iterates through a list of environment objects and performs the following:\n- Converts the stored `working_path` to a platform-specific path using `toWorktreePath`.\n- Checks filesystem existence.\n- Updates the DB status to `destroyed` if missing.\n- **Error Handling:** Errors during the filesystem check (e.g., permission issues) are caught and logged as warnings but do not halt the execution of the calling operation.\n\n### `extractCodebases(allEnvs)`\nA utility that reduces a flat list of environments into a unique set of `CodebaseInfo` objects (ID, Repository URL, and Default CWD).\n\n---\n\n## Integration Points\n\n- **Database:** Uses `listAllActiveWithCodebase`, `listByCodebaseWithAge`, and `updateStatus` from `../db/isolation-environments`.\n- **Git:** Relies on `@archon/git` for `worktreeExists` and path normalization.\n- **Cleanup:** Orchestrates high-level cleanup tasks via `../services/cleanup-service`.\n- **Logging:** Uses a lazy-initialized logger via `createLogger('operations')` to avoid side effects during module import.","git-environment-isolation-git":"# Git & Environment Isolation — git\n\n# Git & Environment Isolation — git\n\nThe `@archon/git` module provides a type-safe, developer-friendly wrapper around the Git CLI. It is the foundational layer for Archon's environment isolation strategy, managing the lifecycle of repositories and git worktrees.\n\n## Type Safety & Branded Types\n\nTo prevent the accidental misuse of string primitives, this module uses **Branded Types**. This ensures that a function expecting a branch name cannot accidentally receive a file path.\n\n| Type | Description | Constructor |\n| :--- | :--- | :--- |\n| `RepoPath` | Absolute path to a canonical git repository. | `toRepoPath(str)` |\n| `WorktreePath` | Absolute path to a git worktree directory. | `toWorktreePath(str)` |\n| `BranchName` | A git branch reference (e.g., `main`, `feature/auth`). | `toBranchName(str)` |\n\nAll constructors validate that the input string is non-empty before casting.\n\n---\n\n## Worktree Management\n\nArchon relies heavily on `git worktree` to create isolated environments for different tasks (e.g., processing an issue or running a skill) without duplicating the entire `.git` history.\n\n### Worktree Layouts\nThe module supports two primary layouts for where worktrees are stored:\n\n1. **`workspace-scoped` (Default):** Worktrees are stored in a centralized Archon directory: `~/.archon/workspaces/<owner>/<repo>/worktrees/`.\n2. **`repo-local` (Opt-in):** Worktrees are stored relative to the repository root (e.g., `<repo>/.worktrees/`). This is triggered by providing a `repoLocal` override in `WorktreeBaseOverride`.\n\n### Path Resolution Flow\nThe module resolves the identity of a repository (`owner/repo`) to determine the correct storage path.\n\n```mermaid\ngraph TD\n A[Start Resolution] --> B{codebaseName provided?}\n B -- Yes --> C[Use owner/repo from name]\n B -- No --> D{Path under ~/.archon/workspaces?}\n D -- Yes --> E[Extract segments from path]\n D -- No --> F[Fallback: Extract last 2 segments of RepoPath]\n C & E & F --> G[Final owner/repo identity]\n```\n\n### Key Worktree Functions\n- `getWorktreeBase(repoPath, codebaseName?, override?)`: Returns the base directory where worktrees for a specific repo should be created.\n- `verifyWorktreeOwnership(worktreePath, expectedRepo)`: A critical security guard. It reads the `.git` file in a worktree to ensure it actually points back to the expected canonical repository, preventing \"cross-checkout\" bugs where one repo's worktree is accidentally adopted by another.\n- `getCanonicalRepoPath(path)`: If given a worktree path, it resolves the path to the main repository root by parsing the `gitdir` pointer.\n\n---\n\n## Branch Operations\n\nThe module provides high-level abstractions for common branch tasks, with built-in logic for handling edge cases.\n\n### Default Branch Detection\n`getDefaultBranch(repoPath)` uses a fallback chain to identify the primary branch:\n1. `git symbolic-ref refs/remotes/origin/HEAD` (Remote default).\n2. Check if `origin/main` exists.\n3. Throw an error suggesting a manual override in `.archon/config.yaml`.\n\n### Merge & Patch Detection\n- `isBranchMerged(repoPath, branch, main)`: Checks if a branch is fully merged into the main branch.\n- `isPatchEquivalent(repoPath, branch, base)`: Uses `git cherry` to determine if a branch's commits are already present in the base branch (useful for detecting squash-merges where a simple merge check would fail).\n\n### Safety Guards\n- `hasUncommittedChanges(path)`: Returns `true` if the working directory is dirty. **Fail-safe:** If the git command fails for any reason (other than the directory not existing), it returns `true` to prevent accidental data loss during cleanup.\n- `commitAllChanges(path, message)`: Stages and commits all changes. It gracefully handles cases where `git add` normalizes line endings (CRLF to LF) resulting in a \"nothing to commit\" state.\n\n---\n\n## Repository Operations\n\n### Workspace Syncing\n`syncWorkspace(workspacePath, baseBranch?, options?)` is used to keep Archon's managed clones up to date.\n- **Fetch-only mode:** If `resetAfterFetch` is false, it only runs `git fetch`. This is safe for user-owned local repos.\n- **Hard-reset mode:** If true, it runs `git reset --hard origin/<branch>`. This is used for Archon-managed clones in `~/.archon/workspaces/` to ensure a clean state.\n\n### Cloning\n`cloneRepository(url, targetPath, options?)` handles repository initialization. It supports authenticated clones by injecting a token into the URL (e.g., `https://<token>@github.com/...`). The module automatically sanitizes error messages to ensure tokens are never leaked into logs.\n\n---\n\n## Error Handling\n\nThe module uses a `GitResult<T>` discriminated union for operations that have well-defined failure modes (like `cloneRepository` or `syncRepository`):\n\n```typescript\nexport type GitError =\n | { code: 'not_a_repo'; path: string }\n | { code: 'permission_denied'; path: string }\n | { code: 'branch_not_found'; branch: string }\n | { code: 'no_space'; path: string }\n | { code: 'unknown'; message: string };\n```\n\nFor internal logic, it uses a lazy-initialized logger (`createLogger('git')`) to ensure that test mocks can intercept the logger before it is instantiated. Unexpected Git errors are logged with full `stderr` context before being re-thrown as descriptive Errors.","other":"# Other\n\n# Operations Module\n\nThe `operations` module serves as the centralized entry point for high-level logic execution within the core package. It acts as a barrel file that aggregates and re-exports specialized operational logic, specifically focusing on workflow orchestration and execution isolation.\n\nBy consolidating these exports, the module provides a unified interface for other packages or internal services to access operational primitives without needing to reference deep file paths.\n\n## Module Structure\n\nThe module follows a flat aggregation pattern, exposing all members from its constituent sub-modules:\n\n```mermaid\ngraph TD\n Ops[operations/index.ts] --> WO[workflow-operations]\n Ops --> IO[isolation-operations]\n Consumer[External Consumers] --> Ops\n```\n\n### Workflow Operations\nRe-exported from `./workflow-operations`. This sub-module typically contains the logic for:\n* Defining and registering business logic workflows.\n* Managing execution state and step transitions.\n* Handling compensation logic and hooks.\n\n### Isolation Operations\nRe-exported from `./isolation-operations`. This sub-module is responsible for:\n* Managing execution contexts.\n* Ensuring resource or data isolation during operation execution.\n* Handling sandboxing or tenant-specific logic boundaries.\n\n## Usage Pattern\n\nDevelopers should import operational logic directly from the operations directory. This ensures that if the internal file structure of `workflow-operations` or `isolation-operations` changes, the public API remains stable.\n\n```typescript\n// Recommended usage\nimport { \n executeWorkflow, \n createIsolationContext \n} from '@medusajs/core/operations';\n```\n\n## Integration with Core\n\nThe `operations` module sits between the raw data/service layer and the consumer layer (such as API routes or CLI commands). It abstracts the complexity of coordinating multiple services or ensuring that code runs within a specific isolated environment.\n\n* **Workflow Integration:** Used when a process requires multiple steps, state persistence, or rollback capabilities.\n* **Isolation Integration:** Used when the system must guarantee that an operation does not leak side effects or access data outside of its designated scope.","overview":"# Archon — Wiki\n\n# Archon Wiki\n\nWelcome to the Archon development wiki. Archon is the first open-source harness builder for AI coding, designed to make AI-driven development deterministic, repeatable, and safe. By providing a structured workflow engine, Archon allows developers to move beyond simple chat interfaces into fully orchestrated autonomous coding agents.\n\n## System Architecture\n\nArchon is built as a modular monorepo that separates the \"intelligence\" of the AI from the \"mechanics\" of code manipulation and environment management.\n\n```mermaid\ngraph TD\n User([User Interface]) --> CLI[CLI Tooling]\n User --> Web[Web Frontend]\n CLI & Web --> API[API Server]\n API --> Adapters[Platform Adapters]\n Adapters --> Core[Core Orchestration]\n Core --> DB[(Database Layer)]\n Core --> Workflows[Workflow Engine]\n Workflows --> AI[AI Providers]\n Workflows --> Isolation[Git & Environment Isolation]\n Core -.-> Utils[System Utilities]\n```\n\n### Core Logic & Orchestration\nThe heart of the system is the [Core Orchestration](core-orchestration.md) module. It acts as the central routing hub, receiving inputs from various [Platform Adapters](platform-adapters.md) (such as CLI, Slack, or GitHub) and deciding whether to trigger a direct LLM response or initiate a complex sequence via the [Workflow Engine](workflow-engine.md).\n\n### Execution & Safety\nTo ensure that AI agents don't corrupt your local environment, Archon relies heavily on [Git & Environment Isolation](git-environment-isolation.md). This module manages ephemeral worktrees and isolated environments, allowing the [Workflow Engine](workflow-engine.md) to test and validate code changes before they are ever committed to your main branch.\n\n### Data & Infrastructure\nAll state—including conversation history, codebase indexes, and workflow status—is managed by the [Database Layer](database-layer.md), which supports both PostgreSQL for server deployments and SQLite for local CLI usage. The entire system is underpinned by [System Utilities & Configuration](system-utilities-configuration.md), which provides the logging, path resolution, and runtime orchestration necessary for the Bun-based environment.\n\n## Key End-to-End Flows\n\n1. **Request Ingestion**: A user sends a command via the [CLI Tooling](cli-tooling.md) or the [Web Frontend](web-frontend.md). The [API Server](api-server.md) validates the request and passes it to the [Platform Adapters](platform-adapters.md).\n2. **Context Resolution**: The [Core Orchestration](core-orchestration.md) queries the [Database Layer](database-layer.md) to retrieve project context and active isolation environments.\n3. **Workflow Execution**: If a task is identified (e.g., \"Refactor the login component\"), the [Workflow Engine](workflow-engine.md) coordinates with [AI Providers](ai-providers.md) to generate code and uses [Git & Environment Isolation](git-environment-isolation.md) to apply and test those changes in a sandbox.\n4. **Feedback Loop**: Results are streamed back through the orchestrator to the user, providing real-time visibility into the agent's progress.\n\n## Getting Started\n\nTo begin contributing to Archon, ensure you have the [Bun runtime](https://bun.sh) installed.\n\n1. **Initial Setup**: Run the setup script to configure authentication and environment variables:\n ```bash\n bun run setup-auth\n ```\n2. **Development Mode**: Start the core services and the development server:\n ```bash\n bun run dev\n ```\n3. **Web Interface**: If you are working on the UI, start the frontend separately:\n ```bash\n bun run dev:web\n ```\n\nFor detailed information on specific components, please navigate to the respective module pages linked above or explore the [Documentation System](documentation.md) for engineering standards and philosophy.","platform-adapters":"# Platform Adapters\n\n# Platform Adapters\n\nThe **Platform Adapters** module (`@archon/adapters`) provides a unified interface for Archon to communicate across different chat platforms and version control forges. It abstracts platform-specific APIs, message formatting constraints, and authentication mechanisms into a consistent set of behaviors used by the Orchestrator.\n\n## Architecture\n\nAdapters implement the `IPlatformAdapter` interface from `@archon/core`. They are categorized into **Chat Adapters** (real-time messaging) and **Forge Adapters** (Git-based collaboration tools).\n\n```mermaid\ngraph TD\n Orchestrator[Orchestrator Agent] --> IAdapter[IPlatformAdapter Interface]\n IAdapter --> Chat[Chat Adapters]\n IAdapter --> Forge[Forge Adapters]\n Chat --> Slack[SlackAdapter]\n Chat --> Telegram[TelegramAdapter]\n Chat --> Discord[DiscordAdapter]\n Forge --> GitHub[GitHubAdapter]\n Forge --> GitLab[GitLabAdapter]\n Forge --> Gitea[GiteaAdapter]\n```\n\n## Core Interface: `IPlatformAdapter`\n\nEvery adapter must implement the following key methods:\n\n| Method | Description |\n| :--- | :--- |\n| `sendMessage(id, msg)` | Sends a message to a specific channel, thread, or issue. |\n| `onMessage(handler)` | Registers a callback for incoming messages/events. |\n| `getConversationId(ctx)` | Extracts a unique identifier for the current chat context. |\n| `ensureThread(id, ctx)` | Ensures the response is contained within a thread/reply chain. |\n| `getStreamingMode()` | Returns whether the platform supports `stream` or `batch` delivery. |\n\n## Chat Adapters\n\n### Slack (`SlackAdapter`)\nUses the `@slack/bolt` SDK with **Socket Mode** enabled.\n- **Formatting:** Uses Slack \"Blocks\" with `markdown` type for AI responses.\n- **Message Splitting:** Automatically splits messages exceeding 12,000 characters into paragraph chunks.\n- **Threading:** Uses a `channel:ts` string format for conversation IDs to maintain thread continuity.\n- **Auth:** Supports a whitelist via `SLACK_ALLOWED_USER_IDS`.\n\n### Telegram (`TelegramAdapter`)\nUses the `grammY` framework.\n- **Formatting:** Converts GitHub-flavored markdown to Telegram **MarkdownV2** using `telegramify-markdown`.\n- **Resilience:** Implements a retry loop for `409 Conflict` errors (common during bot restarts when long-polling connections overlap).\n- **Constraints:** Strictly enforces the 4,096 character limit per message. If a message cannot be formatted without breaking, it falls back to stripped plain text.\n\n### Discord (`DiscordAdapter`)\nUses `discord.js` v14.\n- **Threading:** Automatically creates a new thread from a channel message if one doesn't exist. Thread names are generated from the first 100 characters of the user's prompt.\n- **Deduplication:** Uses an internal `pendingThreads` map to prevent race conditions where multiple concurrent AI responses might try to create a thread for the same message.\n- **Auth:** Supports a whitelist via `DISCORD_ALLOWED_USER_IDS`.\n\n## Forge Adapters\n\nForge adapters (GitHub, GitLab, Gitea) are more complex as they manage both communication (Issue/PR comments) and local repository state.\n\n### Common Forge Logic\n- **Webhook Handling:** Processes `issue_comment` and `pull_request` events.\n- **Repository Sync:** Uses `@archon/git` to clone or pull the latest code when a webhook is received.\n- **Command Detection:** Automatically scans the repository for `.archon/commands` or `.claude/commands` to register codebase-specific tools.\n- **Self-Filtering:** Prevents infinite loops by ignoring comments authored by the bot or containing the `<!-- archon-bot-response -->` marker.\n\n### Gitea (`GiteaAdapter`)\n- **API:** Interacts with Gitea's Swagger-based REST API.\n- **Conversation IDs:** Uses the format `owner/repo#number` for issues and `owner/repo!number` for pull requests.\n- **Signature Verification:** Validates incoming webhooks using HMAC-SHA256 headers.\n\n## Shared Utilities\n\n### Message Splitting\nLocated in `src/utils/message-splitting.ts`, the `splitIntoParagraphChunks` function is used by all adapters to handle platform-specific character limits. It attempts to split at double-newlines (`\\n\\n`) first to preserve readability, falling back to single newlines or character-count slices if necessary.\n\n### Authorization\nEach platform includes an `auth.ts` utility to manage access control:\n- **Whitelisting:** If the corresponding environment variable (e.g., `TELEGRAM_ALLOWED_USER_IDS`) is set, only those users can interact with the bot.\n- **Open Access:** If the variable is empty or unset, the adapter defaults to open access.\n\n### Markdown Processing\nThe Telegram adapter specifically relies on `src/chat/telegram/markdown.ts` to:\n1. Convert `##` headers to bold.\n2. Escape special characters (`_`, `*`, `[`, etc.) required by MarkdownV2.\n3. Strip markdown entirely for fallback plain-text delivery.\n\n## Configuration\n\nAdapters are typically initialized in the main server entry point using environment variables:\n\n| Variable | Used By |\n| :--- | :--- |\n| `SLACK_BOT_TOKEN` / `SLACK_APP_TOKEN` | Slack |\n| `TELEGRAM_BOT_TOKEN` | Telegram |\n| `DISCORD_BOT_TOKEN` | Discord |\n| `GITEA_TOKEN` / `GITEA_URL` | Gitea |\n| `GITHUB_TOKEN` / `GITHUB_WEBHOOK_SECRET` | GitHub |","system-utilities-configuration-bunfig-toml":"# System Utilities & Configuration — bunfig.toml\n\n# Bun Configuration (`bunfig.toml`)\n\nThe `bunfig.toml` file serves as the central configuration for the Bun runtime within the Remote Agentic Coding Platform. It defines global behaviors for the execution engine, with a primary focus on standardizing the testing environment across the monorepo.\n\n## Overview\n\nThis configuration ensures that Bun commands (specifically `bun test`) behave consistently regardless of whether they are triggered from the root directory or individual package directories. It streamlines the development workflow by automating test setup and coverage reporting.\n\n## Test Configuration\n\nThe `[test]` section defines how the Bun test runner interacts with the codebase.\n\n### Test Discovery\n* **`root = \"./packages\"`**: Limits the test crawler to the `packages/` directory. This is a critical optimization for this platform to prevent Bun from recursively searching through `workspace/` directories, worktrees, or build artifacts which might contain duplicate test files or heavy data sets generated by agentic tasks.\n\n### Lifecycle & Preloading\n* **`preload = [\"./packages/core/src/test/setup.ts\"]`**: Specifies a script to run before every test file. \n * **Location**: Resides in the `@archon/core` package.\n * **Purpose**: This script typically initializes global mocks, configures environment variables required for the agentic platform, and sets up the testing harness. By centralizing this in `core`, all packages benefit from a unified testing environment.\n\n### Code Coverage\n* **`coverage = true`**: Enables code coverage collection by default for all test runs.\n* **`coverageDir = \"coverage\"`**: Directs all coverage output (LCOV, text summaries) to the root `coverage/` directory, facilitating easy integration with CI/CD pipelines and local analysis tools.\n\n## Execution Flow\n\nWhen a developer or CI runner executes `bun test`, the following flow occurs:\n\n```mermaid\ngraph TD\n A[bun test command] --> B{Read bunfig.toml}\n B --> C[Scope discovery to ./packages]\n C --> D[Execute packages/core/src/test/setup.ts]\n D --> E[Run discovered tests]\n E --> F[Generate coverage report in /coverage]\n```\n\n## Usage in the Monorepo\n\nBecause this file is located at the project root, it acts as the \"source of truth\" for the Bun runtime. \n\n1. **Consistency**: It ensures that the `@archon/core` setup logic is applied even when running tests for peripheral packages.\n2. **Performance**: By restricting the `root` to `./packages`, it significantly reduces the I/O overhead during the test discovery phase, which is vital in a platform that may generate many temporary files in other directories.\n3. **Tooling**: Developers do not need to pass flags like `--preload` or `--coverage` manually; the environment is \"ready-to-test\" out of the box.","system-utilities-configuration-core":"# System Utilities & Configuration — core\n\n# System Utilities & Configuration — core\n\nThe `core` module serves as the central nervous system for Archon. It manages the hierarchical configuration system, orchestrates the lifecycle of ephemeral isolation environments (worktrees), and provides critical utilities for concurrency, security, and path resolution.\n\n## Configuration Management\n\nArchon uses a multi-layered configuration strategy. Settings are merged from four sources in increasing order of precedence:\n\n1. **Defaults**: Hardcoded system defaults.\n2. **Global Config**: User-specific preferences located at `~/.archon/config.yaml`.\n3. **Repository Config**: Project-specific settings located at `.archon/config.yaml` within a codebase.\n4. **Environment Variables**: Runtime overrides (e.g., `DEFAULT_AI_ASSISTANT`, `MAX_CONCURRENT_CONVERSATIONS`).\n\n### Key Functions\n\n- `loadConfig(repoPath?: string)`: The primary entry point. It bootstraps the provider registry (Claude, Codex, etc.) and performs a deep merge of all configuration layers.\n- `updateGlobalConfig(updates: Partial<GlobalConfig>)`: Persists partial updates back to the global YAML file, ensuring non-updated fields are preserved.\n- `toSafeConfig(config: MergedConfig)`: Projects the internal configuration into a `SafeConfig` object. This strips sensitive filesystem paths and internal server fields before sending data to web clients.\n\n### Security & Provider Defaults\nThe system uses an **allowlist-based projection** for assistant settings. Only fields explicitly defined in `SAFE_ASSISTANT_FIELDS` (e.g., `model`, `webSearchMode`) are exposed to the UI. This prevents accidental leakage of local binary paths or credentials stored in the configuration.\n\n---\n\n## Cleanup Service\n\nThe `CleanupService` manages the lifecycle of isolation environments (git worktrees and branches) to prevent disk exhaustion and resource clutter.\n\n### Cleanup Triggers\n\n| Trigger | Action |\n| :--- | :--- |\n| **Conversation Closed** | Triggered by platform events (e.g., GitHub Issue/PR closed). Calls `onConversationClosed`. |\n| **Scheduled Task** | Runs every few hours (configurable via `CLEANUP_INTERVAL_HOURS`). Calls `runScheduledCleanup`. |\n| **Resource Pressure** | Triggered when worktree limits are reached. Calls `cleanupToMakeRoom`. |\n\n### Safety Logic\nBefore removing an environment, the service performs a multi-step safety check:\n1. **Uncommitted Changes**: Uses `git status` to ensure no work is lost.\n2. **Active Sessions**: Checks the database for active AI sessions or locks.\n3. **Merge Status**: Determines if a branch is safe to delete by checking:\n - Git ancestry (`git branch --merged`).\n - Patch equivalence (detecting squash-merges via `git cherry`).\n - Remote PR state (checking if the GitHub PR is `MERGED` or `CLOSED`).\n\n### Environment Removal Flow\n\n```mermaid\ngraph TD\n A[Cleanup Trigger] --> B{Path Exists?}\n B -- No --> C[Mark DB as Destroyed]\n B -- Yes --> D{Uncommitted Changes?}\n D -- Yes --> E[Skip Cleanup]\n D -- No --> F{Active Sessions?}\n F -- Yes --> E\n F -- No --> G[Invoke Isolation Provider Destroy]\n G --> H[Delete Local/Remote Branch]\n H --> C\n```\n\n---\n\n## System Utilities\n\n### Conversation Locking\nThe `ConversationLockManager` (in `src/utils/conversation-lock.ts`) prevents race conditions when multiple messages arrive for the same conversation. It ensures that operations like workflow execution or state updates are serialized per conversation ID.\n\n### Credential Sanitization\nThe `credential-sanitizer.ts` utility provides `sanitizeCredentials` and `sanitizeError`. These functions use regex patterns to redact sensitive information (API keys, tokens, passwords) from logs and error messages before they are persisted or displayed.\n\n### Path & Port Management\n- **Path Validation**: Ensures that requested workspaces or worktree paths are within allowed boundaries, preventing directory traversal attacks.\n- **Port Allocation**: Manages dynamic port assignment for local services or debuggers running within isolation environments, ensuring no collisions occur between concurrent workflows.\n\n### Error Handling\nThe module defines a structured error hierarchy. `classifyAndFormatError` (in `src/utils/error-formatter.ts`) transforms raw Node.js or Git errors into developer-friendly messages with actionable context, which are then used by platform adapters (GitHub, Slack, etc.) to provide feedback to the user.\n\n## Configuration Schema Reference\n\n### Repository Config (`.archon/config.yaml`)\n```yaml\nassistant: codex\nworktree:\n baseBranch: main\n copyFiles: [\".env.local\"]\n initSubmodules: true\nenv:\n DEBUG: \"archon:*\"\ncommands:\n folder: \"custom-commands/\"\n```\n\n### Global Config (`~/.archon/config.yaml`)\n```yaml\nbotName: Archon-Dev\ndefaultAssistant: claude\nassistants:\n claude:\n model: sonnet\nconcurrency:\n maxConversations: 5\n```","system-utilities-configuration-eslint-config-mjs":"# System Utilities & Configuration — eslint.config.mjs\n\n# ESLint Configuration (eslint.config.mjs)\n\nThis module defines the centralized linting strategy for the monorepo using the ESLint \"Flat Config\" format. It integrates TypeScript type-checking, stylistic enforcement, and Prettier compatibility to ensure code quality across all packages and scripts.\n\n## Architecture Overview\n\nThe configuration is built using `typescript-eslint`'s utility wrapper, which merges global ignores, base recommended sets, and project-specific overrides into a single pipeline.\n\n```mermaid\ngraph TD\n A[Global Ignores] --> E[Final Config]\n B[ESLint Recommended] --> E\n C[TS-ESLint Strict/Stylistic] --> E\n D[Prettier Config] --> E\n F[Project Overrides] --> E\n```\n\n## Key Components\n\n### 1. Global Ignores\nThe configuration defines a broad set of exclusions to prevent linting non-source files or auto-generated content. Key categories include:\n* **Build Artifacts:** `dist/`, `node_modules/`, `coverage/`.\n* **Generated Code:** `**/*.generated.ts`, `**/*.generated.d.ts`, and OpenApi outputs.\n* **Third-Party/UI Components:** `packages/web/src/components/ui/**` (shadcn/ui) and `packages/web/src/lib/utils.ts`.\n* **Environment/Tooling:** `.archon/`, `.claude/`, and `workspace/` directories.\n* **Tests & Mocks:** `**/*.test.ts` and `**/src/test/**` are excluded from the primary linting pass to allow for more flexible testing patterns.\n\n### 2. Type-Checked Linting\nThe configuration utilizes `typescript-eslint`'s `projectService` to enable rules that require type information.\n\n* **Scope:** Targets `packages/*/src/**/*.{ts,tsx}` and `scripts/**/*.ts`.\n* **Parser Options:** \n * `projectService: true`: Automatically detects the nearest `tsconfig.json` for every file, eliminating the need to manually list project paths.\n * `tsconfigRootDir: import.meta.dirname`: Ensures paths are resolved relative to the repository root.\n\n### 3. Rule Philosophy\n\nThe ruleset balances strict type safety with developer velocity, particularly when interacting with external SDKs.\n\n#### Enforced Rules (Errors)\nThese rules are non-negotiable and focus on maintainability and explicit intent:\n* **Explicit Contracts:** `@typescript-eslint/explicit-function-return-type` and `@typescript-eslint/no-explicit-any` ensure type boundaries are well-defined.\n* **Naming Conventions:** Enforces `PascalCase` for interfaces and types, and `camelCase` for functions and variables. Interfaces may optionally start with `I`.\n* **Safety:** `@typescript-eslint/no-non-null-assertion` prevents the use of the `!` operator, forcing explicit null checks.\n* **Cleanliness:** Unused variables are errors unless prefixed with an underscore (e.g., `_unused`).\n\n#### Disabled Rules (Rationale)\nSeveral strict rules are disabled to accommodate specific architectural needs:\n* **External SDK Interop:** Rules like `no-unsafe-assignment` and `no-unsafe-member-access` are disabled because many external dependencies provide incomplete or `any` types.\n* **Defensive Coding:** `no-unnecessary-condition` is disabled to allow for defensive \"just-in-case\" checks and guards that might technically be constant according to current types but are useful for runtime resilience.\n* **Async/Promise Handling:** `no-floating-promises` and `no-misused-promises` are disabled to simplify event-driven patterns and SDK integrations where promise lifecycle management is handled externally.\n* **Environment Variables:** `prefer-nullish-coalescing` is disabled to allow the use of `||` for environment variable defaults (where an empty string should be treated as \"missing\").\n\n## Integration with Prettier\n`eslint-config-prettier` is loaded last in the configuration array. This ensures that all stylistic rules from ESLint or TypeScript-ESLint that might conflict with Prettier's formatting are automatically disabled.\n\n## Usage and Contribution\nWhen adding a new package to the monorepo:\n1. Ensure the package source is located under `packages/[name]/src`.\n2. The `projectService` will automatically pick up the new package's `tsconfig.json`.\n3. If the package contains auto-generated code (e.g., from a schema), add the path to the `ignores` array in this file.","system-utilities-configuration-package-json":"# System Utilities & Configuration — package.json\n\n# Archon Root Configuration (package.json)\n\nThe root `package.json` serves as the central orchestrator for the Archon monorepo. It defines the workspace structure, manages project-wide dependencies, and provides a unified interface for development, testing, and distribution tasks using the **Bun** runtime.\n\n## Monorepo Architecture\n\nArchon is structured as a monorepo using Bun workspaces. The root configuration manages all sub-packages located within the `packages/` directory.\n\n```mermaid\ngraph TD\n Root[Root package.json] --> CLI[packages/cli]\n Root --> Server[packages/server]\n Root --> Web[packages/web]\n Root --> Docs[packages/docs-web]\n Root --> Scripts[scripts/]\n```\n\n### Key Metadata\n- **Type**: `module` (ES Modules are used throughout the project).\n- **Runtime Requirement**: Bun `^1.3.0` is enforced via the `engines` field.\n- **Workspaces**: All directories under `packages/*` are treated as individual members of the monorepo.\n\n## Command Interface\n\nThe `scripts` section provides a standardized API for interacting with the various components of the system.\n\n### Development & Execution\n- `bun run cli`: Direct entry point to the CLI tool (`packages/cli/src/cli.ts`).\n- `bun run dev`: Starts development mode for all packages simultaneously.\n- `bun run dev:server` / `dev:web` / `dev:docs`: Targeted development commands for specific components using Bun's `--filter` flag.\n- `bun run setup-auth`: Triggers the authentication setup routine within the `@archon/server` package.\n\n### Build & Distribution\n- `bun run build`: Compiles all packages in the workspace.\n- `bun run build:binaries`: Executes `scripts/build-binaries.sh` to generate platform-specific executables.\n- `bun run build:checksums`: Generates integrity hashes for build artifacts via `scripts/checksums.sh`.\n- `bun run generate:bundled`: Runs a utility script to refresh bundled default configurations.\n\n### Quality Assurance (The Validation Pipeline)\nThe `validate` script is the primary gatekeeper for CI/CD and local pre-commit checks. It executes the following sequence:\n1. **Bundled Defaults**: Ensures bundled configurations are up to date (`check:bundled`).\n2. **Type Safety**: Runs `type-check` across all packages and the `scripts/` directory.\n3. **Linting**: Executes ESLint with a zero-warning tolerance.\n4. **Formatting**: Verifies code style via Prettier.\n5. **Testing**: Runs the full test suite in parallel across all workspaces.\n\n## Dependency Management\n\n### Core Dependencies\nThe root manages the `@anthropic-ai/claude-agent-sdk`, indicating that LLM integration is a foundational element shared or managed at the top level.\n\n### Tooling & Linting\nThe project uses a modern linting stack:\n- **ESLint 9+**: Configured with `typescript-eslint`.\n- **Prettier**: For consistent code formatting.\n- **Husky & lint-staged**: Used to enforce code quality at the git-commit level (configured via the `prepare` script).\n\n### Dependency Overrides\nThe `overrides` field is utilized to pin specific versions of sub-dependencies (like `axios`, `qs`, and `path-to-regexp`). This is primarily used to resolve security vulnerabilities or ensure compatibility across the monorepo when nested dependencies might otherwise conflict.\n\n## Usage Patterns\n\n### Filtering Commands\nMost scripts leverage the `bun --filter` flag. This allows developers to run commands against specific packages from the root without navigating into subdirectories:\n\n```bash\n# Run tests only for the server package\nbun --filter @archon/server test\n\n# Build only the web interface\nbun --filter @archon/web build\n```\n\n### Adding New Packages\nWhen adding a new package to `packages/`, ensure it is named according to the `@archon/` scope to maintain consistency with the existing filtering scripts and workspace references.","system-utilities-configuration-paths":"# System Utilities & Configuration — paths\n\n# System Utilities & Configuration — paths\n\nThe `@archon/paths` module is the foundational utility layer for the Archon ecosystem. It provides centralized path resolution, environment variable isolation, structured logging, and telemetry. It is designed to work across local development, Docker environments, and compiled Bun binaries.\n\n## Directory Structure\n\nArchon follows a project-centric directory structure rooted in the \"Archon Home\" directory.\n\n* **Docker:** `/.archon/`\n* **Local:** `~/.archon/` (overridable via `ARCHON_HOME`)\n\n```text\n~/.archon/\n├── workspaces/\n│ └── {owner}/\n│ └── {repo}/\n│ ├── source/ # Symlink to local path or git clone\n│ ├── worktrees/ # Git worktrees for this project\n│ ├── artifacts/ # Workflow artifacts (runs/{id}/)\n│ └── logs/ # Workflow execution logs ({id}.jsonl)\n├── workflows/ # Global user workflows\n├── commands/ # Global user commands\n├── scripts/ # Global user scripts\n├── web-dist/ # Cached Web UI distributions\n├── config.yaml # Global configuration\n├── .env # User-scope environment variables\n└── telemetry-id # Anonymous installation UUID\n```\n\n## Path Resolution\n\nThe module provides functions to resolve paths for various entities. Most functions are project-aware, requiring an `owner` and `repo` string.\n\n### Core Functions\n- `getArchonHome()`: Returns the base directory for all Archon data.\n- `getProjectRoot(owner, repo)`: Returns the base directory for a specific project within the workspaces folder.\n- `getProjectSourcePath(owner, repo)`: Returns the path to the project's source code.\n- `getRunArtifactsPath(owner, repo, runId)`: Returns the directory for artifacts generated during a specific workflow run.\n\n### Search Paths\nArchon uses prioritized search paths for discovering commands and workflows:\n1. **Repo-scope:** `<repo>/.archon/commands`\n2. **Home-scope:** `~/.archon/commands`\n3. **Bundled:** Internal defaults provided by the application.\n\nFunctions like `getCommandFolderSearchPaths()` and `getWorkflowFolderSearchPaths()` return these directories in priority order.\n\n## Environment Isolation & Loading\n\nArchon implements a strict \"Three-Path\" environment model to prevent security leaks and configuration conflicts. This is particularly important because Bun automatically loads `.env` files from the current working directory (CWD).\n\n### The Boot Sequence\nTo ensure isolation, Archon entry points must follow this specific import and execution order:\n\n1. **Strip CWD Env:** Import `@archon/paths/strip-cwd-env-boot`. This is a side-effect import that immediately deletes keys from `process.env` that were auto-loaded by Bun from the target repository's `.env` files. It also strips \"Claude Code\" session markers to prevent deadlocks when running inside a Claude Code terminal.\n2. **Load Archon Env:** Call `loadArchonEnv(cwd)`. This loads environment variables from Archon-owned locations:\n * `~/.archon/.env` (User-scope defaults)\n * `<cwd>/.archon/.env` (Project-specific overrides)\n\n```mermaid\ngraph TD\n A[Bun Starts] --> B[Bun auto-loads CWD/.env]\n B --> C[Import strip-cwd-env-boot]\n C --> D[process.env cleaned]\n D --> E[loadArchonEnv]\n E --> F[Load ~/.archon/.env]\n F --> G[Load CWD/.archon/.env]\n G --> H[Archon Ready]\n```\n\n## Structured Logging\n\nThe module exports a Pino-based logger configured for both human readability and machine parsing.\n\n### Usage\n```typescript\nimport { createLogger } from '@archon/paths';\n\nconst log = createLogger('module.name');\nlog.info({ detail: 'data' }, 'event_name');\n```\n\n### Configuration\n- **Log Levels:** Supports `fatal`, `error`, `warn`, `info` (default), `debug`, and `trace`.\n- **Output Format:** \n - If `stdout` is a TTY and `NODE_ENV` is not `production`, it uses `pino-pretty`.\n - Otherwise, it outputs newline-delimited JSON.\n- **Binary Compatibility:** The logger uses a destination stream for `pino-pretty` to avoid filesystem resolution issues within compiled Bun binaries.\n\n## Telemetry\n\nArchon collects anonymous telemetry via PostHog to track workflow usage.\n\n- **Event:** `workflow_invoked`\n- **Identity:** A random UUID stored in `~/.archon/telemetry-id`. No PII or user identity is collected.\n- **Opt-out:** Telemetry is disabled if `ARCHON_TELEMETRY_DISABLED=1` or `DO_NOT_TRACK=1` is set in the environment.\n- **Resilience:** All telemetry calls are fire-and-forget. Network failures or API errors are swallowed and logged only at the `debug` level to ensure they never interrupt the application flow.\n\n## Update Checking\n\nThe `update-check` utility monitors for new versions of Archon by querying the GitHub Releases API.\n\n- **Caching:** Results are cached in `~/.archon/update-check.json` for one hour to avoid rate limiting.\n- **Binary Only:** Update checks are typically only performed when `BUNDLED_IS_BINARY` is true.\n- **Functions:**\n - `checkForUpdate(currentVersion)`: Performs a network check (or returns cached data).\n - `getCachedUpdateCheck(currentVersion)`: Synchronously returns the last known check result.\n\n## Build Constants\n\nThe `bundled-build.ts` file contains constants that are overwritten during the binary compilation process by build scripts.\n\n- `BUNDLED_IS_BINARY`: `true` in compiled releases, `false` in development.\n- `BUNDLED_VERSION`: The version string of the build.\n- `BUNDLED_GIT_COMMIT`: The git SHA at build time.\n\nThese constants allow the code to perform runtime logic based on whether it is running as a standalone binary or from source.","system-utilities-configuration-tsconfig-json":"# System Utilities & Configuration — tsconfig.json\n\n# TypeScript Configuration (`tsconfig.json`)\n\nThis module defines the TypeScript compilation strategy, type-checking rigor, and environment compatibility for the project. It is optimized for modern JavaScript environments, specifically targeting the **Bun** runtime.\n\n## Core Compilation Strategy\n\nThe configuration targets **ES2022**, allowing the use of modern syntax features (such as top-level await, class fields, and ergonomic brand checks) while maintaining compatibility with contemporary runtimes.\n\n### Module Resolution\nThe project utilizes a modern resolution strategy tailored for bundlers and high-performance runtimes:\n* **Module System**: Set to `ESNext` to support standard ECMAScript modules.\n* **Resolution**: Uses `bundler` resolution, which mimics the behavior of tools like Bun, Vite, or Webpack, allowing for more flexible imports (e.g., omitting extensions or resolving via the `exports` field in `package.json`).\n* **JSON Support**: `resolveJsonModule` is enabled, permitting direct imports of `.json` files as typed objects.\n\n## Type Checking & Quality Standards\n\nThe configuration enforces a \"Strict-First\" policy to ensure maximum type safety and code quality.\n\n| Option | Impact |\n| :--- | :--- |\n| `strict` | Enables all strict type-checking options (e.g., `noImplicitAny`, `strictNullChecks`). |\n| `noUnusedLocals` | Errors when local variables are declared but never used. |\n| `noUnusedParameters` | Errors when function parameters are defined but not consumed. |\n| `noImplicitReturns` | Ensures all code paths in a function return a value. |\n| `noFallthroughCasesInSwitch` | Prevents accidental fallthrough between switch cases. |\n\n## Environment & Global Types\n\nThe project is explicitly configured for the **Bun** ecosystem.\n\n* **Types**: The `types` array includes `bun-types`, providing global type definitions for Bun-specific APIs (e.g., `Bun.serve`, `Bun.file`).\n* **Global Declarations**: The `include` array explicitly tracks `global.d.ts`. This file typically contains custom ambient type definitions or interface augmentations used across the project.\n\n## Build & Debugging Output\n\nThe configuration is set up to support both library consumption and efficient debugging:\n\n```mermaid\ngraph LR\n TS[TypeScript Source] --> JS[ES2022 JavaScript]\n TS --> DTS[.d.ts Declaration Files]\n TS --> SM[Source Maps]\n DTS --> DM[Declaration Maps]\n style TS fill:#3178c6,color:#fff\n```\n\n* **Declarations**: `declaration: true` generates `.d.ts` files, allowing the code to be consumed as a library with full type support.\n* **Mapping**: `declarationMap` and `sourceMap` are enabled. This allows consumers and debuggers to map compiled code and type definitions back to the original `.ts` source files, significantly improving the developer experience during step-through debugging.\n\n## Interoperability\n\n* **esModuleInterop**: Enabled to provide a consistent interface for importing CommonJS modules as if they were ES modules.\n* **forceConsistentCasingInFileNames**: Enforces case sensitivity in imports, preventing build failures when moving code between case-insensitive (macOS/Windows) and case-sensitive (Linux) file systems.\n* **skipLibCheck**: Set to `true` to skip type checking of declaration files (`.d.ts`) in `node_modules`. This significantly reduces compilation time by assuming third-party type definitions are correct.","system-utilities-configuration":"# System Utilities & Configuration\n\n# System Utilities & Configuration\n\nThe **System Utilities & Configuration** module provides the foundational infrastructure, runtime environment, and development standards for the Archon platform. It ensures consistency across the monorepo by managing how code is compiled, linted, executed, and how it interacts with the host file system.\n\n## Module Architecture\n\nThis module group bridges the gap between the raw Bun runtime and the high-level application logic. It is organized into three functional layers:\n\n### 1. Runtime & Workspace Orchestration\nThese modules define the execution environment and project structure.\n* **[Root Configuration (package.json)](package-json.md):** Orchestrates the Bun workspace, managing dependencies and scripts across the `packages/` directory.\n* **[Bun Configuration (bunfig.toml)](bunfig-toml.md):** Standardizes the execution engine and test runner behavior across local and CI environments.\n\n### 2. Development & Quality Standards\nThese modules enforce code quality and compilation strategies.\n* **[TypeScript Configuration (tsconfig.json)](tsconfig-json.md):** Defines the ES2022 compilation strategy and type-checking rigor optimized for the Bun runtime.\n* **[ESLint Configuration (eslint.config.mjs)](eslint-config-mjs.md):** Implements a centralized linting and stylistic enforcement pipeline using the ESLint \"Flat Config\" format.\n\n### 3. System Logic & Environment\nThe functional core that handles physical paths, environment variables, and configuration merging.\n* **[Paths & Foundation (@archon/paths)](paths.md):** Provides centralized path resolution (e.g., `~/.archon/`), environment isolation, and structured logging.\n* **[Core System (core)](core.md):** Manages the hierarchical configuration system and orchestrates the lifecycle of ephemeral worktrees.\n\n## Key Integrated Workflows\n\n### Environment Initialization\nWhen the system initializes, `paths` detects the execution context (Docker vs. Local) to set the \"Archon Home\" directory. `core` then utilizes this base path to load and merge configurations from four distinct levels: system defaults, global user configs, repository-specific settings, and runtime environment variables.\n\n### Isolation & Worktree Management\nThe system manages project-centric isolation through a coordinated flow between `core` and `paths`.\n\n```mermaid\ngraph LR\n A[Core Orchestrator] -->|Requests Path| B[Paths Utility]\n B -->|Detects Env| C{Docker or Local?}\n C -->|Local| D[~/.archon/workspaces]\n C -->|Docker| E[/.archon/workspaces]\n D --> F[Worktree Lifecycle]\n E --> F\n F -->|Logs Events| G[Structured Logger]\n```\n\n### Unified Testing & Linting\nBy centralizing `bunfig.toml` and `eslint.config.mjs` at the root, the module ensures that a `bun test` or `lint` command executed in any sub-package (via `package.json` workspaces) follows the same rules, uses the same path aliases, and reports coverage consistently.","web-frontend":"# Web Frontend\n\n# Web Frontend\n\nThe Archon Web Frontend is a React-based Single Page Application (SPA) built with Vite, TypeScript, and Tailwind CSS. It serves as the primary interface for interacting with the Archon agent, managing codebases, and building/monitoring workflows.\n\n## Architecture Overview\n\nThe application follows a standard React architecture with a focus on real-time updates via Server-Sent Events (SSE) and robust state management using TanStack Query and Zustand.\n\n```mermaid\ngraph TD\n UI[React Components]\n SSE[useSSE Hook]\n RQ[TanStack Query]\n ZS[Zustand Workflow Store]\n API[API Layer / fetchJSON]\n \n UI --> SSE\n UI --> RQ\n UI --> ZS\n RQ --> API\n SSE --> ZS\n API --> Backend[(Archon API)]\n Backend -- SSE Stream --> SSE\n```\n\n### Core Technologies\n- **Framework**: React 19 with `react-router` v7.\n- **Styling**: Tailwind CSS 4 with Shadcn/UI (Radix UI primitives).\n- **Data Fetching**: `@tanstack/react-query` for RESTful state.\n- **Real-time**: Server-Sent Events (SSE) for streaming chat and workflow progress.\n- **Global State**: `zustand` for ephemeral execution state and `ProjectContext` for workspace selection.\n- **Visualizations**: `@xyflow/react` (React Flow) for the Workflow Builder.\n\n---\n\n## State Management Strategy\n\nThe frontend distinguishes between three types of state:\n\n1. **Server State (TanStack Query)**: Used for canonical data like conversation history, codebase lists, and workflow definitions.\n2. **Execution State (Zustand)**: Managed in `workflow-store.ts`. This tracks live workflow runs, node statuses, and tool outputs. It is updated primarily via SSE and persists across route changes so users can navigate away from a running workflow without losing progress.\n3. **UI/Context State**: `ProjectContext` tracks the currently active project ID across the entire application.\n\n---\n\n## Chat System\n\nThe chat system is the most complex part of the module, handling interleaved text, tool calls, and workflow dispatches.\n\n### Message Lifecycle\n1. **Optimistic Update**: When a user sends a message via `MessageInput`, a local message and a \"thinking\" placeholder are added to the state immediately.\n2. **SSE Connection**: `ChatInterface` uses the `useSSE` hook to listen for events.\n3. **Reduction**: As chunks arrive, `applyOnText` (in `chat-message-reducer.ts`) updates the message content.\n4. **Hydration & Synchronization**:\n * `isSendInFlight` (from `message-cache.ts`) prevents the UI from flickering or losing the streaming placeholder during React's mount/unmount cycles.\n * If a user refreshes, `getMessages` fetches the DB-persisted history, which is then merged with any active SSE state.\n\n### Tool & Workflow Integration\n- **ToolCallCard**: Displays live tool execution. It calculates elapsed time locally while a tool is running.\n- **WorkflowProgressCard**: Embedded in the chat when a workflow is dispatched. It subscribes to the `workflow-store` to show node-by-node progress.\n\n---\n\n## Workflow Module\n\nThe workflow module consists of three main areas:\n\n### 1. Workflow Builder\nLocated in `src/components/workflows/WorkflowBuilder.tsx`, it uses `@xyflow/react` to provide a drag-and-drop interface for DAG (Directed Acyclic Graph) construction.\n- **Validation**: `useBuilderValidation` runs `hasCycle` checks and schema validation on the fly.\n- **Serialization**: `YamlCodeView` converts the visual graph into the YAML format expected by the backend.\n\n### 2. Execution Tracking\nWhen a workflow runs, it is tracked in the `workflow-store`.\n- **Status Polling**: For terminal states or when SSE is unavailable, the store uses `getWorkflowRun` to sync status.\n- **Approval Nodes**: If a workflow hits a `pause` node, `WorkflowProgressCard` renders approval/rejection buttons that trigger `approveWorkflowRun` or `rejectWorkflowRun` API calls.\n\n### 3. Dashboard\nThe `DashboardPage` provides a high-level view of all activity. It uses `StatusSummaryBar` to filter runs by status, project, or date range.\n\n---\n\n## API Layer\n\nThe API layer is located in `src/lib/api.ts`.\n\n- **Type Safety**: Types are generated from the backend OpenAPI spec into `src/lib/api.generated.d.ts` via `npm run generate:types`.\n- **fetchJSON**: A wrapper around the native `fetch` API that handles:\n - Base URL configuration.\n - JSON serialization/deserialization.\n - Error classification (transient vs. fatal).\n\n---\n\n## Key Components & Hooks\n\n| Name | Purpose |\n| :--- | :--- |\n| `useSSE` | Manages the EventSource connection and dispatches events to callbacks. |\n| `useAutoScroll` | Handles \"stick-to-bottom\" behavior in chat and log views. |\n| `MessageBubble` | Renders Markdown, handles code highlighting, and detects artifact links. |\n| `ArtifactViewerModal` | Provides a preview for files generated during workflow runs. |\n| `ConfirmRunActionDialog` | A reusable Radix-based dialog for destructive actions (delete, cancel, reject). |\n\n## Development Patterns\n\n### Adding a New Route\n1. Define the component in `src/routes/`.\n2. Add the `<Route>` entry in `src/App.tsx`.\n3. If the route needs the sidebar/header, wrap it within the `<Layout>` route.\n\n### Handling File Uploads\nFile uploads are handled in `MessageInput.tsx`. It validates files against `ACCEPTED_EXTENSIONS` and `MAX_FILE_BYTES` before passing them to `apiSendMessage`, which uses `FormData` to transmit the binary data alongside the message text.\n\n### Artifact Links\nThe frontend identifies artifact paths in text (e.g., `artifacts/runs/...`) using `ARTIFACT_PATH_RE`. These are automatically converted into either downloadable links or clickable buttons that open the `ArtifactViewerModal`.","workflow-engine-core":"# Workflow Engine — core\n\n# Workflow Engine — Core\n\nThe **Workflow Engine Core** module serves as the integration layer between the `@archon/workflows` execution engine and the `@archon/core` infrastructure. It provides two primary capabilities:\n\n1. **Store Adapter**: A bridge that maps the Archon database schema and configuration loaders to the interfaces required by the workflow engine.\n2. **Workflow Operations**: High-level business logic for managing the lifecycle of workflow runs (approvals, rejections, resumes, and cancellations).\n\n## Architecture Overview\n\nThe module acts as a mediator. The workflow engine itself is agnostic of the database implementation; this core module provides the concrete implementation of the \"Store\" and \"Dependencies\" traits.\n\n```mermaid\ngraph TD\n subgraph \"@archon/workflows (Engine)\"\n Executor[Workflow Executor]\n IStore[[IWorkflowStore Interface]]\n end\n\n subgraph \"@archon/core (This Module)\"\n Adapter[Store Adapter]\n Ops[Workflow Operations]\n end\n\n subgraph \"Infrastructure\"\n DB[(Database)]\n Config[Config Loader]\n Providers[Agent Providers]\n end\n\n Executor --> IStore\n Adapter -- implements --> IStore\n Adapter --> DB\n Ops --> DB\n Ops --> Adapter\n Adapter --> Config\n Adapter --> Providers\n```\n\n---\n\n## Store Adapter\n\nThe Store Adapter translates internal database calls into the `IWorkflowStore` interface. This ensures that the workflow engine can persist state, log events, and retrieve codebase information without being coupled to the specific DB schema.\n\n### `createWorkflowStore()`\nReturns an implementation of `IWorkflowStore`. It delegates to specialized database modules:\n* **Runs**: `workflowDb` for creating, updating, and retrieving workflow run statuses.\n* **Events**: `workflowEventDb` for logging execution steps and retrieving DAG node outputs.\n* **Codebases**: `codebaseDb` and `envVarDb` for workspace and environment configuration.\n\n**Key Pattern: Non-throwing Events**\nThe `createWorkflowEvent` method is wrapped to guarantee a non-throwing contract. If a database write fails, it logs the error via `createLogger('workflow.store-adapter')` but allows the workflow execution to attempt to continue.\n\n### `createWorkflowDeps()`\nThe canonical entry point for initializing the workflow engine. It returns a `WorkflowDeps` object containing:\n* The `store` (via `createWorkflowStore`).\n* `getAgentProvider`: For resolving LLM and tool capabilities.\n* `loadConfig`: The core configuration loader.\n\n---\n\n## Workflow Operations\n\nWorkflow operations provide the logic used by CLI commands and API handlers to manipulate active runs.\n\n### Lifecycle Management\n\n| Function | Purpose | Valid Statuses |\n| :--- | :--- | :--- |\n| `getWorkflowStatus()` | Lists up to 50 `running` or `paused` runs. | N/A |\n| `resumeWorkflow()` | Validates if a run can be restarted. | `failed`, `paused` |\n| `abandonWorkflow()` | Marks a run as `cancelled`. | Any non-terminal status |\n\n### Human-in-the-Loop (HITL) Logic\n\nThe core logic for handling user feedback is contained in `approveWorkflow` and `rejectWorkflow`. These functions do not execute the workflow directly; instead, they update the database state so the engine can pick up the run on its next invocation.\n\n#### `approveWorkflow(runId, comment)`\nHandles two distinct approval types defined in the `ApprovalContext`:\n\n1. **`interactive_loop`**:\n * Writes an `approval_received` event.\n * Stores the user's comment in `metadata.loop_user_input`.\n * Transitions status to `failed`.\n * *Note*: Does **not** write `node_completed`, allowing the engine to re-enter the loop node with the new input.\n2. **`approval_gate`**:\n * Writes both `node_completed` and `approval_received` events.\n * If `captureResponse` is enabled, the comment is saved as the node's output.\n * Transitions status to `failed` and clears previous rejection state.\n\n#### `rejectWorkflow(runId, reason)`\nDetermines if a workflow should retry or terminate based on the rejection configuration:\n* **With `onRejectPrompt`**: If the `rejection_count` is below `onRejectMaxAttempts`, the run is transitioned to `failed` to trigger a retry with the rejection reason injected into the prompt.\n* **Terminal Rejection**: If no prompt is provided or max attempts are reached, the run is moved to `cancelled`.\n\n---\n\n## State Transitions\n\nThe engine uses the `failed` status as a signal for \"ready to be resumed.\" When a user approves a `paused` run, the core operations transition it to `failed`. The orchestrator's `findResumableRun` logic then identifies these runs for re-execution.\n\n| Action | Initial Status | Resulting Status | Metadata Impact |\n| :--- | :--- | :--- | :--- |\n| **Approve** | `paused` | `failed` | Sets `approval_response` or `loop_user_input` |\n| **Reject (Retry)** | `paused` | `failed` | Increments `rejection_count`, sets `rejection_reason` |\n| **Reject (Final)** | `paused` | `cancelled` | N/A |\n| **Abandon** | `running`/`paused` | `cancelled` | N/A |\n\n## Error Handling & Logging\n\nThis module uses lazy-initialized loggers via `createLogger` from `@archon/paths`. \n* **Operations Logging**: Errors in business logic (e.g., trying to approve a completed run) are logged under the `operations` namespace.\n* **Store Logging**: Database mapping errors are logged under `workflow.store-adapter`.\n\nFunctions generally throw descriptive errors intended to be caught by top-level command handlers (CLI or Slack/Discord bots) for user-facing formatting."}; | |
| var TREE = [{"name":"Core Orchestration","slug":"core-orchestration","files":["packages/core/src/orchestrator/orchestrator-agent.test.ts","packages/core/src/orchestrator/orchestrator-agent.ts","packages/core/src/orchestrator/orchestrator-isolation.test.ts","packages/core/src/orchestrator/orchestrator.test.ts","packages/core/src/orchestrator/orchestrator.ts","packages/core/src/orchestrator/prompt-builder.test.ts","packages/core/src/orchestrator/prompt-builder.ts","packages/core/src/handlers/clone.test.ts","packages/core/src/handlers/clone.ts","packages/core/src/handlers/command-handler.test.ts","packages/core/src/handlers/command-handler.ts","packages/core/src/state/session-transitions.test.ts","packages/core/src/state/session-transitions.ts","packages/core/src/types/index.ts","packages/core/src/index.ts"]},{"name":"Workflow Engine","slug":"workflow-engine","files":[],"children":[{"name":"Workflow Engine — workflows","slug":"workflow-engine-workflows","files":["packages/workflows/package.json","packages/workflows/src/command-validation.test.ts","packages/workflows/src/command-validation.ts","packages/workflows/src/condition-evaluator.test.ts","packages/workflows/src/condition-evaluator.ts","packages/workflows/src/dag-executor.test.ts","packages/workflows/src/dag-executor.ts","packages/workflows/src/defaults/bundled-defaults.test.ts","packages/workflows/src/defaults/bundled-defaults.ts","packages/workflows/src/deps.ts","packages/workflows/src/event-emitter.test.ts","packages/workflows/src/event-emitter.ts","packages/workflows/src/executor-preamble.test.ts","packages/workflows/src/executor-shared.test.ts","packages/workflows/src/executor-shared.ts","packages/workflows/src/executor.test.ts","packages/workflows/src/executor.ts","packages/workflows/src/hooks.test.ts","packages/workflows/src/load-command-prompt.test.ts","packages/workflows/src/loader.test.ts","packages/workflows/src/loader.ts","packages/workflows/src/logger.test.ts","packages/workflows/src/logger.ts","packages/workflows/src/router.test.ts","packages/workflows/src/router.ts","packages/workflows/src/runtime-check.test.ts","packages/workflows/src/schemas.test.ts","packages/workflows/src/schemas/dag-node.ts","packages/workflows/src/schemas/hooks.ts","packages/workflows/src/schemas/index.ts","packages/workflows/src/schemas/loop.ts","packages/workflows/src/schemas/retry.ts","packages/workflows/src/schemas/workflow-run.ts","packages/workflows/src/schemas/workflow.ts","packages/workflows/src/script-discovery.test.ts","packages/workflows/src/script-discovery.ts","packages/workflows/src/script-node-deps.test.ts","packages/workflows/src/store.ts","packages/workflows/src/test-utils.ts","packages/workflows/src/utils/duration.test.ts","packages/workflows/src/utils/duration.ts","packages/workflows/src/utils/idle-timeout.test.ts","packages/workflows/src/utils/idle-timeout.ts","packages/workflows/src/utils/tool-formatter.test.ts","packages/workflows/src/utils/tool-formatter.ts","packages/workflows/src/utils/variable-substitution.test.ts","packages/workflows/src/utils/variable-substitution.ts","packages/workflows/src/validation-parser.test.ts","packages/workflows/src/validation-parser.ts","packages/workflows/src/validator.test.ts","packages/workflows/src/validator.ts","packages/workflows/src/workflow-discovery.ts","packages/workflows/tsconfig.json"]},{"name":"Workflow Engine — core","slug":"workflow-engine-core","files":["packages/core/src/workflows/index.ts","packages/core/src/workflows/store-adapter.test.ts","packages/core/src/workflows/store-adapter.ts","packages/core/src/operations/workflow-operations.test.ts","packages/core/src/operations/workflow-operations.ts"]}]},{"name":"AI Providers","slug":"ai-providers","files":["packages/providers/package.json","packages/providers/src/claude/binary-resolver-dev.test.ts","packages/providers/src/claude/binary-resolver.test.ts","packages/providers/src/claude/binary-resolver.ts","packages/providers/src/claude/capabilities.ts","packages/providers/src/claude/config.ts","packages/providers/src/claude/index.ts","packages/providers/src/claude/provider.test.ts","packages/providers/src/claude/provider.ts","packages/providers/src/codex/binary-guard.test.ts","packages/providers/src/codex/binary-resolver-dev.test.ts","packages/providers/src/codex/binary-resolver.test.ts","packages/providers/src/codex/binary-resolver.ts","packages/providers/src/codex/capabilities.ts","packages/providers/src/codex/config.ts","packages/providers/src/codex/index.ts","packages/providers/src/codex/provider.test.ts","packages/providers/src/codex/provider.ts","packages/providers/src/community/pi/capabilities.ts","packages/providers/src/community/pi/config.test.ts","packages/providers/src/community/pi/config.ts","packages/providers/src/community/pi/event-bridge.test.ts","packages/providers/src/community/pi/event-bridge.ts","packages/providers/src/community/pi/index.ts","packages/providers/src/community/pi/model-ref.test.ts","packages/providers/src/community/pi/model-ref.ts","packages/providers/src/community/pi/options-translator.test.ts","packages/providers/src/community/pi/options-translator.ts","packages/providers/src/community/pi/provider-lazy-load.test.ts","packages/providers/src/community/pi/provider.test.ts","packages/providers/src/community/pi/provider.ts","packages/providers/src/community/pi/registration.ts","packages/providers/src/community/pi/resource-loader.ts","packages/providers/src/community/pi/session-resolver.test.ts","packages/providers/src/community/pi/session-resolver.ts","packages/providers/src/community/pi/ui-context-stub.test.ts","packages/providers/src/community/pi/ui-context-stub.ts","packages/providers/src/errors.ts","packages/providers/src/index.ts","packages/providers/src/registry.test.ts","packages/providers/src/registry.ts","packages/providers/src/test/mocks/logger.ts","packages/providers/src/types.ts","packages/providers/tsconfig.json"]},{"name":"Platform Adapters","slug":"platform-adapters","files":["packages/adapters/package.json","packages/adapters/src/chat/slack/adapter.test.ts","packages/adapters/src/chat/slack/adapter.ts","packages/adapters/src/chat/slack/auth.test.ts","packages/adapters/src/chat/slack/auth.ts","packages/adapters/src/chat/slack/index.ts","packages/adapters/src/chat/slack/types.ts","packages/adapters/src/chat/telegram/adapter.test.ts","packages/adapters/src/chat/telegram/adapter.ts","packages/adapters/src/chat/telegram/auth.test.ts","packages/adapters/src/chat/telegram/auth.ts","packages/adapters/src/chat/telegram/index.ts","packages/adapters/src/chat/telegram/markdown.test.ts","packages/adapters/src/chat/telegram/markdown.ts","packages/adapters/src/chat/telegram/types.ts","packages/adapters/src/community/chat/discord/adapter.test.ts","packages/adapters/src/community/chat/discord/adapter.ts","packages/adapters/src/community/chat/discord/auth.test.ts","packages/adapters/src/community/chat/discord/auth.ts","packages/adapters/src/community/chat/discord/index.ts","packages/adapters/src/community/chat/discord/types.ts","packages/adapters/src/community/forge/gitea/adapter.test.ts","packages/adapters/src/community/forge/gitea/adapter.ts","packages/adapters/src/community/forge/gitea/auth.ts","packages/adapters/src/community/forge/gitea/index.ts","packages/adapters/src/community/forge/gitea/types.ts","packages/adapters/src/community/forge/gitlab/adapter.test.ts","packages/adapters/src/community/forge/gitlab/adapter.ts","packages/adapters/src/community/forge/gitlab/auth.test.ts","packages/adapters/src/community/forge/gitlab/auth.ts","packages/adapters/src/community/forge/gitlab/index.ts","packages/adapters/src/community/forge/gitlab/types.ts","packages/adapters/src/forge/github/adapter.test.ts","packages/adapters/src/forge/github/adapter.ts","packages/adapters/src/forge/github/auth.test.ts","packages/adapters/src/forge/github/auth.ts","packages/adapters/src/forge/github/context.test.ts","packages/adapters/src/forge/github/index.ts","packages/adapters/src/forge/github/types.ts","packages/adapters/src/index.ts","packages/adapters/src/utils/message-splitting.test.ts","packages/adapters/src/utils/message-splitting.ts","packages/adapters/tsconfig.json"]},{"name":"Database Layer","slug":"database-layer","files":[],"children":[{"name":"Database Layer — migrations","slug":"database-layer-migrations","files":["migrations/000_combined.sql","migrations/001_initial_schema.sql","migrations/002_command_templates.sql","migrations/003_add_worktree.sql","migrations/004_worktree_sharing.sql","migrations/005_isolation_abstraction.sql","migrations/006_isolation_environments.sql","migrations/007_drop_legacy_columns.sql","migrations/008_workflow_runs.sql","migrations/009_workflow_last_activity.sql","migrations/010_immutable_sessions.sql","migrations/011_partial_unique_constraint.sql","migrations/012_workflow_events.sql","migrations/013_conversation_titles.sql","migrations/014_message_history.sql","migrations/015_background_dispatch.sql","migrations/016_session_ended_reason.sql","migrations/017_drop_command_templates.sql","migrations/018_fix_workflow_status_default.sql","migrations/019_workflow_resume_path.sql","migrations/020_codebase_env_vars.sql","migrations/021_add_allow_env_keys_to_codebases.sql"]},{"name":"Database Layer — core","slug":"database-layer-core","files":["packages/core/src/db/adapters/index.ts","packages/core/src/db/adapters/postgres.test.ts","packages/core/src/db/adapters/postgres.ts","packages/core/src/db/adapters/sqlite.test.ts","packages/core/src/db/adapters/sqlite.ts","packages/core/src/db/adapters/types.ts","packages/core/src/db/codebases.test.ts","packages/core/src/db/codebases.ts","packages/core/src/db/connection.test.ts","packages/core/src/db/connection.ts","packages/core/src/db/conversations.test.ts","packages/core/src/db/conversations.ts","packages/core/src/db/env-vars.test.ts","packages/core/src/db/env-vars.ts","packages/core/src/db/index.ts","packages/core/src/db/isolation-environments.test.ts","packages/core/src/db/isolation-environments.ts","packages/core/src/db/messages.test.ts","packages/core/src/db/messages.ts","packages/core/src/db/sessions.test.ts","packages/core/src/db/sessions.ts","packages/core/src/db/workflow-events.test.ts","packages/core/src/db/workflow-events.ts","packages/core/src/db/workflows.test.ts","packages/core/src/db/workflows.ts","packages/core/src/test/mocks/database.ts"]}]},{"name":"CLI Tooling","slug":"cli-tooling","files":[],"children":[{"name":"CLI Tooling — cli","slug":"cli-tooling-cli","files":["packages/cli/package.json","packages/cli/src/adapters/cli-adapter.test.ts","packages/cli/src/adapters/cli-adapter.ts","packages/cli/src/bundled-skill.ts","packages/cli/src/cli.test.ts","packages/cli/src/cli.ts","packages/cli/src/commands/chat.test.ts","packages/cli/src/commands/chat.ts","packages/cli/src/commands/continue.ts","packages/cli/src/commands/isolation.test.ts","packages/cli/src/commands/isolation.ts","packages/cli/src/commands/serve.test.ts","packages/cli/src/commands/serve.ts","packages/cli/src/commands/setup.test.ts","packages/cli/src/commands/setup.ts","packages/cli/src/commands/skill.test.ts","packages/cli/src/commands/skill.ts","packages/cli/src/commands/validate.ts","packages/cli/src/commands/version.test.ts","packages/cli/src/commands/version.ts","packages/cli/src/commands/workflow.test.ts","packages/cli/src/commands/workflow.ts","packages/cli/tsconfig.json"]},{"name":"CLI Tooling — homebrew","slug":"cli-tooling-homebrew","files":["homebrew/archon.rb"]}]},{"name":"Web Frontend","slug":"web-frontend","files":["packages/web/components.json","packages/web/index.html","packages/web/package.json","packages/web/src/App.tsx","packages/web/src/components/chat/ChatInterface.tsx","packages/web/src/components/chat/ErrorCard.tsx","packages/web/src/components/chat/LockIndicator.tsx","packages/web/src/components/chat/MessageBubble.tsx","packages/web/src/components/chat/MessageInput.tsx","packages/web/src/components/chat/MessageList.tsx","packages/web/src/components/chat/ToolCallCard.tsx","packages/web/src/components/chat/WorkflowProgressCard.tsx","packages/web/src/components/conversations/ConversationItem.tsx","packages/web/src/components/dashboard/ConfirmRunActionDialog.tsx","packages/web/src/components/dashboard/StatusSummaryBar.tsx","packages/web/src/components/dashboard/WorkflowHistoryTable.tsx","packages/web/src/components/dashboard/WorkflowRunCard.tsx","packages/web/src/components/dashboard/WorkflowRunGroup.tsx","packages/web/src/components/layout/Header.tsx","packages/web/src/components/layout/Layout.tsx","packages/web/src/components/layout/Sidebar.tsx","packages/web/src/components/layout/TopNav.tsx","packages/web/src/components/sidebar/AllConversationsView.tsx","packages/web/src/components/sidebar/ProjectDetail.tsx","packages/web/src/components/sidebar/ProjectSelector.tsx","packages/web/src/components/sidebar/SearchBar.tsx","packages/web/src/components/sidebar/WorkflowInvoker.tsx","packages/web/src/components/ui/alert-dialog.tsx","packages/web/src/components/ui/badge.tsx","packages/web/src/components/ui/button.tsx","packages/web/src/components/ui/card.tsx","packages/web/src/components/ui/collapsible.tsx","packages/web/src/components/ui/dialog.tsx","packages/web/src/components/ui/input.tsx","packages/web/src/components/ui/resizable.tsx","packages/web/src/components/ui/scroll-area.tsx","packages/web/src/components/ui/separator.tsx","packages/web/src/components/ui/tabs.tsx","packages/web/src/components/ui/textarea.tsx","packages/web/src/components/ui/tooltip.tsx","packages/web/src/components/workflows/ArtifactSummary.tsx","packages/web/src/components/workflows/ArtifactViewerModal.tsx","packages/web/src/components/workflows/BuilderToolbar.tsx","packages/web/src/components/workflows/CommandPicker.tsx","packages/web/src/components/workflows/DagNodeComponent.tsx","packages/web/src/components/workflows/DagNodeProgress.tsx","packages/web/src/components/workflows/ExecutionDagNode.tsx","packages/web/src/components/workflows/NodeInspector.tsx","packages/web/src/components/workflows/NodeLibrary.tsx","packages/web/src/components/workflows/NodePalette.tsx","packages/web/src/components/workflows/QuickAddPicker.tsx","packages/web/src/components/workflows/StatusBar.tsx","packages/web/src/components/workflows/StatusIcon.tsx","packages/web/src/components/workflows/StepLogs.tsx","packages/web/src/components/workflows/ValidationPanel.tsx","packages/web/src/components/workflows/WorkflowBuilder.tsx","packages/web/src/components/workflows/WorkflowCanvas.tsx","packages/web/src/components/workflows/WorkflowCard.tsx","packages/web/src/components/workflows/WorkflowDagViewer.tsx","packages/web/src/components/workflows/WorkflowExecution.tsx","packages/web/src/components/workflows/WorkflowList.tsx","packages/web/src/components/workflows/WorkflowLogs.tsx","packages/web/src/components/workflows/YamlCodeView.tsx","packages/web/src/contexts/ProjectContext.tsx","packages/web/src/hooks/useAutoScroll.ts","packages/web/src/hooks/useBuilderKeyboard.test.ts","packages/web/src/hooks/useBuilderKeyboard.ts","packages/web/src/hooks/useBuilderUndo.ts","packages/web/src/hooks/useBuilderValidation.ts","packages/web/src/hooks/useClickOutside.ts","packages/web/src/hooks/useDashboardSSE.ts","packages/web/src/hooks/useKeyboardShortcuts.ts","packages/web/src/hooks/useProviders.ts","packages/web/src/hooks/useSSE.ts","packages/web/src/index.css","packages/web/src/lib/api.ts","packages/web/src/lib/chat-message-reducer.test.ts","packages/web/src/lib/chat-message-reducer.ts","packages/web/src/lib/codebase-input.test.ts","packages/web/src/lib/codebase-input.ts","packages/web/src/lib/command-categories.ts","packages/web/src/lib/dag-layout.ts","packages/web/src/lib/format.test.ts","packages/web/src/lib/format.ts","packages/web/src/lib/message-cache.test.ts","packages/web/src/lib/message-cache.ts","packages/web/src/lib/query-client.ts","packages/web/src/lib/select-initial-node.test.ts","packages/web/src/lib/select-initial-node.ts","packages/web/src/lib/types.ts","packages/web/src/lib/utils.ts","packages/web/src/lib/workflow-metadata.test.ts","packages/web/src/lib/workflow-metadata.ts","packages/web/src/lib/workflow-utils.test.ts","packages/web/src/lib/workflow-utils.ts","packages/web/src/main.tsx","packages/web/src/routes/ChatPage.tsx","packages/web/src/routes/DashboardPage.tsx","packages/web/src/routes/SettingsPage.tsx","packages/web/src/routes/WorkflowBuilderPage.tsx","packages/web/src/routes/WorkflowExecutionPage.tsx","packages/web/src/routes/WorkflowsPage.tsx","packages/web/src/stores/workflow-store.test.ts","packages/web/src/stores/workflow-store.ts","packages/web/tsconfig.json","packages/web/vite.config.ts"]},{"name":"API Server","slug":"api-server","files":[],"children":[{"name":"API Server — server","slug":"api-server-server","files":["packages/server/package.json","packages/server/src/adapters/web.ts","packages/server/src/adapters/web/persistence.test.ts","packages/server/src/adapters/web/persistence.ts","packages/server/src/adapters/web/transport.test.ts","packages/server/src/adapters/web/transport.ts","packages/server/src/adapters/web/workflow-bridge.ts","packages/server/src/index.ts","packages/server/src/routes/api.codebases.test.ts","packages/server/src/routes/api.conversations.test.ts","packages/server/src/routes/api.health.test.ts","packages/server/src/routes/api.messages.test.ts","packages/server/src/routes/api.providers.test.ts","packages/server/src/routes/api.ts","packages/server/src/routes/api.workflow-runs.test.ts","packages/server/src/routes/api.workflows.test.ts","packages/server/src/routes/openapi-defaults.ts","packages/server/src/routes/schemas/codebase.schemas.ts","packages/server/src/routes/schemas/common.schemas.ts","packages/server/src/routes/schemas/config.schemas.ts","packages/server/src/routes/schemas/conversation.schemas.ts","packages/server/src/routes/schemas/provider.schemas.ts","packages/server/src/routes/schemas/system.schemas.ts","packages/server/src/routes/schemas/workflow.schemas.ts","packages/server/src/scripts/setup-auth.ts","packages/server/src/test/workflow-mock-factories.ts","packages/server/tsconfig.json","packages/server/tsconfig.tsbuildinfo"]},{"name":"API Server — auth-service","slug":"api-server-auth-service","files":["auth-service/package.json","auth-service/server.js","auth-service/test.js"]}]},{"name":"Git & Environment Isolation","slug":"git-environment-isolation","files":[],"children":[{"name":"Git & Environment Isolation — git","slug":"git-environment-isolation-git","files":["packages/git/package.json","packages/git/src/branch.ts","packages/git/src/exec.ts","packages/git/src/git.test.ts","packages/git/src/index.ts","packages/git/src/repo.ts","packages/git/src/types.ts","packages/git/src/worktree.ts","packages/git/tsconfig.json"]},{"name":"Git & Environment Isolation — isolation","slug":"git-environment-isolation-isolation","files":["packages/isolation/package.json","packages/isolation/src/errors.test.ts","packages/isolation/src/errors.ts","packages/isolation/src/factory.test.ts","packages/isolation/src/factory.ts","packages/isolation/src/index.ts","packages/isolation/src/pr-state.test.ts","packages/isolation/src/pr-state.ts","packages/isolation/src/providers/worktree.test.ts","packages/isolation/src/providers/worktree.ts","packages/isolation/src/resolver.test.ts","packages/isolation/src/resolver.ts","packages/isolation/src/store.ts","packages/isolation/src/types.ts","packages/isolation/src/worktree-copy.test.ts","packages/isolation/src/worktree-copy.ts","packages/isolation/tsconfig.json"]},{"name":"Git & Environment Isolation — core","slug":"git-environment-isolation-core","files":["packages/core/src/operations/isolation-operations.test.ts","packages/core/src/operations/isolation-operations.ts"]}]},{"name":"System Utilities & Configuration","slug":"system-utilities-configuration","files":[],"children":[{"name":"System Utilities & Configuration — paths","slug":"system-utilities-configuration-paths","files":["packages/paths/package.json","packages/paths/src/archon-paths.test.ts","packages/paths/src/archon-paths.ts","packages/paths/src/bundled-build.test.ts","packages/paths/src/bundled-build.ts","packages/paths/src/env-integration.test.ts","packages/paths/src/env-loader.test.ts","packages/paths/src/env-loader.ts","packages/paths/src/index.ts","packages/paths/src/logger.test.ts","packages/paths/src/logger.ts","packages/paths/src/strip-cwd-env-boot.ts","packages/paths/src/strip-cwd-env.test.ts","packages/paths/src/strip-cwd-env.ts","packages/paths/src/telemetry.test.ts","packages/paths/src/telemetry.ts","packages/paths/src/update-check.test.ts","packages/paths/src/update-check.ts","packages/paths/tsconfig.json"]},{"name":"System Utilities & Configuration — core","slug":"system-utilities-configuration-core","files":["packages/core/package.json","packages/core/src/config/config-loader.test.ts","packages/core/src/config/config-loader.ts","packages/core/src/config/config-types.ts","packages/core/src/config/index.ts","packages/core/src/services/cleanup-service.test.ts","packages/core/src/services/cleanup-service.ts","packages/core/src/services/title-generator.test.ts","packages/core/src/services/title-generator.ts","packages/core/src/utils/commands.ts","packages/core/src/utils/conversation-lock.test.ts","packages/core/src/utils/conversation-lock.ts","packages/core/src/utils/credential-sanitizer.test.ts","packages/core/src/utils/credential-sanitizer.ts","packages/core/src/utils/error-formatter.test.ts","packages/core/src/utils/error-formatter.ts","packages/core/src/utils/error.test.ts","packages/core/src/utils/error.ts","packages/core/src/utils/github-graphql.test.ts","packages/core/src/utils/github-graphql.ts","packages/core/src/utils/path-validation.test.ts","packages/core/src/utils/path-validation.ts","packages/core/src/utils/port-allocation.test.ts","packages/core/src/utils/port-allocation.ts","packages/core/src/utils/worktree-sync.test.ts","packages/core/src/utils/worktree-sync.ts","packages/core/src/test/mocks/logger.ts","packages/core/src/test/mocks/platform.ts","packages/core/src/test/setup.ts","packages/core/tsconfig.json","packages/core/tsconfig.tsbuildinfo"]},{"name":"System Utilities & Configuration — eslint.config.mjs","slug":"system-utilities-configuration-eslint-config-mjs","files":["eslint.config.mjs"]},{"name":"System Utilities & Configuration — bunfig.toml","slug":"system-utilities-configuration-bunfig-toml","files":["bunfig.toml"]},{"name":"System Utilities & Configuration — package.json","slug":"system-utilities-configuration-package-json","files":["package.json"]},{"name":"System Utilities & Configuration — tsconfig.json","slug":"system-utilities-configuration-tsconfig-json","files":["tsconfig.json"]}]},{"name":"Documentation","slug":"documentation","files":[],"children":[{"name":"Documentation — docs-web","slug":"documentation-docs-web","files":["packages/docs-web/astro.config.mjs","packages/docs-web/package.json","packages/docs-web/src/content.config.ts","packages/docs-web/src/content/docs/adapters/community/discord.md","packages/docs-web/src/content/docs/adapters/community/gitea.md","packages/docs-web/src/content/docs/adapters/community/gitlab.md","packages/docs-web/src/content/docs/adapters/github.md","packages/docs-web/src/content/docs/adapters/index.md","packages/docs-web/src/content/docs/adapters/slack.md","packages/docs-web/src/content/docs/adapters/telegram.md","packages/docs-web/src/content/docs/adapters/web.md","packages/docs-web/src/content/docs/book/dag-workflows.md","packages/docs-web/src/content/docs/book/essential-workflows.md","packages/docs-web/src/content/docs/book/first-command.md","packages/docs-web/src/content/docs/book/first-five-minutes.md","packages/docs-web/src/content/docs/book/first-workflow.md","packages/docs-web/src/content/docs/book/hooks-and-quality.md","packages/docs-web/src/content/docs/book/how-it-works.md","packages/docs-web/src/content/docs/book/index.md","packages/docs-web/src/content/docs/book/isolation.md","packages/docs-web/src/content/docs/book/quick-reference.md","packages/docs-web/src/content/docs/book/what-is-archon.md","packages/docs-web/src/content/docs/contributing/adding-a-community-provider.md","packages/docs-web/src/content/docs/contributing/cli-internals.md","packages/docs-web/src/content/docs/contributing/dx-quirks.md","packages/docs-web/src/content/docs/contributing/index.md","packages/docs-web/src/content/docs/contributing/new-developer-guide.md","packages/docs-web/src/content/docs/contributing/releasing.md","packages/docs-web/src/content/docs/deployment/cloud.md","packages/docs-web/src/content/docs/deployment/docker.md","packages/docs-web/src/content/docs/deployment/e2e-testing-wsl.md","packages/docs-web/src/content/docs/deployment/e2e-testing.md","packages/docs-web/src/content/docs/deployment/index.md","packages/docs-web/src/content/docs/deployment/local.md","packages/docs-web/src/content/docs/deployment/windows.md","packages/docs-web/src/content/docs/getting-started/ai-assistants.md","packages/docs-web/src/content/docs/getting-started/concepts.md","packages/docs-web/src/content/docs/getting-started/configuration.md","packages/docs-web/src/content/docs/getting-started/installation.md","packages/docs-web/src/content/docs/getting-started/overview.md","packages/docs-web/src/content/docs/getting-started/quick-start.md","packages/docs-web/src/content/docs/guides/approval-nodes.md","packages/docs-web/src/content/docs/guides/authoring-commands.md","packages/docs-web/src/content/docs/guides/authoring-workflows.md","packages/docs-web/src/content/docs/guides/global-workflows.md","packages/docs-web/src/content/docs/guides/hooks.md","packages/docs-web/src/content/docs/guides/index.md","packages/docs-web/src/content/docs/guides/loop-nodes.md","packages/docs-web/src/content/docs/guides/mcp-servers.md","packages/docs-web/src/content/docs/guides/remotion-workflow.md","packages/docs-web/src/content/docs/guides/script-nodes.md","packages/docs-web/src/content/docs/guides/skills.md","packages/docs-web/src/content/docs/index.mdx","packages/docs-web/src/content/docs/reference/api.md","packages/docs-web/src/content/docs/reference/architecture.md","packages/docs-web/src/content/docs/reference/archon-directories.md","packages/docs-web/src/content/docs/reference/cli.md","packages/docs-web/src/content/docs/reference/commands.md","packages/docs-web/src/content/docs/reference/configuration.md","packages/docs-web/src/content/docs/reference/database.md","packages/docs-web/src/content/docs/reference/index.md","packages/docs-web/src/content/docs/reference/security.md","packages/docs-web/src/content/docs/reference/troubleshooting.md","packages/docs-web/src/content/docs/reference/variables.md","packages/docs-web/src/styles/custom.css","packages/docs-web/tsconfig.json"]},{"name":"Documentation — adapters","slug":"documentation-adapters","files":["packages/adapters/src/community/chat/README.md","packages/adapters/src/community/forge/README.md"]},{"name":"Documentation — graphify-out","slug":"documentation-graphify-out","files":["graphify-out/GRAPH_REPORT.md","graphify-out/cost.json","graphify-out/manifest.json"]},{"name":"Documentation — README.md","slug":"documentation-readme-md","files":["README.md"]},{"name":"Documentation — CLAUDE.md","slug":"documentation-claude-md","files":["CLAUDE.md"]}]},{"name":"Deployment & Infrastructure","slug":"deployment-infrastructure","files":["Dockerfile","Dockerfile.user.example","docker-compose.yml","docker-compose.override.example.yml","docker-entrypoint.sh","Caddyfile.example","deploy/Dockerfile.user.example","deploy/cloud-init.yml","deploy/docker-compose.override.example.yml","deploy/docker-compose.yml","auth-service/Dockerfile","packages/docs-web/public/CNAME","packages/docs-web/public/install","packages/docs-web/public/install.ps1","scripts/build-binaries.sh","scripts/checksums.sh","scripts/generate-bundled-defaults.ts","scripts/install.ps1","scripts/install.sh","scripts/sync-versions.sh","scripts/tsconfig.json","scripts/update-homebrew.sh","scripts/validate-setup.sh"]},{"name":"Other","slug":"other","files":["packages/core/src/operations/index.ts"]}]; | |
| var META = {"fromCommit":"18eeca42c814f009beff18800a3976cd963ae4e8","generatedAt":"2026-05-04T22:53:27.870Z","model":"gemini-3-flash-preview","moduleFiles":{"Core Orchestration":["packages/core/src/orchestrator/orchestrator-agent.test.ts","packages/core/src/orchestrator/orchestrator-agent.ts","packages/core/src/orchestrator/orchestrator-isolation.test.ts","packages/core/src/orchestrator/orchestrator.test.ts","packages/core/src/orchestrator/orchestrator.ts","packages/core/src/orchestrator/prompt-builder.test.ts","packages/core/src/orchestrator/prompt-builder.ts","packages/core/src/handlers/clone.test.ts","packages/core/src/handlers/clone.ts","packages/core/src/handlers/command-handler.test.ts","packages/core/src/handlers/command-handler.ts","packages/core/src/state/session-transitions.test.ts","packages/core/src/state/session-transitions.ts","packages/core/src/types/index.ts","packages/core/src/index.ts"],"Workflow Engine":["packages/workflows/package.json","packages/workflows/src/command-validation.test.ts","packages/workflows/src/command-validation.ts","packages/workflows/src/condition-evaluator.test.ts","packages/workflows/src/condition-evaluator.ts","packages/workflows/src/dag-executor.test.ts","packages/workflows/src/dag-executor.ts","packages/workflows/src/defaults/bundled-defaults.test.ts","packages/workflows/src/defaults/bundled-defaults.ts","packages/workflows/src/deps.ts","packages/workflows/src/event-emitter.test.ts","packages/workflows/src/event-emitter.ts","packages/workflows/src/executor-preamble.test.ts","packages/workflows/src/executor-shared.test.ts","packages/workflows/src/executor-shared.ts","packages/workflows/src/executor.test.ts","packages/workflows/src/executor.ts","packages/workflows/src/hooks.test.ts","packages/workflows/src/load-command-prompt.test.ts","packages/workflows/src/loader.test.ts","packages/workflows/src/loader.ts","packages/workflows/src/logger.test.ts","packages/workflows/src/logger.ts","packages/workflows/src/router.test.ts","packages/workflows/src/router.ts","packages/workflows/src/runtime-check.test.ts","packages/workflows/src/schemas.test.ts","packages/workflows/src/schemas/dag-node.ts","packages/workflows/src/schemas/hooks.ts","packages/workflows/src/schemas/index.ts","packages/workflows/src/schemas/loop.ts","packages/workflows/src/schemas/retry.ts","packages/workflows/src/schemas/workflow-run.ts","packages/workflows/src/schemas/workflow.ts","packages/workflows/src/script-discovery.test.ts","packages/workflows/src/script-discovery.ts","packages/workflows/src/script-node-deps.test.ts","packages/workflows/src/store.ts","packages/workflows/src/test-utils.ts","packages/workflows/src/utils/duration.test.ts","packages/workflows/src/utils/duration.ts","packages/workflows/src/utils/idle-timeout.test.ts","packages/workflows/src/utils/idle-timeout.ts","packages/workflows/src/utils/tool-formatter.test.ts","packages/workflows/src/utils/tool-formatter.ts","packages/workflows/src/utils/variable-substitution.test.ts","packages/workflows/src/utils/variable-substitution.ts","packages/workflows/src/validation-parser.test.ts","packages/workflows/src/validation-parser.ts","packages/workflows/src/validator.test.ts","packages/workflows/src/validator.ts","packages/workflows/src/workflow-discovery.ts","packages/workflows/tsconfig.json","packages/core/src/workflows/index.ts","packages/core/src/workflows/store-adapter.test.ts","packages/core/src/workflows/store-adapter.ts","packages/core/src/operations/workflow-operations.test.ts","packages/core/src/operations/workflow-operations.ts"],"Workflow Engine — workflows":["packages/workflows/package.json","packages/workflows/src/command-validation.test.ts","packages/workflows/src/command-validation.ts","packages/workflows/src/condition-evaluator.test.ts","packages/workflows/src/condition-evaluator.ts","packages/workflows/src/dag-executor.test.ts","packages/workflows/src/dag-executor.ts","packages/workflows/src/defaults/bundled-defaults.test.ts","packages/workflows/src/defaults/bundled-defaults.ts","packages/workflows/src/deps.ts","packages/workflows/src/event-emitter.test.ts","packages/workflows/src/event-emitter.ts","packages/workflows/src/executor-preamble.test.ts","packages/workflows/src/executor-shared.test.ts","packages/workflows/src/executor-shared.ts","packages/workflows/src/executor.test.ts","packages/workflows/src/executor.ts","packages/workflows/src/hooks.test.ts","packages/workflows/src/load-command-prompt.test.ts","packages/workflows/src/loader.test.ts","packages/workflows/src/loader.ts","packages/workflows/src/logger.test.ts","packages/workflows/src/logger.ts","packages/workflows/src/router.test.ts","packages/workflows/src/router.ts","packages/workflows/src/runtime-check.test.ts","packages/workflows/src/schemas.test.ts","packages/workflows/src/schemas/dag-node.ts","packages/workflows/src/schemas/hooks.ts","packages/workflows/src/schemas/index.ts","packages/workflows/src/schemas/loop.ts","packages/workflows/src/schemas/retry.ts","packages/workflows/src/schemas/workflow-run.ts","packages/workflows/src/schemas/workflow.ts","packages/workflows/src/script-discovery.test.ts","packages/workflows/src/script-discovery.ts","packages/workflows/src/script-node-deps.test.ts","packages/workflows/src/store.ts","packages/workflows/src/test-utils.ts","packages/workflows/src/utils/duration.test.ts","packages/workflows/src/utils/duration.ts","packages/workflows/src/utils/idle-timeout.test.ts","packages/workflows/src/utils/idle-timeout.ts","packages/workflows/src/utils/tool-formatter.test.ts","packages/workflows/src/utils/tool-formatter.ts","packages/workflows/src/utils/variable-substitution.test.ts","packages/workflows/src/utils/variable-substitution.ts","packages/workflows/src/validation-parser.test.ts","packages/workflows/src/validation-parser.ts","packages/workflows/src/validator.test.ts","packages/workflows/src/validator.ts","packages/workflows/src/workflow-discovery.ts","packages/workflows/tsconfig.json"],"Workflow Engine — core":["packages/core/src/workflows/index.ts","packages/core/src/workflows/store-adapter.test.ts","packages/core/src/workflows/store-adapter.ts","packages/core/src/operations/workflow-operations.test.ts","packages/core/src/operations/workflow-operations.ts"],"AI Providers":["packages/providers/package.json","packages/providers/src/claude/binary-resolver-dev.test.ts","packages/providers/src/claude/binary-resolver.test.ts","packages/providers/src/claude/binary-resolver.ts","packages/providers/src/claude/capabilities.ts","packages/providers/src/claude/config.ts","packages/providers/src/claude/index.ts","packages/providers/src/claude/provider.test.ts","packages/providers/src/claude/provider.ts","packages/providers/src/codex/binary-guard.test.ts","packages/providers/src/codex/binary-resolver-dev.test.ts","packages/providers/src/codex/binary-resolver.test.ts","packages/providers/src/codex/binary-resolver.ts","packages/providers/src/codex/capabilities.ts","packages/providers/src/codex/config.ts","packages/providers/src/codex/index.ts","packages/providers/src/codex/provider.test.ts","packages/providers/src/codex/provider.ts","packages/providers/src/community/pi/capabilities.ts","packages/providers/src/community/pi/config.test.ts","packages/providers/src/community/pi/config.ts","packages/providers/src/community/pi/event-bridge.test.ts","packages/providers/src/community/pi/event-bridge.ts","packages/providers/src/community/pi/index.ts","packages/providers/src/community/pi/model-ref.test.ts","packages/providers/src/community/pi/model-ref.ts","packages/providers/src/community/pi/options-translator.test.ts","packages/providers/src/community/pi/options-translator.ts","packages/providers/src/community/pi/provider-lazy-load.test.ts","packages/providers/src/community/pi/provider.test.ts","packages/providers/src/community/pi/provider.ts","packages/providers/src/community/pi/registration.ts","packages/providers/src/community/pi/resource-loader.ts","packages/providers/src/community/pi/session-resolver.test.ts","packages/providers/src/community/pi/session-resolver.ts","packages/providers/src/community/pi/ui-context-stub.test.ts","packages/providers/src/community/pi/ui-context-stub.ts","packages/providers/src/errors.ts","packages/providers/src/index.ts","packages/providers/src/registry.test.ts","packages/providers/src/registry.ts","packages/providers/src/test/mocks/logger.ts","packages/providers/src/types.ts","packages/providers/tsconfig.json"],"Platform Adapters":["packages/adapters/package.json","packages/adapters/src/chat/slack/adapter.test.ts","packages/adapters/src/chat/slack/adapter.ts","packages/adapters/src/chat/slack/auth.test.ts","packages/adapters/src/chat/slack/auth.ts","packages/adapters/src/chat/slack/index.ts","packages/adapters/src/chat/slack/types.ts","packages/adapters/src/chat/telegram/adapter.test.ts","packages/adapters/src/chat/telegram/adapter.ts","packages/adapters/src/chat/telegram/auth.test.ts","packages/adapters/src/chat/telegram/auth.ts","packages/adapters/src/chat/telegram/index.ts","packages/adapters/src/chat/telegram/markdown.test.ts","packages/adapters/src/chat/telegram/markdown.ts","packages/adapters/src/chat/telegram/types.ts","packages/adapters/src/community/chat/discord/adapter.test.ts","packages/adapters/src/community/chat/discord/adapter.ts","packages/adapters/src/community/chat/discord/auth.test.ts","packages/adapters/src/community/chat/discord/auth.ts","packages/adapters/src/community/chat/discord/index.ts","packages/adapters/src/community/chat/discord/types.ts","packages/adapters/src/community/forge/gitea/adapter.test.ts","packages/adapters/src/community/forge/gitea/adapter.ts","packages/adapters/src/community/forge/gitea/auth.ts","packages/adapters/src/community/forge/gitea/index.ts","packages/adapters/src/community/forge/gitea/types.ts","packages/adapters/src/community/forge/gitlab/adapter.test.ts","packages/adapters/src/community/forge/gitlab/adapter.ts","packages/adapters/src/community/forge/gitlab/auth.test.ts","packages/adapters/src/community/forge/gitlab/auth.ts","packages/adapters/src/community/forge/gitlab/index.ts","packages/adapters/src/community/forge/gitlab/types.ts","packages/adapters/src/forge/github/adapter.test.ts","packages/adapters/src/forge/github/adapter.ts","packages/adapters/src/forge/github/auth.test.ts","packages/adapters/src/forge/github/auth.ts","packages/adapters/src/forge/github/context.test.ts","packages/adapters/src/forge/github/index.ts","packages/adapters/src/forge/github/types.ts","packages/adapters/src/index.ts","packages/adapters/src/utils/message-splitting.test.ts","packages/adapters/src/utils/message-splitting.ts","packages/adapters/tsconfig.json"],"Database Layer":["migrations/000_combined.sql","migrations/001_initial_schema.sql","migrations/002_command_templates.sql","migrations/003_add_worktree.sql","migrations/004_worktree_sharing.sql","migrations/005_isolation_abstraction.sql","migrations/006_isolation_environments.sql","migrations/007_drop_legacy_columns.sql","migrations/008_workflow_runs.sql","migrations/009_workflow_last_activity.sql","migrations/010_immutable_sessions.sql","migrations/011_partial_unique_constraint.sql","migrations/012_workflow_events.sql","migrations/013_conversation_titles.sql","migrations/014_message_history.sql","migrations/015_background_dispatch.sql","migrations/016_session_ended_reason.sql","migrations/017_drop_command_templates.sql","migrations/018_fix_workflow_status_default.sql","migrations/019_workflow_resume_path.sql","migrations/020_codebase_env_vars.sql","migrations/021_add_allow_env_keys_to_codebases.sql","packages/core/src/db/adapters/index.ts","packages/core/src/db/adapters/postgres.test.ts","packages/core/src/db/adapters/postgres.ts","packages/core/src/db/adapters/sqlite.test.ts","packages/core/src/db/adapters/sqlite.ts","packages/core/src/db/adapters/types.ts","packages/core/src/db/codebases.test.ts","packages/core/src/db/codebases.ts","packages/core/src/db/connection.test.ts","packages/core/src/db/connection.ts","packages/core/src/db/conversations.test.ts","packages/core/src/db/conversations.ts","packages/core/src/db/env-vars.test.ts","packages/core/src/db/env-vars.ts","packages/core/src/db/index.ts","packages/core/src/db/isolation-environments.test.ts","packages/core/src/db/isolation-environments.ts","packages/core/src/db/messages.test.ts","packages/core/src/db/messages.ts","packages/core/src/db/sessions.test.ts","packages/core/src/db/sessions.ts","packages/core/src/db/workflow-events.test.ts","packages/core/src/db/workflow-events.ts","packages/core/src/db/workflows.test.ts","packages/core/src/db/workflows.ts","packages/core/src/test/mocks/database.ts"],"Database Layer — migrations":["migrations/000_combined.sql","migrations/001_initial_schema.sql","migrations/002_command_templates.sql","migrations/003_add_worktree.sql","migrations/004_worktree_sharing.sql","migrations/005_isolation_abstraction.sql","migrations/006_isolation_environments.sql","migrations/007_drop_legacy_columns.sql","migrations/008_workflow_runs.sql","migrations/009_workflow_last_activity.sql","migrations/010_immutable_sessions.sql","migrations/011_partial_unique_constraint.sql","migrations/012_workflow_events.sql","migrations/013_conversation_titles.sql","migrations/014_message_history.sql","migrations/015_background_dispatch.sql","migrations/016_session_ended_reason.sql","migrations/017_drop_command_templates.sql","migrations/018_fix_workflow_status_default.sql","migrations/019_workflow_resume_path.sql","migrations/020_codebase_env_vars.sql","migrations/021_add_allow_env_keys_to_codebases.sql"],"Database Layer — core":["packages/core/src/db/adapters/index.ts","packages/core/src/db/adapters/postgres.test.ts","packages/core/src/db/adapters/postgres.ts","packages/core/src/db/adapters/sqlite.test.ts","packages/core/src/db/adapters/sqlite.ts","packages/core/src/db/adapters/types.ts","packages/core/src/db/codebases.test.ts","packages/core/src/db/codebases.ts","packages/core/src/db/connection.test.ts","packages/core/src/db/connection.ts","packages/core/src/db/conversations.test.ts","packages/core/src/db/conversations.ts","packages/core/src/db/env-vars.test.ts","packages/core/src/db/env-vars.ts","packages/core/src/db/index.ts","packages/core/src/db/isolation-environments.test.ts","packages/core/src/db/isolation-environments.ts","packages/core/src/db/messages.test.ts","packages/core/src/db/messages.ts","packages/core/src/db/sessions.test.ts","packages/core/src/db/sessions.ts","packages/core/src/db/workflow-events.test.ts","packages/core/src/db/workflow-events.ts","packages/core/src/db/workflows.test.ts","packages/core/src/db/workflows.ts","packages/core/src/test/mocks/database.ts"],"CLI Tooling":["packages/cli/package.json","packages/cli/src/adapters/cli-adapter.test.ts","packages/cli/src/adapters/cli-adapter.ts","packages/cli/src/bundled-skill.ts","packages/cli/src/cli.test.ts","packages/cli/src/cli.ts","packages/cli/src/commands/chat.test.ts","packages/cli/src/commands/chat.ts","packages/cli/src/commands/continue.ts","packages/cli/src/commands/isolation.test.ts","packages/cli/src/commands/isolation.ts","packages/cli/src/commands/serve.test.ts","packages/cli/src/commands/serve.ts","packages/cli/src/commands/setup.test.ts","packages/cli/src/commands/setup.ts","packages/cli/src/commands/skill.test.ts","packages/cli/src/commands/skill.ts","packages/cli/src/commands/validate.ts","packages/cli/src/commands/version.test.ts","packages/cli/src/commands/version.ts","packages/cli/src/commands/workflow.test.ts","packages/cli/src/commands/workflow.ts","packages/cli/tsconfig.json","homebrew/archon.rb"],"CLI Tooling — cli":["packages/cli/package.json","packages/cli/src/adapters/cli-adapter.test.ts","packages/cli/src/adapters/cli-adapter.ts","packages/cli/src/bundled-skill.ts","packages/cli/src/cli.test.ts","packages/cli/src/cli.ts","packages/cli/src/commands/chat.test.ts","packages/cli/src/commands/chat.ts","packages/cli/src/commands/continue.ts","packages/cli/src/commands/isolation.test.ts","packages/cli/src/commands/isolation.ts","packages/cli/src/commands/serve.test.ts","packages/cli/src/commands/serve.ts","packages/cli/src/commands/setup.test.ts","packages/cli/src/commands/setup.ts","packages/cli/src/commands/skill.test.ts","packages/cli/src/commands/skill.ts","packages/cli/src/commands/validate.ts","packages/cli/src/commands/version.test.ts","packages/cli/src/commands/version.ts","packages/cli/src/commands/workflow.test.ts","packages/cli/src/commands/workflow.ts","packages/cli/tsconfig.json"],"CLI Tooling — homebrew":["homebrew/archon.rb"],"Web Frontend":["packages/web/components.json","packages/web/index.html","packages/web/package.json","packages/web/src/App.tsx","packages/web/src/components/chat/ChatInterface.tsx","packages/web/src/components/chat/ErrorCard.tsx","packages/web/src/components/chat/LockIndicator.tsx","packages/web/src/components/chat/MessageBubble.tsx","packages/web/src/components/chat/MessageInput.tsx","packages/web/src/components/chat/MessageList.tsx","packages/web/src/components/chat/ToolCallCard.tsx","packages/web/src/components/chat/WorkflowProgressCard.tsx","packages/web/src/components/conversations/ConversationItem.tsx","packages/web/src/components/dashboard/ConfirmRunActionDialog.tsx","packages/web/src/components/dashboard/StatusSummaryBar.tsx","packages/web/src/components/dashboard/WorkflowHistoryTable.tsx","packages/web/src/components/dashboard/WorkflowRunCard.tsx","packages/web/src/components/dashboard/WorkflowRunGroup.tsx","packages/web/src/components/layout/Header.tsx","packages/web/src/components/layout/Layout.tsx","packages/web/src/components/layout/Sidebar.tsx","packages/web/src/components/layout/TopNav.tsx","packages/web/src/components/sidebar/AllConversationsView.tsx","packages/web/src/components/sidebar/ProjectDetail.tsx","packages/web/src/components/sidebar/ProjectSelector.tsx","packages/web/src/components/sidebar/SearchBar.tsx","packages/web/src/components/sidebar/WorkflowInvoker.tsx","packages/web/src/components/ui/alert-dialog.tsx","packages/web/src/components/ui/badge.tsx","packages/web/src/components/ui/button.tsx","packages/web/src/components/ui/card.tsx","packages/web/src/components/ui/collapsible.tsx","packages/web/src/components/ui/dialog.tsx","packages/web/src/components/ui/input.tsx","packages/web/src/components/ui/resizable.tsx","packages/web/src/components/ui/scroll-area.tsx","packages/web/src/components/ui/separator.tsx","packages/web/src/components/ui/tabs.tsx","packages/web/src/components/ui/textarea.tsx","packages/web/src/components/ui/tooltip.tsx","packages/web/src/components/workflows/ArtifactSummary.tsx","packages/web/src/components/workflows/ArtifactViewerModal.tsx","packages/web/src/components/workflows/BuilderToolbar.tsx","packages/web/src/components/workflows/CommandPicker.tsx","packages/web/src/components/workflows/DagNodeComponent.tsx","packages/web/src/components/workflows/DagNodeProgress.tsx","packages/web/src/components/workflows/ExecutionDagNode.tsx","packages/web/src/components/workflows/NodeInspector.tsx","packages/web/src/components/workflows/NodeLibrary.tsx","packages/web/src/components/workflows/NodePalette.tsx","packages/web/src/components/workflows/QuickAddPicker.tsx","packages/web/src/components/workflows/StatusBar.tsx","packages/web/src/components/workflows/StatusIcon.tsx","packages/web/src/components/workflows/StepLogs.tsx","packages/web/src/components/workflows/ValidationPanel.tsx","packages/web/src/components/workflows/WorkflowBuilder.tsx","packages/web/src/components/workflows/WorkflowCanvas.tsx","packages/web/src/components/workflows/WorkflowCard.tsx","packages/web/src/components/workflows/WorkflowDagViewer.tsx","packages/web/src/components/workflows/WorkflowExecution.tsx","packages/web/src/components/workflows/WorkflowList.tsx","packages/web/src/components/workflows/WorkflowLogs.tsx","packages/web/src/components/workflows/YamlCodeView.tsx","packages/web/src/contexts/ProjectContext.tsx","packages/web/src/hooks/useAutoScroll.ts","packages/web/src/hooks/useBuilderKeyboard.test.ts","packages/web/src/hooks/useBuilderKeyboard.ts","packages/web/src/hooks/useBuilderUndo.ts","packages/web/src/hooks/useBuilderValidation.ts","packages/web/src/hooks/useClickOutside.ts","packages/web/src/hooks/useDashboardSSE.ts","packages/web/src/hooks/useKeyboardShortcuts.ts","packages/web/src/hooks/useProviders.ts","packages/web/src/hooks/useSSE.ts","packages/web/src/index.css","packages/web/src/lib/api.ts","packages/web/src/lib/chat-message-reducer.test.ts","packages/web/src/lib/chat-message-reducer.ts","packages/web/src/lib/codebase-input.test.ts","packages/web/src/lib/codebase-input.ts","packages/web/src/lib/command-categories.ts","packages/web/src/lib/dag-layout.ts","packages/web/src/lib/format.test.ts","packages/web/src/lib/format.ts","packages/web/src/lib/message-cache.test.ts","packages/web/src/lib/message-cache.ts","packages/web/src/lib/query-client.ts","packages/web/src/lib/select-initial-node.test.ts","packages/web/src/lib/select-initial-node.ts","packages/web/src/lib/types.ts","packages/web/src/lib/utils.ts","packages/web/src/lib/workflow-metadata.test.ts","packages/web/src/lib/workflow-metadata.ts","packages/web/src/lib/workflow-utils.test.ts","packages/web/src/lib/workflow-utils.ts","packages/web/src/main.tsx","packages/web/src/routes/ChatPage.tsx","packages/web/src/routes/DashboardPage.tsx","packages/web/src/routes/SettingsPage.tsx","packages/web/src/routes/WorkflowBuilderPage.tsx","packages/web/src/routes/WorkflowExecutionPage.tsx","packages/web/src/routes/WorkflowsPage.tsx","packages/web/src/stores/workflow-store.test.ts","packages/web/src/stores/workflow-store.ts","packages/web/tsconfig.json","packages/web/vite.config.ts"],"API Server":["packages/server/package.json","packages/server/src/adapters/web.ts","packages/server/src/adapters/web/persistence.test.ts","packages/server/src/adapters/web/persistence.ts","packages/server/src/adapters/web/transport.test.ts","packages/server/src/adapters/web/transport.ts","packages/server/src/adapters/web/workflow-bridge.ts","packages/server/src/index.ts","packages/server/src/routes/api.codebases.test.ts","packages/server/src/routes/api.conversations.test.ts","packages/server/src/routes/api.health.test.ts","packages/server/src/routes/api.messages.test.ts","packages/server/src/routes/api.providers.test.ts","packages/server/src/routes/api.ts","packages/server/src/routes/api.workflow-runs.test.ts","packages/server/src/routes/api.workflows.test.ts","packages/server/src/routes/openapi-defaults.ts","packages/server/src/routes/schemas/codebase.schemas.ts","packages/server/src/routes/schemas/common.schemas.ts","packages/server/src/routes/schemas/config.schemas.ts","packages/server/src/routes/schemas/conversation.schemas.ts","packages/server/src/routes/schemas/provider.schemas.ts","packages/server/src/routes/schemas/system.schemas.ts","packages/server/src/routes/schemas/workflow.schemas.ts","packages/server/src/scripts/setup-auth.ts","packages/server/src/test/workflow-mock-factories.ts","packages/server/tsconfig.json","packages/server/tsconfig.tsbuildinfo","auth-service/package.json","auth-service/server.js","auth-service/test.js"],"API Server — server":["packages/server/package.json","packages/server/src/adapters/web.ts","packages/server/src/adapters/web/persistence.test.ts","packages/server/src/adapters/web/persistence.ts","packages/server/src/adapters/web/transport.test.ts","packages/server/src/adapters/web/transport.ts","packages/server/src/adapters/web/workflow-bridge.ts","packages/server/src/index.ts","packages/server/src/routes/api.codebases.test.ts","packages/server/src/routes/api.conversations.test.ts","packages/server/src/routes/api.health.test.ts","packages/server/src/routes/api.messages.test.ts","packages/server/src/routes/api.providers.test.ts","packages/server/src/routes/api.ts","packages/server/src/routes/api.workflow-runs.test.ts","packages/server/src/routes/api.workflows.test.ts","packages/server/src/routes/openapi-defaults.ts","packages/server/src/routes/schemas/codebase.schemas.ts","packages/server/src/routes/schemas/common.schemas.ts","packages/server/src/routes/schemas/config.schemas.ts","packages/server/src/routes/schemas/conversation.schemas.ts","packages/server/src/routes/schemas/provider.schemas.ts","packages/server/src/routes/schemas/system.schemas.ts","packages/server/src/routes/schemas/workflow.schemas.ts","packages/server/src/scripts/setup-auth.ts","packages/server/src/test/workflow-mock-factories.ts","packages/server/tsconfig.json","packages/server/tsconfig.tsbuildinfo"],"API Server — auth-service":["auth-service/package.json","auth-service/server.js","auth-service/test.js"],"Git & Environment Isolation":["packages/git/package.json","packages/git/src/branch.ts","packages/git/src/exec.ts","packages/git/src/git.test.ts","packages/git/src/index.ts","packages/git/src/repo.ts","packages/git/src/types.ts","packages/git/src/worktree.ts","packages/git/tsconfig.json","packages/isolation/package.json","packages/isolation/src/errors.test.ts","packages/isolation/src/errors.ts","packages/isolation/src/factory.test.ts","packages/isolation/src/factory.ts","packages/isolation/src/index.ts","packages/isolation/src/pr-state.test.ts","packages/isolation/src/pr-state.ts","packages/isolation/src/providers/worktree.test.ts","packages/isolation/src/providers/worktree.ts","packages/isolation/src/resolver.test.ts","packages/isolation/src/resolver.ts","packages/isolation/src/store.ts","packages/isolation/src/types.ts","packages/isolation/src/worktree-copy.test.ts","packages/isolation/src/worktree-copy.ts","packages/isolation/tsconfig.json","packages/core/src/operations/isolation-operations.test.ts","packages/core/src/operations/isolation-operations.ts"],"Git & Environment Isolation — git":["packages/git/package.json","packages/git/src/branch.ts","packages/git/src/exec.ts","packages/git/src/git.test.ts","packages/git/src/index.ts","packages/git/src/repo.ts","packages/git/src/types.ts","packages/git/src/worktree.ts","packages/git/tsconfig.json"],"Git & Environment Isolation — isolation":["packages/isolation/package.json","packages/isolation/src/errors.test.ts","packages/isolation/src/errors.ts","packages/isolation/src/factory.test.ts","packages/isolation/src/factory.ts","packages/isolation/src/index.ts","packages/isolation/src/pr-state.test.ts","packages/isolation/src/pr-state.ts","packages/isolation/src/providers/worktree.test.ts","packages/isolation/src/providers/worktree.ts","packages/isolation/src/resolver.test.ts","packages/isolation/src/resolver.ts","packages/isolation/src/store.ts","packages/isolation/src/types.ts","packages/isolation/src/worktree-copy.test.ts","packages/isolation/src/worktree-copy.ts","packages/isolation/tsconfig.json"],"Git & Environment Isolation — core":["packages/core/src/operations/isolation-operations.test.ts","packages/core/src/operations/isolation-operations.ts"],"System Utilities & Configuration":["packages/paths/package.json","packages/paths/src/archon-paths.test.ts","packages/paths/src/archon-paths.ts","packages/paths/src/bundled-build.test.ts","packages/paths/src/bundled-build.ts","packages/paths/src/env-integration.test.ts","packages/paths/src/env-loader.test.ts","packages/paths/src/env-loader.ts","packages/paths/src/index.ts","packages/paths/src/logger.test.ts","packages/paths/src/logger.ts","packages/paths/src/strip-cwd-env-boot.ts","packages/paths/src/strip-cwd-env.test.ts","packages/paths/src/strip-cwd-env.ts","packages/paths/src/telemetry.test.ts","packages/paths/src/telemetry.ts","packages/paths/src/update-check.test.ts","packages/paths/src/update-check.ts","packages/paths/tsconfig.json","packages/core/package.json","packages/core/src/config/config-loader.test.ts","packages/core/src/config/config-loader.ts","packages/core/src/config/config-types.ts","packages/core/src/config/index.ts","packages/core/src/services/cleanup-service.test.ts","packages/core/src/services/cleanup-service.ts","packages/core/src/services/title-generator.test.ts","packages/core/src/services/title-generator.ts","packages/core/src/utils/commands.ts","packages/core/src/utils/conversation-lock.test.ts","packages/core/src/utils/conversation-lock.ts","packages/core/src/utils/credential-sanitizer.test.ts","packages/core/src/utils/credential-sanitizer.ts","packages/core/src/utils/error-formatter.test.ts","packages/core/src/utils/error-formatter.ts","packages/core/src/utils/error.test.ts","packages/core/src/utils/error.ts","packages/core/src/utils/github-graphql.test.ts","packages/core/src/utils/github-graphql.ts","packages/core/src/utils/path-validation.test.ts","packages/core/src/utils/path-validation.ts","packages/core/src/utils/port-allocation.test.ts","packages/core/src/utils/port-allocation.ts","packages/core/src/utils/worktree-sync.test.ts","packages/core/src/utils/worktree-sync.ts","packages/core/src/test/mocks/logger.ts","packages/core/src/test/mocks/platform.ts","packages/core/src/test/setup.ts","packages/core/tsconfig.json","packages/core/tsconfig.tsbuildinfo","eslint.config.mjs","bunfig.toml","package.json","tsconfig.json"],"System Utilities & Configuration — paths":["packages/paths/package.json","packages/paths/src/archon-paths.test.ts","packages/paths/src/archon-paths.ts","packages/paths/src/bundled-build.test.ts","packages/paths/src/bundled-build.ts","packages/paths/src/env-integration.test.ts","packages/paths/src/env-loader.test.ts","packages/paths/src/env-loader.ts","packages/paths/src/index.ts","packages/paths/src/logger.test.ts","packages/paths/src/logger.ts","packages/paths/src/strip-cwd-env-boot.ts","packages/paths/src/strip-cwd-env.test.ts","packages/paths/src/strip-cwd-env.ts","packages/paths/src/telemetry.test.ts","packages/paths/src/telemetry.ts","packages/paths/src/update-check.test.ts","packages/paths/src/update-check.ts","packages/paths/tsconfig.json"],"System Utilities & Configuration — core":["packages/core/package.json","packages/core/src/config/config-loader.test.ts","packages/core/src/config/config-loader.ts","packages/core/src/config/config-types.ts","packages/core/src/config/index.ts","packages/core/src/services/cleanup-service.test.ts","packages/core/src/services/cleanup-service.ts","packages/core/src/services/title-generator.test.ts","packages/core/src/services/title-generator.ts","packages/core/src/utils/commands.ts","packages/core/src/utils/conversation-lock.test.ts","packages/core/src/utils/conversation-lock.ts","packages/core/src/utils/credential-sanitizer.test.ts","packages/core/src/utils/credential-sanitizer.ts","packages/core/src/utils/error-formatter.test.ts","packages/core/src/utils/error-formatter.ts","packages/core/src/utils/error.test.ts","packages/core/src/utils/error.ts","packages/core/src/utils/github-graphql.test.ts","packages/core/src/utils/github-graphql.ts","packages/core/src/utils/path-validation.test.ts","packages/core/src/utils/path-validation.ts","packages/core/src/utils/port-allocation.test.ts","packages/core/src/utils/port-allocation.ts","packages/core/src/utils/worktree-sync.test.ts","packages/core/src/utils/worktree-sync.ts","packages/core/src/test/mocks/logger.ts","packages/core/src/test/mocks/platform.ts","packages/core/src/test/setup.ts","packages/core/tsconfig.json","packages/core/tsconfig.tsbuildinfo"],"System Utilities & Configuration — eslint.config.mjs":["eslint.config.mjs"],"System Utilities & Configuration — bunfig.toml":["bunfig.toml"],"System Utilities & Configuration — package.json":["package.json"],"System Utilities & Configuration — tsconfig.json":["tsconfig.json"],"Documentation":["packages/docs-web/astro.config.mjs","packages/docs-web/package.json","packages/docs-web/src/content.config.ts","packages/docs-web/src/content/docs/adapters/community/discord.md","packages/docs-web/src/content/docs/adapters/community/gitea.md","packages/docs-web/src/content/docs/adapters/community/gitlab.md","packages/docs-web/src/content/docs/adapters/github.md","packages/docs-web/src/content/docs/adapters/index.md","packages/docs-web/src/content/docs/adapters/slack.md","packages/docs-web/src/content/docs/adapters/telegram.md","packages/docs-web/src/content/docs/adapters/web.md","packages/docs-web/src/content/docs/book/dag-workflows.md","packages/docs-web/src/content/docs/book/essential-workflows.md","packages/docs-web/src/content/docs/book/first-command.md","packages/docs-web/src/content/docs/book/first-five-minutes.md","packages/docs-web/src/content/docs/book/first-workflow.md","packages/docs-web/src/content/docs/book/hooks-and-quality.md","packages/docs-web/src/content/docs/book/how-it-works.md","packages/docs-web/src/content/docs/book/index.md","packages/docs-web/src/content/docs/book/isolation.md","packages/docs-web/src/content/docs/book/quick-reference.md","packages/docs-web/src/content/docs/book/what-is-archon.md","packages/docs-web/src/content/docs/contributing/adding-a-community-provider.md","packages/docs-web/src/content/docs/contributing/cli-internals.md","packages/docs-web/src/content/docs/contributing/dx-quirks.md","packages/docs-web/src/content/docs/contributing/index.md","packages/docs-web/src/content/docs/contributing/new-developer-guide.md","packages/docs-web/src/content/docs/contributing/releasing.md","packages/docs-web/src/content/docs/deployment/cloud.md","packages/docs-web/src/content/docs/deployment/docker.md","packages/docs-web/src/content/docs/deployment/e2e-testing-wsl.md","packages/docs-web/src/content/docs/deployment/e2e-testing.md","packages/docs-web/src/content/docs/deployment/index.md","packages/docs-web/src/content/docs/deployment/local.md","packages/docs-web/src/content/docs/deployment/windows.md","packages/docs-web/src/content/docs/getting-started/ai-assistants.md","packages/docs-web/src/content/docs/getting-started/concepts.md","packages/docs-web/src/content/docs/getting-started/configuration.md","packages/docs-web/src/content/docs/getting-started/installation.md","packages/docs-web/src/content/docs/getting-started/overview.md","packages/docs-web/src/content/docs/getting-started/quick-start.md","packages/docs-web/src/content/docs/guides/approval-nodes.md","packages/docs-web/src/content/docs/guides/authoring-commands.md","packages/docs-web/src/content/docs/guides/authoring-workflows.md","packages/docs-web/src/content/docs/guides/global-workflows.md","packages/docs-web/src/content/docs/guides/hooks.md","packages/docs-web/src/content/docs/guides/index.md","packages/docs-web/src/content/docs/guides/loop-nodes.md","packages/docs-web/src/content/docs/guides/mcp-servers.md","packages/docs-web/src/content/docs/guides/remotion-workflow.md","packages/docs-web/src/content/docs/guides/script-nodes.md","packages/docs-web/src/content/docs/guides/skills.md","packages/docs-web/src/content/docs/index.mdx","packages/docs-web/src/content/docs/reference/api.md","packages/docs-web/src/content/docs/reference/architecture.md","packages/docs-web/src/content/docs/reference/archon-directories.md","packages/docs-web/src/content/docs/reference/cli.md","packages/docs-web/src/content/docs/reference/commands.md","packages/docs-web/src/content/docs/reference/configuration.md","packages/docs-web/src/content/docs/reference/database.md","packages/docs-web/src/content/docs/reference/index.md","packages/docs-web/src/content/docs/reference/security.md","packages/docs-web/src/content/docs/reference/troubleshooting.md","packages/docs-web/src/content/docs/reference/variables.md","packages/docs-web/src/styles/custom.css","packages/docs-web/tsconfig.json","packages/adapters/src/community/chat/README.md","packages/adapters/src/community/forge/README.md","graphify-out/GRAPH_REPORT.md","graphify-out/cost.json","graphify-out/manifest.json","README.md","CLAUDE.md"],"Documentation — docs-web":["packages/docs-web/astro.config.mjs","packages/docs-web/package.json","packages/docs-web/src/content.config.ts","packages/docs-web/src/content/docs/adapters/community/discord.md","packages/docs-web/src/content/docs/adapters/community/gitea.md","packages/docs-web/src/content/docs/adapters/community/gitlab.md","packages/docs-web/src/content/docs/adapters/github.md","packages/docs-web/src/content/docs/adapters/index.md","packages/docs-web/src/content/docs/adapters/slack.md","packages/docs-web/src/content/docs/adapters/telegram.md","packages/docs-web/src/content/docs/adapters/web.md","packages/docs-web/src/content/docs/book/dag-workflows.md","packages/docs-web/src/content/docs/book/essential-workflows.md","packages/docs-web/src/content/docs/book/first-command.md","packages/docs-web/src/content/docs/book/first-five-minutes.md","packages/docs-web/src/content/docs/book/first-workflow.md","packages/docs-web/src/content/docs/book/hooks-and-quality.md","packages/docs-web/src/content/docs/book/how-it-works.md","packages/docs-web/src/content/docs/book/index.md","packages/docs-web/src/content/docs/book/isolation.md","packages/docs-web/src/content/docs/book/quick-reference.md","packages/docs-web/src/content/docs/book/what-is-archon.md","packages/docs-web/src/content/docs/contributing/adding-a-community-provider.md","packages/docs-web/src/content/docs/contributing/cli-internals.md","packages/docs-web/src/content/docs/contributing/dx-quirks.md","packages/docs-web/src/content/docs/contributing/index.md","packages/docs-web/src/content/docs/contributing/new-developer-guide.md","packages/docs-web/src/content/docs/contributing/releasing.md","packages/docs-web/src/content/docs/deployment/cloud.md","packages/docs-web/src/content/docs/deployment/docker.md","packages/docs-web/src/content/docs/deployment/e2e-testing-wsl.md","packages/docs-web/src/content/docs/deployment/e2e-testing.md","packages/docs-web/src/content/docs/deployment/index.md","packages/docs-web/src/content/docs/deployment/local.md","packages/docs-web/src/content/docs/deployment/windows.md","packages/docs-web/src/content/docs/getting-started/ai-assistants.md","packages/docs-web/src/content/docs/getting-started/concepts.md","packages/docs-web/src/content/docs/getting-started/configuration.md","packages/docs-web/src/content/docs/getting-started/installation.md","packages/docs-web/src/content/docs/getting-started/overview.md","packages/docs-web/src/content/docs/getting-started/quick-start.md","packages/docs-web/src/content/docs/guides/approval-nodes.md","packages/docs-web/src/content/docs/guides/authoring-commands.md","packages/docs-web/src/content/docs/guides/authoring-workflows.md","packages/docs-web/src/content/docs/guides/global-workflows.md","packages/docs-web/src/content/docs/guides/hooks.md","packages/docs-web/src/content/docs/guides/index.md","packages/docs-web/src/content/docs/guides/loop-nodes.md","packages/docs-web/src/content/docs/guides/mcp-servers.md","packages/docs-web/src/content/docs/guides/remotion-workflow.md","packages/docs-web/src/content/docs/guides/script-nodes.md","packages/docs-web/src/content/docs/guides/skills.md","packages/docs-web/src/content/docs/index.mdx","packages/docs-web/src/content/docs/reference/api.md","packages/docs-web/src/content/docs/reference/architecture.md","packages/docs-web/src/content/docs/reference/archon-directories.md","packages/docs-web/src/content/docs/reference/cli.md","packages/docs-web/src/content/docs/reference/commands.md","packages/docs-web/src/content/docs/reference/configuration.md","packages/docs-web/src/content/docs/reference/database.md","packages/docs-web/src/content/docs/reference/index.md","packages/docs-web/src/content/docs/reference/security.md","packages/docs-web/src/content/docs/reference/troubleshooting.md","packages/docs-web/src/content/docs/reference/variables.md","packages/docs-web/src/styles/custom.css","packages/docs-web/tsconfig.json"],"Documentation — adapters":["packages/adapters/src/community/chat/README.md","packages/adapters/src/community/forge/README.md"],"Documentation — graphify-out":["graphify-out/GRAPH_REPORT.md","graphify-out/cost.json","graphify-out/manifest.json"],"Documentation — README.md":["README.md"],"Documentation — CLAUDE.md":["CLAUDE.md"],"Deployment & Infrastructure":["Dockerfile","Dockerfile.user.example","docker-compose.yml","docker-compose.override.example.yml","docker-entrypoint.sh","Caddyfile.example","deploy/Dockerfile.user.example","deploy/cloud-init.yml","deploy/docker-compose.override.example.yml","deploy/docker-compose.yml","auth-service/Dockerfile","packages/docs-web/public/CNAME","packages/docs-web/public/install","packages/docs-web/public/install.ps1","scripts/build-binaries.sh","scripts/checksums.sh","scripts/generate-bundled-defaults.ts","scripts/install.ps1","scripts/install.sh","scripts/sync-versions.sh","scripts/tsconfig.json","scripts/update-homebrew.sh","scripts/validate-setup.sh"],"Other":["packages/core/src/operations/index.ts"]},"moduleTree":[{"name":"Core Orchestration","slug":"core-orchestration","files":["packages/core/src/orchestrator/orchestrator-agent.test.ts","packages/core/src/orchestrator/orchestrator-agent.ts","packages/core/src/orchestrator/orchestrator-isolation.test.ts","packages/core/src/orchestrator/orchestrator.test.ts","packages/core/src/orchestrator/orchestrator.ts","packages/core/src/orchestrator/prompt-builder.test.ts","packages/core/src/orchestrator/prompt-builder.ts","packages/core/src/handlers/clone.test.ts","packages/core/src/handlers/clone.ts","packages/core/src/handlers/command-handler.test.ts","packages/core/src/handlers/command-handler.ts","packages/core/src/state/session-transitions.test.ts","packages/core/src/state/session-transitions.ts","packages/core/src/types/index.ts","packages/core/src/index.ts"]},{"name":"Workflow Engine","slug":"workflow-engine","files":[],"children":[{"name":"Workflow Engine — workflows","slug":"workflow-engine-workflows","files":["packages/workflows/package.json","packages/workflows/src/command-validation.test.ts","packages/workflows/src/command-validation.ts","packages/workflows/src/condition-evaluator.test.ts","packages/workflows/src/condition-evaluator.ts","packages/workflows/src/dag-executor.test.ts","packages/workflows/src/dag-executor.ts","packages/workflows/src/defaults/bundled-defaults.test.ts","packages/workflows/src/defaults/bundled-defaults.ts","packages/workflows/src/deps.ts","packages/workflows/src/event-emitter.test.ts","packages/workflows/src/event-emitter.ts","packages/workflows/src/executor-preamble.test.ts","packages/workflows/src/executor-shared.test.ts","packages/workflows/src/executor-shared.ts","packages/workflows/src/executor.test.ts","packages/workflows/src/executor.ts","packages/workflows/src/hooks.test.ts","packages/workflows/src/load-command-prompt.test.ts","packages/workflows/src/loader.test.ts","packages/workflows/src/loader.ts","packages/workflows/src/logger.test.ts","packages/workflows/src/logger.ts","packages/workflows/src/router.test.ts","packages/workflows/src/router.ts","packages/workflows/src/runtime-check.test.ts","packages/workflows/src/schemas.test.ts","packages/workflows/src/schemas/dag-node.ts","packages/workflows/src/schemas/hooks.ts","packages/workflows/src/schemas/index.ts","packages/workflows/src/schemas/loop.ts","packages/workflows/src/schemas/retry.ts","packages/workflows/src/schemas/workflow-run.ts","packages/workflows/src/schemas/workflow.ts","packages/workflows/src/script-discovery.test.ts","packages/workflows/src/script-discovery.ts","packages/workflows/src/script-node-deps.test.ts","packages/workflows/src/store.ts","packages/workflows/src/test-utils.ts","packages/workflows/src/utils/duration.test.ts","packages/workflows/src/utils/duration.ts","packages/workflows/src/utils/idle-timeout.test.ts","packages/workflows/src/utils/idle-timeout.ts","packages/workflows/src/utils/tool-formatter.test.ts","packages/workflows/src/utils/tool-formatter.ts","packages/workflows/src/utils/variable-substitution.test.ts","packages/workflows/src/utils/variable-substitution.ts","packages/workflows/src/validation-parser.test.ts","packages/workflows/src/validation-parser.ts","packages/workflows/src/validator.test.ts","packages/workflows/src/validator.ts","packages/workflows/src/workflow-discovery.ts","packages/workflows/tsconfig.json"]},{"name":"Workflow Engine — core","slug":"workflow-engine-core","files":["packages/core/src/workflows/index.ts","packages/core/src/workflows/store-adapter.test.ts","packages/core/src/workflows/store-adapter.ts","packages/core/src/operations/workflow-operations.test.ts","packages/core/src/operations/workflow-operations.ts"]}]},{"name":"AI Providers","slug":"ai-providers","files":["packages/providers/package.json","packages/providers/src/claude/binary-resolver-dev.test.ts","packages/providers/src/claude/binary-resolver.test.ts","packages/providers/src/claude/binary-resolver.ts","packages/providers/src/claude/capabilities.ts","packages/providers/src/claude/config.ts","packages/providers/src/claude/index.ts","packages/providers/src/claude/provider.test.ts","packages/providers/src/claude/provider.ts","packages/providers/src/codex/binary-guard.test.ts","packages/providers/src/codex/binary-resolver-dev.test.ts","packages/providers/src/codex/binary-resolver.test.ts","packages/providers/src/codex/binary-resolver.ts","packages/providers/src/codex/capabilities.ts","packages/providers/src/codex/config.ts","packages/providers/src/codex/index.ts","packages/providers/src/codex/provider.test.ts","packages/providers/src/codex/provider.ts","packages/providers/src/community/pi/capabilities.ts","packages/providers/src/community/pi/config.test.ts","packages/providers/src/community/pi/config.ts","packages/providers/src/community/pi/event-bridge.test.ts","packages/providers/src/community/pi/event-bridge.ts","packages/providers/src/community/pi/index.ts","packages/providers/src/community/pi/model-ref.test.ts","packages/providers/src/community/pi/model-ref.ts","packages/providers/src/community/pi/options-translator.test.ts","packages/providers/src/community/pi/options-translator.ts","packages/providers/src/community/pi/provider-lazy-load.test.ts","packages/providers/src/community/pi/provider.test.ts","packages/providers/src/community/pi/provider.ts","packages/providers/src/community/pi/registration.ts","packages/providers/src/community/pi/resource-loader.ts","packages/providers/src/community/pi/session-resolver.test.ts","packages/providers/src/community/pi/session-resolver.ts","packages/providers/src/community/pi/ui-context-stub.test.ts","packages/providers/src/community/pi/ui-context-stub.ts","packages/providers/src/errors.ts","packages/providers/src/index.ts","packages/providers/src/registry.test.ts","packages/providers/src/registry.ts","packages/providers/src/test/mocks/logger.ts","packages/providers/src/types.ts","packages/providers/tsconfig.json"]},{"name":"Platform Adapters","slug":"platform-adapters","files":["packages/adapters/package.json","packages/adapters/src/chat/slack/adapter.test.ts","packages/adapters/src/chat/slack/adapter.ts","packages/adapters/src/chat/slack/auth.test.ts","packages/adapters/src/chat/slack/auth.ts","packages/adapters/src/chat/slack/index.ts","packages/adapters/src/chat/slack/types.ts","packages/adapters/src/chat/telegram/adapter.test.ts","packages/adapters/src/chat/telegram/adapter.ts","packages/adapters/src/chat/telegram/auth.test.ts","packages/adapters/src/chat/telegram/auth.ts","packages/adapters/src/chat/telegram/index.ts","packages/adapters/src/chat/telegram/markdown.test.ts","packages/adapters/src/chat/telegram/markdown.ts","packages/adapters/src/chat/telegram/types.ts","packages/adapters/src/community/chat/discord/adapter.test.ts","packages/adapters/src/community/chat/discord/adapter.ts","packages/adapters/src/community/chat/discord/auth.test.ts","packages/adapters/src/community/chat/discord/auth.ts","packages/adapters/src/community/chat/discord/index.ts","packages/adapters/src/community/chat/discord/types.ts","packages/adapters/src/community/forge/gitea/adapter.test.ts","packages/adapters/src/community/forge/gitea/adapter.ts","packages/adapters/src/community/forge/gitea/auth.ts","packages/adapters/src/community/forge/gitea/index.ts","packages/adapters/src/community/forge/gitea/types.ts","packages/adapters/src/community/forge/gitlab/adapter.test.ts","packages/adapters/src/community/forge/gitlab/adapter.ts","packages/adapters/src/community/forge/gitlab/auth.test.ts","packages/adapters/src/community/forge/gitlab/auth.ts","packages/adapters/src/community/forge/gitlab/index.ts","packages/adapters/src/community/forge/gitlab/types.ts","packages/adapters/src/forge/github/adapter.test.ts","packages/adapters/src/forge/github/adapter.ts","packages/adapters/src/forge/github/auth.test.ts","packages/adapters/src/forge/github/auth.ts","packages/adapters/src/forge/github/context.test.ts","packages/adapters/src/forge/github/index.ts","packages/adapters/src/forge/github/types.ts","packages/adapters/src/index.ts","packages/adapters/src/utils/message-splitting.test.ts","packages/adapters/src/utils/message-splitting.ts","packages/adapters/tsconfig.json"]},{"name":"Database Layer","slug":"database-layer","files":[],"children":[{"name":"Database Layer — migrations","slug":"database-layer-migrations","files":["migrations/000_combined.sql","migrations/001_initial_schema.sql","migrations/002_command_templates.sql","migrations/003_add_worktree.sql","migrations/004_worktree_sharing.sql","migrations/005_isolation_abstraction.sql","migrations/006_isolation_environments.sql","migrations/007_drop_legacy_columns.sql","migrations/008_workflow_runs.sql","migrations/009_workflow_last_activity.sql","migrations/010_immutable_sessions.sql","migrations/011_partial_unique_constraint.sql","migrations/012_workflow_events.sql","migrations/013_conversation_titles.sql","migrations/014_message_history.sql","migrations/015_background_dispatch.sql","migrations/016_session_ended_reason.sql","migrations/017_drop_command_templates.sql","migrations/018_fix_workflow_status_default.sql","migrations/019_workflow_resume_path.sql","migrations/020_codebase_env_vars.sql","migrations/021_add_allow_env_keys_to_codebases.sql"]},{"name":"Database Layer — core","slug":"database-layer-core","files":["packages/core/src/db/adapters/index.ts","packages/core/src/db/adapters/postgres.test.ts","packages/core/src/db/adapters/postgres.ts","packages/core/src/db/adapters/sqlite.test.ts","packages/core/src/db/adapters/sqlite.ts","packages/core/src/db/adapters/types.ts","packages/core/src/db/codebases.test.ts","packages/core/src/db/codebases.ts","packages/core/src/db/connection.test.ts","packages/core/src/db/connection.ts","packages/core/src/db/conversations.test.ts","packages/core/src/db/conversations.ts","packages/core/src/db/env-vars.test.ts","packages/core/src/db/env-vars.ts","packages/core/src/db/index.ts","packages/core/src/db/isolation-environments.test.ts","packages/core/src/db/isolation-environments.ts","packages/core/src/db/messages.test.ts","packages/core/src/db/messages.ts","packages/core/src/db/sessions.test.ts","packages/core/src/db/sessions.ts","packages/core/src/db/workflow-events.test.ts","packages/core/src/db/workflow-events.ts","packages/core/src/db/workflows.test.ts","packages/core/src/db/workflows.ts","packages/core/src/test/mocks/database.ts"]}]},{"name":"CLI Tooling","slug":"cli-tooling","files":[],"children":[{"name":"CLI Tooling — cli","slug":"cli-tooling-cli","files":["packages/cli/package.json","packages/cli/src/adapters/cli-adapter.test.ts","packages/cli/src/adapters/cli-adapter.ts","packages/cli/src/bundled-skill.ts","packages/cli/src/cli.test.ts","packages/cli/src/cli.ts","packages/cli/src/commands/chat.test.ts","packages/cli/src/commands/chat.ts","packages/cli/src/commands/continue.ts","packages/cli/src/commands/isolation.test.ts","packages/cli/src/commands/isolation.ts","packages/cli/src/commands/serve.test.ts","packages/cli/src/commands/serve.ts","packages/cli/src/commands/setup.test.ts","packages/cli/src/commands/setup.ts","packages/cli/src/commands/skill.test.ts","packages/cli/src/commands/skill.ts","packages/cli/src/commands/validate.ts","packages/cli/src/commands/version.test.ts","packages/cli/src/commands/version.ts","packages/cli/src/commands/workflow.test.ts","packages/cli/src/commands/workflow.ts","packages/cli/tsconfig.json"]},{"name":"CLI Tooling — homebrew","slug":"cli-tooling-homebrew","files":["homebrew/archon.rb"]}]},{"name":"Web Frontend","slug":"web-frontend","files":["packages/web/components.json","packages/web/index.html","packages/web/package.json","packages/web/src/App.tsx","packages/web/src/components/chat/ChatInterface.tsx","packages/web/src/components/chat/ErrorCard.tsx","packages/web/src/components/chat/LockIndicator.tsx","packages/web/src/components/chat/MessageBubble.tsx","packages/web/src/components/chat/MessageInput.tsx","packages/web/src/components/chat/MessageList.tsx","packages/web/src/components/chat/ToolCallCard.tsx","packages/web/src/components/chat/WorkflowProgressCard.tsx","packages/web/src/components/conversations/ConversationItem.tsx","packages/web/src/components/dashboard/ConfirmRunActionDialog.tsx","packages/web/src/components/dashboard/StatusSummaryBar.tsx","packages/web/src/components/dashboard/WorkflowHistoryTable.tsx","packages/web/src/components/dashboard/WorkflowRunCard.tsx","packages/web/src/components/dashboard/WorkflowRunGroup.tsx","packages/web/src/components/layout/Header.tsx","packages/web/src/components/layout/Layout.tsx","packages/web/src/components/layout/Sidebar.tsx","packages/web/src/components/layout/TopNav.tsx","packages/web/src/components/sidebar/AllConversationsView.tsx","packages/web/src/components/sidebar/ProjectDetail.tsx","packages/web/src/components/sidebar/ProjectSelector.tsx","packages/web/src/components/sidebar/SearchBar.tsx","packages/web/src/components/sidebar/WorkflowInvoker.tsx","packages/web/src/components/ui/alert-dialog.tsx","packages/web/src/components/ui/badge.tsx","packages/web/src/components/ui/button.tsx","packages/web/src/components/ui/card.tsx","packages/web/src/components/ui/collapsible.tsx","packages/web/src/components/ui/dialog.tsx","packages/web/src/components/ui/input.tsx","packages/web/src/components/ui/resizable.tsx","packages/web/src/components/ui/scroll-area.tsx","packages/web/src/components/ui/separator.tsx","packages/web/src/components/ui/tabs.tsx","packages/web/src/components/ui/textarea.tsx","packages/web/src/components/ui/tooltip.tsx","packages/web/src/components/workflows/ArtifactSummary.tsx","packages/web/src/components/workflows/ArtifactViewerModal.tsx","packages/web/src/components/workflows/BuilderToolbar.tsx","packages/web/src/components/workflows/CommandPicker.tsx","packages/web/src/components/workflows/DagNodeComponent.tsx","packages/web/src/components/workflows/DagNodeProgress.tsx","packages/web/src/components/workflows/ExecutionDagNode.tsx","packages/web/src/components/workflows/NodeInspector.tsx","packages/web/src/components/workflows/NodeLibrary.tsx","packages/web/src/components/workflows/NodePalette.tsx","packages/web/src/components/workflows/QuickAddPicker.tsx","packages/web/src/components/workflows/StatusBar.tsx","packages/web/src/components/workflows/StatusIcon.tsx","packages/web/src/components/workflows/StepLogs.tsx","packages/web/src/components/workflows/ValidationPanel.tsx","packages/web/src/components/workflows/WorkflowBuilder.tsx","packages/web/src/components/workflows/WorkflowCanvas.tsx","packages/web/src/components/workflows/WorkflowCard.tsx","packages/web/src/components/workflows/WorkflowDagViewer.tsx","packages/web/src/components/workflows/WorkflowExecution.tsx","packages/web/src/components/workflows/WorkflowList.tsx","packages/web/src/components/workflows/WorkflowLogs.tsx","packages/web/src/components/workflows/YamlCodeView.tsx","packages/web/src/contexts/ProjectContext.tsx","packages/web/src/hooks/useAutoScroll.ts","packages/web/src/hooks/useBuilderKeyboard.test.ts","packages/web/src/hooks/useBuilderKeyboard.ts","packages/web/src/hooks/useBuilderUndo.ts","packages/web/src/hooks/useBuilderValidation.ts","packages/web/src/hooks/useClickOutside.ts","packages/web/src/hooks/useDashboardSSE.ts","packages/web/src/hooks/useKeyboardShortcuts.ts","packages/web/src/hooks/useProviders.ts","packages/web/src/hooks/useSSE.ts","packages/web/src/index.css","packages/web/src/lib/api.ts","packages/web/src/lib/chat-message-reducer.test.ts","packages/web/src/lib/chat-message-reducer.ts","packages/web/src/lib/codebase-input.test.ts","packages/web/src/lib/codebase-input.ts","packages/web/src/lib/command-categories.ts","packages/web/src/lib/dag-layout.ts","packages/web/src/lib/format.test.ts","packages/web/src/lib/format.ts","packages/web/src/lib/message-cache.test.ts","packages/web/src/lib/message-cache.ts","packages/web/src/lib/query-client.ts","packages/web/src/lib/select-initial-node.test.ts","packages/web/src/lib/select-initial-node.ts","packages/web/src/lib/types.ts","packages/web/src/lib/utils.ts","packages/web/src/lib/workflow-metadata.test.ts","packages/web/src/lib/workflow-metadata.ts","packages/web/src/lib/workflow-utils.test.ts","packages/web/src/lib/workflow-utils.ts","packages/web/src/main.tsx","packages/web/src/routes/ChatPage.tsx","packages/web/src/routes/DashboardPage.tsx","packages/web/src/routes/SettingsPage.tsx","packages/web/src/routes/WorkflowBuilderPage.tsx","packages/web/src/routes/WorkflowExecutionPage.tsx","packages/web/src/routes/WorkflowsPage.tsx","packages/web/src/stores/workflow-store.test.ts","packages/web/src/stores/workflow-store.ts","packages/web/tsconfig.json","packages/web/vite.config.ts"]},{"name":"API Server","slug":"api-server","files":[],"children":[{"name":"API Server — server","slug":"api-server-server","files":["packages/server/package.json","packages/server/src/adapters/web.ts","packages/server/src/adapters/web/persistence.test.ts","packages/server/src/adapters/web/persistence.ts","packages/server/src/adapters/web/transport.test.ts","packages/server/src/adapters/web/transport.ts","packages/server/src/adapters/web/workflow-bridge.ts","packages/server/src/index.ts","packages/server/src/routes/api.codebases.test.ts","packages/server/src/routes/api.conversations.test.ts","packages/server/src/routes/api.health.test.ts","packages/server/src/routes/api.messages.test.ts","packages/server/src/routes/api.providers.test.ts","packages/server/src/routes/api.ts","packages/server/src/routes/api.workflow-runs.test.ts","packages/server/src/routes/api.workflows.test.ts","packages/server/src/routes/openapi-defaults.ts","packages/server/src/routes/schemas/codebase.schemas.ts","packages/server/src/routes/schemas/common.schemas.ts","packages/server/src/routes/schemas/config.schemas.ts","packages/server/src/routes/schemas/conversation.schemas.ts","packages/server/src/routes/schemas/provider.schemas.ts","packages/server/src/routes/schemas/system.schemas.ts","packages/server/src/routes/schemas/workflow.schemas.ts","packages/server/src/scripts/setup-auth.ts","packages/server/src/test/workflow-mock-factories.ts","packages/server/tsconfig.json","packages/server/tsconfig.tsbuildinfo"]},{"name":"API Server — auth-service","slug":"api-server-auth-service","files":["auth-service/package.json","auth-service/server.js","auth-service/test.js"]}]},{"name":"Git & Environment Isolation","slug":"git-environment-isolation","files":[],"children":[{"name":"Git & Environment Isolation — git","slug":"git-environment-isolation-git","files":["packages/git/package.json","packages/git/src/branch.ts","packages/git/src/exec.ts","packages/git/src/git.test.ts","packages/git/src/index.ts","packages/git/src/repo.ts","packages/git/src/types.ts","packages/git/src/worktree.ts","packages/git/tsconfig.json"]},{"name":"Git & Environment Isolation — isolation","slug":"git-environment-isolation-isolation","files":["packages/isolation/package.json","packages/isolation/src/errors.test.ts","packages/isolation/src/errors.ts","packages/isolation/src/factory.test.ts","packages/isolation/src/factory.ts","packages/isolation/src/index.ts","packages/isolation/src/pr-state.test.ts","packages/isolation/src/pr-state.ts","packages/isolation/src/providers/worktree.test.ts","packages/isolation/src/providers/worktree.ts","packages/isolation/src/resolver.test.ts","packages/isolation/src/resolver.ts","packages/isolation/src/store.ts","packages/isolation/src/types.ts","packages/isolation/src/worktree-copy.test.ts","packages/isolation/src/worktree-copy.ts","packages/isolation/tsconfig.json"]},{"name":"Git & Environment Isolation — core","slug":"git-environment-isolation-core","files":["packages/core/src/operations/isolation-operations.test.ts","packages/core/src/operations/isolation-operations.ts"]}]},{"name":"System Utilities & Configuration","slug":"system-utilities-configuration","files":[],"children":[{"name":"System Utilities & Configuration — paths","slug":"system-utilities-configuration-paths","files":["packages/paths/package.json","packages/paths/src/archon-paths.test.ts","packages/paths/src/archon-paths.ts","packages/paths/src/bundled-build.test.ts","packages/paths/src/bundled-build.ts","packages/paths/src/env-integration.test.ts","packages/paths/src/env-loader.test.ts","packages/paths/src/env-loader.ts","packages/paths/src/index.ts","packages/paths/src/logger.test.ts","packages/paths/src/logger.ts","packages/paths/src/strip-cwd-env-boot.ts","packages/paths/src/strip-cwd-env.test.ts","packages/paths/src/strip-cwd-env.ts","packages/paths/src/telemetry.test.ts","packages/paths/src/telemetry.ts","packages/paths/src/update-check.test.ts","packages/paths/src/update-check.ts","packages/paths/tsconfig.json"]},{"name":"System Utilities & Configuration — core","slug":"system-utilities-configuration-core","files":["packages/core/package.json","packages/core/src/config/config-loader.test.ts","packages/core/src/config/config-loader.ts","packages/core/src/config/config-types.ts","packages/core/src/config/index.ts","packages/core/src/services/cleanup-service.test.ts","packages/core/src/services/cleanup-service.ts","packages/core/src/services/title-generator.test.ts","packages/core/src/services/title-generator.ts","packages/core/src/utils/commands.ts","packages/core/src/utils/conversation-lock.test.ts","packages/core/src/utils/conversation-lock.ts","packages/core/src/utils/credential-sanitizer.test.ts","packages/core/src/utils/credential-sanitizer.ts","packages/core/src/utils/error-formatter.test.ts","packages/core/src/utils/error-formatter.ts","packages/core/src/utils/error.test.ts","packages/core/src/utils/error.ts","packages/core/src/utils/github-graphql.test.ts","packages/core/src/utils/github-graphql.ts","packages/core/src/utils/path-validation.test.ts","packages/core/src/utils/path-validation.ts","packages/core/src/utils/port-allocation.test.ts","packages/core/src/utils/port-allocation.ts","packages/core/src/utils/worktree-sync.test.ts","packages/core/src/utils/worktree-sync.ts","packages/core/src/test/mocks/logger.ts","packages/core/src/test/mocks/platform.ts","packages/core/src/test/setup.ts","packages/core/tsconfig.json","packages/core/tsconfig.tsbuildinfo"]},{"name":"System Utilities & Configuration — eslint.config.mjs","slug":"system-utilities-configuration-eslint-config-mjs","files":["eslint.config.mjs"]},{"name":"System Utilities & Configuration — bunfig.toml","slug":"system-utilities-configuration-bunfig-toml","files":["bunfig.toml"]},{"name":"System Utilities & Configuration — package.json","slug":"system-utilities-configuration-package-json","files":["package.json"]},{"name":"System Utilities & Configuration — tsconfig.json","slug":"system-utilities-configuration-tsconfig-json","files":["tsconfig.json"]}]},{"name":"Documentation","slug":"documentation","files":[],"children":[{"name":"Documentation — docs-web","slug":"documentation-docs-web","files":["packages/docs-web/astro.config.mjs","packages/docs-web/package.json","packages/docs-web/src/content.config.ts","packages/docs-web/src/content/docs/adapters/community/discord.md","packages/docs-web/src/content/docs/adapters/community/gitea.md","packages/docs-web/src/content/docs/adapters/community/gitlab.md","packages/docs-web/src/content/docs/adapters/github.md","packages/docs-web/src/content/docs/adapters/index.md","packages/docs-web/src/content/docs/adapters/slack.md","packages/docs-web/src/content/docs/adapters/telegram.md","packages/docs-web/src/content/docs/adapters/web.md","packages/docs-web/src/content/docs/book/dag-workflows.md","packages/docs-web/src/content/docs/book/essential-workflows.md","packages/docs-web/src/content/docs/book/first-command.md","packages/docs-web/src/content/docs/book/first-five-minutes.md","packages/docs-web/src/content/docs/book/first-workflow.md","packages/docs-web/src/content/docs/book/hooks-and-quality.md","packages/docs-web/src/content/docs/book/how-it-works.md","packages/docs-web/src/content/docs/book/index.md","packages/docs-web/src/content/docs/book/isolation.md","packages/docs-web/src/content/docs/book/quick-reference.md","packages/docs-web/src/content/docs/book/what-is-archon.md","packages/docs-web/src/content/docs/contributing/adding-a-community-provider.md","packages/docs-web/src/content/docs/contributing/cli-internals.md","packages/docs-web/src/content/docs/contributing/dx-quirks.md","packages/docs-web/src/content/docs/contributing/index.md","packages/docs-web/src/content/docs/contributing/new-developer-guide.md","packages/docs-web/src/content/docs/contributing/releasing.md","packages/docs-web/src/content/docs/deployment/cloud.md","packages/docs-web/src/content/docs/deployment/docker.md","packages/docs-web/src/content/docs/deployment/e2e-testing-wsl.md","packages/docs-web/src/content/docs/deployment/e2e-testing.md","packages/docs-web/src/content/docs/deployment/index.md","packages/docs-web/src/content/docs/deployment/local.md","packages/docs-web/src/content/docs/deployment/windows.md","packages/docs-web/src/content/docs/getting-started/ai-assistants.md","packages/docs-web/src/content/docs/getting-started/concepts.md","packages/docs-web/src/content/docs/getting-started/configuration.md","packages/docs-web/src/content/docs/getting-started/installation.md","packages/docs-web/src/content/docs/getting-started/overview.md","packages/docs-web/src/content/docs/getting-started/quick-start.md","packages/docs-web/src/content/docs/guides/approval-nodes.md","packages/docs-web/src/content/docs/guides/authoring-commands.md","packages/docs-web/src/content/docs/guides/authoring-workflows.md","packages/docs-web/src/content/docs/guides/global-workflows.md","packages/docs-web/src/content/docs/guides/hooks.md","packages/docs-web/src/content/docs/guides/index.md","packages/docs-web/src/content/docs/guides/loop-nodes.md","packages/docs-web/src/content/docs/guides/mcp-servers.md","packages/docs-web/src/content/docs/guides/remotion-workflow.md","packages/docs-web/src/content/docs/guides/script-nodes.md","packages/docs-web/src/content/docs/guides/skills.md","packages/docs-web/src/content/docs/index.mdx","packages/docs-web/src/content/docs/reference/api.md","packages/docs-web/src/content/docs/reference/architecture.md","packages/docs-web/src/content/docs/reference/archon-directories.md","packages/docs-web/src/content/docs/reference/cli.md","packages/docs-web/src/content/docs/reference/commands.md","packages/docs-web/src/content/docs/reference/configuration.md","packages/docs-web/src/content/docs/reference/database.md","packages/docs-web/src/content/docs/reference/index.md","packages/docs-web/src/content/docs/reference/security.md","packages/docs-web/src/content/docs/reference/troubleshooting.md","packages/docs-web/src/content/docs/reference/variables.md","packages/docs-web/src/styles/custom.css","packages/docs-web/tsconfig.json"]},{"name":"Documentation — adapters","slug":"documentation-adapters","files":["packages/adapters/src/community/chat/README.md","packages/adapters/src/community/forge/README.md"]},{"name":"Documentation — graphify-out","slug":"documentation-graphify-out","files":["graphify-out/GRAPH_REPORT.md","graphify-out/cost.json","graphify-out/manifest.json"]},{"name":"Documentation — README.md","slug":"documentation-readme-md","files":["README.md"]},{"name":"Documentation — CLAUDE.md","slug":"documentation-claude-md","files":["CLAUDE.md"]}]},{"name":"Deployment & Infrastructure","slug":"deployment-infrastructure","files":["Dockerfile","Dockerfile.user.example","docker-compose.yml","docker-compose.override.example.yml","docker-entrypoint.sh","Caddyfile.example","deploy/Dockerfile.user.example","deploy/cloud-init.yml","deploy/docker-compose.override.example.yml","deploy/docker-compose.yml","auth-service/Dockerfile","packages/docs-web/public/CNAME","packages/docs-web/public/install","packages/docs-web/public/install.ps1","scripts/build-binaries.sh","scripts/checksums.sh","scripts/generate-bundled-defaults.ts","scripts/install.ps1","scripts/install.sh","scripts/sync-versions.sh","scripts/tsconfig.json","scripts/update-homebrew.sh","scripts/validate-setup.sh"]},{"name":"Other","slug":"other","files":["packages/core/src/operations/index.ts"]}]}; | |
| (function() { | |
| var activePage = 'overview'; | |
| document.addEventListener('DOMContentLoaded', function() { | |
| mermaid.initialize({ startOnLoad: false, theme: 'neutral', securityLevel: 'loose' }); | |
| renderMeta(); | |
| renderNav(); | |
| document.getElementById('menu-toggle').addEventListener('click', function() { | |
| document.getElementById('sidebar').classList.toggle('open'); | |
| }); | |
| if (location.hash && location.hash.length > 1) { | |
| activePage = decodeURIComponent(location.hash.slice(1)); | |
| } | |
| navigateTo(activePage); | |
| }); | |
| function renderMeta() { | |
| if (!META) return; | |
| var el = document.getElementById('meta-info'); | |
| var parts = []; | |
| if (META.generatedAt) { | |
| parts.push(new Date(META.generatedAt).toLocaleDateString()); | |
| } | |
| if (META.model) parts.push(META.model); | |
| if (META.fromCommit) parts.push(META.fromCommit.slice(0, 8)); | |
| el.textContent = parts.join(' \u00b7 '); | |
| } | |
| function renderNav() { | |
| var container = document.getElementById('nav-tree'); | |
| var html = '<div class="nav-section">'; | |
| html += '<a class="nav-item overview" data-page="overview" href="#overview">Overview</a>'; | |
| html += '</div>'; | |
| if (TREE.length > 0) { | |
| html += '<div class="nav-group-label">Modules</div>'; | |
| html += buildNavTree(TREE); | |
| } | |
| container.innerHTML = html; | |
| container.addEventListener('click', function(e) { | |
| var target = e.target; | |
| while (target && !target.dataset.page) { target = target.parentElement; } | |
| if (target && target.dataset.page) { | |
| e.preventDefault(); | |
| navigateTo(target.dataset.page); | |
| } | |
| }); | |
| } | |
| function buildNavTree(nodes) { | |
| var html = ''; | |
| for (var i = 0; i < nodes.length; i++) { | |
| var node = nodes[i]; | |
| html += '<div class="nav-section">'; | |
| html += '<a class="nav-item" data-page="' + escH(node.slug) + '" href="#' + encodeURIComponent(node.slug) + '">' + escH(node.name) + '</a>'; | |
| if (node.children && node.children.length > 0) { | |
| html += '<div class="nav-children">' + buildNavTree(node.children) + '</div>'; | |
| } | |
| html += '</div>'; | |
| } | |
| return html; | |
| } | |
| function escH(s) { | |
| var d = document.createElement('div'); | |
| d.textContent = s; | |
| return d.innerHTML; | |
| } | |
| function navigateTo(page) { | |
| activePage = page; | |
| location.hash = encodeURIComponent(page); | |
| var items = document.querySelectorAll('.nav-item'); | |
| for (var i = 0; i < items.length; i++) { | |
| if (items[i].dataset.page === page) { | |
| items[i].classList.add('active'); | |
| } else { | |
| items[i].classList.remove('active'); | |
| } | |
| } | |
| var contentEl = document.getElementById('content'); | |
| var md = PAGES[page]; | |
| if (!md) { | |
| contentEl.innerHTML = '<div class="empty-state"><h2>Page not found</h2><p>' + escH(page) + '.md does not exist.</p></div>'; | |
| return; | |
| } | |
| contentEl.innerHTML = marked.parse(md); | |
| // Rewrite .md links to hash navigation | |
| var links = contentEl.querySelectorAll('a[href]'); | |
| for (var i = 0; i < links.length; i++) { | |
| var href = links[i].getAttribute('href'); | |
| if (href && href.endsWith('.md') && href.indexOf('://') === -1) { | |
| var slug = href.replace(/\.md$/, ''); | |
| links[i].setAttribute('href', '#' + encodeURIComponent(slug)); | |
| (function(s) { | |
| links[i].addEventListener('click', function(e) { | |
| e.preventDefault(); | |
| navigateTo(s); | |
| }); | |
| })(slug); | |
| } | |
| } | |
| // Convert mermaid code blocks into mermaid divs | |
| var mermaidBlocks = contentEl.querySelectorAll('pre code.language-mermaid'); | |
| for (var i = 0; i < mermaidBlocks.length; i++) { | |
| var pre = mermaidBlocks[i].parentElement; | |
| var div = document.createElement('div'); | |
| div.className = 'mermaid'; | |
| div.textContent = mermaidBlocks[i].textContent; | |
| pre.parentNode.replaceChild(div, pre); | |
| } | |
| try { mermaid.run({ querySelector: '.mermaid' }); } catch(e) {} | |
| window.scrollTo(0, 0); | |
| document.getElementById('sidebar').classList.remove('open'); | |
| } | |
| })(); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment