Set up a new or existing project to use the dark-factory pipeline.
Follow every step in order. Do not skip any step — including the smoke test.
- dark-factory installed (
go install github.com/bborbe/dark-factory@latest) - Docker running
- claude-yolo image pulled (
docker pull docker.io/bborbe/claude-yolo:v0.10.1) - ~/.claude-yolo/ configured (see main README)
workflow: controls isolation; pr: is an orthogonal flag (only direct rejects pr: true). Common combinations:
workflow |
pr |
When to use | Git behavior |
|---|---|---|---|
direct (default) |
false |
Small projects, no branch protection | Commits to current branch |
branch |
true |
Team with PR review, medium repo | Feature branch in parent repo + PR |
clone |
true |
Parallel prompts or full container isolation | Fresh clone, feature branch + PR |
worktree |
true |
Huge repos (>1 GB) | Worktree (no git in container) + PR |
branch/worktree/clone also work with pr: false (commit to feature branch, no PR). See workflows.md for the full decision matrix.
Create .dark-factory.yaml in the project root. Only add non-default values.
Direct workflow (default):
workflow: direct
validationPrompt: docs/dod.mdPR workflow:
workflow: branch
pr: true
autoMerge: true
validationPrompt: docs/dod.mdWith private Go modules:
workflow: direct
validationPrompt: docs/dod.md
defaultBranch: master
gitconfigFile: ~/.claude-yolo/.gitconfig
netrcFile: ~/.claude-yolo/.netrc
env:
GOPRIVATE: "your.private.host/*"
GONOSUMCHECK: "your.private.host/*"See configuration.md for all config fields.
The config references validationPrompt: docs/dod.md — this file must exist or validation will fail.
mkdir -p docsCreate docs/dod.md with project-specific quality criteria. See vault-cli/docs/dod.md for a reference template covering:
- Code Quality — doc comments, error handling, factory patterns
- Testing — coverage targets, framework conventions
- Install —
go installworks, noreplace/excludein go.mod - Documentation — README and CHANGELOG updated
Adapt each section to your project (e.g., remove CLI-specific checks for libraries, add service-specific checks for services).
mkdir -p prompts/in-progress prompts/completed prompts/log
mkdir -p specs/in-progress specs/completed specs/log
touch prompts/in-progress/.keep prompts/completed/.keep prompts/log/.keep
touch specs/in-progress/.keep specs/completed/.keep specs/log/.keep.keep files ensure git tracks empty directories.
Add:
/.dark-factory.lock
/.dark-factory.log
/prompts/log
/specs/log
The project CLAUDE.md serves two audiences:
- Claude Code sessions — humans working interactively, need workflow rules
- YOLO container — autonomous agent executing prompts, needs project-specific dev context
See claude-md-guide.md for the full template and guidance.
At minimum, add:
- Dark Factory Workflow section (complete flow, commands, key rules)
- Development Standards section (build commands, test conventions, dependencies)
- Architecture section (package map)
- Key Design Decisions (constraints the agent must respect)
git add .dark-factory.yaml .gitignore prompts/ specs/ docs/dod.md CLAUDE.md
git commit -m "setup dark-factory config and directories"Run all checks — every line must succeed:
cat .dark-factory.yaml # config exists
cat docs/dod.md # DoD exists
ls prompts/in-progress/.keep # dirs tracked
ls specs/in-progress/.keep
grep dark-factory.lock .gitignore # lock ignored
grep dark-factory.log .gitignore # daemon log ignored
grep prompts/log .gitignore # logs ignored
grep "Dark Factory" CLAUDE.md # workflow section existsDo not proceed to step 9 until all checks pass.
This step is mandatory. Run the smoke test before writing any real prompts. It confirms the pipeline works end-to-end (Docker, CLAUDE.md, build commands, YOLO container).
Copy the initial prompt template:
cp <dark-factory-docs>/init-prompt-fix-tests-and-dod.md prompts/fix-tests-and-dod.mdSee init-prompt-fix-tests-and-dod.md for the template. This prompt runs make precommit, fixes any failures, and checks the Definition of Done.
Approve and run it:
dark-factory prompt approve fix-tests-and-dod
dark-factory daemonOnly write real prompts after the smoke test completes successfully.
- Configure your project: configuration.md — all config fields, validation, notifications, providers
- Write a spec: spec-writing.md
- Write a prompt: prompt-writing.md