Agent Harness
One-line summary: First decide "what combination to use", then execute layer by layer.
Core Relationship:
CODEBLOCK0
⚠️ Pre-Execution Check (Must Confirm Each Item)
CODEBLOCK1
Response Format:
[Pre-Execution Check]
Q1: xxx → Conclusion
Q2: xxx → Conclusion
...
Final Decision: Pipeline + WORKFLOWS/{name}
Or: Final Decision: Inversion (standalone mode)
Layer Relationship Diagram
CODEBLOCK3
Analogy
CODEBLOCK4
Execution Flow
Step 1 — Decision (Load 01-DECISION.md)
CODEBLOCK5
Step 2 — Execution Framework (Load 02-PIPELINE.md)
CODEBLOCK6
Step 3 — Specific Content (Load 03-WORKFLOWS/{name}.md)
CODEBLOCK7
Step 4 — Output Template (Load 04-TEMPLATES/{name}.md)
CODEBLOCK8
Step 5 — Quality Check (Load 05-QUALITY.md)
CODEBLOCK9
Quick Reference: Common Combinations
| Task Type | Combination | Description |
|---|
| 📝 Deep Research Report | Pipeline + research | Multi-step research flow |
| 🤖 Multi-Agent Coordination |
Pipeline +
subagent | Decompose+parallel+merge |
| 📦 Long-Task Compression | Pipeline +
context | Context management strategy |
| ⚖️ Competitive Analysis | Pipeline +
analysis | Multi-dimensional comparison |
| ❓ Unclear Requirements |
Inversion (standalone) | Gather requirements first |
Forbidden Behaviors
- - ❌ Skip Steps: Go to Step 3 without completing Step 1
- ❌ Mix Layers: Treat Pipeline and WORKFLOWS as the same thing
- ❌ Missing Template: Output content but format is chaotic
- ❌ Missing Check: End without quality verification
Completion Flag
CODEBLOCK10
File Index
| File | Role | Load Time |
|---|
| INLINECODE0 | Entry + Layer Description | On trigger |
| INLINECODE1 |
Decision Tree | Step 1 |
|
references/02-PIPELINE.md | Execution Framework | Step 2 |
|
references/03-WORKFLOWS/research.md | Research Content | Step 3 |
|
references/03-WORKFLOWS/subagent.md | Coordination Content | Step 3 |
|
references/03-WORKFLOWS/context.md | Compression Content | Step 3 |
|
references/03-WORKFLOWS/analysis.md | Analysis Content | Step 3 |
|
references/04-TEMPLATES/research-report.md | Research Template | Step 4 |
|
references/04-TEMPLATES/analysis-report.md | Analysis Template | Step 4 |
|
references/06-INVERSION.md | Requirements Clarification | When unclear |
|
references/05-QUALITY.md | Quality Check | Pipeline Step 4 |
Last updated: 2026-04-07 by neltharion11 | https://github.com/neltharion11/skill-agent-harness
Agent Harness
一句话总结:先决定“用什么组合”,再逐层执行。
核心关系:
决策树 → 选择“管道 + 哪个工作流”
管道 = 执行框架(通用)
工作流 = 工作内容(具体)
⚠️ 执行前检查(必须逐项确认)
收到任务时,先回答以下问题:
- 1. [ ] 核心任务是什么?(多步骤 / 单步骤)
- [ ] 需求是否明确?(明确 → 下一步 / 不明确 → 加载 06-INVERSION.md)
- [ ] 是否需要多步骤执行?(是 → 管道 + 其他)
- [ ] 具体内容是什么?(对应哪个工作流)
响应格式:
[执行前检查]
问题1:xxx → 结论
问题2:xxx → 结论
...
最终决策:管道 + 工作流/{名称}
或:最终决策:反转(独立模式)
层级关系图
┌─────────────────────────────────────────────────────────────┐
│ 层级执行顺序 │
│ │
│ 步骤1 ──→ 步骤2 ──→ 步骤3 ──→ 步骤4 ──→ 步骤5 │
│ │ │ │ │ │ │
│ ▼ ▼ ▼ ▼ ▼ │
│ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ │
│ │决策 │→│管道 │→│工作流 │→│模板 │→│质量 │ │
│ │01- │ │02- │ │03- │ │04- │ │05- │ │
│ │决策 │ │管道 │ │工作流 │ │模板 │ │质量 │ │
│ └────────┘ └────────┘ └────────┘ └────────┘ └────────┘ │
│ │
│ 决策树决定“用什么组合”, │
│ 管道决定“通用执行流程”, │
│ 工作流决定“具体工作内容” │
└─────────────────────────────────────────────────────────────┘
类比
🍳 烹饪场景:
- - 决策树 = 顾客点单(“今天要辣的”)
- 管道 = 烹饪方法(先热锅,不管做什么)
- 工作流 = 具体菜谱(如何做鱼香肉丝)
- 模板 = 摆盘风格(如何装盘)
💻 软件场景:
- - 决策树 = 任务分类(“这是一个研究任务”)
- 管道 = 执行流程(先分解,不管研究什么)
- 工作流 = 研究方法(四步法)
- 模板 = 报告格式(标题-摘要-正文-结论)
执行流程
步骤1 — 决策(加载 01-DECISION.md)
[步骤1] 读取 references/01-DECISION.md
决定:管道 + 哪个工作流
常见组合:
- - 管道 + 研究 → 研究任务
- 管道 + 子代理 → 协调任务
- 管道 + 上下文 → 压缩任务
- 管道 + 分析 → 分析任务
步骤2 — 执行框架(加载 02-PIPELINE.md)
[步骤2] 读取 references/02-PIPELINE.md
理解:通用四步执行流程
管道步骤:
步骤1:规划
步骤2:执行
步骤3:总结
步骤4:检查
步骤3 — 具体内容(加载 03-WORKFLOWS/{名称}.md)
[步骤3] 读取 references/03-WORKFLOWS/{对应工作流}.md
执行:具体工作内容
研究 = 四步研究(分解→研究→综合→报告)
子代理 = 四步协调(分析→分解→并行→合并)
上下文 = 四步压缩(评估→策略→执行→验证)
分析 = 四步分析(分解→收集→比较→结论)
步骤4 — 输出模板(加载 04-TEMPLATES/{名称}.md)
[步骤4] 读取 references/04-TEMPLATES/{对应模板}.md
生成:结构化最终输出
步骤5 — 质量检查(加载 05-QUALITY.md)
[步骤5] 读取 references/05-QUALITY.md
验证:输出质量符合标准
快速参考:常见组合
| 任务类型 | 组合 | 描述 |
|---|
| 📝 深度研究报告 | 管道 + 研究 | 多步骤研究流程 |
| 🤖 多智能体协调 |
管道 +
子代理 | 分解+并行+合并 |
| 📦 长任务压缩 | 管道 +
上下文 | 上下文管理策略 |
| ⚖️ 竞争分析 | 管道 +
分析 | 多维度比较 |
| ❓ 需求不明确 |
反转(独立) | 先收集需求 |
禁止行为
- - ❌ 跳过步骤:未完成步骤1直接进入步骤3
- ❌ 混淆层级:将管道和工作流视为同一事物
- ❌ 缺少模板:输出内容但格式混乱
- ❌ 缺少检查:未进行质量验证就结束
完成标志
[agent-harness 执行完成]
✓ 步骤1-5已完成
✓ 组合:管道 + 工作流/{名称}
✓ 禁止行为检查:通过
文件索引
| 文件 | 角色 | 加载时机 |
|---|
| SKILL.md | 入口 + 层级描述 | 触发时 |
| references/01-DECISION.md |
决策树 | 步骤1 |
| references/02-PIPELINE.md | 执行框架 | 步骤2 |
| references/03-WORKFLOWS/research.md | 研究内容 | 步骤3 |
| references/03-WORKFLOWS/subagent.md | 协调内容 | 步骤3 |
| references/03-WORKFLOWS/context.md | 压缩内容 | 步骤3 |
| references/03-WORKFLOWS/analysis.md | 分析内容 | 步骤3 |
| references/04-TEMPLATES/research-report.md | 研究模板 | 步骤4 |
| references/04-TEMPLATES/analysis-report.md | 分析模板 | 步骤4 |
| references/06-INVERSION.md | 需求澄清 | 需求不明确时 |
| references/05-QUALITY.md | 质量检查 | 管道步骤4 |
最后更新:2026-04-07 由 neltharion11 | https://github.com/neltharion11/skill-agent-harness