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.
curl -O https://raw.githubusercontent.com/chinawsb/daofy/main/AGENTS.mdgit clone --depth 1 https://github.com/chinawsb/daofyWrote 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.
[](https://agentmods.dev/instructions/chinawsb/daofy/agents-md)<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.
<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>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.
| Model | Per session | Once 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 |
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` 传参 | 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秒去抖后自动触发增量更新 |
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.
- 1mo ago Changed · +20 lines · +658 tokens per session 9406b51a56ab
- 2mo ago First seen · 429 lines · 7,024 tokens per session scan A 895d3dc322be
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.
daofy AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| daofy AGENTS.mdchinawsb/daofy | Instructions file | 108 | 3d ago | MIT | A | 7,682 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |