Archon
AGENTS.md24k starsChanged 4 months agoMITView on GitHub
Archon is a self-hostable, governed agentic automation engine. It runs workflows that mix deterministic steps, AI agents, human gates, and audit trails. Coding automation is its most mature surface, but the engine is intended for general business operations too. This file is the canonical project guidance for coding agents. Keep it short, durable, and about judgment. Put changing product direction in .archon/direction.md, workflow-language design in .archon/workflow-language-constitution.md, aspirational engineering craft and review values in .archon/engineering.md, user documentation in the docs site,…
- Reads credentials
- Deletes or force-pushes
Trending
More talk lately.about the whole repository
Who's talking about coleam00/Archon
- @michabbb.bsky.social“runs backend in Docker + frontend locally with hot reload; Makefile with make dev, make test, make lint 📜 …”Bluesky · Apr 11, 2026 · 2 likes
- @github-trending-js.bsky.social“🔥 Hot Repo! 🔥 (100+ new stars) 📦 coleam00 / Archon ⭐ 14,146 (+138) 🗒 TypeScript The first open-source …”Bluesky · Apr 10, 2026 · 2 likes
- @pythonhub.dev“Archon Archon is an AI agent that is able to create other AI agents using an advanced agentic coding …”Bluesky · Jun 22, 2025 · 2 likes
- A Hacker News story“Open-source harness builder for AI coding”Hacker News · Aug 12, 2026 · 1 points
- @github-trending-js.bsky.social“📦 coleam00 / Archon ⭐ 22,307 (+38) 🗒 TypeScript The first open-source harness builder for AI coding. Make …”Bluesky · Jun 11, 2026 · 1 likes
The biggest 5 of 68 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 68
Talked about on GitHub, Bluesky, the web and Hacker News (68 times).
On GitHub · 50
- May 21, 2026Teardown Request: [Archon] — NeuZhou/awesome-ai-anatomy1 reaction
- Oct 30, 2026agent-skills.github.coleam00.archon: 0.13.0 → 0.13.2 — sudosubin/agents.nix0 reactions
- Oct 28, 2026agent-skills.github.coleam00.archon: 0.12.1 → 0.13.0 — sudosubin/agents.nix0 reactions
- Oct 18, 2026README: cancel の後の run の状態を Archon に合わせる — raiki61/works-factory0 reactions
- Oct 17, 2026agent-skills.github.coleam00.archon: 0.11.1 → 0.12.1 — sudosubin/agents.nix0 reactions
45 more on GitHub
- Oct 13, 2026docs(docs): Phase 4 workflow schema and proposed ADR 0027 — jroquette/agent-hub0 reactions
- Oct 7, 2026What does an Archon run record: its graph, run log, files and project? — seanrobertwright/claude-mods0 reactions · 2 comments
- Oct 7, 2026What does Archon expose for watching runs and answering approvals? — seanrobertwright/claude-mods0 reactions · 1 comment
- Oct 5, 2026Bun.YAML.parse folds multiline quoted scalars differently for CRLF and LF — oven-sh/bun0 reactions
- Oct 4, 2026ai skills — uinstinct/aiskills0 reactions
- Oct 3, 2026agent-skills.github.coleam00.archon: 0.10.1 → 0.11.1 — sudosubin/agents.nix0 reactions
- Sep 29, 2026Docs: per-task domain and workflow detection — jose-compu/trek0 reactions · 1 comment
- Sep 26, 2026agent-skills.github.coleam00.archon: init at 0.10.1 — sudosubin/agents.nix0 reactions
- Sep 25, 2026Pin and verify the classified Archon contract — ArnaudLafosse92100/ai-software-factory0 reactions
- Sep 24, 2026[draft] Core: refuse unreachable managed-path repoint + clean refused registration (cole #3405/#3442) — kevinle128/Archon0 reactions
- Sep 22, 2026[draft] WE: honor loop config + nested loop_group include boundaries (cole #3406/#3248) — kevinle128/Archon0 reactions
- Sep 22, 2026[draft] WE: unify host execution/resume + one-run resume identity (cole #3347/#3407/#3337) — kevinle128/Archon0 reactions
- Sep 19, 2026Replace the AGENTS object literal with a small provider registry (registerAgent/getAgentAdapter) — tbrandenburg/node-red-agents0 reactions
- Sep 11, 2026[draft] WE: packaged scripts share .shared modules across workflows (cole #3252) — kevinle128/Archon0 reactions
- Sep 7, 2026[draft] Observability: active_nodes + project-scoped workflow status (cole #3116/#3121) — kevinle128/Archon0 reactions
- Sep 7, 2026[draft] CLI/WE: workflow wait + transcript follow + exec_output retention (cole #2923/#3096/#2983) — kevinle128/Archon0 reactions
- Sep 7, 2026[draft] WE: run adoption + ADOPTED_RUN_DIR (cole #2792/#3085) — kevinle128/Archon0 reactions
- Sep 7, 2026[draft] WE: run-owned frozen workflow source (cole #2660) — kevinle128/Archon0 reactions
- Sep 7, 2026[draft] WE: ResolvedWorkflow GraphPlan for exec/dry-run (cole #3081) — kevinle128/Archon0 reactions
- Sep 7, 2026[draft] WE: durable waits + action-required CI/delivery pause (cole #2779/#3115) — kevinle128/Archon0 reactions · 2 comments
- Sep 7, 2026[draft] WE: mount run ARTIFACTS_DIR into container runs (cole #3134) — kevinle128/Archon0 reactions · 2 comments
- Sep 7, 2026[draft] WE: authored outcome axis (persist → surfaces → dry-run) (cole #2652/#3082/#3110) — kevinle128/Archon0 reactions · 2 comments
- Sep 7, 2026[draft] WE: producer-owned result contracts + artifact pointers (cole #3158/#3148/#3143) — kevinle128/Archon0 reactions · 2 comments
- Aug 12, 2026Pin claude-opus-5 to orchestrator chat — Thummpy/archon_core0 reactions
- Jun 9, 2026docs(archon): add Archon service documentation page — coollabsio/coolify-docs0 reactions
- Jun 5, 2026content(tools): add Archon — JSONbored/awesome-claude0 reactions · 3 comments
- Jun 4, 2026[P2] Reject unknown /workflow run flags before -- delimiter — brAperia2025/Archon0 reactions
- Jun 4, 2026[P2] Do not let PRD lease finalization failures mask workflow outcomes — brAperia2025/Archon0 reactions
- Jun 4, 2026[P2] Prevent same-run PRD lease refresh from reviving released leases — brAperia2025/Archon0 reactions
- Jun 4, 2026[P1] Terminalize pre-created background workflow run when PRD lease acquisition fails — brAperia2025/Archon0 reactions
- Jun 4, 2026[P1] Terminalize workflow run when onWorkflowRunCreated startup hook fails — brAperia2025/Archon0 reactions
- Jun 4, 2026[P1] Keep CLI PRD lease acquisition and cleanup in one execution scope — brAperia2025/Archon0 reactions
- Jun 4, 2026[P1] Release PRD execution leases on CLI abandon/reject cancellation paths — brAperia2025/Archon0 reactions
- Jun 4, 2026[P1] Enforce codebase ownership for explicit workflow resume by run ID — brAperia2025/Archon0 reactions
- Jun 4, 2026[P1] Harden workflow API PRD option token validation — brAperia2025/Archon0 reactions
- Jun 3, 2026[Add] Archon (coleam00/Archon) — PyTorchKR/landscape0 reactions
- May 27, 2026这么多高赞的面向 AI coding 的 open sources,到底是谁在用啊?真的有效果吗? — ThaddeusJiang/handmade-DevNote0 reactions
- May 23, 2026feat(archon): master-loop workflow + gotchas registry — Elvis-codeur/agent-workflow0 reactions
- May 8, 2026feat: Digesting RuFlo and Archon — siddsachar/row-bot0 reactions · 2 comments
- May 1, 2026Tribute 2026-05-01: Archon by Cole Medin — Talonsturgill/signalsniper0 reactions
- Apr 14, 2026📱 SNS 콘텐츠 - 2026-04-14 19:16 KST — leaf468/autothreads0 reactions
- Apr 14, 2026🤖 AI 트렌드 리포트 - 2026-04-14 19:16 KST — leaf468/autothreads0 reactions
- Apr 11, 2026Archon ビジュアル解説ページ(docs/archon.html)と index 更新 — 53able/docs-site0 reactions
- Apr 11, 2026Github trending [coleam00/Archon] 专为AI编程设计的开源工作流引擎 — web1992/github-trending0 reactions
- Apr 11, 2026📱 SNS 콘텐츠 - 2026-04-11 18:41 KST — leaf468/autothreads0 reactions
On Bluesky · 11
- Apr 11, 2026runs backend in Docker + frontend locally with hot reload; Makefile with make dev, make test, make lint 📜 Archon Community License (ACL)… — @michabbb.bsky.social2 likes and reposts
- Apr 10, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 coleam00 / Archon ⭐ 14,146 (+138) 🗒 TypeScript The first open-source harness builder for AI coding.… — @github-trending-js.bsky.social2 likes and reposts
- Jun 22, 2025Archon Archon is an AI agent that is able to create other AI agents using an advanced agentic coding workflow and framework knowledge base… — @pythonhub.dev2 likes and reposts
- Jun 11, 2026📦 coleam00 / Archon ⭐ 22,307 (+38) 🗒 TypeScript The first open-source harness builder for AI coding. Make AI coding deterministic and… — @github-trending-js.bsky.social1 likes and repost · 1 reply
- Apr 14, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 coleam00 / Archon ⭐ 17,444 (+679) 🗒 TypeScript The first open-source harness builder for AI coding.… — @github-trending-js.bsky.social1 likes and repost · 1 reply
6 more on Bluesky
- Apr 9, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 coleam00 / Archon ⭐ 14,071 (+138) 🗒 TypeScript The first open-source harness builder for AI coding.… — @github-trending.bsky.social1 likes and repost
- Mar 23, 2026https://github.com/coleam00/Archon — @tom-doerr.bsky.social1 likes and repost
- Aug 16, 2025🚀 Skyrocketing! 🚀 (200+ new stars) 📦 coleam00 / Archon ⭐ 6,025 (+318) 🗒 Python Beta release of Archon OS - the knowledge and task… — @github-trending.bsky.social1 likes and repost
- Jun 13, 2025Meet Archon: the world’s first “Agenteer”—an AI designed to autonomously build, refine & optimize other AI agents. Now at v6 with prebuilt… — @ipolyzos.com1 likes and repost
- Mar 17, 2025github.com/coleam00/Arc... AI Agent Builder Archonは、他のAIエージェントを自律的に構築、改良、最適化するための最初のAIエージェントです。… — @uzulla.bsky.social1 likes and repost
- Apr 13, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 coleam00 / Archon ⭐ 17,393 (+612) 🗒 TypeScript The first open-source harness builder for AI coding.… — @github-trending.bsky.social0 likes and reposts · 1 reply
On the web · 5
- Aug 19, 2026Raghav Agrawal - @impactology — x.com
- May 10, 2026YAML Workflow Engine for Deterministic AI Coding Agents — betterstack.com
- Apr 11, 2026Archon for Beginners: Git Worktrees for Isolation + DAG ... — openclawapi.org
- Apr 11, 2026Archon: The First Open-Source Harness Builder for AI Coding — pyshine.com
- Apr 9, 2026Open Source Harness Builder for AI Coding | Cole Medin ... — linkedin.com
On Hacker News · 2
- Aug 12, 2026Open-source harness builder for AI coding1 point
- Mar 4, 2025Archon – AI Agent Builder1 point
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- archon-cliSkill
- docker-extendSkill
- playwright-cliSkill
- releaseSkill
- rulecheckSkill
- test-releaseSkill
- triageSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
45 rules. About 1 is common, 36 are distinctive, and 8 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈36
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Treat the source, its call sites, and its tests as the current evidence.
- Distinctive: line 10
Read every relevant consumer before changing a producer, contract, path, identifier, schema, or generated artifact.
- Distinctive: line 12
Do not trust a passing test by itself.
- Distinctive: line 14
Do not stop at editing. Finish the requested change and verify the outcome.
- Distinctive: line 15
If the implementation keeps getting more complicated, stop and reconsider the model.
- Distinctive: line 21
Keep the conversation layer platform-agnostic.
- Distinctive: line 22
Keep the core self-hostable.
- Distinctive: line 23
Keep the core small and flexible.
- Distinctive: line 24
Treat bundled workflows as reference implementations, not a frozen compatibility surface.
- Distinctive: line 33
Before adding machinery, look for dead, redundant, or superseded machinery on the same path that can disappear.
- Distinctive: line 36
Prefer explicit control flow and narrow typed interfaces over meta-programming, shared mutable state, or hidden coupling.
- Distinctive: line 37
Keep policy, transport, persistence, and execution concerns separate.
- Distinctive: line 38
Consider a focused rewrite when it produces a smaller, clearer result without widening risk.
- Very specific: line 42
Keep TypeScript strict. Avoid any and broad assertions when a sound type can express the state.
- Distinctive: line 44
Import external SDK types rather than restating them.
- Distinctive: line 45
Use discriminated unions and constructors to make invalid states hard to represent.
- Distinctive: line 46
Keep interfaces narrow. Extend an existing interface only when the new method belongs to the same responsibility.
- Distinctive: line 51
Never silently swallow an error or broaden permissions.
- Common: line 54
Never log credentials, secret values, user-message contents, or unnecessary personal data.
- Distinctive: line 59
Delete stale comments and documentation when behavior changes.
- Distinctive: line 60
Use one precise name for each concept.
- Distinctive: line 61
Avoid hardcoded examples that will become false as files, counts, providers, or routes change.
- Distinctive: line 68
Put determinism after interpretation: give the agent typed tools, then validate resolved identifiers, arguments, permissions, and …
- Distinctive: line 69
If exact syntax is required, expose a structured interface such as a CLI flag, typed tool, button action, or schema.
- Distinctive: line 84
Do not inject every project document into every node.
- Distinctive: line 92
Leave native prompt templates and commands under provider control unless the provider automatically advertises them to the model as a …
- Very specific: line 103
Do not grow when: one operator at a time.
- Distinctive: line 116
Use the type system, schema validation, and package boundaries to enforce architecture before adding prose rules.
- Very specific: line 121
Never rename, retype, or drop a shipped table or column.
- Distinctive: line 122
Keep SQLite and PostgreSQL schemas aligned unless a narrow, documented exception is already enforced.
- Distinctive: line 123
Test upgrades from shipped schema shapes, not only fresh database creation.
- Very specific: line 124
Keep generated or mirrored artifacts synchronized through their owning scripts.
- Very specific: line 133
Run artifacts, logs, and state belong outside the repository under the Archon workspace.
- Distinctive: line 134
When stopping a process, target the recorded PID or exact bound port.
- Distinctive: line 135
Keep commits and pull requests focused.
- Distinctive: line 144
Before launching a run, the input — an issue body, a message, a document, whatever the run reads — must state:
- Distinctive: line 159
Do not launch a run against an input missing any of the six.
- Distinctive: line 164
Add tests for meaningful behavior and failure modes.
- Distinctive: line 165
Prefer deterministic, cheap tests.
- Very specific: line 166
Remove test temp trees with removeTempTree or trackTempRoots from @archon/paths/test-utils.
- Very specific: line 169
Always run lint through bun run lint or bun run lint:fix.
- Distinctive: line 170
Run the narrow checks that prove the changed behavior while iterating.
- Very specific: line 179
Use .github/pull_request_template.md.
- Distinctive: line 182
Keep titles concise and outcome-focused.
- Distinctive: line 186
Do not expand this file with copied reference material.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Working on Archon
Archon is a self-hostable, governed agentic automation engine. It runs workflows that mix deterministic steps, AI agents, human gates, and audit trails. Coding automation is its most mature surface, but the engine is intended for general business operations too.
This file is the canonical project guidance for coding agents. Keep it short, durable, and about judgment. Put changing product direction in .archon/direction.md, workflow-language design in .archon/workflow-language-constitution.md, aspirational engineering craft and review values in .archon/engineering.md, user documentation in the docs site, and machine-checkable rules in code, types, tests, lint, or CI.
Read before changing code
- Treat the source, its call sites, and its tests as the current evidence. The request defines the goal and constraints, but a prompt may describe old code.
- Read every relevant consumer before changing a producer, contract, path, identifier, schema, or generated artifact.
- Reproduce bugs when practical. If reproduction is impossible, establish another concrete causal chain before editing.
- Do not trust a passing test by itself. Check that it exercises the behavior it claims to protect.
- A question is read-only. Explain first; change code only when the user asks for a change.
- Do not stop at editing. Finish the requested change and verify the outcome.
- If the implementation keeps getting more complicated, stop and reconsider the model. Solve the underlying problem.
Product boundaries
- Archon is a governed automation engine, not a replacement for the coding agents it orchestrates.
- One install serves one operator or client. Client isolation belongs at the deployment layer. Multiple users within one install are supported and are not multi-tenancy.
- Keep the conversation layer platform-agnostic. Platform adapters translate transport details; core behavior should not depend on Slack, Telegram, GitHub, Discord, CLI, or Web UI semantics.
- Keep the core self-hostable. Do not make a proprietary hosted service a runtime dependency.
- Keep the core small and flexible. Agentic engineering changes too quickly for one monolith to encode every useful workflow or integration; give users stable seams to assemble and extend the rest.
- Treat bundled workflows as reference implementations, not a frozen compatibility surface.
- A git worktree separates checkouts; it is not an execution or security sandbox.
- Consult
.archon/direction.mdbefore making product-scope or architecture-direction decisions.
Engineering taste
Prefer the smallest truthful system
- Apply KISS and YAGNI. Do not add configuration, interfaces, lifecycle states, compatibility paths, or guards without a current requirement or concrete failure mode.
- Before adding machinery, look for dead, redundant, or superseded machinery on the same path that can disappear.
- Fix drift on the path you touch rather than preserving it for a cleaner diff. Two sites that should agree and do not are a defect, not a diff-size decision.
- Duplicate small local logic when it keeps ownership clear. Extract only after a pattern has repeated and stabilized.
- Prefer explicit control flow and narrow typed interfaces over meta-programming, shared mutable state, or hidden coupling.
- Keep policy, transport, persistence, and execution concerns separate.
- Consider a focused rewrite when it produces a smaller, clearer result without widening risk.
Let types carry invariants
- Keep TypeScript strict. Avoid
anyand broad assertions when a sound type can express the state. - Two declarations that must agree to stay correct, kept in agreement by discipline rather than by a mechanism, are a present defect and not a future risk. Treat a hand-synced pair as a bug the moment it exists, and as a live one once the sides already disagree. Derive from the owner instead: an import, a derived or mapped type, a generated artifact with an owning script, or an enforced conformance test. A "keep in sync" comment is none of those; it records the defect rather than clearing it.
- Import external SDK types rather than restating them. Where a boundary genuinely cannot share one definition, the copy owes a conformance test.
- Use discriminated unions and constructors to make invalid states hard to represent.
- Keep interfaces narrow. Extend an existing interface only when the new method belongs to the same responsibility.
Fail clearly
- Fail early on unsupported, ambiguous, or unsafe states. Silent fallback in an agent runtime can waste money or broaden capabilities.
- Never silently swallow an error or broaden permissions.
- Translate errors at the boundary that can explain them, while preserving the original evidence for logs and diagnostics.
- A fallback must be intentional, safe, documented near the branch, and observable enough to debug.
- Never log credentials, secret values, user-message contents, or unnecessary personal data.
Write for the next maintainer
- Comments should explain a non-obvious invariant, ownership decision, or reason a tempting alternative is wrong. Do not narrate the code.
- Delete stale comments and documentation when behavior changes.
- Use one precise name for each concept. Prefer direct prose, active voice, and concrete mechanisms over slogans or vague summaries.
- Avoid hardcoded examples that will become false as files, counts, providers, or routes change.
Agentic-system boundaries
Natural language is not a wire format
- Let the agent interpret the full natural-language message. Do not reconstruct intent with regexes, keyword lists, exact prose tokens, or hand-written parsers.
- Put determinism after interpretation: give the agent typed tools, then validate resolved identifiers, arguments, permissions, and invariants at the tool boundary.
- If exact syntax is required, expose a structured interface such as a CLI flag, typed tool, button action, or schema.
- In a workflow, prose inside a node is model reasoning. Prose passed between nodes as a token to parse is an invented protocol; use structured output, typed inputs, exit status, or another explicit engine channel.
- Vendor output is prose too. Classifying git, SDK, or vendor error text with a pattern is a last resort, not a carve-out: prefer the structured channel (exit code, typed error class,
--jsonor porcelain output), then agent classification into a typed value, then an honest unclassified failure carrying the original evidence. A match that survives anchors to a machine token embedded in the message (an errno, an error code) and may enrich a report — never gate retry, fallback, or suppression, where a vendor rewording silently changes behavior.
Do not guess lifecycle ownership
- A process must not mark non-terminal work failed, cancelled, or abandoned when it cannot distinguish a live owner from an orphaned process.
- Surface ambiguous ownership and give the operator an explicit action.
- Timers remain appropriate for recoverable operations such as retry backoff, subprocess timeouts, and cleanup of already-terminal data.
- Terminal state transitions and completion signals belong to the engine, not to workflow-specific scripts that reinterpret run state.
Project guidance should be available, not sprayed everywhere
- This
AGENTS.mdis the project-guidance channel for agent nodes. Provider integrations should preserve that contract through the provider's native context mechanism. AGENTS.mdmay point to focused project context such as direction or language-design documents.- Do not inject every project document into every node. A node should receive only the context its responsibility requires.
- The engine and reusable workflow packs must not hardcode a project's context paths.
Preserve provider configuration; scope capabilities
- Provider integrations must preserve the provider's native user and project configuration, including its global and project guidance files. The user's provider configuration owns whether those sources load; Archon must not replace a provider home directory or add a parallel context switch.
- Workflow AI nodes start without ambient skills, plugins, or MCP servers. A node receives only the skills, plugins, and MCP servers it explicitly names. Enforce that boundary without hiding unrelated provider settings.
- Pi extensions are user-owned provider configuration, not Archon-managed plugins. Load them as Pi configures them; any tools or MCP clients an extension exposes are the user's responsibility.
- Leave native prompt templates and commands under provider control unless the provider automatically advertises them to the model as a skill-like capability. In that case they follow the same explicit node-scoping rule as skills and plugins.
- Preserve the selected agent provider's native authentication contract. A Claude Code subscription runs through the Claude Agent SDK; using an Anthropic model through another provider is not Claude Code subscription support. Do not reroute or relabel provider identity to reuse credentials.
- Provider-boundary tests must prove both halves of the contract: native settings and guidance remain visible, while undeclared skills, plugins, and MCP servers remain unavailable and explicitly named capabilities load.
Workflow-language boundary
The governing rule is: YAML coordinates. Code computes. Agents judge. Read .archon/workflow-language-constitution.md before changing the YAML surface.
- YAML should expose only what the engine must see to govern a run: topology, gates, joins, retries, sessions, artifacts, durable waits, and reusable structure.
- Computation belongs inside a
bash:,script:, orprompt:node. Choosing a script instead of a prompt is an ordinary reliability and maintainability decision, not a constitutional rule. - A new YAML field or expression feature must add governance value that existing node bodies and wiring cannot provide.
- Do not grow
when:one operator at a time. Compute a complex decision in a node and gate on structured output. - Composition must preserve a graph the engine can validate and govern. Runtime-created independent work belongs in a child run, not hidden dynamic YAML structure.
- Provider capabilities normally belong in provider config, tiers, or aliases. A new node field must earn genuine per-node variance.
- Implicit behavior must be documented, defeatable where appropriate, visible, and fail-safe.
Architecture and ownership
- Preserve package boundaries. Inspect package manifests and current imports before adding a dependency; do not rely on a copied package inventory.
- Provider SDK dependencies and SDK-specific option translation belong in
@archon/providers. - Workflow execution depends on injected contracts, not on core database or adapter implementations.
- Platform-specific parsing and authorization belong inside the owning adapter. Core receives normalized intent and identity.
- The Web client consumes generated API types through its local API layer; it does not import server or workflow runtime packages.
- Shared schemas are the source of truth for persisted and API shapes. Keep OpenAPI generation and runtime validation on the same schema path.
- Use the type system, schema validation, and package boundaries to enforce architecture before adding prose rules.
Data and compatibility
- Database schema evolution is additive-only. There is no migration ledger or version gate, and older binaries may open the same database.
- Never rename, retype, or drop a shipped table or column. A new
NOT NULLcolumn needs a default that remains valid for older writers. - Keep SQLite and PostgreSQL schemas aligned unless a narrow, documented exception is already enforced.
- Test upgrades from shipped schema shapes, not only fresh database creation.
- Keep generated or mirrored artifacts synchronized through their owning scripts. Find those scripts in
package.jsonand adjacent tests instead of copying a list here. - Persisted identifiers, paths, and wire values are contracts. Trace them through every reader before changing their meaning.
Git and workspace safety
mainis the release branch anddevis the working base. Never commit directly to either for feature work, and never force-pushmainormaster.- Preserve user changes, including untracked files. Do not use
git clean -fd, destructive resets, or broad cleanup commands on user-owned workspaces. - Let git report conflicts and dirty state. Do not hide or automatically resolve a state the operator owns.
- Hard reset is allowed only for an explicit reset mode on an Archon-owned checkout.
- Run artifacts, logs, and state belong outside the repository under the Archon workspace. Do not stage them.
- When stopping a process, target the recorded PID or exact bound port. Never kill by a broad process-name match.
- Keep commits and pull requests focused. Do not mix unrelated cleanup into the requested outcome.
Running Archon workflows
The input is the contract. A run is only as accurate as the brief it starts from, and a workflow cannot recover from a premise that was never stated — it will produce a confident, well-formed answer to the wrong question. Treat writing the input as the work, not the preamble to it.
Before launching a run, the input — an issue body, a message, a document, whatever the run reads — must state:
- the problem to solve;
- why it is worth solving;
- why now;
- the desired outcome;
- the invariants that must hold;
- what acceptance looks like.
Solution steering is optional and belongs last, but omitting it is a decision: the run then chooses its own approach. State a constraint you actually hold — reuse this primitive, no new dependency, migrate rather than rewrite — because an unstated preference cannot be honoured. Naming an implementation before the problem is settled narrows the run to your first guess.
Do not launch a run against an input missing any of the six. Fix the input first, and say what you changed — a thin brief is cheaper to correct before a run than after one.
Tests and validation
- Add tests for meaningful behavior and failure modes. Do not preserve deleted features through regression-test clutter.
- Prefer deterministic, cheap tests. Remove accidental I/O and unnecessary subprocesses before increasing timeouts.
- Remove test temp trees with
removeTempTreeortrackTempRootsfrom@archon/paths/test-utils. - Spawn a subprocess only when the subprocess is the subject under test. To suppress an inherited env key for a Bun child, pass it as
''; deleting it allows.envloading to restore it. - Bun's module mocks pollute the process cache. Use the package test scripts that preserve isolation; do not run
bun testfrom the repository root. - Always run lint through
bun run lintorbun run lint:fix; the wrapper isolates packages to keep typed lint within its memory budget. - Run the narrow checks that prove the changed behavior while iterating.
- Run
bun run validatebefore opening a pull request. It runs every pull-request gate except the ones needing something a contributor may not have — a live PostgreSQL, a Docker daemon, an unshallowed checkout, Node for the docs site, GitHub API quota — becausescripts/validate.tsowns the check list and the workflows call that script rather than restating it. - Those excluded jobs are listed in
CONTRIBUTING.mdwith the command to run each one yourself. Schema changes require the PostgreSQL upgrade check from that list. - For visual or runtime behavior, add direct evidence when static tests cannot prove the outcome.
- Destructive verification, including DDL, migrations, and data writes, runs only against a scratch database you create and drop. A configured live DSN is read-only at most; when only a live resource exists, stop and surface it to the operator.
Pull requests
- Branch from
devand open the pull request back todev. - Use
.github/pull_request_template.md. Keep its required sections, remove instructional comments and irrelevant conditional sections, and describe the problem before the implementation. - Review the complete diff against the actual base branch before opening the pull request.
- Link the source issue with a closing keyword when the work has one.
- Keep titles concise and outcome-focused. Do not add AI attribution to commits or pull requests.
Find current facts
Do not expand this file with copied reference material. Use the owning source:
- Product direction:
.archon/direction.md - Workflow-language design:
.archon/workflow-language-constitution.md - Engineering craft and review values:
.archon/engineering.md - CLI:
packages/docs-web/src/content/docs/reference/cli.mdandarchon --help - Workflow authoring:
packages/docs-web/src/content/docs/guides/authoring-workflows.mdand workflow schemas - Database behavior:
packages/docs-web/src/content/docs/reference/database.md, migrations, and adapter tests - Available commands and generated-file checks: root and package
package.jsonscripts
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

