Build Pipeline
Execute approved build plans across 5 phases with state tracking and verification gates.
Build Pipeline
The build pipeline is the most complex pipeline in GridWork HQ. It executes an approved build plan across 5 phases, with TypeScript verification gates, git checkpoints, and automatic context management.
Quick Reference
| Field | Value |
|---|---|
| Trigger | build [business name] |
| Example | build Oakwood Barber Co |
| Domain | Client Delivery |
| Model | Sonnet (implementation) + Opus (phase review gates) |
| Requires | Approved build plan at knowledge/clients/[business-name]/build-plan.md |
| Output | Complete site pushed to GitHub |
| Your role | Review after each phase. Connect domain when satisfied. |
The 5 Phases
| # | Phase | Acceptance Criteria |
|---|---|---|
| 1 | Foundation | Config, globals.css, navbar + footer render, build passes |
| 2 | Pages | All pages render, responsive at 375/768/1024/1440px, no placeholders |
| 3 | Blog | All posts render, meta present, Article JSON-LD validates |
| 4 | SEO & Meta | All meta present, schema validates, sitemap accessible |
| 5 | Integrations & Polish | Forms submit, all QA passes, build + lint + tsc clean |
State Tracking
The build pipeline maintains a .build-state.json file in the site repo root. This tracks which phases are complete, enabling resumability across sessions. If the pipeline is interrupted, running build [business] again skips completed phases.
Verification Gates
After every phase, these checks must pass:
npx tsc --noEmit # Zero TypeScript errors
bun run build # Production build exits 0
bun run lint # Zero lint warningsIf a check fails, the pipeline attempts up to 3 fix-and-retry cycles. If still failing, it stops, records the error in the state file, and reports the blocker.
Context Management
After completing 3 or more phases in a single session, the pipeline automatically stops to prevent context degradation. It saves a resume prompt to .output/resume-build-[business-name].md with instructions for continuing in a fresh session.
Shell Script Alternative
For running builds directly (not via the dashboard):
cd $KNOWLEDGE_DIR
chmod +x system/scripts/build-orchestrator.sh
./system/scripts/build-orchestrator.sh [business-name]This runs each phase as a separate Claude Code invocation with completely fresh context per phase.