Scaffolding for AI-native development with parallel agent orchestration, spec-driven design, and automated CI/CD.
- OpenSpec - Spec-driven development workflow for humans and AI agents
- Parallel Slicing - Contracts-first architecture with independent work slices
- GitHub Actions - Automatic linting, testing, and deployment
- AWS Amplify - Full-stack Next.js + Amplify integration out of the box
- Agent Orchestration - Coordinate AI agents across contracts, frontend, and backend
# Clone and setup
git clone https://github.com/yourusername/agent-template.git my-project
cd my-project
./scripts/setup.sh my-app
cd my-app
# Push to GitHub (GitHub Actions auto-starts)
git remote add origin <your-repo>
git push -u origin main
# Local development
echo "NEXT_PUBLIC_GOOGLE_CLIENT_ID=..." > .env.local
pnpm install
pnpm devYour app is live at http://localhost:3000 and GitHub Actions is automatically testing every change!
| Document | Purpose |
|---|---|
| QUICK_REFERENCE.md | β‘ Quick answers to common questions |
| GETTING_STARTED.md | π Complete setup guide + API keys + environment variables |
| WORKFLOW.md | π End-to-end development workflow + GitHub Actions CI/CD |
| AGENTS_AND_LLMS.md | π€ Using different LLMs for different slices |
| SLICING.md | π§© Parallel development strategy |
| AGENTS.md | Agent instructions (universal) |
| CLAUDE.md | Claude-specific rules |
my-app/
βββ apps/web/ # Next.js frontend
βββ amplify/ # AWS backend
β βββ functions/ # Lambda handlers
β βββ data/ # DynamoDB schema
β βββ backend.ts # Config
βββ packages/contracts/ # Shared types (build first)
βββ openspec/ # Feature specifications
β βββ specs/ # Completed features
β βββ changes/ # Work in progress
βββ .github/workflows/ # GitHub Actions CI/CD
βββ docs/ # Documentation
βββ scripts/ # Automation
Create feature specs in openspec/changes/<feature>/:
proposal.md- What & whydesign.md- Architecture & typestasks.md- Implementation breakdown
See GETTING_STARTED.md for example
cd ../slice-contracts
claude
# "Implement types from openspec/changes/user-auth/design.md"- Lint & type-check on every push
- Run tests automatically
- Build production bundle
- Deploy to Amplify on main branch
All automatic - no configuration needed!
Merge to main β GitHub Actions automatically deploys to AWS Amplify
β Next.js 15 with TypeScript β AWS Amplify Gen2 (Auth, API, Database) β GitHub Actions workflows (CI/CD) β TailwindCSS styling β Monorepo with contracts pattern β OpenSpec spec-driven development β Parallel agent worktrees β Pre-configured ESLint & TypeScript
Quick answers? Start here: β QUICK_REFERENCE.md
New to this template? See: β GETTING_STARTED.md
Understanding the workflow? See: β WORKFLOW.md
Using different LLMs? See: β AGENTS_AND_LLMS.md
Want to parallelize development? See: β SLICING.md
mkdir openspec/changes/user-profiles
# Create proposal.md, design.md, tasks.md
git add openspec/
git commit -m "spec: user profiles feature"
git push -u origin feat/user-profiles
# Create PR on GitHubcd ../slice-contracts
claude
# "Implement types from spec"
# Agent writes tests β code β commitscd ../slice-frontend
claude # Implement UI
cd ../slice-backend
claude # Implement APIgit checkout main
git pull
git merge feat/user-profiles
# GitHub Actions: Lint β Test β Build β
# Merge PR
# GitHub Actions: Deploy to Amplify βCreate .env.local:
NEXT_PUBLIC_GOOGLE_CLIENT_ID=your_google_client_id
NEXT_PUBLIC_GITHUB_CLIENT_ID=your_github_client_id
NEXT_PUBLIC_AMPLIFY_REGION=us-east-1See GETTING_STARTED.md - API Keys for detailed setup.
Add these secrets to GitHub Settings β Secrets:
AWS_ROLE_TO_ASSUME- IAM role for AWS accessAMPLIFY_APP_ID- Amplify Console app IDAMPLIFY_TOKEN- Amplify CLI token
See GETTING_STARTED.md - GitHub Secrets for setup steps.
pnpm install # Install dependencies
pnpm dev # Local development
pnpm test # Run tests (before push!)
pnpm lint --fix # Fix linting errors
pnpm build # Production build
pnpm type-check # TypeScript validation
./scripts/orchestrate.sh create-all # Create all slices
./scripts/orchestrate.sh status # View worktrees
./scripts/orchestrate.sh clean # Remove worktreesGitHub Actions failing? β GETTING_STARTED.md - Troubleshooting
Environment variables wrong? β GETTING_STARTED.md - API Keys
OAuth not working? β GETTING_STARTED.md - OAuth Setup
Worktrees not creating?
β Run from project root: cd my-app && ./scripts/orchestrate.sh create-all
Build packages/contracts/ types first, then frontend and backend import from there. Ensures type safety across your app.
Structured specs that both humans and AI agents understand. Prevents miscommunication and keeps work aligned.
Use git worktrees to work on contracts, frontend, UI, and backend simultaneously without conflicts.
Agents read specs and implement exactly what's specified. Update spec β update implementation automatically.
See SLICING.md for:
- Detailed architecture explanation
- How contracts ensure type safety
- Parallel development workflow
- Integration patterns
- Common pitfalls to avoid
- β
Clone repo and run
./scripts/setup.sh my-app - β Push to GitHub (GitHub Actions starts automatically)
- π Read GETTING_STARTED.md for full setup
- π Create your first OpenSpec feature
- π€ Start an agent:
cd ../slice-contracts && claude - π Merge to main and deploy automatically!
Do I need to configure GitHub Actions? No! It's pre-configured and runs automatically on every push.
What API keys do I need? For local dev: Google & GitHub Client IDs (public) For deployment: AWS role + Amplify app ID (in GitHub Secrets) See GETTING_STARTED.md
Can I use different LLMs for different tasks? Yes! Each slice can use a different LLM. You control which model/agent runs in each slice. The template uses Claude by default, but any compatible agent works.
How do I deploy?
Merge to main branch. GitHub Actions automatically deploys to AWS Amplify. Done!
What about database migrations?
Amplify handles DynamoDB schema automatically via the data model in amplify/data/.
MIT - Built on the AWS Amplify Next template
Questions? Start with GETTING_STARTED.md or check WORKFLOW.md for detailed explanations.