@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,218 @@
1
+ # Agent Directives for Design OS
2
+
3
+ Design OS is a **product planning and design tool** that helps users define their product vision, structure their data model, design their UI, and prepare export packages for implementation in a separate codebase.
4
+
5
+ > **Important**: Design OS is a planning tool, not the end product codebase. The screen designs and components generated here are meant to be exported and integrated into your actual product's codebase.
6
+
7
+ ---
8
+
9
+ ## Understanding Design OS Context
10
+
11
+ When working in Design OS, be aware of two distinct contexts:
12
+
13
+ ### 1. Design OS Application
14
+ The React application that displays and manages planning files. When modifying the Design OS UI itself:
15
+ - Files live in `src/` (components, pages, utilities)
16
+ - Uses the Design OS design system (stone palette, DM Sans, etc.)
17
+ - Provides the interface for viewing specs, screen designs, exports, etc.
18
+
19
+ ### 2. Product Design (Screen Designs & Exports)
20
+ The product you're planning and designing. When creating screen designs and exports:
21
+ - Screen design components live in `src/sections/[section-name]/` and `src/shell/`
22
+ - Product definition files live in `product/`
23
+ - Exports are packaged to `product-plan/` for integration into a separate codebase
24
+ - Follow the design requirements specified in each section's spec
25
+
26
+ ---
27
+
28
+ ## Getting Started — The Planning Flow
29
+
30
+ Design OS follows a structured planning sequence:
31
+
32
+ ### 1. Product Overview (`/product-vision`)
33
+ Define your product's core description, the problems it solves, and key features.
34
+ **Output:** `product/product-overview.md`
35
+
36
+ ### 2. Product Roadmap (`/product-roadmap`)
37
+ Break your product into 3-5 development sections. Each section represents a self-contained area that can be designed and built independently.
38
+ **Output:** `product/product-roadmap.md`
39
+
40
+ ### 3. Data Model (`/data-model`)
41
+ Define the core entities and relationships in your product. This establishes the "nouns" of your system and ensures consistency across sections.
42
+ **Output:** `product/data-model/data-model.md`
43
+
44
+ ### 4. Design System (`/design-tokens`)
45
+ Choose your color palette (from Tailwind) and typography (from Google Fonts). These tokens are applied to all screen designs.
46
+ **Output:** `product/design-system/colors.json`, `product/design-system/typography.json`
47
+
48
+ ### 5. Application Shell (`/design-shell`)
49
+ Design the persistent navigation and layout that wraps all sections.
50
+ **Output:** `product/shell/spec.md`, `src/shell/components/`
51
+
52
+ ### 6. For Each Section:
53
+ - `/shape-section` — Define the specification
54
+ - `/sample-data` — Create sample data and types
55
+ - `/design-screen` — Create screen designs
56
+ - `/screenshot-design` — Capture screenshots
57
+
58
+ ### 7. Export (`/export-product`)
59
+ Generate the complete export package with all components, types, and handoff documentation.
60
+ **Output:** `product-plan/`
61
+
62
+ ---
63
+
64
+ ## File Structure
65
+
66
+ ```
67
+ product/ # Product definition (portable)
68
+ ├── product-overview.md # Product description, problems/solutions, features
69
+ ├── product-roadmap.md # List of sections with titles and descriptions
70
+
71
+ ├── data-model/ # Global data model
72
+ │ └── data-model.md # Entity descriptions and relationships
73
+
74
+ ├── design-system/ # Design tokens
75
+ │ ├── colors.json # { primary, secondary, neutral }
76
+ │ └── typography.json # { heading, body, mono }
77
+
78
+ ├── shell/ # Application shell
79
+ │ └── spec.md # Shell specification
80
+
81
+ └── sections/
82
+ └── [section-name]/
83
+ ├── spec.md # Section specification
84
+ ├── data.json # Sample data for screen designs
85
+ ├── types.ts # TypeScript interfaces
86
+ └── *.png # Screenshots
87
+
88
+ src/
89
+ ├── shell/ # Shell design components
90
+ │ ├── components/
91
+ │ │ ├── AppShell.tsx
92
+ │ │ ├── MainNav.tsx
93
+ │ │ ├── UserMenu.tsx
94
+ │ │ └── index.ts
95
+ │ └── ShellPreview.tsx
96
+
97
+ └── sections/
98
+ └── [section-name]/
99
+ ├── components/ # Exportable components
100
+ │ ├── [Component].tsx
101
+ │ └── index.ts
102
+ └── [ViewName].tsx # Preview wrapper
103
+
104
+ product-plan/ # Export package (generated)
105
+ ├── README.md # Quick start guide
106
+ ├── product-overview.md # Product summary
107
+ ├── prompts/ # Ready-to-use prompts for coding agents
108
+ │ ├── one-shot-prompt.md # Prompt for full implementation
109
+ │ └── section-prompt.md # Prompt template for incremental
110
+ ├── instructions/ # Implementation instructions
111
+ │ ├── one-shot-instructions.md # All milestones combined
112
+ │ └── incremental/ # Milestone-by-milestone instructions
113
+ │ ├── 01-foundation.md
114
+ │ ├── 02-shell.md
115
+ │ └── [NN]-[section-id].md # Section-specific instructions
116
+ ├── design-system/ # Tokens, colors, fonts
117
+ ├── data-model/ # Types and sample data
118
+ ├── shell/ # Shell components
119
+ └── sections/ # Section components (with tests.md each)
120
+ ```
121
+
122
+ ---
123
+
124
+ ## Design Requirements
125
+
126
+ When creating screen designs, follow these guidelines:
127
+
128
+ - **Mobile Responsive**: Use Tailwind's responsive prefixes (`sm:`, `md:`, `lg:`, `xl:`) to ensure layouts adapt properly across screen sizes.
129
+
130
+ - **Light & Dark Mode**: Use `dark:` variants for all colors. Test that all UI elements are visible and readable in both modes.
131
+
132
+ - **Use Design Tokens**: When design tokens are defined, apply the product's color palette and typography. Otherwise, fall back to `stone` for neutrals and `lime` for accents.
133
+
134
+ - **Props-Based Components**: All screen design components must accept data and callbacks via props. Never import data directly in exportable components.
135
+
136
+ - **No Navigation in Section Screen Designs**: Section screen designs should not include navigation chrome. The shell handles all navigation.
137
+
138
+ ---
139
+
140
+ ## Tailwind CSS Directives
141
+
142
+ These rules apply to both the Design OS application and all screen designs/components it generates:
143
+
144
+ - **Tailwind CSS v4**: We always use Tailwind CSS v4 (not v3). Do not reference or create v3 patterns.
145
+
146
+ - **No tailwind.config.js**: Tailwind CSS v4 does not use a `tailwind.config.js` file. Never reference, create, or modify one.
147
+
148
+ - **Use Built-in Utility Classes**: Avoid writing custom CSS. Stick to using Tailwind's built-in utility classes for all styling.
149
+
150
+ - **Use Built-in Colors**: Avoid defining custom colors. Use Tailwind's built-in color utility classes (e.g., `stone-500`, `lime-400`, `red-600`).
151
+
152
+ ---
153
+
154
+ ## The Four Pillars
155
+
156
+ Design OS is organized around four main areas:
157
+
158
+ 1. **Product Overview** — The "what" and "why"
159
+ - Product name and description
160
+ - Problems and solutions
161
+ - Key features
162
+ - Sections/roadmap
163
+
164
+ 2. **Data Model** — The "nouns" of the system
165
+ - Core entity names and descriptions
166
+ - Relationships between entities
167
+ - Minimal — leaves room for implementation
168
+
169
+ 3. **Design System** — The "look and feel"
170
+ - Color palette (Tailwind colors)
171
+ - Typography (Google Fonts)
172
+
173
+ 4. **Application Shell** — The persistent chrome
174
+ - Global navigation structure
175
+ - User menu
176
+ - Layout pattern
177
+
178
+ Plus **Sections** — The individual features, each with spec, data, screen designs.
179
+
180
+ ---
181
+
182
+ ## Design System Scope
183
+
184
+ Design OS separates concerns between its own UI and the product being designed:
185
+
186
+ - **Design OS UI**: Always uses the stone/lime palette and DM Sans typography
187
+ - **Product Screen Designs**: Use the design tokens defined for the product (when available)
188
+ - **Shell**: Uses product design tokens to preview the full app experience
189
+
190
+ ---
191
+
192
+ ## Export & Handoff
193
+
194
+ The `/export-product` command generates a complete handoff package:
195
+
196
+ - **Ready-to-use prompts**: Pre-written prompts to copy/paste into coding agents
197
+ - `one-shot-prompt.md`: For full implementation in one session
198
+ - `section-prompt.md`: Template for section-by-section implementation
199
+ - **Implementation instructions**: Detailed guides for each milestone
200
+ - `product-overview.md`: Always provide for context
201
+ - `one-shot-instructions.md`: All milestones combined
202
+ - Incremental instructions in `instructions/incremental/`
203
+ - **Test instructions**: Each section includes `tests.md` with TDD specs
204
+ - **Portable components**: Props-based, ready for any React setup
205
+
206
+ The prompts guide the implementation agent to ask clarifying questions about authentication, user modeling, and tech stack before building. Test instructions are framework-agnostic and include user flows, empty states, and edge cases.
207
+
208
+ ---
209
+
210
+ ## Design System (Design OS Application)
211
+
212
+ The Design OS application itself uses a "Refined Utility" aesthetic:
213
+
214
+ - **Typography**: DM Sans for headings and body, IBM Plex Mono for code
215
+ - **Colors**: Stone palette for neutrals (warm grays), lime for accents
216
+ - **Layout**: Maximum 800px content width, generous whitespace
217
+ - **Cards**: Minimal borders (1px), subtle shadows, generous padding
218
+ - **Motion**: Subtle fade-ins (200ms), no bouncy animations
@@ -0,0 +1 @@
1
+ Refer to @agents.md
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": false,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "",
8
+ "css": "src/index.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "iconLibrary": "lucide",
14
+ "aliases": {
15
+ "components": "@/components",
16
+ "utils": "@/lib/utils",
17
+ "ui": "@/components/ui",
18
+ "lib": "@/lib",
19
+ "hooks": "@/hooks"
20
+ },
21
+ "registries": {}
22
+ }
@@ -0,0 +1,153 @@
1
+ # Codebase Implementation
2
+
3
+ After exporting your designs from Design OS, you have a complete handoff package ready for implementation. This guide covers how to work with your AI coding agent to build the product.
4
+
5
+ ## Getting Started
6
+
7
+ 1. Copy the `product-plan/` folder into your target codebase
8
+ 2. Start your AI coding agent (Claude Code, Cursor, etc.)
9
+ 3. Choose your implementation approach: one-shot or section-by-section
10
+
11
+ ## Implementation Approaches
12
+
13
+ ### Option A: Incremental Implementation (Recommended)
14
+
15
+ For larger products or when you want to review progress incrementally.
16
+
17
+ **How it works:**
18
+
19
+ Work through the instructions in order:
20
+
21
+ 1. **Foundation** (`instructions/incremental/01-foundation.md`) — Design tokens, data model types, routing
22
+ 2. **Shell** (`instructions/incremental/02-shell.md`) — Application shell and navigation
23
+ 3. **Sections** (`instructions/incremental/03-*.md`, `04-*.md`, etc.) — Each feature section, one at a time
24
+
25
+ For each milestone:
26
+
27
+ 1. Open `product-plan/prompts/section-prompt.md`
28
+ 2. Fill in the section variables at the top (SECTION_NAME, SECTION_ID, NN)
29
+ 3. Add any section-specific notes
30
+ 4. Copy/paste the prompt into your coding agent
31
+ 5. Answer clarifying questions and let the agent implement
32
+ 6. Review and test before moving to the next milestone
33
+
34
+ **The section prompt:**
35
+
36
+ - References the section's instruction file and assets
37
+ - Points to `tests.md` for test-driven development
38
+ - Asks about auth, data relationships, and integration points
39
+
40
+ ### Option B: One-Shot Implementation
41
+
42
+ For simpler products or when you want to build everything in one session.
43
+
44
+ **How it works:**
45
+
46
+ 1. Open `product-plan/prompts/one-shot-prompt.md`
47
+ 2. Add any additional notes (tech stack preferences, constraints)
48
+ 3. Copy/paste the prompt into your coding agent
49
+ 4. Answer the agent's clarifying questions about auth, user modeling, etc.
50
+ 5. Let the agent plan and implement everything
51
+
52
+ The prompt references `product-overview.md` and `instructions/one-shot-instructions.md`, and guides your agent to ask important questions before starting.
53
+
54
+ **The prompt includes questions about:**
55
+
56
+ - Authentication & authorization (login methods, user roles)
57
+ - User & account modeling (single-user vs multi-user, teams/workspaces)
58
+ - Tech stack preferences (backend framework, database)
59
+ - Any other clarifications needed
60
+
61
+ ## Test-Driven Development
62
+
63
+ Each section includes a `tests.md` file with detailed test-writing instructions. We recommend a TDD approach:
64
+
65
+ 1. **Read the test instructions** — Review `sections/[section-id]/tests.md`
66
+ 2. **Write failing tests** — Based on the user flows and assertions described
67
+ 3. **Implement the feature** — Make the tests pass
68
+ 4. **Refactor** — Clean up while keeping tests green
69
+
70
+ The test instructions include:
71
+
72
+ - **User flow tests** — Success and failure paths for key interactions
73
+ - **Empty state tests** — Verifying behavior when no records exist
74
+ - **Component interaction tests** — Specific UI elements and behaviors
75
+ - **Edge cases** — Boundary conditions and transitions
76
+
77
+ Test instructions are **framework-agnostic**—they describe WHAT to test, not HOW. Adapt them to your testing setup (Jest, Vitest, Playwright, Cypress, RSpec, Minitest, PHPUnit, etc.).
78
+
79
+ ## Spec-Driven Development
80
+
81
+ We also recommend a spec-driven approach:
82
+
83
+ 1. **Review the design** — Understand what's been designed and why
84
+ 2. **Ask clarifying questions** — Resolve any ambiguities before coding
85
+ 3. **Write the technical spec** — Define the backend architecture, API contracts, database schema
86
+ 4. **Write tests first** — Based on the provided test instructions
87
+ 5. **Implement** — Build to make tests pass
88
+ 6. **Verify** — Ensure the implementation matches the design
89
+
90
+ This approach prevents wasted work from misunderstandings and ensures the backend properly supports the frontend designs.
91
+
92
+ ## Clarifying Questions
93
+
94
+ Before finalizing any implementation plan, encourage your agent to ask questions like:
95
+
96
+ **Architecture:**
97
+ - What backend framework are we using?
98
+ - How should authentication work?
99
+ - Are there existing patterns in this codebase to follow?
100
+
101
+ **Data:**
102
+ - How should the data model extend what's defined?
103
+ - Are there validation rules beyond what the UI shows?
104
+ - How should relationships be handled (eager loading, lazy loading)?
105
+
106
+ **Integration:**
107
+ - How should the callbacks be implemented (API calls, local state)?
108
+ - What error handling patterns should we use?
109
+ - Are there existing UI components to reuse alongside the new ones?
110
+
111
+ **Scope:**
112
+ - Should we implement all features in this milestone or prioritize?
113
+ - Are there any features to skip for now?
114
+ - What's the testing strategy?
115
+
116
+ ## What Your Agent Needs to Build
117
+
118
+ The Design OS export provides finished UI designs. Your implementation agent still needs to create:
119
+
120
+ **Backend:**
121
+ - Database schema and migrations
122
+ - API endpoints (REST or GraphQL)
123
+ - Business logic and validation
124
+ - Authentication and authorization
125
+
126
+ **Data Layer:**
127
+ - State management setup
128
+ - Data fetching and caching
129
+ - Real-time updates (if needed)
130
+
131
+ **Integration:**
132
+ - Routing configuration
133
+ - Callback implementations
134
+ - Error handling and loading states
135
+ - Empty state handling (when no records exist)
136
+ - Form validation and submission
137
+
138
+ **Tests:**
139
+ - Unit and integration tests based on `tests.md` instructions
140
+ - User flow tests (success and failure paths)
141
+ - Empty state verification
142
+
143
+ **The UI components are complete and production-ready.** Focus implementation effort on the data layer, backend, and tests—don't redesign or restyle the provided components.
144
+
145
+ ## Tips
146
+
147
+ - **Use the pre-written prompts** — They include important clarifying questions about auth and data modeling
148
+ - **Always include product-overview.md** — It gives essential context about the full product
149
+ - **Write tests first** — Use the `tests.md` instructions for TDD
150
+ - **Review incrementally** — Section-by-section implementation lets you catch issues early
151
+ - **Test with sample data first** — Use the provided sample-data.json before building real APIs
152
+ - **Handle empty states** — Ensure good UX when no records exist (first-time users)
153
+ - **Trust the components** — They're designed and styled already; wire them up, don't rebuild them
@@ -0,0 +1,135 @@
1
+ # Designing Sections
2
+
3
+ After completing [Product Planning](product-planning.md), you're ready to design individual sections. Work through each section in your roadmap, completing these steps for each one.
4
+
5
+ ## 1. Shape the Section
6
+
7
+ ```
8
+ /shape-section
9
+ ```
10
+
11
+ Define what the section does. If you have multiple sections, you'll be asked which one to work on.
12
+
13
+ This is a conversational process to establish:
14
+
15
+ - **Overview** — What this section is for (2-3 sentences)
16
+ - **User flows** — The main actions and step-by-step interactions
17
+ - **UI requirements** — Specific layouts, patterns, or components needed
18
+ - **Scope boundaries** — What's intentionally excluded
19
+
20
+ Share any notes or ideas you have. The AI will ask clarifying questions about user actions, information to display, and UI patterns. Focus on experience and interface requirements—no backend or database details.
21
+
22
+ You'll also be asked whether this section should display inside the application shell (most sections do) or as a standalone page (for things like landing pages or embedded widgets).
23
+
24
+ **Creates:** `product/sections/[section-id]/spec.md`
25
+
26
+ ## 2. Create Sample Data
27
+
28
+ ```
29
+ /sample-data
30
+ ```
31
+
32
+ Generate realistic sample data based on the spec. This data populates your screen designs and makes them feel real.
33
+
34
+ The AI analyzes your section spec and proposes a data structure:
35
+
36
+ - **Entities** — Based on your global data model (if defined) or inferred from the spec
37
+ - **Relationships** — How the data connects
38
+ - **Sample records** — 5-10 realistic entries with varied content
39
+
40
+ You'll also get TypeScript types generated automatically:
41
+
42
+ - **Data interfaces** — Type definitions for each entity
43
+ - **Props interface** — What the component expects, including callbacks for actions (onView, onEdit, onDelete, etc.)
44
+
45
+ The sample data includes:
46
+ - Realistic names, dates, and descriptions (not "Lorem ipsum")
47
+ - Varied content lengths and statuses
48
+ - Edge cases (empty arrays, long text)
49
+
50
+ **Creates:**
51
+ - `product/sections/[section-id]/data.json` — Sample data with `_meta` descriptions
52
+ - `product/sections/[section-id]/types.ts` — TypeScript interfaces
53
+
54
+ ## 3. Design the Screen
55
+
56
+ ```
57
+ /design-screen
58
+ ```
59
+
60
+ Build the actual React components for the section. This is where the spec and sample data become a working UI.
61
+
62
+ ### What Gets Created
63
+
64
+ **Exportable components** (props-based, portable):
65
+
66
+ The main component and any sub-components, all accepting data and callbacks via props. These are what get exported to your codebase.
67
+
68
+ ```tsx
69
+ // Example: Components accept props, never import data directly
70
+ export function InvoiceList({
71
+ invoices,
72
+ onView,
73
+ onEdit,
74
+ onDelete,
75
+ onCreate
76
+ }: InvoiceListProps) {
77
+ // ...
78
+ }
79
+ ```
80
+
81
+ **Preview wrapper** (for Design OS only):
82
+
83
+ A wrapper that imports the sample data and feeds it to the component, so you can see it running in Design OS.
84
+
85
+ ### Design Requirements
86
+
87
+ All screen designs include:
88
+
89
+ - **Mobile responsive** — Tailwind responsive prefixes (`sm:`, `md:`, `lg:`)
90
+ - **Light & dark mode** — Using `dark:` variants
91
+ - **Design tokens applied** — Your color palette and typography choices
92
+ - **All spec requirements** — Every user flow and UI requirement implemented
93
+
94
+ ### Multiple Views
95
+
96
+ If the spec implies multiple views (list view, detail view, form, etc.), you'll be asked which to build first. Run `/design-screen` again for additional views.
97
+
98
+ **Creates:**
99
+ - `src/sections/[section-id]/components/[ViewName].tsx` — Main component
100
+ - `src/sections/[section-id]/components/[SubComponent].tsx` — Sub-components as needed
101
+ - `src/sections/[section-id]/components/index.ts` — Component exports
102
+ - `src/sections/[section-id]/[ViewName].tsx` — Preview wrapper
103
+
104
+ **Important:** Restart your dev server after creating screen designs to see the changes.
105
+
106
+ ## 4. Capture Screenshots (Optional)
107
+
108
+ ```
109
+ /screenshot-design
110
+ ```
111
+
112
+ Take screenshots of your screen designs for documentation. Screenshots are saved alongside the spec and data files.
113
+
114
+ This command:
115
+ 1. Starts the dev server automatically
116
+ 2. Navigates to your screen design
117
+ 3. Hides the Design OS navigation bar
118
+ 4. Captures a full-page screenshot
119
+
120
+ Screenshots are useful for:
121
+ - Visual reference during implementation
122
+ - Documentation and handoff materials
123
+ - Comparing designs across sections
124
+
125
+ **Requires:** Playwright MCP server. If not installed, you'll be prompted with setup instructions.
126
+
127
+ **Creates:** `product/sections/[section-id]/[screen-name].png`
128
+
129
+ ## Repeat for Each Section
130
+
131
+ Work through your roadmap sections in order. Each section builds on the foundation you established and benefits from the consistency of your global data model and design tokens.
132
+
133
+ ## What's Next
134
+
135
+ When all sections are designed, you're ready to export. See [Export](export.md) for generating the complete handoff package.
@@ -0,0 +1,149 @@
1
+ # Export
2
+
3
+ When your designs are complete, export everything your implementation agent (or team) needs to build the product.
4
+
5
+ ## When to Export
6
+
7
+ You're ready to export when:
8
+
9
+ - Product vision and roadmap are defined
10
+ - At least one section has screen designs
11
+ - You're satisfied with the design direction
12
+
13
+ You can export at any point—it doesn't have to be "complete." Exporting generates a snapshot of your current designs. You can always export again later as you add more sections.
14
+
15
+ ## Running the Export
16
+
17
+ ```
18
+ /export-product
19
+ ```
20
+
21
+ The export command:
22
+
23
+ 1. **Checks prerequisites** — Verifies required files exist
24
+ 2. **Gathers all design assets** — Components, types, data, tokens
25
+ 3. **Generates implementation instructions** — Including ready-to-use prompts
26
+ 4. **Generates test instructions** — TDD specs for each section
27
+ 5. **Creates the export package** — A complete `product-plan/` directory
28
+ 6. **Creates a zip file** — `product-plan.zip` for easy download
29
+
30
+ ## What's Included
31
+
32
+ ### Ready-to-Use Prompts
33
+
34
+ ```
35
+ product-plan/prompts/
36
+ ├── one-shot-prompt.md # Prompt for full implementation
37
+ └── section-prompt.md # Prompt template for section-by-section
38
+ ```
39
+
40
+ These are pre-written prompts you copy/paste into your coding agent. They reference the instruction files and prompt your agent to ask important clarifying questions about authentication, user modeling, and tech stack before implementing.
41
+
42
+ ### Instructions
43
+
44
+ ```
45
+ product-plan/
46
+ ├── product-overview.md # Product summary (always provide)
47
+ └── instructions/
48
+ ├── one-shot-instructions.md # All milestones combined
49
+ └── incremental/ # Milestone-by-milestone implementation
50
+ ├── 01-foundation.md # Design tokens, data model, routing
51
+ ├── 02-shell.md # Application shell implementation
52
+ ├── 03-[section-id].md # One per section (e.g., 03-invoices.md)
53
+ └── ...
54
+ ```
55
+
56
+ **product-overview.md** provides context about the full product—always include it with any implementation session.
57
+
58
+ **one-shot-instructions.md** combines all milestones into a single document. Use this with `one-shot-prompt.md` for full implementation.
59
+
60
+ **Incremental instructions** break the work into milestones. Use these with `section-prompt.md` for step-by-step implementation.
61
+
62
+ ### Design System
63
+
64
+ ```
65
+ product-plan/design-system/
66
+ ├── tokens.css # CSS custom properties
67
+ ├── tailwind-colors.md # Tailwind configuration guide
68
+ └── fonts.md # Google Fonts setup
69
+ ```
70
+
71
+ ### Data Model
72
+
73
+ ```
74
+ product-plan/data-model/
75
+ ├── README.md # Entity descriptions
76
+ ├── types.ts # TypeScript interfaces
77
+ └── sample-data.json # Combined sample data
78
+ ```
79
+
80
+ ### Shell Components
81
+
82
+ ```
83
+ product-plan/shell/
84
+ ├── README.md # Design intent
85
+ ├── components/
86
+ │ ├── AppShell.tsx # Main layout wrapper
87
+ │ ├── MainNav.tsx # Navigation
88
+ │ ├── UserMenu.tsx # User menu
89
+ │ └── index.ts # Exports
90
+ └── screenshot.png # Visual reference (if captured)
91
+ ```
92
+
93
+ ### Section Components
94
+
95
+ For each section:
96
+
97
+ ```
98
+ product-plan/sections/[section-id]/
99
+ ├── README.md # Feature overview, user flows
100
+ ├── tests.md # Test-writing instructions (TDD)
101
+ ├── components/
102
+ │ ├── [Component].tsx # Exportable components
103
+ │ └── index.ts # Exports
104
+ ├── types.ts # TypeScript interfaces
105
+ ├── sample-data.json # Test data
106
+ └── screenshot.png # Visual reference (if captured)
107
+ ```
108
+
109
+ ### Test Instructions
110
+
111
+ Each section includes a `tests.md` file with framework-agnostic test-writing instructions:
112
+
113
+ - **User flow tests** — Success and failure paths for key interactions
114
+ - **Empty state tests** — Verifying UI when no records exist
115
+ - **Component interaction tests** — Specific UI elements and behaviors to verify
116
+
117
+ These instructions describe WHAT to test, not HOW—your coding agent adapts them to your test framework (Jest, Vitest, Playwright, Cypress, RSpec, Minitest, PHPUnit, etc.).
118
+
119
+ ## About the Components
120
+
121
+ Exported components are:
122
+
123
+ - **Props-based** — Accept data and callbacks via props, never import data directly
124
+ - **Portable** — Work with any React setup, no Design OS dependencies
125
+ - **Complete** — Full styling, responsive design, dark mode support
126
+ - **Production-ready** — Not prototypes or mockups
127
+
128
+ ```tsx
129
+ // Components expect data and callbacks as props
130
+ <InvoiceList
131
+ invoices={data}
132
+ onView={(id) => navigate(`/invoices/${id}`)}
133
+ onEdit={(id) => navigate(`/invoices/${id}/edit`)}
134
+ onDelete={(id) => confirmDelete(id)}
135
+ onCreate={() => navigate('/invoices/new')}
136
+ />
137
+ ```
138
+
139
+ Your implementation agent's job is to:
140
+ - Wire up callbacks to routing and API calls
141
+ - Replace sample data with real data from your backend
142
+ - Implement proper error handling and loading states
143
+ - Implement empty states when no records exist (first-time users, after deletions)
144
+ - Build the backend APIs the components need
145
+ - Write tests based on the provided test instructions (TDD approach)
146
+
147
+ ## Using the Export
148
+
149
+ See [Codebase Implementation](codebase-implementation.md) for detailed guidance on implementing your design in your codebase.