Skip to content

ella-yschoi/agentic-dev-pipeline

Repository files navigation

agentic-dev-pipeline

A Claude Code skill that autonomously implements features through an automated loop: code β†’ quality gates β†’ triangular verification β†’ self-correction, with zero human intervention.

Project-agnostic β€” auto-detects lint, test, and security tools for Python, Node, Rust, Go, and custom setups.

Use it as a Python library (dev dependency) or as a standalone CLI tool (uv tool install).


Installation

Python project β€” dev dependency

# uv (recommended)
uv add --dev agentic-dev-pipeline

# pip
pip install agentic-dev-pipeline

Non-Python project (Node, Rust, Go, etc.) β€” CLI tool

# uv tool (recommended)
uv tool install agentic-dev-pipeline

# pipx
pipx install agentic-dev-pipeline

From source (development)

git clone https://github.com/ella-yschoi/agentic-dev-pipeline.git
cd agentic-dev-pipeline
uv sync

Quick Start

1. Initialize config files

agentic-dev-pipeline init

This creates:

  • PROMPT.md β€” prompt template for Claude
  • requirements.md β€” requirements template
  • Config entry in pyproject.toml (if present) or .agentic-dev-pipeline.toml
  • .gitignore entry for .agentic-dev-pipeline/

2. Edit templates

Fill in PROMPT.md and requirements.md for your feature. See examples/ for filled-in examples.

3. Run

# Zero-flag β€” reads config from pyproject.toml or .agentic-dev-pipeline.toml
agentic-dev-pipeline run

Or from Python:

from agentic_dev_pipeline import Pipeline

Pipeline().run()  # reads config from pyproject.toml or .agentic-dev-pipeline.toml

Configuration

Settings are resolved in this priority order (highest wins):

Python API args > pyproject.toml > .agentic-dev-pipeline.toml > Environment variables > Defaults

Option A: pyproject.toml (Python projects)

[tool.agentic-dev-pipeline]
prompt-file = "PROMPT.md"
requirements-file = "requirements.md"
max-iterations = 5       # default: 5
# timeout = 300          # per claude call, seconds
# base-branch = "main"

Option B: .agentic-dev-pipeline.toml (Non-Python projects)

prompt-file = "PROMPT.md"
requirements-file = "requirements.md"
max-iterations = 3

Option C: Environment variables

Variable Config field Default
PROMPT_FILE prompt-file β€”
REQUIREMENTS_FILE requirements-file β€”
MAX_ITERATIONS max-iterations 5
CLAUDE_TIMEOUT timeout 300
MAX_RETRIES max-retries 2
BASE_BRANCH base-branch main

Config fields

Field Type Default Description
prompt-file string β€” Path to the prompt file
requirements-file string β€” Path to the requirements doc
max-iterations int 5 Maximum loop iterations
timeout int 300 Timeout per claude call (seconds)
max-retries int 2 Max retries per claude call
base-branch string main Git diff base branch

Python API

Minimal

from agentic_dev_pipeline import Pipeline

converged = Pipeline(
    prompt_file="PROMPT.md",
    requirements_file="requirements.md",
).run()

Zero-flag (config file)

from agentic_dev_pipeline import Pipeline

# Reads prompt-file and requirements-file from pyproject.toml or .agentic-dev-pipeline.toml
Pipeline().run()

Custom quality gate

from agentic_dev_pipeline import Pipeline

def no_todos() -> tuple[bool, str]:
    """Fail if any TODO comments remain in source code."""
    import subprocess
    result = subprocess.run(["grep", "-r", "TODO", "src/"], capture_output=True, text=True)
    if result.returncode == 0:
        return False, f"Found TODOs:\n{result.stdout}"
    return True, "No TODOs found"

Pipeline(
    prompt_file="PROMPT.md",
    requirements_file="requirements.md",
).add_gate("no-todos", no_todos).run()

Override config

Pipeline(
    prompt_file="PROMPT.md",
    requirements_file="requirements.md",
    max_iterations=3,
    timeout=600,
    base_branch="develop",
).run()

Triangular verification only

Pipeline(requirements_file="requirements.md").verify()

Project detection only

config = Pipeline().detect()
print(config.project_type)  # "python", "node", "rust", "go", or "unknown"
print(config.lint_cmd)      # detected lint command

Pipeline reference

Method Returns Description
Pipeline(...) Pipeline Create with optional config overrides
.add_gate(name, func) Pipeline Add a custom gate (chainable)
.run() bool Run full pipeline. True if converged
.verify() bool Run triangular verification only
.detect() ProjectConfig Run project auto-detection
.config PipelineConfig Access resolved config

Gate function signature: () -> tuple[bool, str] β€” returns (passed, message).


CLI Commands

# Initialize config files in current project
agentic-dev-pipeline init
agentic-dev-pipeline init --force   # overwrite existing files

# Run the full pipeline
agentic-dev-pipeline run
agentic-dev-pipeline run --prompt PROMPT.md --requirements requirements.md
agentic-dev-pipeline run --max-iterations 3 --timeout 600

# Run with all options
agentic-dev-pipeline run \
  --prompt PROMPT.md \
  --requirements requirements.md \
  --max-iterations 3 \
  --timeout 600 \
  --parallel-gates \
  --plugin-dir ./custom-gates/ \
  --webhook-url "https://hooks.slack.com/..."

# Triangular verification only
agentic-dev-pipeline verify --requirements requirements.md

# Print detected project config
agentic-dev-pipeline detect

# Version
agentic-dev-pipeline --version

CLI-only options

