A formal, governed documentation system for AI-assisted project execution.
Turn AI coding assistants into reliable project executors through structured specs, clear boundaries, and explicit human review.
The AI Project System was built using its own governance. All three planned phases (P1, P2, P3) are complete and consolidated to master.
✅ 5 Milestones (M1-M5), 12 Epics — Closed 2026-02-23 — #21
| Milestone | Epics | Status | Key Deliverables |
|---|---|---|---|
| M6 — Governance Separation | E6.1–E6.7 | ✅ Complete | /governance folder, .ai-project.yml spec, submodule setup |
| M7 — CLI Initialization Tool | E7.1–E7.4 | ✅ Complete | ai-project init command, hierarchical docs scaffolding |
| M8 — HQ Chat Agent | E8.1–E8.4 | ✅ Complete | hq.agent.md, project onboarding, governance upgrade workflow |
| M9 — Configuration & Override System | E9.1–E9.4 | ✅ Complete | Override spec, precedence rules, HQ agent integration |
| M10 — Adoption Validation & Documentation | E10.1–E10.4 | ✅ Complete | Adoption guide, FAQ, onboarded projects, P2 closure |
| Milestone | Epics | Status | Key Deliverables |
|---|---|---|---|
| M11 — File-Driven Bus & State Triggers | 4 | ✅ Complete | .ai-project/queue/, Python orchestrator, queue schemas |
| M12 — Containerized Sandbox & Loop Verification | 4 | ✅ Complete | Dockerfile.sandbox, 3-retry recursion engine, mock harness |
| M13 — Orchestrator CLI Daemon | 4 | ✅ Complete | ai-project-daemon, auto-merge hooks, lifecycle tests |
👉 Start using the system — manual or agentic
AI coding assistants are powerful but chaotic:
❌ Context is lost across conversations
❌ Scope creeps without clear boundaries
❌ Quality varies without standards
❌ Handoffs fail between humans and AI
❌ Decisions disappear into chat history
Traditional project management assumes human-to-human communication. AI needs a different approach.
The AI Project System provides structure without rigidity:
✅ Structured specs preserve context across sessions (Phase → Milestone → Epic)
✅ Authoritative documentation replaces ephemeral chat history
✅ Clear execution boundaries define when AI starts, delivers, and stops
✅ Explicit human review ensures quality and alignment
✅ Version-controlled decisions document intent and rationale
You get AI speed with human governance.
This repository contains the canonical AI Project System used to structure, document, and execute software projects with AI assistance.
It defines:
- Authoritative governance documents
- A Phase–Milestone–Epic execution model
- A documentation-first workflow
- Explicit context management for AI agents
This is not an application.
It is a system for managing projects.
This system is designed for:
- Engineers using AI tools (ChatGPT, Claude, Cursor, etc.)
- Projects where context, scope, and delivery matter (not throwaway prototypes)
- People who want repeatability, not improvisation (structure over chaos)
Prerequisites:
- Git (basic familiarity)
- Markdown editing
- AI chat tool access
- Willingness to trade upfront planning for execution clarity
Not for:
- Pure exploratory coding
- Single-file scripts
- Projects without AI assistance
Hierarchical structure that breaks work into manageable, deliverable units:
- Phases: Major segments (e.g., "Foundation", "Feature Development")
- Milestones: Cohesive increments (collection of related Epics)
- Epics: Atomic deliverable work (complete, reviewable, mergeable)
Each level is planned by its parent and feeds into the next:
HQ Chat ──creates──→ Phase specs + Phase Execution Chat Starter
│
▼
Phase Chat ──creates──→ Milestone specs + Milestone Execution Chat Starter
│
▼
Milestone Chat ──creates──→ Epic specs + Epic Execution Chat Starter
│
▼
Epic mode ──executes──→ Code, PRs, deliverables
Purpose-built for AI coding assistants:
Manual Mode (no infrastructure required):
- Chat Starters provide complete context for each level (Phase, Milestone, Epic)
- You copy-paste starters between sessions — handoffs are explicit and documented
Agentic Mode (Docker + daemon):
- File-driven queue (
.ai-project/queue/) replaces copy-paste handoffs ai-project-orchestratordetects triggers, dispatches work, runs Dev-QA loopsai-project-daemonmonitors the queue 24/7Dockerfile.sandboxprovides isolated, reproducible runtime- Auto-merge promotes branches automatically via
ai-project-git-merge
Both modes use the same specs, same artifacts, same governance. Start manual, graduate to agentic.
Clear separation of responsibilities:
- Humans (HQ): Define goals, review work, make accept/reject decisions
- AI (Coding Agents): Execute work, produce deliverables, document completion
- Explicit authorization required for merging
Version-controlled, authoritative specs:
- Chat is ephemeral, Markdown is truth
- Governance documents define rules and procedures
- Specs define goals, deliverables, and success criteria
Defined Epic lifecycle prevents chaos:
- Milestone Chat creates Epic Spec and Execution Chat Starter
- AI executes the Epic
- AI produces Delivery Notice and stops
- Human reviews deliverables
- Parent chat (Milestone/Phase/HQ) accepts/rejects/requests changes
- HQ authorizes merge (if accepted)
- AI merges and stops
Every Epic has explicit completion criteria:
- Deliverables checklist
- Acceptance criteria for human review
- Success metrics
New to the system? Get started in 30 minutes:
The guide walks you through:
- Initializing repository structure
- Starting HQ Mode to create a Phase
- Launching Phase/Milestone/Epic modes via Chat Starters
- Reviewing and closing your first Epic
Time: 30 minutes
Outcome: Complete understanding through practice
Understand the system visually:
- 🔄 Epic Lifecycle Flow — How Epics move from idea to closure
- 📊 Authority Hierarchy — Which documents have precedence
- 📁 Repository Structure — Where everything lives
- 🚀 Quick Start Guide — 30-minute walkthrough
- 📖 PROJECT-SYSTEM-GUIDELINES.md — System structure and governance
- 🤖 AI-OPERATING-GUIDELINES.md — Execution procedures
- 🎨 Visual Diagrams — Epic lifecycle, authority, structure
- 🏗️ How to Start a Project — Initialize new projects
- 📖 Adoption Guide — Step-by-step from zero to HQ Chat live
- ❓ Adoption FAQ — Troubleshooting common issues
- 🔄 Governance Sync Guide — Updating governance across projects
- 📝 Templates — Phase, Milestone, Epic templates
- 📋 Template Usage Guide — How to use templates
- ⚙️ Override Boundaries — What can be customized vs. immutable
- ⚙️ Epic Execution Chat Starter System — How to run Epics
- 👔 HQ Chat Guide — HQ mode responsibilities
- 🤖
bin/ai-project-orchestrator— Core orchestration engine - 🤖
bin/ai-project-daemon— Background queue monitor - 🤖
Dockerfile.sandbox— Sandbox container runtime - 🤖
bin/verify-loop.sh— Dev-QA loop verification (5 scenarios) - 🤖
bin/ai-project-git-merge— Auto-merge utility - 📋 PROJECT-SYSTEM-GUIDELINES.md §18 — Unattended cluster rules
- 📚 Phase P1 — Foundation and adoption artifacts
- 📚 Phase P2 — Multi-project adoption artifacts
- 📚 Phase P3 — Autonomous cluster artifacts
- 🔍 See how this system was built using itself
- 🏛️ Governance Propagation — How governance flows
- 🗺️ Project Tracker Integration — Tracker usage
Work cascades through four governance levels, each planned by the level above and executed by the level below. The system supports two execution modes:
The original governance model. No infrastructure needed beyond Git and an AI chat tool.
HQ Chat ──creates──→ Phase specs + Phase Execution Chat Starter
│ (copy-paste)
▼
Phase Chat ──creates──→ Milestone specs + Milestone Execution Chat Starter
│ (copy-paste)
▼
Milestone Chat ──creates──→ Epic specs + Epic Execution Chat Starter
│ (copy-paste)
▼
Epic Mode ──executes──→ Code, PRs, deliverables
Flow: Human copy-pastes Chat Starters → AI executes → Human reviews → HQ authorizes merge.
The P3 infrastructure automates handoffs. Requires Docker and the daemon process.
┌─────────────────────────┐
│ .ai-project/queue/ │
│ File-Driven Triggers │
└────┬────────────────────┘
│ poll / write
▼
┌─────────────────────────────────────────────────────────────┐
│ ai-project-daemon (background) │
│ Polls queue → dispatches to orchestrator → monitors result │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ ai-project-orchestrator (per-job) │
│ • Reads trigger JSON │
│ • Launches Docker sandbox │
│ • Runs Dev → QA loop (3 attempts max) │
│ • Produces completion / escalation report │
│ • Writes result back to queue │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Dockerfile.sandbox (ephemeral) │
│ • Isolated runtime with Node, Python, Go │
│ • Executes work, captures stdout/stderr │
│ • Secure filesystem with write-restricted volumes │
│ • Self-destructs after completion │
└─────────────────────────────────────────────────────────────┘
│
▼
ai-project-git-merge (auto-promotion)
Branch: epic/ → milestone/ → phase/
Flow: Trigger file appears in queue → daemon detects it → orchestrator runs sandboxed Dev-QA loop → result written → auto-merge promotes accepted work.
HQ Chat defines the Phase scope, goals, and milestones, then issues the Phase spec.
Phase Chat reviews the Phase spec, produces Milestone specs for each milestone, then returns them to HQ for acceptance.
Milestone Chat reviews the Milestone spec, produces Epic specs for each epic, then returns them to Phase for acceptance.
Epic mode receives an Epic Execution Chat Starter (manual) or a trigger file (agentic) and executes:
- Creates branch
- Builds deliverables
- Self-validates against Definition of Done
- Produces Delivery Notice and stops (manual) or writes completion to queue (agentic)
Human evaluates deliverables:
- Does it meet acceptance criteria?
- Does it solve the stated problem?
- Is quality acceptable?
HQ makes decision:
- Accept: Authorize merge → branch promoted → Epic closed
- Reject: Document rationale → create new Epic or abandon
- Request Changes: Define iteration → Epic mode updates
You don't "set" a mode at the project level. Each Epic picks its delivery mechanism at launch time. They share the same planning (Phase → Milestone → Epic specs), same branch strategy, same review gates, and same merge process.
Epic E2.1 ──manual──→ Chat Starter → AI session
/
Milestone M2 spec ─────┤
\
Epic E2.2 ──agentic──→ trigger JSON → daemon + sandbox
| Situation | Why |
|---|---|
| First Epic in a project | No queue infrastructure set up yet; planning is still fluid |
| Exploratory / ambiguous work | Tight human feedback loop is more efficient than automated retries |
| Debugging a complex issue | You want to watch each step in the AI session |
| No Docker available | Only Git is required |
How to launch: Create an Epic Execution Chat Starter → copy-paste into an AI session → Epic mode executes → delivers notice as chat message.
| Situation | Why |
|---|---|
| Repetitive Dev-QA cycles | 3-attempt self-healing loop runs unattended |
| Standardized work (docs, refactors, tests) | Clear DoD, low ambiguity, high automation value |
| 24/7 execution | Daemon polls queue continuously — drop a trigger file and walk away |
| Multi-project scale | Each project runs its own daemon independently |
How to launch: Write a JSON trigger file into .ai-project/queue/ → daemon detects it → orchestrator runs Dev-QA loop → result written back to queue.
There is no switch. Both mechanisms work simultaneously:
# Project structure — both modes coexist
my-project/
├── .ai-project/queue/
│ ├── 04_epic.json ← agentic trigger (daemon processes this)
│ └── readme.txt ← ignored (not .json)
├── .ai-project/queue/06_epic.json ← another agentic trigger
├── docs/phases/
│ └── P1-M2-E2.3__spec__... ← also launched manually via Chat Starter
└── governance/bin/ai-project-daemon --project-root . start ← daemon running- Daemon on → agentic triggers get processed; manual Chat Starters still work.
- Daemon off → agentic triggers sit in queue (processed when daemon restarts); manual mode unaffected.
- You can even launch the same Epic both ways — but don't. Pick one per Epic.
Is Docker available and configured?
├── NO → Use manual mode (Chat Starter)
└── YES → Is the Epic's work well-defined with clear DoD?
├── NO → Use manual mode (tighter feedback)
└── YES → Consider agentic mode (trigger file + daemon)
| Traditional Project Management | AI Project System |
|---|---|
| Jira tickets | Epic Specs (Markdown) |
| Standup meetings | Epic Delivery Notices |
| Verbal context | Documentation (version-controlled) |
| Manager assigns work | Human creates spec, AI executes |
| Code reviews | Human reviews + Epic Review Seals |
| "Done when merged" | "Done when DoD verified + accepted + merged" |
| Continuous communication | Async, documented handoffs |
| Human assumes context | AI reads authoritative docs |
Key difference: Traditional PM assumes humans retain context. AI Project System assumes context must be explicitly documented.
What you get:
- ✅ Structure — Clear boundaries for AI execution (no scope creep)
- ✅ Repeatability — Same process for every Epic, predictable outcomes
- ✅ Context preservation — Documentation survives session boundaries
- ✅ Quality control — Explicit review and acceptance gates
- ✅ AI speed — Autonomous execution once spec is clear
What you give up:
- ❌ Improvisation — Must plan before executing
- ❌ Verbal context — Everything must be written down
- ❌ Continuous iteration — Changes require spec updates
Who should use this:
- Engineers building production systems with AI assistance
- Projects where context loss has caused rework
- Teams wanting predictable AI execution
- People who value structure over chaos
Who should NOT use this:
- Pure exploratory coding (no clear deliverables)
- Throwaway prototypes (overhead not worth it)
- Single-file scripts (too much process)
- Projects without AI assistance (system assumes AI execution)
Option 1: Jump Right In (30 minutes) — Manual Mode
- 👉 Quick Start Guide — Learn the governance model by hand
Option 2: Go Autonomous — Agentic Mode
Requires Docker. Each project runs its own daemon to watch its .ai-project/queue/:
# From the ai-project-system repo itself (no flag needed):
bin/ai-project-daemon start
# From a project that has governance as a submodule:
cd ~/MyProject
governance/bin/ai-project-daemon --project-root . start
# Check status, stop:
ai-project-daemon status
ai-project-daemon stopSee bin/ai-project-daemon (daemon), Dockerfile.sandbox (sandbox), and bin/verify-loop.sh (test harness).
Read Section 18 of PROJECT-SYSTEM-GUIDELINES.md for cluster execution rules.
Option 3: Understand First, Then Practice
- Read governance
- PROJECT-SYSTEM-GUIDELINES.md — System structure (15 min)
- AI-OPERATING-GUIDELINES.md — Execution procedures (10 min)
- See visual overview
- Epic Lifecycle Flow — How Epics work (5 min)
- Authority Hierarchy — Document precedence (5 min)
- Start a project
- How to Start a Project — Step-by-step initialization
You don't need to read everything to begin.
The system is designed to be learned incrementally. Start manual, graduate to agentic.
This repository dogfooded its own system — the AI Project System was built using the AI Project System.
✅ 5 Milestones: M1 (Genesis), M2 (Execution Ergonomics), M3 (Governance Distribution), M4 (Adoption Readiness), M5 (System Refinement) ✅ 12 Epics delivered and merged ✅ Production-ready baseline
✅ 23 Epics across 5 milestones — Closed via #51
✅ M6 — Governance Separation & .ai-project.yml (7 Epics)
✅ M7 — CLI Initialization Tool (4 Epics)
✅ M8 — HQ Chat Agent (4 Epics)
✅ M9 — Configuration & Override System (4 Epics)
✅ M10 — Adoption Validation & Documentation (4 Epics)
✅ 47 Epics delivered across 13 milestones over 3 phases
- PROJECT-SYSTEM-GUIDELINES.md v3.0.0 (effective 2026-05-22)
- AI-OPERATING-GUIDELINES.md v2.0.0 (effective 2026-04-20)
Progress is reflected in three complementary ways:
-
Documentation (authoritative)
- Phase, Milestone, and Epic state lives in
docs/ - Completion reports are explicit and versioned
- Phase, Milestone, and Epic state lives in
-
Git history
- Branch hierarchy reflects execution flow
- Commits and PRs correspond to closed Epics
-
Project Tracker (assistive)
- GitHub Projects is used for planning and visibility
- Tracker state does not override documentation
If there is ever a conflict, documentation wins.
Authority Hierarchy (highest to lowest):
- PROJECT-SYSTEM-GUIDELINES.md — System structure, file conventions, core concepts
- AI-OPERATING-GUIDELINES.md — Execution procedures, agent responsibilities
- Epic Execution Chat Starter — Epic-specific instructions
- Epic Spec — Problem statement, goals, deliverables
- Execution Decisions — Real-time implementation choices
- System References — How-to guides, examples
- Chat Messages — Ephemeral communication (lowest authority)
Golden Rule: Documentation is authoritative. Chat is ephemeral. If there's conflict, higher-level docs win.
See Authority Hierarchy Diagram for visual explanation.
Current State:
- ✅ Phase P1 Complete — System Foundation & Adoption (5 milestones, 12 Epics)
- ✅ Phase P2 Complete — Adoption Architecture & Multi-Project Support (5 milestones, 23 Epics)
- ✅ Phase P3 Complete — Agentic Execution Model Maturity (3 milestones, 12 Epics)
- ✅ 47 total Epics delivered across 13 milestones, 3 phases
- ✅ Production-ready — Stable baseline for adoption and autonomous operation
- ✅ Battle-tested — Built using itself (dogfooding validated)
- ✅ Governance stable — v3.0.0 (effective 2026-05-22)
- ✅ Complete documentation — Quick-start, templates, examples, diagrams, FAQ
- ✅ CLI tool —
ai-project initfor one-command project setup - ✅ Governance Agent — Single unified agent with HQ/Phase/Milestone/Epic modes
- ✅ Override system — Customizable branching, naming, and merge conventions
- ✅ Adoption guide — Step-by-step path from zero to HQ Chat live
- ✅ Autonomous cluster — File-driven queue, orchestrator, daemon, sandbox, auto-merge
- ✅ Self-healing Dev-QA loops — 3-attempt recursion with escalation on exhaustion
- ✅ Hybrid model routing — Remote for planning, local for execution
- ✅ Licensed for adoption — MIT + CC BY-SA 4.0 dual license
What's Next (Future Phases):
- P4 — Unplanned. Options: System Operations & Observability, Public Release, Team Collaboration, or as directed.
Intentional Characteristics:
- Evolving deliberately based on real usage, not speculatively
- No web UI (not needed yet)
- Supports both manual and agentic execution — meet users where they are
- Hybrid model routing reduces token spend on repetitive Dev-QA loops
This repository uses dual licensing:
-
Code & Templates: MIT License
Freely use, modify, and distribute code, templates, and configuration files. -
Documentation: Creative Commons BY-SA 4.0
Documentation must be attributed and shared under the same license.
Why dual licensing?
- MIT allows unrestricted reuse of templates and code (maximum adoption)
- CC BY-SA 4.0 ensures documentation improvements flow back to the community
See LICENSE and docs/LICENSE for full license texts.
Contributions are welcome!
This system is designed to improve through real usage experience. We especially value:
- Bug reports (governance conflicts, unclear procedures)
- Documentation improvements (clarifications, examples)
- Real-world usage feedback ("I tried X and encountered Y")
Before contributing:
- Read CONTRIBUTING.md for guidelines
- Open an issue to discuss significant changes
- Follow existing documentation style and conventions
Not accepting (without discussion):
- Speculative features (no real usage motivation)
- Major redesigns (prove concepts first)
👉 Read the full contributing guide
- 📖 Start here: Quick Start Guide
- ❓ FAQ: Frequently Asked Questions
- 🎨 Visualize: Diagrams
- 🔍 Examples: Phase P1 | Phase P2 | Phase P3
- 📖 Adoption Guide: Step-by-step walkthrough
- 💬 Ask: Open an issue