BREAKING CHANGE: The old gh copilot extension was deprecated October 25, 2025. This system now uses the NEW GitHub Copilot CLI.
- Node.js v22+ - REQUIRED for new Copilot CLI
- Fine-grained PAT - Must have "Copilot Requests" permission
- New CLI Installation -
npm install -g @github/copilot - Environment Setup - Configure
.envwith your token
# 1. Copy environment template
cp .env.example .env
# 2. Add your fine-grained GitHub token to .env
# GH_TOKEN=github_pat_your_token_here
# 3. Run setup (installs Node.js v22+ Copilot CLI)
chmod +x setup.sh && ./setup.shSee copilot_CLI_operation.md for complete migration guide.
A fully automated, production-ready system that turns YAML manifests into finished codebases, validates them, tests them, and ships them automatically.
This repository is a self-contained, headless factory that:
- Reads YAML Architecture Manifests - Single source of truth for entire systems
- Auto-generates Documentation - OpenAPI specs and JSON schemas from manifests
- Validates Everything - Syntax, schema, and business logic validation
- Builds Code Headlessly - Uses GitHub Copilot CLI to generate production codebases
- Tests & Ships Automatically - Full CI/CD loop with auto-merge on green
YAML Manifest β Validation β Doc Generation β Auto-Build β Test β Ship β Deploy
- Architecture Manifests (
briefs/) - YAML files describing complete systems - Auto-Generated Docs - OpenAPI contracts and JSON validation schemas
- Headless Copilot CLI - Production code generation without human intervention
- Automated CI/CD Pipeline - 6-stage GitHub Actions workflow with auto-healing
- Multi-Project Support - Each manifest creates its own
[name]_complete/directory
Create briefs/MyProject_Stack.yaml:
project: MyProject
version: 1.0.0
description: AI-driven platform
components:
api:
base_url: https://api.myproject.dev/v1
endpoints:
- path: /items
methods:
get:
summary: List items
response_schema: ItemList
schemas:
Item:
type: object
properties:
id: { type: string, format: uuid }
name: { type: string }
required: [id, name]
ItemList:
type: array
items: { $ref: "#/components/schemas/Item" }
infrastructure:
compute: [fastapi]
databases: [postgres]git add briefs/MyProject_Stack.yaml
git commit -m "Add MyProject manifest"
git push- System automatically validates and builds the codebase
- GitHub Copilot CLI generates production code headlessly
- Tests run automatically in CI/CD pipeline
- Auto-merges on green test results
- Creates deployment tags and notifications
./tools/export_repo.sh MyProject_complete my-new-reporepo-root/
βββ briefs/ # Architecture manifests (input)
β βββ ToySoldiers_Stack.yaml
βββ tools/ # Local utilities
β βββ build_docs.py # Local generator/validator
β βββ export_repo.sh # Push builds to new repos
βββ .github/workflows/ # Automated CI/CD pipeline
β βββ 00_validate_manifest.yml # YAML validation
β βββ 01_generate_docs.yml # Auto-generate OpenAPI/Schema
β βββ 02_prepare_confirmation.yml # Auto-approval mechanism
β βββ 03_production_generate.yml # Headless Copilot build
β βββ 04_ship_on_green.yml # Test & auto-merge
β βββ 05_deploy_complete.yml # Deployment completion
βββ [brief_name]_complete/ # Generated codebases (output)
βββ [brief_name]_API_OpenAPI.yaml # Auto-generated API contracts
βββ [brief_name]_API_Schema.json # Auto-generated validation schemas
βββ archive/sample_generations/ # Example inputs/outputs for reference
- Validation - Checks YAML syntax and schema compliance across all manifests
- Doc Generation - Creates OpenAPI and JSON Schema files automatically from each manifest
- Auto-Approval - Automatic approval mechanism (no human intervention required)
- Production Build - Copilot CLI generates complete codebase with workspace isolation:
- Extracts dynamic project metadata from YAML
- Creates isolated
[ProjectName]_complete/directories - Uses secure
fs(read,write)permissions only - Fresh Copilot context for each project
- Test & Ship - Runs tests, auto-merges on green, creates issues on red
- Deploy Complete - Final deployment verification and tagging
- Workspace Isolation - Each project builds in its own directory context
- No Shell Access - Copilot restricted to file system operations only
- Context Cleaning - Fresh generation context prevents data leakage
- Project-Agnostic - Dynamic metadata extraction, no hardcoded assumptions
pip install pyyaml jsonschema
python tools/build_docs.py./tools/export_repo.sh ProjectName_complete new-github-repo-nameGITHUB_TOKEN- Automatically provided by GitHub Actions with proper permissions
- GitHub Copilot CLI must be installed and authenticated
- Repository must have GitHub Actions enabled
- All workflows have proper permissions blocks for security compliance
- Rapid Prototyping - Manifest to working codebase in minutes
- Microservices Factory - Generate consistent service architectures
- API-First Development - OpenAPI specs drive implementation
- Multi-Project Management - Single repo manages multiple codebases
- Compliance & Governance - Enforced patterns and validation
- Same manifest always produces same output
- Full audit trail through GitHub issues and PRs
- Reproducible across environments
- No manual intervention required
- Runs in CI/CD without human input
- Fully automated approval workflows
- Zero Data Leak - Complete workspace isolation between projects
- Dynamic Project Names - Extracts actual project metadata from YAML manifests
- Secure Tool Access - Restricted to
fs(read,write)only, no shell access - Context Isolation - Each project builds in its own
[ProjectName]_complete/directory - Copilot Context Cleaning - Fresh context for every project generation
- Failed builds automatically trigger regeneration
- Test failures are analyzed and corrected automatically
- Full error context preserved in issue comments and logs
This system is battle-tested for:
- β Headless CI/CD - No manual steps required
- β Error Recovery - Auto-healing on failures
- β
Multi-Project Isolation - Zero data leak between builds with
[ProjectName]_complete/directories - β Dynamic Metadata Extraction - Project-agnostic with YAML-driven configuration
- β
Secure Tool Access - Restricted Copilot permissions (
fs(read,write)only) - β Context Isolation - Fresh Copilot context for every project generation
- β Audit Compliance - Full paper trail
- β Security - Controlled access via GitHub permissions
- β Scalability - Handles dozens of concurrent projects
- Requires GitHub Copilot CLI with headless capabilities
- Manifests must follow the schema defined in validation workflows
- Generated code is automatically committed - review before production deployment
- Each project gets its own complete directory structure
- Full automation pipeline with zero human intervention required
Ready to ship? Drop a manifest in briefs/ and push! π