From f0348451af573d9e6d5860b5dd868216495d7308 Mon Sep 17 00:00:00 2001 From: jilinchen Date: Tue, 30 Dec 2025 10:52:35 +0800 Subject: [PATCH] feat: add items_per_agent execution config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add items_per_agent field to control items per agent - Confirm via AskUserQuestion in /research phase - Deep research reads from outline config directly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- README.md | 1 + skills/research/SKILL.md | 1 + skills/research/deep/SKILL.md | 7 ++++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 371edfb..f5e49a0 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ items: source: "source info" execution: batch_size: 5 # parallel agents (default: 5) + items_per_agent: 1 # items per agent (default: 1) output_dir: "./results" # output directory (default: ./results) ``` diff --git a/skills/research/SKILL.md b/skills/research/SKILL.md index 7fcac11..4fb7d88 100644 --- a/skills/research/SKILL.md +++ b/skills/research/SKILL.md @@ -29,6 +29,7 @@ description: 对目标话题进行初步调研,生成调研outline。用于学 - items: 调研对象列表 - execution: - batch_size: 并行agent数量(默认5) + - items_per_agent: 每个agent调研项目数(默认1,需AskUserQuestion确认) - output_dir: 结果输出目录(默认./results) **fields.yaml**(字段定义): diff --git a/skills/research/deep/SKILL.md b/skills/research/deep/SKILL.md index fe2d019..9c14382 100644 --- a/skills/research/deep/SKILL.md +++ b/skills/research/deep/SKILL.md @@ -11,15 +11,16 @@ allowed-tools: Bash, Read, Write, Glob, WebSearch, Task ## 执行流程 ### Step 1: 自动定位Outline -在当前工作目录查找 `*/outline.yaml` 文件,读取items列表、execution配置。同时读取同目录下的 `fields.yaml` 获取字段定义。 +在当前工作目录查找 `*/outline.yaml` 文件,读取items列表、execution配置(含items_per_agent)。同时读取同目录下的 `fields.yaml` 获取字段定义。 ### Step 2: 断点续传检查 - 检查output_dir下已完成的JSON文件 - 跳过已完成的items ### Step 3: 分批执行 -- 按batch_size分批(默认5个) -- 每个item启动1个web-search-agent(后台并行,禁用task output) +- 按batch_size分批(默认5个agent并行) +- 每个agent负责items_per_agent个项目 +- 启动web-search-agent(后台并行,禁用task output) - **硬约束**:仅传入item相关信息和输出路径 - **硬约束**:agent必须自行读取 `{topic}/fields.yaml` 获取字段定义 - **硬约束**:禁止在prompt中直接嵌入字段定义