← 返回
开发者工具 中文

Macro Pipeline

Create and manage macro-task pipelines (QA, roadmaps, feature rollouts) using PIPELINE.md + HEARTBEAT.md pattern. Use when building multi-step project plans...
创建并管理宏观任务流水线(QA、路线图、功能发布),采用 PIPELINE.md + HEARTBEAT.md 模式,适用于多步骤项目计划。
santacruzg282-cyber
开发者工具 clawhub v3.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 768
下载
💾 19
安装
1
版本
#latest

概述

Macro Pipeline Skill v3

Architecture

Two files, two locations:

FileLocationPurposeMutable?
-----------------------------------
PIPELINE.mdProject repo (~/Documents/proyectos//)State + progress✅ Yes (subagents update directly)
HEARTBEAT.mdAgent workspace (~/.openclaw/workspace-/)Instructions (read-only)❌ No (locked with chflags uchg)

Why PIPELINE in the repo?

  • Subagents work in the repo → can update status without cross-path issues
  • Git-trackable (commits show when steps completed)
  • Eliminates zombie steps from path access failures

Why HEARTBEAT in workspace?

  • Operational instructions for the OpenClaw agent
  • Should not contaminate project code
  • Locked to prevent agents from overwriting their own instructions

PIPELINE.md Format

# PIPELINE — <Project Name>: <Pipeline Title>
# Proyecto: ~/Documents/proyectos/<project>
# Objetivo: <one-line goal>
# Creado: YYYY-MM-DD

## Step 1: <Title> [PENDING]
- engine: claude-code
- description: <what to do>
- files: <key files to touch>
- verify: <command that proves step is done>
- artifacts: <outputs for next steps>

## Step 2: <Title> [PENDING]
- engine: claude-code
- depends_on: [1]
- description: <what to do>
- verify: <verification command>

Status values:

  • [PENDING] — not started
  • [RUNNING YYYY-MM-DDTHH:MM] — in progress (with timestamp)
  • [✅ COMPLETED] — done
  • [FAILED] — failed (include error reason)
  • [BLOCKED] — waiting on human or external dependency

Step fields:

  • engine:claude-code | human | deploy
  • depends_on: — list of step numbers that must be ✅ first
  • parallel: — list of steps that can run simultaneously
  • verify: — shell command to validate completion
  • artifacts: — outputs passed to dependent steps
  • files: — key files modified

HEARTBEAT.md Format

# HEARTBEAT — <Agent Name>

> ⚠️ NUNCA modifiques este archivo (HEARTBEAT.md). Es read-only.

## Pipeline activo: ~/Documents/proyectos/<project>/PIPELINE.md

## Protocolo cada heartbeat:
1. Lee el pipeline activo (ruta absoluta arriba)
2. Si hay step [PENDING] sin dependencias bloqueadas → ejecútalo
3. Marca [RUNNING YYYY-MM-DDTHH:MM] con timestamp actual
4. Ejecuta: sessions_spawn(task=..., thread=true)
5. Un step por heartbeat máximo

## Zombie Detection
Si un step lleva >2h en [RUNNING], resetear a [PENDING] y reportar.

## En sesión activa con usuario
Priorizar responder. HEARTBEAT_OK.

Cron Setup

Always use CLI, never edit openclaw.json:

openclaw cron add --name "<Project> Pipeline" --agent <agent-id> --every 30m --message "Heartbeat: lee HEARTBEAT.md y ejecuta siguiente step"

Stagger schedules to avoid collisions:

  • :00/:30 → Group A
  • :15/:45 → Group B

Subagent Task Template

Include in the task prompt:

Al terminar:
1. Actualiza <absolute-path-to-PIPELINE.md>: cambia Step X de [RUNNING] a [✅ COMPLETED] con output y artifacts
2. Si fallas, marca [FAILED] con el error
3. Notifica a Discord (action=send, channel=discord, target="channel:<id>") con resumen

Multiple Pipelines Per Project

An agent can have multiple pipeline files. HEARTBEAT specifies priority order:

Lee PIPELINE_ACTIVE.md (prioritario). Si todos completados, lee PIPELINE.md como fallback.

Parallel Execution

Steps sin dependencias cruzadas pueden ejecutarse en paralelo:

## Step 1: Task A [PENDING]
- parallel: [2, 3]

## Step 2: Task B [PENDING]
- parallel: [1, 3]

## Step 3: Task C [PENDING]
- parallel: [1, 2]

## Step 4: Task D [PENDING]
- depends_on: [1, 2, 3]

El heartbeat puede lanzar múltiples steps paralelos en un mismo ciclo si no hay dependencias.


Git Tagging

Cada step completado debe crear un commit taggeado:

git add . && git commit -m "pipeline/<project>/step-<N>: <step title>"

Esto da trazabilidad completa del progreso en git log.


Key Rules

  1. PIPELINE.md siempre en el repo — nunca en workspace
  2. HEARTBEAT.md siempre en workspace — nunca en repo
  3. HEARTBEAT es immutable — locked con chflags uchg
  4. Crons vía CLIopenclaw cron add, nunca editar openclaw.json
  5. Un step por heartbeat — evita saturación (salvo paralelos explícitos)
  6. verify: obligatorio — cada step debe tener comando de verificación
  7. Rutas absolutas — siempre usar ~/Documents/proyectos/... en HEARTBEAT
  8. Git tag por step — commit con pipeline//step-: </code></li><li><strong>Parallel explícito</strong> — steps sin dependencias pueden correr en paralelo si tienen <code>parallel:</code></li></ol></div> </div> </div> <div id="tab-versions" class="detail-content"> <div class="detail-section"> <h2>版本历史</h2> <p style="margin-bottom:12px;font-size:14px;color:#94a3b8;">共 1 个版本</p> <ul class="version-list"> <li> <div> <span class="version-tag">v3.0.0</span> <span style="font-size:11px;color:#5b6abf;margin-left:8px;background:#eef0ff;padding:1px 8px;border-radius:10px;">当前</span> </div> <div style="font-size:12px;color:#94a3b8;"> 2026-03-30 08:12 安全 安全 </div> </li> </ul> </div> </div> <div id="tab-security" class="detail-content"> <div class="detail-section"> <h2>安全检测</h2> <div class="sec-grid"> <div class="sec-card"> <h4>腾讯云安全 (Keen)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://tix.qq.com/search/skill?keyword=91abc107528eb0ca3943d0885b3a228a" target="_blank">查看报告</a> </div> <div class="sec-card"> <h4>腾讯云安全 (Sanbu)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://static.cloudsec.tencent.com/html-report-v2/2026/05/25/403539_1b1223061fb82e6ea513715c15083a1c.html?q-sign-algorithm=sha1&q-ak=AKID8JMG1bzBC1dz96qNhssfFftujT1NCoFi&q-sign-time=1781293603%3B1812829603&q-key-time=1781293603%3B1812829603&q-header-list=host&q-url-param-list=&q-signature=73e30b74b0b2fc4f0d82591016965b1ad5f93511" target="_blank">查看报告</a> </div> </div> </div> </div> <!-- Recommended Skills --> <div style="margin-top:24px;"> <h2 style="font-size:18px;font-weight:600;margin-bottom:16px;">🔗 相关推荐</h2> <div class="rec-grid"> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">developer-tools</span> <h3><a href="/s/codeconductor">CodeConductor.ai</a></h3> <div class="rec-owner">larsonreever</div> <div class="rec-desc">AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 68</span> <span style="color:#5b6abf;">📥 180,176</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">developer-tools</span> <h3><a href="/s/agent-browser-clawdbot">Agent Browser</a></h3> <div class="rec-owner">matrixy</div> <div class="rec-desc">专为AI智能体优化的无头浏览器自动化CLI,支持无障碍树快照和基于引用的元素选择。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 427</span> <span style="color:#5b6abf;">📥 118,202</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">developer-tools</span> <h3><a href="/s/gog">Gog</a></h3> <div class="rec-owner">steipete</div> <div class="rec-desc">Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 921</span> <span style="color:#5b6abf;">📥 185,799</span> </div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded',function(){ document.querySelectorAll('.detail-tab').forEach(function(btn){ btn.addEventListener('click',function(e){ var tab = this.getAttribute('data-tab'); document.querySelectorAll('.detail-tab').forEach(function(b){b.classList.remove('active')}); document.querySelectorAll('.detail-content').forEach(function(c){c.classList.remove('active')}); this.classList.add('active'); var el = document.getElementById('tab-'+tab); if(el) el.classList.add('active'); }); }); }); </script> <div class="footer"> <p>Skill工具集 © 2026</p> </div></body> </html>