You may ONLY create or edit files within this directory. Do NOT modify anything outside this folder.
- Export a default React component from page.tsx
- Use mock data only (in mockData.ts) — no real APIs, no auth, no databases
- Use Tailwind CSS with design system tokens only — no arbitrary values
- Document design decisions in notes.md
- Follow the SF.gov writing style guide (see .kiro/docs/writing-style-guide.md)
- Follow the SF.gov design system guide (see .kiro/docs/sfgov-design-system-guide.md)
- Import components directly from their file path: import { SiteHeader } from "@/components/SiteHeader"
- Do NOT import from the barrel "@/components" (it pulls in heavy deps)
- Do NOT recreate components that already exist in the codebase
| File | Purpose |
|---|---|
| page.tsx | Default-exported React component |
| mockData.ts | All mock/sample data |
| notes.md | Design decisions and rationale |
| prototype.json | Metadata (do not edit manually) |
| package.json | Workspace marker (add deps here if needed) |
| .kiro/docs/ | Symlinked design guides (always up to date) |
Read these before building — they contain the full component catalog, design tokens, content type patterns, and coding rules:
- .kiro/docs/playground-import-rules.md — READ FIRST. Playground-specific import path rules
- .kiro/docs/sfgov-design-system-guide.md — Complete component catalog, props, patterns, content types, and AI rules
- .kiro/docs/writing-style-guide.md — SF.gov writing conventions for all user-facing text
When the user describes what they want to build:
- Ask follow-up questions — clarify scope, content types, interactions, and edge cases before writing code
- Make a plan — outline the approach (which components, data shape, page structure) and confirm with the user before executing
After completing a piece of work:
- Give review instructions — tell the user specifically what to check (e.g. "Open the prototype at tablet width and verify the heading sizes look correct", "Check that the accordion opens/closes", "Verify the tile links are styled correctly")
- Call out assumptions — if you made choices the user didn't specify, list them so they can confirm or correct
- Read .kiro/docs/sfgov-design-system-guide.md to understand available components and patterns
- Read the existing files in this directory
- Help the user build their prototype using existing components
- When done, update notes.md with design decisions made
- Generate metadata (description + preview image) — see "After Building — Generate Metadata" section below
Once the user has built something meaningful (not just the starter template), do the following:
Update prototype.json and set the "description" field to a concise 1–2 sentence summary of what the prototype demonstrates. Write it from a third-person perspective, e.g.:
"Explores a multi-step permit application flow with progress tracking and inline validation."
Create a file called preview.png in this directory. This should be a representative screenshot or mockup of the prototype's main view. Options:
- If you have access to a screenshot tool, capture the rendered prototype
- Otherwise, create a simple SVG-based placeholder that represents the layout (save as preview.png)
- The image should be roughly 1200×800px and clearly show the prototype's primary UI
Then update prototype.json to add "preview": "preview.png".
The gallery app will pick up both the description and preview automatically on the next manifest regeneration.
While building, watch for differences between what the Figma designs specify and what the code produces. If you notice a discrepancy (wrong spacing, incorrect font size, color mismatch, etc.), log it in:
docs/design-system/discrepancies.md (at the repo root)
Format:
## [Short title]
- **Component**: Which component
- **Issue**: What's wrong
- **Figma spec**: What it should be
- **Code reality**: What it actually does
- **Suggested fix**: How to fix upstream
- **Workaround**: Any temp fix applied
- **Found by**: [your name], [date]
This helps the team clean up the production design system codebase.