These options are only available via CLI flags or environment variables (not in config files):

Flag / Env var Default Description
--output-dir / OUTPUT_DIR .agentic-dev-pipeline/ Artifact output directory
--webhook-url / WEBHOOK_URL β€” Webhook for notifications
--parallel-gates / PARALLEL_GATES false Run gates in parallel
--plugin-dir / PLUGIN_DIR β€” Custom gate plugin directory
LOG_FORMAT text text or json
DEBUG β€” Enable debug output

Detection override env vars

Override auto-detected values per project:

Variable Description
PROJECT_TYPE Force project type: python, node, rust, go
LINT_CMD Lint command
TEST_CMD Test command
SECURITY_CMD Security scan command (empty = skip)
SRC_DIRS Source directories (space-separated)
INSTRUCTION_FILES Instruction files for Agent B (space-separated)
DESIGN_DOCS Design doc paths for Agent B (space-separated)
CHANGED_FILES Changed file list for verification (space-separated)

Pipeline Architecture

flowchart TD
    A["PROMPT.md + requirements.md"] --> B["Pipeline Start"]
    B --> C{"Iteration ≀ MAX?"}
    C -- Yes --> D["Phase 1: Agent A<br/>Implement or Fix Code"]
    C -- No --> Z["MAX_ITERATIONS reached<br/>Exit with code 1"]

    D --> E["Phase 2: Quality Gates"]

    E -->|Sequential| E1{"Lint β†’ Test β†’ Security<br/>fast-fail"}
    E -->|Parallel| E2{"All gates concurrently<br/>collect all failures"}
    E1 -- All pass --> G["Phase 3: Triangular Verification"]
    E1 -- Any fail --> F["Save failure as feedback"]
    E2 -- All pass --> G
    E2 -- Any fail --> F

    F --> C

    G --> G1["Agent B: Blind Review<br/>(reads code, NOT requirements)"]
    G1 --> G2["Agent C: Discrepancy Report<br/>(reads requirements + review, NOT code)"]
    G2 --> H{"TRIANGULAR_PASS?"}
    H -- Yes --> I["Phase 4: LOOP_COMPLETE<br/>Exit with code 0"]
    H -- No --> F
Loading

Triangular Verification

Three independent agent perspectives eliminate blind spots that single-agent review misses:

graph LR
    subgraph "Agent A"
        A1["Writes code"]
    end
    subgraph "Agent B (Blind)"
        B1["Reads code only<br/>Describes behavior"]
    end
    subgraph "Agent C (Judge)"
        C1["Reads requirements + B's review<br/>Finds discrepancies"]
    end

    A1 --> B1
    B1 --> C1
    C1 -- "PASS" --> D["Done"]
    C1 -- "FAIL" --> A1
Loading

Supported Project Types

Type Detected by Lint Test Security
Python pyproject.toml / setup.py / setup.cfg ruff / flake8 / pylint pytest / unittest semgrep / bandit
Node package.json eslint / npm lint jest / vitest / npm test semgrep / npm audit
Rust Cargo.toml cargo clippy cargo test semgrep / cargo-audit
Go go.mod golangci-lint / go vet go test semgrep / gosec
Custom env vars LINT_CMD TEST_CMD SECURITY_CMD

Detection priority: ENV var β†’ Makefile target β†’ package.json script β†’ tool existence

Python runner detection: uv.lock β†’ uv run, poetry.lock β†’ poetry run, otherwise bare. Tools are resolved from PATH first, then from the active venv (sys.prefix).


Output Files

After completion, check .agentic-dev-pipeline/:

File Content
loop-execution.log Full execution log
metrics.json Timing, iterations, gate results (JSON)
blind-review.md Agent B's blind code review
discrepancy-report.md Agent C's requirements vs code comparison
feedback.txt Last iteration's feedback (deleted on success)

Claude Code Skill

Inside a Claude Code session, you can invoke this as a skill:

Use the agentic-dev-pipeline skill to implement <feature>.
PROMPT: path/to/PROMPT.md
Requirements: path/to/requirements.md

Claude Code automatically recognizes ~/.agents/skills/agentic-dev-pipeline/SKILL.md.


Examples

See the examples/ directory for:

  • PROMPT-example.md / requirements-example.md β€” Filled-in templates (User Auth API)
  • python-project/ β€” Python project using pyproject.toml config + custom gate
  • node-project/ β€” Node project using .agentic-dev-pipeline.toml + uv tool install

Development

git clone https://github.com/ella-yschoi/agentic-dev-pipeline.git
cd agentic-dev-pipeline
uv sync

make test          # all tests
make test-unit     # unit only
make lint          # ruff check
make format        # ruff format
make check         # all checks

Prerequisites

  • Python 3.11+
  • uv (recommended) or pip
  • Claude Code CLI (claude in PATH)
  • At least one quality tool for your project (lint, test, or security) β€” installed in PATH or active venv

Troubleshooting

  • claude not found: Check PATH with which claude
  • Wrong tools detected: Override with LINT_CMD, TEST_CMD, SECURITY_CMD
  • Gate keeps failing: Run agentic-dev-pipeline detect to check detected commands
  • TRIANGULAR_PASS not achieved: Read .agentic-dev-pipeline/discrepancy-report.md; make requirements more precise
  • Timeout: Increase with --timeout 600 or CLAUDE_TIMEOUT=600

Experiment Results

Experiment logs using this skill are available in the renewal-review project at docs/logs/experiments-log.md.

License

MIT

About

πŸš€ Autonomous feature implementation pipeline using Claude Code

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages