daofy: Instructions file for Codex

AGENTS.md

daofy AGENTS.md is an instructions file for Codex, OpenCode from chinawsb/daofy. It costs 7,682 tokens per session, scanned A, original, MIT.

Project instructions for Daofy, a Python application that runs on Windows and uses pytest for testing. They document its folders, commands, optional tools, and development rules.

In plain words
What is it for?
Use them when changing Daofy, running its test or type-check commands, navigating its source folders, or following its Windows-specific setup requirements.
Why use it?
They give a coding agent the project context it needs to work consistently, including how to install dependencies, run tests, check types, and start the server.

Instructions file for CodexOpenCode

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

This is chinawsb/daofy's own configuration. It tells Codex and OpenCode how to work on daofy 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 daofy configures →

Reuse

Borrowing it

Nothing to install: this file belongs to chinawsb/daofy. 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/chinawsb/daofy/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/chinawsb/daofy

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 daofy AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/chinawsb/daofy/agents-md/github.svg)](https://agentmods.dev/instructions/chinawsb/daofy/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/chinawsb/daofy/agents-md"><img src="https://agentmods.dev/badge/instructions/chinawsb/daofy/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 daofy AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/chinawsb/daofy/agents-md"><img src="https://agentmods.dev/badge/instructions/chinawsb/daofy/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,682 This file is loaded in full into every session.
When invoked 7,682 The same file — it is already loaded in full.
Security scan A 1 finding. 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.07682 $0.07682
Opus 5.5 $0.03073 $0.03073
Sonnet 5.5 $0.01536 $0.01536
Haiku 4.5 $0.00768 $0.00768

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

Security

Grade A, and why

daofy AGENTS.md scanned grade A with 1 finding 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 1mo 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

| 1.1 | 命令/Shell 注入 | `subprocess`/`Popen`/`os.system` 参数拼接用户输入 → 必须用列表参数 `["cmd", arg]`,禁用 `shell=True` 传参 |
AGENTS.md · 449 lines

How it starts

The opening of the file, as written. The whole thing — 449 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md - Agent Coding Guidelines

Daofy — Python 3.10-3.14, Windows, pytest.

Quick Command Reference

Action Command
Install deps pip install -r requirements.txt && pip install -e ".[dev]"
Install file watcher pip install daofy-for-delphi[watcher] (可选,自动增量 KB)
Install embedding pip install daofy-for-delphi[embedding] (可选,语义搜索)
Run all tests pytest (or python tests/run_all_tests.py for basic)
Run one test pytest tests/test_validator.py -v
Lint/type mypy src/
Environment Always set $env:PYTHONIOENCODING='utf-8' on Windows
Run server python src/server.py

Project Structure

src/
├── server.py              # MCP entry point
├── plugins/               # Language plugin system (base, registry, delphi/, lazarus/, core/)
├── tools/                 # MCP tool implementations (delphi_file, code_hosting, delphi_project, delphi_kb, ...)
├── services/              # Business logic
│   ├── compiler_service.py, config_manager.py, process_manager.py, args_generator.py
│   ├── automation_service.py     # Delphi GUI/Console 自动化测试服务
│   ├── copyright_service.py      # 软著文档生成服务
│   ├── delphi_edit_guard.py      # Delphi 文件编辑保护(脏标记检测)
│   ├── experience_service.py     # AI 经验记忆管理服务
│   ├── ocr_service.py            # 图像分析服务
│   ├── rtti_bridge.py            # Delphi RTTI 桥接服务
│   └── knowledge_base/           # KB modules (schema, smart_cache, project, thirdparty, scan, embedding, async_task_manager)
├── models/                # Pydantic/dataclass models
└── utils/                 # Utilities (delphi_env, dproj_parser, lpi_parser, validator, logger, parser)

知识库自动生命周期

项目知识库(.delphi-kb/)有以下自动化机制:

机制 触发时机 说明
启动时自动构建 MCP Server 启动 自动检测 CWD 下的 .dproj,提交后台增量 KB 构建(不阻塞 MCP 就绪)
热切换重建 用户手动 rebuild 构建到临时目录 .delphi-kb-tmp-{ts}/,旧 KB 在构建期间保持可查,构建完成原子 swap
文件变更监听 用户保存 .pas/.dfm/.dproj 等 需要 pip install daofy-for-delphi[watcher],3秒去抖后自动触发增量更新

Read the full file on GitHub · 449 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. 1mo ago Changed · +20 lines · +658 tokens per session 9406b51a56ab
  2. 2mo ago First seen · 429 lines · 7,024 tokens per session scan A 895d3dc322be

Subscribe to this mod's changes

daofy AGENTS.md is an instructions file published in the GitHub repository chinawsb/daofy (108 stars, last pushed 3d ago), licensed MIT. It adds 7,682 tokens to every session, about $0.0307 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

daofy AGENTS.md compared with instructions from other repositories

daofy AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
daofy AGENTS.mdchinawsb/daofyInstructions file1083d agoMITA7,682Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode