archondev 2.19.56 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -25,24 +25,40 @@ npm install -g archondev; archon
25
25
  - Bug reporting with root cause analysis
26
26
  - AI-powered code review for any codebase
27
27
  - Multi-provider key support with adversarial features
28
+ - **Risk scoring** — 0-100 risk assessment before every execution
29
+ - **Ship pipeline** — `archon ship`: review → test → version → changelog → PR
30
+ - **Visual QA** — `archon qa`: headless browser health checks with diff-aware page testing
31
+ - **Session retrospective** — `archon retro`: quantitative metrics on your session
28
32
 
29
33
  ### Option 2: Lite Package
30
- Copy governance files into any project. Works with your existing AI tools: **Cursor, Claude Code, Windsurf, Amp, Copilot, Gemini**, and more.
34
+ Context-aware intelligence for your existing AI tools: **Cursor, Claude Code, Windsurf, Amp, Copilot, Gemini**, and more. Your AI detects what you're doing and proactively offers the right help — no commands to memorize.
31
35
 
32
36
  [Download Lite Packages →](https://archondev.io/download)
33
37
 
34
- **What you get:**
38
+ **Context-Aware Intelligence (NEW):**
39
+ - **Fix-First Code Review** — Auto-fixes mechanical issues, only asks about ambiguous ones
40
+ - **AI Slop Detection** — 10-item blacklist catches generic AI design patterns, scored A-F
41
+ - **Systematic Debugging** — Root cause first, 3-strike hypothesis testing, regression prevention
42
+ - **Ship Readiness Dashboard** — Pre-deploy checklist tracks all quality gates across your session
43
+ - **Scope Management** — 4 modes (expand/selective/hold/reduce) when scope creep detected
44
+ - **Self-Regulation Guardrails** — Blast radius checks, file limits, automatic checkpoints
45
+ - **Design Governance** — DESIGN.md as design source of truth with visual audit
46
+ - **Completion Status** — Clear DONE/CONCERNS/BLOCKED/NEEDS_CONTEXT reporting
47
+ - **Progress Reflection** — Solo retro at natural milestones
48
+ - **Expert Review Spec** — Generate a consultant-ready technical spec (gap analysis, approach review, UX enhancement) at any milestone
49
+ - **Features Dashboard** — Live HTML page tracking which capabilities you've used, what's available, and what's recommended next
50
+
51
+ **Governance Foundation:**
35
52
  - .archon/active/architecture.md template with best practices
36
- - **Quality Level / Posture** — Tell AI if it's prototype, production, or enterprise-grade
53
+ - **Quality Level / Posture** — prototype/production/enterprise-grade behavior
54
+ - **DEPENDENCIES.md** — File-level dependency tracking to prevent regressions
37
55
  - IDE-specific rule files (.cursorrules, CLAUDE.md, GEMINI.md, etc.)
38
- - Progress tracking templates
39
- - **DEPENDENCIES.md** — Track file-level dependencies to prevent regressions
40
- - **First-Run Walkthrough** — Guided onboarding when AI detects your governance files
41
- - **Code Review Mode** — Structured code review without changing your code
42
- - **Local Database** — Track atoms and learnings in SQLite (no CLI required)
43
- - **Memory Management** — Context handoff protocol for long sessions
44
- - **Task Extraction Protocol** — AI confirms all items before starting, nothing gets forgotten
45
- - **Pre-Deploy Accessibility** — WCAG 2.2 AA check before going live, legal liability warnings
56
+ - **24 on-demand AI skills** — Design review, debugging, ship readiness, scope review, accessibility, SEO/GEO, color scheme picker, expert review, features dashboard, and more — loaded only when triggered, keeping context lean
57
+ - **Skills-based architecture** — 80% smaller context footprint (8.6 KB core vs 42 KB monolithic). Skills load on-demand with progressive disclosure
58
+ - **Claude Code: 16 native slash commands** — `/debug`, `/design-review`, `/ship-readiness`, `/code-review`, `/scope-check`, `/expert-review`, `/geo-optimize`, `/seo-check`, `/accessibility`, `/reflect`, `/handoff`, `/plan-tasks`, `/color-scheme`, `/rollback`, `/dashboard`, `/constitution`
59
+ - **GEO Optimization** — 7-phase protocol for AI search citation: identity phrases, atomic claims, JSON-LD schemas, and audit ([free tools](https://archondev.io/geo))
60
+ - **Task Extraction** — AI confirms all items before starting, nothing gets forgotten
61
+ - **Context Handoff** — Memory management for long sessions
46
62
  - Works with any AI coding assistant
47
63
 
48
64
  ### Local Governance SQLite (Dev Only)
@@ -60,12 +76,11 @@ pnpm exec tsx scripts/init-governance-db.ts
60
76
 
61
77
  | Command | Description |
62
78
  |---------|-------------|
63
- | `archon` | Interactive mode — just run and follow prompts |
79
+ | `archon` | Chat-first interactive mode — just run and start talking |
64
80
  | `archon init` | Initialize in your project |
65
- | `archon login` | Authenticate with ArchonDev |
66
- | `archon upgrade` | Switch between Free and BYOK modes |
67
- | `archon config ai` | Guided BYOK setup (providers + key entry) |
68
- | `archon status` | Show login status and current mode |
81
+ | `archon mode` | Choose local governance mode or BYOK AI mode |
82
+ | `archon config ai` | Guided BYOK provider-key setup |
83
+ | `archon status` | Show local mode, auth, and project status |
69
84
  | `archon plan <description>` | Create a work item with AI planning (extracts and confirms multi-item requests) |
70
85
  | `archon execute <atom-id>` | Execute with quality gates |
71
86
  | `archon list` | List all work items |
@@ -98,17 +113,15 @@ pnpm exec tsx scripts/init-governance-db.ts
98
113
  | `archon governance handoff` | Log handoff + current context |
99
114
  | `archon governance migrate` | Migrate legacy governance files |
100
115
  | `archon governance sqlite-init` | Initialize or refresh local governance SQLite DB |
101
- | `archon github connect` | Link GitHub account for cloud execution |
102
- | `archon github status` | Check GitHub connection status |
103
- | `archon session save [name]` | Save current session to cloud |
104
- | `archon session resume [id]` | Resume session on another device |
105
- | `archon execute ATOM --cloud` | Execute in cloud (creates PR when done) |
106
- | `archon cloud status` | List cloud executions |
107
- | `archon parallel cloud ATOM-001 ATOM-002` | Legacy command (disabled in free/BYOK mode) |
108
- | `archon index init [--local\|--cloud]` | Initialize semantic indexing |
109
- | `archon index update [--cloud]` | Index changed files |
110
- | `archon index search "query" [--cloud]` | Semantic code search |
116
+ | `archon index init` | Initialize local semantic indexing |
117
+ | `archon index update` | Index changed files |
118
+ | `archon index search "query"` | Semantic code search |
111
119
  | `archon parallel status` | Show parallel execution status |
120
+ | `archon ship` | Ship pipeline: review → test → version → changelog → PR |
121
+ | `archon ship --dry-run` | Run all ship checks without committing |
122
+ | `archon qa` | Visual QA with headless browser health checks |
123
+ | `archon qa --url <url>` | Test specific URL |
124
+ | `archon retro` | Session retrospective with quantitative metrics |
112
125
  | `archon deploy` | One-click deploy (auto-detect platform) |
113
126
  | `archon cleanup check` | Analyze workspace for bloat |
114
127
  | `archon cleanup run` | Execute cleanup tasks |
@@ -130,12 +143,14 @@ pnpm exec tsx scripts/init-governance-db.ts
130
143
 
131
144
  ## Pricing
132
145
 
133
- | Mode | Cost | What You Get |
134
- |------|------|--------------|
135
- | **Free (Download / Governance)** | $0 | Governance/workflow layer with no built-in AI calls |
136
- | **BYOK (CLI + AI)** | $0 to ArchonDev | Use your own provider keys; provider bills tokens directly |
146
+ **ArchonDev is Free.** There are no paid tiers, no subscriptions, and no credit card required.
147
+
148
+ | Mode | Cost to ArchonDev | What You Get |
149
+ |------|-------------------|--------------|
150
+ | **Download / Governance** | $0 | Governance/workflow layer with no built-in AI calls |
151
+ | **CLI + AI (BYOK)** | $0 | Full CLI with AI — bring your own API keys; your provider bills tokens directly at cost |
137
152
 
138
- No paid tiers, no credit purchases, and no Archon token markup.
153
+ No Archon token markup. You pay your LLM provider directly at their published rates.
139
154
 
140
155
  ### BYOK Key Security
141
156
 
@@ -146,12 +161,12 @@ No paid tiers, no credit purchases, and no Archon token markup.
146
161
 
147
162
  ## How It Works
148
163
 
149
- 1. **Login & Choose Mode** Create account, choose Free or BYOK
150
- 2. **AI Interview** — Natural conversation about your project (or skip to defaults)
151
- 3. **Define Your Rules** — ARCHITECTURE.md with boundaries and invariants
152
- 4. **AI Reads Rules First** — Every session starts by understanding your architecture
153
- 5. **Changes Are Validated** — Quality gates check code before it's applied
154
- 6. **Learnings Persist** — Insights saved for future sessions
164
+ 1. **Run `archon`** Archon inspects the current folder and governance state
165
+ 2. **Add keys only if needed** — BYOK setup is local-only and optional until you want AI actions
166
+ 3. **Start in chat** — Ask naturally; Archon decides when to stay conversational vs create atoms
167
+ 4. **Governance loads first** — Architecture, dependencies, and progress are respected automatically
168
+ 5. **Changes are validated** — Quality gates and approval policy stay active
169
+ 6. **Continuity persists** — Handoffs, pending work, and learnings stay local across sessions
155
170
 
156
171
  ## First Run Experience
157
172
 
@@ -161,15 +176,14 @@ $ archon
161
176
  ArchonDev - AI-Powered Development Governance
162
177
  ────────────────────────────────────────────────
163
178
 
164
- Logged in as: you@example.com
165
- Mode: Free (download-only governance)
179
+ AI mode: Local governance only
166
180
 
167
- FREE mode: no built-in AI calls.
181
+ No provider keys configured yet.
168
182
  → Run 'archon config ai' to enable BYOK for CLI AI features
169
183
 
170
184
  → What kind of project are you building?
171
185
  [AI asks natural follow-up questions based on your answers]
172
- (Type "upgrade" or "help" anytime)
186
+ (Type "mode" or "help" anytime)
173
187
 
174
188
  ✓ Project initialized!
175
189
  ```
@@ -180,15 +194,16 @@ Type these anytime during interactive prompts:
180
194
 
181
195
  | Command | Description |
182
196
  |---------|-------------|
183
- | `upgrade` | Open tier upgrade menu |
184
- | `status` | Show login and mode info |
197
+ | `config ai` | Open BYOK key setup |
198
+ | `status` | Show local mode and optional auth info |
185
199
  | `keys` | List configured API keys |
186
200
  | `help` | Show available commands |
187
201
  | `quit` | Exit ArchonDev |
188
202
 
189
203
  ## Cloud Execution (Legacy)
190
204
 
191
- Run AI agents in the cloud close your laptop and get a PR when it's done.
205
+ These commands are preserved only for backward compatibility and are hidden from the normal CLI surface.
206
+ They are not part of the current local-first product path.
192
207
 
193
208
  ```bash
194
209
  # 1. Authenticate
@@ -202,7 +217,7 @@ archon github status # Verify connection
202
217
  archon plan "add user settings page"
203
218
  archon execute ATOM-001 --cloud
204
219
 
205
- # 3b. Queue multiple atoms in parallel (Credits tier)
220
+ # 3b. Queue multiple atoms in parallel (legacy command; disabled in free/BYOK mode)
206
221
  archon parallel cloud ATOM-001 ATOM-002
207
222
 
208
223
  # 4. Check progress
@@ -210,7 +225,6 @@ archon cloud status # List all cloud executions
210
225
  archon cloud logs <id> # View execution logs
211
226
  ```
212
227
 
213
- The cloud worker clones your repo, runs the Executor agent, creates a feature branch, and opens a PR. You can close your terminal after queuing.
214
228
  Cloud execution is currently disabled in the free/BYOK model. Use local execution with BYOK keys.
215
229
 
216
230
  ## Working with Existing Projects
@@ -237,7 +251,9 @@ The CLI detects existing projects and suggests this workflow automatically.
237
251
 
238
252
  ## Documentation
239
253
 
240
- - [archondev.io](https://archondev.io) — Main website with animated AI problems story
254
+ - [archondev.io](https://archondev.io) — Main website
255
+ - [archondev.io/geo](https://archondev.io/geo) — Free GEO optimization tools (Claude skill + prompt generator)
256
+ - [archondev.io/color-schemes](https://archondev.io/color-schemes) — Color Scheme Picker (26 curated schemes)
241
257
  - [AI Coding Problems Research](docs/ai-coding-problems-research.md) — Market research on AI coding assistant issues
242
258
 
243
259
  ## Website Deploy (Bunny.net)
@@ -2,7 +2,7 @@ import {
2
2
  login,
3
3
  logout,
4
4
  status
5
- } from "./chunk-6TBYNRNF.js";
5
+ } from "./chunk-57NSGWWD.js";
6
6
  import "./chunk-M4LGRTLC.js";
7
7
  import "./chunk-ONH6Y3CS.js";
8
8
  import "./chunk-GGRW4NTA.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listLocalAtoms
3
- } from "./chunk-OHIN6OHU.js";
3
+ } from "./chunk-7RXZTPXY.js";
4
4
 
5
5
  // src/cli/list.ts
6
6
  import chalk from "chalk";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  listLocalAtoms,
6
6
  loadAtom
7
- } from "./chunk-OHIN6OHU.js";
7
+ } from "./chunk-7RXZTPXY.js";
8
8
  import {
9
9
  SUPABASE_ANON_KEY,
10
10
  SUPABASE_URL
@@ -748,7 +748,7 @@ async function parallelClean() {
748
748
  }
749
749
  function toSchedulableAtom(atom) {
750
750
  return {
751
- id: atom.id,
751
+ id: atom.externalId,
752
752
  title: atom.title,
753
753
  dependencies: atom.plan?.dependencies,
754
754
  filesTouched: atom.plan?.files_to_modify
@@ -809,8 +809,15 @@ async function parallelSchedule(options) {
809
809
  }
810
810
  async function parallelRunWaves(options) {
811
811
  const atoms = await listLocalAtoms();
812
- const readyAtoms = atoms.filter((a) => a.status === "READY");
812
+ const scopeIds = options.onlyAtomIds ? new Set(options.onlyAtomIds) : null;
813
+ const readyAtoms = atoms.filter(
814
+ (a) => a.status === "READY" && (!scopeIds || scopeIds.has(a.externalId))
815
+ );
813
816
  if (readyAtoms.length === 0) {
817
+ if (scopeIds && scopeIds.size > 0) {
818
+ console.log(chalk2.yellow("No READY atoms found in the approved scope."));
819
+ return;
820
+ }
814
821
  console.log(chalk2.yellow("No READY atoms found."));
815
822
  return;
816
823
  }
@@ -875,7 +882,8 @@ async function parallelRunWaves(options) {
875
882
  }
876
883
  async function executeAtomInWorktree(atomId, worktreePath) {
877
884
  return new Promise((resolve) => {
878
- const child = spawn("npx", ["archon", "execute", atomId, "--skip-gates"], {
885
+ const cliEntry = process.argv[1] ?? "archon";
886
+ const child = spawn(process.execPath, [cliEntry, "execute", atomId, "--skip-gates"], {
879
887
  cwd: worktreePath,
880
888
  stdio: "pipe"
881
889
  });
@@ -900,6 +908,8 @@ async function executeAtomInWorktree(atomId, worktreePath) {
900
908
  }
901
909
 
902
910
  export {
911
+ buildDependencyGraph,
912
+ scheduleExecution,
903
913
  cloudStatus,
904
914
  cloudCancel,
905
915
  cloudLogs,
@@ -228,22 +228,24 @@ async function logout() {
228
228
  async function status() {
229
229
  const config = await loadConfig();
230
230
  if (!config.accessToken) {
231
- console.log(chalk.yellow("Not logged in"));
232
- console.log(chalk.dim("Run `archon login` to authenticate"));
231
+ console.log(chalk.green("Local-only mode active"));
232
+ console.log(chalk.dim(`AI mode: ${formatTier(config.tier ?? "FREE")}`));
233
+ console.log(chalk.dim("Platform login is optional and only needed for legacy remote features."));
233
234
  return;
234
235
  }
235
236
  if (config.expiresAt) {
236
237
  const expiresAt = new Date(config.expiresAt);
237
238
  if (expiresAt < /* @__PURE__ */ new Date()) {
238
239
  console.log(chalk.yellow("Session expired"));
239
- console.log(chalk.dim("Run `archon login` to re-authenticate"));
240
+ console.log(chalk.dim(`AI mode: ${formatTier(config.tier ?? "FREE")}`));
241
+ console.log(chalk.dim("Re-authenticate only if you need legacy remote features."));
240
242
  return;
241
243
  }
242
244
  }
243
- console.log(chalk.green("\u2713 Authenticated"));
245
+ console.log(chalk.green("\u2713 Optional remote session available"));
244
246
  console.log();
245
247
  console.log(` ${chalk.dim("Email:")} ${config.email}`);
246
- console.log(` ${chalk.dim("Tier:")} ${formatTier(config.tier ?? "FREE")}`);
248
+ console.log(` ${chalk.dim("AI mode:")} ${formatTier(config.tier ?? "FREE")}`);
247
249
  console.log(` ${chalk.dim("User:")} ${config.userId}`);
248
250
  if (config.expiresAt) {
249
251
  const expiresAt = new Date(config.expiresAt);
@@ -254,10 +256,10 @@ async function status() {
254
256
  function formatTier(tier) {
255
257
  switch (tier) {
256
258
  case "BYOK":
257
- return chalk.blue("BYOK (Bring Your Own Key)");
259
+ return chalk.blue("BYOK (your provider keys)");
258
260
  case "FREE":
259
261
  default:
260
- return chalk.gray("FREE (Download-only mode)");
262
+ return chalk.gray("Local governance only");
261
263
  }
262
264
  }
263
265
 
@@ -1,6 +1,7 @@
1
1
  import {
2
+ appendLocalUsageEntry,
2
3
  debugLog
3
- } from "./chunk-R664NEAA.js";
4
+ } from "./chunk-I3BBA7MB.js";
4
5
  import {
5
6
  ArchitectureParser
6
7
  } from "./chunk-5EVHUDQX.js";
@@ -440,9 +441,8 @@ async function plan(description, options) {
440
441
  const conversational = options.conversational === true;
441
442
  const concise = options.conciseOutput === true;
442
443
  try {
443
- if (!await isAuthenticated()) {
444
- console.log(chalk.yellow('Not authenticated. Run "archon login" first.'));
445
- console.log(chalk.dim("For local development, you can continue without authentication."));
444
+ if (!await isAuthenticated() && !concise) {
445
+ console.log(chalk.dim("Running in local mode. Platform login is optional and not required for planning."));
446
446
  }
447
447
  const archPath = join2(process.cwd(), "ARCHITECTURE.md");
448
448
  if (!existsSync2(archPath)) {
@@ -771,6 +771,16 @@ Next steps:`));
771
771
  console.log(chalk.dim(`
772
772
  Token usage: ${planResult.totalUsage.inputTokens} input, ${planResult.totalUsage.outputTokens} output`));
773
773
  }
774
+ await appendLocalUsageEntry({
775
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
776
+ projectPath: process.cwd(),
777
+ model: planner.getBillingModel().model,
778
+ provider: planner.getBillingModel().provider,
779
+ operation: "ADVERSARIAL_PLANNING",
780
+ inputTokens: planResult.totalUsage.inputTokens,
781
+ outputTokens: planResult.totalUsage.outputTokens,
782
+ baseCost: planResult.totalUsage.baseCost
783
+ });
774
784
  if (conversational) {
775
785
  atom.plan = planResult.finalPlan ?? buildConversationalFallbackPlan({
776
786
  description,