Conversation
…, composite KV keys Three generator observation fixes improve spec quality and reduce noise: - Analytics text now conditional on needsWorkerProxy() — static apps suggest lightweight service vs Worker endpoint - Loading/Offline UX states only shown for dynamic apps — removes noise for display-only and minimal-tier specs - Empty state prompts now context-aware (weather→location, stock→ticker, news→topics) instead of generic Plus analytics enhancement: - Worker now generates composite persona:tier KV keys for cross-dimensional dashboard analysis - New "Persona × Tier matrix" panel shows user segmentation insights - No breaking changes — composite keys are additive Tests: +9 (8 generator observation tests + 1 composite key test) = 128 total All tests pass, linting clean, builds successfully.
…implementation Three new sections guide AI assistants to build locally-testable apps: 1. Development Stages — Shows three-stage progression: - Stage 1 (Local): Mock data only, app works immediately on localhost - Stage 2 (Integration): Wire real APIs after UI approved - Stage 3 (Polish): Analytics, caching, advanced features (optional) 2. Mock Data Template — Auto-generated based on API type: - Weather APIs: location, temp, condition, forecast structure - Stock APIs: ticker, price, change fields - News APIs: title, description, publishedAt fields - Generic: Field names, types, sample values for unknown APIs - Guides downstream AI to generate realistic mock data 3. Local Development Checklist — Pre-flight validation: - Verify app builds/runs with mock data - Test all UX states without real API - Get user approval on design before integrating - Validate data structure matches real API All specs now include Development Stages (consistency). External-data and user-saves-data specs get mock template + checklist. Tests: +11 new tests covering all sections and conditions (139 total) Pattern: "Guidepost" approach — static generator signals intent, downstream AI (Claude) implements with full capability. Fixes the "hard localhost dependencies" problem: Generated specs now explicitly encourage mock-first, integrate-later development.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Specs now guide AI assistants to build locally-testable apps through three major improvements:
Plus: Composite KV keys in analytics + persona×tier dashboard matrix for user segmentation insights.
Changes
Part 1: Generator Observations (Quality)
Part 2: Analytics Enhancement
Part 3: Localhost-First Development
Release Prep
Test Plan
Why This Matters
The Problem: When users generate specs and hand them to Claude to build, the spec might guide building with hard external dependencies from day 1. This blocks local testing.
The Solution: Specs now explicitly signal the "mock-first, integrate-later" pattern. Developers see:
Result: AI-assisted development becomes smoother and more testable.
Ship Readiness