ワンクリックで
harness-pipeline
自动串行执行某个功能点下所有 TASK:对每个 TASK 按 implement-task → self-review → fix-check-failures 循环驱动,直至全部完成或人工打断。依赖 spec-harness 的四模式定义。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
自动串行执行某个功能点下所有 TASK:对每个 TASK 按 implement-task → self-review → fix-check-failures 循环驱动,直至全部完成或人工打断。依赖 spec-harness 的四模式定义。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use this skill to create SPEC + SDD documents from a feature prompt, generate TASK + Harness files, and then verify, execute, review, and repair one TASK at a time under .spec/<feature-name>.
Thin Claude adapter for canonical harness-pipeline over a .spec feature.
Thin Claude adapter for spec-harness fix-check-failures on one .spec feature TASK.
Thin Claude adapter for read-only spec-harness self-review on one .spec feature TASK.
Thin Claude adapter for spec-harness implement-task on one .spec feature TASK.
| name | harness-pipeline |
| description | 自动串行执行某个功能点下所有 TASK:对每个 TASK 按 implement-task → self-review → fix-check-failures 循环驱动,直至全部完成或人工打断。依赖 spec-harness 的四模式定义。 |
串行编排器。对 .spec/<feature-name>/ 下已分解好的 TASK 列表,逐个执行:
for each TASK:
loop (max_review_rounds):
implement-task → 实现
self-review → 审查
if verdict == 通过: break
fix-check-failures → 修复
人仅在以下时机介入:
requiresHumanConfirmation 标记时停等确认max_review_rounds 轮审查未通过时硬暂停由调用方在 prompt 中提供:
| 参数 | 必填 | 默认 | 说明 |
|---|---|---|---|
feature_name | ✅ | — | .spec/ 下的功能目录名 |
start_task | — | 第一个未完成的 TASK | 格式 TASK-001,用于续跑 |
max_review_rounds | — | 3 | 单个 TASK 最多修复轮数 |
skip_human_confirm | — | false | 设为 true 则遇见 requiresHumanConfirmation 不停等,直接拒绝该 TASK 并跳过 |
执行前必须满足:
.spec/<feature_name>/ 下已存在 SPEC.md、SDD.md、TASKS.md、task-scope.json、AGENT_RULES.md、acceptance/、prompts/、scripts/scripts/check-task-scope.sh 和 scripts/agent-check.sh 已就绪git status 干净(无与当前功能无关的未提交改动)状态文件:.spec/<feature_name>/pipeline-state.json
{
"schemaVersion": 1,
"feature_name": "...",
"current_task": "TASK-003",
"current_phase": "implement",
"completed_tasks": ["TASK-001", "TASK-002"],
"blocked_tasks": [],
"failed_tasks": [],
"review_round": 2,
"status": "in_progress",
"task_runs": {
"TASK-002": {
"base_sha": "...",
"base_tree": "...",
"head_sha": "...",
"scope_status": "passed",
"checks_status": "passed",
"review_verdict": "通过",
"human_confirmation": {
"confirmed": true,
"confirmed_at": "..."
},
"evidence": ".spec/<feature_name>/reports/TASK-002-evidence.json"
}
}
}
current_task 继续status 只能是 pending、in_progress、blocked、completed 或 completed_with_exceptionscurrent_phase 只能是 pending、implement、review、fix、finalize、completed 或 blockedtask_runs 是每个 TASK 的运行证据索引;task-scope.json.tasks[*].status 不参与运行时完成判定Pipeline 写入普通 completed 前必须通过:
node .agents/skills/harness-pipeline/scripts/validate-pipeline-state.mjs \
--feature-dir .spec/<feature_name>
普通 completed 必须同时满足:
completed_tasks 中;failed_tasks 和 blocked_tasks 为空;task_runs[TASK-ID].evidence;scope_status、checks_status 均为 passed;review_verdict 为 通过;completed_with_exceptions 只允许在存在人工批准例外时使用,且每个例外必须记录 approved_object、approved_by、approved_at 和 reason。存在未批准失败、缺失 evidence、Review 不通过、scope/check 失败或缺失确认时,状态必须保持 blocked 或失败结果,不能写成普通完成。
当 skip_human_confirm=true 且遇到 requiresHumanConfirmation=true 的 TASK 时,该 TASK 必须记录为 skipped/blocked/failed,不得加入 completed_tasks,最终状态不得是普通 completed。
读入以下文件(与 spec-harness implement-task 相同):
.spec/<feature_name>/<feature_name>-SPEC.md.spec/<feature_name>/<feature_name>-SDD.md.spec/<feature_name>/TASKS.md.spec/<feature_name>/AGENT_RULES.md.spec/<feature_name>/task-scope.json从 TASKS.md 提取所有 TASK-ID 列表(按出现顺序)
如果 start_task 指定了值,定位到该 TASK;否则从第一个开始
运行 git status --short,确认无无关改动
如果 pipeline-state.json 已存在,恢复状态并确认续跑
对每个未完成的 TASK(从起始 TASK 到最后一个):
如果 task-scope.json 中该 TASK 的 requiresHumanConfirmation 为 true:
skip_human_confirm 为 true:拒绝执行,将该 TASK 标记为 failed(原因:requiresHumanConfirmation),跳过按照 spec-harness SKILL.md 中 implement-task 模式执行当前 TASK:
.spec/<feature_name>/acceptance/<TASK-ID>.md.spec/<feature_name>/prompts/implement-task.mdtask-scope.json 中该 TASK 的 allowedFilesgit diff --name-onlybash .spec/<feature_name>/scripts/check-task-scope.sh <TASK-ID>bash .spec/<feature_name>/scripts/agent-check.sh.spec/<feature_name>/reports/<TASK-ID>-report.md按照 spec-harness SKILL.md 中 self-review 模式审查当前 TASK:
如果 verdict 为 通过:
completed_tasks,review_round 重置为 0如果 verdict 为 不通过:
review_round += 1review_round > max_review_rounds:硬暂停,将该 TASK 标记为 failed,输出失败报告,停止整个 pipeline按照 spec-harness SKILL.md 中 fix-check-failures 模式修复:
所有 TASK 完成后:
status = completed.spec/<feature_name>/reports/pipeline-summary.mdpackage.json 或 lockfile# Pipeline Summary - <feature_name>
## 执行概况
- 起始 TASK: <TASK-ID>
- 结束 TASK: <TASK-ID>
- 完成: <N> / <M>
- 失败: <列表>
## 各 TASK 结果
| TASK | 状态 | 审查轮数 | 报告 |
|------|------|----------|------|
| TASK-001 | ✅ | 2 | link |
| TASK-002 | ✅ | 1 | link |
| TASK-003 | ❌ | 4 (超限) | link |
## 总修改文件
<git diff --name-only 汇总>
## 待确认项
- 需要人工合并的 TASK(requiresHumanConfirmation=true 已跳过)
- 失败 TASK 根因
- 建议修复方式
harness-pipeline 不重新定义 implement-task / self-review / fix-check-failures 的具体行为,而是直接引用 spec-harness SKILL.md 中各模式的规则和约束。执行每个 TASK 时,应将 spec-harness SKILL.md 加载到上下文中,按该 Skill 的对应模式执行。
用户说「继续 pipeline」「续跑」或检测到 pipeline-state.json 存在时:
pipeline-state.jsoncurrent_task 的当前阶段继续(如果是 review 阶段则从 review 继续)status 为 completed,直接输出汇总报告