refactor: separate outline.yaml and fields.yaml
- Output to {topic}/ directory structure
- fields.yaml now independent file for field definitions
- outline.yaml contains items + execution config
- Deep research agents read fields.yaml independently (hard constraint)
- Update README with new directory structure
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
906821b296
commit
302f2733d3
@@ -36,14 +36,15 @@ cp -r skills/* ~/.claude/skills/
|
|||||||
```
|
```
|
||||||
- Uses model knowledge + web search
|
- Uses model knowledge + web search
|
||||||
- Asks for existing field definitions
|
- Asks for existing field definitions
|
||||||
- Outputs `{topic}_outline.yaml` in current directory
|
- Creates `{topic}/` directory with separated files
|
||||||
|
|
||||||
### Phase 2: Deep Research
|
### Phase 2: Deep Research
|
||||||
```
|
```
|
||||||
/research/deep
|
/research/deep
|
||||||
```
|
```
|
||||||
- Reads outline automatically from current directory
|
- Reads outline and fields automatically from current directory
|
||||||
- Launches parallel agents (5 per batch)
|
- Launches parallel agents (5 per batch)
|
||||||
|
- Agents read fields.yaml independently (not passed in prompt)
|
||||||
- Outputs structured JSON per item
|
- Outputs structured JSON per item
|
||||||
- Supports resume from checkpoint
|
- Supports resume from checkpoint
|
||||||
|
|
||||||
@@ -55,21 +56,32 @@ cp -r skills/* ~/.claude/skills/
|
|||||||
|
|
||||||
## Output Format
|
## Output Format
|
||||||
|
|
||||||
### Outline (YAML)
|
### Directory Structure
|
||||||
|
```
|
||||||
|
{topic}/
|
||||||
|
├── outline.yaml # items + execution config
|
||||||
|
├── fields.yaml # field definitions
|
||||||
|
└── results/ # deep research outputs
|
||||||
|
```
|
||||||
|
|
||||||
|
### outline.yaml
|
||||||
```yaml
|
```yaml
|
||||||
topic: "your topic"
|
topic: "your topic"
|
||||||
items:
|
items:
|
||||||
- name: "Item1"
|
- name: "Item1"
|
||||||
source: "source info"
|
source: "source info"
|
||||||
fields:
|
|
||||||
basic_info:
|
|
||||||
- name: "field_name"
|
|
||||||
description: "field description"
|
|
||||||
detail_level: "detailed|brief"
|
|
||||||
execution:
|
execution:
|
||||||
batch_size: 5
|
batch_size: 5
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### fields.yaml
|
||||||
|
```yaml
|
||||||
|
basic_info:
|
||||||
|
- name: "field_name"
|
||||||
|
description: "field description"
|
||||||
|
detail_level: "detailed|brief"
|
||||||
|
```
|
||||||
|
|
||||||
### Research Result (JSON)
|
### Research Result (JSON)
|
||||||
Each item outputs a structured JSON file with all defined fields.
|
Each item outputs a structured JSON file with all defined fields.
|
||||||
|
|
||||||
|
|||||||
@@ -16,24 +16,34 @@ description: 对目标话题进行初步调研,生成调研outline。用于学
|
|||||||
- 建议的调研字段框架
|
- 建议的调研字段框架
|
||||||
|
|
||||||
### Step 2: Web Search补充
|
### Step 2: Web Search补充
|
||||||
启动1个web-search-agent(后台),根据topic自行设计搜索策略,补充最新的items和字段建议。
|
启动1个web-search-agent(后台),传入topic和当前日期备注,agent自行设计搜索策略补充最新items和字段建议。等待完成后获取搜集知识。
|
||||||
|
|
||||||
### Step 3: 询问用户已有字段
|
### Step 3: 询问用户已有字段
|
||||||
使用AskUserQuestion询问用户是否有已定义的字段文件,如有则读取并合并。
|
使用AskUserQuestion询问用户是否有已定义的字段文件,如有则读取并合并。
|
||||||
|
|
||||||
### Step 4: 生成Outline
|
### Step 4: 生成Outline(分离文件)
|
||||||
合并所有信息,生成outline文件(YAML格式),包含:
|
合并所有信息,生成两个文件:
|
||||||
|
|
||||||
|
**outline.yaml**(items + 配置):
|
||||||
- topic和基础配置
|
- topic和基础配置
|
||||||
- items列表(调研对象)
|
- items列表(调研对象)
|
||||||
- fields定义(调研字段)
|
|
||||||
- execution配置(批量大小等)
|
- execution配置(批量大小等)
|
||||||
|
|
||||||
|
**fields.yaml**(字段定义):
|
||||||
|
- 字段分类和定义
|
||||||
|
- 每个字段的name、description、detail_level
|
||||||
|
|
||||||
### Step 5: 输出并确认
|
### Step 5: 输出并确认
|
||||||
- 保存到当前工作目录: `./{topic_slug}_outline.yaml`
|
- 创建目录: `./{topic_slug}/`
|
||||||
|
- 保存: `outline.yaml` 和 `fields.yaml`
|
||||||
- 展示给用户确认
|
- 展示给用户确认
|
||||||
|
|
||||||
## 输出路径
|
## 输出路径
|
||||||
`{当前工作目录}/{topic_slug}_outline.yaml`
|
```
|
||||||
|
{当前工作目录}/{topic_slug}/
|
||||||
|
├── outline.yaml # items列表 + execution配置
|
||||||
|
└── fields.yaml # 字段定义
|
||||||
|
```
|
||||||
|
|
||||||
## 后续命令
|
## 后续命令
|
||||||
- `/research-add-items` - 补充items
|
- `/research-add-items` - 补充items
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ allowed-tools: Bash, Read, Write, Glob, WebSearch, Task, AskUserQuestion
|
|||||||
|
|
||||||
## 执行流程
|
## 执行流程
|
||||||
|
|
||||||
### Step 1: 自动定位Outline
|
### Step 1: 自动定位Fields文件
|
||||||
在当前工作目录查找 `*_outline.yaml` 文件,自动读取现有fields定义。
|
在当前工作目录查找 `*/fields.yaml` 文件,自动读取现有fields定义。
|
||||||
|
|
||||||
### Step 2: 获取补充来源
|
### Step 2: 获取补充来源
|
||||||
询问用户选择:
|
询问用户选择:
|
||||||
@@ -24,7 +24,7 @@ allowed-tools: Bash, Read, Write, Glob, WebSearch, Task, AskUserQuestion
|
|||||||
- 用户指定字段分类和detail_level
|
- 用户指定字段分类和detail_level
|
||||||
|
|
||||||
### Step 4: 保存更新
|
### Step 4: 保存更新
|
||||||
将确认的字段追加到outline,保存文件。
|
将确认的字段追加到fields.yaml,保存文件。
|
||||||
|
|
||||||
## 输出
|
## 输出
|
||||||
更新后的outline文件(原地修改,需用户确认)
|
更新后的 `{topic}/fields.yaml` 文件(原地修改,需用户确认)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ allowed-tools: Bash, Read, Write, Glob, WebSearch, Task, AskUserQuestion
|
|||||||
## 执行流程
|
## 执行流程
|
||||||
|
|
||||||
### Step 1: 自动定位Outline
|
### Step 1: 自动定位Outline
|
||||||
在当前工作目录查找 `*_outline.yaml` 文件,自动读取。
|
在当前工作目录查找 `*/outline.yaml` 文件,自动读取。
|
||||||
|
|
||||||
### Step 2: 并行获取补充来源
|
### Step 2: 并行获取补充来源
|
||||||
同时进行:
|
同时进行:
|
||||||
@@ -19,10 +19,10 @@ allowed-tools: Bash, Read, Write, Glob, WebSearch, Task, AskUserQuestion
|
|||||||
- **B. 询问是否需要Web Search**:是否启动agent搜索更多items?
|
- **B. 询问是否需要Web Search**:是否启动agent搜索更多items?
|
||||||
|
|
||||||
### Step 3: 合并更新
|
### Step 3: 合并更新
|
||||||
- 将新items追加到outline
|
- 将新items追加到outline.yaml
|
||||||
- 展示给用户确认
|
- 展示给用户确认
|
||||||
- 避免重复
|
- 避免重复
|
||||||
- 保存更新后的outline
|
- 保存更新后的outline
|
||||||
|
|
||||||
## 输出
|
## 输出
|
||||||
更新后的outline文件(原地修改)
|
更新后的 `{topic}/outline.yaml` 文件(原地修改)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ allowed-tools: Bash, Read, Write, Glob, WebSearch, Task
|
|||||||
## 执行流程
|
## 执行流程
|
||||||
|
|
||||||
### Step 1: 自动定位Outline
|
### Step 1: 自动定位Outline
|
||||||
在当前工作目录查找 `*_outline.yaml` 文件,读取items列表、fields定义、execution配置。
|
在当前工作目录查找 `*/outline.yaml` 文件,读取items列表、execution配置。同时读取同目录下的 `fields.yaml` 获取字段定义。
|
||||||
|
|
||||||
### Step 2: 断点续传检查
|
### Step 2: 断点续传检查
|
||||||
- 检查output_dir下已完成的JSON文件
|
- 检查output_dir下已完成的JSON文件
|
||||||
@@ -20,7 +20,9 @@ allowed-tools: Bash, Read, Write, Glob, WebSearch, Task
|
|||||||
### Step 3: 分批执行
|
### Step 3: 分批执行
|
||||||
- 按batch_size分批(默认5个)
|
- 按batch_size分批(默认5个)
|
||||||
- 每个item启动1个web-search-agent(后台并行,禁用task output)
|
- 每个item启动1个web-search-agent(后台并行,禁用task output)
|
||||||
- 每个agent读取outline获取字段定义
|
- **硬约束**:仅传入item相关信息和输出路径
|
||||||
|
- **硬约束**:agent必须自行读取 `{topic}/fields.yaml` 获取字段定义
|
||||||
|
- **硬约束**:禁止在prompt中直接嵌入字段定义
|
||||||
- 输出结构化JSON到output_dir
|
- 输出结构化JSON到output_dir
|
||||||
|
|
||||||
### Step 4: 等待与监控
|
### Step 4: 等待与监控
|
||||||
|
|||||||
Reference in New Issue
Block a user