cc-pipeline Build Plan
Breaks a Node.js port of a bash pipeline engine into four implementation phases with deliverables and verification steps.
What this file does
Breaks a Node.js port of a bash pipeline engine into four implementation phases with deliverables and verification steps.
When to use it
- Planning a multi-phase rewrite of a shell script into Node.js
- Defining deliverables and acceptance criteria for a pipeline tool
- Structuring a project that needs resume-from-interruption support
- Creating a build plan that includes agent-based step execution
Assumes this stack
cc-pipeline Build Plan
Phase 1: Core Engine
Port the bash pipeline engine to Node.js with proper process management.
Deliverables:
src/engine.js— Main pipeline loop (phase iteration, step execution, resume)src/state.js— JSONL-derived state (read/write events, derive current phase/step)src/logger.js— Structured JSONL logging + pretty console outputsrc/config.js— workflow.yaml parsersrc/prompts.js— Prompt template generator with context injection (BRIEF.md, previous phases, etc.)
Verification: node bin/cc-pipeline.js run --phases 1 starts a pipeline, logs JSONL events, and executes the spec step via claude -p.
Phase 2: Agent Implementations
Implement all agent types that execute pipeline steps.
Deliverables:
src/agents/claude-piped.js— Spawnclaude -pwith proper signal handling (SIGTERM → SIGKILL)src/agents/claude-interactive.js— tmux-based interactive CC for build/fix stepssrc/agents/bash.js— Shell command execution (for commit step)src/agents/base.js— Shared agent interface/contract
Verification: Each agent can be run independently. Ctrl-C during any agent cleanly terminates within 1 second.
Phase 3: CLI Polish & Init Command
Complete the user-facing CLI experience.
Deliverables:
cc-pipeline initworks end-to-end (scaffold + BRIEF template)cc-pipeline runworks end-to-end with all agentscc-pipeline statusreads JSONL and displays current state- Graceful Ctrl-C at any point
- Resume from interruption (reads JSONL, determines where to pick up)
- Banner display on start (project name, steps, current state)
Verification: Full init → run → Ctrl-C → resume cycle works. npx cc-pipeline init in a fresh dir scaffolds correctly.
Phase 4: Testing & Documentation
Ensure quality and usability for public release.
Deliverables:
- Unit tests for state.js, config.js, prompts.js, logger.js
- Integration test: init → mock run → status cycle
- README.md with usage, examples, configuration guide
- LICENSE (MIT)
- npm publish dry run
Verification: npm test passes. README covers all commands and options.
Reference Implementation
The working bash version lives at ~/wrk/swimlanes/.pipeline/run.sh (~630 lines).
Key files to reference:
.pipeline/run.sh— full pipeline engine.pipeline/workflow.yaml— step definitions.pipeline/prompts/*.md— prompt templatesdocs/phases/phase-N/— example output structure
What's inside
4 phases, each with deliverables list and verification criteria, plus a reference implementation section
Change this for your project
- Replace
~/wrk/swimlanes/.pipeline/run.shwith your own bash pipeline path - Replace
timothyjoh/cc-pipelinewith your own npm package name - Replace
claude -pwith your own LLM CLI command
Where it goes
Save as AGENTS.md in your repository root. Read by Codex, Cursor and other agents that follow the AGENTS.md convention.
Related Documents
Browser-only development
Guides AI assistants on an Electron + React + TypeScript desktop app for browsing and organizing AI-generated images locally.
Claude Agents — Reference & Recommendations
Catalogues 40+ Claude agents and marketing skills for building a cat adoption charity landing page, with a ready-to-paste prompt and backend API reference.
Golden DKG Prototype -- Master Plan
Defines an 8-phase implementation plan for a Rust prototype of the Golden non-interactive DKG protocol using BLS12-381 and tokio.
Swarms Examples Index
Lists 60+ example scripts for building single and multi-agent systems with the Swarms framework, organized by category and use case.