@theproductguy/create-mission-control 1.0.17 → 1.0.26
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/package.json +2 -2
- package/src/template/agent-os/WORKFLOW.md +139 -0
- package/src/template/agent-os/commands/adapt/adapt.md +189 -0
- package/src/template/agent-os/commands/animate/animate.md +184 -0
- package/src/template/agent-os/commands/audit/audit.md +123 -0
- package/src/template/agent-os/commands/bolder/bolder.md +126 -0
- package/src/template/agent-os/commands/clarify/clarify.md +173 -0
- package/src/template/agent-os/commands/colorize/colorize.md +152 -0
- package/src/template/agent-os/commands/critique/critique.md +112 -0
- package/src/template/agent-os/commands/delight/delight.md +311 -0
- package/src/template/agent-os/commands/design-screen/design-screen.md +5 -0
- package/src/template/agent-os/commands/design-shell/design-shell.md +5 -0
- package/src/template/agent-os/commands/design-tokens/design-tokens.md +5 -0
- package/src/template/agent-os/commands/extract/extract.md +88 -0
- package/src/template/agent-os/commands/harden/harden.md +351 -0
- package/src/template/agent-os/commands/impeccable/impeccable.md +163 -0
- package/src/template/agent-os/commands/normalize/normalize.md +61 -0
- package/src/template/agent-os/commands/onboard/onboard.md +236 -0
- package/src/template/agent-os/commands/optimize/optimize.md +262 -0
- package/src/template/agent-os/commands/plan-product/3-create-roadmap.md +7 -3
- package/src/template/agent-os/commands/polish/polish.md +196 -0
- package/src/template/agent-os/commands/quieter/quieter.md +112 -0
- package/src/template/agent-os/commands/simplify/simplify.md +131 -0
- package/src/template/agent-os/commands/teach-impeccable/teach-impeccable.md +67 -0
- package/src/template/control-center/backend/index.js +1 -1
- package/src/template/control-center/frontend/src/App.tsx +91 -840
- package/src/template/control-center/frontend/src/components/DesignOSOverlay.tsx +38 -0
- package/src/template/control-center/frontend/src/components/Guidance.tsx +62 -0
- package/src/template/control-center/frontend/src/components/NextStepCard.tsx +115 -0
- package/src/template/control-center/frontend/src/components/PromptButton.tsx +43 -0
- package/src/template/control-center/frontend/src/components/StatusItem.tsx +38 -0
- package/src/template/control-center/frontend/src/components/modals/CreateSpecModal.tsx +78 -0
- package/src/template/control-center/frontend/src/components/modals/DeleteSpecModal.tsx +42 -0
- package/src/template/control-center/frontend/src/components/modals/FileEditorModal.tsx +87 -0
- package/src/template/control-center/frontend/src/components/modals/SettingsModal.tsx +46 -0
- package/src/template/control-center/frontend/src/components/ui/ToastContext.tsx +1 -1
- package/src/template/control-center/frontend/src/contexts/IdeContext.tsx +6 -0
- package/src/template/control-center/frontend/src/hooks/useFileEditor.ts +42 -0
- package/src/template/control-center/frontend/src/hooks/useProjectState.ts +45 -0
- package/src/template/control-center/frontend/src/index.css +26 -0
- package/src/template/control-center/frontend/src/types.ts +65 -0
- package/src/template/control-center/frontend/tailwind.config.js +15 -3
- package/src/template/control-center/product/design-system/QA/audit-report.md +34 -0
- package/src/template/control-center/product/mission.md +38 -0
- package/src/template/control-center/product/roadmap.md +10 -0
- package/src/template/design-system/src/lib/product-loader.ts +6 -0
- package/src/template/package-lock.json +2756 -134
- package/src/template/package.json +2 -2
- package/src/template/agent-os-ui/_package.json +0 -54
- package/src/template/agent-os-ui/package.json +0 -54
- package/src/template/control-center/frontend/src/components/ThemeToggle.tsx +0 -64
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# COMMAND: Onboard
|
|
2
|
+
**Description**: Design or improve onboarding flows, empty states, and first-time user experiences. Helps users get started successfully and understand value quickly.
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly.
|
|
6
|
+
|
|
7
|
+
## Assess Onboarding Needs
|
|
8
|
+
|
|
9
|
+
Understand what users need to learn and why:
|
|
10
|
+
|
|
11
|
+
1. **Identify the challenge**:
|
|
12
|
+
- What are users trying to accomplish?
|
|
13
|
+
- What's confusing or unclear about current experience?
|
|
14
|
+
- Where do users get stuck or drop off?
|
|
15
|
+
- What's the "aha moment" we want users to reach?
|
|
16
|
+
|
|
17
|
+
2. **Understand the users**:
|
|
18
|
+
- What's their experience level? (Beginners, power users, mixed?)
|
|
19
|
+
- What's their motivation? (Excited and exploring? Required by work?)
|
|
20
|
+
- What's their time commitment? (5 minutes? 30 minutes?)
|
|
21
|
+
- What alternatives do they know? (Coming from competitor? New to category?)
|
|
22
|
+
|
|
23
|
+
3. **Define success**:
|
|
24
|
+
- What's the minimum users need to learn to be successful?
|
|
25
|
+
- What's the key action we want them to take? (First project? First invite?)
|
|
26
|
+
- How do we know onboarding worked? (Completion rate? Time to value?)
|
|
27
|
+
|
|
28
|
+
**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible.
|
|
29
|
+
|
|
30
|
+
## Onboarding Principles
|
|
31
|
+
|
|
32
|
+
Follow these core principles:
|
|
33
|
+
|
|
34
|
+
### Show, Don't Tell
|
|
35
|
+
- Demonstrate with working examples, not just descriptions
|
|
36
|
+
- Provide real functionality in onboarding, not separate tutorial mode
|
|
37
|
+
- Use progressive disclosure - teach one thing at a time
|
|
38
|
+
|
|
39
|
+
### Make It Optional (When Possible)
|
|
40
|
+
- Let experienced users skip onboarding
|
|
41
|
+
- Don't block access to product
|
|
42
|
+
- Provide "Skip" or "I'll explore on my own" options
|
|
43
|
+
|
|
44
|
+
### Time to Value
|
|
45
|
+
- Get users to their "aha moment" ASAP
|
|
46
|
+
- Front-load most important concepts
|
|
47
|
+
- Teach 20% that delivers 80% of value
|
|
48
|
+
- Save advanced features for contextual discovery
|
|
49
|
+
|
|
50
|
+
### Context Over Ceremony
|
|
51
|
+
- Teach features when users need them, not upfront
|
|
52
|
+
- Empty states are onboarding opportunities
|
|
53
|
+
- Tooltips and hints at point of use
|
|
54
|
+
|
|
55
|
+
### Respect User Intelligence
|
|
56
|
+
- Don't patronize or over-explain
|
|
57
|
+
- Be concise and clear
|
|
58
|
+
- Assume users can figure out standard patterns
|
|
59
|
+
|
|
60
|
+
## Design Onboarding Experiences
|
|
61
|
+
|
|
62
|
+
Create appropriate onboarding for the context:
|
|
63
|
+
|
|
64
|
+
### Initial Product Onboarding
|
|
65
|
+
|
|
66
|
+
**Welcome Screen**:
|
|
67
|
+
- Clear value proposition (what is this product?)
|
|
68
|
+
- What users will learn/accomplish
|
|
69
|
+
- Time estimate (honest about commitment)
|
|
70
|
+
- Option to skip (for experienced users)
|
|
71
|
+
|
|
72
|
+
**Account Setup**:
|
|
73
|
+
- Minimal required information (collect more later)
|
|
74
|
+
- Explain why you're asking for each piece of information
|
|
75
|
+
- Smart defaults where possible
|
|
76
|
+
- Social login when appropriate
|
|
77
|
+
|
|
78
|
+
**Core Concept Introduction**:
|
|
79
|
+
- Introduce 1-3 core concepts (not everything)
|
|
80
|
+
- Use simple language and examples
|
|
81
|
+
- Interactive when possible (do, don't just read)
|
|
82
|
+
- Progress indication (step 1 of 3)
|
|
83
|
+
|
|
84
|
+
**First Success**:
|
|
85
|
+
- Guide users to accomplish something real
|
|
86
|
+
- Pre-populated examples or templates
|
|
87
|
+
- Celebrate completion (but don't overdo it)
|
|
88
|
+
- Clear next steps
|
|
89
|
+
|
|
90
|
+
### Feature Discovery & Adoption
|
|
91
|
+
|
|
92
|
+
**Empty States**:
|
|
93
|
+
Instead of blank space, show:
|
|
94
|
+
- What will appear here (description + screenshot/illustration)
|
|
95
|
+
- Why it's valuable
|
|
96
|
+
- Clear CTA to create first item
|
|
97
|
+
- Example or template option
|
|
98
|
+
|
|
99
|
+
Example:
|
|
100
|
+
```
|
|
101
|
+
No projects yet
|
|
102
|
+
Projects help you organize your work and collaborate with your team.
|
|
103
|
+
[Create your first project] or [Start from template]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Contextual Tooltips**:
|
|
107
|
+
- Appear at relevant moment (first time user sees feature)
|
|
108
|
+
- Point directly at relevant UI element
|
|
109
|
+
- Brief explanation + benefit
|
|
110
|
+
- Dismissable (with "Don't show again" option)
|
|
111
|
+
- Optional "Learn more" link
|
|
112
|
+
|
|
113
|
+
**Feature Announcements**:
|
|
114
|
+
- Highlight new features when they're released
|
|
115
|
+
- Show what's new and why it matters
|
|
116
|
+
- Let users try immediately
|
|
117
|
+
- Dismissable
|
|
118
|
+
|
|
119
|
+
**Progressive Onboarding**:
|
|
120
|
+
- Teach features when users encounter them
|
|
121
|
+
- Badges or indicators on new/unused features
|
|
122
|
+
- Unlock complexity gradually (don't show all options immediately)
|
|
123
|
+
|
|
124
|
+
### Guided Tours & Walkthroughs
|
|
125
|
+
|
|
126
|
+
**When to use**:
|
|
127
|
+
- Complex interfaces with many features
|
|
128
|
+
- Significant changes to existing product
|
|
129
|
+
- Industry-specific tools needing domain knowledge
|
|
130
|
+
|
|
131
|
+
**How to design**:
|
|
132
|
+
- Spotlight specific UI elements (dim rest of page)
|
|
133
|
+
- Keep steps short (3-7 steps max per tour)
|
|
134
|
+
- Allow users to click through tour freely
|
|
135
|
+
- Include "Skip tour" option
|
|
136
|
+
- Make replayable (help menu)
|
|
137
|
+
|
|
138
|
+
**Best practices**:
|
|
139
|
+
- Interactive > passive (let users click real buttons)
|
|
140
|
+
- Focus on workflow, not features ("Create a project" not "This is the project button")
|
|
141
|
+
- Provide sample data so actions work
|
|
142
|
+
|
|
143
|
+
### Interactive Tutorials
|
|
144
|
+
|
|
145
|
+
**When to use**:
|
|
146
|
+
- Users need hands-on practice
|
|
147
|
+
- Concepts are complex or unfamiliar
|
|
148
|
+
- High stakes (better to practice in safe environment)
|
|
149
|
+
|
|
150
|
+
**How to design**:
|
|
151
|
+
- Sandbox environment with sample data
|
|
152
|
+
- Clear objectives ("Create a chart showing sales by region")
|
|
153
|
+
- Step-by-step guidance
|
|
154
|
+
- Validation (confirm they did it right)
|
|
155
|
+
- Graduation moment (you're ready!)
|
|
156
|
+
|
|
157
|
+
### Documentation & Help
|
|
158
|
+
|
|
159
|
+
**In-product help**:
|
|
160
|
+
- Contextual help links throughout interface
|
|
161
|
+
- Keyboard shortcut reference
|
|
162
|
+
- Search-able help center
|
|
163
|
+
- Video tutorials for complex workflows
|
|
164
|
+
|
|
165
|
+
**Help patterns**:
|
|
166
|
+
- `?` icon near complex features
|
|
167
|
+
- "Learn more" links in tooltips
|
|
168
|
+
- Keyboard shortcut hints (`⌘K` shown on search box)
|
|
169
|
+
|
|
170
|
+
## Empty State Design
|
|
171
|
+
|
|
172
|
+
Every empty state needs:
|
|
173
|
+
|
|
174
|
+
### What Will Be Here
|
|
175
|
+
"Your recent projects will appear here"
|
|
176
|
+
|
|
177
|
+
### Why It Matters
|
|
178
|
+
"Projects help you organize your work and collaborate with your team"
|
|
179
|
+
|
|
180
|
+
### How to Get Started
|
|
181
|
+
[Create project] or [Import from template]
|
|
182
|
+
|
|
183
|
+
### Visual Interest
|
|
184
|
+
Illustration or icon (not just text on blank page)
|
|
185
|
+
|
|
186
|
+
### Contextual Help
|
|
187
|
+
"Need help getting started? [Watch 2-min tutorial]"
|
|
188
|
+
|
|
189
|
+
**Empty state types**:
|
|
190
|
+
- **First use**: Never used this feature (emphasize value, provide template)
|
|
191
|
+
- **User cleared**: Intentionally deleted everything (light touch, easy to recreate)
|
|
192
|
+
- **No results**: Search or filter returned nothing (suggest different query, clear filters)
|
|
193
|
+
- **No permissions**: Can't access (explain why, how to get access)
|
|
194
|
+
- **Error state**: Failed to load (explain what happened, retry option)
|
|
195
|
+
|
|
196
|
+
## Implementation Patterns
|
|
197
|
+
|
|
198
|
+
### Technical approaches:
|
|
199
|
+
|
|
200
|
+
**Tooltip libraries**: Tippy.js, Popper.js
|
|
201
|
+
**Tour libraries**: Intro.js, Shepherd.js, React Joyride
|
|
202
|
+
**Modal patterns**: Focus trap, backdrop, ESC to close
|
|
203
|
+
**Progress tracking**: LocalStorage for "seen" states
|
|
204
|
+
**Analytics**: Track completion, drop-off points
|
|
205
|
+
|
|
206
|
+
**Storage patterns**:
|
|
207
|
+
```javascript
|
|
208
|
+
// Track which onboarding steps user has seen
|
|
209
|
+
localStorage.setItem('onboarding-completed', 'true');
|
|
210
|
+
localStorage.setItem('feature-tooltip-seen-reports', 'true');
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals.
|
|
214
|
+
|
|
215
|
+
**NEVER**:
|
|
216
|
+
- Force users through long onboarding before they can use product
|
|
217
|
+
- Patronize users with obvious explanations
|
|
218
|
+
- Show same tooltip repeatedly (respect dismissals)
|
|
219
|
+
- Block all UI during tour (let users explore)
|
|
220
|
+
- Create separate tutorial mode disconnected from real product
|
|
221
|
+
- Overwhelm with information upfront (progressive disclosure!)
|
|
222
|
+
- Hide "Skip" or make it hard to find
|
|
223
|
+
- Forget about returning users (don't show initial onboarding again)
|
|
224
|
+
|
|
225
|
+
## Verify Onboarding Quality
|
|
226
|
+
|
|
227
|
+
Test with real users:
|
|
228
|
+
|
|
229
|
+
- **Time to completion**: Can users complete onboarding quickly?
|
|
230
|
+
- **Comprehension**: Do users understand after completing?
|
|
231
|
+
- **Action**: Do users take desired next step?
|
|
232
|
+
- **Skip rate**: Are too many users skipping? (Maybe it's too long/not valuable)
|
|
233
|
+
- **Completion rate**: Are users completing? (If low, simplify)
|
|
234
|
+
- **Time to value**: How long until users get first value?
|
|
235
|
+
|
|
236
|
+
Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence.
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# COMMAND: Optimize
|
|
2
|
+
**Description**: Improve interface performance across loading speed, rendering, animations, images, and bundle size. Makes experiences faster and smoother.
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
Identify and fix performance issues to create faster, smoother user experiences.
|
|
6
|
+
|
|
7
|
+
## Assess Performance Issues
|
|
8
|
+
|
|
9
|
+
Understand current performance and identify problems:
|
|
10
|
+
|
|
11
|
+
1. **Measure current state**:
|
|
12
|
+
- **Core Web Vitals**: LCP, FID/INP, CLS scores
|
|
13
|
+
- **Load time**: Time to interactive, first contentful paint
|
|
14
|
+
- **Bundle size**: JavaScript, CSS, image sizes
|
|
15
|
+
- **Runtime performance**: Frame rate, memory usage, CPU usage
|
|
16
|
+
- **Network**: Request count, payload sizes, waterfall
|
|
17
|
+
|
|
18
|
+
2. **Identify bottlenecks**:
|
|
19
|
+
- What's slow? (Initial load? Interactions? Animations?)
|
|
20
|
+
- What's causing it? (Large images? Expensive JavaScript? Layout thrashing?)
|
|
21
|
+
- How bad is it? (Perceivable? Annoying? Blocking?)
|
|
22
|
+
- Who's affected? (All users? Mobile only? Slow connections?)
|
|
23
|
+
|
|
24
|
+
**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters.
|
|
25
|
+
|
|
26
|
+
## Optimization Strategy
|
|
27
|
+
|
|
28
|
+
Create systematic improvement plan:
|
|
29
|
+
|
|
30
|
+
### Loading Performance
|
|
31
|
+
|
|
32
|
+
**Optimize Images**:
|
|
33
|
+
- Use modern formats (WebP, AVIF)
|
|
34
|
+
- Proper sizing (don't load 3000px image for 300px display)
|
|
35
|
+
- Lazy loading for below-fold images
|
|
36
|
+
- Responsive images (`srcset`, `picture` element)
|
|
37
|
+
- Compress images (80-85% quality is usually imperceptible)
|
|
38
|
+
- Use CDN for faster delivery
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<img
|
|
42
|
+
src="hero.webp"
|
|
43
|
+
srcset="hero-400.webp 400w, hero-800.webp 800w, hero-1200.webp 1200w"
|
|
44
|
+
sizes="(max-width: 400px) 400px, (max-width: 800px) 800px, 1200px"
|
|
45
|
+
loading="lazy"
|
|
46
|
+
alt="Hero image"
|
|
47
|
+
/>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Reduce JavaScript Bundle**:
|
|
51
|
+
- Code splitting (route-based, component-based)
|
|
52
|
+
- Tree shaking (remove unused code)
|
|
53
|
+
- Remove unused dependencies
|
|
54
|
+
- Lazy load non-critical code
|
|
55
|
+
- Use dynamic imports for large components
|
|
56
|
+
|
|
57
|
+
```javascript
|
|
58
|
+
// Lazy load heavy component
|
|
59
|
+
const HeavyChart = lazy(() => import('./HeavyChart'));
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Optimize CSS**:
|
|
63
|
+
- Remove unused CSS
|
|
64
|
+
- Critical CSS inline, rest async
|
|
65
|
+
- Minimize CSS files
|
|
66
|
+
- Use CSS containment for independent regions
|
|
67
|
+
|
|
68
|
+
**Optimize Fonts**:
|
|
69
|
+
- Use `font-display: swap` or `optional`
|
|
70
|
+
- Subset fonts (only characters you need)
|
|
71
|
+
- Preload critical fonts
|
|
72
|
+
- Use system fonts when appropriate
|
|
73
|
+
- Limit font weights loaded
|
|
74
|
+
|
|
75
|
+
```css
|
|
76
|
+
@font-face {
|
|
77
|
+
font-family: 'CustomFont';
|
|
78
|
+
src: url('/fonts/custom.woff2') format('woff2');
|
|
79
|
+
font-display: swap; /* Show fallback immediately */
|
|
80
|
+
unicode-range: U+0020-007F; /* Basic Latin only */
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Optimize Loading Strategy**:
|
|
85
|
+
- Critical resources first (async/defer non-critical)
|
|
86
|
+
- Preload critical assets
|
|
87
|
+
- Prefetch likely next pages
|
|
88
|
+
- Service worker for offline/caching
|
|
89
|
+
- HTTP/2 or HTTP/3 for multiplexing
|
|
90
|
+
|
|
91
|
+
### Rendering Performance
|
|
92
|
+
|
|
93
|
+
**Avoid Layout Thrashing**:
|
|
94
|
+
```javascript
|
|
95
|
+
// ❌ Bad: Alternating reads and writes (causes reflows)
|
|
96
|
+
elements.forEach(el => {
|
|
97
|
+
const height = el.offsetHeight; // Read (forces layout)
|
|
98
|
+
el.style.height = height * 2; // Write
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// ✅ Good: Batch reads, then batch writes
|
|
102
|
+
const heights = elements.map(el => el.offsetHeight); // All reads
|
|
103
|
+
elements.forEach((el, i) => {
|
|
104
|
+
el.style.height = heights[i] * 2; // All writes
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Optimize Rendering**:
|
|
109
|
+
- Use CSS `contain` property for independent regions
|
|
110
|
+
- Minimize DOM depth (flatter is faster)
|
|
111
|
+
- Reduce DOM size (fewer elements)
|
|
112
|
+
- Use `content-visibility: auto` for long lists
|
|
113
|
+
- Virtual scrolling for very long lists (react-window, react-virtualized)
|
|
114
|
+
|
|
115
|
+
**Reduce Paint & Composite**:
|
|
116
|
+
- Use `transform` and `opacity` for animations (GPU-accelerated)
|
|
117
|
+
- Avoid animating layout properties (width, height, top, left)
|
|
118
|
+
- Use `will-change` sparingly for known expensive operations
|
|
119
|
+
- Minimize paint areas (smaller is faster)
|
|
120
|
+
|
|
121
|
+
### Animation Performance
|
|
122
|
+
|
|
123
|
+
**GPU Acceleration**:
|
|
124
|
+
```css
|
|
125
|
+
/* ✅ GPU-accelerated (fast) */
|
|
126
|
+
.animated {
|
|
127
|
+
transform: translateX(100px);
|
|
128
|
+
opacity: 0.5;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* ❌ CPU-bound (slow) */
|
|
132
|
+
.animated {
|
|
133
|
+
left: 100px;
|
|
134
|
+
width: 300px;
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Smooth 60fps**:
|
|
139
|
+
- Target 16ms per frame (60fps)
|
|
140
|
+
- Use `requestAnimationFrame` for JS animations
|
|
141
|
+
- Debounce/throttle scroll handlers
|
|
142
|
+
- Use CSS animations when possible
|
|
143
|
+
- Avoid long-running JavaScript during animations
|
|
144
|
+
|
|
145
|
+
**Intersection Observer**:
|
|
146
|
+
```javascript
|
|
147
|
+
// Efficiently detect when elements enter viewport
|
|
148
|
+
const observer = new IntersectionObserver((entries) => {
|
|
149
|
+
entries.forEach(entry => {
|
|
150
|
+
if (entry.isIntersecting) {
|
|
151
|
+
// Element is visible, lazy load or animate
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### React/Framework Optimization
|
|
158
|
+
|
|
159
|
+
**React-specific**:
|
|
160
|
+
- Use `memo()` for expensive components
|
|
161
|
+
- `useMemo()` and `useCallback()` for expensive computations
|
|
162
|
+
- Virtualize long lists
|
|
163
|
+
- Code split routes
|
|
164
|
+
- Avoid inline function creation in render
|
|
165
|
+
- Use React DevTools Profiler
|
|
166
|
+
|
|
167
|
+
**Framework-agnostic**:
|
|
168
|
+
- Minimize re-renders
|
|
169
|
+
- Debounce expensive operations
|
|
170
|
+
- Memoize computed values
|
|
171
|
+
- Lazy load routes and components
|
|
172
|
+
|
|
173
|
+
### Network Optimization
|
|
174
|
+
|
|
175
|
+
**Reduce Requests**:
|
|
176
|
+
- Combine small files
|
|
177
|
+
- Use SVG sprites for icons
|
|
178
|
+
- Inline small critical assets
|
|
179
|
+
- Remove unused third-party scripts
|
|
180
|
+
|
|
181
|
+
**Optimize APIs**:
|
|
182
|
+
- Use pagination (don't load everything)
|
|
183
|
+
- GraphQL to request only needed fields
|
|
184
|
+
- Response compression (gzip, brotli)
|
|
185
|
+
- HTTP caching headers
|
|
186
|
+
- CDN for static assets
|
|
187
|
+
|
|
188
|
+
**Optimize for Slow Connections**:
|
|
189
|
+
- Adaptive loading based on connection (navigator.connection)
|
|
190
|
+
- Optimistic UI updates
|
|
191
|
+
- Request prioritization
|
|
192
|
+
- Progressive enhancement
|
|
193
|
+
|
|
194
|
+
## Core Web Vitals Optimization
|
|
195
|
+
|
|
196
|
+
### Largest Contentful Paint (LCP < 2.5s)
|
|
197
|
+
- Optimize hero images
|
|
198
|
+
- Inline critical CSS
|
|
199
|
+
- Preload key resources
|
|
200
|
+
- Use CDN
|
|
201
|
+
- Server-side rendering
|
|
202
|
+
|
|
203
|
+
### First Input Delay (FID < 100ms) / INP (< 200ms)
|
|
204
|
+
- Break up long tasks
|
|
205
|
+
- Defer non-critical JavaScript
|
|
206
|
+
- Use web workers for heavy computation
|
|
207
|
+
- Reduce JavaScript execution time
|
|
208
|
+
|
|
209
|
+
### Cumulative Layout Shift (CLS < 0.1)
|
|
210
|
+
- Set dimensions on images and videos
|
|
211
|
+
- Don't inject content above existing content
|
|
212
|
+
- Use `aspect-ratio` CSS property
|
|
213
|
+
- Reserve space for ads/embeds
|
|
214
|
+
- Avoid animations that cause layout shifts
|
|
215
|
+
|
|
216
|
+
```css
|
|
217
|
+
/* Reserve space for image */
|
|
218
|
+
.image-container {
|
|
219
|
+
aspect-ratio: 16 / 9;
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Performance Monitoring
|
|
224
|
+
|
|
225
|
+
**Tools to use**:
|
|
226
|
+
- Chrome DevTools (Lighthouse, Performance panel)
|
|
227
|
+
- WebPageTest
|
|
228
|
+
- Core Web Vitals (Chrome UX Report)
|
|
229
|
+
- Bundle analyzers (webpack-bundle-analyzer)
|
|
230
|
+
- Performance monitoring (Sentry, DataDog, New Relic)
|
|
231
|
+
|
|
232
|
+
**Key metrics**:
|
|
233
|
+
- LCP, FID/INP, CLS (Core Web Vitals)
|
|
234
|
+
- Time to Interactive (TTI)
|
|
235
|
+
- First Contentful Paint (FCP)
|
|
236
|
+
- Total Blocking Time (TBT)
|
|
237
|
+
- Bundle size
|
|
238
|
+
- Request count
|
|
239
|
+
|
|
240
|
+
**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative.
|
|
241
|
+
|
|
242
|
+
**NEVER**:
|
|
243
|
+
- Optimize without measuring (premature optimization)
|
|
244
|
+
- Sacrifice accessibility for performance
|
|
245
|
+
- Break functionality while optimizing
|
|
246
|
+
- Use `will-change` everywhere (creates new layers, uses memory)
|
|
247
|
+
- Lazy load above-fold content
|
|
248
|
+
- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first)
|
|
249
|
+
- Forget about mobile performance (often slower devices, slower connections)
|
|
250
|
+
|
|
251
|
+
## Verify Improvements
|
|
252
|
+
|
|
253
|
+
Test that optimizations worked:
|
|
254
|
+
|
|
255
|
+
- **Before/after metrics**: Compare Lighthouse scores
|
|
256
|
+
- **Real user monitoring**: Track improvements for real users
|
|
257
|
+
- **Different devices**: Test on low-end Android, not just flagship iPhone
|
|
258
|
+
- **Slow connections**: Throttle to 3G, test experience
|
|
259
|
+
- **No regressions**: Ensure functionality still works
|
|
260
|
+
- **User perception**: Does it *feel* faster?
|
|
261
|
+
|
|
262
|
+
Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance.
|
|
@@ -2,7 +2,8 @@ Now that you've created this product's mission.md, use that to guide your creati
|
|
|
2
2
|
|
|
3
3
|
Generate `agent-os/product/roadmap.md` with an ordered feature checklist:
|
|
4
4
|
|
|
5
|
-
Do not include any tasks for initializing a new codebase
|
|
5
|
+
Do not include any tasks for initializing a new codebase. Assume the user is inside the project.
|
|
6
|
+
HOWEVER: You MUST include "Phase 0: Design System Integration" as the first set of tasks, exactly as shown in the structure below. This is mandatory for all products built with Agent OS.
|
|
6
7
|
|
|
7
8
|
#### Creating the Roadmap:
|
|
8
9
|
|
|
@@ -21,14 +22,17 @@ Do not include any tasks for initializing a new codebase or bootstrapping a new
|
|
|
21
22
|
```markdown
|
|
22
23
|
# Product Roadmap
|
|
23
24
|
|
|
24
|
-
1. [ ]
|
|
25
|
+
1. [ ] **Phase 0: Design System Integration**
|
|
26
|
+
- [ ] Initialize Design System (Run `/initialize-design`)
|
|
27
|
+
- [ ] Define Design Tokens (Run `/design-tokens`)
|
|
28
|
+
- [ ] Build UI Shell (Run `/design-shell`)
|
|
29
|
+
|
|
25
30
|
2. [ ] [FEATURE_NAME] — [1-2 SENTENCE DESCRIPTION OF COMPLETE, TESTABLE FEATURE] `[EFFORT]`
|
|
26
31
|
3. [ ] [FEATURE_NAME] — [1-2 SENTENCE DESCRIPTION OF COMPLETE, TESTABLE FEATURE] `[EFFORT]`
|
|
27
32
|
4. [ ] [FEATURE_NAME] — [1-2 SENTENCE DESCRIPTION OF COMPLETE, TESTABLE FEATURE] `[EFFORT]`
|
|
28
33
|
5. [ ] [FEATURE_NAME] — [1-2 SENTENCE DESCRIPTION OF COMPLETE, TESTABLE FEATURE] `[EFFORT]`
|
|
29
34
|
6. [ ] [FEATURE_NAME] — [1-2 SENTENCE DESCRIPTION OF COMPLETE, TESTABLE FEATURE] `[EFFORT]`
|
|
30
35
|
7. [ ] [FEATURE_NAME] — [1-2 SENTENCE DESCRIPTION OF COMPLETE, TESTABLE FEATURE] `[EFFORT]`
|
|
31
|
-
8. [ ] [FEATURE_NAME] — [1-2 SENTENCE DESCRIPTION OF COMPLETE, TESTABLE FEATURE] `[EFFORT]`
|
|
32
36
|
|
|
33
37
|
> Notes
|
|
34
38
|
> - Order items by technical dependencies and product architecture
|