openducktor
AGENTS.md53 starsChanged 54 days agoApache-2.0View on GitHub
OpenDucktor is a Bun monorepo. It contains an Electron desktop app and a local browser runner for AI planning and build workflows. One host SQLite database stores tasks with workspace-scoped keys. Use Bun and bun run for dependency installation and workspace commands. Use npm only in Trusted Publisher workflows that run npm publish. Do not use Yarn. Read CONTRIBUTING.md for setup and command details. Read docs/architecture-overview.md before you change a cross-package data flow or ownership boundary.
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 35,337 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 repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- pr-spotlightSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
42 rules. About 0 are common, 37 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈37
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Use Bun and bun run for dependency installation and workspace commands.
- Distinctive: line 9
Read CONTRIBUTING.md for setup and command details.
- Distinctive: line 17
Do not add fallback logic, a second probe, or an alternate path that hides a failure.
- Distinctive: line 18
Do not poll or retry data that must come from an existing live event stream or subscription.
- Distinctive: line 22
Keep the main path direct.
- Distinctive: line 23
Add normalization or extra checks only for a known case.
- Distinctive: line 24
Add defensive code only when a clear risk requires it.
- Distinctive: line 25
Before adding complexity for a speculative or very unlikely race condition or security edge case, explain the concrete failure mode, …
- Distinctive: line 30
Do not infer available runtime behavior from memory or an adapter shape.
- Distinctive: line 64
Read docs/architecture-overview.md before you change a cross-package data flow or ownership boundary.
- Distinctive: line 67
Put adapters in infrastructure code.
- Distinctive: line 68
Use an existing contract instead of coupling UI code to infrastructure code.
- Very specific: line 69
When a shared data contract changes, update packages/contracts before its consumers.
- Distinctive: line 73
Read docs/effect.md before you change a host port, service, adapter, lifecycle, or typed error.
- Distinctive: line 76
Keep Promise interop at transport and external package boundaries.
- Very specific: line 78
Keep public Zod schemas in packages/contracts.
- Distinctive: line 82
Read docs/runtime-integration-guide.md before you change a runtime, route, session, history, capability, prompt, approval, or catalog.
- Distinctive: line 84
Keep runtime definitions, routes, and connections separate.
- Distinctive: line 85
Keep live route data out of persisted session records and documents.
- Distinctive: line 87
Do not use the repository default runtime as a fallback for a selected session or build.
- Distinctive: line 91
Read docs/frontend-guidelines.md before you change frontend state, forms, components, or themes.
- Distinctive: line 93
Read docs/tanstack-query-cache-strategy.md before you add or change a frontend read from the host or backend.
- Distinctive: line 95
Use TanStack Query for server-owned reads.
- Distinctive: line 96
Keep transient UI state and live event streams outside TanStack Query.
- Distinctive: line 97
Use existing shadcn components and semantic theme tokens.
- Distinctive: line 102
Treat the SQLite task store as the only source of truth for tasks.
- Very specific: line 105
Read the applicable docs/task-workflow-*.md file before you change a task state or action.
- Distinctive: line 109
Keep host command APIs typed and schema-validated.
- Distinctive: line 111
Keep blocking work off the UI thread.
- Distinctive: line 116
Read docs/external-mcp.md before you change the MCP package, host bridge, workspace scope, or public task tools.
- Distinctive: line 118
Read docs/agent-orchestrator-module-map.md before you change Agent Studio orchestration.
- Very specific: line 120
Keep ODT_TOOL_SCHEMAS and the role tool lists of the built-in workflow consistent.
- Distinctive: line 121
Update every affected layer in the same change when a shared workflow tool or role policy changes.
- Distinctive: line 125
Read docs/testing.md before you change behavior or tests.
- Distinctive: line 129
Write project prose in ASD-STE100 Simplified Technical English.
- Distinctive: line 130
Keep exact code, command, path, schema, and API terms unchanged.
- Distinctive: line 131
Use sentence case, active voice, one idea per sentence, and one physical line per Markdown paragraph or list item.
- Distinctive: line 132
Remove sales language, filler, stock AI phrases, vague claims, decorative bold text, emojis, and em dashes.
- Distinctive: line 133
Keep one source for each rule and link to branch-specific details.
- Distinctive: line 137
When preparing a PR that needs a visual explanation, follow pr-spotlight for scene authoring and media delivery.
- Distinctive: line 139
Run every full repository check before you complete any change:
- Distinctive: line 149
Use a Conventional Commit.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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.md
Project
OpenDucktor is a Bun monorepo. It contains an Electron desktop app and a local browser runner for AI planning and build workflows. One host SQLite database stores tasks with workspace-scoped keys.
Use Bun and bun run for dependency installation and workspace commands. Use npm only in Trusted Publisher workflows that run npm publish. Do not use Yarn.
Read CONTRIBUTING.md for setup and command details.
Hard rules
Expose failures
- Fix failures in the source layer.
- Return or propagate an error that tells the user what to do.
- Do not add fallback logic, a second probe, or an alternate path that hides a failure.
- Do not poll or retry data that must come from an existing live event stream or subscription.
Keep code simple
- Keep the main path direct.
- Add normalization or extra checks only for a known case.
- Add defensive code only when a clear risk requires it.
- Before adding complexity for a speculative or very unlikely race condition or security edge case, explain the concrete failure mode, likelihood, and complexity cost to the user. Get their approval before proceeding. Do not expand scope for theoretical robustness without that approval.
Verify runtime behavior
- Inspect runtime source or an official contract before you change an adapter that depends on external runtime behavior.
- Do not infer available runtime behavior from memory or an adapter shape.
Protect durable data
- Get human approval before you add a new kind of persisted data or change a storage schema, migration file, record shape, storage location, or storage format.
- Apply this rule to all durable storage, including databases, settings, files, and browser storage.
Monorepo map
| Path | Owns |
apps/electron | Desktop shell, its host channel listener, preload, shell IPC, and packaging |
apps/marketing-website | Public Astro website |
apps/docs-website | Public user documentation, built with Next.js and Fumadocs as a static export |
apps/mobile | Expo iOS and Android client of a remote host. Read its README before you change it |
packages/frontend | Shared React UI |
packages/frontend-core | Client connections, caches, session projection, recovery, and drafts |
packages/theme | Desktop theme tokens that the app and the product scenes share, and the page colors of the websites |
packages/product-scenes | Animated product scenes of the website and the app tour. Read its conventions before you change it |
packages/contracts | Public Zod schemas and data contracts |
packages/core | Agent ports, ODT tool name helpers, and shared services |
packages/workflows | Pure workflow evaluation, built-in rules, role policy, prompts, and presentation metadata |
packages/host | Effect use cases, task mutations, runtime drivers, and platform adapters |
packages/process-native | Rust Node-API module that reads live processes and their TCP listeners and stops one process. Read the Processes guide before you change it |
packages/runtime-orchestration | Shared runtime lifecycle, registry, and admission rules |
packages/adapters-opencode-sdk | OpenCode V2 protocol adapter |
packages/adapters-codex-app-server | Codex app-server protocol adapter |
packages/host-client | Typed host client and remote protocol client |
packages/remote-host | Remote access and shared HTTP, SSE, and WebSocket transport |
packages/openducktor-web | Browser runner, CLI, and web shell |
packages/openducktor-mcp | MCP server for odt_* workflow tools |
Architecture
Read docs/architecture-overview.md before you change a cross-package data flow or ownership boundary.
- Define ports in core or domain code.
- Put adapters in infrastructure code.
- Use an existing contract instead of coupling UI code to infrastructure code.
- When a shared data contract changes, update
packages/contractsbefore its consumers.
Effect
Read docs/effect.md before you change a host port, service, adapter, lifecycle, or typed error.
- Return
Effect.Effect<Success, Failure, Requirements>from host ports and services that perform I/O or can fail. - Keep Promise interop at transport and external package boundaries.
- Model expected failures as typed errors in the Effect error channel.
- Keep public Zod schemas in
packages/contracts.
Runtimes
Read docs/runtime-integration-guide.md before you change a runtime, route, session, history, capability, prompt, approval, or catalog.
- Keep runtime definitions, routes, and connections separate.
- Keep live route data out of persisted session records and documents.
- Resolve the route for the selected session or build at the adapter call boundary.
- Do not use the repository default runtime as a fallback for a selected session or build.
Frontend
Read docs/frontend-guidelines.md before you change frontend state, forms, components, or themes.
Read docs/tanstack-query-cache-strategy.md before you add or change a frontend read from the host or backend.
- Use TanStack Query for server-owned reads.
- Keep transient UI state and live event streams outside TanStack Query.
- Use existing shadcn components and semantic theme tokens.
- Make each UI change work in light and dark themes.
Task data and workflow
- Treat the SQLite task store as the only source of truth for tasks.
- Store only durable task and workflow state in task records.
- Rebuild live state from the runtime, event stream, or runtime history.
- Read the applicable
docs/task-workflow-*.mdfile before you change a task state or action.
Host
- Keep host command APIs typed and schema-validated.
- Return actionable typed errors for expected host failures.
- Keep blocking work off the UI thread.
- Reuse known repository readiness. Do not repeat costly repository setup.
MCP and Agent Studio
Read docs/external-mcp.md before you change the MCP package, host bridge, workspace scope, or public task tools.
Read docs/agent-orchestrator-module-map.md before you change Agent Studio orchestration.
- Keep
ODT_TOOL_SCHEMASand the role tool lists of the built-in workflow consistent. - Update every affected layer in the same change when a shared workflow tool or role policy changes.
Tests
Read docs/testing.md before you change behavior or tests.
Documentation
- Write project prose in ASD-STE100 Simplified Technical English.
- Keep exact code, command, path, schema, and API terms unchanged.
- Use sentence case, active voice, one idea per sentence, and one physical line per Markdown paragraph or list item.
- Remove sales language, filler, stock AI phrases, vague claims, decorative bold text, emojis, and em dashes.
- Keep one source for each rule and link to branch-specific details.
Finish
When preparing a PR that needs a visual explanation, follow pr-spotlight for scene authoring and media delivery.
Run every full repository check before you complete any change:
bun run format:check
bun run lint
bun run typecheck
bun run test
bun run buildUse a Conventional Commit.
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.

