Cruce Saunders
  • Player card
  • Workshop
  • List
  • Contact
Cruce Saunders
  • Player card
  • Workshop
  • List
  • Contact

prompt-chain

Apr 2026AI agentsPrivate

Terminal output: 'Manifest is valid' with 11 phases, 17 tasks and 3 parallel groups, then a dry run that passes all 17 tasks phase by phase.
Back to the worldprompt-chain
  • Player card
  • Workshop
  • List
  • Contact
  • Back to the world
  • Player card
  • Workshop
  • List
  • Contact

prompt-chain

prompt-chain is a command-line tool that runs a whole build plan through AI coding agents, one phase at a time.

It reads a plan written as phases of prompts, sends each prompt to the Cursor agent, up to three at once, and makes every phase pass build checks and an optional AI review before the next one starts.

It turned a written plan into one run I could start, stop, resume and audit, and the idea of a gate between phases is in everything I've built since.

phases in its own build plan
1111
tests passing
6666

Long builds drift, so I split them into gated phases

By April 2026 I was building bigger things with AI agents, and long builds kept failing the same way. Give one agent a long plan in a single chat and by the later steps it has lost track of the early ones, and a broken build early on quietly poisons everything after it. prompt-chain fixes that by never asking an agent to hold the whole plan. Each prompt runs as its own small job, and nothing moves on until the work so far actually builds.

prompt-chain validate checks a plan and counts its phases, tasks and parallel groups. prompt-chain run then works through it, and a dry run walks the whole plan without calling an agent, so I can see every step before spending anything.

Every phase has to pass its gate

Inside a phase, tasks that don't touch the same files run in parallel, up to three at a time, each as a separate call to the Cursor agent. A task that fails is retried up to three times. When every task in the phase is done, the gate runs: shell commands that must pass, like a compile or a test suite, and optionally an AI review of what changed. Only a passing gate opens the next phase. If a run is interrupted, resume picks it up where it stopped instead of starting over.

How prompt-chain runs a plan

Planning docsWhat I want builtManifestPhases of tasks, each with a promptand its filesOne phase's tasksUp to three agents at once, threeretries eachGateBuild and test commands, optionalAI review. Pass opens the nextphaseFinished buildEvery phase passed its gategenerate, or write itafter the last phasePlanning docsWhat I want builtManifestPhases of tasks, each with a prompt andits filesOne phase's tasksUp to three agents at once, three retrieseachGateBuild and test commands, optional AIreview. Pass opens the next phaseFinished buildEvery phase passed its gategenerate, or writeitafter the last phase
DataAI agentSystemOutput
  • Planning docs: What I want built
  • Manifest: Phases of tasks, each with a prompt and its files
  • One phase's tasks: Up to three agents at once, three retries each
  • Gate: Build and test commands, optional AI review. Pass opens the next phase
  • Finished build: Every phase passed its gate
  • Planning docs to Manifest: generate, or write it
  • Manifest to One phase's tasks
  • One phase's tasks to Gate
  • Gate to Finished build: after the last phase

Using it

A run starts from a manifest and ends with a status report.

  1. Phase 6 of prompt-chain's own manifest in JSON: a task with its prompt, touched files and group, and a gate listing four static checks with ai_review set to true.
    1

    Step 1: Write the plan as a manifest

    A manifest is the build plan in JSON. Every task carries its prompt, the files it touches, what it depends on and a parallel group, and every phase ends in a gate. This is phase 6 of prompt-chain's own plan, which has 11 phases and 17 tasks, from scaffolding to a server that lets other agents call it.

  2. Terminal output of 'prompt-chain generate --help': options for the workspace, a project type hint, an interactive review, the output path, the model and verbose pass output.
    2

    Step 2: Or let it write the manifest

    prompt-chain generate reads a folder of planning documents and writes the manifest itself, in several AI passes that each build on the last, so each step stays focused and every intermediate output can be inspected.

  3. Terminal output of 'prompt-chain status': a run ID, status completed, phase final-integration, 17 tasks completed and 0 failed.
    3

    Step 3: Check where it stands

    prompt-chain status reports the run, its phase, and how many tasks completed or failed. A Cursor rule and an MCP server let agents inside Cursor call the tool directly, so a plan can go from documents to a running build without me writing any JSON.

Phase 6 of prompt-chain's own manifest in JSON: a task with its prompt, touched files and group, and a gate listing four static checks with ai_review set to true.
Terminal output of 'prompt-chain generate --help': options for the workspace, a project type hint, an interactive review, the output path, the model and verbose pass output.
Terminal output of 'prompt-chain status': a run ID, status completed, phase final-integration, 17 tasks completed and 0 failed.

More builds

  • AI agentsCrew and JevSep–Oct 2026
  • WebApex SATSep–Oct 2026

Back to the workshop