GridWork HQ
AI Pipelines

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

FieldValue
Triggerbuild [business name]
Examplebuild Oakwood Barber Co
DomainClient Delivery
ModelSonnet (implementation) + Opus (phase review gates)
RequiresApproved build plan at knowledge/clients/[business-name]/build-plan.md
OutputComplete site pushed to GitHub
Your roleReview after each phase. Connect domain when satisfied.

The 5 Phases

#PhaseAcceptance Criteria
1FoundationConfig, globals.css, navbar + footer render, build passes
2PagesAll pages render, responsive at 375/768/1024/1440px, no placeholders
3BlogAll posts render, meta present, Article JSON-LD validates
4SEO & MetaAll meta present, schema validates, sitemap accessible
5Integrations & PolishForms 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 warnings

If 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.

On this page