Install
openclaw skills install web-architectureMulti-agent orchestration for complex TypeScript/Next.js/Convex projects. Phased builds, functional verification, the full playbook for delegating to sub-agents without chaos.
openclaw skills install web-architectureMulti-agent development workflow for TypeScript/Next.js/Convex projects.
Born from: 29 agents, 50K lines, 212 errors, 1 hard lesson
Sub-agents MUST run without timeout limits. A 10-minute timeout that cuts off an agent mid-implementation leaves broken, partial code. Let agents finish.
"Build passes" is necessary but NOT sufficient.
Before marking ANY phase complete, verify:
An agent produced 15K lines of "working" code that:
bun run buildSelf-grade: 5/10 — A prototype, not a product.
Single agent with full context > Many agents with partial context
29 parallel agents wrote 50K lines of code that didn't compile. Why?
user.role, backend returned profile.plannpx convex dev never ran, no generated typesThe fix: One agent with full context rewrote the entire Convex backend in 11 minutes.
✅ Good for parallel work:
❌ Bad for parallel work:
Must complete before spawning ANY other agents.
npx convex dev --onceschema.ts (ALL tables)npx convex dev to generate typesCONTRACTS.md (all data shapes)lib/types.tsbun run build passesDeliverables:
convex/schema.ts — Complete, no TODOsconvex/_generated/ — Types generatedCONTRACTS.md — API shapes documentedlib/types.ts — Shared frontend typesbun run build — Passes with 0 errorsOnly spawn AFTER Phase 0 completes.
| Agent | Output | Dependencies |
|---|---|---|
| Tech Requirements | TECH-REQ.md | None |
| Compliance | COMPLIANCE.md | None |
| Design Principles | DESIGN.md | None |
| Coding Standards | STANDARDS.md | None |
Rule: These agents READ the schema. They do NOT modify it.
Option A: Single Backend Agent (Recommended)
Option B: Parallel with File Locks
Functional Requirements:
Single agent builds the component library.
Why? Components reference each other. Parallel work creates duplicate components with different APIs.
Functional Requirements:
Now safe to parallelize because schema is locked, types exist, components exist.
| Agent | Scope | Can Modify |
|---|---|---|
| Admin Suite | /app/(admin)/** | Own files only |
| Support Portal | /app/(support)/** | Own files only |
| Marketing Pages | /app/(marketing)/** | Own files only |
| User Flows | /app/(app)/** | Own files only |
Rules:
Functional Requirements:
Red flags (NOT complete):
// TODO comments in business logicbun run build (must pass)npx convex dev --once (must pass)E2E Verification Checklist:
Auth Flow:
Core CRUD Flow:
project/
├── convex/
│ ├── schema.ts # 🔒 Phase 0 only
│ ├── _generated/ # 🔒 Auto-generated
│ └── [domain].ts
├── lib/
│ ├── types.ts # 🔒 Phase 0 only
│ └── utils.ts
├── components/
│ ├── ui/ # Component library agent
│ └── [domain]/ # Feature agents
├── app/
│ ├── (admin)/ # Admin agent
│ ├── (app)/ # App agent
│ └── (marketing)/ # Marketing agents
└── CONTRACTS.md # 🔒 Phase 0 only
🔒 = Locked after Phase 0. Agents read, don't modify.
1. Bootstrap Agent (MUST COMPLETE FIRST)
└── schema.ts, types, contracts
2. Doc Agents (parallel)
├── TECH-REQ.md
├── COMPLIANCE.md
└── DESIGN.md
3. Backend Agent (single)
└── All convex/*.ts functions
4. Component Agent (single)
└── All components/ui/*
5. Feature Agents (parallel, isolated directories)
├── Admin Suite
├── Support Portal
├── Marketing Pages
└── User Flows
6. Integration Agent (single)
└── Final build, fixes, QA
❌ Spawn all agents at once — No coordination, duplicate work
❌ Let agents invent types — Use CONTRACTS.md, not imagination
❌ Skip Phase 0 — "We'll figure out the schema later" = disaster
❌ Parallel schema writes — One owner only
❌ Frontend before backend types — Generates type mismatches
❌ No build checkpoints — Errors compound