daofy AGENTS.md

daofy AGENTS.md is an instructions file for Codex, OpenCode from chinawsb/daofy. It costs 7,024 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

Install

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.

agentmods
npx agentmods add instructions/chinawsb/daofy/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 7,024 This file is loaded in full into every session.
When invoked 7,024 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
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 $0.07024 $0.07024
Opus 5 $0.03512 $0.03512
Sonnet 5 $0.01405 $0.01405
Haiku 4.5 $0.00702 $0.00702

Measured 4d ago against content hash 895d3dc322be, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 · 429 lines

How it starts

The opening of the file, as written. The whole thing — 429 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 · 429 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. 4d 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 (101 stars, last pushed yesterday), licensed MIT. It adds 7,024 tokens to every session, about $0.0351 per session on Opus 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.