agentleFS
danielvm-gitdanielvm-git/bigpowers/.cursor/rules/compose-workflow.mdc

bigpowers / rules

Cursor rule252 starsChanged 3 months agoMITView on GitHub

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.

The file

We split this compose-workflow.mdc into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

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

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
compose-workflow.mdc
---
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."
alwaysApply: false
---

# 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.

---

# Workflow template

```markdown
# WORKFLOW: <name>

**Trigger:** Use when ...

| Step | Skill | Output | verify |
|------|-------|--------|--------|
| 1 | survey-context | state.yaml handoff | ... |
| 2 | research-first | Prior Art in SCOPE_LATEST.yaml | ... |
| 3 | plan-work | epics/eNN-*.yaml tasks | ... |
```

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.