research-deep

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Research Deep - Deep Research

深度研究 - 深度调研

Trigger

触发指令

/research-deep
/research-deep

Workflow

工作流程

Step 1: Auto-locate Outline

步骤1:自动定位大纲

Find
*/outline.yaml
file in current working directory, read items list, execution config (including items_per_agent).
在当前工作目录中查找
*/outline.yaml
文件,读取条目列表和执行配置(包括items_per_agent)。

Step 2: Resume Check

步骤2:续检查

  • Check completed JSON files in output_dir
  • Skip completed items
  • 检查output_dir中的已完成JSON文件
  • 跳过已完成的条目

Step 3: Batch Execution

步骤3:批量执行

  • Batch by batch_size (need user approval before next batch)
  • Each agent handles items_per_agent items
  • Launch web-search-agent (background parallel, disable task output)
Parameter Retrieval:
  • {topic}
    : topic field from outline.yaml
  • {item_name}
    : item's name field
  • {item_related_info}
    : item's complete yaml content (name + category + description etc.)
  • {output_dir}
    : execution.output_dir from outline.yaml (default: ./results)
  • {fields_path}
    : absolute path to {topic}/fields.yaml
  • {output_path}
    : absolute path to {output_dir}/{item_name_slug}.json (slugify item_name: replace spaces with _, remove special chars)
Hard Constraint: The following prompt must be strictly reproduced, only replacing variables in {xxx}, do not modify structure or wording.
Prompt Template:
python
prompt = f"""## Task
Research {item_related_info}, output structured JSON to {output_path}
  • 按batch_size分批执行(下一批次执行前需用户确认)
  • 每个Agent处理items_per_agent个条目
  • 启动web-search-agent(后台并行执行,禁用任务输出)
参数获取:
  • {topic}
    : 来自outline.yaml的topic字段
  • {item_name}
    : 条目的name字段
  • {item_related_info}
    : 条目的完整yaml内容(名称+分类+描述等)
  • {output_dir}
    : 来自outline.yaml的execution.output_dir(默认值:./results)
  • {fields_path}
    : {topic}/fields.yaml的绝对路径
  • {output_path}
    : {output_dir}/{item_name_slug}.json的绝对路径(slugify处理item_name:将空格替换为_,移除特殊字符)
硬性约束: 必须严格复现以下提示词,仅替换{xxx}中的变量,不得修改结构或措辞。
提示词模板:
python
prompt = f"""## Task
Research {item_related_info}, output structured JSON to {output_path}

Field Definitions

Field Definitions

Read {fields_path} to get all field definitions
Read {fields_path} to get all field definitions

Output Requirements

Output Requirements

  1. Output JSON according to fields defined in fields.yaml
  2. Mark uncertain field values with [uncertain]
  3. Add uncertain array at the end of JSON, listing all uncertain field names
  4. All field values must be in English
  1. Output JSON according to fields defined in fields.yaml
  2. Mark uncertain field values with [uncertain]
  3. Add uncertain array at the end of JSON, listing all uncertain field names
  4. All field values must be in English

Output Path

Output Path

{output_path}
{output_path}

Validation

Validation

After completing JSON output, run validation script to ensure complete field coverage: python ~/.codex/skills/research/validate_json.py -f {fields_path} -j {output_path} Task is complete only after validation passes. """

**One-shot Example** (assuming researching GitHub Copilot):
After completing JSON output, run validation script to ensure complete field coverage: python ~/.codex/skills/research/validate_json.py -f {fields_path} -j {output_path} Task is complete only after validation passes. """

**单次示例** (假设研究GitHub Copilot):

Task

Task

Research name: GitHub Copilot category: International Product description: Developed by Microsoft/GitHub, first mainstream AI coding assistant, ~40% market share, output structured JSON to {project_dir}/results/GitHub_Copilot.json
Research name: GitHub Copilot category: International Product description: Developed by Microsoft/GitHub, first mainstream AI coding assistant, ~40% market share, output structured JSON to {project_dir}/results/GitHub_Copilot.json

Field Definitions

Field Definitions

Read {project_dir}/fields.yaml to get all field definitions
Read {project_dir}/fields.yaml to get all field definitions

Output Requirements

Output Requirements

  1. Output JSON according to fields defined in fields.yaml
  2. Mark uncertain field values with [uncertain]
  3. Add uncertain array at the end of JSON, listing all uncertain field names
  4. All field values must be in English
  1. Output JSON according to fields defined in fields.yaml
  2. Mark uncertain field values with [uncertain]
  3. Add uncertain array at the end of JSON, listing all uncertain field names
  4. All field values must be in English

Output Path

Output Path

{project_dir}/results/GitHub_Copilot.json
{project_dir}/results/GitHub_Copilot.json

Validation

Validation

After completing JSON output, run validation script to ensure complete field coverage: python ~/.codex/skills/research/validate_json.py -f {project_dir}/fields.yaml -j {project_dir}/results/GitHub_Copilot.json Task is complete only after validation passes.
undefined
After completing JSON output, run validation script to ensure complete field coverage: python ~/.codex/skills/research/validate_json.py -f {project_dir}/fields.yaml -j {project_dir}/results/GitHub_Copilot.json Task is complete only after validation passes.
undefined

Step 4: Wait and Monitor

步骤4:等待与监控

  • Wait for current batch to complete
  • Launch next batch
  • Display progress
  • 等待当前批次完成
  • 启动下一批次
  • 显示进度

Step 5: Summary Report

步骤5:总结报告

After all complete, output:
  • Completion count
  • Failed/uncertain marked items
  • Output directory
全部完成后,输出:
  • 完成数量
  • 标记为失败/不确定的条目
  • 输出目录

Agent Config

Agent配置

  • Background execution: Yes
  • Task Output: Disabled (agent has explicit output file when complete)
  • Resume support: Yes
  • 后台执行:是
  • 任务输出:禁用(Agent完成后会生成明确的输出文件)
  • 支持续执行:是