编排工作流

danielvm-git2026-10-28查看 968复制 854

将多个 bigpowers 技能串联成保存在 specs/ 中的自定义工作流配方。适用于项目重复非标准技能序列,或用户想要超出 orchestrate-project 模式的有文档记录的 playbook 时。

Download (.md)

📘如何使用这个技能

  1. 1
    复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
  2. 2
    打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
  3. 3
    粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
  4. 4
    直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景

💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。

SKILL.md2910 chars
---
name: compose-workflow
description: Chain multiple bigpowers skills into a custom workflow recipe saved in specs/. Use when a project repeats a non-standard skill sequence, or user wants a documented playbook beyond orchestrate-project modes.
model: sonnet
effort: standard
---

<!-- story: e09s01 -->
<!-- story: e45s27 -->
<!-- story: e21s04 -->

# Compose Workflow
> **HARD GATE** — **HARD GATE** — Workflows are orchestration, not automation. Do NOT create workflows for tasks that should be single skills. Workflow complexity must be justified.


## Process

1. Interview: goal, phases, which skills, gates between steps.
2. Write `specs/workflows/<name>.yaml`:
   - `name`, `command`, `description`, `skills[]`, `verify`
   - Optional: `args` for skill-specific arguments
3. Register in state.yaml Active Decisions.
4. Optional: reference from `orchestrate-project` Ad-Hoc mode.

> **Prefer the YAML recipe format** over the legacy `specs/WORKFLOW-<name>.md` markdown format.
> YAML recipes are command-mappable, machine-readable, and listed in the Standard Recipe Library.

## Terminal-state taxonomy (e45s27)

Every workflow step and `/loop` tick MUST exit with exactly one terminal state:

| State | Meaning | Next action |
|-------|---------|-------------|
| `success` | Step verify passed; artifacts written | Advance to next skill in recipe |
| `no-op` | Nothing to do (already green / already applied) | Skip step; advance |
| `blocked` | External gate (approval, red CI, missing dep) | `diagnose-stall` or escalate to user |
| `exhausted` | Max iterations/cycles reached (review cap, dispatch cycles) | Stop; human decision required |

Record terminal state in `specs/state.yaml` `handoff.last_terminal_state` when a recipe step completes. `/loop` ticks that produce no progress for two consecutive wakes → invoke `diagnose-stall`.

## Standard Recipe Library

Pre-built recipes in `specs/workflows/` map agentic stack commands to skill chains.
Reference them in AGENTS.md so `/command` directly invokes the matching recipe.

| Command | Workflow | Skill chain |
|---------|----------|-------------|
| `/check-stack` | check-stack | survey-context → assess-impact → setup-environment |
| `/ship` | ship | audit-code → commit-message → release-branch |
| `/tdd` | tdd | develop-tdd → enforce-first |
| `/code-review` | code-review | audit-code → request-review → respond-review |
| `/security` | security | audit-code → request-review |
| `/plan` | plan | survey-context → research-first → plan-work |
| `/build-fix` | build-fix | investigate-bug → diagnose-root → develop-tdd → validate-fix |
| `/e2e` | e2e | smoke-test → verify-work |

Add to `AGENTS.md`:
```
/check-stack = compose-workflow check-stack
/ship        = compose-workflow ship
```

## Verify

→ verify: `[ "$(ls specs/workflows/*.yaml 2>/dev/null | wc -l | tr -d ' ')" -ge 8 ]`

See [REFERENCE.md](REFERENCE.md) for template.
来源:skillsdirectory

评论0

登录后参与评论

还没有评论,来抢沙发吧