@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,121 @@
1
+ # Product Roadmap
2
+
3
+ You are helping the user create or update their product roadmap for Design OS. This command serves two purposes:
4
+
5
+ 1. **Create** an initial roadmap if one doesn't exist
6
+ 2. **Sync** changes if the user has manually edited the markdown files
7
+
8
+ ## Step 1: Check Current State
9
+
10
+ First, check if `/product/product-roadmap.md` exists and read `/product/product-overview.md` if it exists.
11
+
12
+ ---
13
+
14
+ ## If No Roadmap Exists (Creating New)
15
+
16
+ ### Analyze the Product Overview
17
+
18
+ Read the product overview and analyze:
19
+ - The core description
20
+ - The problems being solved
21
+ - The key features listed
22
+
23
+ ### Propose Sections
24
+
25
+ Based on your analysis, propose 3-5 sections that represent:
26
+ - **Navigation items** - main areas of the product UI
27
+ - **Roadmap phases** - logical order for building
28
+ - **Self-contained feature areas** - each can be designed and built independently
29
+
30
+ Present your proposal:
31
+
32
+ "Based on your product overview, I'd suggest breaking this into these sections:
33
+
34
+ 1. **[Section Title]** - [One sentence description]
35
+ 2. **[Section Title]** - [One sentence description]
36
+ 3. **[Section Title]** - [One sentence description]
37
+
38
+ These are ordered by importance and logical development sequence. The first section would be the core functionality, with each subsequent section building on it."
39
+
40
+ Then use the AskUserQuestion tool to ask the user: "Does this breakdown make sense? Would you like to adjust any sections or their order?"
41
+
42
+ ### Refine with User
43
+
44
+ Iterate on the sections based on user feedback. Ask clarifying questions:
45
+ - "Should [feature X] be its own section or part of [Section Y]?"
46
+ - "What would you consider the most critical section to build first?"
47
+ - "Are there any major areas I'm missing?"
48
+
49
+ ### Create the File
50
+
51
+ Once approved, create `/product/product-roadmap.md` with this exact format:
52
+
53
+ ```markdown
54
+ # Product Roadmap
55
+
56
+ ## Sections
57
+
58
+ ### 1. [Section Title]
59
+ [One sentence description]
60
+
61
+ ### 2. [Section Title]
62
+ [One sentence description]
63
+
64
+ ### 3. [Section Title]
65
+ [One sentence description]
66
+ ```
67
+
68
+ ### Confirm
69
+
70
+ "I've created your product roadmap at `/product/product-roadmap.md`. The homepage now shows your [N] sections:
71
+
72
+ 1. **[Section 1]** — [Description]
73
+ 2. **[Section 2]** — [Description]
74
+ 3. **[Section 3]** — [Description]
75
+
76
+ **Next step:** Run `/data-model` to define the core entities and relationships in your product. This establishes a shared vocabulary that keeps your sections consistent."
77
+
78
+ ---
79
+
80
+ ## If Roadmap Already Exists (Syncing)
81
+
82
+ ### Read Current Files
83
+
84
+ Read both:
85
+ - `/product/product-overview.md`
86
+ - `/product/product-roadmap.md`
87
+
88
+ ### Report Current State
89
+
90
+ "I see you already have a product roadmap defined with [N] sections:
91
+
92
+ 1. [Section 1 Title]
93
+ 2. [Section 2 Title]
94
+ ...
95
+
96
+ What would you like to do?
97
+ - **Update sections** - Add, remove, or reorder sections
98
+ - **Sync from files** - I'll re-read the markdown files and confirm everything is in sync
99
+ - **Start fresh** - Regenerate the roadmap based on the current product overview"
100
+
101
+ ### Handle User Choice
102
+
103
+ **If updating sections:**
104
+ Ask what changes they want to make, then update the file accordingly.
105
+
106
+ **If syncing:**
107
+ Confirm the current state matches what's in the files. If the user has manually edited the `.md` files, let them know the app will pick up those changes on next build/refresh.
108
+
109
+ **If starting fresh:**
110
+ Follow the "Creating New" flow above, but note you're replacing the existing roadmap.
111
+
112
+ ---
113
+
114
+ ## Important Notes
115
+
116
+ - Sections should be ordered by development priority
117
+ - Each section should be self-contained enough to design and build independently
118
+ - Section titles become navigation items in the app
119
+ - The numbered format (`### 1. Title`) is required for parsing
120
+ - Keep descriptions to one sentence - concise and clear
121
+ - Don't create too many sections (3-5 is ideal)
@@ -0,0 +1,99 @@
1
+ # Product Vision
2
+
3
+ You are helping the user define their product vision for Design OS. This is a conversational, multi-step process.
4
+
5
+ ## Step 1: Gather Initial Input
6
+
7
+ First, ask the user to share their raw notes, ideas, or thoughts about the product they want to build. Be warm and open-ended:
8
+
9
+ "I'd love to help you define your product vision. Tell me about the product you're building - share any notes, ideas, or rough thoughts you have. What problem are you trying to solve? Who is it for? Don't worry about structure yet, just share what's on your mind."
10
+
11
+ Wait for their response before proceeding.
12
+
13
+ ## Step 2: Ask Clarifying Questions
14
+
15
+ After receiving their input, use the AskUserQuestion tool to ask 3-5 targeted questions to help shape:
16
+
17
+ - **The product name** - A clear, concise name for the product
18
+ - **The core product description** (1-3 sentences that capture the essence)
19
+ - **The key problems** the product solves (1-5 specific pain points)
20
+ - **How the product solves each problem** (concrete solutions)
21
+ - **The main features** that make this possible
22
+
23
+ **Important:** If the user hasn't already provided a product name, ask them:
24
+ - "What would you like to call this product? (A short, memorable name)"
25
+
26
+ Other example clarifying questions (adapt based on their input):
27
+ - "Who is the primary user of this product? Can you describe them?"
28
+ - "What's the single biggest pain point you're addressing?"
29
+ - "How do people currently solve this problem without your product?"
30
+ - "What makes your approach different or better?"
31
+ - "What are the 3-5 most essential features?"
32
+
33
+ Ask questions one or two at a time, and engage conversationally.
34
+
35
+ ## Step 3: Present Draft and Refine
36
+
37
+ Once you have enough information, present a draft summary:
38
+
39
+ "Based on our discussion, here's what I'm capturing for **[Product Name]**:
40
+
41
+ **Description:**
42
+ [Draft 1-3 sentence description]
43
+
44
+ **Problems & Solutions:**
45
+ 1. [Problem] → [Solution]
46
+ 2. [Problem] → [Solution]
47
+
48
+ **Key Features:**
49
+ - Feature 1
50
+ - Feature 2
51
+ - Feature 3
52
+
53
+ Does this capture your vision? Would you like to adjust anything?"
54
+
55
+ Iterate until the user is satisfied.
56
+
57
+ ## Step 4: Create the File
58
+
59
+ Once the user approves, create the file at `/product/product-overview.md` with this exact format:
60
+
61
+ ```markdown
62
+ # [Product Name]
63
+
64
+ ## Description
65
+ [The finalized 1-3 sentence description]
66
+
67
+ ## Problems & Solutions
68
+
69
+ ### Problem 1: [Problem Title]
70
+ [How the product solves it in 1-2 sentences]
71
+
72
+ ### Problem 2: [Problem Title]
73
+ [How the product solves it in 1-2 sentences]
74
+
75
+ [Add more as needed, up to 5]
76
+
77
+ ## Key Features
78
+ - [Feature 1]
79
+ - [Feature 2]
80
+ - [Feature 3]
81
+ [Add more as needed]
82
+ ```
83
+
84
+ **Important:** The `# [Product Name]` heading at the top is required - this is what displays as the card title in the app.
85
+
86
+ ## Step 5: Confirm Completion
87
+
88
+ Let the user know:
89
+
90
+ "I've created your product overview at `/product/product-overview.md`. The homepage will now display **[Product Name]** with your product vision. You can run `/product-roadmap` next to break this down into development sections."
91
+
92
+ ## Important Notes
93
+
94
+ - Be conversational and helpful, not robotic
95
+ - Ask follow-up questions when answers are vague
96
+ - Help the user think through their product, don't just transcribe
97
+ - Keep the final output concise and clear
98
+ - The format must match exactly for the app to parse it correctly
99
+ - **Always ensure the product has a name** - if user didn't provide one, ask for it
@@ -0,0 +1,263 @@
1
+ # Sample Data
2
+
3
+ You are helping the user create realistic sample data for a section of their product. This data will be used to populate screen designs. You will also generate TypeScript types based on the data structure.
4
+
5
+ ## Step 1: Check Prerequisites
6
+
7
+ First, identify the target section and verify that `spec.md` exists for it.
8
+
9
+ Read `/product/product-roadmap.md` to get the list of available sections.
10
+
11
+ If there's only one section, auto-select it. If there are multiple sections, use the AskUserQuestion tool to ask which section the user wants to generate data for.
12
+
13
+ Then check if `product/sections/[section-id]/spec.md` exists. If it doesn't:
14
+
15
+ "I don't see a specification for **[Section Title]** yet. Please run `/shape-section` first to define the section's requirements, then come back to generate sample data."
16
+
17
+ Stop here if the spec doesn't exist.
18
+
19
+ ## Step 2: Check for Global Data Model
20
+
21
+ Check if `/product/data-model/data-model.md` exists.
22
+
23
+ **If it exists:**
24
+ - Read the file to understand the global entity definitions
25
+ - Entity names in your sample data should match the global data model
26
+ - Use the descriptions and relationships as a guide
27
+
28
+ **If it doesn't exist:**
29
+ Show a warning but continue:
30
+
31
+ "Note: A global data model hasn't been defined yet. I'll create entity structures based on the section spec, but for consistency across sections, consider running `/data-model` first."
32
+
33
+ ## Step 3: Analyze the Specification
34
+
35
+ Read and analyze `product/sections/[section-id]/spec.md` to understand:
36
+
37
+ - What data entities are implied by the user flows?
38
+ - What fields/properties would each entity need?
39
+ - What sample values would be realistic and helpful for design?
40
+ - What actions can be taken on each entity? (These become callback props)
41
+
42
+ **If a global data model exists:** Cross-reference the spec with the data model. Use the same entity names and ensure consistency.
43
+
44
+ ## Step 4: Present Data Structure
45
+
46
+ Present your proposed data structure to the user in human-friendly language. Non-technical users should understand how their data is being organized.
47
+
48
+ **If using global data model:**
49
+
50
+ "Based on the specification for **[Section Title]** and your global data model, here's how I'm organizing the data:
51
+
52
+ **Entities (from your data model):**
53
+
54
+ - **[Entity1]** — [Description from data model]
55
+ - **[Entity2]** — [Description from data model]
56
+
57
+ **Section-specific data:**
58
+
59
+ [Any additional data specific to this section's UI needs]
60
+
61
+ **What You Can Do:**
62
+
63
+ - View, edit, and delete [entities]
64
+ - [Other key actions from the spec]
65
+
66
+ **Sample Data:**
67
+
68
+ I'll create [X] realistic [Entity1] records with varied content to make your screen designs feel real.
69
+
70
+ Does this structure make sense? Any adjustments?"
71
+
72
+ **If no global data model:**
73
+
74
+ "Based on the specification for **[Section Title]**, here's how I'm proposing to organize your data:
75
+
76
+ **Data Models:**
77
+
78
+ - **[Entity1]** — [One sentence explaining what this represents]
79
+ - **[Entity2]** — [One sentence explanation]
80
+
81
+ **How They Connect:**
82
+
83
+ [Explain relationships in simple terms]
84
+
85
+ **What You Can Do:**
86
+
87
+ - View, edit, and delete [entities]
88
+ - [Other key actions from the spec]
89
+
90
+ **Sample Data:**
91
+
92
+ I'll create [X] realistic [Entity1] records with varied content to make your screen designs feel real.
93
+
94
+ Does this structure make sense for your product? Any adjustments?"
95
+
96
+ Use the AskUserQuestion tool if there are ambiguities about what data is needed.
97
+
98
+ ## Step 5: Generate the Data File
99
+
100
+ Once the user approves the structure, create `product/sections/[section-id]/data.json` with:
101
+
102
+ - **A `_meta` section** - Human-readable descriptions of each data model and their relationships (displayed in the UI)
103
+ - **Realistic sample data** - Use believable names, dates, descriptions, etc.
104
+ - **Varied content** - Mix short and long text, different statuses, etc.
105
+ - **Edge cases** - Include at least one empty array, one long description, etc.
106
+ - **TypeScript-friendly structure** - Use consistent field names and types
107
+
108
+ ### Required `_meta` Structure
109
+
110
+ Every data.json MUST include a `_meta` object at the top level with:
111
+
112
+ 1. **`models`** - An object where each key is a model name and value is a plain-language description
113
+ 2. **`relationships`** - An array of strings explaining how models connect to each other
114
+
115
+ Example structure:
116
+
117
+ ```json
118
+ {
119
+ "_meta": {
120
+ "models": {
121
+ "invoices": "Each invoice represents a bill you send to a client for work completed.",
122
+ "lineItems": "Line items are the individual services or products listed on each invoice."
123
+ },
124
+ "relationships": [
125
+ "Each Invoice contains one or more Line Items (the breakdown of charges)",
126
+ "Invoices track which Client they belong to via the clientName field"
127
+ ]
128
+ },
129
+ "invoices": [
130
+ {
131
+ "id": "inv-001",
132
+ "invoiceNumber": "INV-2024-001",
133
+ "clientName": "Acme Corp",
134
+ "clientEmail": "billing@acme.com",
135
+ "total": 1500.00,
136
+ "status": "sent",
137
+ "dueDate": "2024-02-15",
138
+ "lineItems": [
139
+ { "description": "Web Design", "quantity": 1, "rate": 1500.00 }
140
+ ]
141
+ }
142
+ ]
143
+ }
144
+ ```
145
+
146
+ The `_meta` descriptions should:
147
+ - Use plain, non-technical language
148
+ - Explain what each model represents in the context of the user's product
149
+ - Describe relationships in terms of "contains", "belongs to", "links to", etc.
150
+ - **Match the global data model descriptions if one exists**
151
+
152
+ The data should directly support the user flows and UI requirements in the spec.
153
+
154
+ ## Step 6: Generate TypeScript Types
155
+
156
+ After creating data.json, generate `product/sections/[section-id]/types.ts` based on the data structure.
157
+
158
+ ### Type Generation Rules
159
+
160
+ 1. **Infer types from the sample data values:**
161
+ - Strings → `string`
162
+ - Numbers → `number`
163
+ - Booleans → `boolean`
164
+ - Arrays → `TypeName[]`
165
+ - Objects → Create a named interface
166
+
167
+ 2. **Use union types for status/enum fields:**
168
+
169
+ - If a field like `status` has known values, use a union: `'draft' | 'sent' | 'paid' | 'overdue'`
170
+
171
+ - Base this on the spec and the variety in sample data
172
+
173
+ 3. **Create a Props interface for the main component:**
174
+ - Include the data as a prop (e.g., `invoices: Invoice[]`)
175
+ - Include optional callback props for each action (e.g., `onDelete?: (id: string) => void`)
176
+
177
+ 4. **Use consistent entity names:**
178
+ - If a global data model exists, use the same entity names
179
+ - This ensures consistency across sections
180
+
181
+ Example types.ts:
182
+
183
+ ```typescript
184
+ // =============================================================================
185
+ // Data Types
186
+ // =============================================================================
187
+
188
+ export interface LineItem {
189
+ description: string
190
+ quantity: number
191
+ rate: number
192
+ }
193
+
194
+ export interface Invoice {
195
+ id: string
196
+ invoiceNumber: string
197
+ clientName: string
198
+ clientEmail: string
199
+ total: number
200
+ status: 'draft' | 'sent' | 'paid' | 'overdue'
201
+ dueDate: string
202
+ lineItems: LineItem[]
203
+ }
204
+
205
+ // =============================================================================
206
+ // Component Props
207
+ // =============================================================================
208
+
209
+ export interface InvoiceListProps {
210
+ /** The list of invoices to display */
211
+ invoices: Invoice[]
212
+ /** Called when user wants to view an invoice's details */
213
+ onView?: (id: string) => void
214
+ /** Called when user wants to edit an invoice */
215
+ onEdit?: (id: string) => void
216
+ /** Called when user wants to delete an invoice */
217
+ onDelete?: (id: string) => void
218
+ /** Called when user wants to archive an invoice */
219
+ onArchive?: (id: string) => void
220
+ /** Called when user wants to create a new invoice */
221
+ onCreate?: () => void
222
+ }
223
+ ```
224
+
225
+ ### Naming Conventions
226
+
227
+ - Use PascalCase for interface names: `Invoice`, `LineItem`, `InvoiceListProps`
228
+
229
+ - Use camelCase for property names: `clientName`, `dueDate`, `lineItems`
230
+
231
+ - Props interface should be named `[SectionName]Props` (e.g., `InvoiceListProps`)
232
+
233
+ - Add JSDoc comments for callback props to explain when they're called
234
+
235
+ - **Match entity names from the global data model if one exists**
236
+
237
+ ## Step 7: Confirm and Next Steps
238
+
239
+ Let the user know:
240
+
241
+ "I've created two files for **[Section Title]**:
242
+
243
+ 1. `product/sections/[section-id]/data.json` - Sample data with [X] records
244
+
245
+ 2. `product/sections/[section-id]/types.ts` - TypeScript interfaces for type safety
246
+
247
+ The types include:
248
+
249
+ - `[Entity]` - The main data type
250
+ - `[SectionName]Props` - Props interface for the component (includes callbacks for [list actions])
251
+
252
+ When you're ready, run `/design-screen` to create the screen design for this section."
253
+
254
+ ## Important Notes
255
+
256
+ - Generate realistic, believable sample data - not "Lorem ipsum" or "Test 123"
257
+ - Include 5-10 sample records for main entities (enough to show a realistic list)
258
+ - Include edge cases: empty arrays, long text, different statuses
259
+ - Keep field names clear and TypeScript-friendly (camelCase)
260
+ - The data structure should directly map to the spec's user flows
261
+ - Always generate types.ts alongside data.json
262
+ - Callback props should cover all actions mentioned in the spec
263
+ - **Use entity names from the global data model for consistency across sections**
@@ -0,0 +1,112 @@
1
+ # Screenshot Screen Design
2
+
3
+ You are helping the user capture a screenshot of a screen design they've created. The screenshot will be saved to the product folder for documentation purposes.
4
+
5
+ ## Prerequisites: Check for Playwright MCP
6
+
7
+ Before proceeding, verify that you have access to the Playwright MCP tool. Look for a tool named `browser_take_screenshot` or `mcp__playwright__browser_take_screenshot`.
8
+
9
+ If the Playwright MCP tool is not available, output this EXACT message to the user (copy it verbatim, do not modify or "correct" it):
10
+
11
+ ---
12
+ To capture screenshots, I need the Playwright MCP server installed. Please run:
13
+
14
+ ```
15
+ claude mcp add playwright npx @playwright/mcp@latest
16
+ ```
17
+
18
+ Then restart this Claude Code session and run `/screenshot-design` again.
19
+ ---
20
+
21
+ Do not substitute different package names or modify the command. Output it exactly as written above.
22
+
23
+ Do not proceed with the rest of this command if Playwright MCP is not available.
24
+
25
+ ## Step 1: Identify the Screen Design
26
+
27
+ First, determine which screen design to screenshot.
28
+
29
+ Read `/product/product-roadmap.md` to get the list of available sections, then check `src/sections/` to see what screen designs exist.
30
+
31
+ If only one screen design exists across all sections, auto-select it.
32
+
33
+ If multiple screen designs exist, use the AskUserQuestion tool to ask which one to screenshot:
34
+
35
+ "Which screen design would you like to screenshot?"
36
+
37
+ Present the available screen designs as options, grouped by section:
38
+ - [Section Name] / [ScreenDesignName]
39
+ - [Section Name] / [ScreenDesignName]
40
+
41
+ ## Step 2: Start the Dev Server
42
+
43
+ Start the dev server yourself using Bash. Run `npm run dev` in the background so you can continue with the screenshot capture.
44
+
45
+ Do NOT ask the user if the server is running or tell them to start it. You must start it yourself.
46
+
47
+ After starting the server, wait a few seconds for it to be ready before navigating to the screen design URL.
48
+
49
+ ## Step 3: Capture the Screenshot
50
+
51
+ Use the Playwright MCP tool to navigate to the screen design and capture a screenshot.
52
+
53
+ The screen design URL pattern is: `http://localhost:3000/sections/[section-id]/screen-designs/[screen-design-name]`
54
+
55
+ 1. First, use `browser_navigate` to go to the screen design URL
56
+ 2. Wait for the page to fully load
57
+ 3. **Click the "Hide" link** in the navigation bar to hide it before taking the screenshot. The Hide button has the attribute `data-hide-header` which you can use to locate it.
58
+ 4. Use `browser_take_screenshot` to capture the page (without the navigation bar)
59
+
60
+ **Screenshot specifications:**
61
+ - Capture at desktop viewport width (1280px recommended)
62
+ - Use **full page screenshot** to capture the entire scrollable content (not just the viewport)
63
+ - PNG format for best quality
64
+
65
+ When using `browser_take_screenshot`, set `fullPage: true` to capture the entire page including content below the fold.
66
+
67
+ ## Step 4: Save the Screenshot
68
+
69
+ The Playwright MCP tool can only save screenshots to its default output directory (`.playwright-mcp/`). You must save the screenshot there first, then copy it to the product folder.
70
+
71
+ 1. **First**, use `browser_take_screenshot` with just a filename (no path):
72
+ - Use a simple filename like `dashboard.png` or `invoice-list.png`
73
+ - The file will be saved to `.playwright-mcp/[filename].png`
74
+
75
+ 2. **Then**, copy the file to the product folder using Bash:
76
+ ```bash
77
+ cp .playwright-mcp/[filename].png product/sections/[section-id]/[filename].png
78
+ ```
79
+
80
+ **Naming convention:** `[screen-design-name]-[variant].png`
81
+
82
+ Examples:
83
+ - `invoice-list.png` (main view)
84
+ - `invoice-list-dark.png` (dark mode variant)
85
+ - `invoice-detail.png`
86
+ - `invoice-form-empty.png` (empty state)
87
+
88
+ If the user wants both light and dark mode screenshots, capture both.
89
+
90
+ ## Step 5: Confirm Completion
91
+
92
+ Let the user know:
93
+
94
+ "I've saved the screenshot to `product/sections/[section-id]/[filename].png`.
95
+
96
+ The screenshot captures the **[ScreenDesignName]** screen design for the **[Section Title]** section."
97
+
98
+ If they want additional screenshots (e.g., dark mode, different states):
99
+
100
+ "Would you like me to capture any additional screenshots? For example:
101
+ - Dark mode version
102
+ - Mobile viewport
103
+ - Different states (empty, loading, etc.)"
104
+
105
+ ## Important Notes
106
+
107
+ - Start the dev server yourself - do not ask the user to do it
108
+ - Screenshots are saved to `product/sections/[section-id]/` alongside spec.md and data.json
109
+ - Use descriptive filenames that indicate the screen design and any variant (dark mode, mobile, etc.)
110
+ - Capture at a consistent viewport width for documentation consistency
111
+ - Always capture full page screenshots to include all scrollable content
112
+ - After you're done, you may kill the dev server if you started it