Automated development loop powered by GitHub Copilot CLI. Each phase shells out to copilot -p "..." --yolo with a crafted prompt. Specs follow the spec-kit convention — numbered Markdown files (NN-slug.md) with a CONSTITUTION.md defining product constraints. Each spec is processed one at a time — plan, build, review — all phases to completion before moving to the next.
- GitHub Copilot CLI (
copiloton$env:PATH) - PowerShell 7+
- Git
- The target project directory must be a git repository (
git init)
Install-Module -Name dev-loopgit clone https://github.com/markgar/dev-loop.gitInvoke-DevLoop -SpecsDir '<path>' -ProjectDir '<path>' [-GitPush] [-Model <model>].\dev-loop.ps1 -SpecsDir '<path>' -ProjectDir '<path>' [-GitPush] [-Model <model>]By default, Copilot CLI picks its own model. Use -Model to override:
Invoke-DevLoop -SpecsDir ./specs -ProjectDir . -Model claude-sonnet-4Run copilot --help to see available models.
The repo includes sample specs in spec-kit style — a CONSTITUTION.md and two numbered specs that describe a bookstore REST API:
CONSTITUTION.md— Product constraints (tech stack, conventions, principles)01-bookstore-rest-api.md— Core CRUD endpoints for a bookstore API02-book-search-filtering.md— Search and filtering capabilities
mkdir ~/my-bookstore
cd ~/my-bookstore
git init
# Point dev-loop at the sample specs
'<path-to-dev-loop>/dev-loop.ps1' -SpecsDir '<path-to-dev-loop>/sample-spec' -ProjectDir .The dev-loop will plan, build, and review each spec in order — generating the entire project from scratch in your target directory.
Invoke-DevLoop -SpecsDir '<path>' -ProjectDir '<path>' [-GitPush]
│
├── preflight.ps1 — Discover specs, constitution review
│
└── Per-spec loop:
├── plan.ps1 — Decompose spec into commit-sized tasks
├── plan-eval.ps1 — Review & fix the plan in-place
├── build.ps1 — Build next unchecked task (loops until plan complete)
└── review.ps1 — Senior SWE code review + standards capture
| Phase | Agent | What it does |
|---|---|---|
| Preflight | preflight.ps1 |
Scans the specs directory, discovers numbered spec files, and reviews CONSTITUTION.md for anything that would interfere with the dev-loop process. Runs once per invocation. |
| Plan | plan.ps1 |
Reads a single spec and the constitution, then produces a checklist of commit-sized tasks in plan-<spec>.md. Each task = one git commit. |
| Plan Eval | plan-eval.ps1 |
Reviews the generated plan against the spec for completeness, ordering, coherence, and scope. Fixes the plan file in-place if anything is off. |
| Build | build.ps1 |
Picks up the next unchecked task from the plan, implements it, runs existing tests, checks it off, and commits. Loops until all tasks are checked. |
| Review | review.ps1 |
Acts as a senior SWE reviewer — fixes code quality issues, updates ENGINEERING_STANDARDS.md with reusable learnings, keeps copilot-instructions.md in sync, and ensures minimal documentation (README, CHANGELOG) exists. |
A CONSTITUTION.md at the specs root defines product constraints included in every prompt.
Each run creates a timestamped directory under .dev-loop/ in the target project:
.dev-loop/
└── 20260304-183305/
├── dev-loop.log # Orchestrator summary
├── preflight.log # Spec discovery + constitution check
├── 01-my-feature.log # All phases for this spec
├── manifest.json # Per-spec phase timestamps
├── spec-discovery.json # Discovered specs
├── plan-01-my-feature.md # Task checklist for spec 01
└── preflight-findings.md # (only if constitution has issues)
Phase timestamps in manifest.json enable checkpoint/resume — completed phases are skipped on re-run.
While dev-loop is running (or after it finishes), open the target project directory in VS Code:
code ~/my-bookstore
The .dev-loop/ tracking directory contains logs, plans, and manifests that GitHub Copilot can read. Open Copilot Chat and ask things like:
- "What phase of the dev-loop build are we in right now?"
- "Summarize what happened in spec 01."
- "Are there any failures in the latest run?"
Because everything is plain text, Copilot has full context to answer questions about the current state of the build.
dev-loop/
dev-loop.ps1 # Thin launcher (clone-and-run convenience)
README.md
sample-spec/ # Sample specs (not published to Gallery)
src/
dev-loop/ # PowerShell module (published to Gallery)
dev-loop.psd1 # Module manifest
dev-loop.psm1 # Module implementation (Invoke-DevLoop)
agents/ # Phase scripts
Contributions are welcome! Please open an issue to discuss a change before submitting a pull request.
This project is licensed under the MIT License.