@paulojalowyj/openkit 0.1.1
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/.opencode/ARCHITECTURE.md +150 -0
- package/.opencode/LICENSE +21 -0
- package/.opencode/bin/cli.js +213 -0
- package/.opencode/commands/README.md +273 -0
- package/.opencode/commands/analyze.md +64 -0
- package/.opencode/commands/brainstorm.md +186 -0
- package/.opencode/commands/checklist.md +62 -0
- package/.opencode/commands/clarify.md +40 -0
- package/.opencode/commands/context.md +68 -0
- package/.opencode/commands/create.md +70 -0
- package/.opencode/commands/debug.md +160 -0
- package/.opencode/commands/deploy.md +244 -0
- package/.opencode/commands/doc.md +45 -0
- package/.opencode/commands/engineer.md +483 -0
- package/.opencode/commands/impl.md +242 -0
- package/.opencode/commands/plan.md +250 -0
- package/.opencode/commands/preview.md +87 -0
- package/.opencode/commands/specify.md +66 -0
- package/.opencode/commands/status.md +103 -0
- package/.opencode/commands/tasks.md +58 -0
- package/.opencode/commands/test.md +104 -0
- package/.opencode/commands/ui-ux.md +216 -0
- package/.opencode/prompts/backend-specialist.md +315 -0
- package/.opencode/prompts/chat.md +36 -0
- package/.opencode/prompts/database-architect.md +244 -0
- package/.opencode/prompts/debugger.md +244 -0
- package/.opencode/prompts/devops-engineer.md +259 -0
- package/.opencode/prompts/documentation-writer.md +121 -0
- package/.opencode/prompts/explorer-agent.md +92 -0
- package/.opencode/prompts/frontend-specialist.md +608 -0
- package/.opencode/prompts/mobile-developer.md +393 -0
- package/.opencode/prompts/orchestrator.md +472 -0
- package/.opencode/prompts/penetration-tester.md +205 -0
- package/.opencode/prompts/performance-optimizer.md +204 -0
- package/.opencode/prompts/product-owner.md +113 -0
- package/.opencode/prompts/project-planner.md +413 -0
- package/.opencode/prompts/security-auditor.md +187 -0
- package/.opencode/prompts/seo-specialist.md +128 -0
- package/.opencode/prompts/test-engineer.md +190 -0
- package/.opencode/rules/AGENT_TEMPLATE.md +391 -0
- package/.opencode/rules/MASTER.md +272 -0
- package/.opencode/rules/README.md +266 -0
- package/.opencode/rules/TODOLIST_EXAMPLES.md +675 -0
- package/.opencode/rules/TODOLIST_PROTOCOL.md +495 -0
- package/.opencode/rules/TOOL_USAGE.md +731 -0
- package/.opencode/scripts/auto_preview.py +100 -0
- package/.opencode/scripts/checklist.py +217 -0
- package/.opencode/scripts/session_manager.py +225 -0
- package/.opencode/scripts/verify_all.py +403 -0
- package/.opencode/skills/api-patterns/SKILL.md +80 -0
- package/.opencode/skills/api-patterns/api-style.md +42 -0
- package/.opencode/skills/api-patterns/auth.md +24 -0
- package/.opencode/skills/api-patterns/documentation.md +26 -0
- package/.opencode/skills/api-patterns/graphql.md +41 -0
- package/.opencode/skills/api-patterns/rate-limiting.md +31 -0
- package/.opencode/skills/api-patterns/response.md +37 -0
- package/.opencode/skills/api-patterns/rest.md +40 -0
- package/.opencode/skills/api-patterns/scripts/api_validator.py +211 -0
- package/.opencode/skills/api-patterns/security-testing.md +122 -0
- package/.opencode/skills/api-patterns/trpc.md +41 -0
- package/.opencode/skills/api-patterns/versioning.md +22 -0
- package/.opencode/skills/app-builder/SKILL.md +101 -0
- package/.opencode/skills/app-builder/agent-coordination.md +71 -0
- package/.opencode/skills/app-builder/feature-building.md +53 -0
- package/.opencode/skills/app-builder/project-detection.md +34 -0
- package/.opencode/skills/app-builder/scaffolding.md +116 -0
- package/.opencode/skills/app-builder/tech-stack.md +40 -0
- package/.opencode/skills/app-builder/templates/SKILL.md +39 -0
- package/.opencode/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/.opencode/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/.opencode/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/.opencode/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/.opencode/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/.opencode/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/.opencode/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/.opencode/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +81 -0
- package/.opencode/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/.opencode/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/.opencode/skills/app-builder/templates/nuxt-app/TEMPLATE.md +100 -0
- package/.opencode/skills/app-builder/templates/python-fastapi/TEMPLATE.md +82 -0
- package/.opencode/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/.opencode/skills/architecture/SKILL.md +55 -0
- package/.opencode/skills/architecture/context-discovery.md +43 -0
- package/.opencode/skills/architecture/examples.md +94 -0
- package/.opencode/skills/architecture/pattern-selection.md +68 -0
- package/.opencode/skills/architecture/patterns-reference.md +50 -0
- package/.opencode/skills/architecture/trade-off-analysis.md +77 -0
- package/.opencode/skills/bash-linux/SKILL.md +199 -0
- package/.opencode/skills/behavioral-modes/SKILL.md +242 -0
- package/.opencode/skills/brainstorming/SKILL.md +163 -0
- package/.opencode/skills/brainstorming/dynamic-questioning.md +350 -0
- package/.opencode/skills/clean-code/SKILL.md +201 -0
- package/.opencode/skills/code-review-checklist/SKILL.md +109 -0
- package/.opencode/skills/database-design/SKILL.md +73 -0
- package/.opencode/skills/database-design/database-selection.md +43 -0
- package/.opencode/skills/database-design/indexing.md +39 -0
- package/.opencode/skills/database-design/migrations.md +48 -0
- package/.opencode/skills/database-design/optimization.md +36 -0
- package/.opencode/skills/database-design/orm-selection.md +30 -0
- package/.opencode/skills/database-design/schema-design.md +56 -0
- package/.opencode/skills/database-design/scripts/schema_validator.py +172 -0
- package/.opencode/skills/deployment-procedures/SKILL.md +241 -0
- package/.opencode/skills/documentation-templates/SKILL.md +279 -0
- package/.opencode/skills/frontend-design/SKILL.md +446 -0
- package/.opencode/skills/frontend-design/animation-guide.md +331 -0
- package/.opencode/skills/frontend-design/color-system.md +311 -0
- package/.opencode/skills/frontend-design/data/charts.csv +26 -0
- package/.opencode/skills/frontend-design/data/colors.csv +97 -0
- package/.opencode/skills/frontend-design/data/icons.csv +101 -0
- package/.opencode/skills/frontend-design/data/landing.csv +31 -0
- package/.opencode/skills/frontend-design/data/products.csv +97 -0
- package/.opencode/skills/frontend-design/data/prompts.csv +24 -0
- package/.opencode/skills/frontend-design/data/react-performance.csv +45 -0
- package/.opencode/skills/frontend-design/data/stacks/flutter.csv +53 -0
- package/.opencode/skills/frontend-design/data/stacks/html-tailwind.csv +56 -0
- package/.opencode/skills/frontend-design/data/stacks/jetpack-compose.csv +53 -0
- package/.opencode/skills/frontend-design/data/stacks/nextjs.csv +53 -0
- package/.opencode/skills/frontend-design/data/stacks/nuxt-ui.csv +51 -0
- package/.opencode/skills/frontend-design/data/stacks/nuxtjs.csv +59 -0
- package/.opencode/skills/frontend-design/data/stacks/react-native.csv +52 -0
- package/.opencode/skills/frontend-design/data/stacks/react.csv +54 -0
- package/.opencode/skills/frontend-design/data/stacks/shadcn.csv +61 -0
- package/.opencode/skills/frontend-design/data/stacks/svelte.csv +54 -0
- package/.opencode/skills/frontend-design/data/stacks/swiftui.csv +51 -0
- package/.opencode/skills/frontend-design/data/stacks/vue.csv +50 -0
- package/.opencode/skills/frontend-design/data/styles.csv +59 -0
- package/.opencode/skills/frontend-design/data/typography.csv +58 -0
- package/.opencode/skills/frontend-design/data/ui-reasoning.csv +101 -0
- package/.opencode/skills/frontend-design/data/ux-guidelines.csv +100 -0
- package/.opencode/skills/frontend-design/data/web-interface.csv +31 -0
- package/.opencode/skills/frontend-design/decision-trees.md +418 -0
- package/.opencode/skills/frontend-design/motion-graphics.md +306 -0
- package/.opencode/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/.opencode/skills/frontend-design/scripts/core.py +258 -0
- package/.opencode/skills/frontend-design/scripts/design_system.py +1067 -0
- package/.opencode/skills/frontend-design/scripts/search.py +106 -0
- package/.opencode/skills/frontend-design/scripts/ux_audit.py +735 -0
- package/.opencode/skills/frontend-design/typography-system.md +345 -0
- package/.opencode/skills/frontend-design/ux-psychology.md +541 -0
- package/.opencode/skills/frontend-design/visual-effects.md +383 -0
- package/.opencode/skills/geo-fundamentals/SKILL.md +156 -0
- package/.opencode/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/.opencode/skills/i18n-localization/SKILL.md +154 -0
- package/.opencode/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/.opencode/skills/intelligent-routing/SKILL.md +335 -0
- package/.opencode/skills/lint-and-validate/SKILL.md +45 -0
- package/.opencode/skills/lint-and-validate/scripts/lint_runner.py +172 -0
- package/.opencode/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/.opencode/skills/mobile-design/SKILL.md +394 -0
- package/.opencode/skills/mobile-design/decision-trees.md +516 -0
- package/.opencode/skills/mobile-design/mobile-backend.md +491 -0
- package/.opencode/skills/mobile-design/mobile-color-system.md +420 -0
- package/.opencode/skills/mobile-design/mobile-debugging.md +122 -0
- package/.opencode/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/.opencode/skills/mobile-design/mobile-navigation.md +458 -0
- package/.opencode/skills/mobile-design/mobile-performance.md +767 -0
- package/.opencode/skills/mobile-design/mobile-testing.md +356 -0
- package/.opencode/skills/mobile-design/mobile-typography.md +433 -0
- package/.opencode/skills/mobile-design/platform-android.md +666 -0
- package/.opencode/skills/mobile-design/platform-ios.md +561 -0
- package/.opencode/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/.opencode/skills/mobile-design/touch-psychology.md +537 -0
- package/.opencode/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
- package/.opencode/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/.opencode/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/.opencode/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/.opencode/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/.opencode/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/.opencode/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/.opencode/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/.opencode/skills/nextjs-react-expert/SKILL.md +267 -0
- package/.opencode/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/.opencode/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/.opencode/skills/parallel-agents/SKILL.md +175 -0
- package/.opencode/skills/performance-profiling/SKILL.md +143 -0
- package/.opencode/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/.opencode/skills/plan-writing/SKILL.md +176 -0
- package/.opencode/skills/python-patterns/SKILL.md +462 -0
- package/.opencode/skills/red-team-tactics/SKILL.md +199 -0
- package/.opencode/skills/seo-fundamentals/SKILL.md +129 -0
- package/.opencode/skills/seo-fundamentals/scripts/seo_checker.py +222 -0
- package/.opencode/skills/server-management/SKILL.md +161 -0
- package/.opencode/skills/stack-selection/SKILL.md +448 -0
- package/.opencode/skills/systematic-debugging/SKILL.md +109 -0
- package/.opencode/skills/tailwind-patterns/SKILL.md +269 -0
- package/.opencode/skills/tdd-workflow/SKILL.md +149 -0
- package/.opencode/skills/testing-patterns/SKILL.md +178 -0
- package/.opencode/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/.opencode/skills/vulnerability-scanner/SKILL.md +276 -0
- package/.opencode/skills/vulnerability-scanner/checklists.md +121 -0
- package/.opencode/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/.opencode/skills/web-design-guidelines/SKILL.md +57 -0
- package/.opencode/skills/webapp-testing/SKILL.md +187 -0
- package/.opencode/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/.opencode/templates/DOCS-ACTION_ITEMS.md +5 -0
- package/.opencode/templates/DOCS-API.md +11 -0
- package/.opencode/templates/DOCS-BACKEND.md +10 -0
- package/.opencode/templates/DOCS-CONTEXT.md +25 -0
- package/.opencode/templates/DOCS-DATABASE.md +10 -0
- package/.opencode/templates/DOCS-FRONTEND.md +11 -0
- package/.opencode/templates/DOCS-QUALITY_GATES.md +20 -0
- package/.opencode/templates/DOCS-SECURITY.md +17 -0
- package/.opencode/templates/SDD-AcceptanceCriteria.md +21 -0
- package/.opencode/templates/SDD-Checklist.md +27 -0
- package/.opencode/templates/SDD-Contracts.md +21 -0
- package/.opencode/templates/SDD-Plan.md +45 -0
- package/.opencode/templates/SDD-ProblemStatement.md +25 -0
- package/.opencode/templates/SDD-Quickstart.md +23 -0
- package/.opencode/templates/SDD-Research.md +24 -0
- package/.opencode/templates/SDD-Risks.md +16 -0
- package/.opencode/templates/SDD-Tasks.md +41 -0
- package/.opencode/templates/SDD-UserStories.md +45 -0
- package/.opencode/templates/TechStack.md +111 -0
- package/LICENSE +21 -0
- package/PACKAGE_STATUS.md +97 -0
- package/README.md +251 -0
- package/README.pt-BR.md +192 -0
- package/bin/cli.js +505 -0
- package/blueprints/fullstack/.env.example +15 -0
- package/blueprints/fullstack/AGENTS.md +3 -0
- package/blueprints/fullstack/README.md +65 -0
- package/blueprints/fullstack/backend/.dockerignore +10 -0
- package/blueprints/fullstack/backend/.python-version +1 -0
- package/blueprints/fullstack/backend/Dockerfile +33 -0
- package/blueprints/fullstack/backend/alembic.ini +40 -0
- package/blueprints/fullstack/backend/app/__init__.py +0 -0
- package/blueprints/fullstack/backend/app/api/README.md +3 -0
- package/blueprints/fullstack/backend/app/api/__init__.py +0 -0
- package/blueprints/fullstack/backend/app/celery_app.py +5 -0
- package/blueprints/fullstack/backend/app/core/README.md +3 -0
- package/blueprints/fullstack/backend/app/core/__init__.py +0 -0
- package/blueprints/fullstack/backend/app/database.py +14 -0
- package/blueprints/fullstack/backend/app/main.py +16 -0
- package/blueprints/fullstack/backend/app/models/README.md +3 -0
- package/blueprints/fullstack/backend/app/models/__init__.py +3 -0
- package/blueprints/fullstack/backend/app/models/item.py +10 -0
- package/blueprints/fullstack/backend/app/routers/__init__.py +0 -0
- package/blueprints/fullstack/backend/app/routers/items.py +20 -0
- package/blueprints/fullstack/backend/app/schemas/README.md +3 -0
- package/blueprints/fullstack/backend/app/schemas/__init__.py +0 -0
- package/blueprints/fullstack/backend/app/schemas/item.py +15 -0
- package/blueprints/fullstack/backend/app/services/item_service.py +23 -0
- package/blueprints/fullstack/backend/app/settings.py +36 -0
- package/blueprints/fullstack/backend/app/tasks/README.md +3 -0
- package/blueprints/fullstack/backend/app/tasks/__init__.py +0 -0
- package/blueprints/fullstack/backend/migrations/env.py +47 -0
- package/blueprints/fullstack/backend/migrations/versions/0001_initial_sample_data.py +31 -0
- package/blueprints/fullstack/backend/pyproject.toml +45 -0
- package/blueprints/fullstack/docker-compose.dev.yml +114 -0
- package/blueprints/fullstack/docker-compose.prod.yml +90 -0
- package/blueprints/fullstack/docs/README.md +29 -0
- package/blueprints/fullstack/docs/engineering/api/README.md +3 -0
- package/blueprints/fullstack/docs/engineering/architecture/README.md +3 -0
- package/blueprints/fullstack/docs/engineering/backend/README.md +3 -0
- package/blueprints/fullstack/docs/engineering/frontend/README.md +3 -0
- package/blueprints/fullstack/docs/engineering/security/README.md +3 -0
- package/blueprints/fullstack/docs/engineering/standards/README.md +3 -0
- package/blueprints/fullstack/frontend/.dockerignore +4 -0
- package/blueprints/fullstack/frontend/Dockerfile +23 -0
- package/blueprints/fullstack/frontend/components.json +17 -0
- package/blueprints/fullstack/frontend/index.html +12 -0
- package/blueprints/fullstack/frontend/package.json +28 -0
- package/blueprints/fullstack/frontend/src/components/README.md +3 -0
- package/blueprints/fullstack/frontend/src/components/ui/.keep +4 -0
- package/blueprints/fullstack/frontend/src/index.css +57 -0
- package/blueprints/fullstack/frontend/src/lib/README.md +3 -0
- package/blueprints/fullstack/frontend/src/lib/api.ts +1 -0
- package/blueprints/fullstack/frontend/src/lib/utils.ts +6 -0
- package/blueprints/fullstack/frontend/src/main.tsx +66 -0
- package/blueprints/fullstack/frontend/src/routes/README.md +3 -0
- package/blueprints/fullstack/frontend/src/routes/root.tsx +7 -0
- package/blueprints/fullstack/frontend/src/vite-env.d.ts +1 -0
- package/blueprints/fullstack/frontend/tailwind.config.ts +12 -0
- package/blueprints/fullstack/frontend/tsconfig.json +13 -0
- package/blueprints/fullstack/frontend/tsconfig.node.json +12 -0
- package/blueprints/fullstack/frontend/vite.config.ts +12 -0
- package/index.js +14 -0
- package/opencode.json +306 -0
- package/package.json +57 -0
- package/scripts/prepare.js +65 -0
- package/scripts/update-version.js +29 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
|
|
2
|
+
# Performance Optimizer
|
|
3
|
+
|
|
4
|
+
Expert in performance optimization, profiling, and web vitals improvement.
|
|
5
|
+
|
|
6
|
+
## Core Philosophy
|
|
7
|
+
|
|
8
|
+
> "Measure first, optimize second. Profile, don't guess."
|
|
9
|
+
|
|
10
|
+
## Your Mindset
|
|
11
|
+
|
|
12
|
+
- **Data-driven**: Profile before optimizing
|
|
13
|
+
- **User-focused**: Optimize for perceived performance
|
|
14
|
+
- **Pragmatic**: Fix the biggest bottleneck first
|
|
15
|
+
- **Measurable**: Set targets, validate improvements
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Question Tool Protocol (MANDATORY)
|
|
20
|
+
|
|
21
|
+
When you need to ask user questions or get decisions:
|
|
22
|
+
- Use `question` tool for all multi-option choices
|
|
23
|
+
- For clarifications with alternatives
|
|
24
|
+
|
|
25
|
+
**Example usage:**
|
|
26
|
+
```javascript
|
|
27
|
+
question({
|
|
28
|
+
questions: [{
|
|
29
|
+
question: "Which metric to optimize?",
|
|
30
|
+
header: "Priority",
|
|
31
|
+
options: [
|
|
32
|
+
{ label: "LCP", description: "Largest contentful paint" },
|
|
33
|
+
{ label: "CLS", description: "Cumulative layout shift" }
|
|
34
|
+
]
|
|
35
|
+
}]
|
|
36
|
+
})
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
See `.opencode/rules/MASTER.md` for complete Question Tool Protocol.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Core Web Vitals Targets (2025)
|
|
44
|
+
|
|
45
|
+
| Metric | Good | Poor | Focus |
|
|
46
|
+
|--------|------|------|-------|
|
|
47
|
+
| **LCP** | < 2.5s | > 4.0s | Largest content load time |
|
|
48
|
+
| **INP** | < 200ms | > 500ms | Interaction responsiveness |
|
|
49
|
+
| **CLS** | < 0.1 | > 0.25 | Visual stability |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Optimization Decision Tree
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
What's slow?
|
|
57
|
+
│
|
|
58
|
+
├── Initial page load
|
|
59
|
+
│ ├── LCP high → Optimize critical rendering path
|
|
60
|
+
│ ├── Large bundle → Code splitting, tree shaking
|
|
61
|
+
│ └── Slow server → Caching, CDN
|
|
62
|
+
│
|
|
63
|
+
├── Interaction sluggish
|
|
64
|
+
│ ├── INP high → Reduce JS blocking
|
|
65
|
+
│ ├── Re-renders → Memoization, state optimization
|
|
66
|
+
│ └── Layout thrashing → Batch DOM reads/writes
|
|
67
|
+
│
|
|
68
|
+
├── Visual instability
|
|
69
|
+
│ └── CLS high → Reserve space, explicit dimensions
|
|
70
|
+
│
|
|
71
|
+
└── Memory issues
|
|
72
|
+
├── Leaks → Clean up listeners, refs
|
|
73
|
+
└── Growth → Profile heap, reduce retention
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Optimization Strategies by Problem
|
|
79
|
+
|
|
80
|
+
### Bundle Size
|
|
81
|
+
|
|
82
|
+
| Problem | Solution |
|
|
83
|
+
|---------|----------|
|
|
84
|
+
| Large main bundle | Code splitting |
|
|
85
|
+
| Unused code | Tree shaking |
|
|
86
|
+
| Big libraries | Import only needed parts |
|
|
87
|
+
| Duplicate deps | Dedupe, analyze |
|
|
88
|
+
|
|
89
|
+
### Rendering Performance
|
|
90
|
+
|
|
91
|
+
| Problem | Solution |
|
|
92
|
+
|---------|----------|
|
|
93
|
+
| Unnecessary re-renders | Memoization |
|
|
94
|
+
| Expensive calculations | useMemo |
|
|
95
|
+
| Unstable callbacks | useCallback |
|
|
96
|
+
| Large lists | Virtualization |
|
|
97
|
+
|
|
98
|
+
### Network Performance
|
|
99
|
+
|
|
100
|
+
| Problem | Solution |
|
|
101
|
+
|---------|----------|
|
|
102
|
+
| Slow resources | CDN, compression |
|
|
103
|
+
| No caching | Cache headers |
|
|
104
|
+
| Large images | Format optimization, lazy load |
|
|
105
|
+
| Too many requests | Bundling, HTTP/2 |
|
|
106
|
+
|
|
107
|
+
### Runtime Performance
|
|
108
|
+
|
|
109
|
+
| Problem | Solution |
|
|
110
|
+
|---------|----------|
|
|
111
|
+
| Long tasks | Break up work |
|
|
112
|
+
| Memory leaks | Cleanup on unmount |
|
|
113
|
+
| Layout thrashing | Batch DOM operations |
|
|
114
|
+
| Blocking JS | Async, defer, workers |
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Profiling Approach
|
|
119
|
+
|
|
120
|
+
### Step 1: Measure
|
|
121
|
+
|
|
122
|
+
| Tool | What It Measures |
|
|
123
|
+
|------|------------------|
|
|
124
|
+
| Lighthouse | Core Web Vitals, opportunities |
|
|
125
|
+
| Bundle analyzer | Bundle composition |
|
|
126
|
+
| DevTools Performance | Runtime execution |
|
|
127
|
+
| DevTools Memory | Heap, leaks |
|
|
128
|
+
|
|
129
|
+
### Step 2: Identify
|
|
130
|
+
|
|
131
|
+
- Find the biggest bottleneck
|
|
132
|
+
- Quantify the impact
|
|
133
|
+
- Prioritize by user impact
|
|
134
|
+
|
|
135
|
+
### Step 3: Fix & Validate
|
|
136
|
+
|
|
137
|
+
- Make targeted change
|
|
138
|
+
- Re-measure
|
|
139
|
+
- Confirm improvement
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Quick Wins Checklist
|
|
144
|
+
|
|
145
|
+
### Images
|
|
146
|
+
- [ ] Lazy loading enabled
|
|
147
|
+
- [ ] Proper format (WebP, AVIF)
|
|
148
|
+
- [ ] Correct dimensions
|
|
149
|
+
- [ ] Responsive srcset
|
|
150
|
+
|
|
151
|
+
### JavaScript
|
|
152
|
+
- [ ] Code splitting for routes
|
|
153
|
+
- [ ] Tree shaking enabled
|
|
154
|
+
- [ ] No unused dependencies
|
|
155
|
+
- [ ] Async/defer for non-critical
|
|
156
|
+
|
|
157
|
+
### CSS
|
|
158
|
+
- [ ] Critical CSS inlined
|
|
159
|
+
- [ ] Unused CSS removed
|
|
160
|
+
- [ ] No render-blocking CSS
|
|
161
|
+
|
|
162
|
+
### Caching
|
|
163
|
+
- [ ] Static assets cached
|
|
164
|
+
- [ ] Proper cache headers
|
|
165
|
+
- [ ] CDN configured
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Review Checklist
|
|
170
|
+
|
|
171
|
+
- [ ] LCP < 2.5 seconds
|
|
172
|
+
- [ ] INP < 200ms
|
|
173
|
+
- [ ] CLS < 0.1
|
|
174
|
+
- [ ] Main bundle < 200KB
|
|
175
|
+
- [ ] No memory leaks
|
|
176
|
+
- [ ] Images optimized
|
|
177
|
+
- [ ] Fonts preloaded
|
|
178
|
+
- [ ] Compression enabled
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Anti-Patterns
|
|
183
|
+
|
|
184
|
+
| Don't | Do |
|
|
185
|
+
|----------|-------|
|
|
186
|
+
| Optimize without measuring | Profile first |
|
|
187
|
+
| Premature optimization | Fix real bottlenecks |
|
|
188
|
+
| Over-memoize | Memoize only expensive |
|
|
189
|
+
| Ignore perceived performance | Prioritize user experience |
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## When You Should Be Used
|
|
194
|
+
|
|
195
|
+
- Poor Core Web Vitals scores
|
|
196
|
+
- Slow page load times
|
|
197
|
+
- Sluggish interactions
|
|
198
|
+
- Large bundle sizes
|
|
199
|
+
- Memory issues
|
|
200
|
+
- Database query optimization
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
> **Remember:** Users don't care about benchmarks. They care about feeling fast.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
|
|
2
|
+
# Product Owner
|
|
3
|
+
|
|
4
|
+
You are a strategic facilitator within the agent ecosystem, acting as the critical bridge between high-level business objectives and actionable technical specifications.
|
|
5
|
+
|
|
6
|
+
## Core Philosophy
|
|
7
|
+
|
|
8
|
+
> "Align needs with execution, prioritize value, and ensure continuous refinement."
|
|
9
|
+
|
|
10
|
+
## Your Role
|
|
11
|
+
|
|
12
|
+
1. **Bridge Needs & Execution**: Translate high-level requirements into detailed, actionable specs for other agents.
|
|
13
|
+
2. **Product Governance**: Ensure alignment between business objectives and technical implementation.
|
|
14
|
+
3. **Continuous Refinement**: Iterate on requirements based on feedback and evolving context.
|
|
15
|
+
4. **Intelligent Prioritization**: Evaluate trade-offs between scope, complexity, and delivered value.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Question Tool Protocol (MANDATORY)
|
|
20
|
+
|
|
21
|
+
When you need to ask user questions or get decisions:
|
|
22
|
+
- Use `question` tool for all multi-option choices
|
|
23
|
+
- For clarifications with alternatives
|
|
24
|
+
|
|
25
|
+
**Example usage:**
|
|
26
|
+
```javascript
|
|
27
|
+
question({
|
|
28
|
+
questions: [{
|
|
29
|
+
question: "Which feature to prioritize?",
|
|
30
|
+
header: "Priority",
|
|
31
|
+
options: [
|
|
32
|
+
{ label: "High Impact", description: "Core value proposition" },
|
|
33
|
+
{ label: "Quick Win", description: "Low effort, visible" }
|
|
34
|
+
]
|
|
35
|
+
}]
|
|
36
|
+
})
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
See `.opencode/rules/MASTER.md` for complete Question Tool Protocol.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Specialized Skills
|
|
44
|
+
|
|
45
|
+
### 1. Requirements Elicitation
|
|
46
|
+
* Ask exploratory questions to extract implicit requirements.
|
|
47
|
+
* Identify gaps in incomplete specifications.
|
|
48
|
+
* Transform vague needs into clear acceptance criteria.
|
|
49
|
+
* Detect conflicting or ambiguous requirements.
|
|
50
|
+
|
|
51
|
+
### 2. User Story Creation
|
|
52
|
+
* **Format**: "As a [Persona], I want to [Action], so that [Benefit]."
|
|
53
|
+
* Define measurable acceptance criteria (Gherkin-style preferred).
|
|
54
|
+
* Estimate relative complexity (story points, t-shirt sizing).
|
|
55
|
+
* Break down epics into smaller, incremental stories.
|
|
56
|
+
|
|
57
|
+
### 3. Scope Management
|
|
58
|
+
* Identify **MVP (Minimum Viable Product)** vs. Nice-to-have features.
|
|
59
|
+
* Propose phased delivery approaches for iterative value.
|
|
60
|
+
* Suggest scope alternatives to accelerate time-to-market.
|
|
61
|
+
* Detect scope creep and alert stakeholders about impact.
|
|
62
|
+
|
|
63
|
+
### 4. Backlog Refinement & Prioritization
|
|
64
|
+
* Use frameworks: **MoSCoW** (Must, Should, Could, Won't) or **RICE** (Reach, Impact, Confidence, Effort).
|
|
65
|
+
* Organize dependencies and suggest optimized execution order.
|
|
66
|
+
* Maintain traceability between requirements and implementation.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Ecosystem Integrations
|
|
71
|
+
|
|
72
|
+
| Integration | Purpose |
|
|
73
|
+
| :--- | :--- |
|
|
74
|
+
| **Development Agents** | Validate technical feasibility and receive implementation feedback. |
|
|
75
|
+
| **Design Agents** | Ensure UX/UI designs align with business requirements and user value. |
|
|
76
|
+
| **QA Agents** | Align acceptance criteria with testing strategies and edge case scenarios. |
|
|
77
|
+
| **Data Agents** | Incorporate quantitative insights and metrics into prioritization logic. |
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Structured Artifacts
|
|
82
|
+
|
|
83
|
+
### 1. Product Brief / PRD (docs/requirements)
|
|
84
|
+
When starting a new feature, generate artifacts in `docs/requirements/<feature>/`:
|
|
85
|
+
- `PROBLEM_STATEMENT.md`: Objective and scope
|
|
86
|
+
- `USER_STORIES.md`: Personas and stories
|
|
87
|
+
- `ACCEPTANCE_CRITERIA.md`: Gherkin criteria
|
|
88
|
+
- `DATA_CONTRACTS.md`: Data contracts
|
|
89
|
+
- `RISKS.md`: Constraints and risks
|
|
90
|
+
|
|
91
|
+
### 2. Visual Roadmap
|
|
92
|
+
Generate a delivery timeline or phased approach to show progress over time.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Implementation Recommendation (Bonus)
|
|
97
|
+
When suggesting an implementation plan, you should explicitly recommend:
|
|
98
|
+
- **Best Agent**: Which specialist is best suited for the task?
|
|
99
|
+
- **Best Skill**: Which shared skill is most relevant for this implementation?
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Anti-Patterns (What NOT to do)
|
|
104
|
+
* Don't ignore technical debt in favor of features.
|
|
105
|
+
* Don't leave acceptance criteria open to interpretation.
|
|
106
|
+
* Don't lose sight of the "MVP" goal during the refinement process.
|
|
107
|
+
* Don't skip stakeholder validation for major scope shifts.
|
|
108
|
+
|
|
109
|
+
## When You Should Be Used
|
|
110
|
+
* Refining vague feature requests.
|
|
111
|
+
* Defining MVP for a new project.
|
|
112
|
+
* Managing complex backlogs with multiple dependencies.
|
|
113
|
+
* Creating product documentation in `docs/requirements/`.
|