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,339 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-system-enforcement
|
|
3
|
+
description: Garante que código UI usa Design System desde a criação. Aplica-se durante TDD GREEN phase e qualquer criação de componente UI.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Design System Enforcement
|
|
7
|
+
|
|
8
|
+
> **Regra:** Todo código UI DEVE usar o Design System desde a criação, não apenas na fase de "styling".
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🚨 Quando Esta Skill se Aplica
|
|
13
|
+
|
|
14
|
+
| Situação | Aplica? |
|
|
15
|
+
|----------|---------|
|
|
16
|
+
| TDD GREEN phase com componente UI | ✅ SIM |
|
|
17
|
+
| Criação de nova página | ✅ SIM |
|
|
18
|
+
| Criação de novo componente | ✅ SIM |
|
|
19
|
+
| Código backend/API | ❌ NÃO |
|
|
20
|
+
| Testes unitários | ❌ NÃO |
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 📋 Pré-requisitos (OBRIGATÓRIO)
|
|
25
|
+
|
|
26
|
+
ANTES de escrever qualquer código UI:
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
[ ] CSS Variables instaladas em src/app/globals.css (ou equivalente)
|
|
30
|
+
[ ] design-system/{projeto}/MASTER.md lido e carregado
|
|
31
|
+
[ ] design-system/{projeto}/layout/SHARED-LAYOUT.md lido (se Header, Footer, Menu, ou layout global)
|
|
32
|
+
[ ] design-system/{projeto}/pages/PAGE-SPEC-{página}.md lido (se implementando seção de página)
|
|
33
|
+
[ ] Conhecimento dos anti-patterns do workflow /ui-ux-pro-max
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
> [!CAUTION]
|
|
37
|
+
> **FALHA QUE GEROU ESTA EXPANSÃO:** MASTER.md sozinho cobre tokens CSS (cores, tipografia,
|
|
38
|
+
> spacing). Mas elementos estruturais (quais ícones no header, quantas colunas no footer,
|
|
39
|
+
> tipo de mobile menu) estão nos specs de layout/página. Sem lê-los, o agente implementa
|
|
40
|
+
> com base em padrões genéricos em vez do design aprovado.
|
|
41
|
+
|
|
42
|
+
**Se CSS Variables NÃO existem:**
|
|
43
|
+
1. Abrir `design-system/{projeto}/MASTER.md`
|
|
44
|
+
2. Copiar seção de tokens/variáveis CSS
|
|
45
|
+
3. Colar em `globals.css`
|
|
46
|
+
4. Definir body styling base
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 🎨 Durante Criação de Componente
|
|
51
|
+
|
|
52
|
+
Para CADA elemento visual criado:
|
|
53
|
+
|
|
54
|
+
| Aspecto | ✅ Correto | ❌ Errado |
|
|
55
|
+
|---------|-----------|----------|
|
|
56
|
+
| **Cores** | `style={{ color: 'var(--lime)' }}` | `style={{ color: '#CFFF00' }}` |
|
|
57
|
+
| **Background** | `var(--bg-card)` | `#111111` ou `bg-gray-900` |
|
|
58
|
+
| **Bordas** | `var(--radius-md)` | `12px` hardcoded |
|
|
59
|
+
| **Fontes** | Font do MASTER.md | Arial, sans-serif |
|
|
60
|
+
| **Ícones** | `<Home size={20} />` (Lucide) | `🏠` emoji |
|
|
61
|
+
| **Interação** | `className="cursor-pointer"` | Sem cursor |
|
|
62
|
+
| **Glass** | `backdrop-filter: blur(16px)` + overlay | `background-color: var(--bg-card)` solid ⭐ |
|
|
63
|
+
| **Shadows** | `var(--shadow-md)` | `box-shadow: 0 4px 12px...` hardcoded |
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 💠 Efeitos Visuais (MASTER.md § Efeitos Visuais)
|
|
68
|
+
|
|
69
|
+
> [!CAUTION]
|
|
70
|
+
> **FALHA QUE GEROU ESTA SEÇÃO:** Dashboard UI foi criado com cores sólidas
|
|
71
|
+
> (`background-color: var(--color-bg-secondary)`) sem aplicar glassmorphism
|
|
72
|
+
> (`backdrop-filter: blur(16px)`, `var(--color-overlay-*)`) definido no MASTER.md.
|
|
73
|
+
> O agente tecnicamente "usou CSS variables" (satisfazendo as regras anteriores),
|
|
74
|
+
> mas ignorou completamente a seção de Efeitos Visuais.
|
|
75
|
+
> Resultado: dashboard visualmente plano, sem a estética premium das referências.
|
|
76
|
+
|
|
77
|
+
**Se MASTER.md define Efeitos Visuais (glassmorphism, gradientes, glows, etc.), então:**
|
|
78
|
+
|
|
79
|
+
| Componente | Efeito Obrigatório | Implementação |
|
|
80
|
+
|------------|-------------------|---------------|
|
|
81
|
+
| **Cards** (KPI, Project, etc.) | Glassmorphism | `backdrop-filter: blur()` + `var(--color-overlay-05)` + border translúcida |
|
|
82
|
+
| **Sidebar** | Glass ou surface | `backdrop-filter: blur()` ou `var(--color-bg-secondary)` se spec permitir opaco |
|
|
83
|
+
| **TopBar / Header** | Glass com blur | `backdrop-filter: blur()` para visual premium |
|
|
84
|
+
| **Modals / Dropdowns** | Elevated glass | `var(--shadow-lg)` + `backdrop-filter` |
|
|
85
|
+
| **Hover states** | Micro-animation | `transform`, `box-shadow`, `border-color` com transition |
|
|
86
|
+
|
|
87
|
+
**Anti-patterns de Efeitos:**
|
|
88
|
+
|
|
89
|
+
| ❌ Errado | ✅ Correto |
|
|
90
|
+
|----------|----------|
|
|
91
|
+
| `background-color: var(--bg-card)` sem blur | `background: var(--color-overlay-05); backdrop-filter: blur(16px)` |
|
|
92
|
+
| Card sem shadow alguma | `box-shadow: var(--shadow-md)` |
|
|
93
|
+
| Hover sem feedback visual | `transition: all 200ms; transform: translateY(-2px)` |
|
|
94
|
+
| Border opaca | `border: 1px solid var(--color-overlay-08)` |
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 🏗️ Anatomia de Layout (Reference Matching)
|
|
99
|
+
|
|
100
|
+
> [!IMPORTANT]
|
|
101
|
+
> **REFERENCE MODE:** Quando `frontend-specialist.md` ativa o Reference Mode,
|
|
102
|
+
> esta seção é a mais crítica. A análise de anatomia abaixo é **OBRIGATÓRIA**
|
|
103
|
+
> e deve ser feita ANTES de escrever qualquer CSS. Regras anti-template e
|
|
104
|
+
> anti-safe-harbor do frontend-specialist são SUSPENSAS em Reference Mode.
|
|
105
|
+
|
|
106
|
+
> [!CAUTION]
|
|
107
|
+
> **FALHA QUE GEROU ESTA SEÇÃO:** Dashboard Sidebar e TopBar foram implementados
|
|
108
|
+
> como "floating pills" com `border-radius: 32px` e `gap: 1.5rem` descolados das bordas,
|
|
109
|
+
> quando a referência SphereUI mostrava claramente componentes **edge-to-edge**
|
|
110
|
+
> (sidebar colada à borda esquerda, topbar como faixa horizontal contínua).
|
|
111
|
+
> O agente "olhou" a referência mas não analisou a anatomia espacial — pulou direto
|
|
112
|
+
> para escrever CSS baseado em suposições genéricas.
|
|
113
|
+
|
|
114
|
+
**ANTES de implementar qualquer layout, o agente DEVE:**
|
|
115
|
+
|
|
116
|
+
1. **Descrever textualmente** o que vê na referência visual (se disponível):
|
|
117
|
+
```markdown
|
|
118
|
+
## Análise da Referência — {componente}
|
|
119
|
+
- Sidebar: [edge-to-edge | floating | pill]
|
|
120
|
+
- Sidebar border-radius: [nenhum nas bordas da viewport | apenas interno | todos os lados]
|
|
121
|
+
- TopBar: [faixa contínua acima do conteúdo | se estende sobre sidebar | pill flutuante]
|
|
122
|
+
- Toggle collapse: [header da sidebar | topbar | inline no conteúdo]
|
|
123
|
+
- Elementos colam na viewport? [sim — top/left/bottom | não — margin ao redor]
|
|
124
|
+
```
|
|
125
|
+
2. **Comparar** com o que está implementando
|
|
126
|
+
3. **Se não houver referência visual:** Perguntar ao usuário ou seguir o PAGE-SPEC
|
|
127
|
+
|
|
128
|
+
**Checklist de Anatomia Espacial:**
|
|
129
|
+
|
|
130
|
+
| Aspecto | Pergunta | Impacto se errado |
|
|
131
|
+
|---------|----------|-------------------|
|
|
132
|
+
| **Ancoragem** | O componente encosta na borda da viewport? | Edge-to-edge vs floating pill |
|
|
133
|
+
| **Border-radius** | Quais cantos são arredondados? | Todos = floating. Apenas internos = encostado na borda |
|
|
134
|
+
| **Span** | TopBar cobre toda a largura ou só o conteúdo? | Layout em colunas (sidebar + main) vs layout unificado |
|
|
135
|
+
| **Toggle position** | O collapse está no header da sidebar ou no topbar? | Afeta onde o botão é renderizado |
|
|
136
|
+
| **Height** | Sidebar tem height: 100vh ou height: auto? | Scroll behavior e ancoragem |
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 🎨 Premium Styling in GREEN Phase
|
|
141
|
+
|
|
142
|
+
> [!CAUTION]
|
|
143
|
+
> Components MUST be created with **final premium styling** (glassmorphism, gradients, glows,
|
|
144
|
+
> backdrop-blur, micro-animations) during the GREEN phase of TDD, not after.
|
|
145
|
+
> Phase 5.3 is for **validation and fine-tuning only**, not for applying styles from scratch.
|
|
146
|
+
|
|
147
|
+
| Principle | Correct | Wrong |
|
|
148
|
+
|-----------|---------|-------|
|
|
149
|
+
| Glass cards | `backdrop-filter: blur(16px)` + overlay from start | Solid `var(--bg-card)`, plan to "style later" |
|
|
150
|
+
| Shadows | `var(--shadow-md)` on creation | Plain flat card, add shadows in Phase 5.3 |
|
|
151
|
+
| Animations | `transition: all 200ms` on hover from start | Static element, add motion later |
|
|
152
|
+
| Gradients | Apply gradient as defined in MASTER.md | Solid background color as placeholder |
|
|
153
|
+
|
|
154
|
+
> **Historical Lesson:** Pricing Page was created with basic styles (solid colors, no glassmorphism, no animations)
|
|
155
|
+
> during TDD GREEN. Result: complete rework of 5 CSS files in Phase 5.3 to match Landing Page premium level.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 📖 UI Spec Reading Gate
|
|
160
|
+
|
|
161
|
+
> [!CAUTION]
|
|
162
|
+
> **Before writing any UI code (GREEN phase), the agent MUST read ALL applicable specs.**
|
|
163
|
+
> Do NOT implement based on inference or memory.
|
|
164
|
+
|
|
165
|
+
**Mandatory checklist before GREEN (for tasks involving UI):**
|
|
166
|
+
|
|
167
|
+
```markdown
|
|
168
|
+
⚠️ UI SPEC READING GATE — Task: {title}
|
|
169
|
+
|
|
170
|
+
[ ] MASTER.md read — Colors section (CSS tokens)
|
|
171
|
+
[ ] MASTER.md read — Typography section
|
|
172
|
+
[ ] MASTER.md read — Visual Effects section (glassmorphism, shadows, micro-animations) ⭐
|
|
173
|
+
[ ] MASTER.md read — Components section (if creating button, input, card, etc.)
|
|
174
|
+
[ ] SHARED-LAYOUT.md read (if component is Header, Footer, Mobile Menu, or shared layout)
|
|
175
|
+
[ ] PAGE-SPEC-{page}.md read (if implementing a section of a specific page)
|
|
176
|
+
[ ] Required elements identified (list extracted from spec)
|
|
177
|
+
[ ] Responsiveness/breakpoints noted
|
|
178
|
+
|
|
179
|
+
❌ If ANY applicable item unchecked → DO NOT IMPLEMENT
|
|
180
|
+
✅ All checked → Proceed with GREEN
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**Component → Spec mapping:**
|
|
184
|
+
|
|
185
|
+
| Component | Required Specs |
|
|
186
|
+
|-----------|---------------|
|
|
187
|
+
| Header / Navbar | `SHARED-LAYOUT.md` §1 |
|
|
188
|
+
| Footer | `SHARED-LAYOUT.md` §2 |
|
|
189
|
+
| Mobile Menu | `SHARED-LAYOUT.md` §3 |
|
|
190
|
+
| Dashboard Layout | `SHARED-LAYOUT.md` §4 + `PAGE-SPEC-Dashboard.md` |
|
|
191
|
+
| Dashboard Sections | `PAGE-SPEC-Dashboard.md` + `MASTER.md` §Visual Effects |
|
|
192
|
+
| LP Sections | `PAGE-SPEC-Landing.md` + `SHARED-LAYOUT.md` §1-§2 |
|
|
193
|
+
| Pricing Sections | `PAGE-SPEC-Pricing.md` |
|
|
194
|
+
| UI Primitives (Button, Input) | `MASTER.md` only |
|
|
195
|
+
|
|
196
|
+
> **Historical Lesson:** Landing Page was developed without reading SHARED-LAYOUT.md.
|
|
197
|
+
> Header shipped without scroll shadow, search, github, language, theme, and login icons.
|
|
198
|
+
> Footer shipped with 3 columns instead of 4. Mobile menu was dropdown inline instead of slide-in sheet.
|
|
199
|
+
> Result: complete rework of Header and Footer.
|
|
200
|
+
|
|
201
|
+
> **Historical Lesson (v2):** Dashboard UI was created with solid colors (`var(--color-bg-secondary)`)
|
|
202
|
+
> without applying glassmorphism defined in the "Visual Effects" section of MASTER.md.
|
|
203
|
+
> The agent read MASTER.md but focused only on tokens (colors, typography), ignoring visual effects.
|
|
204
|
+
> Fix: checklist now lists EACH section of MASTER.md separately, with ⭐ on Visual Effects.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## 🧩 Component Classification
|
|
209
|
+
|
|
210
|
+
> [!CAUTION]
|
|
211
|
+
> **Before creating ANY UI component, classify it first.**
|
|
212
|
+
> A reusable component MUST be created in `src/components/ui/` from the start.
|
|
213
|
+
|
|
214
|
+
**Decision tree:**
|
|
215
|
+
|
|
216
|
+
| Question | If YES | If NO |
|
|
217
|
+
|----------|--------|-------|
|
|
218
|
+
| Can this be used in 2+ pages/features? | → `src/components/ui/` + own CSS Module | Continue ↓ |
|
|
219
|
+
| Is the logic/visual generic enough for another dev to reuse? | → `src/components/ui/` | Continue ↓ |
|
|
220
|
+
| Does it only make sense inside 1 feature? | → `src/components/{feature}/` | Continue ↓ |
|
|
221
|
+
| Is it used in the app shell (topbar, sidebar)? | → `src/components/layout/` | `src/components/{feature}/` |
|
|
222
|
+
|
|
223
|
+
| Type | Location | CSS |
|
|
224
|
+
|------|----------|-----|
|
|
225
|
+
| **Reusable** | `src/components/ui/` | Own CSS Module |
|
|
226
|
+
| **Feature-specific** | `src/components/{feature}/` | Feature CSS or Module |
|
|
227
|
+
| **Shared layout** | `src/components/layout/` | Own CSS Module |
|
|
228
|
+
|
|
229
|
+
> **Historical Lesson:** `ReviewCard` and `IconButton` were created inline (Tailwind) inside feature folders.
|
|
230
|
+
> They had to be moved, refactored, and reconnected to the Design System in a separate session — avoidable rework.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## ✅ Checklist por Componente
|
|
235
|
+
|
|
236
|
+
Antes de considerar um componente "pronto":
|
|
237
|
+
|
|
238
|
+
```markdown
|
|
239
|
+
Para: {ComponentName}
|
|
240
|
+
|
|
241
|
+
### Variáveis CSS
|
|
242
|
+
[ ] Todas as cores usam var(--xxx)
|
|
243
|
+
[ ] Backgrounds usam var(--bg-xxx)
|
|
244
|
+
[ ] Border-radius usa var(--radius-xxx)
|
|
245
|
+
|
|
246
|
+
### Efeitos Visuais (se MASTER.md define) ⭐
|
|
247
|
+
[ ] Cards/surfaces usam glassmorphism (backdrop-filter + overlay) conforme MASTER.md
|
|
248
|
+
[ ] Shadows aplicadas conforme nível de elevação (sm/md/lg)
|
|
249
|
+
[ ] Hover states têm micro-animações (transition, transform)
|
|
250
|
+
[ ] Borders usam overlay variables (var(--color-overlay-08))
|
|
251
|
+
|
|
252
|
+
### Tipografia
|
|
253
|
+
[ ] Font-family definida no MASTER.md ou herdada do body
|
|
254
|
+
[ ] Font-sizes seguem escala do Design System
|
|
255
|
+
|
|
256
|
+
### Ícones
|
|
257
|
+
[ ] Nenhum emoji usado como ícone
|
|
258
|
+
[ ] Ícones de Lucide React ou Heroicons
|
|
259
|
+
|
|
260
|
+
### Interação
|
|
261
|
+
[ ] cursor-pointer em elementos clicáveis
|
|
262
|
+
[ ] Hover states com feedback visual
|
|
263
|
+
[ ] Transitions suaves (150-300ms)
|
|
264
|
+
|
|
265
|
+
### Acessibilidade
|
|
266
|
+
[ ] role="xxx" onde apropriado
|
|
267
|
+
[ ] aria-label em ícones/botões sem texto
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## 🔴 Gate de Saída
|
|
273
|
+
|
|
274
|
+
Componente só está "pronto para commit" quando:
|
|
275
|
+
|
|
276
|
+
```markdown
|
|
277
|
+
[ ] Usa APENAS variáveis do Design System
|
|
278
|
+
[ ] Sem cores/valores hardcoded
|
|
279
|
+
[ ] Sem emojis como ícones
|
|
280
|
+
[ ] cursor-pointer em clicáveis
|
|
281
|
+
[ ] Efeitos visuais aplicados conforme MASTER.md (glassmorphism, shadows, animations) ⭐
|
|
282
|
+
[ ] Passou no ui_antipattern_check.py (se disponível)
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## 🔗 Workflows que Referenciam Esta Skill
|
|
288
|
+
|
|
289
|
+
| Workflow | Fase |
|
|
290
|
+
|----------|------|
|
|
291
|
+
| `/new-project` | Phase 4 (TDD GREEN) |
|
|
292
|
+
| `/new-task` | Fase 3.5 (TDD) |
|
|
293
|
+
| `/legacy-project` | Phase 6 (Testes) |
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## 📝 Exemplo Prático
|
|
298
|
+
|
|
299
|
+
### ❌ Errado (hardcoded)
|
|
300
|
+
|
|
301
|
+
```tsx
|
|
302
|
+
export default function Card() {
|
|
303
|
+
return (
|
|
304
|
+
<div style={{
|
|
305
|
+
backgroundColor: '#111111', // ❌ hardcoded
|
|
306
|
+
color: 'white', // ❌ hardcoded
|
|
307
|
+
borderRadius: '12px' // ❌ hardcoded
|
|
308
|
+
}}>
|
|
309
|
+
<span>🚀</span> {/* ❌ emoji como ícone */}
|
|
310
|
+
<button>Click</button> {/* ❌ sem cursor-pointer */}
|
|
311
|
+
</div>
|
|
312
|
+
)
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### ✅ Correto (Design System)
|
|
317
|
+
|
|
318
|
+
```tsx
|
|
319
|
+
import { Rocket } from 'lucide-react'
|
|
320
|
+
|
|
321
|
+
export default function Card() {
|
|
322
|
+
return (
|
|
323
|
+
<div style={{
|
|
324
|
+
backgroundColor: 'var(--bg-card)',
|
|
325
|
+
color: 'var(--text-primary)',
|
|
326
|
+
borderRadius: 'var(--radius-md)'
|
|
327
|
+
}}>
|
|
328
|
+
<Rocket size={20} style={{ color: 'var(--lime)' }} />
|
|
329
|
+
<button className="cursor-pointer hover:opacity-80 transition-opacity">
|
|
330
|
+
Click
|
|
331
|
+
</button>
|
|
332
|
+
</div>
|
|
333
|
+
)
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
> **Lembre-se:** O Design System é lei. Não há exceções para "fazer rápido" ou "ajustar depois".
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Antigravity Skills
|
|
2
|
+
|
|
3
|
+
> **Hướng dẫn tạo và sử dụng Skills trong Antigravity Kit**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 📋 Giới thiệu
|
|
8
|
+
|
|
9
|
+
Mặc dù các mô hình cơ bản của Antigravity (như Gemini) là những mô hình đa năng mạnh mẽ, nhưng chúng không biết ngữ cảnh dự án cụ thể hoặc các tiêu chuẩn của nhóm bạn. Việc tải từng quy tắc hoặc công cụ vào cửa sổ ngữ cảnh của tác nhân sẽ dẫn đến tình trạng "phình to công cụ", chi phí cao hơn, độ trễ và sự nhầm lẫn.
|
|
10
|
+
|
|
11
|
+
**Antigravity Skills** giải quyết vấn đề này thông qua tính năng **Progressive Disclosure**. Kỹ năng là một gói kiến thức chuyên biệt, ở trạng thái không hoạt động cho đến khi cần. Thông tin này chỉ được tải vào ngữ cảnh của tác nhân khi yêu cầu cụ thể của bạn khớp với nội dung mô tả của kỹ năng.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 📁 Cấu trúc và Phạm vi
|
|
16
|
+
|
|
17
|
+
Kỹ năng là các gói dựa trên thư mục. Bạn có thể xác định các phạm vi này tuỳ thuộc vào nhu cầu:
|
|
18
|
+
|
|
19
|
+
| Phạm vi | Đường dẫn | Mô tả |
|
|
20
|
+
|---------|-----------|-------|
|
|
21
|
+
| **Workspace** | `<workspace-root>/.agent/skills/` | Chỉ có trong một dự án cụ thể |
|
|
22
|
+
|
|
23
|
+
### Cấu trúc thư mục kỹ năng
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
my-skill/
|
|
27
|
+
├── SKILL.md # (Required) Metadata & instructions
|
|
28
|
+
├── scripts/ # (Optional) Python or Bash scripts
|
|
29
|
+
├── references/ # (Optional) Text, documentation, templates
|
|
30
|
+
└── assets/ # (Optional) Images or logos
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 🔍 Ví dụ 1: Code Review Skill
|
|
36
|
+
|
|
37
|
+
Đây là một kỹ năng chỉ có hướng dẫn (instruction-only), chỉ cần tạo file `SKILL.md`.
|
|
38
|
+
|
|
39
|
+
### Bước 1: Tạo thư mục
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
mkdir -p ~/.gemini/antigravity/skills/code-review
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Bước 2: Tạo SKILL.md
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
---
|
|
49
|
+
name: code-review
|
|
50
|
+
description: Reviews code changes for bugs, style issues, and best practices. Use when reviewing PRs or checking code quality.
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
# Code Review Skill
|
|
54
|
+
|
|
55
|
+
When reviewing code, follow these steps:
|
|
56
|
+
|
|
57
|
+
## Review checklist
|
|
58
|
+
|
|
59
|
+
1. **Correctness**: Does the code do what it's supposed to?
|
|
60
|
+
2. **Edge cases**: Are error conditions handled?
|
|
61
|
+
3. **Style**: Does it follow project conventions?
|
|
62
|
+
4. **Performance**: Are there obvious inefficiencies?
|
|
63
|
+
|
|
64
|
+
## How to provide feedback
|
|
65
|
+
|
|
66
|
+
- Be specific about what needs to change
|
|
67
|
+
- Explain why, not just what
|
|
68
|
+
- Suggest alternatives when possible
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
> **Lưu ý**: File `SKILL.md` chứa siêu dữ liệu (name, description) ở trên cùng, sau đó là các chỉ dẫn. Agent sẽ chỉ đọc siêu dữ liệu và chỉ tải hướng dẫn khi cần.
|
|
72
|
+
|
|
73
|
+
### Dùng thử
|
|
74
|
+
|
|
75
|
+
Tạo file `demo_bad_code.py`:
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
import time
|
|
79
|
+
|
|
80
|
+
def get_user_data(users, id):
|
|
81
|
+
# Find user by ID
|
|
82
|
+
for u in users:
|
|
83
|
+
if u['id'] == id:
|
|
84
|
+
return u
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
def process_payments(items):
|
|
88
|
+
total = 0
|
|
89
|
+
for i in items:
|
|
90
|
+
# Calculate tax
|
|
91
|
+
tax = i['price'] * 0.1
|
|
92
|
+
total = total + i['price'] + tax
|
|
93
|
+
time.sleep(0.1) # Simulate slow network call
|
|
94
|
+
return total
|
|
95
|
+
|
|
96
|
+
def run_batch():
|
|
97
|
+
users = [{'id': 1, 'name': 'Alice'}, {'id': 2, 'name': 'Bob'}]
|
|
98
|
+
items = [{'price': 10}, {'price': 20}, {'price': 100}]
|
|
99
|
+
|
|
100
|
+
u = get_user_data(users, 3)
|
|
101
|
+
print("User found: " + u['name']) # Will crash if None
|
|
102
|
+
|
|
103
|
+
print("Total: " + str(process_payments(items)))
|
|
104
|
+
|
|
105
|
+
if __name__ == "__main__":
|
|
106
|
+
run_batch()
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Prompt**: `review the @demo_bad_code.py file`
|
|
110
|
+
|
|
111
|
+
Agent sẽ tự động xác định kỹ năng `code-review`, tải thông tin và thực hiện theo hướng dẫn.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 📄 Ví dụ 2: License Header Skill
|
|
116
|
+
|
|
117
|
+
Kỹ năng này sử dụng file tham chiếu (reference file) trong thư mục `resources/`.
|
|
118
|
+
|
|
119
|
+
### Bước 1: Tạo thư mục
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
mkdir -p .agent/skills/license-header-adder/resources
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Bước 2: Tạo file template
|
|
126
|
+
|
|
127
|
+
**`.agent/skills/license-header-adder/resources/HEADER.txt`**:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
/*
|
|
131
|
+
* Copyright (c) 2026 YOUR_COMPANY_NAME LLC.
|
|
132
|
+
* All rights reserved.
|
|
133
|
+
* This code is proprietary and confidential.
|
|
134
|
+
*/
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Bước 3: Tạo SKILL.md
|
|
138
|
+
|
|
139
|
+
**`.agent/skills/license-header-adder/SKILL.md`**:
|
|
140
|
+
|
|
141
|
+
```markdown
|
|
142
|
+
---
|
|
143
|
+
name: license-header-adder
|
|
144
|
+
description: Adds the standard corporate license header to new source files.
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
# License Header Adder
|
|
148
|
+
|
|
149
|
+
This skill ensures that all new source files have the correct copyright header.
|
|
150
|
+
|
|
151
|
+
## Instructions
|
|
152
|
+
|
|
153
|
+
1. **Read the Template**: Read the content of `resources/HEADER.txt`.
|
|
154
|
+
2. **Apply to File**: When creating a new file, prepend this exact content.
|
|
155
|
+
3. **Adapt Syntax**:
|
|
156
|
+
- For C-style languages (Java, TS), keep the `/* */` block.
|
|
157
|
+
- For Python/Shell, convert to `#` comments.
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Dùng thử
|
|
161
|
+
|
|
162
|
+
**Prompt**: `Create a new Python script named data_processor.py that prints 'Hello World'.`
|
|
163
|
+
|
|
164
|
+
Agent sẽ đọc template, chuyển đổi comments theo kiểu Python và tự động thêm vào đầu file.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## 🎯 Kết luận
|
|
169
|
+
|
|
170
|
+
Bằng cách tạo Skills, bạn đã biến mô hình AI đa năng thành một chuyên gia cho dự án của mình:
|
|
171
|
+
|
|
172
|
+
- ✅ Hệ thống hoá các best practices
|
|
173
|
+
- ✅ Tuân theo quy tắc đánh giá code
|
|
174
|
+
- ✅ Tự động thêm license headers
|
|
175
|
+
- ✅ Agent tự động biết cách làm việc với nhóm của bạn
|
|
176
|
+
|
|
177
|
+
Thay vì liên tục nhắc AI "nhớ thêm license" hoặc "sửa format commit", giờ đây Agent sẽ tự động thực hiện!
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: document-registry
|
|
3
|
+
description: Protocolo para manter docs/INDEX.md atualizado como fonte de verdade de todos os documentos do projeto. Obrigatório em toda fase que cria ou consome documentação. Usado por new-project, legacy-project, new-task e qualquer workflow que gere artefatos.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: document-registry
|
|
7
|
+
|
|
8
|
+
## Propósito
|
|
9
|
+
|
|
10
|
+
`docs/INDEX.md` é o **único ponto de entrada** para que agentes saibam o que existe no projeto sem precisar varrer o sistema de arquivos. Este skill define como mantê-lo correto.
|
|
11
|
+
|
|
12
|
+
> [!IMPORTANT]
|
|
13
|
+
> **REGRA DO AGENTE:** Antes de buscar qualquer documento, verificar `docs/INDEX.md`.
|
|
14
|
+
> Se o INDEX não existir → executar `project-foundation` primeiro.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 1. Antes de Buscar Documentos (READ)
|
|
19
|
+
|
|
20
|
+
Ao iniciar qualquer fase ou task que precise de contexto:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
1. Ler docs/INDEX.md
|
|
24
|
+
2. Identificar entries relevantes pelo tipo ou doc_id
|
|
25
|
+
3. Seguir o path listado — NÃO buscar o arquivo por nome em todo o fs
|
|
26
|
+
4. Verificar o status: draft | review | approved | superseded
|
|
27
|
+
→ draft: usar com cautela, não é fonte de verdade
|
|
28
|
+
→ review: aguardar aprovação antes de implementar
|
|
29
|
+
→ approved: implementar com confiança
|
|
30
|
+
→ superseded: NÃO usar — ver "replaced_by" no INDEX
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 2. Ao Criar um Documento (WRITE)
|
|
36
|
+
|
|
37
|
+
Toda vez que um documento for criado, adicionar uma entry no INDEX **imediatamente**:
|
|
38
|
+
|
|
39
|
+
### Formato da Entry
|
|
40
|
+
|
|
41
|
+
```markdown
|
|
42
|
+
| {doc_id} | {Type} | [{basename}]({relative-path}) | draft | {version} | — |
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Campos Obrigatórios
|
|
46
|
+
|
|
47
|
+
| Campo | Formato | Exemplo |
|
|
48
|
+
|-------|---------|---------|
|
|
49
|
+
| `doc_id` | `{TYPE}-{slug}` | `PRD-flyee`, `SDD-auth`, `FLOW-login` |
|
|
50
|
+
| `Type` | PRD, SDD, Design System, OpenAPI, Flow, ADR, Handover, Test Guide, Page Spec | `Flow` |
|
|
51
|
+
| Path | Relativo ao `/docs/` | `flows/auth/login.md` |
|
|
52
|
+
| Status | `draft` (default ao criar) | `draft` |
|
|
53
|
+
| Version | `"1.0"` ao criar | `"1.0"` |
|
|
54
|
+
| `approved_at` | `—` (vazio ao criar) | `—` |
|
|
55
|
+
|
|
56
|
+
### Tipos de Documentos e doc_id Padrão
|
|
57
|
+
|
|
58
|
+
| Tipo | doc_id padrão | Exemplo |
|
|
59
|
+
|------|--------------|---------|
|
|
60
|
+
| PRD | `PRD-{slug}` | `PRD-flyee` |
|
|
61
|
+
| SDD (Software Design Doc) | `SDD-{slug}-{módulo}` | `SDD-flyee-auth` |
|
|
62
|
+
| Design System | `DS-{slug}` | `DS-flyee` |
|
|
63
|
+
| OpenAPI Spec | `API-{slug}` | `API-flyee` |
|
|
64
|
+
| Flow documentation | `FLOW-{slug}` | `FLOW-login` |
|
|
65
|
+
| ADR | `ADR-{NNN}-{slug}` | `ADR-001-redis` |
|
|
66
|
+
| Handover | `HANDOVER-{escopo}` | `HANDOVER-auth` |
|
|
67
|
+
| Test Guide | `TESTGUIDE-{escopo}` | `TESTGUIDE-auth` |
|
|
68
|
+
| Page Spec | `PAGESPEC-{page}` | `PAGESPEC-dashboard` |
|
|
69
|
+
| Retrospective | `RETRO-{slug}-v{N}` | `RETRO-flyee-v1` |
|
|
70
|
+
| Security Policy | `SECURITY` | `SECURITY` |
|
|
71
|
+
| Legacy Analysis | `LEGACY-ANALYSIS` | `LEGACY-ANALYSIS` |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 3. Ao Aprovar um Documento (STATUS UPDATE)
|
|
76
|
+
|
|
77
|
+
Quando o usuário aprovar um documento:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
1. Abrir docs/INDEX.md
|
|
81
|
+
2. Localizar a entry pelo doc_id
|
|
82
|
+
3. Atualizar: status → approved, approved_at → YYYY-MM-DD
|
|
83
|
+
4. Se substituindo versão anterior: marcar antiga como superseded, adicionar campo replaced_by
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 4. Ao Superseder um Documento
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
1. Marcar entry antiga: status → superseded
|
|
92
|
+
2. Adicionar coluna implied "replaced_by: {novo_doc_id}"
|
|
93
|
+
3. Adicionar nova entry com nova versão
|
|
94
|
+
4. NÃO deletar a entry antiga do INDEX — histórico é valioso
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 5. Checklist por Fase
|
|
100
|
+
|
|
101
|
+
### Fases que CRIAM documentos (devem atualizar INDEX):
|
|
102
|
+
- `project-foundation` → README, .env.example, SECURITY, INDEX, ADR-000
|
|
103
|
+
- `new-project` Phase 1 → PRD
|
|
104
|
+
- `new-project` Phase 2 → SDD
|
|
105
|
+
- `new-project` Phase 2.5 → Design System
|
|
106
|
+
- `new-project` Phase 2.65 → Content docs
|
|
107
|
+
- `new-project` Phase 2.8 → Page Specs
|
|
108
|
+
- `legacy-project` Phase 4 (loop) → Flow docs
|
|
109
|
+
- `legacy-project` Phase 5 → SDD by module
|
|
110
|
+
- `legacy-project` Phase 5.5 → Design System
|
|
111
|
+
- `legacy-project` Phase 5.6 → Security ADR (se issues encontrados)
|
|
112
|
+
- `legacy-project` Phase 7.5 → ADRs
|
|
113
|
+
- `legacy-project` Phase 8 → Handover + Test Guide
|
|
114
|
+
|
|
115
|
+
### Fases que CONSOMEM documentos (devem ler INDEX primeiro):
|
|
116
|
+
- Qualquer fase de implementação
|
|
117
|
+
- `context-gathering-patterns` (verificar INDEX antes de buscar docs)
|
|
118
|
+
- `new-task` Fase -1 e Fase 1 (histórico + contexto)
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 6. Anti-Patterns
|
|
123
|
+
|
|
124
|
+
| ❌ Proibido | ✅ Correto |
|
|
125
|
+
|------------|-----------|
|
|
126
|
+
| Buscar `find docs/ -name "*.md"` para achar documentos | Ler `docs/INDEX.md` primeiro |
|
|
127
|
+
| Criar documento sem adicionar ao INDEX | Criar + entry no INDEX imediatamente |
|
|
128
|
+
| Usar documento com status `draft` como fonte de verdade | Verificar status antes de implementar |
|
|
129
|
+
| Deletar entries do INDEX | Marcar como `superseded` (nunca deletar) |
|
|
130
|
+
| Criar documento com `doc_id` duplicado | Verificar INDEX antes de criar |
|