Write a spec. Dark Factory decomposes it into modules, builds them in parallel, validates against holdout scenarios, and merges the result.
Each phase is a gate. Agents coordinate through typed contracts and a SQLite-backed mail system. You stay in control.
Index the codebase so agents understand project structure, conventions, and dependency patterns before building.
Decompose the spec into modules with typed interface contracts, a dependency DAG, and an integration strategy.
Small plans auto-approve. Complex decompositions pause for human review before any building starts.
Spawn parallel AI builders, each in its own git worktree, each bound by typed interface contracts. No shared state.
Merge worktrees and run checkpoint tests to verify modules compose correctly at their contract boundaries.
Run holdout scenarios the builders never saw. Test changeability by asking fresh agents to extend the code.
If evaluation fails, retry from the build phase with feedback. The pipeline supports up to N retry attempts.
Integrate into the target branch with post-merge validation. Ship it.
Multiple AI agents build simultaneously in isolated git worktrees. No shared mutable state. Each builder sees only its interface contracts.
Test scenarios builders never see during construction. Validate what you actually want, not what the builder thought you wanted.
Typed interface contracts define module boundaries. Builders implement to contracts without coordinating with each other.
Every agent reports cost. The pipeline respects budgets, surfaces tradeoffs, and prevents runaway API spending.
Builders follow red-green-refactor. Tests first, then minimal code to pass, then cleanup. Every module is test-covered.
SQLite-backed messaging between agents. Durable, inspectable, debuggable. No brittle direct process communication.
# Write a spec
$ dark spec create "Add JWT authentication"
→ spec_01J7KMRV created
# Run the full pipeline
$ dark build spec_01J7KMRV --budget-usd 10
# Watch progress in real-time
$ dark status
# Launch the live dashboard
$ dark dash
# Inspect agent activity
$ dark agent list --role builder
# Read agent mail
$ dark mail check --agent agt_01DEF
# Analyze spec decomposition
$ dark architect analyze spec_01J7KMRV
# View interface contracts
$ dark contract list --run-id run_01XYZ
# Check contract compliance
$ dark contract check ctr_01DEF
# Clone and install
$ git clone https://github.com/a1j9o94/df-cli.git
$ cd df-cli && bun install
# Initialize your project
$ dark init --name my-project
# Create a spec and build
$ dark spec create "Add user authentication"
$ dark build spec_01ABC123