Skip to content

heymegabyte/agent-skills / 06-build-and-slice-loop

build-and-slice-loop

Verified

Use when implementing features or streaming OnePrompt site builds. Complete vertical slices with real content, strict TypeScript and Zod. Parallel section/data work, deterministic assembly, granular patches and immediate valid previews.

FileKindSize
SKILL.mdskill md7.2 KB
admin-dashboard.mdmarkdown5.5 KB
ai-chat-widget.mdmarkdown6.0 KB
blog-and-content-engine.mdmarkdown6.2 KB
build-breaking-rules.mdmarkdown7.4 KB
chat-native-dashboard.mdmarkdown3.6 KB
contact-forms-and-endpoints.mdmarkdown6.7 KB
copilot-and-ai-features.mdmarkdown7.4 KB
custom-error-pages.mdmarkdown4.5 KB
data-tables.mdmarkdown7.7 KB
domain-provisioning.mdmarkdown4.6 KB
easter-eggs.mdmarkdown4.7 KB
empty-states-and-loading.mdmarkdown5.7 KB
file-uploads-and-storage.mdmarkdown6.7 KB
internationalization.mdmarkdown4.3 KB
keyboard-shortcuts-and-command-palette.mdmarkdown6.7 KB
microcopy-library.mdmarkdown8.0 KB
notification-center.mdmarkdown8.4 KB
onboarding-and-first-run.mdmarkdown5.0 KB
pre-digested-builds.mdmarkdown3.6 KB
pwa-kit.mdmarkdown6.8 KB
realtime-and-websockets.mdmarkdown7.2 KB
rich-text-editor.mdmarkdown7.4 KB
site-search.mdmarkdown4.0 KB
stripe-first-donations.mdmarkdown10.7 KB
web-manifest-system.mdmarkdown11.9 KB
webhook-system.mdmarkdown9.5 KB

pre-digested-builds.md

View on GitHub
---
name: "pre-digested-builds"
description: "Research→profile→build architecture — pre-digest ALL context before expensive AI builder runs"
updated: "2026-04-24"
---

# Pre-Digested Build Architecture

AI builders (Claude Code, Cursor, bolt.diy) are expensive ($5-15/run) and slow (20-40min). Every minute spent researching inside the builder is wasted. Pre-digest ALL context using cheap, fast workers before the builder starts.

## Architecture: 4 Pre-Build Phases

### Phase 1: Research (~30s, parallel)

- Profile the business via LLM (o3-mini, $0.01) + Google Places API ($0.003)
- Returns structured JSON — type, services, hours, contact, reviews, geo
- Run both in parallel — profile doesn't depend on Places

### Phase 2: Enrich (~45s, 5 parallel)

- Brand identity (colors, fonts, personality)
- Selling points (3 USPs, hero slogans)
- Social presence
- Website scrape (homepage + 5 key pages)
- Logo discovery (Logo.dev, Brandfetch)

Each runs independently with profile as input.

### Phase 3: Media (~60s, 5 parallel)

- Discover images (5 APIs — Pexels, Pixabay, Google CSE, Foursquare, Yelp)
- Generate logo (GPT Image 2 if none found)
- Generate section images
- Discover videos (YouTube, Pexels)
- Move user uploads

Store all media in object storage, return metadata only.

### Phase 4: Profile Images (~90s)

- Workers AI Llama Vision profiles all images (FREE) — description, quality score, relevance score, suggested placement, alt text, dominant colors
- GPT Image 2 vision `detail:low` ONLY for top 5 hero candidates (~$0.02)
- Pre-selects top picks for hero/about/services/gallery
- See `image-profiling` skill for tiered architecture

## Context Files (what builder receives)

- `_research.json` — confidence-weighted business data (~50KB)
- `_image_profiles.json` — every image profiled with scores + placements (~100KB)
- `_scraped_content.json` — original website pages: text, headings, images (~200KB)
- `_videos.json` — YouTube/Pexels embed URLs (~5KB)
- `_places.json` — Google Places hours, reviews, photos, rating (~20KB)
- `_assets.json` — all object storage URLs for media assets (~10KB)

**Total** — ~400KB. Builder reads structured data, never calls APIs.

## Builder Prompt Philosophy

- **Old** — "Research everything, find images, build the site" (builder wastes 15min on research)
- **New** — "Everything is researched. Every image is profiled. Just build." (builder spends 100% on quality)

Builder instructions:
> "Read `_research.json` for ALL business data. Read `_image_profiles.json` — use EVERY top-pick in its suggested placement. All alt text is pre-written. ALL original content is in `_scraped_content.json` — use it ALL. Brand colors/fonts in `_research.json.brand`."

## Quality Impact

Pre-digested builds produce dramatically better first-time results because:

1. Builder has 100% context from minute 1
2. Image placement is data-driven not guessed
3. Original website content is preserved completely
4. Brand colors are extracted from real assets not hallucinated

## Cost Savings

- Pre-container phases — ~$0.15-0.50 (LLM calls + API queries + Workers AI profiling + GPT Image 2 vision hero pick)
- Container time saved — ~15min ($3-5 of compute)
- **Net savings** — $3-5/build + dramatically higher quality

## Logic Distribution

- Generic methodology (this skill, image-profiling, heartbeat-polling) → public skills repo
- Business-specific prompts (image profiling system prompt, builder instructions, CLAUDE.md template) → private project `prompts/`
- Implementation code (workflow orchestration, API wiring) → private project `src/`
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall