@builderos/create-agent-os 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/README.md +39 -0
  2. package/bin/cli.js +133 -0
  3. package/package.json +40 -0
  4. package/src/template/App.tsx +68 -0
  5. package/src/template/agent-os/commands/create-tasks/1-get-spec-requirements.md +19 -0
  6. package/src/template/agent-os/commands/create-tasks/2-create-tasks-list.md +234 -0
  7. package/src/template/agent-os/commands/create-tasks/create-tasks.md +254 -0
  8. package/src/template/agent-os/commands/design-screen/design-screen.md +32 -0
  9. package/src/template/agent-os/commands/design-shell/design-shell.md +34 -0
  10. package/src/template/agent-os/commands/design-tokens/design-tokens.md +36 -0
  11. package/src/template/agent-os/commands/export-product/export-product.md +44 -0
  12. package/src/template/agent-os/commands/implement-tasks/1-determine-tasks.md +13 -0
  13. package/src/template/agent-os/commands/implement-tasks/2-implement-tasks.md +63 -0
  14. package/src/template/agent-os/commands/implement-tasks/3-verify-implementation.md +113 -0
  15. package/src/template/agent-os/commands/implement-tasks/implement-tasks.md +207 -0
  16. package/src/template/agent-os/commands/initialize-design/initialize-design.md +54 -0
  17. package/src/template/agent-os/commands/orchestrate-tasks/orchestrate-tasks.md +180 -0
  18. package/src/template/agent-os/commands/plan-product/1-product-concept.md +53 -0
  19. package/src/template/agent-os/commands/plan-product/2-create-mission.md +78 -0
  20. package/src/template/agent-os/commands/plan-product/3-create-roadmap.md +73 -0
  21. package/src/template/agent-os/commands/plan-product/4-create-tech-stack.md +46 -0
  22. package/src/template/agent-os/commands/plan-product/plan-product.md +241 -0
  23. package/src/template/agent-os/commands/sample-data/sample-data.md +51 -0
  24. package/src/template/agent-os/commands/scaffold-implementation/scaffold-implementation.md +36 -0
  25. package/src/template/agent-os/commands/screenshot-design/screenshot-design.md +21 -0
  26. package/src/template/agent-os/commands/shape-spec/1-initialize-spec.md +95 -0
  27. package/src/template/agent-os/commands/shape-spec/2-shape-spec.md +300 -0
  28. package/src/template/agent-os/commands/shape-spec/shape-spec.md +40 -0
  29. package/src/template/agent-os/commands/write-spec/write-spec.md +134 -0
  30. package/src/template/agent-os/config.yml +13 -0
  31. package/src/template/agent-os/product/mission.md +29 -0
  32. package/src/template/agent-os/product/roadmap.md +9 -0
  33. package/src/template/agent-os/product/tech-stack.md +14 -0
  34. package/src/template/agent-os/specs/README.md +1 -0
  35. package/src/template/agent-os/standards/backend/api.md +10 -0
  36. package/src/template/agent-os/standards/backend/migrations.md +9 -0
  37. package/src/template/agent-os/standards/backend/models.md +10 -0
  38. package/src/template/agent-os/standards/backend/queries.md +9 -0
  39. package/src/template/agent-os/standards/frontend/accessibility.md +10 -0
  40. package/src/template/agent-os/standards/frontend/components.md +11 -0
  41. package/src/template/agent-os/standards/frontend/css.md +7 -0
  42. package/src/template/agent-os/standards/frontend/responsive.md +11 -0
  43. package/src/template/agent-os/standards/global/coding-style.md +10 -0
  44. package/src/template/agent-os/standards/global/commenting.md +5 -0
  45. package/src/template/agent-os/standards/global/conventions.md +11 -0
  46. package/src/template/agent-os/standards/global/error-handling.md +9 -0
  47. package/src/template/agent-os/standards/global/tech-stack.md +31 -0
  48. package/src/template/agent-os/standards/global/validation.md +11 -0
  49. package/src/template/agent-os/standards/testing/test-writing.md +9 -0
  50. package/src/template/agent-os-ui/README.md +73 -0
  51. package/src/template/agent-os-ui/package-lock.json +5028 -0
  52. package/src/template/agent-os-ui/package.json +52 -0
  53. package/src/template/agent-os-ui/postcss.config.js +6 -0
  54. package/src/template/agent-os-ui/src/components/AgentShell.tsx +31 -0
  55. package/src/template/agent-os-ui/src/components/AgentSidebar.tsx +65 -0
  56. package/src/template/agent-os-ui/src/components/GuidanceCard.tsx +75 -0
  57. package/src/template/agent-os-ui/src/components/MarkdownViewer.tsx +25 -0
  58. package/src/template/agent-os-ui/src/components/PromptButton.tsx +28 -0
  59. package/src/template/agent-os-ui/src/components/StatusItem.tsx +45 -0
  60. package/src/template/agent-os-ui/src/components/ThemeToggle.tsx +72 -0
  61. package/src/template/agent-os-ui/src/index.ts +11 -0
  62. package/src/template/agent-os-ui/src/style.css +3 -0
  63. package/src/template/agent-os-ui/tailwind.config.js +50 -0
  64. package/src/template/agent-os-ui/tsconfig.json +33 -0
  65. package/src/template/agent-os-ui/vite.config.ts +32 -0
  66. package/src/template/control-center/backend/backend.log +2 -0
  67. package/src/template/control-center/backend/index.js +228 -0
  68. package/src/template/control-center/backend/package-lock.json +951 -0
  69. package/src/template/control-center/backend/package.json +19 -0
  70. package/src/template/control-center/frontend/README.md +73 -0
  71. package/src/template/control-center/frontend/eslint.config.js +23 -0
  72. package/src/template/control-center/frontend/index.html +21 -0
  73. package/src/template/control-center/frontend/package-lock.json +5752 -0
  74. package/src/template/control-center/frontend/package.json +42 -0
  75. package/src/template/control-center/frontend/public/runtime-config.json +11 -0
  76. package/src/template/control-center/frontend/public/vite.svg +1 -0
  77. package/src/template/control-center/frontend/src/App.css +42 -0
  78. package/src/template/control-center/frontend/src/App.tsx +738 -0
  79. package/src/template/control-center/frontend/src/assets/react.svg +1 -0
  80. package/src/template/control-center/frontend/src/components/ThemeToggle.tsx +64 -0
  81. package/src/template/control-center/frontend/src/components/ui/ToastContext.tsx +81 -0
  82. package/src/template/control-center/frontend/src/index.css +194 -0
  83. package/src/template/control-center/frontend/src/main.tsx +14 -0
  84. package/src/template/control-center/frontend/src/vite-env.d.ts +1 -0
  85. package/src/template/control-center/frontend/tsconfig.app.json +28 -0
  86. package/src/template/control-center/frontend/tsconfig.json +7 -0
  87. package/src/template/control-center/frontend/tsconfig.node.json +26 -0
  88. package/src/template/control-center/frontend/vite.config.ts +22 -0
  89. package/src/template/design/.claude/commands/design-os/data-model.md +122 -0
  90. package/src/template/design/.claude/commands/design-os/design-screen.md +309 -0
  91. package/src/template/design/.claude/commands/design-os/design-shell.md +238 -0
  92. package/src/template/design/.claude/commands/design-os/design-tokens.md +166 -0
  93. package/src/template/design/.claude/commands/design-os/export-product.md +1105 -0
  94. package/src/template/design/.claude/commands/design-os/product-roadmap.md +121 -0
  95. package/src/template/design/.claude/commands/design-os/product-vision.md +99 -0
  96. package/src/template/design/.claude/commands/design-os/sample-data.md +263 -0
  97. package/src/template/design/.claude/commands/design-os/screenshot-design.md +112 -0
  98. package/src/template/design/.claude/commands/design-os/shape-section.md +138 -0
  99. package/src/template/design/.claude/skills/frontend-design/SKILL.md +42 -0
  100. package/src/template/design/.github/CODE_OF_CONDUCT.md +5 -0
  101. package/src/template/design/.github/CONTRIBUTING.md +51 -0
  102. package/src/template/design/.github/ISSUE_TEMPLATE/config.yml +22 -0
  103. package/src/template/design/.github/PULL_REQUEST_TEMPLATE.md +20 -0
  104. package/src/template/design/.github/SECURITY.yml +5 -0
  105. package/src/template/design/.github/SUPPORT.md +19 -0
  106. package/src/template/design/.github/workflows/pr-decline.yml +135 -0
  107. package/src/template/design/.github/workflows/stale.yml +25 -0
  108. package/src/template/design/CHANGELOG.md +13 -0
  109. package/src/template/design/LICENSE +21 -0
  110. package/src/template/design/README.md +54 -0
  111. package/src/template/design/agents.md +218 -0
  112. package/src/template/design/claude.md +1 -0
  113. package/src/template/design/components.json +22 -0
  114. package/src/template/design/docs/codebase-implementation.md +153 -0
  115. package/src/template/design/docs/design-section.md +135 -0
  116. package/src/template/design/docs/export.md +149 -0
  117. package/src/template/design/docs/getting-started.md +59 -0
  118. package/src/template/design/docs/index.md +56 -0
  119. package/src/template/design/docs/product-planning.md +113 -0
  120. package/src/template/design/docs/requirements.md +22 -0
  121. package/src/template/design/docs/usage.md +62 -0
  122. package/src/template/design/eslint.config.js +23 -0
  123. package/src/template/design/index.html +21 -0
  124. package/src/template/design/package-lock.json +5473 -0
  125. package/src/template/design/package.json +47 -0
  126. package/src/template/design/product-plan.zip +0 -0
  127. package/src/template/design/public/vite.svg +1 -0
  128. package/src/template/design/src/assets/react.svg +1 -0
  129. package/src/template/design/src/components/AppLayout.tsx +95 -0
  130. package/src/template/design/src/components/DataCard.tsx +139 -0
  131. package/src/template/design/src/components/DataModelPage.tsx +120 -0
  132. package/src/template/design/src/components/DesignPage.tsx +284 -0
  133. package/src/template/design/src/components/EmptyState.tsx +155 -0
  134. package/src/template/design/src/components/ExportPage.tsx +344 -0
  135. package/src/template/design/src/components/NextPhaseButton.tsx +33 -0
  136. package/src/template/design/src/components/PhaseNav.tsx +152 -0
  137. package/src/template/design/src/components/PhaseWarningBanner.tsx +81 -0
  138. package/src/template/design/src/components/ProductOverviewCard.tsx +102 -0
  139. package/src/template/design/src/components/ProductPage.tsx +97 -0
  140. package/src/template/design/src/components/ScreenDesignPage.tsx +370 -0
  141. package/src/template/design/src/components/ScreenDesignsCard.tsx +49 -0
  142. package/src/template/design/src/components/SectionPage.tsx +256 -0
  143. package/src/template/design/src/components/SectionsCard.tsx +47 -0
  144. package/src/template/design/src/components/SectionsPage.tsx +181 -0
  145. package/src/template/design/src/components/ShellCard.tsx +85 -0
  146. package/src/template/design/src/components/ShellDesignPage.tsx +242 -0
  147. package/src/template/design/src/components/SpecCard.tsx +121 -0
  148. package/src/template/design/src/components/StepIndicator.tsx +75 -0
  149. package/src/template/design/src/components/ThemeToggle.tsx +86 -0
  150. package/src/template/design/src/components/ui/ToastContext.tsx +81 -0
  151. package/src/template/design/src/components/ui/avatar.tsx +53 -0
  152. package/src/template/design/src/components/ui/badge.tsx +46 -0
  153. package/src/template/design/src/components/ui/button.tsx +60 -0
  154. package/src/template/design/src/components/ui/card.tsx +92 -0
  155. package/src/template/design/src/components/ui/collapsible.tsx +48 -0
  156. package/src/template/design/src/components/ui/dialog.tsx +143 -0
  157. package/src/template/design/src/components/ui/dropdown-menu.tsx +255 -0
  158. package/src/template/design/src/components/ui/input.tsx +21 -0
  159. package/src/template/design/src/components/ui/label.tsx +22 -0
  160. package/src/template/design/src/components/ui/progress.tsx +24 -0
  161. package/src/template/design/src/components/ui/scroll-area.tsx +18 -0
  162. package/src/template/design/src/components/ui/select.tsx +67 -0
  163. package/src/template/design/src/components/ui/separator.tsx +28 -0
  164. package/src/template/design/src/components/ui/sheet.tsx +137 -0
  165. package/src/template/design/src/components/ui/skeleton.tsx +13 -0
  166. package/src/template/design/src/components/ui/switch.tsx +46 -0
  167. package/src/template/design/src/components/ui/table.tsx +116 -0
  168. package/src/template/design/src/components/ui/tabs.tsx +64 -0
  169. package/src/template/design/src/index.css +284 -0
  170. package/src/template/design/src/lib/data-model-loader.ts +91 -0
  171. package/src/template/design/src/lib/design-system-loader.ts +101 -0
  172. package/src/template/design/src/lib/product-loader.ts +221 -0
  173. package/src/template/design/src/lib/router.tsx +52 -0
  174. package/src/template/design/src/lib/section-loader.ts +272 -0
  175. package/src/template/design/src/lib/shell-loader.ts +175 -0
  176. package/src/template/design/src/lib/utils.ts +6 -0
  177. package/src/template/design/src/main.tsx +15 -0
  178. package/src/template/design/src/sections/.gitkeep +0 -0
  179. package/src/template/design/src/sections/ai-orchestration-engine-oai/OrchestrationEngine.tsx +348 -0
  180. package/src/template/design/src/sections/core-platform-shell/AppShell.tsx +403 -0
  181. package/src/template/design/src/sections/gemini-live-integration/GeminiIntegration.tsx +332 -0
  182. package/src/template/design/src/sections/interactive-2d-canvas/WhiteboardCanvas.tsx +334 -0
  183. package/src/template/design/src/sections/participation-equity-tracker/EquityTracker.tsx +383 -0
  184. package/src/template/design/src/sections/persistent-memory-system/PersistentMemory.tsx +308 -0
  185. package/src/template/design/src/sections/real-time-communication-layer/VideoSession.tsx +342 -0
  186. package/src/template/design/src/sections/visual-intelligence-agents/VisualAgents.tsx +311 -0
  187. package/src/template/design/src/types/product.ts +97 -0
  188. package/src/template/design/src/types/section.ts +33 -0
  189. package/src/template/design/tsconfig.app.json +34 -0
  190. package/src/template/design/tsconfig.json +13 -0
  191. package/src/template/design/tsconfig.node.json +26 -0
  192. package/src/template/design/vite.config.ts +18 -0
  193. package/src/template/package.json +27 -0
  194. package/src/template/vite.config.ts +16 -0
