Files
deep_research/AGENTS.md
T

4.6 KiB

AGENTS.md — Deep Research Cross-Tool Rules

This file is the shared, cross-tool instruction layer for Codex, OpenCode, Claude Code, Gemini CLI, and Antigravity.

Keep this file short. Do not put Antigravity roles, detailed workflows, or long skill manuals here.

Project

Deep Research produces professional biomedical research reports for R&D, CMC/GMP, management, market, and investment topics.

This repository is not an application codebase. Its code supports the research pipeline: Python runtime, search utilities, evidence schemas, citation checks, and PDF/DOCX rendering.

Instruction Layers

  • Cross-tool baseline: AGENTS.md
  • Gemini / Antigravity override: GEMINI.md
  • Antigravity roles: .agents/agents.md
  • Antigravity strong rules: .agents/rules/
  • Reusable skills: .agents/skills/
  • Antigravity workflows: .agents/workflows/
  • Implementation plan and changelog: PLAN.md

If instructions conflict, use the more specific layer. For Antigravity, GEMINI.md and .agents/rules/ override this file.

Operating Modes

Python-core mode:

  • Use scripts/dr.py, scripts/runtime/**, configs/models.yaml, and .agents/skills.
  • Platform agents should call the Python CLI rather than reimplement worker orchestration.
  • Model routing is resolved by the Python runtime.

Antigravity native mode:

  • Use .agents/agents.md, .agents/rules/, .agents/skills/, and .agents/workflows/.
  • Antigravity uses its own model quota for research execution.
  • Python scripts are auxiliary for scaffolding, local material processing, deterministic checks, citation/report rendering, and status.
  • Do not run Python model-worker commands such as dr.py run, research --execute-packets, or research --assemble-chapters unless the user explicitly approves external API/ZenMux usage.

Core Commands

uv run python scripts/dr.py init "研究主题" --slug <slug> --method <method>
uv run python scripts/dr.py frame <slug>
uv run python scripts/dr.py research <slug> --workers 6 --execute-packets
uv run python scripts/dr.py review <slug>
uv run python scripts/dr.py finalize <slug>
uv run python scripts/deploy_adapters.py antigravity --target /path/to/workspace --dry-run

Research Integrity

  • No fabricated data, URLs, DOIs, clinical results, regulatory status, patents, or market figures.
  • No factual claim without a source ID or a clearly marked "to verify" status.
  • No claim that a search or verification was performed unless there is a real tool receipt or search log.
  • Search snippets, AI summaries, and model memory are discovery leads, not final evidence.
  • Every major conclusion needs at least two independent Tier 1-2 sources. If not available, downgrade and mark uncertainty.
  • Counter-evidence is mandatory. Do not collect only supporting evidence.
  • Wikipedia is allowed for orientation only and must not support final conclusions.
  • Use Chinese for formal report writing. English may remain in search keywords, titles, DOI/URL, original excerpts, and raw notes.

Method Selection

Do not default to McKinsey/MECE for every topic.

Choose the research method and tools based on the user's scenario. Use .agents/skills/method-selection/SKILL.md for Antigravity native work and configs/research_methods.yaml for Python-core mode.

Source Quality

Detailed scoring belongs in .agents/skills/source-quality/SKILL.md.

Baseline tiers:

  • Tier 1: original academic papers, systematic reviews where appropriate, regulator documents, clinical trial registries, patents, company filings.
  • Tier 2: authoritative consulting/industry reports, industry associations, reputable professional media and databases.
  • Tier 3: preprints, conference abstracts, brokerage research, company white papers. Use with caution.
  • Tier 4: general web pages, ordinary news, Wikipedia. Discovery only.

Safety

  • Keep API keys only in secrets.env; never hardcode or commit secrets.
  • Do not read or expose secrets unless the user explicitly asks.
  • Do not overwrite user settings or existing workspace rule/skill/workflow files unless the user asks for --force.
  • Do not run destructive git commands such as git reset --hard, git clean, or broad file deletion without explicit approval.
  • Do not write outside the current workspace unless the user explicitly approves.

Change Management

  • Treat AGENTS.md, GEMINI.md, .agents/**, and PLAN.md as production configuration.
  • Keep root rules short. Move roles to .agents/agents.md, constraints to .agents/rules, capabilities to .agents/skills, and phase sequencing to .agents/workflows.
  • When changing runtime rules or adapter behavior, update PLAN.md changelog.