DoctorWhy: Instructions file for Codex

AGENTS.md

DoctorWhy AGENTS.md is an instructions file for Codex, OpenCode from AIHongDOU/DoctorWhy. It costs 613 tokens per session, scanned A, original, MIT.

Instructions for clarifying vague medical software requests through small, concrete questions before producing a design or code. They cover medical images, tests, monitoring, alerts, and related clinical work.

In plain words
What is it for?
Use them when a developer describes a medical feature imprecisely. They guide the agent through questions about screens, actions, data, exceptions, review, and compliance.
Why use it?
They turn unclear requests into an agreed data flow, interface, and decision process while keeping facts separate from choices. They also set boundaries for unsafe or unapproved clinical use.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/aihongdou/doctorwhy/agents-md.svg)](https://agentmods.dev/instructions/aihongdou/doctorwhy/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/aihongdou/doctorwhy/agents-md"><img src="https://agentmods.dev/badge/instructions/aihongdou/doctorwhy/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 613 This file is loaded in full into every session.
When invoked 613 The same file — it is already loaded in full.
Security scan A 0 findings. 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.1 $0.00613 $0.00613
Opus 5 $0.00307 $0.00307
Sonnet 5 $0.00123 $0.00123
Haiku 4.5 $0.00061 $0.00061

Measured 6d ago against content hash 70d3de009578, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

DoctorWhy 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 6d 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 · 34 lines

What it actually says

DoctorWhy · 医疗需求追问器

开发者说不清医疗需求时,用一问一答逐步问清楚,直到"双方都完全理解"才进入设计,并直接产出可运行代码。

触发

检测到医疗/扫描/影像/检验/病理/ICU/重症/监护/报警类开发需求且需求模糊(含"说不清 / 一瞬间 / 自动识别 / 大概"等)时进入追问;也可手动说"帮我问清楚这个需求"。

核心规则

  1. 小粒度提问:一个问题对应一个具体决策点,禁止"整体方案是什么"这类大问题。
  2. 具体到界面/操作/数据:问"结果显示在左上角窗口还是别处""要弹窗吗",而不是"你希望如何处理结果"。
  3. frontier 批量问:默认每轮问一整片"前置已满足、互不依赖"的决策,用户按编号答;用户要求逐个时退回一次一个。
  4. 医学术语用大白话:不提"标定""坐标转换管线",说"细胞位置怎么换算成真实距离"。
  5. 按优先级推进:先主流程,后边界(异常/失败/改判)。
  6. 拆目标:用户说"20x加模型识别+存坐标+缓存",目标是"选区时一瞬间知道区域构成"。
  7. 收敛就停:能说清数据流/模块/接口就停止追问,进入开发。

状态机 Phase 1-5

对齐(复述确认) → 扫维度(每轮一个 frontier) → 注入规则(必须读取 references/rules-*.md,命中即点破矛盾) → 收敛判定(能说清数据流/模块/接口?) → 输出。

事实与决策分离

能查证的由 agent 自查,不问用户;只有决策才问。自己回答决策 = 越权。

红线(触发即拒绝)

未注册/未验证用于诊断、AI 无复核用于临床、跳过质控发报告 → 拒绝 + 合规替代 + 记自检表。

输出 schema

架构概要(一段话说清,mermaid 可选) + 决策表(决策点|决定|依据) + 待确认(带默认值) + 代码(向交付级靠拢,标注"上线缺口") + 自检表(未打满勾不提交)。

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. 6d ago First seen · 34 lines · 613 tokens per session scan A 70d3de009578

Subscribe to this mod's changes

DoctorWhy AGENTS.md is an instructions file published in the GitHub repository AIHongDOU/DoctorWhy (2 stars, last pushed 19d ago), licensed MIT. It adds 613 tokens to every session, about $0.0031 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.

Related

Other instructions, from other repositories

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,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

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 · 6,785 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 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,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens