The L10 Professional Standard for building AI-powered web applications with multi-agent orchestration and human-in-the-loop workflows.
Anti-Gravity is a production-ready monorepo template designed for developers building AI-first applications — apps where AI isn't just a feature, it's the core architecture.
If you're building:
- 🤖 Multi-agent AI systems (orchestrators, analyzers, generators)
- 👤 Human-in-the-loop workflows (approval queues, confidence-based routing)
- ⚡ Streaming AI interfaces (real-time responses, progressive UI)
- 🔄 Stateful AI pipelines (session tracking, agent handoffs)
...this template gives you a battle-tested foundation instead of starting from scratch.
- Agent type system with Zod schemas for type-safe communication
- Confidence-based routing (auto-approve, use Pro model, or pause for human)
- PocketBase hooks for server-side agent lifecycle management
- Built-in
approval_queuecollection in PocketBase - Agents pause automatically when confidence drops below threshold
- Human feedback captured and fed back into the pipeline
- Vapor State — Streaming/loading with shimmer, blur, reduced opacity
- Solid State — Final data snaps into place with micro-animations
- Design tokens for consistent styling across all components
- 6 shared packages (tokens, ui, api, hooks, utils, types)
- Turborepo for incremental builds and caching
- Clear separation: UI is visual-only, logic lives in packages
- Drop legacy code in
prototype_dump/ - AI-guided migration to the monorepo structure
- Automated token extraction and component refactoring
| Layer | Technology |
|---|---|
| Monorepo | Turborepo |
| Frontend | Next.js 16 (App Router, Server Actions) |
| Backend | PocketBase v0.34.2 (JSVM hooks) |
| AI | Google Gemini (streaming) |
| Styling | Tailwind v4 with shared design tokens |
| Validation | Zod (runtime + compile-time) |
# 1. Create from template
gh repo create my-ai-app --template dimasyankauskas/gravity_project_template
# 2. Install dependencies
pnpm install
# 3. Start development
pnpm devPocketBase is the backend brain. Start it locally before running the web app:
# Option A: Docker (recommended)
docker run -p 8090:8090 -v $(pwd)/pocketbase/pb_data:/pb_data ghcr.io/pocketbase/pocketbase:0.34.2
# Option B: Direct binary (if Docker unavailable)
# Download from https://pocketbase.io/docs/ → run ./pocketbase serveFirst-time setup:
- Open
http://localhost:8090/_/(Admin UI) - Create an admin account
- Import schema: Settings → Import Collections → paste contents of
pocketbase/pb_schema.json
├── apps/
│ └── web/ # Next.js 16 application
│ └── mobile/ # [Future] Expo / React Native
├── packages/
│ ├── tokens/ # 🎨 Design tokens (colors, spacing)
│ ├── ui/ # 🎨 Shared components + Tailwind
│ ├── api/ # 🧠 AI logic + routing
│ ├── hooks/ # 🎣 React hooks
│ ├── utils/ # 🛠️ Pure utilities
│ └── types/ # 💎 Zod schemas
├── pocketbase/
│ ├── pb_hooks/ # Agent orchestration hooks
│ └── pb_schema.json # Collections (users, projects, ai_sessions, approval_queue, design_critiques)
├── architecture/ # Design docs & ADRs
├── prototype_dump/ # Legacy code migration
└── .agent/workflows/ # AI agent workflow triggers
This template is AI-agent ready. Whether you use Cursor, Windsurf, or any LLM-powered IDE, the agent can execute structured workflows.
| Command | Purpose |
|---|---|
/design-verify |
Build Flight Deck, verify design tokens and components |
/sync-routine |
Quick manifest update after small changes |
/sync-sentinel |
Deep scan for major milestones |
/blueprint |
Convert request to implementation plan |
/refactoraistudio |
Analyze AI Studio prototype for migration |
1️⃣ Prototype Ingestion (porting legacy code):
Drop your code into prototype_dump/, then:
> "Agent, execute Phase 1 of INGESTION_GUIDE.md. Generate packages/ui first."
2️⃣ Design Verification (visual QA):
> "Agent, initialize Design Verification" (or /design-verify)
Then visit: http://localhost:3000/design-system
3️⃣ Sync Sentinel (documentation sync):
> "Run Sync Sentinel"
The agent scans diffs, updates MANIFEST.md, logs architectural changes.
| File | Purpose |
|---|---|
.cursorrules |
Behavior rules and constraints |
llms.txt |
Context map with directory shortcuts |
AGENTS.md |
Protocols (Sync Sentinel, Ingestion) |
MANIFEST.md |
Live project status |
.agent/workflows/ |
Workflow definitions |
1. The Logic Divorce:
- ❌ Illegal:
useEffect(() => fetch('/api'))inside a UI component - ✅ Legal:
const { data } = useTripData()(imported from@repo/hooks)
2. GenUI Mandate:
- All AI components must handle Vapor State (Streaming/Low Confidence) and Solid State (Final/High Confidence)
- See
AGENTS.mdfor visual specs
3. Schema First:
- Never "guess" a database field. If it's not in
packages/types, it doesn't exist - Update the Zod schema first, then implement
| You should use this if... | This might not be for you if... |
|---|---|
| Building AI-native apps | Just adding ChatGPT to an existing app |
| Need multi-agent orchestration | Single-agent chatbot |
| Want human approval workflows | Fully autonomous AI |
| Prefer monorepo architecture | Single-package projects |
| Use PocketBase | Already committed to Supabase/Firebase |
| Command | Action |
|---|---|
pnpm dev |
Starts Web (3000) and all packages |
pnpm build |
Builds all apps and packages |
pnpm lint |
Runs ESLint across the monorepo |
pnpm typecheck |
TypeScript validation |
| Document | Purpose |
|---|---|
| AGENTS.md | Agent protocols and quality gates |
| MANIFEST.md | Current project status & roadmap |
| SYSTEM_DESIGN.md | Architecture diagrams |
| INGESTION_GUIDE.md | Prototype migration steps |
| DESIGN_VERIFICATION.md | Design system QA process |
| COMPONENTS.md | GenUI design system specs |
- Fork the repository
- Create a feature branch
- Run
/sync-routinebefore committing - Submit a pull request
Apache 2.0 — Use freely, patent protection included.
Created by Dimas Yankauskas
If this template saves you time, consider giving it a ⭐ on GitHub!