npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@alevental/cccp

v0.14.0

Published

Claude Code and Cmux Pipeline Reagent — deterministic YAML-based pipeline orchestration

Downloads

4,878

Readme

CCCP

Claude Code and Cmux Pipeline Reagent — deterministic YAML-based pipeline orchestration for workflows built around Claude Code and cmux.

The problem

Complex multi-stage workflows (SDLC pipelines, research pipelines, content pipelines) rely on Claude as a "file-routing state machine" — dispatching agents, reading evaluations, routing on PASS/FAIL. Over long runs, context degrades: Claude forgets iteration counts, skips sub-stages, misreads evaluations, or loses routing logic.

The solution

CCCP moves the state machine into deterministic TypeScript code. It reads YAML pipeline definitions, dispatches agents via claude -p (each with fresh context), parses evaluations with regex, and routes without interpretation. A cmux split-pane dashboard shows live progress. Human approval gates are handled via an MCP server.

  • Uses Max subscription — no API keys needed
  • Each agent gets a fresh context window
  • Evaluation routing is regex, not interpretation
  • State persists to disk — resume after crashes
  • Works with any project, any agents, any workflow

Install

npm install @alevental/cccp

Or use npx (no install):

npx @alevental/cccp <command>

Quick start

Scaffold a project:

cd my-project
npx @alevental/cccp init

This creates:

cccp.yaml                               — project configuration
pipelines/example.yaml                   — example pipeline
.claude/agents/researcher.md             — research agent
.claude/agents/writer.md                 — document writer
.claude/agents/reviewer.md               — evaluation agent
.claude/agents/architect/agent.md        — system architect
.claude/skills/cccp-run/SKILL.md         — /cccp-run skill
.claude/skills/cccp-pipeline/SKILL.md    — /cccp-pipeline skill

For all template agents and example pipelines:

npx @alevental/cccp examples

Preview what the pipeline will do:

npx @alevental/cccp run -f pipelines/example.yaml -p my-project --dry-run

Run it for real:

npx @alevental/cccp run -f pipelines/example.yaml -p my-project

Pipeline YAML

Pipelines are sequences of typed stages, with optional parallel groups for concurrent execution:

name: my-pipeline
description: What this pipeline does.

stages:
  # Simple agent dispatch
  - name: research
    type: agent
    agent: researcher
    output: "{artifact_dir}/research.md"

  # Plan-Generate-Evaluate with retry loop
  - name: design
    type: pge
    task: "Design the system architecture."
    inputs:
      - "{artifact_dir}/research.md"
    planner:
      agent: architect
      operation: task-planning
    generator:
      agent: architect
      operation: design        # optional sub-operation
      mcp_profile: base        # optional MCP server profile
    evaluator:
      agent: reviewer
    contract:
      deliverable: "{artifact_dir}/design.md"
      guidance: "System must be modular with documented data flow."
      max_iterations: 3
    on_fail: stop              # stop | skip | human_gate

  # Sub-pipeline composition
  - name: documentation
    type: pipeline
    file: pipelines/build-docs.yaml
    variables:
      source: "{artifact_dir}/design.md"

  # Run independent stages concurrently
  - parallel:
      on_failure: wait_all
      stages:
        - name: blog-post
          type: agent
          agent: copywriter
          output: "{artifact_dir}/blog-post.md"
        - name: release-notes
          type: agent
          agent: copywriter
          output: "{artifact_dir}/release-notes.md"

  # Human approval gate
  - name: approval
    type: human_gate
    prompt: "Review the design. Approve to proceed."
    artifacts:
      - "{artifact_dir}/design.md"

Stage types

| Type | What it does | |------|-------------| | agent | Dispatch one agent, collect output | | pge | Dispatch planner -> evaluator writes contract -> dispatch generator -> dispatch evaluator -> parse ### Overall: PASS/FAIL -> retry generator/evaluator on FAIL up to max_iterations | | ge | PGE without the planner — evaluator writes contract from task directly -> dispatch generator -> dispatch evaluator -> parse ### Overall: PASS/FAIL -> retry on FAIL up to max_iterations | | autoresearch | Iterative artifact optimization — adjust artifact, execute task, evaluate against ground truth, retry on FAIL | | pipeline | Invoke another pipeline YAML as a sub-pipeline — runs inline, shares the parent run lifecycle | | human_gate | Block until approved via MCP tool call or state file edit |

Stages can also be wrapped in a parallel block to run concurrently. All stages support outputs: for structured data and when: for conditional execution:

  - name: research
    type: agent
    agent: researcher
    outputs:
      decision: "proceed or abandon"

  - name: design
    type: pge
    when: "research.decision == proceed"       # skip unless research says proceed
    task: "Design based on: {research.summary}" # output values available as variables

See the pipeline skill for the full schema.

Model and effort

Control which Claude model and effort level each agent uses. Set defaults at the pipeline level, override per-phase or per-agent:

name: my-pipeline
effort: high
phase_defaults:
  planner: { effort: medium }
  evaluator: { model: haiku, effort: low }

