flyee 0.1.0
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/LICENSE +21 -0
- package/README.md +134 -0
- package/bin/install.js +357 -0
- package/bridge/bridge.py +1780 -0
- package/bridge/local_tracker.py +722 -0
- package/core/agents/backend-specialist.md +266 -0
- package/core/agents/code-archaeologist.md +106 -0
- package/core/agents/database-architect.md +226 -0
- package/core/agents/debugger.md +225 -0
- package/core/agents/devops-engineer.md +323 -0
- package/core/agents/documentation-writer.md +104 -0
- package/core/agents/explorer-agent.md +73 -0
- package/core/agents/frontend-specialist.md +743 -0
- package/core/agents/game-developer.md +162 -0
- package/core/agents/mobile-developer.md +377 -0
- package/core/agents/orchestrator.md +416 -0
- package/core/agents/penetration-tester.md +188 -0
- package/core/agents/performance-optimizer.md +187 -0
- package/core/agents/product-manager.md +112 -0
- package/core/agents/product-owner.md +95 -0
- package/core/agents/project-planner.md +470 -0
- package/core/agents/qa-automation-engineer.md +103 -0
- package/core/agents/security-auditor.md +170 -0
- package/core/agents/seo-specialist.md +111 -0
- package/core/agents/stitch-designer.md +190 -0
- package/core/agents/tdd-reviewer.md +282 -0
- package/core/agents/test-engineer.md +158 -0
- package/core/scripts/auto_preview.py +148 -0
- package/core/scripts/checklist.py +243 -0
- package/core/scripts/cost_report.py +149 -0
- package/core/scripts/doc-sync-check.py +461 -0
- package/core/scripts/parse_user_stories.py +79 -0
- package/core/scripts/prepare_notion_updates.py +172 -0
- package/core/scripts/print_create_payload.py +18 -0
- package/core/scripts/session_manager.py +120 -0
- package/core/scripts/task_complete.py +127 -0
- package/core/scripts/verify_all.py +327 -0
- package/core/skills/analytics-strategy/SKILL.md +128 -0
- package/core/skills/api-patterns/SKILL.md +81 -0
- package/core/skills/api-patterns/api-style.md +42 -0
- package/core/skills/api-patterns/auth.md +24 -0
- package/core/skills/api-patterns/documentation.md +26 -0
- package/core/skills/api-patterns/graphql.md +41 -0
- package/core/skills/api-patterns/rate-limiting.md +31 -0
- package/core/skills/api-patterns/response.md +37 -0
- package/core/skills/api-patterns/rest.md +40 -0
- package/core/skills/api-patterns/scripts/api_validator.py +211 -0
- package/core/skills/api-patterns/security-testing.md +122 -0
- package/core/skills/api-patterns/trpc.md +41 -0
- package/core/skills/api-patterns/versioning.md +22 -0
- package/core/skills/app-builder/SKILL.md +75 -0
- package/core/skills/app-builder/agent-coordination.md +71 -0
- package/core/skills/app-builder/feature-building.md +53 -0
- package/core/skills/app-builder/project-detection.md +34 -0
- package/core/skills/app-builder/scaffolding.md +118 -0
- package/core/skills/app-builder/tech-stack.md +40 -0
- package/core/skills/app-builder/templates/SKILL.md +39 -0
- package/core/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/core/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/core/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/core/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/core/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/core/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/core/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/core/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/core/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/core/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/core/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/core/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/core/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/core/skills/architecture/SKILL.md +55 -0
- package/core/skills/architecture/context-discovery.md +43 -0
- package/core/skills/architecture/examples.md +94 -0
- package/core/skills/architecture/pattern-selection.md +68 -0
- package/core/skills/architecture/patterns-reference.md +50 -0
- package/core/skills/architecture/trade-off-analysis.md +77 -0
- package/core/skills/atomic-design/SKILL.md +282 -0
- package/core/skills/atomic-design/references/classification-guide.md +132 -0
- package/core/skills/atomic-design/references/quality-checklist.md +60 -0
- package/core/skills/atomic-design/references/stacks/stack-blade.md +254 -0
- package/core/skills/atomic-design/references/stacks/stack-nextjs.md +272 -0
- package/core/skills/atomic-design/references/stacks/stack-react.md +239 -0
- package/core/skills/atomic-design/references/stacks/stack-vue.md +224 -0
- package/core/skills/bash-linux/SKILL.md +199 -0
- package/core/skills/behavioral-modes/SKILL.md +242 -0
- package/core/skills/brainstorming/SKILL.md +163 -0
- package/core/skills/brainstorming/dynamic-questioning.md +373 -0
- package/core/skills/checkpointing-patterns/SKILL.md +163 -0
- package/core/skills/clean-code/SKILL.md +201 -0
- package/core/skills/code-review-checklist/SKILL.md +109 -0
- package/core/skills/code-truth-validation/SKILL.md +149 -0
- package/core/skills/component-library-discovery/SKILL.md +154 -0
- package/core/skills/content-strategy/SKILL.md +222 -0
- package/core/skills/context-budget/SKILL.md +155 -0
- package/core/skills/context-gathering-patterns/SKILL.md +278 -0
- package/core/skills/cost-tracking/SKILL.md +206 -0
- package/core/skills/database-design/SKILL.md +52 -0
- package/core/skills/database-design/database-selection.md +43 -0
- package/core/skills/database-design/indexing.md +39 -0
- package/core/skills/database-design/migrations.md +48 -0
- package/core/skills/database-design/optimization.md +36 -0
- package/core/skills/database-design/orm-selection.md +30 -0
- package/core/skills/database-design/schema-design.md +56 -0
- package/core/skills/database-design/scripts/schema_validator.py +172 -0
- package/core/skills/deployment-procedures/SKILL.md +295 -0
- package/core/skills/design-md/README.md +34 -0
- package/core/skills/design-md/SKILL.md +172 -0
- package/core/skills/design-md/examples/DESIGN.md +154 -0
- package/core/skills/design-system-enforcement/SKILL.md +339 -0
- package/core/skills/doc.md +177 -0
- package/core/skills/document-registry/SKILL.md +130 -0
- package/core/skills/documentation-publishing/SKILL.md +174 -0
- package/core/skills/documentation-templates/SKILL.md +194 -0
- package/core/skills/enhance-prompt/README.md +34 -0
- package/core/skills/enhance-prompt/SKILL.md +204 -0
- package/core/skills/enhance-prompt/references/KEYWORDS.md +114 -0
- package/core/skills/frontend-design/SKILL.md +430 -0
- package/core/skills/frontend-design/animation-guide.md +331 -0
- package/core/skills/frontend-design/color-system.md +311 -0
- package/core/skills/frontend-design/decision-trees.md +418 -0
- package/core/skills/frontend-design/motion-graphics.md +306 -0
- package/core/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/core/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/core/skills/frontend-design/typography-system.md +345 -0
- package/core/skills/frontend-design/ux-psychology.md +541 -0
- package/core/skills/frontend-design/visual-effects.md +383 -0
- package/core/skills/game-development/2d-games/SKILL.md +119 -0
- package/core/skills/game-development/3d-games/SKILL.md +135 -0
- package/core/skills/game-development/SKILL.md +167 -0
- package/core/skills/game-development/game-art/SKILL.md +185 -0
- package/core/skills/game-development/game-audio/SKILL.md +190 -0
- package/core/skills/game-development/game-design/SKILL.md +129 -0
- package/core/skills/game-development/mobile-games/SKILL.md +108 -0
- package/core/skills/game-development/multiplayer/SKILL.md +132 -0
- package/core/skills/game-development/pc-games/SKILL.md +144 -0
- package/core/skills/game-development/vr-ar/SKILL.md +123 -0
- package/core/skills/game-development/web-games/SKILL.md +150 -0
- package/core/skills/geo-fundamentals/SKILL.md +156 -0
- package/core/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/core/skills/git-workflow/SKILL.md +263 -0
- package/core/skills/history-check-patterns/SKILL.md +125 -0
- package/core/skills/i18n-localization/SKILL.md +154 -0
- package/core/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/core/skills/integration-completeness/SKILL.md +219 -0
- package/core/skills/intelligent-routing/SKILL.md +370 -0
- package/core/skills/lint-and-validate/SKILL.md +45 -0
- package/core/skills/lint-and-validate/scripts/lint_runner.py +173 -0
- package/core/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/core/skills/local-verification/SKILL.md +195 -0
- package/core/skills/mcp-builder/SKILL.md +176 -0
- package/core/skills/mobile-design/SKILL.md +394 -0
- package/core/skills/mobile-design/decision-trees.md +516 -0
- package/core/skills/mobile-design/mobile-backend.md +491 -0
- package/core/skills/mobile-design/mobile-color-system.md +420 -0
- package/core/skills/mobile-design/mobile-debugging.md +122 -0
- package/core/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/core/skills/mobile-design/mobile-navigation.md +458 -0
- package/core/skills/mobile-design/mobile-performance.md +767 -0
- package/core/skills/mobile-design/mobile-testing.md +356 -0
- package/core/skills/mobile-design/mobile-typography.md +433 -0
- package/core/skills/mobile-design/platform-android.md +666 -0
- package/core/skills/mobile-design/platform-ios.md +561 -0
- package/core/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/core/skills/mobile-design/touch-psychology.md +537 -0
- package/core/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
- package/core/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/core/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/core/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/core/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/core/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/core/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/core/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/core/skills/nextjs-react-expert/SKILL.md +267 -0
- package/core/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/core/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/core/skills/nodejs-best-practices/SKILL.md +333 -0
- package/core/skills/notion-task-patterns/SKILL.md +2529 -0
- package/core/skills/page-specifications/SKILL.md +367 -0
- package/core/skills/parallel-agents/SKILL.md +175 -0
- package/core/skills/performance-profiling/SKILL.md +143 -0
- package/core/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/core/skills/plan-writing/SKILL.md +190 -0
- package/core/skills/powershell-windows/SKILL.md +167 -0
- package/core/skills/project-foundation/SKILL.md +117 -0
- package/core/skills/project-setup/SKILL.md +141 -0
- package/core/skills/project-tracking-patterns/SKILL.md +357 -0
- package/core/skills/project-type-discovery/SKILL.md +239 -0
- package/core/skills/python-patterns/SKILL.md +441 -0
- package/core/skills/qa-test-generation/SKILL.md +156 -0
- package/core/skills/react-components/README.md +36 -0
- package/core/skills/react-components/SKILL.md +47 -0
- package/core/skills/react-components/examples/gold-standard-card.tsx +80 -0
- package/core/skills/react-components/package-lock.json +231 -0
- package/core/skills/react-components/package.json +16 -0
- package/core/skills/react-components/resources/architecture-checklist.md +15 -0
- package/core/skills/react-components/resources/component-template.tsx +37 -0
- package/core/skills/react-components/resources/stitch-api-reference.md +14 -0
- package/core/skills/react-components/resources/style-guide.json +27 -0
- package/core/skills/react-components/scripts/fetch-stitch.sh +30 -0
- package/core/skills/react-components/scripts/validate.js +68 -0
- package/core/skills/red-team-tactics/SKILL.md +199 -0
- package/core/skills/remotion/README.md +105 -0
- package/core/skills/remotion/SKILL.md +393 -0
- package/core/skills/remotion/examples/WalkthroughComposition.tsx +78 -0
- package/core/skills/remotion/examples/screens.json +56 -0
- package/core/skills/remotion/resources/composition-checklist.md +124 -0
- package/core/skills/remotion/resources/screen-slide-template.tsx +123 -0
- package/core/skills/remotion/scripts/download-stitch-asset.sh +38 -0
- package/core/skills/seo-fundamentals/SKILL.md +129 -0
- package/core/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/core/skills/server-management/SKILL.md +161 -0
- package/core/skills/session-resilience/SKILL.md +199 -0
- package/core/skills/shadcn-ui/README.md +248 -0
- package/core/skills/shadcn-ui/SKILL.md +326 -0
- package/core/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
- package/core/skills/shadcn-ui/examples/data-table.tsx +313 -0
- package/core/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
- package/core/skills/shadcn-ui/resources/component-catalog.md +481 -0
- package/core/skills/shadcn-ui/resources/customization-guide.md +516 -0
- package/core/skills/shadcn-ui/resources/migration-guide.md +463 -0
- package/core/skills/shadcn-ui/resources/setup-guide.md +412 -0
- package/core/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
- package/core/skills/state-machine/SKILL.md +264 -0
- package/core/skills/stitch-loop/README.md +54 -0
- package/core/skills/stitch-loop/SKILL.md +203 -0
- package/core/skills/stitch-loop/examples/SITE.md +73 -0
- package/core/skills/stitch-loop/examples/next-prompt.md +25 -0
- package/core/skills/stitch-loop/resources/baton-schema.md +61 -0
- package/core/skills/stitch-loop/resources/site-template.md +104 -0
- package/core/skills/systematic-debugging/SKILL.md +109 -0
- package/core/skills/tailwind-patterns/SKILL.md +284 -0
- package/core/skills/tdd-validation/SKILL.md +243 -0
- package/core/skills/tdd-workflow/SKILL.md +284 -0
- package/core/skills/testing-patterns/SKILL.md +196 -0
- package/core/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/core/skills/ui-ux-discovery/SKILL.md +329 -0
- package/core/skills/ui-validation/SKILL.md +190 -0
- package/core/skills/ui-validation/scripts/ui_antipattern_check.py +317 -0
- package/core/skills/verification-gate/SKILL.md +205 -0
- package/core/skills/vulnerability-scanner/SKILL.md +276 -0
- package/core/skills/vulnerability-scanner/checklists.md +121 -0
- package/core/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/core/skills/web-design-guidelines/SKILL.md +57 -0
- package/core/skills/webapp-testing/SKILL.md +187 -0
- package/core/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/core/templates/ARCHITECTURE.template.md +407 -0
- package/core/templates/project-resources.example.json +71 -0
- package/core/workflows/atomic.md +182 -0
- package/core/workflows/brainstorm.md +134 -0
- package/core/workflows/check-task.md +242 -0
- package/core/workflows/copy-collect.md +306 -0
- package/core/workflows/create-agent.md +33 -0
- package/core/workflows/create-skill.md +39 -0
- package/core/workflows/create-workflow.md +33 -0
- package/core/workflows/create.md +92 -0
- package/core/workflows/debug.md +186 -0
- package/core/workflows/demand.md +443 -0
- package/core/workflows/deploy.md +260 -0
- package/core/workflows/discovery.md +267 -0
- package/core/workflows/document.md +272 -0
- package/core/workflows/ds-components.md +296 -0
- package/core/workflows/ds-init.md +58 -0
- package/core/workflows/ds-refactor.md +245 -0
- package/core/workflows/ds-references.md +197 -0
- package/core/workflows/ds-styleguide.md +237 -0
- package/core/workflows/ds-token-diff.md +103 -0
- package/core/workflows/ds-tokens.md +317 -0
- package/core/workflows/ds-validate.md +309 -0
- package/core/workflows/execute.md +483 -0
- package/core/workflows/extract-template.md +278 -0
- package/core/workflows/fix-failed-tests.md +160 -0
- package/core/workflows/init-project.md +386 -0
- package/core/workflows/legacy-project.md +849 -0
- package/core/workflows/log.md +97 -0
- package/core/workflows/new-project.md +610 -0
- package/core/workflows/new-project.md.bak +3292 -0
- package/core/workflows/new-task.md +404 -0
- package/core/workflows/orchestrate.md +237 -0
- package/core/workflows/page-build.md +296 -0
- package/core/workflows/plan.md +89 -0
- package/core/workflows/prd.md +255 -0
- package/core/workflows/preview.md +81 -0
- package/core/workflows/review-page.md +304 -0
- package/core/workflows/status.md +86 -0
- package/core/workflows/stitch.md +226 -0
- package/core/workflows/task-complete.md +473 -0
- package/core/workflows/task-update.md +163 -0
- package/core/workflows/tdd.md +344 -0
- package/core/workflows/test.md +251 -0
- package/core/workflows/ui-ux-pro-max.md +437 -0
- package/core/workflows/ux-mobile-optimize.md +262 -0
- package/core/workflows/ux-mobile-validate.md +297 -0
- package/engine-files/GEMINI.md +69 -0
- package/package.json +47 -0
- package/runtime-adapters/antigravity.js +26 -0
- package/runtime-adapters/claude.js +57 -0
- package/runtime-adapters/codex.js +51 -0
- package/runtime-adapters/copilot.js +51 -0
- package/runtime-adapters/cursor.js +51 -0
- package/runtime-adapters/gemini-cli.js +30 -0
- package/runtime-adapters/opencode.js +51 -0
- package/runtime-adapters/windsurf.js +51 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: page-specifications
|
|
3
|
+
description: Detalhamento granular de cada página do projeto. Cria PAGE-SPEC-*.md com layout, seções, componentes, estados, responsividade e integração com Design System.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Page Specifications Skill
|
|
7
|
+
|
|
8
|
+
> **Objetivo:** Detalhar CADA página do projeto antes do Breakdown.
|
|
9
|
+
> Garante que implementação tenha blueprint completo, não apenas copy genérico.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 🎯 PROPÓSITO
|
|
14
|
+
|
|
15
|
+
Esta skill resolve a lacuna entre:
|
|
16
|
+
- **Content Strategy** (O QUE dizer) → Copy, tom, mensagens
|
|
17
|
+
- **Breakdown** (O QUE fazer) → Tasks de desenvolvimento
|
|
18
|
+
|
|
19
|
+
**Adiciona o COMO:** Layout, componentes, estados, responsividade.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 🔗 QUANDO USAR
|
|
24
|
+
|
|
25
|
+
| Workflow | Fase | Trigger |
|
|
26
|
+
|----------|------|---------|
|
|
27
|
+
| `/new-project` | Phase 2.8 | Após Content Strategy aprovado |
|
|
28
|
+
| `/legacy-project` | Phase 5.8 | Após Content Strategy |
|
|
29
|
+
| `/new-task` | Opcional | Quando adiciona novas páginas |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 📁 ESTRUTURA DE SAÍDA
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
design-system/{projeto}/
|
|
37
|
+
├── MASTER.md ← Design System global
|
|
38
|
+
├── layout/
|
|
39
|
+
│ └── SHARED-LAYOUT.md ← Header, Footer, Mobile Menu
|
|
40
|
+
└── pages/
|
|
41
|
+
├── PAGE-SPEC-Landing.md
|
|
42
|
+
├── PAGE-SPEC-Pricing.md
|
|
43
|
+
├── PAGE-SPEC-Start.md (Wizard)
|
|
44
|
+
├── PAGE-SPEC-Dashboard.md (Área logada)
|
|
45
|
+
├── PAGE-SPEC-Admin.md (Gestão interna)
|
|
46
|
+
└── PAGE-SPEC-{Página}.md
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 📊 PROCESSO (5 Passos)
|
|
52
|
+
|
|
53
|
+
### PASSO 1: Identificar Páginas
|
|
54
|
+
|
|
55
|
+
Listar todas as páginas do projeto baseado em:
|
|
56
|
+
- PRD (requisitos)
|
|
57
|
+
- TDD (fluxos técnicos)
|
|
58
|
+
- Content Strategy (páginas já mapeadas)
|
|
59
|
+
|
|
60
|
+
**Categorização:**
|
|
61
|
+
|
|
62
|
+
| Prioridade | Tipo | Exemplos |
|
|
63
|
+
|------------|------|----------|
|
|
64
|
+
| **Alta** | Core do produto | Landing, Pricing, Start/Wizard, Dashboard |
|
|
65
|
+
| **Média** | Suporte ao produto | How it Works, Workflows Library, Videos |
|
|
66
|
+
| **Baixa** | Complementar | Community, Blog, About |
|
|
67
|
+
| **Interna** | Gestão | Admin, Moderação |
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
### PASSO 2: Criar SHARED-LAYOUT.md
|
|
72
|
+
|
|
73
|
+
> [!IMPORTANT]
|
|
74
|
+
> **OBRIGATÓRIO:** Criar ANTES dos PAGE-SPECs individuais.
|
|
75
|
+
> Define elementos compartilhados para evitar duplicação.
|
|
76
|
+
|
|
77
|
+
**Template:**
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
# Shared Layout Specs - Header & Footer
|
|
81
|
+
|
|
82
|
+
> **Status:** ⏳ Proposal
|
|
83
|
+
> **Aplicação:** Todas as páginas públicas
|
|
84
|
+
> **Exceção:** {páginas com layout próprio, ex: Dashboard}
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 1. Standard Header (Navbar)
|
|
89
|
+
|
|
90
|
+
### Visual Spec
|
|
91
|
+
| Elemento | Especificação |
|
|
92
|
+
|----------|---------------|
|
|
93
|
+
| **Position** | Sticky Top |
|
|
94
|
+
| **Height** | 64px (h-16) |
|
|
95
|
+
| **Background** | Glassmorphism |
|
|
96
|
+
| **Border** | border-b border-border |
|
|
97
|
+
|
|
98
|
+
### Conteúdo
|
|
99
|
+
| Elemento | Detalhes |
|
|
100
|
+
|----------|----------|
|
|
101
|
+
| **Logo** | Logo + Wordmark, link para `/` |
|
|
102
|
+
| **Nav Links** | Como Funciona, Workflows, Pricing, Community |
|
|
103
|
+
| **CTA** | "Iniciar Projeto" (button primary) |
|
|
104
|
+
| **Auth** | Login (ghost) - se não logado |
|
|
105
|
+
|
|
106
|
+
### Estados
|
|
107
|
+
- **Scroll State:** Adiciona shadow ao scrollar
|
|
108
|
+
- **Mobile:** Hamburger menu (sheet overlay)
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 2. Standard Footer
|
|
113
|
+
|
|
114
|
+
### Estrutura
|
|
115
|
+
| Coluna | Links |
|
|
116
|
+
|--------|-------|
|
|
117
|
+
| **Produto** | Features, Pricing, Roadmap |
|
|
118
|
+
| **Recursos** | Docs, Videos, Community |
|
|
119
|
+
| **Empresa** | About, Blog, Contact |
|
|
120
|
+
| **Legal** | Terms, Privacy |
|
|
121
|
+
|
|
122
|
+
### Visual
|
|
123
|
+
| Elemento | Especificação |
|
|
124
|
+
|----------|---------------|
|
|
125
|
+
| **Background** | bg-background |
|
|
126
|
+
| **Border** | border-t border-border |
|
|
127
|
+
| **Social** | Twitter, LinkedIn, GitHub, YouTube |
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## 3. Mobile Menu Overlay
|
|
132
|
+
|
|
133
|
+
- **Trigger:** Hamburger icon (Menu)
|
|
134
|
+
- **Style:** Sheet from right
|
|
135
|
+
- **Conteúdo:** Nav links + Auth buttons
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### PASSO 3: Criar PAGE-SPEC para cada página
|
|
141
|
+
|
|
142
|
+
> [!CAUTION]
|
|
143
|
+
> **BLOQUEADOR:** Perguntar ao usuário sobre priorização antes de criar todos.
|
|
144
|
+
> Podem existir páginas que serão implementadas em V2.
|
|
145
|
+
|
|
146
|
+
**Pergunta ao Usuário:**
|
|
147
|
+
|
|
148
|
+
```markdown
|
|
149
|
+
## 📄 Páginas Identificadas
|
|
150
|
+
|
|
151
|
+
Baseado no PRD/TDD/Content Strategy, estas são as páginas do projeto:
|
|
152
|
+
|
|
153
|
+
### Alta Prioridade (MVP)
|
|
154
|
+
- [ ] Landing Page (/)
|
|
155
|
+
- [ ] Pricing (/pricing)
|
|
156
|
+
- [ ] Start/Wizard (/start)
|
|
157
|
+
- [ ] Dashboard (/dashboard)
|
|
158
|
+
|
|
159
|
+
### Média Prioridade
|
|
160
|
+
- [ ] How it Works (/how-it-works)
|
|
161
|
+
- [ ] Workflows Library (/workflows)
|
|
162
|
+
- [ ] Video Pages (/videos/[slug])
|
|
163
|
+
|
|
164
|
+
### Baixa Prioridade (V2)
|
|
165
|
+
- [ ] Community (/community)
|
|
166
|
+
- [ ] Blog (/blog)
|
|
167
|
+
|
|
168
|
+
### Interna
|
|
169
|
+
- [ ] Admin (/admin)
|
|
170
|
+
|
|
171
|
+
**Quais páginas detalhar agora?**
|
|
172
|
+
- A) Todas
|
|
173
|
+
- B) Apenas Alta Prioridade (MVP)
|
|
174
|
+
- C) Alta + Média
|
|
175
|
+
- D) Definir manualmente (liste quais)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
### PASSO 4: Gerar PAGE-SPEC para cada página selecionada
|
|
181
|
+
|
|
182
|
+
**Template de PAGE-SPEC:**
|
|
183
|
+
|
|
184
|
+
```markdown
|
|
185
|
+
# Page Spec - {Nome da Página} ({rota})
|
|
186
|
+
|
|
187
|
+
> **Objetivo:** {objetivo da página em 1 linha}
|
|
188
|
+
> **Referências:** MASTER.md, SHARED-LAYOUT.md, CONTENT-STRATEGY
|
|
189
|
+
> **Status:** ⏳ Proposal | **Data:** {data}
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## 1. Layout & Estrutura
|
|
194
|
+
|
|
195
|
+
### Header
|
|
196
|
+
> Usar: `SHARED-LAYOUT.md → Standard Header`
|
|
197
|
+
> Exceções: {se houver}
|
|
198
|
+
|
|
199
|
+
### Spatial Anatomy (OBRIGATÓRIO para Dashboard/Admin)
|
|
200
|
+
|
|
201
|
+
> [!CAUTION]
|
|
202
|
+
> **FALHA QUE GEROU ESTA SEÇÃO:** Sidebar e TopBar do Dashboard foram implementados
|
|
203
|
+
> como "floating pills" quando a referência mostrava edge-to-edge. Sem esta seção,
|
|
204
|
+
> o agente faz suposições sobre posicionamento e arredondamento.
|
|
205
|
+
|
|
206
|
+
| Elemento | Ancoragem | Border-radius | Altura | Span |
|
|
207
|
+
|----------|-----------|---------------|--------|------|
|
|
208
|
+
| **Sidebar** | {edge-to-edge left | floating} | {nenhum viewport-side | 16px interno | 32px todos} | {100vh | auto} | {coluna independente | dentro do main} |
|
|
209
|
+
| **TopBar** | {top do conteúdo | top total da viewport} | {nenhum | pill} | {64px fixa} | {só conteúdo | full-width incluindo sidebar} |
|
|
210
|
+
| **Toggle** | {header da sidebar | topbar | inline} | - | - | - |
|
|
211
|
+
| **Content** | {scroll interno | page scroll} | - | {flex-grow} | {restante} |
|
|
212
|
+
|
|
213
|
+
### Sections
|
|
214
|
+
| # | Seção | Objetivo | Componentes |
|
|
215
|
+
|---|-------|----------|-------------|
|
|
216
|
+
| 1 | Hero | {objetivo} | {componentes principais} |
|
|
217
|
+
| 2 | {Seção} | {objetivo} | {componentes} |
|
|
218
|
+
| 3 | {Seção} | {objetivo} | {componentes} |
|
|
219
|
+
|
|
220
|
+
### Footer
|
|
221
|
+
> Usar: `SHARED-LAYOUT.md → Standard Footer`
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## 2. Conteúdo por Seção
|
|
226
|
+
|
|
227
|
+
### 2.1 {Nome da Seção}
|
|
228
|
+
|
|
229
|
+
#### Copy
|
|
230
|
+
| Elemento | Conteúdo |
|
|
231
|
+
|----------|----------|
|
|
232
|
+
| **Headline** | {texto} |
|
|
233
|
+
| **Subheadline** | {texto} |
|
|
234
|
+
| **CTA** | {texto do botão} |
|
|
235
|
+
|
|
236
|
+
#### Visual
|
|
237
|
+
| Elemento | Especificação |
|
|
238
|
+
|----------|---------------|
|
|
239
|
+
| **Background** | {cor/gradient} |
|
|
240
|
+
| **Layout** | {grid, flex, etc} |
|
|
241
|
+
| **Componentes** | {lista de componentes} |
|
|
242
|
+
|
|
243
|
+
#### Estados
|
|
244
|
+
- **Default:** {descrição}
|
|
245
|
+
- **Loading:** {skeleton/spinner}
|
|
246
|
+
- **Empty:** {mensagem + CTA}
|
|
247
|
+
- **Error:** {mensagem + retry}
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## 3. Responsividade
|
|
252
|
+
|
|
253
|
+
| Breakpoint | Adaptação |
|
|
254
|
+
|------------|-----------|
|
|
255
|
+
| **Desktop (≥1024px)** | {layout desktop} |
|
|
256
|
+
| **Tablet (768-1023px)** | {adaptações} |
|
|
257
|
+
| **Mobile (<768px)** | {layout mobile} |
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## 4. Integrações
|
|
262
|
+
|
|
263
|
+
| Sistema | Uso nesta página |
|
|
264
|
+
|---------|------------------|
|
|
265
|
+
| **Auth** | {Supabase - estados logado/não logado} |
|
|
266
|
+
| **CMS** | {Sanity - conteúdo dinâmico} |
|
|
267
|
+
| **Analytics** | {PostHog - eventos a rastrear} |
|
|
268
|
+
| **Payments** | {Stripe - se aplicável} |
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## 5. SEO & Performance
|
|
273
|
+
|
|
274
|
+
| Aspecto | Especificação |
|
|
275
|
+
|---------|---------------|
|
|
276
|
+
| **Title** | {max 60 chars} |
|
|
277
|
+
| **Meta Description** | {max 155 chars} |
|
|
278
|
+
| **OG Image** | {se aplicável} |
|
|
279
|
+
| **Loading** | {lazy load, suspense} |
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## 6. Analytics (PostHog)
|
|
284
|
+
|
|
285
|
+
> **Nota:** Eventos customizados requerem implementação explícita.
|
|
286
|
+
> Pageviews e autocapture são automáticos após SDK init.
|
|
287
|
+
|
|
288
|
+
### Eventos Customizados
|
|
289
|
+
| Evento | Trigger | Properties |
|
|
290
|
+
|--------|---------|------------|
|
|
291
|
+
| `{page}_viewed` | Pageview (auto) | - |
|
|
292
|
+
| `{page}_cta_clicked` | Clique no CTA principal | `button_text`, `location` |
|
|
293
|
+
| `{ação_específica}` | {quando ocorre} | {dados relevantes} |
|
|
294
|
+
|
|
295
|
+
### Funis a Medir
|
|
296
|
+
- {Descrever funil se aplicável, ex: Wizard steps}
|
|
297
|
+
|
|
298
|
+
### Feature Flags (A/B)
|
|
299
|
+
- {Se houver variantes a testar}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
### PASSO 5: Validar e Aprovar
|
|
305
|
+
|
|
306
|
+
**Gate de Saída:**
|
|
307
|
+
|
|
308
|
+
```
|
|
309
|
+
[ ] SHARED-LAYOUT.md criado (Header, Footer, Mobile Menu)
|
|
310
|
+
[ ] Priorização de páginas confirmada com usuário
|
|
311
|
+
[ ] PAGE-SPEC criado para cada página priorizada
|
|
312
|
+
[ ] Cada PAGE-SPEC referencia MASTER.md e CONTENT-STRATEGY
|
|
313
|
+
[ ] Estados (loading, empty, error) documentados onde aplicável
|
|
314
|
+
[ ] Responsividade descrita para cada página
|
|
315
|
+
[ ] **Analytics (PostHog) especificado para cada página**
|
|
316
|
+
[ ] Todas as PAGE-SPECs aprovadas pelo humano
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
> [!CAUTION]
|
|
320
|
+
> **BLOQUEADOR:** Não prosseguir para Breakdown sem PAGE-SPECs aprovados.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## 📋 CHECKLISTS POR TIPO DE PÁGINA
|
|
325
|
+
|
|
326
|
+
### Landing Page
|
|
327
|
+
- [ ] Hero Section (headline, subheadline, CTAs)
|
|
328
|
+
- [ ] Features/Benefits (cards ou grid)
|
|
329
|
+
- [ ] How it Works (steps)
|
|
330
|
+
- [ ] Social Proof (testimonials, logos, metrics)
|
|
331
|
+
- [ ] Pricing Preview (redirect para /pricing)
|
|
332
|
+
- [ ] FAQ Preview
|
|
333
|
+
- [ ] Final CTA
|
|
334
|
+
|
|
335
|
+
### Dashboard (Área Logada)
|
|
336
|
+
- [ ] Sidebar Navigation
|
|
337
|
+
- [ ] Top Bar (search, notifications, profile)
|
|
338
|
+
- [ ] Empty States para cada módulo
|
|
339
|
+
- [ ] Cards de resumo (KPIs)
|
|
340
|
+
- [ ] Actions disponíveis
|
|
341
|
+
- [ ] Mobile: Bottom nav ou drawer
|
|
342
|
+
|
|
343
|
+
### Wizard/Onboarding
|
|
344
|
+
- [ ] Progress indicator
|
|
345
|
+
- [ ] Each step layout
|
|
346
|
+
- [ ] Validação por step
|
|
347
|
+
- [ ] Navegação (back, next, skip)
|
|
348
|
+
- [ ] Final state (success)
|
|
349
|
+
- [ ] Exit points (onde usuário pode sair)
|
|
350
|
+
|
|
351
|
+
### Admin
|
|
352
|
+
- [ ] Sidebar diferenciada (badge "Admin")
|
|
353
|
+
- [ ] Módulos (Users, Billing, Content, Analytics)
|
|
354
|
+
- [ ] Tables com ações (view, edit, delete)
|
|
355
|
+
- [ ] Filtros e busca
|
|
356
|
+
- [ ] External links (Stripe, PostHog, Sanity)
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## 🔴 REGRAS CRÍTICAS
|
|
361
|
+
|
|
362
|
+
1. **SEMPRE** criar SHARED-LAYOUT.md primeiro
|
|
363
|
+
2. **PERGUNTAR** priorização antes de criar todos os specs
|
|
364
|
+
3. **REFERENCIAR** MASTER.md e CONTENT-STRATEGY em cada spec
|
|
365
|
+
4. **DOCUMENTAR** todos os estados (loading, empty, error)
|
|
366
|
+
5. **VALIDAR** com usuário antes de prosseguir
|
|
367
|
+
6. **NÃO** duplicar copy - referenciar CONTENT-STRATEGY
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: parallel-agents
|
|
3
|
+
description: Multi-agent orchestration patterns. Use when multiple independent tasks can run with different domain expertise or when comprehensive analysis requires multiple perspectives.
|
|
4
|
+
allowed-tools: Read, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Native Parallel Agents
|
|
8
|
+
|
|
9
|
+
> Orchestration through Antigravity's built-in Agent Tool
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
This skill enables coordinating multiple specialized agents through Antigravity's native agent system. Unlike external scripts, this approach keeps all orchestration within Antigravity's control.
|
|
14
|
+
|
|
15
|
+
## When to Use Orchestration
|
|
16
|
+
|
|
17
|
+
✅ **Good for:**
|
|
18
|
+
- Complex tasks requiring multiple expertise domains
|
|
19
|
+
- Code analysis from security, performance, and quality perspectives
|
|
20
|
+
- Comprehensive reviews (architecture + security + testing)
|
|
21
|
+
- Feature implementation needing backend + frontend + database work
|
|
22
|
+
|
|
23
|
+
❌ **Not for:**
|
|
24
|
+
- Simple, single-domain tasks
|
|
25
|
+
- Quick fixes or small changes
|
|
26
|
+
- Tasks where one agent suffices
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Native Agent Invocation
|
|
31
|
+
|
|
32
|
+
### Single Agent
|
|
33
|
+
```
|
|
34
|
+
Use the security-auditor agent to review authentication
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Sequential Chain
|
|
38
|
+
```
|
|
39
|
+
First, use the explorer-agent to discover project structure.
|
|
40
|
+
Then, use the backend-specialist to review API endpoints.
|
|
41
|
+
Finally, use the test-engineer to identify test gaps.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### With Context Passing
|
|
45
|
+
```
|
|
46
|
+
Use the frontend-specialist to analyze React components.
|
|
47
|
+
Based on those findings, have the test-engineer generate component tests.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Resume Previous Work
|
|
51
|
+
```
|
|
52
|
+
Resume agent [agentId] and continue with additional requirements.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Orchestration Patterns
|
|
58
|
+
|
|
59
|
+
### Pattern 1: Comprehensive Analysis
|
|
60
|
+
```
|
|
61
|
+
Agents: explorer-agent → [domain-agents] → synthesis
|
|
62
|
+
|
|
63
|
+
1. explorer-agent: Map codebase structure
|
|
64
|
+
2. security-auditor: Security posture
|
|
65
|
+
3. backend-specialist: API quality
|
|
66
|
+
4. frontend-specialist: UI/UX patterns
|
|
67
|
+
5. test-engineer: Test coverage
|
|
68
|
+
6. Synthesize all findings
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Pattern 2: Feature Review
|
|
72
|
+
```
|
|
73
|
+
Agents: affected-domain-agents → test-engineer
|
|
74
|
+
|
|
75
|
+
1. Identify affected domains (backend? frontend? both?)
|
|
76
|
+
2. Invoke relevant domain agents
|
|
77
|
+
3. test-engineer verifies changes
|
|
78
|
+
4. Synthesize recommendations
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Pattern 3: Security Audit
|
|
82
|
+
```
|
|
83
|
+
Agents: security-auditor → penetration-tester → synthesis
|
|
84
|
+
|
|
85
|
+
1. security-auditor: Configuration and code review
|
|
86
|
+
2. penetration-tester: Active vulnerability testing
|
|
87
|
+
3. Synthesize with prioritized remediation
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Available Agents
|
|
93
|
+
|
|
94
|
+
| Agent | Expertise | Trigger Phrases |
|
|
95
|
+
|-------|-----------|-----------------|
|
|
96
|
+
| `orchestrator` | Coordination | "comprehensive", "multi-perspective" |
|
|
97
|
+
| `security-auditor` | Security | "security", "auth", "vulnerabilities" |
|
|
98
|
+
| `penetration-tester` | Security Testing | "pentest", "red team", "exploit" |
|
|
99
|
+
| `backend-specialist` | Backend | "API", "server", "Node.js", "Express" |
|
|
100
|
+
| `frontend-specialist` | Frontend | "React", "UI", "components", "Next.js" |
|
|
101
|
+
| `test-engineer` | Testing | "tests", "coverage", "TDD" |
|
|
102
|
+
| `devops-engineer` | DevOps | "deploy", "CI/CD", "infrastructure" |
|
|
103
|
+
| `database-architect` | Database | "schema", "Prisma", "migrations" |
|
|
104
|
+
| `mobile-developer` | Mobile | "React Native", "Flutter", "mobile" |
|
|
105
|
+
| `api-designer` | API Design | "REST", "GraphQL", "OpenAPI" |
|
|
106
|
+
| `debugger` | Debugging | "bug", "error", "not working" |
|
|
107
|
+
| `explorer-agent` | Discovery | "explore", "map", "structure" |
|
|
108
|
+
| `documentation-writer` | Documentation | "write docs", "create README", "generate API docs" |
|
|
109
|
+
| `performance-optimizer` | Performance | "slow", "optimize", "profiling" |
|
|
110
|
+
| `project-planner` | Planning | "plan", "roadmap", "milestones" |
|
|
111
|
+
| `seo-specialist` | SEO | "SEO", "meta tags", "search ranking" |
|
|
112
|
+
| `game-developer` | Game Development | "game", "Unity", "Godot", "Phaser" |
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Antigravity Built-in Agents
|
|
117
|
+
|
|
118
|
+
These work alongside custom agents:
|
|
119
|
+
|
|
120
|
+
| Agent | Model | Purpose |
|
|
121
|
+
|-------|-------|---------|
|
|
122
|
+
| **Explore** | Haiku | Fast read-only codebase search |
|
|
123
|
+
| **Plan** | Sonnet | Research during plan mode |
|
|
124
|
+
| **General-purpose** | Sonnet | Complex multi-step modifications |
|
|
125
|
+
|
|
126
|
+
Use **Explore** for quick searches, **custom agents** for domain expertise.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Synthesis Protocol
|
|
131
|
+
|
|
132
|
+
After all agents complete, synthesize:
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
## Orchestration Synthesis
|
|
136
|
+
|
|
137
|
+
### Task Summary
|
|
138
|
+
[What was accomplished]
|
|
139
|
+
|
|
140
|
+
### Agent Contributions
|
|
141
|
+
| Agent | Finding |
|
|
142
|
+
|-------|---------|
|
|
143
|
+
| security-auditor | Found X |
|
|
144
|
+
| backend-specialist | Identified Y |
|
|
145
|
+
|
|
146
|
+
### Consolidated Recommendations
|
|
147
|
+
1. **Critical**: [Issue from Agent A]
|
|
148
|
+
2. **Important**: [Issue from Agent B]
|
|
149
|
+
3. **Nice-to-have**: [Enhancement from Agent C]
|
|
150
|
+
|
|
151
|
+
### Action Items
|
|
152
|
+
- [ ] Fix critical security issue
|
|
153
|
+
- [ ] Refactor API endpoint
|
|
154
|
+
- [ ] Add missing tests
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Best Practices
|
|
160
|
+
|
|
161
|
+
1. **Available agents** - 17 specialized agents can be orchestrated
|
|
162
|
+
2. **Logical order** - Discovery → Analysis → Implementation → Testing
|
|
163
|
+
3. **Share context** - Pass relevant findings to subsequent agents
|
|
164
|
+
4. **Single synthesis** - One unified report, not separate outputs
|
|
165
|
+
5. **Verify changes** - Always include test-engineer for code modifications
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Key Benefits
|
|
170
|
+
|
|
171
|
+
- ✅ **Single session** - All agents share context
|
|
172
|
+
- ✅ **AI-controlled** - Claude orchestrates autonomously
|
|
173
|
+
- ✅ **Native integration** - Works with built-in Explore, Plan agents
|
|
174
|
+
- ✅ **Resume support** - Can continue previous agent work
|
|
175
|
+
- ✅ **Context passing** - Findings flow between agents
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: performance-profiling
|
|
3
|
+
description: Performance profiling principles. Measurement, analysis, and optimization techniques.
|
|
4
|
+
allowed-tools: Read, Glob, Grep, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Performance Profiling
|
|
8
|
+
|
|
9
|
+
> Measure, analyze, optimize - in that order.
|
|
10
|
+
|
|
11
|
+
## 🔧 Runtime Scripts
|
|
12
|
+
|
|
13
|
+
**Execute these for automated profiling:**
|
|
14
|
+
|
|
15
|
+
| Script | Purpose | Usage |
|
|
16
|
+
|--------|---------|-------|
|
|
17
|
+
| `scripts/lighthouse_audit.py` | Lighthouse performance audit | `python scripts/lighthouse_audit.py https://example.com` |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 1. Core Web Vitals
|
|
22
|
+
|
|
23
|
+
### Targets
|
|
24
|
+
|
|
25
|
+
| Metric | Good | Poor | Measures |
|
|
26
|
+
|--------|------|------|----------|
|
|
27
|
+
| **LCP** | < 2.5s | > 4.0s | Loading |
|
|
28
|
+
| **INP** | < 200ms | > 500ms | Interactivity |
|
|
29
|
+
| **CLS** | < 0.1 | > 0.25 | Stability |
|
|
30
|
+
|
|
31
|
+
### When to Measure
|
|
32
|
+
|
|
33
|
+
| Stage | Tool |
|
|
34
|
+
|-------|------|
|
|
35
|
+
| Development | Local Lighthouse |
|
|
36
|
+
| CI/CD | Lighthouse CI |
|
|
37
|
+
| Production | RUM (Real User Monitoring) |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 2. Profiling Workflow
|
|
42
|
+
|
|
43
|
+
### The 4-Step Process
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
1. BASELINE → Measure current state
|
|
47
|
+
2. IDENTIFY → Find the bottleneck
|
|
48
|
+
3. FIX → Make targeted change
|
|
49
|
+
4. VALIDATE → Confirm improvement
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Profiling Tool Selection
|
|
53
|
+
|
|
54
|
+
| Problem | Tool |
|
|
55
|
+
|---------|------|
|
|
56
|
+
| Page load | Lighthouse |
|
|
57
|
+
| Bundle size | Bundle analyzer |
|
|
58
|
+
| Runtime | DevTools Performance |
|
|
59
|
+
| Memory | DevTools Memory |
|
|
60
|
+
| Network | DevTools Network |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 3. Bundle Analysis
|
|
65
|
+
|
|
66
|
+
### What to Look For
|
|
67
|
+
|
|
68
|
+
| Issue | Indicator |
|
|
69
|
+
|-------|-----------|
|
|
70
|
+
| Large dependencies | Top of bundle |
|
|
71
|
+
| Duplicate code | Multiple chunks |
|
|
72
|
+
| Unused code | Low coverage |
|
|
73
|
+
| Missing splits | Single large chunk |
|
|
74
|
+
|
|
75
|
+
### Optimization Actions
|
|
76
|
+
|
|
77
|
+
| Finding | Action |
|
|
78
|
+
|---------|--------|
|
|
79
|
+
| Big library | Import specific modules |
|
|
80
|
+
| Duplicate deps | Dedupe, update versions |
|
|
81
|
+
| Route in main | Code split |
|
|
82
|
+
| Unused exports | Tree shake |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 4. Runtime Profiling
|
|
87
|
+
|
|
88
|
+
### Performance Tab Analysis
|
|
89
|
+
|
|
90
|
+
| Pattern | Meaning |
|
|
91
|
+
|---------|---------|
|
|
92
|
+
| Long tasks (>50ms) | UI blocking |
|
|
93
|
+
| Many small tasks | Possible batching opportunity |
|
|
94
|
+
| Layout/paint | Rendering bottleneck |
|
|
95
|
+
| Script | JavaScript execution |
|
|
96
|
+
|
|
97
|
+
### Memory Tab Analysis
|
|
98
|
+
|
|
99
|
+
| Pattern | Meaning |
|
|
100
|
+
|---------|---------|
|
|
101
|
+
| Growing heap | Possible leak |
|
|
102
|
+
| Large retained | Check references |
|
|
103
|
+
| Detached DOM | Not cleaned up |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 5. Common Bottlenecks
|
|
108
|
+
|
|
109
|
+
### By Symptom
|
|
110
|
+
|
|
111
|
+
| Symptom | Likely Cause |
|
|
112
|
+
|---------|--------------|
|
|
113
|
+
| Slow initial load | Large JS, render blocking |
|
|
114
|
+
| Slow interactions | Heavy event handlers |
|
|
115
|
+
| Jank during scroll | Layout thrashing |
|
|
116
|
+
| Growing memory | Leaks, retained refs |
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 6. Quick Win Priorities
|
|
121
|
+
|
|
122
|
+
| Priority | Action | Impact |
|
|
123
|
+
|----------|--------|--------|
|
|
124
|
+
| 1 | Enable compression | High |
|
|
125
|
+
| 2 | Lazy load images | High |
|
|
126
|
+
| 3 | Code split routes | High |
|
|
127
|
+
| 4 | Cache static assets | Medium |
|
|
128
|
+
| 5 | Optimize images | Medium |
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## 7. Anti-Patterns
|
|
133
|
+
|
|
134
|
+
| ❌ Don't | ✅ Do |
|
|
135
|
+
|----------|-------|
|
|
136
|
+
| Guess at problems | Profile first |
|
|
137
|
+
| Micro-optimize | Fix biggest issue |
|
|
138
|
+
| Optimize early | Optimize when needed |
|
|
139
|
+
| Ignore real users | Use RUM data |
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
> **Remember:** The fastest code is code that doesn't run. Remove before optimizing.
|