@@ -0,0 +1,1105 @@
1
+ # Export Product
2
+
3
+ You are helping the user export their complete product design as a handoff package for implementation. This generates all files needed to build the product in a real codebase.
4
+
5
+ ## Step 1: Check Prerequisites
6
+
7
+ Verify the minimum requirements exist:
8
+
9
+ **Required:**
10
+ - `/product/product-overview.md` — Product overview
11
+ - `/product/product-roadmap.md` — Sections defined
12
+ - At least one section with screen designs in `src/sections/[section-id]/`
13
+
14
+ **Recommended (show warning if missing):**
15
+ - `/product/data-model/data-model.md` — Global data model
16
+ - `/product/design-system/colors.json` — Color tokens
17
+ - `/product/design-system/typography.json` — Typography tokens
18
+ - `src/shell/components/AppShell.tsx` — Application shell
19
+
20
+ If required files are missing:
21
+
22
+ "To export your product, you need at minimum:
23
+ - A product overview (`/product-vision`)
24
+ - A roadmap with sections (`/product-roadmap`)
25
+ - At least one section with screen designs
26
+
27
+ Please complete these first."
28
+
29
+ Stop here if required files are missing.
30
+
31
+ If recommended files are missing, show warnings but continue:
32
+
33
+ "Note: Some recommended items are missing:
34
+ - [ ] Data model — Run `/data-model` for consistent entity definitions
35
+ - [ ] Design tokens — Run `/design-tokens` for consistent styling
36
+ - [ ] Application shell — Run `/design-shell` for navigation structure
37
+
38
+ You can proceed without these, but they help ensure a complete handoff."
39
+
40
+ ## Step 2: Gather Export Information
41
+
42
+ Read all relevant files:
43
+
44
+ 1. `/product/product-overview.md` — Product name, description, features
45
+ 2. `/product/product-roadmap.md` — List of sections in order
46
+ 3. `/product/data-model/data-model.md` (if exists)
47
+ 4. `/product/design-system/colors.json` (if exists)
48
+ 5. `/product/design-system/typography.json` (if exists)
49
+ 6. `/product/shell/spec.md` (if exists)
50
+ 7. For each section: `spec.md`, `data.json`, `types.ts`
51
+ 8. List screen design components in `src/sections/` and `src/shell/`
52
+
53
+ ## Step 3: Create Export Directory Structure
54
+
55
+ Create the `product-plan/` directory with this structure:
56
+
57
+ ```
58
+ product-plan/
59
+ ├── README.md # Quick start guide
60
+ ├── product-overview.md # Product summary (always provide)
61
+
62
+ ├── prompts/ # Ready-to-use prompts for coding agents
63
+ │ ├── one-shot-prompt.md # Prompt for full implementation
64
+ │ └── section-prompt.md # Prompt template for section-by-section
65
+
66
+ ├── instructions/ # Implementation instructions
67
+ │ ├── one-shot-instructions.md # All milestones combined
68
+ │ └── incremental/ # For milestone-by-milestone implementation
69
+ │ ├── 01-foundation.md
70
+ │ ├── 02-[first-section].md
71
+ │ ├── 03-[second-section].md
72
+ │ └── ...
73
+
74
+ ├── design-system/ # Design tokens
75
+ │ ├── tokens.css
76
+ │ ├── tailwind-colors.md
77
+ │ └── fonts.md
78
+
79
+ ├── data-model/ # Data model
80
+ │ ├── README.md
81
+ │ ├── types.ts
82
+ │ └── sample-data.json
83
+
84
+ ├── shell/ # Shell components
85
+ │ ├── README.md
86
+ │ ├── components/
87
+ │ │ ├── AppShell.tsx
88
+ │ │ ├── MainNav.tsx
89
+ │ │ ├── UserMenu.tsx
90
+ │ │ └── index.ts
91
+ │ └── screenshot.png (if exists)
92
+
93
+ └── sections/ # Section components
94
+ └── [section-id]/
95
+ ├── README.md
96
+ ├── tests.md # Test-writing instructions for TDD
97
+ ├── components/
98
+ │ ├── [Component].tsx
99
+ │ └── index.ts
100
+ ├── types.ts
101
+ ├── sample-data.json
102
+ └── screenshot.png (if exists)
103
+ ```
104
+
105
+ ## Step 4: Generate product-overview.md
106
+
107
+ Create `product-plan/product-overview.md`:
108
+
109
+ ```markdown
110
+ # [Product Name] — Product Overview
111
+
112
+ ## Summary
113
+
114
+ [Product description from product-overview.md]
115
+
116
+ ## Planned Sections
117
+
118
+ [Ordered list of sections from roadmap with descriptions]
119
+
120
+ 1. **[Section 1]** — [Description]
121
+ 2. **[Section 2]** — [Description]
122
+ ...
123
+
124
+ ## Data Model
125
+
126
+ [If data model exists: list entity names]
127
+ [If not: "Data model to be defined during implementation"]
128
+
129
+ ## Design System
130
+
131
+ **Colors:**
132
+ - Primary: [color or "Not defined"]
133
+ - Secondary: [color or "Not defined"]
134
+ - Neutral: [color or "Not defined"]
135
+
136
+ **Typography:**
137
+ - Heading: [font or "Not defined"]
138
+ - Body: [font or "Not defined"]
139
+ - Mono: [font or "Not defined"]
140
+
141
+ ## Implementation Sequence
142
+
143
+ Build this product in milestones:
144
+
145
+ 1. **Foundation** — Set up design tokens, data model types, and application shell
146
+ 2. **[Section 1]** — [Brief description]
147
+ 3. **[Section 2]** — [Brief description]
148
+ ...
149
+
150
+ Each milestone has a dedicated instruction document in `product-plan/instructions/`.
151
+ ```
152
+
153
+ ## Step 5: Generate Milestone Instructions
154
+
155
+ Each milestone instruction file should begin with the following preamble (adapt the milestone-specific details):
156
+
157
+ ```markdown
158
+ ---
159
+
160
+ ## About These Instructions
161
+
162
+ **What you're receiving:**
163
+ - Finished UI designs (React components with full styling)
164
+ - Data model definitions (TypeScript types and sample data)
165
+ - UI/UX specifications (user flows, requirements, screenshots)
166
+ - Design system tokens (colors, typography, spacing)
167
+ - Test-writing instructions for each section (for TDD approach)
168
+
169
+ **What you need to build:**
170
+ - Backend API endpoints and database schema
171
+ - Authentication and authorization
172
+ - Data fetching and state management
173
+ - Business logic and validation
174
+ - Integration of the provided UI components with real data
175
+
176
+ **Important guidelines:**
177
+ - **DO NOT** redesign or restyle the provided components — use them as-is
178
+ - **DO** wire up the callback props to your routing and API calls
179
+ - **DO** replace sample data with real data from your backend
180
+ - **DO** implement proper error handling and loading states
181
+ - **DO** implement empty states when no records exist (first-time users, after deletions)
182
+ - **DO** use test-driven development — write tests first using `tests.md` instructions
183
+ - The components are props-based and ready to integrate — focus on the backend and data layer
184
+
185
+ ---
186
+ ```
187
+
188
+ ### 01-foundation.md
189
+
190
+ Place in `product-plan/instructions/incremental/01-foundation.md`:
191
+
192
+ ```markdown
193
+ # Milestone 1: Foundation
194
+
195
+ > **Provide alongside:** `product-overview.md`
196
+ > **Prerequisites:** None
197
+
198
+ [Include the preamble above]
199
+
200
+ ## Goal
201
+
202
+ Set up the foundational elements: design tokens, data model types, routing structure, and application shell.
203
+
204
+ ## What to Implement
205
+
206
+ ### 1. Design Tokens
207
+
208
+ [If design tokens exist:]
209
+ Configure your styling system with these tokens:
210
+
211
+ - See `product-plan/design-system/tokens.css` for CSS custom properties
212
+ - See `product-plan/design-system/tailwind-colors.md` for Tailwind configuration
213
+ - See `product-plan/design-system/fonts.md` for Google Fonts setup
214
+
215
+ [If not:]
216
+ Define your own design tokens based on your brand guidelines.
217
+
218
+ ### 2. Data Model Types
219
+
220
+ [If data model exists:]
221
+ Create TypeScript interfaces for your core entities:
222
+
223
+ - See `product-plan/data-model/types.ts` for interface definitions
224
+ - See `product-plan/data-model/README.md` for entity relationships
225
+
226
+ [If not:]
227
+ Define data types as you implement each section.
228
+
229
+ ### 3. Routing Structure
230
+
231
+ Create placeholder routes for each section:
232
+
233
+ [List routes based on roadmap sections]
234
+
235
+ ### 4. Application Shell
236
+
237
+ [If shell exists:]
238
+
239
+ Copy the shell components from `product-plan/shell/components/` to your project:
240
+
241
+ - `AppShell.tsx` — Main layout wrapper
242
+ - `MainNav.tsx` — Navigation component
243
+ - `UserMenu.tsx` — User menu with avatar
244
+
245
+ **Wire Up Navigation:**
246
+
247
+ Connect navigation to your routing:
248
+
249
+ [List nav items from shell spec]
250
+
251
+ **User Menu:**
252
+
253
+ The user menu expects:
254
+ - User name
255
+ - Avatar URL (optional)
256
+ - Logout callback
257
+
258
+ [If shell doesn't exist:]
259
+
260
+ Design and implement your own application shell with:
261
+ - Navigation for all sections
262
+ - User menu
263
+ - Responsive layout
264
+
265
+ ## Files to Reference
266
+
267
+ - `product-plan/design-system/` — Design tokens
268
+ - `product-plan/data-model/` — Type definitions
269
+ - `product-plan/shell/README.md` — Shell design intent
270
+ - `product-plan/shell/components/` — Shell React components
271
+ - `product-plan/shell/screenshot.png` — Shell visual reference
272
+
273
+ ## Done When
274
+
275
+ - [ ] Design tokens are configured
276
+ - [ ] Data model types are defined
277
+ - [ ] Routes exist for all sections (can be placeholder pages)
278
+ - [ ] Shell renders with navigation
279
+ - [ ] Navigation links to correct routes
280
+ - [ ] User menu shows user info
281
+ - [ ] Responsive on mobile
282
+ ```
283
+
284
+ ### [NN]-[section-id].md (for each section)
285
+
286
+ Place in `product-plan/instructions/incremental/[NN]-[section-id].md` (starting at 02 for the first section):
287
+
288
+ ```markdown
289
+ # Milestone [N]: [Section Title]
290
+
291
+ > **Provide alongside:** `product-overview.md`
292
+ > **Prerequisites:** Milestone 1 (Foundation) complete, plus any prior section milestones
293
+
294
+ ## Goal
295
+
296
+ Implement the [Section Title] feature — [brief description from roadmap].
297
+
298
+ ## Overview
299
+
300
+ [One paragraph describing what this section enables users to do. Focus on the user's perspective and the value they get from this feature. Extract from spec.md overview.]
301
+
302
+ **Key Functionality:**
303
+ - [Bullet point 1 — e.g., "View a list of all projects with status indicators"]
304
+ - [Bullet point 2 — e.g., "Create new projects with name, description, and due date"]
305
+ - [Bullet point 3 — e.g., "Edit existing project details inline"]
306
+ - [Bullet point 4 — e.g., "Delete projects with confirmation"]
307
+ - [Bullet point 5 — e.g., "Filter projects by status or search by name"]
308
+
309
+ [List 3-6 key capabilities that the UI components support and need backend wiring]
310
+
311
+ ## Recommended Approach: Test-Driven Development
312
+
313
+ Before implementing this section, **write tests first** based on the test specifications provided.
314
+
315
+ See `product-plan/sections/[section-id]/tests.md` for detailed test-writing instructions including:
316
+ - Key user flows to test (success and failure paths)
317
+ - Specific UI elements, button labels, and interactions to verify
318
+ - Expected behaviors and assertions
319
+
320
+ The test instructions are framework-agnostic — adapt them to your testing setup (Jest, Vitest, Playwright, Cypress, RSpec, Minitest, PHPUnit, etc.).
321
+
322
+ **TDD Workflow:**
323
+ 1. Read `tests.md` and write failing tests for the key user flows
324
+ 2. Implement the feature to make tests pass
325
+ 3. Refactor while keeping tests green
326
+
327
+ ## What to Implement
328
+
329
+ ### Components
330
+
331
+ Copy the section components from `product-plan/sections/[section-id]/components/`:
332
+
333
+ [List components]
334
+
335
+ ### Data Layer
336
+
337
+ The components expect these data shapes:
338
+
339
+ [Key types from types.ts]
340
+
341
+ You'll need to:
342
+ - Create API endpoints or data fetching logic
343
+ - Connect real data to the components
344
+
345
+ ### Callbacks
346
+
347
+ Wire up these user actions:
348
+
349
+ [List callbacks from Props interface with descriptions]
350
+
351
+ ### Empty States
352
+
353
+ Implement empty state UI for when no records exist yet:
354
+
355
+ - **No data yet:** Show a helpful message and call-to-action when the primary list/collection is empty
356
+ - **No related records:** Handle cases where associated records don't exist (e.g., a project with no tasks)
357
+ - **First-time user experience:** Guide users to create their first item with clear CTAs
358
+
359
+ The provided components include empty state designs — make sure to render them when data is empty rather than showing blank screens.
360
+
361
+ ## Files to Reference
362
+
363
+ - `product-plan/sections/[section-id]/README.md` — Feature overview and design intent
364
+ - `product-plan/sections/[section-id]/tests.md` — Test-writing instructions (use for TDD)
365
+ - `product-plan/sections/[section-id]/components/` — React components
366
+ - `product-plan/sections/[section-id]/types.ts` — TypeScript interfaces
367
+ - `product-plan/sections/[section-id]/sample-data.json` — Test data
368
+ - `product-plan/sections/[section-id]/screenshot.png` — Visual reference
369
+
370
+ ## Expected User Flows
371
+
372
+ When fully implemented, users should be able to complete these flows:
373
+
374
+ ### Flow 1: [Primary Flow Name — e.g., "Create a New Project"]
375
+
376
+ 1. User [starting action — e.g., "clicks 'New Project' button"]
377
+ 2. User [next step — e.g., "fills in project name and description"]
378
+ 3. User [next step — e.g., "clicks 'Create' to save"]
379
+ 4. **Outcome:** [Expected result — e.g., "New project appears in the list, success message shown"]
380
+
381
+ ### Flow 2: [Secondary Flow Name — e.g., "Edit an Existing Project"]
382
+
383
+ 1. User [starting action — e.g., "clicks on a project row"]
384
+ 2. User [next step — e.g., "modifies the project details"]
385
+ 3. User [next step — e.g., "clicks 'Save' to confirm changes"]
386
+ 4. **Outcome:** [Expected result — e.g., "Project updates in place, changes persisted"]
387
+
388
+ ### Flow 3: [Additional Flow — e.g., "Delete a Project"]
389
+
390
+ 1. User [starting action — e.g., "clicks delete icon on a project"]
391
+ 2. User [next step — e.g., "confirms deletion in the modal"]
392
+ 3. **Outcome:** [Expected result — e.g., "Project removed from list, empty state shown if last item"]
393
+
394
+ [Include 2-4 flows covering the main user journeys in this section. Reference the specific UI elements and button labels from the components.]
395
+
396
+ ## Done When
397
+
398
+ - [ ] Tests written for key user flows (success and failure paths)
399
+ - [ ] All tests pass
400
+ - [ ] Components render with real data
401
+ - [ ] Empty states display properly when no records exist
402
+ - [ ] All user actions work
403
+ - [ ] User can complete all expected flows end-to-end
404
+ - [ ] Matches the visual design
405
+ - [ ] Responsive on mobile
406
+ ```
407
+
408
+ ## Step 6: Generate one-shot-instructions.md
409
+
410
+ Create `product-plan/instructions/one-shot-instructions.md` by combining all milestone content into a single document. Include the preamble at the very top:
411
+
412
+ ```markdown
413
+ # [Product Name] — Complete Implementation Instructions
414
+
415
+ ---
416
+
417
+ ## About These Instructions
418
+
419
+ **What you're receiving:**
420
+ - Finished UI designs (React components with full styling)
421
+ - Data model definitions (TypeScript types and sample data)
422
+ - UI/UX specifications (user flows, requirements, screenshots)
423
+ - Design system tokens (colors, typography, spacing)
424
+ - Test-writing instructions for each section (for TDD approach)
425
+
426
+ **What you need to build:**
427
+ - Backend API endpoints and database schema
428
+ - Authentication and authorization
429
+ - Data fetching and state management
430
+ - Business logic and validation
431
+ - Integration of the provided UI components with real data
432
+
433
+ **Important guidelines:**
434
+ - **DO NOT** redesign or restyle the provided components — use them as-is
435
+ - **DO** wire up the callback props to your routing and API calls
436
+ - **DO** replace sample data with real data from your backend
437
+ - **DO** implement proper error handling and loading states
438
+ - **DO** implement empty states when no records exist (first-time users, after deletions)
439
+ - **DO** use test-driven development — write tests first using `tests.md` instructions
440
+ - The components are props-based and ready to integrate — focus on the backend and data layer
441
+
442
+ ---
443
+
444
+ ## Test-Driven Development
445
+
446
+ Each section includes a `tests.md` file with detailed test-writing instructions. These are **framework-agnostic** — adapt them to your testing setup (Jest, Vitest, Playwright, Cypress, RSpec, Minitest, PHPUnit, etc.).
447
+
448
+ **For each section:**
449
+ 1. Read `product-plan/sections/[section-id]/tests.md`
450
+ 2. Write failing tests for key user flows (success and failure paths)
451
+ 3. Implement the feature to make tests pass
452
+ 4. Refactor while keeping tests green
453
+
454
+ The test instructions include:
455
+ - Specific UI elements, button labels, and interactions to verify
456
+ - Expected success and failure behaviors
457
+ - Empty state handling (when no records exist yet)
458
+ - Data assertions and state validations
459
+
460
+ ---
461
+
462
+ [Include product-overview.md content]
463
+
464
+ ---
465
+
466
+ # Milestone 1: Foundation
467
+
468
+ [Include 01-foundation.md content WITHOUT the preamble — it's already at the top. This includes design tokens, data model, routing, AND application shell.]
469
+
470
+ ---
471
+
472
+ # Milestone 2: [First Section Name]
473
+
474
+ [Include first section handoff content WITHOUT the preamble]
475
+
476
+ ---
477
+
478
+ # Milestone 3: [Second Section Name]
479
+
480
+ [Include second section handoff content WITHOUT the preamble]
481
+
482
+ [Repeat for all sections, incrementing milestone numbers]
483
+ ```
484
+
485
+ ## Step 7: Copy and Transform Components
486
+
487
+ ### Shell Components
488
+
489
+ Copy from `src/shell/components/` to `product-plan/shell/components/`:
490
+
491
+ - Transform import paths from `@/...` to relative paths
492
+ - Remove any Design OS-specific imports
493
+ - Ensure components are self-contained
494
+
495
+ ### Section Components
496
+
497
+ For each section, copy from `src/sections/[section-id]/components/` to `product-plan/sections/[section-id]/components/`:
498
+
499
+ - Transform import paths:
500
+ - `@/../product/sections/[section-id]/types` → `../types`
501
+ - Remove Design OS-specific imports
502
+ - Keep only the exportable components (not preview wrappers)
503
+
504
+ ### Types Files
505
+
506
+ Copy `product/sections/[section-id]/types.ts` to `product-plan/sections/[section-id]/types.ts`
507
+
508
+ ### Sample Data
509
+
510
+ Copy `product/sections/[section-id]/data.json` to `product-plan/sections/[section-id]/sample-data.json`
511
+
512
+ ## Step 8: Generate Section READMEs
513
+
514
+ For each section, create `product-plan/sections/[section-id]/README.md`:
515
+
516
+ ```markdown
517
+ # [Section Title]
518
+
519
+ ## Overview
520
+
521
+ [From spec.md overview]
522
+
523
+ ## User Flows
524
+
525
+ [From spec.md user flows]
526
+
527
+ ## Design Decisions
528
+
529
+ [Notable design choices from the screen design]
530
+
531
+ ## Data Used
532
+
533
+ **Entities:** [List entities from types.ts]
534
+
535
+ **From global model:** [Which entities from data model are used]
536
+
537
+ ## Visual Reference
538
+
539
+ See `screenshot.png` for the target UI design.
540
+
541
+ ## Components Provided
542
+
543
+ - `[Component]` — [Brief description]
544
+ - `[SubComponent]` — [Brief description]
545
+
546
+ ## Callback Props
547
+
548
+ | Callback | Description |
549
+ |----------|-------------|
550
+ | `onView` | Called when user clicks to view details |
551
+ | `onEdit` | Called when user clicks to edit |
552
+ | `onDelete` | Called when user clicks to delete |
553
+ | `onCreate` | Called when user clicks to create new |
554
+
555
+ [Adjust based on actual Props interface]
556
+ ```
557
+
558
+ ## Step 9: Generate Section Test Instructions
559
+
560
+ For each section, create `product-plan/sections/[section-id]/tests.md` with detailed test-writing instructions based on the section's spec, user flows, and UI design.
561
+
562
+ ```markdown
563
+ # Test Instructions: [Section Title]
564
+
565
+ These test-writing instructions are **framework-agnostic**. Adapt them to your testing setup (Jest, Vitest, Playwright, Cypress, React Testing Library, RSpec, Minitest, PHPUnit, etc.).
566
+
567
+ ## Overview
568
+
569
+ [Brief description of what this section does and the key functionality to test]
570
+
571
+ ---
572
+
573
+ ## User Flow Tests
574
+
575
+ ### Flow 1: [Primary User Flow Name]
576
+
577
+ **Scenario:** [Describe what the user is trying to accomplish]
578
+
579
+ #### Success Path
580
+
581
+ **Setup:**
582
+ - [Preconditions - what state the app should be in]
583
+ - [Sample data to use - reference types from types.ts]
584
+
585
+ **Steps:**
586
+ 1. User navigates to [page/route]
587
+ 2. User sees [specific UI element - be specific about labels, text]
588
+ 3. User clicks [specific button/link with exact label]
589
+ 4. User enters [specific data in specific field]
590
+ 5. User clicks [submit button with exact label]
591
+
592
+ **Expected Results:**
593
+ - [ ] [Specific UI change - e.g., "Success toast appears with message 'Item created'"]
594
+ - [ ] [Data assertion - e.g., "New item appears in the list"]
595
+ - [ ] [State change - e.g., "Form is cleared and reset to initial state"]
596
+ - [ ] [Navigation - e.g., "User is redirected to /items/:id"]
597
+
598
+ #### Failure Path: [Specific Failure Scenario]
599
+
600
+ **Setup:**
601
+ - [Conditions that will cause failure - e.g., "Server returns 500 error"]
602
+
603
+ **Steps:**
604
+ 1. [Same steps as success path, or modified steps]
605
+
606
+ **Expected Results:**
607
+ - [ ] [Error handling - e.g., "Error message appears: 'Unable to save. Please try again.'"]
608
+ - [ ] [UI state - e.g., "Form data is preserved, not cleared"]
609
+ - [ ] [User can retry - e.g., "Submit button remains enabled"]
610
+
611
+ #### Failure Path: [Validation Error]
612
+
613
+ **Setup:**
614
+ - [Conditions - e.g., "User submits empty required field"]
615
+
616
+ **Steps:**
617
+ 1. User leaves [specific field] empty
618
+ 2. User clicks [submit button]
619
+
620
+ **Expected Results:**
621
+ - [ ] [Validation message - e.g., "Field shows error: 'Name is required'"]
622
+ - [ ] [Form state - e.g., "Form is not submitted"]
623
+ - [ ] [Focus - e.g., "Focus moves to first invalid field"]
624
+
625
+ ---
626
+
627
+ ### Flow 2: [Secondary User Flow Name]
628
+
629
+ [Repeat the same structure for additional flows]
630
+
631
+ ---
632
+
633
+ ## Empty State Tests
634
+
635
+ Empty states are critical for first-time users and when records are deleted. Test these thoroughly:
636
+
637
+ ### Primary Empty State
638
+
639
+ **Scenario:** User has no [primary records] yet (first-time or all deleted)
640
+
641
+ **Setup:**
642
+ - [Primary data collection] is empty (`[]`)
643
+
644
+ **Expected Results:**
645
+ - [ ] [Empty state message is visible - e.g., "Shows heading 'No projects yet'"]
646
+ - [ ] [Helpful description - e.g., "Shows text 'Create your first project to get started'"]
647
+ - [ ] [Primary CTA is visible - e.g., "Shows button 'Create Project'"]
648
+ - [ ] [CTA is functional - e.g., "Clicking 'Create Project' opens the create form/modal"]
649
+ - [ ] [No blank screen - The UI is helpful, not empty or broken]
650
+
651
+ ### Related Records Empty State
652
+
653
+ **Scenario:** A [parent record] exists but has no [child records] yet
654
+
655
+ **Setup:**
656
+ - [Parent record] exists with valid data
657
+ - [Child records collection] is empty (`[]`)
658
+
659
+ **Expected Results:**
660
+ - [ ] [Parent renders correctly with its data]
661
+ - [ ] [Child section shows empty state - e.g., "Shows 'No tasks yet' in the tasks panel"]
662
+ - [ ] [CTA to add child record - e.g., "Shows 'Add Task' button"]
663
+ - [ ] [No broken layouts or missing sections]
664
+
665
+ ### Filtered/Search Empty State
666
+
667
+ **Scenario:** User applies filters or search that returns no results
668
+
669
+ **Setup:**
670
+ - Data exists but filter/search matches nothing
671
+
672
+ **Expected Results:**
673
+ - [ ] [Clear message - e.g., "Shows 'No results found'"]
674
+ - [ ] [Guidance - e.g., "Shows 'Try adjusting your filters' or similar"]
675
+ - [ ] [Reset option - e.g., "Shows 'Clear filters' link"]
676
+
677
+ ---
678
+
679
+ ## Component Interaction Tests
680
+
681
+ ### [Component Name]
682
+
683
+ **Renders correctly:**
684
+ - [ ] [Specific element is visible - e.g., "Displays item title 'Sample Item'"]
685
+ - [ ] [Data display - e.g., "Shows formatted date 'Dec 12, 2025'"]
686
+
687
+ **User interactions:**
688
+ - [ ] [Click behavior - e.g., "Clicking 'Edit' button calls onEdit with item id"]
689
+ - [ ] [Hover behavior - e.g., "Hovering row shows action buttons"]
690
+ - [ ] [Keyboard - e.g., "Pressing Escape closes the modal"]
691
+
692
+ **Loading and error states:**
693
+ - [ ] [Loading - e.g., "Shows skeleton loader while data is fetching"]
694
+ - [ ] [Error - e.g., "Shows error message when data fails to load"]
695
+
696
+ ---
697
+
698
+ ## Edge Cases
699
+
700
+ - [ ] [Edge case 1 - e.g., "Handles very long item names with text truncation"]
701
+ - [ ] [Edge case 2 - e.g., "Works correctly with 1 item and 100+ items"]
702
+ - [ ] [Edge case 3 - e.g., "Preserves data when navigating away and back"]
703
+ - [ ] [Transition from empty to populated - e.g., "After creating first item, list renders correctly"]
704
+ - [ ] [Transition from populated to empty - e.g., "After deleting last item, empty state appears"]
705
+
706
+ ---
707
+
708
+ ## Accessibility Checks
709
+
710
+ - [ ] [All interactive elements are keyboard accessible]
711
+ - [ ] [Form fields have associated labels]
712
+ - [ ] [Error messages are announced to screen readers]
713
+ - [ ] [Focus is managed appropriately after actions]
714
+
715
+ ---
716
+
717
+ ## Sample Test Data
718
+
719
+ Use the data from `sample-data.json` or create variations:
720
+
721
+ [Include 2-3 example data objects based on types.ts that tests can use]
722
+
723
+ ```typescript
724
+ // Example test data - populated state
725
+ const mockItem = {
726
+ id: "test-1",
727
+ name: "Test Item",
728
+ // ... other fields from types.ts
729
+ };
730
+
731
+ const mockItems = [mockItem, /* ... more items */];
732
+
733
+ // Example test data - empty states
734
+ const mockEmptyList = [];
735
+
736
+ const mockItemWithNoChildren = {
737
+ id: "test-1",
738
+ name: "Test Item",
739
+ children: [], // No related records
740
+ };
741
+
742
+ // Example test data - error states
743
+ const mockErrorResponse = {
744
+ status: 500,
745
+ message: "Internal server error"
746
+ };
747
+ ```
748
+
749
+ ---
750
+
751
+ ## Notes for Test Implementation
752
+
753
+ - Mock API calls to test both success and failure scenarios
754
+ - Test each callback prop is called with correct arguments
755
+ - Verify UI updates optimistically where appropriate
756
+ - Test that loading states appear during async operations
757
+ - Ensure error boundaries catch and display errors gracefully
758
+ - **Always test empty states** — Pass empty arrays to verify helpful empty state UI appears (not blank screens)
759
+ - Test transitions: empty → first item created, last item deleted → empty state returns
760
+ ```
761
+
762
+ ### Guidelines for Writing tests.md
763
+
764
+ When generating tests.md for each section:
765
+
766
+ 1. **Read the spec.md thoroughly** — Extract all user flows and requirements
767
+ 2. **Study the screen design components** — Note exact button labels, field names, UI text
768
+ 3. **Review types.ts** — Understand the data shapes for assertions
769
+ 4. **Include specific UI text** — Tests should verify exact labels, messages, placeholders
770
+ 5. **Cover success and failure paths** — Every action should have both tested
771
+ 6. **Always test empty states** — Primary lists with no items, parent records with no children, filtered results with no matches
772
+ 7. **Be specific about assertions** — "Shows error" is too vague; "Shows red border and message 'Email is required' below the field" is specific
773
+ 8. **Include edge cases** — Boundary conditions, transitions between empty and populated states
774
+ 9. **Stay framework-agnostic** — Describe WHAT to test, not HOW to write the test code
775
+
776
+ ## Step 10: Generate Design System Files
777
+
778
+ ### tokens.css
779
+
780
+ ```css
781
+ /* Design Tokens for [Product Name] */
782
+
783
+ :root {
784
+ /* Colors */
785
+ --color-primary: [Tailwind color];
786
+ --color-secondary: [Tailwind color];
787
+ --color-neutral: [Tailwind color];
788
+
789
+ /* Typography */
790
+ --font-heading: '[Heading Font]', sans-serif;
791
+ --font-body: '[Body Font]', sans-serif;
792
+ --font-mono: '[Mono Font]', monospace;
793
+ }
794
+ ```
795
+
796
+ ### tailwind-colors.md
797
+
798
+ ```markdown
799
+ # Tailwind Color Configuration
800
+
801
+ ## Color Choices
802
+
803
+ - **Primary:** `[color]` — Used for buttons, links, key accents
804
+ - **Secondary:** `[color]` — Used for tags, highlights, secondary elements
805
+ - **Neutral:** `[color]` — Used for backgrounds, text, borders
806
+
807
+ ## Usage Examples
808
+
809
+ Primary button: `bg-[primary]-600 hover:bg-[primary]-700 text-white`
810
+ Secondary badge: `bg-[secondary]-100 text-[secondary]-800`
811
+ Neutral text: `text-[neutral]-600 dark:text-[neutral]-400`
812
+ ```
813
+
814
+ ### fonts.md
815
+
816
+ ```markdown
817
+ # Typography Configuration
818
+
819
+ ## Google Fonts Import
820
+
821
+ Add to your HTML `<head>` or CSS:
822
+
823
+ ```html
824
+ <link rel="preconnect" href="https://fonts.googleapis.com">
825
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
826
+ <link href="https://fonts.googleapis.com/css2?family=[Heading+Font]&family=[Body+Font]&family=[Mono+Font]&display=swap" rel="stylesheet">
827
+ ```
828
+
829
+ ## Font Usage
830
+
831
+ - **Headings:** [Heading Font]
832
+ - **Body text:** [Body Font]
833
+ - **Code/technical:** [Mono Font]
834
+ ```
835
+
836
+ ## Step 11: Generate Prompt Files
837
+
838
+ Create the `product-plan/prompts/` directory with two ready-to-use prompt files.
839
+
840
+ ### one-shot-prompt.md
841
+
842
+ Create `product-plan/prompts/one-shot-prompt.md`:
843
+
844
+ ```markdown
845
+ # One-Shot Implementation Prompt
846
+
847
+ I need you to implement a complete web application based on detailed design specifications and UI components I'm providing.
848
+
849
+ ## Instructions
850
+
851
+ Please carefully read and analyze the following files:
852
+
853
+ 1. **@product-plan/product-overview.md** — Product summary with sections and data model overview
854
+ 2. **@product-plan/instructions/one-shot-instructions.md** — Complete implementation instructions for all milestones
855
+
856
+ After reading these, also review:
857
+ - **@product-plan/design-system/** — Color and typography tokens
858
+ - **@product-plan/data-model/** — Entity types and relationships
859
+ - **@product-plan/shell/** — Application shell components
860
+ - **@product-plan/sections/** — All section components, types, sample data, and test instructions
861
+
862
+ ## Before You Begin
863
+
864
+ Please ask me clarifying questions about:
865
+
866
+ 1. **Authentication & Authorization**
867
+ - How should users sign up and log in? (email/password, OAuth providers, magic links?)
868
+ - Are there different user roles with different permissions?
869
+ - Should there be an admin interface?
870
+
871
+ 2. **User & Account Modeling**
872
+ - Is this a single-user app or multi-user?
873
+ - Do users belong to organizations/teams/workspaces?
874
+ - How should user profiles be structured?
875
+
876
+ 3. **Tech Stack Preferences**
877
+ - What backend framework/language should I use?
878
+ - What database do you prefer?
879
+ - Any specific hosting/deployment requirements?
880
+
881
+ 4. **Backend Business Logic**
882
+ - Any server-side logic, validations or processes needed beyond what's shown in the UI?
883
+ - Background processes, notifications, or other processes to trigger?
884
+
885
+ 5. **Any Other Clarifications**
886
+ - Questions about specific features or user flows
887
+ - Edge cases that need clarification
888
+ - Integration requirements
889
+
890
+ Lastly, be sure to ask me if I have any other notes to add for this implementation.
891
+
892
+ Once I answer your questions, create a comprehensive implementation plan before coding.
893
+
894
+ ```
895
+
896
+ ### section-prompt.md
897
+
898
+ Create `product-plan/prompts/section-prompt.md`:
899
+
900
+ ```markdown
901
+ # Section Implementation Prompt
902
+
903
+ ## Define Section Variables
904
+
905
+ - **SECTION_NAME** = [Human-readable name, e.g., "Invoices" or "Project Dashboard"]
906
+ - **SECTION_ID** = [Folder name in sections/, e.g., "invoices" or "project-dashboard"]
907
+ - **NN** = [Milestone number, e.g., "02" or "03" — sections start at 02 since 01 is Foundation]
908
+
909
+ ---
910
+
911
+ I need you to implement the **SECTION_NAME** section of my application.
912
+
913
+ ## Instructions
914
+
915
+ Please carefully read and analyze the following files:
916
+
917
+ 1. **@product-plan/product-overview.md** — Product summary for overall context
918
+ 2. **@product-plan/instructions/incremental/NN-SECTION_ID.md** — Specific instructions for this section
919
+
920
+ Also review the section assets:
921
+ - **@product-plan/sections/SECTION_ID/README.md** — Feature overview and design intent
922
+ - **@product-plan/sections/SECTION_ID/tests.md** — Test-writing instructions (use TDD approach)
923
+ - **@product-plan/sections/SECTION_ID/components/** — React components to integrate
924
+ - **@product-plan/sections/SECTION_ID/types.ts** — TypeScript interfaces
925
+ - **@product-plan/sections/SECTION_ID/sample-data.json** — Test data
926
+
927
+ ## Before You Begin
928
+
929
+ Please ask me clarifying questions about:
930
+
931
+ 1. **Authentication & Authorization** (if not yet established)
932
+ - How should users authenticate?
933
+ - What permissions are needed for this section?
934
+
935
+ 2. **Data Relationships**
936
+ - How does this section's data relate to other entities?
937
+ - Are there any cross-section dependencies?
938
+
939
+ 3. **Integration Points**
940
+ - How should this section connect to existing features?
941
+ - Any API endpoints already built that this should use?
942
+
943
+ 4. **Backend Business Logic**
944
+ - Any server-side logic, validations or processes needed beyond what's shown in the UI?
945
+ - Background processes, notifications, or other processes to trigger?
946
+
947
+ 5. **Any Other Clarifications**
948
+ - Questions about specific user flows in this section
949
+ - Edge cases that need clarification
950
+
951
+ ## Implementation Approach
952
+
953
+ Use test-driven development:
954
+ 1. Read the `tests.md` file and write failing tests first
955
+ 2. Implement the feature to make tests pass
956
+ 3. Refactor while keeping tests green
957
+
958
+ Lastly, be sure to ask me if I have any other notes to add for this implementation.
959
+
960
+ Once I answer your questions, proceed with implementation.
961
+
962
+ ```
963
+
964
+ ## Step 12: Generate README.md
965
+
966
+ Create `product-plan/README.md`:
967
+
968
+ ```markdown
969
+ # [Product Name] — Design Handoff
970
+
971
+ This folder contains everything needed to implement [Product Name].
972
+
973
+ ## What's Included
974
+
975
+ **Ready-to-Use Prompts:**
976
+ - `prompts/one-shot-prompt.md` — Prompt template for full implementation
977
+ - `prompts/section-prompt.md` — Prompt template for section-by-section implementation
978
+
979
+ **Instructions:**
980
+ - `product-overview.md` — Product summary (provide with every implementation)
981
+ - `instructions/one-shot-instructions.md` — All milestones combined for full implementation
982
+ - `instructions/incremental/` — Milestone-by-milestone instructions (foundation, then sections)
983
+
984
+ **Design Assets:**
985
+ - `design-system/` — Colors, fonts, design tokens
986
+ - `data-model/` — Core entities and TypeScript types
987
+ - `shell/` — Application shell components
988
+ - `sections/` — All section components, types, sample data, and test instructions
989
+
990
+ ## How to Use This
991
+
992
+ ### Option A: Incremental (Recommended)
993
+
994
+ Build your app milestone by milestone for better control:
995
+
996
+ 1. Copy the `product-plan/` folder to your codebase
997
+ 2. Start with Foundation (`instructions/incremental/01-foundation.md`) — includes design tokens, data model, routing, and application shell
998
+ 3. For each section:
999
+ - Open `prompts/section-prompt.md`
1000
+ - Fill in the section variables at the top (SECTION_NAME, SECTION_ID, NN)
1001
+ - Copy/paste into your coding agent
1002
+ - Answer questions and implement
1003
+ 4. Review and test after each milestone
1004
+
1005
+ ### Option B: One-Shot
1006
+
1007
+ Build the entire app in one session:
1008
+
1009
+ 1. Copy the `product-plan/` folder to your codebase
1010
+ 2. Open `prompts/one-shot-prompt.md`
1011
+ 3. Add any additional notes to the prompt
1012
+ 4. Copy/paste the prompt into your coding agent
1013
+ 5. Answer the agent's clarifying questions
1014
+ 6. Let the agent plan and implement everything
1015
+
1016
+ ## Test-Driven Development
1017
+
1018
+ Each section includes a `tests.md` file with test-writing instructions. For best results:
1019
+
1020
+ 1. Read `sections/[section-id]/tests.md` before implementing
1021
+ 2. Write failing tests based on the instructions
1022
+ 3. Implement the feature to make tests pass
1023
+ 4. Refactor while keeping tests green
1024
+
1025
+ The test instructions are **framework-agnostic** — they describe WHAT to test, not HOW. Adapt to your testing setup (Jest, Vitest, Playwright, Cypress, RSpec, Minitest, PHPUnit, etc.).
1026
+
1027
+ ## Tips
1028
+
1029
+ - **Use the pre-written prompts** — They include important clarifying questions about auth and data modeling.
1030
+ - **Add your own notes** — Customize prompts with project-specific context when needed.
1031
+ - **Build on your designs** — Use completed sections as the starting point for future feature development.
1032
+ - **Review thoroughly** — Check plans and implementations carefully to catch details and inconsistencies.
1033
+ - **Fill in the gaps** — Backend business logic may need manual additions. Incremental implementation helps you identify these along the way.
1034
+
1035
+ ---
1036
+
1037
+ *Generated by Design OS*
1038
+ ```
1039
+
1040
+ ## Step 13: Copy Screenshots
1041
+
1042
+ Copy any `.png` files from:
1043
+ - `product/shell/` → `product-plan/shell/`
1044
+ - `product/sections/[section-id]/` → `product-plan/sections/[section-id]/`
1045
+
1046
+ ## Step 14: Create Zip File
1047
+
1048
+ After generating all the export files, create a zip archive of the product-plan folder:
1049
+
1050
+ ```bash
1051
+ # Remove any existing zip file
1052
+ rm -f product-plan.zip
1053
+
1054
+ # Create the zip file
1055
+ cd . && zip -r product-plan.zip product-plan/
1056
+ ```
1057
+
1058
+ This creates `product-plan.zip` in the project root, which will be available for download on the Export page.
1059
+
1060
+ ## Step 15: Confirm Completion
1061
+
1062
+ Let the user know:
1063
+
1064
+ "I've created the complete export package at `product-plan/` and `product-plan.zip`.
1065
+
1066
+ **What's Included:**
1067
+
1068
+ **Ready-to-Use Prompts:**
1069
+ - `prompts/one-shot-prompt.md` — Prompt for full implementation
1070
+ - `prompts/section-prompt.md` — Prompt template for section-by-section
1071
+
1072
+ **Instructions:**
1073
+ - `product-overview.md` — Product summary (always provide with instructions)
1074
+ - `instructions/one-shot-instructions.md` — All milestones combined
1075
+ - `instructions/incremental/` — [N] milestone instructions (foundation, then sections)
1076
+
1077
+ **Design Assets:**
1078
+ - `design-system/` — Colors, fonts, tokens
1079
+ - `data-model/` — Entity types and sample data
1080
+ - `shell/` — Application shell components
1081
+ - `sections/` — [N] section component packages with test instructions
1082
+
1083
+ **Download:**
1084
+
1085
+ Restart your dev server and visit the Export page to download `product-plan.zip`.
1086
+
1087
+ **How to Use:**
1088
+
1089
+ 1. Copy `product-plan/` to your implementation codebase
1090
+ 2. Open `prompts/one-shot-prompt.md` or `prompts/section-prompt.md`
1091
+ 3. Add any additional notes, then copy/paste into your coding agent
1092
+ 4. Answer the agent's clarifying questions about auth, data modeling, etc.
1093
+ 5. Let the agent implement based on the instructions
1094
+
1095
+ The components are props-based and portable — they accept data and callbacks, letting your implementation agent handle routing, data fetching, and state management however fits your stack."
1096
+
1097
+ ## Important Notes
1098
+
1099
+ - Always transform import paths when copying components
1100
+ - Include `product-overview.md` context with every implementation session
1101
+ - Use the pre-written prompts — they prompt for important clarifying questions
1102
+ - Screenshots provide visual reference for fidelity checking
1103
+ - Sample data files are for testing before real APIs are built
1104
+ - The export is self-contained — no dependencies on Design OS
1105
+ - Components are portable — they work with any React setup