Resolution: agent config > stage level > phase_defaults > pipeline level. Valid effort values: low, medium, high, max.

Variables

Built-in variables available in all string fields:

| Variable | Value | |----------|-------| | {project} | Project name from --project | | {project_dir} | Project directory | | {artifact_dir} | Resolved artifact output directory | | {pipeline_name} | Pipeline name | | {iteration} | Current PGE iteration (1-based) |

Variable values can reference other variables — resolution is recursive:

variables:
  artifact_dir: "docs/projects/{project}"   # {project} resolves within the value

Agents

CCCP ships 18 template agents as starting points. Run npx @alevental/cccp examples to scaffold all of them into your project. Agents are markdown files that become the --system-prompt-file for claude -p.

Flat file agent (agents/implementer.md):

---
name: implementer
description: Implements code changes.
---

# Implementer Agent

Your instructions here...

Directory agent with operations (agents/architect/):

agents/architect/
  agent.md              # base instructions (always included)
  health-assessment.md  # operation: health-assessment
  plan-authoring.md     # operation: plan-authoring

Reference an operation in the pipeline:

generator:
  agent: architect
  operation: plan-authoring

Agent search paths

CCCP searches for agents in order (first match wins):

  1. agents/ relative to the pipeline YAML file
  2. <project>/.claude/agents/
  3. <project>/agents/
  4. Paths listed in cccp.yamlagent_paths

Project config (cccp.yaml)

Place at your project root:

agent_paths:
  - ./agents
  - ./vendor/shared-agents

mcp_profiles:
  base:
    servers:
      qmd:
        command: qmd
        args: [serve, --stdio]
  design:
    extends: base
    servers:
      figma:
        command: npx
        args: [-y, figma-console-mcp]

artifact_dir: docs/projects/{project}/{pipeline_name}
default_mcp_profile: base

MCP profiles use extends for inheritance. Each agent gets only the servers its profile specifies via --strict-mcp-config.

Evaluation format

Evaluator agents must produce files containing this line:

### Overall: PASS

or

### Overall: FAIL

CCCP reads only this line. Everything else in the evaluation (criterion tables, iteration guidance) is for the generator agent on retry.

CLI reference

npx @alevental/cccp run -f <pipeline.yaml> -p <project> [options]
  --dry-run              Show what would execute without running agents
  --headless             Auto-approve all human gates, disable TUI
  --no-tui               Disable the TUI dashboard (keep interactive gates)
  -d, --project-dir      Project directory (default: cwd)
  -a, --artifact-dir     Override artifact output directory
  -v, --var key=value    Set pipeline variables (repeatable)

npx @alevental/cccp resume -p <project> -r <run-id-prefix> [options]
  --headless             Auto-approve all human gates, disable TUI
  --no-tui               Disable the TUI dashboard (keep interactive gates)
  --from <stage>         Clean-reset and resume from a named stage

npx @alevental/cccp dashboard -r <run-id-prefix>
  Launch the TUI dashboard to monitor a running pipeline

npx @alevental/cccp mcp-server
  Start the MCP server for pipeline interaction and gate approval

npx @alevental/cccp init [--dir <path>]
  Scaffold cccp.yaml, example pipeline, and example agents

npx @alevental/cccp examples [--dir <path>] [--agents-only] [--pipelines-only]
  Scaffold all template agents and example pipelines

Gate interaction

When a pipeline hits a human_gate stage, it writes a pending gate to the SQLite state database (.cccp/cccp.db) and waits.

Option 1: MCP server — Register the MCP server in your project's .mcp.json:

{
  "mcpServers": {
    "cccp": {
      "command": "npx",
      "args": ["@alevental/cccp", "mcp-server"]
    }
  }
}

Then from Claude Code: call cccp_status to see what's pending, cccp_gate_respond to approve/reject.

Option 2: Headlesscccp run --headless auto-approves all gates.

State & resume

Pipeline state is persisted to a SQLite database at {projectDir}/.cccp/cccp.db after every transition (stage start, planner dispatch, contract dispatch, generator dispatch, evaluator dispatch, routing decision). If a run is interrupted:

# Resume from the last incomplete stage
npx @alevental/cccp resume -p my-project -r <run-id-prefix>

# Clean-reset and resume from a specific stage
npx @alevental/cccp resume -p my-project -r <run-id-prefix> --from review

Without --from, completed stages are skipped and execution continues from the first incomplete stage. With --from, the named stage and all subsequent stages are wiped clean (state, artifacts, logs) and re-run from scratch.

cmux integration

When running inside a cmux workspace (CMUX_WORKSPACE_ID is set), CCCP automatically:

  • Updates the sidebar status pill with current stage
  • Sets the progress bar
  • Sends desktop notifications for gates and pipeline completion
  • Can open the dashboard in a cmux split pane

Without cmux, CCCP falls back to plain terminal output.

Development

npm test           # run all tests (329 tests)
npm run typecheck  # tsc --noEmit
npm run test:watch # watch mode
npm run build      # compile TypeScript to dist/

License

MIT