AgentDock: Instructions file for Codex

AGENTS.md

AgentDock AGENTS.md is an instructions file for Codex, OpenCode from ACCSCI/AgentDock. It costs 1,485 tokens per session, scanned A, original, MIT.

A project-specific instruction file for AgentDock, an Electron desktop application that manages coding-agent sessions, projects, and related data.

In plain words
What is it for?
Use it when changing AgentDock’s session management, project databases, development setup, worktrees, or test isolation.
Why use it?
It explains the current single-process architecture, SQLite storage, development-instance isolation, and testing rules so contributors do not rely on outdated assumptions.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is ACCSCI/AgentDock's own configuration. It tells Codex and OpenCode how to work on AgentDock itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything AgentDock configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ACCSCI/AgentDock. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ACCSCI/AgentDock/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/ACCSCI/AgentDock

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for AgentDock AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/accsci/agentdock/agents-md/github.svg)](https://agentmods.dev/instructions/accsci/agentdock/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/accsci/agentdock/agents-md"><img src="https://agentmods.dev/badge/instructions/accsci/agentdock/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for AgentDock AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/accsci/agentdock/agents-md"><img src="https://agentmods.dev/badge/instructions/accsci/agentdock/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,485 This file is loaded in full into every session.
When invoked 1,485 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.01485 $0.01485
Opus 5.5 $0.00594 $0.00594
Sonnet 5.5 $0.00297 $0.00297
Haiku 4.5 $0.00148 $0.00148

Measured 2mo ago against content hash 50b7a0fd88c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 2mo ago.

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.

AGENTS.md · 79 lines

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
  • 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 是并行测试的撞车点。

Read the full file on GitHub · 79 lines

Changes

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.

  1. 2mo ago First seen · 79 lines · 1,485 tokens per session scan A 50b7a0fd88c3

Subscribe to this mod's changes

AgentDock AGENTS.md is an instructions file published in the GitHub repository ACCSCI/AgentDock (2 stars, last pushed 3mo ago), licensed MIT. It adds 1,485 tokens to every session, about $0.0059 per session on Opus 5.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.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens