@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.
- package/README.md +39 -0
- package/bin/cli.js +133 -0
- package/package.json +40 -0
- package/src/template/App.tsx +68 -0
- package/src/template/agent-os/commands/create-tasks/1-get-spec-requirements.md +19 -0
- package/src/template/agent-os/commands/create-tasks/2-create-tasks-list.md +234 -0
- package/src/template/agent-os/commands/create-tasks/create-tasks.md +254 -0
- package/src/template/agent-os/commands/design-screen/design-screen.md +32 -0
- package/src/template/agent-os/commands/design-shell/design-shell.md +34 -0
- package/src/template/agent-os/commands/design-tokens/design-tokens.md +36 -0
- package/src/template/agent-os/commands/export-product/export-product.md +44 -0
- package/src/template/agent-os/commands/implement-tasks/1-determine-tasks.md +13 -0
- package/src/template/agent-os/commands/implement-tasks/2-implement-tasks.md +63 -0
- package/src/template/agent-os/commands/implement-tasks/3-verify-implementation.md +113 -0
- package/src/template/agent-os/commands/implement-tasks/implement-tasks.md +207 -0
- package/src/template/agent-os/commands/initialize-design/initialize-design.md +54 -0
- package/src/template/agent-os/commands/orchestrate-tasks/orchestrate-tasks.md +180 -0
- package/src/template/agent-os/commands/plan-product/1-product-concept.md +53 -0
- package/src/template/agent-os/commands/plan-product/2-create-mission.md +78 -0
- package/src/template/agent-os/commands/plan-product/3-create-roadmap.md +73 -0
- package/src/template/agent-os/commands/plan-product/4-create-tech-stack.md +46 -0
- package/src/template/agent-os/commands/plan-product/plan-product.md +241 -0
- package/src/template/agent-os/commands/sample-data/sample-data.md +51 -0
- package/src/template/agent-os/commands/scaffold-implementation/scaffold-implementation.md +36 -0
- package/src/template/agent-os/commands/screenshot-design/screenshot-design.md +21 -0
- package/src/template/agent-os/commands/shape-spec/1-initialize-spec.md +95 -0
- package/src/template/agent-os/commands/shape-spec/2-shape-spec.md +300 -0
- package/src/template/agent-os/commands/shape-spec/shape-spec.md +40 -0
- package/src/template/agent-os/commands/write-spec/write-spec.md +134 -0
- package/src/template/agent-os/config.yml +13 -0
- package/src/template/agent-os/product/mission.md +29 -0
- package/src/template/agent-os/product/roadmap.md +9 -0
- package/src/template/agent-os/product/tech-stack.md +14 -0
- package/src/template/agent-os/specs/README.md +1 -0
- package/src/template/agent-os/standards/backend/api.md +10 -0
- package/src/template/agent-os/standards/backend/migrations.md +9 -0
- package/src/template/agent-os/standards/backend/models.md +10 -0
- package/src/template/agent-os/standards/backend/queries.md +9 -0
- package/src/template/agent-os/standards/frontend/accessibility.md +10 -0
- package/src/template/agent-os/standards/frontend/components.md +11 -0
- package/src/template/agent-os/standards/frontend/css.md +7 -0
- package/src/template/agent-os/standards/frontend/responsive.md +11 -0
- package/src/template/agent-os/standards/global/coding-style.md +10 -0
- package/src/template/agent-os/standards/global/commenting.md +5 -0
- package/src/template/agent-os/standards/global/conventions.md +11 -0
- package/src/template/agent-os/standards/global/error-handling.md +9 -0
- package/src/template/agent-os/standards/global/tech-stack.md +31 -0
- package/src/template/agent-os/standards/global/validation.md +11 -0
- package/src/template/agent-os/standards/testing/test-writing.md +9 -0
- package/src/template/agent-os-ui/README.md +73 -0
- package/src/template/agent-os-ui/package-lock.json +5028 -0
- package/src/template/agent-os-ui/package.json +52 -0
- package/src/template/agent-os-ui/postcss.config.js +6 -0
- package/src/template/agent-os-ui/src/components/AgentShell.tsx +31 -0
- package/src/template/agent-os-ui/src/components/AgentSidebar.tsx +65 -0
- package/src/template/agent-os-ui/src/components/GuidanceCard.tsx +75 -0
- package/src/template/agent-os-ui/src/components/MarkdownViewer.tsx +25 -0
- package/src/template/agent-os-ui/src/components/PromptButton.tsx +28 -0
- package/src/template/agent-os-ui/src/components/StatusItem.tsx +45 -0
- package/src/template/agent-os-ui/src/components/ThemeToggle.tsx +72 -0
- package/src/template/agent-os-ui/src/index.ts +11 -0
- package/src/template/agent-os-ui/src/style.css +3 -0
- package/src/template/agent-os-ui/tailwind.config.js +50 -0
- package/src/template/agent-os-ui/tsconfig.json +33 -0
- package/src/template/agent-os-ui/vite.config.ts +32 -0
- package/src/template/control-center/backend/backend.log +2 -0
- package/src/template/control-center/backend/index.js +228 -0
- package/src/template/control-center/backend/package-lock.json +951 -0
- package/src/template/control-center/backend/package.json +19 -0
- package/src/template/control-center/frontend/README.md +73 -0
- package/src/template/control-center/frontend/eslint.config.js +23 -0
- package/src/template/control-center/frontend/index.html +21 -0
- package/src/template/control-center/frontend/package-lock.json +5752 -0
- package/src/template/control-center/frontend/package.json +42 -0
- package/src/template/control-center/frontend/public/runtime-config.json +11 -0
- package/src/template/control-center/frontend/public/vite.svg +1 -0
- package/src/template/control-center/frontend/src/App.css +42 -0
- package/src/template/control-center/frontend/src/App.tsx +738 -0
- package/src/template/control-center/frontend/src/assets/react.svg +1 -0
- package/src/template/control-center/frontend/src/components/ThemeToggle.tsx +64 -0
- package/src/template/control-center/frontend/src/components/ui/ToastContext.tsx +81 -0
- package/src/template/control-center/frontend/src/index.css +194 -0
- package/src/template/control-center/frontend/src/main.tsx +14 -0
- package/src/template/control-center/frontend/src/vite-env.d.ts +1 -0
- package/src/template/control-center/frontend/tsconfig.app.json +28 -0
- package/src/template/control-center/frontend/tsconfig.json +7 -0
- package/src/template/control-center/frontend/tsconfig.node.json +26 -0
- package/src/template/control-center/frontend/vite.config.ts +22 -0
- package/src/template/design/.claude/commands/design-os/data-model.md +122 -0
- package/src/template/design/.claude/commands/design-os/design-screen.md +309 -0
- package/src/template/design/.claude/commands/design-os/design-shell.md +238 -0
- package/src/template/design/.claude/commands/design-os/design-tokens.md +166 -0
- package/src/template/design/.claude/commands/design-os/export-product.md +1105 -0
- package/src/template/design/.claude/commands/design-os/product-roadmap.md +121 -0
- package/src/template/design/.claude/commands/design-os/product-vision.md +99 -0
- package/src/template/design/.claude/commands/design-os/sample-data.md +263 -0
- package/src/template/design/.claude/commands/design-os/screenshot-design.md +112 -0
- package/src/template/design/.claude/commands/design-os/shape-section.md +138 -0
- package/src/template/design/.claude/skills/frontend-design/SKILL.md +42 -0
- package/src/template/design/.github/CODE_OF_CONDUCT.md +5 -0
- package/src/template/design/.github/CONTRIBUTING.md +51 -0
- package/src/template/design/.github/ISSUE_TEMPLATE/config.yml +22 -0
- package/src/template/design/.github/PULL_REQUEST_TEMPLATE.md +20 -0
- package/src/template/design/.github/SECURITY.yml +5 -0
- package/src/template/design/.github/SUPPORT.md +19 -0
- package/src/template/design/.github/workflows/pr-decline.yml +135 -0
- package/src/template/design/.github/workflows/stale.yml +25 -0
- package/src/template/design/CHANGELOG.md +13 -0
- package/src/template/design/LICENSE +21 -0
- package/src/template/design/README.md +54 -0
- package/src/template/design/agents.md +218 -0
- package/src/template/design/claude.md +1 -0
- package/src/template/design/components.json +22 -0
- package/src/template/design/docs/codebase-implementation.md +153 -0
- package/src/template/design/docs/design-section.md +135 -0
- package/src/template/design/docs/export.md +149 -0
- package/src/template/design/docs/getting-started.md +59 -0
- package/src/template/design/docs/index.md +56 -0
- package/src/template/design/docs/product-planning.md +113 -0
- package/src/template/design/docs/requirements.md +22 -0
- package/src/template/design/docs/usage.md +62 -0
- package/src/template/design/eslint.config.js +23 -0
- package/src/template/design/index.html +21 -0
- package/src/template/design/package-lock.json +5473 -0
- package/src/template/design/package.json +47 -0
- package/src/template/design/product-plan.zip +0 -0
- package/src/template/design/public/vite.svg +1 -0
- package/src/template/design/src/assets/react.svg +1 -0
- package/src/template/design/src/components/AppLayout.tsx +95 -0
- package/src/template/design/src/components/DataCard.tsx +139 -0
- package/src/template/design/src/components/DataModelPage.tsx +120 -0
- package/src/template/design/src/components/DesignPage.tsx +284 -0
- package/src/template/design/src/components/EmptyState.tsx +155 -0
- package/src/template/design/src/components/ExportPage.tsx +344 -0
- package/src/template/design/src/components/NextPhaseButton.tsx +33 -0
- package/src/template/design/src/components/PhaseNav.tsx +152 -0
- package/src/template/design/src/components/PhaseWarningBanner.tsx +81 -0
- package/src/template/design/src/components/ProductOverviewCard.tsx +102 -0
- package/src/template/design/src/components/ProductPage.tsx +97 -0
- package/src/template/design/src/components/ScreenDesignPage.tsx +370 -0
- package/src/template/design/src/components/ScreenDesignsCard.tsx +49 -0
- package/src/template/design/src/components/SectionPage.tsx +256 -0
- package/src/template/design/src/components/SectionsCard.tsx +47 -0
- package/src/template/design/src/components/SectionsPage.tsx +181 -0
- package/src/template/design/src/components/ShellCard.tsx +85 -0
- package/src/template/design/src/components/ShellDesignPage.tsx +242 -0
- package/src/template/design/src/components/SpecCard.tsx +121 -0
- package/src/template/design/src/components/StepIndicator.tsx +75 -0
- package/src/template/design/src/components/ThemeToggle.tsx +86 -0
- package/src/template/design/src/components/ui/ToastContext.tsx +81 -0
- package/src/template/design/src/components/ui/avatar.tsx +53 -0
- package/src/template/design/src/components/ui/badge.tsx +46 -0
- package/src/template/design/src/components/ui/button.tsx +60 -0
- package/src/template/design/src/components/ui/card.tsx +92 -0
- package/src/template/design/src/components/ui/collapsible.tsx +48 -0
- package/src/template/design/src/components/ui/dialog.tsx +143 -0
- package/src/template/design/src/components/ui/dropdown-menu.tsx +255 -0
- package/src/template/design/src/components/ui/input.tsx +21 -0
- package/src/template/design/src/components/ui/label.tsx +22 -0
- package/src/template/design/src/components/ui/progress.tsx +24 -0
- package/src/template/design/src/components/ui/scroll-area.tsx +18 -0
- package/src/template/design/src/components/ui/select.tsx +67 -0
- package/src/template/design/src/components/ui/separator.tsx +28 -0
- package/src/template/design/src/components/ui/sheet.tsx +137 -0
- package/src/template/design/src/components/ui/skeleton.tsx +13 -0
- package/src/template/design/src/components/ui/switch.tsx +46 -0
- package/src/template/design/src/components/ui/table.tsx +116 -0
- package/src/template/design/src/components/ui/tabs.tsx +64 -0
- package/src/template/design/src/index.css +284 -0
- package/src/template/design/src/lib/data-model-loader.ts +91 -0
- package/src/template/design/src/lib/design-system-loader.ts +101 -0
- package/src/template/design/src/lib/product-loader.ts +221 -0
- package/src/template/design/src/lib/router.tsx +52 -0
- package/src/template/design/src/lib/section-loader.ts +272 -0
- package/src/template/design/src/lib/shell-loader.ts +175 -0
- package/src/template/design/src/lib/utils.ts +6 -0
- package/src/template/design/src/main.tsx +15 -0
- package/src/template/design/src/sections/.gitkeep +0 -0
- package/src/template/design/src/sections/ai-orchestration-engine-oai/OrchestrationEngine.tsx +348 -0
- package/src/template/design/src/sections/core-platform-shell/AppShell.tsx +403 -0
- package/src/template/design/src/sections/gemini-live-integration/GeminiIntegration.tsx +332 -0
- package/src/template/design/src/sections/interactive-2d-canvas/WhiteboardCanvas.tsx +334 -0
- package/src/template/design/src/sections/participation-equity-tracker/EquityTracker.tsx +383 -0
- package/src/template/design/src/sections/persistent-memory-system/PersistentMemory.tsx +308 -0
- package/src/template/design/src/sections/real-time-communication-layer/VideoSession.tsx +342 -0
- package/src/template/design/src/sections/visual-intelligence-agents/VisualAgents.tsx +311 -0
- package/src/template/design/src/types/product.ts +97 -0
- package/src/template/design/src/types/section.ts +33 -0
- package/src/template/design/tsconfig.app.json +34 -0
- package/src/template/design/tsconfig.json +13 -0
- package/src/template/design/tsconfig.node.json +26 -0
- package/src/template/design/vite.config.ts +18 -0
- package/src/template/package.json +27 -0
- package/src/template/vite.config.ts +16 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
# Design Screen
|
|
2
|
+
|
|
3
|
+
You are helping the user create a screen design for a section of their product. The screen design will be a props-based React component that can be exported and integrated into any React codebase.
|
|
4
|
+
|
|
5
|
+
## Step 1: Check Prerequisites
|
|
6
|
+
|
|
7
|
+
First, identify the target section and verify that `spec.md`, `data.json`, and `types.ts` all exist.
|
|
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 create a screen design for.
|
|
12
|
+
|
|
13
|
+
Then verify all required files exist:
|
|
14
|
+
|
|
15
|
+
- `product/sections/[section-id]/spec.md`
|
|
16
|
+
- `product/sections/[section-id]/data.json`
|
|
17
|
+
- `product/sections/[section-id]/types.ts`
|
|
18
|
+
|
|
19
|
+
If spec.md doesn't exist:
|
|
20
|
+
|
|
21
|
+
"I don't see a specification for **[Section Title]** yet. Please run `/shape-section` first to define the section's requirements."
|
|
22
|
+
|
|
23
|
+
If data.json or types.ts don't exist:
|
|
24
|
+
|
|
25
|
+
"I don't see sample data for **[Section Title]** yet. Please run `/sample-data` first to create sample data and types for the screen designs."
|
|
26
|
+
|
|
27
|
+
Stop here if any file is missing.
|
|
28
|
+
|
|
29
|
+
## Step 2: Check for Design System and Shell
|
|
30
|
+
|
|
31
|
+
Check for optional enhancements:
|
|
32
|
+
|
|
33
|
+
**Design Tokens:**
|
|
34
|
+
- Check if `/product/design-system/colors.json` exists
|
|
35
|
+
- Check if `/product/design-system/typography.json` exists
|
|
36
|
+
|
|
37
|
+
If design tokens exist, read them and use them for styling. If they don't exist, show a warning:
|
|
38
|
+
|
|
39
|
+
"Note: Design tokens haven't been defined yet. I'll use default styling, but for consistent branding, consider running `/design-tokens` first."
|
|
40
|
+
|
|
41
|
+
**Shell:**
|
|
42
|
+
- Check if `src/shell/components/AppShell.tsx` exists
|
|
43
|
+
|
|
44
|
+
If shell exists, the screen design will render inside the shell in Design OS. If not, show a warning:
|
|
45
|
+
|
|
46
|
+
"Note: An application shell hasn't been designed yet. The screen design will render standalone. Consider running `/design-shell` first to see section screen designs in the full app context."
|
|
47
|
+
|
|
48
|
+
## Step 3: Analyze Requirements
|
|
49
|
+
|
|
50
|
+
Read and analyze all three files:
|
|
51
|
+
|
|
52
|
+
1. **spec.md** - Understand the user flows and UI requirements
|
|
53
|
+
2. **data.json** - Understand the data structure and sample content
|
|
54
|
+
3. **types.ts** - Understand the TypeScript interfaces and available callbacks
|
|
55
|
+
|
|
56
|
+
Identify what views are needed based on the spec. Common patterns:
|
|
57
|
+
|
|
58
|
+
- List/dashboard view (showing multiple items)
|
|
59
|
+
- Detail view (showing a single item)
|
|
60
|
+
- Form/create view (for adding/editing)
|
|
61
|
+
|
|
62
|
+
## Step 4: Clarify the Screen Design Scope
|
|
63
|
+
|
|
64
|
+
If the spec implies multiple views, use the AskUserQuestion tool to confirm which view to build first:
|
|
65
|
+
|
|
66
|
+
"The specification suggests a few different views for **[Section Title]**:
|
|
67
|
+
|
|
68
|
+
1. **[View 1]** - [Brief description]
|
|
69
|
+
2. **[View 2]** - [Brief description]
|
|
70
|
+
|
|
71
|
+
Which view should I create first?"
|
|
72
|
+
|
|
73
|
+
If there's only one obvious view, proceed directly.
|
|
74
|
+
|
|
75
|
+
## Step 5: Invoke the Frontend Design Skill
|
|
76
|
+
|
|
77
|
+
Before creating the screen design, read the `frontend-design` skill to ensure high-quality design output.
|
|
78
|
+
|
|
79
|
+
Read the file at `.claude/skills/frontend-design/SKILL.md` and follow its guidance for creating distinctive, production-grade interfaces.
|
|
80
|
+
|
|
81
|
+
## Step 6: Create the Props-Based Component
|
|
82
|
+
|
|
83
|
+
Create the main component file at `src/sections/[section-id]/components/[ViewName].tsx`.
|
|
84
|
+
|
|
85
|
+
### Component Structure
|
|
86
|
+
|
|
87
|
+
The component MUST:
|
|
88
|
+
|
|
89
|
+
- Import types from the types.ts file
|
|
90
|
+
- Accept all data via props (never import data.json directly)
|
|
91
|
+
- Accept callback props for all actions
|
|
92
|
+
- Be fully self-contained and portable
|
|
93
|
+
|
|
94
|
+
Example:
|
|
95
|
+
|
|
96
|
+
```tsx
|
|
97
|
+
import type { InvoiceListProps } from '@/../product/sections/[section-id]/types'
|
|
98
|
+
|
|
99
|
+
export function InvoiceList({
|
|
100
|
+
invoices,
|
|
101
|
+
onView,
|
|
102
|
+
onEdit,
|
|
103
|
+
onDelete,
|
|
104
|
+
onCreate
|
|
105
|
+
}: InvoiceListProps) {
|
|
106
|
+
return (
|
|
107
|
+
<div className="max-w-4xl mx-auto">
|
|
108
|
+
{/* Component content here */}
|
|
109
|
+
|
|
110
|
+
{/* Example: Using a callback */}
|
|
111
|
+
<button onClick={onCreate}>Create Invoice</button>
|
|
112
|
+
|
|
113
|
+
{/* Example: Mapping data with callbacks */}
|
|
114
|
+
{invoices.map(invoice => (
|
|
115
|
+
<div key={invoice.id}>
|
|
116
|
+
<span>{invoice.clientName}</span>
|
|
117
|
+
<button onClick={() => onView?.(invoice.id)}>View</button>
|
|
118
|
+
<button onClick={() => onEdit?.(invoice.id)}>Edit</button>
|
|
119
|
+
<button onClick={() => onDelete?.(invoice.id)}>Delete</button>
|
|
120
|
+
</div>
|
|
121
|
+
))}
|
|
122
|
+
</div>
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Design Requirements
|
|
128
|
+
|
|
129
|
+
- **Mobile responsive:** Use Tailwind responsive prefixes (`sm:`, `md:`, `lg:`) and ensure the design layout works gracefully on mobile, tablet and desktop screen sizes.
|
|
130
|
+
- **Light & dark mode:** Use `dark:` variants for all colors
|
|
131
|
+
- **Use design tokens:** If defined, apply the product's color palette and typography
|
|
132
|
+
- **Follow the frontend-design skill:** Create distinctive, memorable interfaces
|
|
133
|
+
|
|
134
|
+
### Applying Design Tokens
|
|
135
|
+
|
|
136
|
+
**If `/product/design-system/colors.json` exists:**
|
|
137
|
+
- Use the primary color for buttons, links, and key accents
|
|
138
|
+
- Use the secondary color for tags, highlights, secondary elements
|
|
139
|
+
- Use the neutral color for backgrounds, text, and borders
|
|
140
|
+
- Example: If primary is `lime`, use `lime-500`, `lime-600`, etc. for primary actions
|
|
141
|
+
|
|
142
|
+
**If `/product/design-system/typography.json` exists:**
|
|
143
|
+
- Note the font choices for reference in comments
|
|
144
|
+
- The fonts will be applied at the app level, but use appropriate font weights
|
|
145
|
+
|
|
146
|
+
**If design tokens don't exist:**
|
|
147
|
+
- Fall back to `stone` for neutrals and `lime` for accents (Design OS defaults)
|
|
148
|
+
|
|
149
|
+
### What to Include
|
|
150
|
+
|
|
151
|
+
- Implement ALL user flows and UI requirements from the spec
|
|
152
|
+
- Use the prop data (not hardcoded values)
|
|
153
|
+
- Include realistic UI states (hover, active, etc.)
|
|
154
|
+
- Use the callback props for all interactive elements
|
|
155
|
+
- Handle optional callbacks with optional chaining: `onClick={() => onDelete?.(id)}`
|
|
156
|
+
|
|
157
|
+
### What NOT to Include
|
|
158
|
+
|
|
159
|
+
- No `import data from` statements - data comes via props
|
|
160
|
+
- No features not specified in the spec
|
|
161
|
+
- No routing logic - callbacks handle navigation intent
|
|
162
|
+
- No navigation elements (shell handles navigation)
|
|
163
|
+
|
|
164
|
+
## Step 7: Create Sub-Components (If Needed)
|
|
165
|
+
|
|
166
|
+
For complex views, break down into sub-components. Each sub-component should also be props-based.
|
|
167
|
+
|
|
168
|
+
Create sub-components at `src/sections/[section-id]/components/[SubComponent].tsx`.
|
|
169
|
+
|
|
170
|
+
Example:
|
|
171
|
+
|
|
172
|
+
```tsx
|
|
173
|
+
import type { Invoice } from '@/../product/sections/[section-id]/types'
|
|
174
|
+
|
|
175
|
+
interface InvoiceRowProps {
|
|
176
|
+
invoice: Invoice
|
|
177
|
+
onView?: () => void
|
|
178
|
+
onEdit?: () => void
|
|
179
|
+
onDelete?: () => void
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function InvoiceRow({ invoice, onView, onEdit, onDelete }: InvoiceRowProps) {
|
|
183
|
+
return (
|
|
184
|
+
<div className="flex items-center justify-between p-4 border-b">
|
|
185
|
+
<div>
|
|
186
|
+
<p className="font-medium">{invoice.clientName}</p>
|
|
187
|
+
<p className="text-sm text-stone-500">{invoice.invoiceNumber}</p>
|
|
188
|
+
</div>
|
|
189
|
+
<div className="flex gap-2">
|
|
190
|
+
<button onClick={onView}>View</button>
|
|
191
|
+
<button onClick={onEdit}>Edit</button>
|
|
192
|
+
<button onClick={onDelete}>Delete</button>
|
|
193
|
+
</div>
|
|
194
|
+
</div>
|
|
195
|
+
)
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Then import and use in the main component:
|
|
200
|
+
|
|
201
|
+
```tsx
|
|
202
|
+
import { InvoiceRow } from './InvoiceRow'
|
|
203
|
+
|
|
204
|
+
export function InvoiceList({ invoices, onView, onEdit, onDelete }: InvoiceListProps) {
|
|
205
|
+
return (
|
|
206
|
+
<div>
|
|
207
|
+
{invoices.map(invoice => (
|
|
208
|
+
<InvoiceRow
|
|
209
|
+
key={invoice.id}
|
|
210
|
+
invoice={invoice}
|
|
211
|
+
onView={() => onView?.(invoice.id)}
|
|
212
|
+
onEdit={() => onEdit?.(invoice.id)}
|
|
213
|
+
onDelete={() => onDelete?.(invoice.id)}
|
|
214
|
+
/>
|
|
215
|
+
))}
|
|
216
|
+
</div>
|
|
217
|
+
)
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## Step 8: Create the Preview Wrapper
|
|
222
|
+
|
|
223
|
+
Create a preview wrapper at `src/sections/[section-id]/[ViewName].tsx` (note: this is in the section root, not in components/).
|
|
224
|
+
|
|
225
|
+
This wrapper is what Design OS renders. It imports the sample data and feeds it to the props-based component.
|
|
226
|
+
|
|
227
|
+
Example:
|
|
228
|
+
|
|
229
|
+
```tsx
|
|
230
|
+
import data from '@/../product/sections/[section-id]/data.json'
|
|
231
|
+
import { InvoiceList } from './components/InvoiceList'
|
|
232
|
+
|
|
233
|
+
export default function InvoiceListPreview() {
|
|
234
|
+
return (
|
|
235
|
+
<InvoiceList
|
|
236
|
+
invoices={data.invoices}
|
|
237
|
+
onView={(id) => console.log('View invoice:', id)}
|
|
238
|
+
onEdit={(id) => console.log('Edit invoice:', id)}
|
|
239
|
+
onDelete={(id) => console.log('Delete invoice:', id)}
|
|
240
|
+
onCreate={() => console.log('Create new invoice')}
|
|
241
|
+
/>
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
The preview wrapper:
|
|
247
|
+
|
|
248
|
+
- Has a `default` export (required for Design OS routing)
|
|
249
|
+
- Imports sample data from data.json
|
|
250
|
+
- Passes data to the component via props
|
|
251
|
+
- Provides console.log handlers for callbacks (for testing interactions)
|
|
252
|
+
- Is NOT exported to the user's codebase - it's only for Design OS
|
|
253
|
+
- **Will render inside the shell** if one has been designed
|
|
254
|
+
|
|
255
|
+
## Step 9: Create Component Index
|
|
256
|
+
|
|
257
|
+
Create an index file at `src/sections/[section-id]/components/index.ts` to cleanly export all components.
|
|
258
|
+
|
|
259
|
+
Example:
|
|
260
|
+
|
|
261
|
+
```tsx
|
|
262
|
+
export { InvoiceList } from './InvoiceList'
|
|
263
|
+
export { InvoiceRow } from './InvoiceRow'
|
|
264
|
+
// Add other sub-components as needed
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## Step 10: Confirm and Next Steps
|
|
268
|
+
|
|
269
|
+
Let the user know:
|
|
270
|
+
|
|
271
|
+
"I've created the screen design for **[Section Title]**:
|
|
272
|
+
|
|
273
|
+
**Exportable components** (props-based, portable):
|
|
274
|
+
|
|
275
|
+
- `src/sections/[section-id]/components/[ViewName].tsx`
|
|
276
|
+
- `src/sections/[section-id]/components/[SubComponent].tsx` (if created)
|
|
277
|
+
- `src/sections/[section-id]/components/index.ts`
|
|
278
|
+
|
|
279
|
+
**Preview wrapper** (for Design OS only):
|
|
280
|
+
|
|
281
|
+
- `src/sections/[section-id]/[ViewName].tsx`
|
|
282
|
+
|
|
283
|
+
**Important:** Restart your dev server to see the changes.
|
|
284
|
+
|
|
285
|
+
[If shell exists]: The screen design will render inside your application shell, showing the full app experience.
|
|
286
|
+
|
|
287
|
+
[If design tokens exist]: I've applied your color palette ([primary], [secondary], [neutral]) and typography choices.
|
|
288
|
+
|
|
289
|
+
**Next steps:**
|
|
290
|
+
|
|
291
|
+
- Run `/screenshot-design` to capture a screenshot of this screen design for documentation
|
|
292
|
+
- If the spec calls for additional views, run `/design-screen` again to create them
|
|
293
|
+
- When all sections are complete, run `/export-product` to generate the complete export package"
|
|
294
|
+
|
|
295
|
+
If the spec indicates additional views are needed:
|
|
296
|
+
|
|
297
|
+
"The specification also calls for [other view(s)]. Run `/design-screen` again to create those, then `/screenshot-design` to capture each one."
|
|
298
|
+
|
|
299
|
+
## Important Notes
|
|
300
|
+
|
|
301
|
+
- ALWAYS read the `frontend-design` skill before creating screen designs
|
|
302
|
+
- Components MUST be props-based - never import data.json in exportable components
|
|
303
|
+
- The preview wrapper is the ONLY file that imports data.json
|
|
304
|
+
- Use TypeScript interfaces from types.ts for all props
|
|
305
|
+
- Callbacks should be optional (use `?`) and called with optional chaining (`?.`)
|
|
306
|
+
- Always remind the user to restart the dev server after creating files
|
|
307
|
+
- Sub-components should also be props-based for maximum portability
|
|
308
|
+
- Apply design tokens when available for consistent branding
|
|
309
|
+
- Screen designs render inside the shell when viewed in Design OS (if shell exists)
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# Design Shell
|
|
2
|
+
|
|
3
|
+
You are helping the user design the application shell — the persistent navigation and layout that wraps all sections. This is a screen design, not implementation code.
|
|
4
|
+
|
|
5
|
+
## Step 1: Check Prerequisites
|
|
6
|
+
|
|
7
|
+
First, verify prerequisites exist:
|
|
8
|
+
|
|
9
|
+
1. Read `/product/product-overview.md` — Product name and description
|
|
10
|
+
2. Read `/product/product-roadmap.md` — Sections for navigation
|
|
11
|
+
3. Check if `/product/design-system/colors.json` and `/product/design-system/typography.json` exist
|
|
12
|
+
|
|
13
|
+
If overview or roadmap are missing:
|
|
14
|
+
|
|
15
|
+
"Before designing the shell, you need to define your product and sections. Please run:
|
|
16
|
+
1. `/product-vision` — Define your product
|
|
17
|
+
2. `/product-roadmap` — Define your sections"
|
|
18
|
+
|
|
19
|
+
Stop here if overview or roadmap are missing.
|
|
20
|
+
|
|
21
|
+
If design tokens are missing, show a warning but continue:
|
|
22
|
+
|
|
23
|
+
"Note: Design tokens haven't been defined yet. I'll proceed with default styling, but you may want to run `/design-tokens` first for consistent colors and typography."
|
|
24
|
+
|
|
25
|
+
## Step 2: Analyze Product Structure
|
|
26
|
+
|
|
27
|
+
Review the roadmap sections and present navigation options:
|
|
28
|
+
|
|
29
|
+
"I'm designing the shell for **[Product Name]**. Based on your roadmap, you have [N] sections:
|
|
30
|
+
|
|
31
|
+
1. **[Section 1]** — [Description]
|
|
32
|
+
2. **[Section 2]** — [Description]
|
|
33
|
+
3. **[Section 3]** — [Description]
|
|
34
|
+
|
|
35
|
+
Let's decide on the shell layout. Common patterns:
|
|
36
|
+
|
|
37
|
+
**A. Sidebar Navigation** — Vertical nav on the left, content on the right
|
|
38
|
+
Best for: Apps with many sections, dashboard-style tools, admin panels
|
|
39
|
+
|
|
40
|
+
**B. Top Navigation** — Horizontal nav at top, content below
|
|
41
|
+
Best for: Simpler apps, marketing-style products, fewer sections
|
|
42
|
+
|
|
43
|
+
**C. Minimal Header** — Just logo + user menu, sections accessed differently
|
|
44
|
+
Best for: Single-purpose tools, wizard-style flows
|
|
45
|
+
|
|
46
|
+
Which pattern fits **[Product Name]** best?"
|
|
47
|
+
|
|
48
|
+
Wait for their response.
|
|
49
|
+
|
|
50
|
+
## Step 3: Gather Design Details
|
|
51
|
+
|
|
52
|
+
Use AskUserQuestion to clarify:
|
|
53
|
+
|
|
54
|
+
- "Where should the user menu (avatar, logout) appear?"
|
|
55
|
+
- "Do you want the sidebar collapsible on mobile, or should it become a hamburger menu?"
|
|
56
|
+
- "Any additional items in the navigation? (Settings, Help, etc.)"
|
|
57
|
+
- "What should the 'home' or default view be when the app loads?"
|
|
58
|
+
|
|
59
|
+
## Step 4: Present Shell Specification
|
|
60
|
+
|
|
61
|
+
Once you understand their preferences:
|
|
62
|
+
|
|
63
|
+
"Here's the shell design for **[Product Name]**:
|
|
64
|
+
|
|
65
|
+
**Layout Pattern:** [Sidebar/Top Nav/Minimal]
|
|
66
|
+
|
|
67
|
+
**Navigation Structure:**
|
|
68
|
+
- [Nav Item 1] → [Section]
|
|
69
|
+
- [Nav Item 2] → [Section]
|
|
70
|
+
- [Nav Item 3] → [Section]
|
|
71
|
+
- [Additional items like Settings, Help]
|
|
72
|
+
|
|
73
|
+
**User Menu:**
|
|
74
|
+
- Location: [Top right / Bottom of sidebar]
|
|
75
|
+
- Contents: Avatar, user name, logout
|
|
76
|
+
|
|
77
|
+
**Responsive Behavior:**
|
|
78
|
+
- Desktop: [How it looks]
|
|
79
|
+
- Mobile: [How it adapts]
|
|
80
|
+
|
|
81
|
+
Does this match what you had in mind?"
|
|
82
|
+
|
|
83
|
+
Iterate until approved.
|
|
84
|
+
|
|
85
|
+
## Step 5: Create the Shell Specification
|
|
86
|
+
|
|
87
|
+
Create `/product/shell/spec.md`:
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
# Application Shell Specification
|
|
91
|
+
|
|
92
|
+
## Overview
|
|
93
|
+
[Description of the shell design and its purpose]
|
|
94
|
+
|
|
95
|
+
## Navigation Structure
|
|
96
|
+
- [Nav Item 1] → [Section 1]
|
|
97
|
+
- [Nav Item 2] → [Section 2]
|
|
98
|
+
- [Nav Item 3] → [Section 3]
|
|
99
|
+
- [Any additional nav items]
|
|
100
|
+
|
|
101
|
+
## User Menu
|
|
102
|
+
[Description of user menu location and contents]
|
|
103
|
+
|
|
104
|
+
## Layout Pattern
|
|
105
|
+
[Description of the layout — sidebar, top nav, etc.]
|
|
106
|
+
|
|
107
|
+
## Responsive Behavior
|
|
108
|
+
- **Desktop:** [Behavior]
|
|
109
|
+
- **Tablet:** [Behavior]
|
|
110
|
+
- **Mobile:** [Behavior]
|
|
111
|
+
|
|
112
|
+
## Design Notes
|
|
113
|
+
[Any additional design decisions or notes]
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Step 6: Create Shell Components
|
|
117
|
+
|
|
118
|
+
Create the shell components at `src/shell/components/`:
|
|
119
|
+
|
|
120
|
+
### AppShell.tsx
|
|
121
|
+
The main wrapper component that accepts children and provides the layout structure.
|
|
122
|
+
|
|
123
|
+
```tsx
|
|
124
|
+
interface AppShellProps {
|
|
125
|
+
children: React.ReactNode
|
|
126
|
+
navigationItems: Array<{ label: string; href: string; isActive?: boolean }>
|
|
127
|
+
user?: { name: string; avatarUrl?: string }
|
|
128
|
+
onNavigate?: (href: string) => void
|
|
129
|
+
onLogout?: () => void
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### MainNav.tsx
|
|
134
|
+
The navigation component (sidebar or top nav based on the chosen pattern).
|
|
135
|
+
|
|
136
|
+
### UserMenu.tsx
|
|
137
|
+
The user menu with avatar and dropdown.
|
|
138
|
+
|
|
139
|
+
### index.ts
|
|
140
|
+
Export all components.
|
|
141
|
+
|
|
142
|
+
**Component Requirements:**
|
|
143
|
+
- Use props for all data and callbacks (portable)
|
|
144
|
+
- Apply design tokens if they exist (colors, fonts)
|
|
145
|
+
- Support light and dark mode with `dark:` variants
|
|
146
|
+
- Be mobile responsive
|
|
147
|
+
- Use Tailwind CSS for styling
|
|
148
|
+
- Use lucide-react for icons
|
|
149
|
+
|
|
150
|
+
## Step 7: Create Shell Preview
|
|
151
|
+
|
|
152
|
+
Create `src/shell/ShellPreview.tsx` — a preview wrapper for viewing the shell in Design OS:
|
|
153
|
+
|
|
154
|
+
```tsx
|
|
155
|
+
import data from '@/../product/sections/[first-section]/data.json' // if exists
|
|
156
|
+
import { AppShell } from './components/AppShell'
|
|
157
|
+
|
|
158
|
+
export default function ShellPreview() {
|
|
159
|
+
const navigationItems = [
|
|
160
|
+
{ label: '[Section 1]', href: '/section-1', isActive: true },
|
|
161
|
+
{ label: '[Section 2]', href: '/section-2' },
|
|
162
|
+
{ label: '[Section 3]', href: '/section-3' },
|
|
163
|
+
]
|
|
164
|
+
|
|
165
|
+
const user = {
|
|
166
|
+
name: 'Alex Morgan',
|
|
167
|
+
avatarUrl: undefined,
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return (
|
|
171
|
+
<AppShell
|
|
172
|
+
navigationItems={navigationItems}
|
|
173
|
+
user={user}
|
|
174
|
+
onNavigate={(href) => console.log('Navigate to:', href)}
|
|
175
|
+
onLogout={() => console.log('Logout')}
|
|
176
|
+
>
|
|
177
|
+
<div className="p-8">
|
|
178
|
+
<h1 className="text-2xl font-bold mb-4">Content Area</h1>
|
|
179
|
+
<p className="text-stone-600 dark:text-stone-400">
|
|
180
|
+
Section content will render here.
|
|
181
|
+
</p>
|
|
182
|
+
</div>
|
|
183
|
+
</AppShell>
|
|
184
|
+
)
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Step 8: Apply Design Tokens
|
|
189
|
+
|
|
190
|
+
If design tokens exist, apply them to the shell components:
|
|
191
|
+
|
|
192
|
+
**Colors:**
|
|
193
|
+
- Read `/product/design-system/colors.json`
|
|
194
|
+
- Use primary color for active nav items, key accents
|
|
195
|
+
- Use secondary color for hover states, subtle highlights
|
|
196
|
+
- Use neutral color for backgrounds, borders, text
|
|
197
|
+
|
|
198
|
+
**Typography:**
|
|
199
|
+
- Read `/product/design-system/typography.json`
|
|
200
|
+
- Apply heading font to nav items and titles
|
|
201
|
+
- Apply body font to other text
|
|
202
|
+
- Include Google Fonts import in the preview
|
|
203
|
+
|
|
204
|
+
## Step 9: Confirm Completion
|
|
205
|
+
|
|
206
|
+
Let the user know:
|
|
207
|
+
|
|
208
|
+
"I've designed the application shell for **[Product Name]**:
|
|
209
|
+
|
|
210
|
+
**Created files:**
|
|
211
|
+
- `/product/shell/spec.md` — Shell specification
|
|
212
|
+
- `src/shell/components/AppShell.tsx` — Main shell wrapper
|
|
213
|
+
- `src/shell/components/MainNav.tsx` — Navigation component
|
|
214
|
+
- `src/shell/components/UserMenu.tsx` — User menu component
|
|
215
|
+
- `src/shell/components/index.ts` — Component exports
|
|
216
|
+
- `src/shell/ShellPreview.tsx` — Preview wrapper
|
|
217
|
+
|
|
218
|
+
**Shell features:**
|
|
219
|
+
- [Layout pattern] layout
|
|
220
|
+
- Navigation for all [N] sections
|
|
221
|
+
- User menu with avatar and logout
|
|
222
|
+
- Mobile responsive design
|
|
223
|
+
- Light/dark mode support
|
|
224
|
+
|
|
225
|
+
**Important:** Restart your dev server to see the changes.
|
|
226
|
+
|
|
227
|
+
When you design section screens with `/design-screen`, they will render inside this shell, showing the full app experience.
|
|
228
|
+
|
|
229
|
+
Next: Run `/shape-section` to start designing your first section."
|
|
230
|
+
|
|
231
|
+
## Important Notes
|
|
232
|
+
|
|
233
|
+
- The shell is a screen design — it demonstrates the navigation and layout design
|
|
234
|
+
- Components are props-based and portable to the user's codebase
|
|
235
|
+
- The preview wrapper is for Design OS only — not exported
|
|
236
|
+
- Apply design tokens when available for consistent styling
|
|
237
|
+
- Keep the shell focused on navigation chrome — no authentication UI
|
|
238
|
+
- Section screen designs will render inside the shell's content area
|