@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,284 @@
|
|
|
1
|
+
import { useMemo } from 'react'
|
|
2
|
+
import { Link } from 'react-router-dom'
|
|
3
|
+
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
|
4
|
+
import { AppLayout } from '@/components/AppLayout'
|
|
5
|
+
import { EmptyState } from '@/components/EmptyState'
|
|
6
|
+
import { StepIndicator, type StepStatus } from '@/components/StepIndicator'
|
|
7
|
+
import { NextPhaseButton } from '@/components/NextPhaseButton'
|
|
8
|
+
import { loadProductData } from '@/lib/product-loader'
|
|
9
|
+
import { ChevronRight, Layout } from 'lucide-react'
|
|
10
|
+
|
|
11
|
+
// Map Tailwind color names to actual color values for preview
|
|
12
|
+
const colorMap: Record<string, { light: string; base: string; dark: string }> = {
|
|
13
|
+
red: { light: '#fca5a5', base: '#ef4444', dark: '#dc2626' },
|
|
14
|
+
orange: { light: '#fdba74', base: '#f97316', dark: '#ea580c' },
|
|
15
|
+
amber: { light: '#fcd34d', base: '#f59e0b', dark: '#d97706' },
|
|
16
|
+
yellow: { light: '#fde047', base: '#eab308', dark: '#ca8a04' },
|
|
17
|
+
lime: { light: '#bef264', base: '#84cc16', dark: '#65a30d' },
|
|
18
|
+
green: { light: '#86efac', base: '#22c55e', dark: '#16a34a' },
|
|
19
|
+
emerald: { light: '#6ee7b7', base: '#10b981', dark: '#059669' },
|
|
20
|
+
teal: { light: '#5eead4', base: '#14b8a6', dark: '#0d9488' },
|
|
21
|
+
cyan: { light: '#67e8f9', base: '#06b6d4', dark: '#0891b2' },
|
|
22
|
+
sky: { light: '#7dd3fc', base: '#0ea5e9', dark: '#0284c7' },
|
|
23
|
+
blue: { light: '#93c5fd', base: '#3b82f6', dark: '#2563eb' },
|
|
24
|
+
indigo: { light: '#a5b4fc', base: '#6366f1', dark: '#4f46e5' },
|
|
25
|
+
violet: { light: '#c4b5fd', base: '#8b5cf6', dark: '#7c3aed' },
|
|
26
|
+
purple: { light: '#d8b4fe', base: '#a855f7', dark: '#9333ea' },
|
|
27
|
+
fuchsia: { light: '#f0abfc', base: '#d946ef', dark: '#c026d3' },
|
|
28
|
+
pink: { light: '#f9a8d4', base: '#ec4899', dark: '#db2777' },
|
|
29
|
+
rose: { light: '#fda4af', base: '#f43f5e', dark: '#e11d48' },
|
|
30
|
+
slate: { light: '#cbd5e1', base: '#64748b', dark: '#475569' },
|
|
31
|
+
gray: { light: '#d1d5db', base: '#6b7280', dark: '#4b5563' },
|
|
32
|
+
zinc: { light: '#d4d4d8', base: '#71717a', dark: '#52525b' },
|
|
33
|
+
neutral: { light: '#d4d4d4', base: '#737373', dark: '#525252' },
|
|
34
|
+
stone: { light: '#d6d3d1', base: '#78716c', dark: '#57534e' },
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Determine the status of each step on the Design page
|
|
39
|
+
* Steps: 1. Design Tokens, 2. Shell Design
|
|
40
|
+
*/
|
|
41
|
+
function getDesignPageStepStatuses(
|
|
42
|
+
hasDesignSystem: boolean,
|
|
43
|
+
hasShell: boolean
|
|
44
|
+
): StepStatus[] {
|
|
45
|
+
const statuses: StepStatus[] = []
|
|
46
|
+
|
|
47
|
+
// Step 1: Design Tokens
|
|
48
|
+
if (hasDesignSystem) {
|
|
49
|
+
statuses.push('completed')
|
|
50
|
+
} else {
|
|
51
|
+
statuses.push('current')
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Step 2: Shell
|
|
55
|
+
if (hasShell) {
|
|
56
|
+
statuses.push('completed')
|
|
57
|
+
} else if (hasDesignSystem) {
|
|
58
|
+
statuses.push('current')
|
|
59
|
+
} else {
|
|
60
|
+
statuses.push('upcoming')
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return statuses
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function DesignPage() {
|
|
67
|
+
const productData = useMemo(() => loadProductData(), [])
|
|
68
|
+
const designSystem = productData.designSystem
|
|
69
|
+
const shell = productData.shell
|
|
70
|
+
|
|
71
|
+
const hasDesignSystem = !!(designSystem?.colors || designSystem?.typography)
|
|
72
|
+
const hasShell = !!shell?.spec
|
|
73
|
+
const allStepsComplete = hasDesignSystem && hasShell
|
|
74
|
+
|
|
75
|
+
const stepStatuses = getDesignPageStepStatuses(hasDesignSystem, hasShell)
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<AppLayout>
|
|
79
|
+
<div className="space-y-6">
|
|
80
|
+
{/* Page intro */}
|
|
81
|
+
<div className="mb-8">
|
|
82
|
+
<h1 className="text-2xl font-semibold text-stone-900 dark:text-stone-100 mb-2">
|
|
83
|
+
Design System
|
|
84
|
+
</h1>
|
|
85
|
+
<p className="text-stone-600 dark:text-stone-400">
|
|
86
|
+
Define the visual foundation and application shell for your product.
|
|
87
|
+
</p>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
{/* Step 1: Design Tokens */}
|
|
91
|
+
<StepIndicator step={1} status={stepStatuses[0]}>
|
|
92
|
+
{!designSystem?.colors && !designSystem?.typography ? (
|
|
93
|
+
<EmptyState type="design-system" />
|
|
94
|
+
) : (
|
|
95
|
+
<Card className="border-stone-200 dark:border-stone-700 shadow-sm">
|
|
96
|
+
<CardHeader className="pb-4">
|
|
97
|
+
<CardTitle className="text-lg font-semibold text-stone-900 dark:text-stone-100">
|
|
98
|
+
Design Tokens
|
|
99
|
+
</CardTitle>
|
|
100
|
+
</CardHeader>
|
|
101
|
+
<CardContent className="space-y-6">
|
|
102
|
+
{/* Colors */}
|
|
103
|
+
{designSystem?.colors && (
|
|
104
|
+
<div>
|
|
105
|
+
<h4 className="text-sm font-medium text-stone-500 dark:text-stone-400 uppercase tracking-wide mb-4">
|
|
106
|
+
Colors
|
|
107
|
+
</h4>
|
|
108
|
+
<div className="grid grid-cols-3 gap-6">
|
|
109
|
+
<ColorSwatch
|
|
110
|
+
label="Primary"
|
|
111
|
+
colorName={designSystem.colors.primary}
|
|
112
|
+
/>
|
|
113
|
+
<ColorSwatch
|
|
114
|
+
label="Secondary"
|
|
115
|
+
colorName={designSystem.colors.secondary}
|
|
116
|
+
/>
|
|
117
|
+
<ColorSwatch
|
|
118
|
+
label="Neutral"
|
|
119
|
+
colorName={designSystem.colors.neutral}
|
|
120
|
+
/>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
)}
|
|
124
|
+
|
|
125
|
+
{/* Typography */}
|
|
126
|
+
{designSystem?.typography && (
|
|
127
|
+
<div>
|
|
128
|
+
<h4 className="text-sm font-medium text-stone-500 dark:text-stone-400 uppercase tracking-wide mb-4">
|
|
129
|
+
Typography
|
|
130
|
+
</h4>
|
|
131
|
+
<div className="grid grid-cols-3 gap-6">
|
|
132
|
+
<div>
|
|
133
|
+
<p className="text-xs text-stone-500 dark:text-stone-400 mb-1">Heading</p>
|
|
134
|
+
<p className="font-semibold text-stone-900 dark:text-stone-100">
|
|
135
|
+
{designSystem.typography.heading}
|
|
136
|
+
</p>
|
|
137
|
+
</div>
|
|
138
|
+
<div>
|
|
139
|
+
<p className="text-xs text-stone-500 dark:text-stone-400 mb-1">Body</p>
|
|
140
|
+
<p className="text-stone-900 dark:text-stone-100">
|
|
141
|
+
{designSystem.typography.body}
|
|
142
|
+
</p>
|
|
143
|
+
</div>
|
|
144
|
+
<div>
|
|
145
|
+
<p className="text-xs text-stone-500 dark:text-stone-400 mb-1">Mono</p>
|
|
146
|
+
<p className="font-mono text-stone-900 dark:text-stone-100">
|
|
147
|
+
{designSystem.typography.mono}
|
|
148
|
+
</p>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
)}
|
|
153
|
+
|
|
154
|
+
{/* Edit hint */}
|
|
155
|
+
<div className="bg-stone-100 dark:bg-stone-800 rounded-md px-4 py-2.5">
|
|
156
|
+
<p className="text-xs text-stone-500 dark:text-stone-400">
|
|
157
|
+
Run <code className="font-mono text-stone-700 dark:text-stone-300">/design-tokens</code> to update
|
|
158
|
+
</p>
|
|
159
|
+
</div>
|
|
160
|
+
</CardContent>
|
|
161
|
+
</Card>
|
|
162
|
+
)}
|
|
163
|
+
</StepIndicator>
|
|
164
|
+
|
|
165
|
+
{/* Step 2: Application Shell */}
|
|
166
|
+
<StepIndicator step={2} status={stepStatuses[1]} isLast={!allStepsComplete}>
|
|
167
|
+
{!shell?.spec ? (
|
|
168
|
+
<EmptyState type="shell" />
|
|
169
|
+
) : (
|
|
170
|
+
<Card className="border-stone-200 dark:border-stone-700 shadow-sm">
|
|
171
|
+
<CardHeader className="pb-4">
|
|
172
|
+
<CardTitle className="text-lg font-semibold text-stone-900 dark:text-stone-100">
|
|
173
|
+
Application Shell
|
|
174
|
+
</CardTitle>
|
|
175
|
+
</CardHeader>
|
|
176
|
+
<CardContent className="space-y-4">
|
|
177
|
+
{/* Overview */}
|
|
178
|
+
{shell.spec.overview && (
|
|
179
|
+
<p className="text-stone-600 dark:text-stone-400 leading-relaxed">
|
|
180
|
+
{shell.spec.overview}
|
|
181
|
+
</p>
|
|
182
|
+
)}
|
|
183
|
+
|
|
184
|
+
{/* Navigation items */}
|
|
185
|
+
{shell.spec.navigationItems.length > 0 && (
|
|
186
|
+
<div>
|
|
187
|
+
<h4 className="text-sm font-medium text-stone-500 dark:text-stone-400 uppercase tracking-wide mb-2">
|
|
188
|
+
Navigation
|
|
189
|
+
</h4>
|
|
190
|
+
<ul className="space-y-1">
|
|
191
|
+
{shell.spec.navigationItems.map((item, index) => {
|
|
192
|
+
// Parse markdown-style bold: **text** → <strong>text</strong>
|
|
193
|
+
const parts = item.split(/\*\*([^*]+)\*\*/)
|
|
194
|
+
return (
|
|
195
|
+
<li key={index} className="flex items-center gap-2 text-stone-700 dark:text-stone-300">
|
|
196
|
+
<span className="w-1 h-1 rounded-full bg-stone-400 dark:bg-stone-500" />
|
|
197
|
+
{parts.map((part, i) =>
|
|
198
|
+
i % 2 === 1 ? (
|
|
199
|
+
<strong key={i} className="font-semibold">{part}</strong>
|
|
200
|
+
) : (
|
|
201
|
+
<span key={i}>{part}</span>
|
|
202
|
+
)
|
|
203
|
+
)}
|
|
204
|
+
</li>
|
|
205
|
+
)
|
|
206
|
+
})}
|
|
207
|
+
</ul>
|
|
208
|
+
</div>
|
|
209
|
+
)}
|
|
210
|
+
|
|
211
|
+
{/* View Shell Design Link */}
|
|
212
|
+
{shell.hasComponents && (
|
|
213
|
+
<div className="pt-2 border-t border-stone-100 dark:border-stone-800">
|
|
214
|
+
<Link
|
|
215
|
+
to="/shell/design"
|
|
216
|
+
className="flex items-center justify-between gap-4 py-2 hover:text-stone-900 dark:hover:text-stone-100 transition-colors group"
|
|
217
|
+
>
|
|
218
|
+
<div className="flex items-center gap-3">
|
|
219
|
+
<div className="w-8 h-8 rounded-md bg-stone-200 dark:bg-stone-700 flex items-center justify-center">
|
|
220
|
+
<Layout className="w-4 h-4 text-stone-600 dark:text-stone-300" strokeWidth={1.5} />
|
|
221
|
+
</div>
|
|
222
|
+
<span className="font-medium text-stone-700 dark:text-stone-300 group-hover:text-stone-900 dark:group-hover:text-stone-100">
|
|
223
|
+
View Shell Design
|
|
224
|
+
</span>
|
|
225
|
+
</div>
|
|
226
|
+
<ChevronRight className="w-4 h-4 text-stone-400 dark:text-stone-500" strokeWidth={1.5} />
|
|
227
|
+
</Link>
|
|
228
|
+
</div>
|
|
229
|
+
)}
|
|
230
|
+
|
|
231
|
+
{/* Edit hint */}
|
|
232
|
+
<div className="bg-stone-100 dark:bg-stone-800 rounded-md px-4 py-2.5">
|
|
233
|
+
<p className="text-xs text-stone-500 dark:text-stone-400">
|
|
234
|
+
Run <code className="font-mono text-stone-700 dark:text-stone-300">/design-shell</code> to update
|
|
235
|
+
</p>
|
|
236
|
+
</div>
|
|
237
|
+
</CardContent>
|
|
238
|
+
</Card>
|
|
239
|
+
)}
|
|
240
|
+
</StepIndicator>
|
|
241
|
+
|
|
242
|
+
{/* Next Phase Button - shown when all steps complete */}
|
|
243
|
+
{allStepsComplete && (
|
|
244
|
+
<StepIndicator step={3} status="current" isLast>
|
|
245
|
+
<NextPhaseButton nextPhase="sections" />
|
|
246
|
+
</StepIndicator>
|
|
247
|
+
)}
|
|
248
|
+
</div>
|
|
249
|
+
</AppLayout>
|
|
250
|
+
)
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
interface ColorSwatchProps {
|
|
254
|
+
label: string
|
|
255
|
+
colorName: string
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function ColorSwatch({ label, colorName }: ColorSwatchProps) {
|
|
259
|
+
const colors = colorMap[colorName] || colorMap.stone
|
|
260
|
+
|
|
261
|
+
return (
|
|
262
|
+
<div>
|
|
263
|
+
<div className="flex gap-0.5 mb-2">
|
|
264
|
+
<div
|
|
265
|
+
className="flex-1 h-14 rounded-l-md"
|
|
266
|
+
style={{ backgroundColor: colors.light }}
|
|
267
|
+
title={`${colorName}-300`}
|
|
268
|
+
/>
|
|
269
|
+
<div
|
|
270
|
+
className="flex-[2] h-14"
|
|
271
|
+
style={{ backgroundColor: colors.base }}
|
|
272
|
+
title={`${colorName}-500`}
|
|
273
|
+
/>
|
|
274
|
+
<div
|
|
275
|
+
className="flex-1 h-14 rounded-r-md"
|
|
276
|
+
style={{ backgroundColor: colors.dark }}
|
|
277
|
+
title={`${colorName}-600`}
|
|
278
|
+
/>
|
|
279
|
+
</div>
|
|
280
|
+
<p className="text-sm font-medium text-stone-900 dark:text-stone-100">{label}</p>
|
|
281
|
+
<p className="text-xs text-stone-500 dark:text-stone-400">{colorName}</p>
|
|
282
|
+
</div>
|
|
283
|
+
)
|
|
284
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { FileText, Map, ClipboardList, Database, Layout, Package, Boxes, Palette, PanelLeft, Copy } from 'lucide-react'
|
|
2
|
+
import { Card, CardContent } from '@/components/ui/card'
|
|
3
|
+
|
|
4
|
+
export type EmptyStateType = 'overview' | 'roadmap' | 'spec' | 'data' | 'screen-designs' | 'screenshots' | 'data-model' | 'design-system' | 'shell' | 'export'
|
|
5
|
+
|
|
6
|
+
interface EmptyStateProps {
|
|
7
|
+
type: EmptyStateType
|
|
8
|
+
context?: string // e.g. Section Title
|
|
9
|
+
contextId?: string // e.g. section-id
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const config: Record<EmptyStateType, {
|
|
13
|
+
icon: typeof FileText
|
|
14
|
+
title: string
|
|
15
|
+
command: string
|
|
16
|
+
agentPrompt?: string
|
|
17
|
+
description: string
|
|
18
|
+
}> = {
|
|
19
|
+
overview: {
|
|
20
|
+
icon: FileText,
|
|
21
|
+
title: 'No product defined yet',
|
|
22
|
+
command: '/product-vision',
|
|
23
|
+
description: 'Define your product vision, key problems, and features',
|
|
24
|
+
},
|
|
25
|
+
roadmap: {
|
|
26
|
+
icon: Map,
|
|
27
|
+
title: 'No roadmap defined yet',
|
|
28
|
+
command: '/product-roadmap',
|
|
29
|
+
description: 'Break down your product into development sections',
|
|
30
|
+
},
|
|
31
|
+
spec: {
|
|
32
|
+
icon: ClipboardList,
|
|
33
|
+
title: 'No specification defined yet',
|
|
34
|
+
command: '/shape-section',
|
|
35
|
+
description: 'Define the user flows and UI requirements',
|
|
36
|
+
},
|
|
37
|
+
data: {
|
|
38
|
+
icon: Database,
|
|
39
|
+
title: 'No sample data generated yet',
|
|
40
|
+
command: '/sample-data',
|
|
41
|
+
description: 'Create realistic sample data for screen designs',
|
|
42
|
+
},
|
|
43
|
+
'screen-designs': {
|
|
44
|
+
icon: Layout,
|
|
45
|
+
title: 'No screen designs created yet',
|
|
46
|
+
command: '/design-screen',
|
|
47
|
+
description: 'Create screen designs for this section',
|
|
48
|
+
},
|
|
49
|
+
screenshots: {
|
|
50
|
+
icon: Image,
|
|
51
|
+
title: 'No screenshots captured yet',
|
|
52
|
+
command: '/screenshot-design',
|
|
53
|
+
description: 'Capture screenshots of your screen designs for documentation',
|
|
54
|
+
},
|
|
55
|
+
'data-model': {
|
|
56
|
+
icon: Boxes,
|
|
57
|
+
title: 'No data model defined yet',
|
|
58
|
+
command: '/data-model',
|
|
59
|
+
description: 'Define the core entities and relationships',
|
|
60
|
+
},
|
|
61
|
+
'design-system': {
|
|
62
|
+
icon: Palette,
|
|
63
|
+
title: 'No design tokens defined yet',
|
|
64
|
+
command: '/design-tokens',
|
|
65
|
+
agentPrompt: "Antigravity, generate the design tokens. Read 'agent-os/commands/design-tokens/design-tokens.md'.",
|
|
66
|
+
description: 'Choose colors and typography for your product',
|
|
67
|
+
},
|
|
68
|
+
shell: {
|
|
69
|
+
icon: PanelLeft,
|
|
70
|
+
title: 'No application shell designed yet',
|
|
71
|
+
command: '/design-shell',
|
|
72
|
+
agentPrompt: "Antigravity, design the application shell. Read 'agent-os/commands/design-shell/design-shell.md'.",
|
|
73
|
+
description: 'Design the navigation and layout',
|
|
74
|
+
},
|
|
75
|
+
export: {
|
|
76
|
+
icon: Package,
|
|
77
|
+
title: 'Ready to export',
|
|
78
|
+
command: '/export-product',
|
|
79
|
+
description: 'Generate the complete handoff package',
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
import { useToast } from '@/components/ui/ToastContext'
|
|
84
|
+
import { Image } from 'lucide-react'
|
|
85
|
+
|
|
86
|
+
export function EmptyState({ type, context, contextId }: EmptyStateProps) {
|
|
87
|
+
const { icon: Icon, title, command, agentPrompt, description } = config[type]
|
|
88
|
+
const { toast } = useToast()
|
|
89
|
+
|
|
90
|
+
const copyPrompt = () => {
|
|
91
|
+
let finalPrompt = agentPrompt
|
|
92
|
+
|
|
93
|
+
// Dynamic prompts for sections
|
|
94
|
+
if (!finalPrompt) {
|
|
95
|
+
if (type === 'spec' && context && contextId) {
|
|
96
|
+
finalPrompt = `Antigravity, let's shape the spec for '${context}'. The Section ID is '${contextId}'. Read 'agent-os/commands/shape-spec/shape-spec.md'.`
|
|
97
|
+
} else if (type === 'data' && context && contextId) {
|
|
98
|
+
finalPrompt = `Antigravity, generate sample data for '${context}' (Section ID: '${contextId}'). Read 'agent-os/commands/sample-data/sample-data.md'.`
|
|
99
|
+
} else if (type === 'screen-designs' && context && contextId) {
|
|
100
|
+
finalPrompt = `Antigravity, create a screen design for '${context}' (Section ID: '${contextId}'). Read 'agent-os/commands/design-screen/design-screen.md'.`
|
|
101
|
+
} else if (type === 'screenshots' && context && contextId) {
|
|
102
|
+
finalPrompt = `Antigravity, capture screenshots for '${context}' (Section ID: '${contextId}'). Read 'agent-os/commands/screenshot-design/screenshot-design.md'.`
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (finalPrompt) {
|
|
107
|
+
navigator.clipboard.writeText(finalPrompt)
|
|
108
|
+
toast({
|
|
109
|
+
title: "Prompt Copied!",
|
|
110
|
+
description: "Paste it into the Agent terminal to run the action.",
|
|
111
|
+
type: "success"
|
|
112
|
+
})
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Check if we can generate a prompt for this type
|
|
117
|
+
const hasAction = agentPrompt || (context && (type === 'spec' || type === 'data' || type === 'screen-designs' || type === 'screenshots'))
|
|
118
|
+
|
|
119
|
+
return (
|
|
120
|
+
<Card className="border-stone-200 dark:border-stone-700 shadow-sm border-dashed">
|
|
121
|
+
<CardContent className="py-8">
|
|
122
|
+
<div className="flex flex-col items-center text-center max-w-sm mx-auto">
|
|
123
|
+
<div className="w-10 h-10 rounded-full bg-stone-100 dark:bg-stone-800 flex items-center justify-center mb-3">
|
|
124
|
+
<Icon className="w-5 h-5 text-stone-400 dark:text-stone-500" strokeWidth={1.5} />
|
|
125
|
+
</div>
|
|
126
|
+
<h3 className="text-base font-medium text-stone-600 dark:text-stone-400 mb-1">
|
|
127
|
+
{title}
|
|
128
|
+
</h3>
|
|
129
|
+
<p className="text-sm text-stone-500 dark:text-stone-400 mb-4">
|
|
130
|
+
{description}
|
|
131
|
+
</p>
|
|
132
|
+
<div className="bg-stone-100 dark:bg-stone-800 rounded-md px-4 py-2.5 w-full">
|
|
133
|
+
{hasAction ? (
|
|
134
|
+
<button
|
|
135
|
+
onClick={copyPrompt}
|
|
136
|
+
className="w-full flex items-center justify-center gap-2 text-stone-700 dark:text-stone-300 hover:text-stone-900 dark:hover:text-stone-100 transition-colors"
|
|
137
|
+
title="Copy Agent Prompt"
|
|
138
|
+
>
|
|
139
|
+
<span className="text-xs font-medium uppercase tracking-wider text-stone-500">Run Action</span>
|
|
140
|
+
<Copy size={14} />
|
|
141
|
+
</button>
|
|
142
|
+
) : (
|
|
143
|
+
<p className="text-xs text-stone-500 dark:text-stone-400 mb-0.5">
|
|
144
|
+
Run in Claude Code:
|
|
145
|
+
</p>
|
|
146
|
+
)}
|
|
147
|
+
<code className="block mt-1 text-sm font-mono text-stone-700 dark:text-stone-300">
|
|
148
|
+
{command}
|
|
149
|
+
</code>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</CardContent>
|
|
153
|
+
</Card>
|
|
154
|
+
)
|
|
155
|
+
}
|