Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/accsci/agentdock/agents-mdgit clone --depth 1 https://github.com/ACCSCI/AgentDockWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01485 | $0.01485 |
| Opus 5 | $0.00743 | $0.00743 |
| Sonnet 5 | $0.00297 | $0.00297 |
| Haiku 4.5 | $0.00148 | $0.00148 |
Grade A, and why
AgentDock AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS
本文件是给所有 contributor(包括 AI agent)阅读的项目级指引。架构、测试、用户测试的当前规则都在这里。
架构现状
单实例架构(0.1.x 当前状态)
- AgentDock 0.1.x 运行在 单个 Electron 进程里,所有 session/port/state 都由这个进程拥有(
SessionManager、PortPool)。没有独立的 daemon 进程——DaemonStatusBar已在 PR #108 中移除,因为单实例下这个栏位只是静态 "Running" 文字,没有信息价值。 - 状态分两份 SQLite 存储:
- 全局项目 DB:dev 模式在
<userDataDir>/global/projects.db,生产在~/.agentdock/projects.db——存已打开的项目(id, name, path, createdAt) - 项目 DB:在
<userDataDir>/data/db.sqlite——存当前激活项目的sessions和todos
- 全局项目 DB:dev 模式在
SessionManager是纯内存的,session 的生命周期状态(creating | active | deleting)和步骤进度持久化到项目 DB 的sessions.status/sessions.steps列,渲染端通过db:projects:list直接读,不需要 SSE/streaming。
Dev 模式 userData 隔离
AGENTDOCK_DEV_INSTANCE=<N>环境变量(由scripts/dev-instance.ts设置)标记 dev 模式。- 设了之后,
projects.db跟随<userData>/global/projects.db,不再用生产路径~/.agentdock/projects.db。这样多个 dev AgentDock 实例可以并行跑而不撞共享 SQLite 文件。 - 不设时行为等同于生产(单实例、单全局
~/.agentdock/projects.db)。 - 默认保持生产行为;dev/测试需要并行时显式设
AGENTDOCK_DEV_INSTANCE=1。 - Worktree 目录(
<project>/.agentdock/worktrees/)是项目级的,不跟随 userData——dev 和生产用的是同一份。 app.requestSingleInstanceLock()以userData为 key,所以 dev 实例只要--user-data-dir不同就能共存;生产单实例不变量保持不变。
测试隔离流水线
测试按"在哪跑"分成三层,不要跨层迁移:
| 层 | 跑在哪 | 跑什么 | 触发方式 |
|---|---|---|---|
| CI | GitHub Actions runner | typecheck + lint + unit + build | push/PR 自动 |
| 本地 dev | 开发者机器 | unit + integration + acceptance + e2e(59 个 spec) | bun run test / bun run test:e2e |
| 用户测试 | 开发者机器 | 探索性 UI 流程测试(见下文) | npx flue run user-agent |
为什么 CI 不跑 e2e
GitHub runner 是共享临时虚拟机,Electron 在上面启动不稳定(字体/端口/显示系统都不可控)。CI 守住"代码能 build + 单测过"这条线就够了。
并行实例隔离规则
每个并行运行的实例(e2e test、user-agent、多 dev 窗口)启动 Electron 时必须带:
--user-data-dir=<独立目录>—— 隔离项目 DB(data/db.sqlite)AGENTDOCK_DEV_INSTANCE=1—— 隔离全局 DB(<userData>/global/projects.db)
这两个 flag 一起用能产生完全自洽的 AgentDock 实例,不与其它实例在 SQLite、端口、session 状态上冲突。
<userData>/global/projects.db 这个路径是 v9/v10 schema 迁移加的——之前共享的 ~/.agentdock/projects.db 是并行测试的撞车点。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 79 lines · 1,485 tokens per session scan A 50b7a0fd88c3
AgentDock AGENTS.md is an instructions file published in the GitHub repository ACCSCI/AgentDock (2 stars, last pushed 1mo ago), licensed MIT. It adds 1,485 tokens to every session, about $0.0074 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
vscode-ext-tmux-worktree AGENTS.md
Instructions for kargnas/vscode-ext-tmux-worktree, covering ai agent guidelines, instruction, tested vs code, 1. codebase understanding and project structure.
braid AGENTS.md
Instructions for openbraid/braid, covering agents.md, what braid is, repository layout, the two modes — read this before touching storage and migration code that looks like a botched rename.
ensemblr AGENTS.md
Instructions for ensemblr-hq/ensemblr, covering agent instructions, project naming, app scaffolding requires current official docs, package manager policy and biome policy.
braid CLAUDE.md
Instructions for openbraid/braid, a project described as: Mission control for your agent swarm — know which agent is working, which is stuck, and which is done. Works with 14 coding agents, runs entirely on your machine.
soloe AGENTS.md
AGENTS.md instructions for mheraskin/soloe, covering repository instructions, commit messages, code discovery, agent skills and issue tracker.
vscode-ext-tmux-worktree CLAUDE.md
Instructions for kargnas/vscode-ext-tmux-worktree, a project described as: Let's work on 5 projects in parallels.