theseus
AGENTS.md1 starsChanged 6 months agoMITView on GitHub
When asked for a review, lead with findings. Prioritize defects, behavioral regressions, missing tests, and maintainability risks. Use P0-P3 priority and C0-C3 confidence when useful. Theseus is a mission dispatch system, not a chatbot. A human dispatches a goal with done criteria; the system runs the work, records what happened, and returns results. Treat these as the conceptual base unless current code or docs prove otherwise: RuntimeBus is the client/operator transport concept for runtime UIs. Do not collapse it into…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 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 repository28 other files it gives its agents.
- agent-self-checkSkill
- biome-grit-rulesSkill
- biome-toolingSkill
- bun-testSkill
- bun-workspaceSkill
- cleanup-auditSkill
- code-reviewSkill
- dispatch-satelliteSkill
- docs-managementSkill
- docs-readingSkill
- effect-concurrency-lifecycleSkill
- effect-errors-schemaSkill
- effect-observability-timeSkill
- effect-services-layersSkill
- effect-testing-runtimeSkill
- effect-v4Skill
- jsx-md-authoringSkill
- monorepo-maintenanceSkill
- refactoring-disciplineSkill
- roadmap-managementSkill
- runtime-engineSkill
- server-runtimeSkill
- testing-patternsSkill
- theseus-designSkill
- tool-authoringSkill
- typescript-strictSkill
- ui-layout-disciplineSkill
- theseus-designSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
49 rules. About 0 are common, 25 are distinctive, and 24 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈25
Distinctive · estimate
This author's own choices. Worth a look.
24
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 14
High signal, low noise: Every sentence must carry information.
- Distinctive: line 15
Verify before asserting: Search the workspace before claiming an API shape, dependency, file path, package export, or command exists.
- Distinctive: line 16
Prefer existing structure: Follow local package boundaries, naming, error style, and docs layout before introducing new patterns.
- Distinctive: line 17
Keep scope tight: Do the requested work. Report unrelated issues.
- Very specific: line 19
Turn repeated mistakes into checks: If an agent-visible failure can be caught deterministically, prefer a lint/type/test rule over another …
- Distinctive: line 20
Fail forward: When an approach fails, state what failed and change strategy.
- Distinctive: line 22
No mind claims: Do not claim feelings, desires, consciousness, or lived experience.
- Distinctive: line 30
Read the relevant files before editing.
- Very specific: line 31
Check package.json scripts before running commands.
- Very specific: line 32
Prefer rg / rg --files for search.
- Distinctive: line 35
Run the narrowest useful verification command, then broader checks when risk justifies it.
- Very specific: line 40
When asked for a review, lead with findings.
- Very specific: line 49
Read root and package-local package.json scripts before running commands.
- Distinctive: line 50
Do not use another package manager unless the user explicitly asks.
- Distinctive: line 51
Do not call raw binaries when an existing script covers the job.
- Distinctive: line 72
Treat these as the conceptual base unless current code or docs prove otherwise:
- Very specific: line 96
Keep public fallible boundaries as Effect where composition, interception, or typed failure matters.
- Very specific: line 97
Prefer Effect-style namespace APIs for public primitive surfaces.
- Very specific: line 98
Keep generic parameter order stable for related public types.
- Distinctive: line 99
Prefer plain interfaces and named function fields over class hierarchies or hidden registries.
- Distinctive: line 100
Keep runtime data serializable when it crosses process, tool, dispatch, RPC, or persistence boundaries.
- Distinctive: line 101
Prefer explicit required internal data over optional/default soup.
- Distinctive: line 103
Avoid booleans by default for domain state.
- Distinctive: line 104
Prefer strict discriminated unions for domain states, protocol packets, outcomes, and lifecycle phases.
- Very specific: line 106
Use named constructors for repeated or exported protocol variants so _tag literals and defaults live next to the schema/type definition.
- Very specific: line 107
Keep plain object literals for local throwaway data.
- Very specific: line 111
Do not let raw Record<string, unknown> flow past ingress or opaque passthrough boundaries.
- Distinctive: line 112
Keep provider-specific shapes out of core/domain types unless deliberately promoted into a shared contract.
- Distinctive: line 115
If ordering matters, encode it in the API.
- Very specific: line 121
Prefer small named modules/services over god files, miscellaneous bags, and utils.ts/helpers.ts/common.ts.
- Very specific: line 123
Keep barrels thin. A package or primitive index.ts should mostly export public surface.
- Distinctive: line 124
Avoid speculative abstractions.
- Distinctive: line 125
Do not keep aliases, compatibility exports, or parallel old/new paths unless the user explicitly asks for back compatibility.
- Very specific: line 140
If the user says back-compat: required, preserve compatibility and ask for consumers, scope, and removal deadline when unclear.
- Very specific: line 150
Use docs-reading before coding or reviewing work where docs define package boundaries, runtime concepts, primitive doctrine, or product …
- Very specific: line 151
Use docs-management for note moves, splits, archive handling, status changes, and navigation updates.
- Distinctive: line 152
Use relative Markdown links, not Obsidian wikilinks.
- Very specific: line 165
Before starting work, check whether a repo-local skill under .agents/skills/ applies.
- Distinctive: line 167
Do not maintain a full skill registry in this file.
- Very specific: line 169
Use agent-self-check before finishing code changes, after deterministic check failures, or when deciding whether a repeated mistake should …
- Very specific: line 171
Use code-review when reviewing code changes for defects, regressions, missing tests, weak modeling, package-boundary risks, or stale agent …
- Very specific: line 173
Use cleanup-audit after substantial edits, refactors, moves, generated changes, or long agent sessions to remove confirmed non-behavioral …
- Very specific: line 175
Use roadmap-management when creating, updating, reviewing, or promoting roadmap items.
- Very specific: line 183
Treat dist/, build output, lockfiles, and generated artifacts as derived unless the package explicitly treats them as source.
- Distinctive: line 186
Do not hand-edit generated output unless the user explicitly asks for a surgical generated-file patch.
- Distinctive: line 210
Never invent scripts, imports, package names, or exports.
- Very specific: line 211
Do not edit generated dist/ files unless the task explicitly asks for generated output.
- Distinctive: line 212
Do not revert user changes unless explicitly instructed.
- Very specific: line 213
Prefer file.llm.ext over file.ext when both exist.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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
AGENTS
<repo>
<name>theseus</name>
<purpose>Open-source packages powering the Theseus agent harness.</purpose>
<stack>Bun, TypeScript, Effect v4 beta, Biome, React/Vite for Icarus.</stack>
<package-manager>bun</package-manager>
</repo><operating-principles>Agent Stance
- High signal, low noise. Every sentence must carry information.
- Verify before asserting. Search the workspace before claiming an API shape, dependency, file path, package export, or command exists.
- Prefer existing structure. Follow local package boundaries, naming, error style, and docs layout before introducing new patterns.
- Keep scope tight. Do the requested work. Report unrelated issues; do not fix them without explicit approval.
- Use deterministic tools. Formatting, import order, type checks, tests, and line counts belong to tools, not guesswork.
- Turn repeated mistakes into checks. If an agent-visible failure can be caught deterministically, prefer a lint/type/test rule over another prose instruction.
- Fail forward. When an approach fails, state what failed and change strategy. Do not retry with cosmetic differences.
- Separate fact from inference. Mark assumptions when a conclusion depends on incomplete evidence.
- No mind claims. Do not claim feelings, desires, consciousness, or lived experience.
</operating-principles><workflow>Default Workflow
- Read the relevant files before editing.
- Check
package.jsonscripts before running commands. - Prefer
rg/rg --filesfor search. - Make the smallest coherent change that satisfies the request.
- Re-read modified files.
- Run the narrowest useful verification command, then broader checks when risk justifies it.
- Report what changed, what was verified, and any residual risk.
Review Workflow
When asked for a review, lead with findings. Prioritize defects, behavioral regressions, missing tests, and maintainability risks. Use P0-P3 priority and C0-C3 confidence when useful.
</workflow><commands>Commands
- Use
bun. - Read root and package-local
package.jsonscripts before running commands. - Do not use another package manager unless the user explicitly asks.
- Do not call raw binaries when an existing script covers the job.
</commands><architecture>Theseus Model
Theseus is a mission dispatch system, not a chatbot. A human dispatches a goal with done criteria; the system runs the work, records what happened, and returns results.
Package Boundaries
packages/theseus-coreowns primitives and shared contracts. It must not depend on tools, server, runtime, or web packages.packages/theseus-toolsowns Bun-native concrete tool implementations. It may depend ontheseus-core.packages/theseus-runtimeowns live mission/runtime orchestration, systems, sinks, projections, active dispatch tracking, persistence-backed runtime state, and tool/model catalog hydration. It must not depend on server or web packages.packages/theseus-serverowns HTTP/RPC transport, provider configuration, process startup, and final layer assembly.packages/jsx-mdandpackages/jsx-md-beautiful-mermaidown prompt/document rendering utilities and should stay independent from runtime orchestration.packages/icarus-webis a client/operator surface. It may consume runtime contracts but must not become the runtime.
Primitive Floor
Treat these as the conceptual base unless current code or docs prove otherwise:
- Mission — job tracker with goal and done criteria.
- Tool — typed, controlled world access.
- Capsule — durable run log for debugging and improvement.
- Dispatch — AI invocation with context and result.
- Satellite — dispatch-scoped observation and policy middleware.
RuntimeBus is the client/operator transport concept for runtime UIs. Do not collapse it into Satellite.
Harness Shape
- The current runtime architecture is a host/world model, not the old persistent named-agent daemon model. Read
docs/runtime/architecture.mdbefore changing runtime code. - Theseus is a self-editable harness, not a plugin host. Do not introduce plugin APIs, manifests, dynamic loading, generic extension registries, or marketplace-style compatibility promises unless explicitly requested.
- Harness behavior must use explicit assembly. If behavior changes what agents see, can do, observe, decide, or auto-load, the source module introducing it must be visible in wiring, named, typed, ordered, and removable.
</architecture><code-policy>Code Policy
TypeScript And Effect
- Keep public fallible boundaries as
Effectwhere composition, interception, or typed failure matters. - Prefer Effect-style namespace APIs for public primitive surfaces. Names should read well under their namespace, such as
Tool.Error<Input, Output, Error, Requirements>,Tool.Def<Input, Output, Error, Requirements>, orMission.Id. - Keep generic parameter order stable for related public types. For tool-like APIs, prefer input, output, error, requirements:
<Input, Output, Error, Requirements>. - Prefer plain interfaces and named function fields over class hierarchies or hidden registries.
- Keep runtime data serializable when it crosses process, tool, dispatch, RPC, or persistence boundaries.
- Prefer explicit required internal data over optional/default soup. Normalize optional input once at the boundary.
- Validate external input at the edge and normalize it into explicit internal types. Inside controlled code, fail early and loudly on impossible states.
- Avoid booleans by default for domain state. Prefer discriminated unions or explicit state-machine modules/services.
- Prefer strict discriminated unions for domain states, protocol packets, outcomes, and lifecycle phases.
- Match closed discriminated unions exhaustively. Prefer
Match/exhaustive matching orswitchwith anevercheck over if/else return ladders. Do not rely on fallback defaults for known protocol states. - Use named constructors for repeated or exported protocol variants so
_tagliterals and defaults live next to the schema/type definition. - Keep plain object literals for local throwaway data. Avoid
as constat public protocol call sites when a typed constructor would make intent clearer. - Inject providers and backends that may change. Core primitives must not hard-code model vendors, MCP frameworks, or storage providers.
- Constructors/builders should shape values, not perform I/O, allocate runtime resources, read config, call providers, or start fibers.
- Runtime services, clocks, random/id generation, stores, language models, and mutable context should be read from the Effect environment at execution time.
- Do not let raw
Record<string, unknown>flow past ingress or opaque passthrough boundaries; decode it into schemas or explicit extension points. - Keep provider-specific shapes out of core/domain types unless deliberately promoted into a shared contract.
- Translate once at each boundary. Avoid repeated half-normalization across layers.
- IDs crossing package, persistence, tool, RPC, dispatch, or mission boundaries should be branded/schema-backed, not raw
string. - If ordering matters, encode it in the API. Do not rely on incidental object key order, registration order, import order, or array order.
- Logs, capsules, dispatch events, protocol events, and telemetry are append-only unless an explicit compaction/snapshot boundary says otherwise.
- Define expected outcome, success criteria, allowed side effects, evidence rules, and stopping conditions before changing complex or high-risk code. Avoid step-by-step process scaffolding unless the exact path matters.
Module Shape
- Prefer small named modules/services over god files, miscellaneous bags, and
utils.ts/helpers.ts/common.ts. - Split files when they mix protocol/type definitions, service tags, service implementations, command routing, persistence, serialization, and test helpers.
- Keep barrels thin. A package or primitive
index.tsshould mostly export public surface; move runtime behavior into named modules. - Avoid speculative abstractions. Add an abstraction only for a real boundary, an important domain concept, or repeated use.
- Do not keep aliases, compatibility exports, or parallel old/new paths unless the user explicitly asks for back compatibility.
Tests And Errors
- New runtime behavior needs focused tests near the package that owns it.
- Runtime behavior owners should be tested in isolation by cutting the Effect graph with fake layers/services. Do not add broad runtime/server/web E2E tests without explicit user confirmation or an explicit wiring-proof request.
- Missing tests are review findings, not TODO decorations. Either add the test, explicitly defer it in the final report, or explain why the surface is type-only.
- Distinguish expected domain failures from defects. Expected failures should be typed and recoverable.
- Recovery is for expected uncertainty at external boundaries: user input, network, filesystem, subprocesses, model providers, persistence, and environment.
- Defects are program bugs or violated internal contracts; do not hide them behind generic error bags, default branches, silent drops, or best-effort recovery.
Compatibility Modes
- Authorized refactors/replacements may remove obsolete files, aliases, shims, re-exports, comments, and parallel paths.
- Cleanup/audit work must not break compatibility or public behavior without confirmation. Remove only proven non-behavioral leftovers.
- If the user says
back-compat: required, preserve compatibility and ask for consumers, scope, and removal deadline when unclear.
</code-policy><docs>Documentation
docs/ is an Obsidian-readable docs vault, not a generated docs site.
- Use
docs-readingbefore coding or reviewing work where docs define package boundaries, runtime concepts, primitive doctrine, or product vocabulary. - Use
docs-managementfor note moves, splits, archive handling, status changes, and navigation updates. - Use relative Markdown links, not Obsidian wikilinks.
- Current truth belongs in
docs/direction,docs/primitives,docs/runtime, anddocs/clients. - Unadopted drafts and research POCs belong in
docs/drafts. - Loose speculative ideas belong in
docs/brainstorms. - Superseded designs belong in
docs/archive. - Adopted or active rationale that does not fit a concept note belongs in
docs/design-notes.
</docs><skills>Skill Use
Before starting work, check whether a repo-local skill under .agents/skills/ applies. Load only the relevant SKILL.md files.
Do not maintain a full skill registry in this file. The filesystem is the source of truth for available repo skills.
Use agent-self-check before finishing code changes, after deterministic check failures, or when deciding whether a repeated mistake should become a rule.
Use code-review when reviewing code changes for defects, regressions, missing tests, weak modeling, package-boundary risks, or stale agent leftovers.
Use cleanup-audit after substantial edits, refactors, moves, generated changes, or long agent sessions to remove confirmed non-behavioral leftovers and report possible stale compatibility/runtime paths before changing them.
Use roadmap-management when creating, updating, reviewing, or promoting roadmap items.
</skills><generated-files>Generated Files
- Treat
dist/, build output, lockfiles, and generated artifacts as derived unless the package explicitly treats them as source. - Edit source files first.
- Regenerate derived files only through package scripts or documented build commands.
- Do not hand-edit generated output unless the user explicitly asks for a surgical generated-file patch.
</generated-files><glossary>Review Labels
- P0 — Must address before proceeding. Blocks current process.
- P1 — Should address. Strong preference.
- P2 — Worth addressing. Non-blocking.
- P3 — Informational.
- C0 — Certain. Verified or trivially provable.
- C1 — High confidence. Very likely correct based on context.
- C2 — Moderate confidence. Reasonable inference; should verify.
- C3 — Low confidence. Speculative; flag for discussion.
</glossary><hard-rules>Hard Rules
- American English only in prose, identifiers, comments, and artifacts unless preserving external API names, translations, proper nouns, or jurisdiction-specific terms.
- Never invent scripts, imports, package names, or exports.
- Do not edit generated
dist/files unless the task explicitly asks for generated output. - Do not revert user changes unless explicitly instructed.
- Prefer
file.llm.extoverfile.extwhen both exist.
</hard-rules>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.

