Batch Executor
Corpus-scale processing: classify → prioritize → spawn → checkpoint → reconcile.
Unlike task-extractor (for 3-12 inline tasks) or batch-cognition (for idea analysis), this skill EXECUTES at scale with sub-agent parallelism.
When to Use
- - Google Drive folder dump (mixed docs, notes, spreadsheets)
- ChatGPT conversation export (3K+ prompts)
- Apple Notes dump (years of ideas)
- Any input > 20 items or > 10K tokens of raw content
- File-based input (not inline chat messages — use task-extractor for those)
Architecture
CODEBLOCK0
Phase 1: INGEST
Save ALL raw input to systems/batch-executor/corpus/YYYY-MM-DD-SOURCE.md BEFORE any processing.
For file inputs:
- - PDF → extract text via
pdf tool - CSV/JSON → parse, one item per row/object
- Markdown → split on
## headers or --- separators - ChatGPT export → parse
conversations.json, group by chain_id - Google Drive → process each file, flatten into items
Create the manifest:
CODEBLOCK1
Phase 2: CLASSIFY
For each item, assign:
| Type | Description | Action |
|---|
| TASK | Has a clear action verb + deliverable | EXECUTE |
| IDEA |
Speculative, "what if", product concept | SCORE (ICE) |
| REFERENCE | Link, citation, spec, documentation | CATALOG |
| DECISION | "We decided X", "going with Y" | RECORD |
| HALF_THOUGHT | Fragment, incomplete, trails off | COMPLETE then re-classify |
| MODEL_OUTPUT | AI-generated, assistant voice | EXTRACT core idea, discard wrapper |
| DUPLICATE | Same as item #X | MERGE |
| NOISE | Test, filler, meta-commentary | SKIP |
Effort per item:
- - TRIVIAL (< 1 min): file rename, note capture, config change
- QUICK (1-5 min): web search, small edit, API call
- MEDIUM (5-30 min): build a page, write a doc, research topic
- HEAVY (30+ min): full app build, deep research, multi-step workflow
- BLOCKED: needs human input, credentials, or external dependency
Update manifest with Type + Effort columns.
Phase 3: TRIAGE
Score each TASK and IDEA using quick ICE:
- - I (Impact): 1-5 — how much does this move the needle?
- C (Cost): 1-5 — how cheap/fast to do? (inverted: 5 = trivial)
- E (Exploit): 1-5 — how quickly does this produce value?
- Score = I × C × E (max 125)
Sort by score descending. Group by dependency chains.
Create execution plan:
CODEBLOCK2
Phase 4: EXECUTE
Rules:
- 1. Max 3 sub-agents concurrent. Wait for one to complete before spawning another.
- QUICK items: execute inline (no sub-agent overhead for < 5 min tasks).
- MEDIUM/HEAVY items: spawn sub-agent with clear task description + acceptance criteria.
- Each sub-agent gets: the item content, relevant context from other items, and the target artifact path.
- Track in manifest: status → EXECUTING, then ✅ DONE / ❌ FAILED / ⚠️ PARTIAL.
Sub-agent spawn template:
CODEBLOCK3
Checkpoint every 5 completed items:
- - Update manifest
- Report to user: "[X]/[N] done. [Y] in progress. Top findings so far: [...]"
- If user is idle (no response in 30s), continue
- Commit progress to git
Phase 5: RECONCILE
After all waves complete (or all sub-agents return):
- 1. Re-read manifest
- For each ❌ FAILED: log reason, decide retry or escalate
- For each 🔄 sub-agent still running: check status, kill if stale (> 30 min no progress)
- For each ⚠️ PARTIAL: note what's left
- Retry failed items once (different approach if possible)
Phase 6: REPORT
Generate final report at systems/batch-executor/reports/YYYY-MM-DD-SOURCE-report.md:
CODEBLOCK4
Append to systems/batch-cognition/value-stack.md (shared with batch-cognition skill).
Log learnings to .learnings/LEARNINGS.md.
Commands
INLINECODE8 — show manifest progress
pause — stop spawning, let running agents finish
resume — continue from where we left off (re-read manifest)
skip [#] — skip item number
retry [#] — retry failed item
block [#] [reason] — mark as blocked
priority [#] — move item to top of queue
done — trigger report even if items remain
Key Rules
- 1. INGEST FIRST. Raw content hits disk before ANY processing.
- Max 3 concurrent sub-agents. More = chaos, dropped results, context confusion.
- Checkpoint every 5. Git commit progress. User update.
- Never mark ✅ without artifact evidence. File exists, build passes, URL responds.
- NOISE is not failure. Skipping noise is correct behavior. Report it transparently.
- Corpus items cross-reference. Item #14 may be context for item #27. Pass relevant context to sub-agents.
- Resume is first-class. If session dies,
resume re-reads manifest and continues from last checkpoint. - ICE scoring is fast. 30 seconds per item max. Don't overthink triage — execute.
Integration with Other Skills
- - task-extractor: For inline chat messages (3-12 items). Batch-executor is for file/corpus scale (20+).
- batch-cognition: For idea analysis (THINK-heavy). Batch-executor is for execution (PLAY-heavy).
- orchestrator: Batch-executor can be invoked BY the orchestrator when it detects a corpus dump.
- recorder: After batch-executor completes, route to recorder to update STATUS.md.
批量执行器
语料库规模处理:分类 → 优先级排序 → 生成子任务 → 检查点 → 协调。
与任务提取器(用于3-12个内联任务)或批量认知(用于创意分析)不同,此技能通过子智能体并行实现规模化执行。
使用场景
- - Google Drive文件夹转储(混合文档、笔记、电子表格)
- ChatGPT对话导出(3000+提示词)
- Apple Notes转储(多年创意积累)
- 任何超过20个项目或原始内容超过10K词元的输入
- 基于文件的输入(非内联聊天消息——此类情况使用任务提取器)
架构
输入(任意规模)
↓
第一阶段:摄取——将原始数据保存到磁盘,永不丢失
↓
第二阶段:分类——对每个项目分类,评估工作量
↓
第三阶段:优先级排序——按价值评分,按依赖关系分组
↓
第四阶段:执行——生成子智能体(最多3个并发)
↓
第五阶段:协调——验证完成情况,重试失败项
↓
第六阶段:报告——价值堆栈、模式、行动项
第一阶段:摄取
在进行任何处理之前,将所有原始输入保存到 systems/batch-executor/corpus/YYYY-MM-DD-SOURCE.md。
对于文件输入:
- - PDF → 通过 pdf 工具提取文本
- CSV/JSON → 解析,每行/每个对象为一个项目
- Markdown → 按 ## 标题或 --- 分隔符分割
- ChatGPT导出 → 解析 conversations.json,按 chain_id 分组
- Google Drive → 处理每个文件,扁平化为项目
创建清单:
markdown
语料库清单:[来源] [日期]
项目总数:[N]
原始文件:[路径]
状态:已摄取
第二阶段:分类
为每个项目分配:
| 类型 | 描述 | 操作 |
|---|
| 任务 | 有明确的动作动词+可交付成果 | 执行 |
| 创意 |
推测性、如果这样、产品概念 | 评分(ICE) |
| 参考 | 链接、引用、规范、文档 | 编目 |
| 决策 | 我们决定X、采用Y方案 | 记录 |
| 半成品 | 片段、不完整、思路中断 | 补全后重新分类 |
| 模型输出 | AI生成、助手语气 | 提取核心创意,丢弃包装 |
| 重复项 | 与第X项相同 | 合并 |
| 噪音 | 测试、填充、元评论 | 跳过 |
每个项目的工作量:
- - 极简(< 1分钟):文件重命名、笔记记录、配置更改
- 快速(1-5分钟):网络搜索、小编辑、API调用
- 中等(5-30分钟):构建页面、编写文档、研究主题
- 繁重(30+分钟):完整应用构建、深度研究、多步骤工作流
- 受阻:需要人工输入、凭证或外部依赖
使用类型+工作量列更新清单。
第三阶段:优先级排序
使用快速ICE评分对每个任务和创意进行评分:
- - I(影响力):1-5——这能带来多大改变?
- C(成本):1-5——执行起来有多便宜/快速?(反向:5=极简)
- E(收益):1-5——这能多快产生价值?
- 得分 = I × C × E(最高125)
按得分降序排序。按依赖链分组。
创建执行计划:
markdown
执行计划
第一波(并行,无依赖)
- - 第14项(ICE:100)— 繁重 → 子智能体
- 第3项(ICE:80)— 中等 → 子智能体
- 第7项(ICE:75)— 快速 → 内联执行
第二波(依赖第一波)
- - 第9项(依赖第14项)— 中等 → 第14项完成后执行
跳过(噪音/重复项)
受阻(需要人工)
第四阶段:执行
规则:
- 1. 最多3个子智能体并发。 等待一个完成后再生成另一个。
- 快速项目:内联执行(< 5分钟的任务无需子智能体开销)。
- 中等/繁重项目:生成子智能体,附带清晰的任务描述+验收标准。
- 每个子智能体获得:项目内容、来自其他项目的相关上下文、以及目标工件路径。
- 在清单中跟踪:状态 → 执行中,然后 ✅ 完成 / ❌ 失败 / ⚠️ 部分完成。
子智能体生成模板:
任务:[项目摘要]
上下文:[来自此语料库的相关项目]
可交付成果:[预期的具体文件/工件]
验收标准:[如何验证完成]
工作空间:[路径]
每完成5个项目设置检查点:
- - 更新清单
- 向用户报告:已完成[X]/[N]个。[Y]个进行中。目前为止的主要发现:[...]
- 如果用户空闲(30秒内无响应),继续执行
- 将进度提交到git
第五阶段:协调
所有波次完成后(或所有子智能体返回后):
- 1. 重新读取清单
- 对每个 ❌ 失败项:记录原因,决定重试或升级
- 对每个 🔄 仍在运行的子智能体:检查状态,如果停滞(> 30分钟无进展)则终止
- 对每个 ⚠️ 部分完成项:记录剩余工作
- 对失败项重试一次(如可能,采用不同方法)
第六阶段:报告
在 systems/batch-executor/reports/YYYY-MM-DD-SOURCE-report.md 生成最终报告:
markdown
语料库报告:[来源]
处理日期:[日期]
总计:[N]个项目
结果:[完成] ✅ | [失败] ❌ | [部分完成] ⚠️ | [跳过] ⏭️ | [受阻] 🔒
价值堆栈(按影响力排序的顶级项目)
- 1. [项目] — [结果] — [下一步]
- ...
发现的模式
行动项(立即执行)
搁置项(有价值但暂不处理)
受阻项(需要人工)
统计信息
- - 按类型分类:任务 [x]个,创意 [x]个,参考 [x]个,噪音 [x]个
- 按工作量分类:极简 [x]个,快速 [x]个,中等 [x]个,繁重 [x]个
- 生成的子智能体:[x]个
- 总执行时间:[x]分钟
追加到 systems/batch-cognition/value-stack.md(与批量认知技能共享)。
将学习记录记录到 .learnings/LEARNINGS.md。
命令
status — 显示清单进度
pause — 停止生成新任务,让正在运行的智能体完成
resume — 从上次中断处继续(重新读取清单)
skip [#] — 跳过指定项目编号
retry [#] — 重试失败项目
block [#] [原因] — 标记为受阻
priority [#] — 将项目移至队列顶部
done — 即使还有剩余项目也触发报告
关键规则
- 1. 先摄取。 原始内容在任何处理之前先写入磁盘。
- 最多3个并发子智能体。 更多=混乱、结果丢失、上下文混淆。
- 每5个设置检查点。 Git提交进度。更新用户。
- 没有工件证据绝不标记✅。 文件存在、构建通过、URL响应。
- 噪音不是失败。 跳过噪音是正确的行为。透明地报告。
- 语料库项目交叉引用。 第14项可能是第27项的上下文。向子智能体传递相关上下文。
- 恢复是一等公民。 如果会话中断,resume 重新读取清单并从最后一个检查点继续。
- ICE评分要快速。 每个项目最多30秒。不要过度思考优先级排序——执行。
与其他技能的集成
- - 任务提取器:用于内联聊天消息(3-12个项目)。批量执行器用于文件