dark-factory
A development workflow for coding agents, packaged as skills for
Claude Code and
Codex CLI. One router, a set of playbooks,
and an artifact spine that takes a feature from requirements to merged PRs with
an executed acceptance runbook.
The current version is an adaptation of
PSTACK workflow plugin for Cursor, ported to Claude Code and Codex. PSTACK supplies
the shape: an explicitly invoked router, lanes, playbooks copied verbatim into
the todo list, single-pass review by diverse reviewers with a lead who
adjudicates, and the principle set underneath all of it. This repo carries that
to two other harnesses and adds four things of its own.
- Improvements taken from Superpowers,
which this framework used to depend on and no longer does. The per-task review
economy in
df-implement and the plan step style in df-plan are the two
that earned their place.
- A PRD artifact spine, which PSTACK does not have. Requirements interview,
challenge round, a coverage gate that makes sure the feature's verification
recipe is committed, validation, and an executed acceptance pass at the end.
- Multi-model review as a first-class mechanism. One Claude reviewer and one
Codex reviewer read the same prompt, and a lead adjudicates. Agreement across
model families is the signal worth paying for.
- Native GitHub stacks for real dependencies. Independent PRs still branch
from
main. A dependent branch chain registers as a native stack when the
repository supports the public preview, with a plain-chain fallback when it
does not.
Per-file provenance, naming the base file and what changed, is in
skills/df/references/vendor-manifest.md.
This repo holds workflow assets only. No application code lives here, and the
skills are project-agnostic.
Background: what is a dark factory?
Borrowed from manufacturing, where robots work in unlit facilities because they
do not need to see. Applied to software: specifications go in, tested software
comes out. The human defines what should exist. Machines handle the rest.
The framing comes from
Dan Shapiro's five levels of AI-assisted development,
modeled after the NHTSA driving automation levels. See also:
| Level | Name | Description |
|---|
| 0 | Manual | Traditional development, no AI assistance |
| 1 | Task automation | AI writes tests, docs, boilerplate |
| 2 | Paired programming | Developer pairs with AI in the IDE |
| 3 | Human-in-loop management | AI acts as senior dev, human manages each step |
| 4 | Autonomous operation | Developer becomes PM, writes specs, AI handles the rest |
| 5 | Dark factory | Black box, specs in, tested software out |
Where this lands today
Late level 3, early level 4, and the interesting constraint is no longer
capability. Frontier models will execute a review loop as faithfully as it is
written, which means a loop with no work-based budget and no falsifiable exit
runs until something external stops it. The v2 design treats that as the
problem to solve. Autonomy inside a run is high. The boundaries are deliberate,
and they are where the human stays.
Five things are still human by design:
- entering the mode, because a casual question should never start a pipeline
- confirming the lane, because ceremony has to be proportional to consequence
- the technical design checkpoint, because the PRD says what to build and how
to build it still benefits from judgment
- the visual design checkpoint for graphical UI changes, because a driven mock
catches hierarchy and interaction mistakes before the plan turns them into work
- merging, because the operator merges every PR and the agent never does
The framework is built so you can remove yourself from steps as trust builds,
rather than going fully autonomous on day one.
How you use it
Entry
The operator types /df. That is the only entry. The router never activates
itself, and a session may suggest /df in one line but never enters on its
own. Work done without /df is ordinary conversation.
A SessionStart hook keeps a one-line reminder and the ownership rules in
context. It does not activate the mode.
Lanes