Skip to content

mythicalhacker/auto-code

Repository files navigation

Auto_Code

Autonomous parallel development pipeline: takes a markdown task file and drives fleets of Claude Code and Codex CLI workers through plan → critique → execute → review loops until the tasks are done.

How it works

  1. Parse a task file into sprints/tasks with dependencies.
  2. Plan — multiple planner workers (Claude Code + Codex) draft plans in parallel; critic workers score them and iterate until a plan clears the approval threshold.
  3. Execute — executor workers implement approved tasks in parallel (PTY-driven CLI sessions via node-pty), with retry/stuck handling and checkpointed state (.pipeline/state.json) so runs can --resume.
  4. Review — optional Codex review pass on completed work.

Usage

node pipeline.mjs <task-file> --project-root <path> [options]
# or on Windows:
run-pipeline.cmd <task-file> --project-root <path>

Common options (all defaults in pipeline.config.json, CLI wins):

Flag Meaning
--cc-planners / --codex-planners <n> planner worker counts
--cc-executors / --codex-executors <n> executor worker counts
--plan-threshold <n> minimum critic score to approve a plan
--cc-model / --codex-model <m> worker models
--dry-run parse and show tasks without executing
--resume / --clean resume from or reset .pipeline/ state
--visible launch sessions with visible log tailing

Task file format

Tasks live in a markdown file: ## Sprint N: headers group ### <executor>-<n>: Task <id> — <title> blocks, each followed by a fenced code block containing the worker's prompt. An optional ## Dependencies section wires the task graph (tasks with no unmet dependencies run in parallel):

## Dependencies
1.1:
1.2: 1.1

## Sprint 1: Foundations

### CC-1: Task 1.1 — Extract config module
```
Move all config handling into lib/config.mjs ...
Verify: node --check lib/config.mjs
```

### Codex-1: Task 1.2 — Add config tests
```
Write tests covering CLI overrides ...
Verify: node tests/test-config.mjs
```

CC tasks go to Claude Code workers, Codex tasks to Codex workers. A ✅ DONE suffix on a task header skips it.

Layout

Path Purpose
pipeline.mjs Entry point and orchestration loop
lib/ Modules: task parser, config, state/checkpointing, steps, runners, PTY/terminal workers, git helpers
prompts/ System prompts for planner / critic / fix-generator / verifier roles
tests/ Unit and e2e tests (quoting, workers, pipeline)
.pipeline/ Run state and logs (generated, not committed)

Requirements

  • Node.js ≥ 18 (node-pty is the only dependency)
  • claude (Claude Code CLI) and codex CLIs installed and authenticated

Status

Working prototype, last actively developed February 2026. Developed and run on Windows; PTY worker mode is the default.

License

Apache License 2.0 — see LICENSE.

About

Autonomous parallel dev pipeline: drives fleets of Claude Code + Codex CLI workers through plan → critique → execute → review loops from a markdown task file

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors