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,219 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: integration-completeness
|
|
3
|
+
description: Valida que componentes interativos (botões, forms) estão conectados às funções. Previne gaps UI→Function.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Integration Completeness Validation
|
|
7
|
+
|
|
8
|
+
> Garantir que componentes interativos estão **conectados** às funções, não apenas existem.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🎯 PROBLEMA
|
|
13
|
+
|
|
14
|
+
Testes podem passar verificando:
|
|
15
|
+
- ✅ Botão existe na tela
|
|
16
|
+
- ✅ Função funciona isoladamente
|
|
17
|
+
|
|
18
|
+
Mas **FALHAM** em verificar:
|
|
19
|
+
- ❌ Clicar no botão chama a função
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 🔗 QUANDO USAR?
|
|
24
|
+
|
|
25
|
+
| Workflow | Fase | Trigger |
|
|
26
|
+
|----------|------|---------|
|
|
27
|
+
| `/new-project` | Phase 5.2 | Após criar componentes UI |
|
|
28
|
+
| `/new-task` | Phase 3.7 | Se feature tem UI interativa |
|
|
29
|
+
| `/execute` | Durante implementação | Para cada componente |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## ✅ CHECKLIST DE VALIDAÇÃO
|
|
34
|
+
|
|
35
|
+
Para **CADA componente interativo**, verificar:
|
|
36
|
+
|
|
37
|
+
### Botões e Links
|
|
38
|
+
```markdown
|
|
39
|
+
[ ] onClick definido?
|
|
40
|
+
[ ] onClick chama função correta?
|
|
41
|
+
[ ] Função está importada?
|
|
42
|
+
[ ] Teste verifica clique → ação?
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Forms
|
|
46
|
+
```markdown
|
|
47
|
+
[ ] onSubmit definido?
|
|
48
|
+
[ ] onSubmit chama handler?
|
|
49
|
+
[ ] preventDefault chamado?
|
|
50
|
+
[ ] Teste verifica submit → ação?
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Inputs Controlados
|
|
54
|
+
```markdown
|
|
55
|
+
[ ] value ligado a state?
|
|
56
|
+
[ ] onChange atualiza state?
|
|
57
|
+
[ ] Teste verifica input → state?
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 🧪 TEMPLATE DE TESTE DE INTEGRAÇÃO
|
|
63
|
+
|
|
64
|
+
### Botão que chama função
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
// ❌ INCOMPLETO - só verifica existência
|
|
68
|
+
it('should have a login button', () => {
|
|
69
|
+
render(<LoginPage />);
|
|
70
|
+
expect(screen.getByRole('button', { name: /login/i })).toBeInTheDocument();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// ✅ COMPLETO - verifica conexão
|
|
74
|
+
it('should call signIn when login button is clicked', async () => {
|
|
75
|
+
const mockSignIn = vi.fn();
|
|
76
|
+
render(<LoginPage onSignIn={mockSignIn} />);
|
|
77
|
+
|
|
78
|
+
await userEvent.click(screen.getByRole('button', { name: /login/i }));
|
|
79
|
+
|
|
80
|
+
expect(mockSignIn).toHaveBeenCalled();
|
|
81
|
+
});
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Form que submete dados
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
// ❌ INCOMPLETO
|
|
88
|
+
it('should have a submit button', () => {
|
|
89
|
+
render(<ContactForm />);
|
|
90
|
+
expect(screen.getByRole('button', { name: /enviar/i })).toBeInTheDocument();
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// ✅ COMPLETO
|
|
94
|
+
it('should call onSubmit with form data', async () => {
|
|
95
|
+
const mockSubmit = vi.fn();
|
|
96
|
+
render(<ContactForm onSubmit={mockSubmit} />);
|
|
97
|
+
|
|
98
|
+
await userEvent.type(screen.getByLabelText(/email/i), 'test@test.com');
|
|
99
|
+
await userEvent.click(screen.getByRole('button', { name: /enviar/i }));
|
|
100
|
+
|
|
101
|
+
expect(mockSubmit).toHaveBeenCalledWith({ email: 'test@test.com' });
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 🚨 REGRAS CRÍTICAS
|
|
108
|
+
|
|
109
|
+
### Para Testes
|
|
110
|
+
|
|
111
|
+
| Tipo de Teste | O que verificar |
|
|
112
|
+
|---------------|-----------------|
|
|
113
|
+
| Existência | Componente renderiza |
|
|
114
|
+
| **Interação** | Clique/submit dispara ação |
|
|
115
|
+
| **Integração** | Ação produz efeito correto |
|
|
116
|
+
|
|
117
|
+
### Para Implementação
|
|
118
|
+
|
|
119
|
+
| Componente | Obrigatório |
|
|
120
|
+
|------------|-------------|
|
|
121
|
+
| `<button>` | `onClick` definido |
|
|
122
|
+
| `<a>` | `href` ou `onClick` |
|
|
123
|
+
| `<form>` | `onSubmit` definido |
|
|
124
|
+
| `<input>` | `onChange` se controlado |
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 📋 GATE DE VERIFICAÇÃO
|
|
129
|
+
|
|
130
|
+
Antes de marcar UI como completa:
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
## Verificação de Integração
|
|
134
|
+
|
|
135
|
+
### Componentes Interativos
|
|
136
|
+
| Componente | Handler | Função | Teste |
|
|
137
|
+
|------------|---------|--------|-------|
|
|
138
|
+
| Botão Login Google | onClick | signInWithGoogle | ✅/❌ |
|
|
139
|
+
| Botão Login GitHub | onClick | signInWithGitHub | ✅/❌ |
|
|
140
|
+
| Form Newsletter | onSubmit | subscribeNewsletter | ✅/❌ |
|
|
141
|
+
|
|
142
|
+
### Checklist
|
|
143
|
+
- [ ] TODOS os handlers definidos?
|
|
144
|
+
- [ ] TODOS os handlers têm testes de clique?
|
|
145
|
+
- [ ] ZERO handlers vazios/placeholder?
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## ⚠️ ANTI-PATTERNS
|
|
151
|
+
|
|
152
|
+
| ❌ Errado | ✅ Correto |
|
|
153
|
+
|-----------|-----------|
|
|
154
|
+
| `<button>Login</button>` | `<button onClick={handleLogin}>Login</button>` |
|
|
155
|
+
| `onClick={() => {}}` | `onClick={signIn}` |
|
|
156
|
+
| Teste só de existência | Teste de existência + interação |
|
|
157
|
+
| Handler sem importar função | Handler importa e chama função |
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## 🔍 DETECÇÃO RÁPIDA
|
|
162
|
+
|
|
163
|
+
Buscar no código por componentes potencialmente desconectados:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Botões sem onClick
|
|
167
|
+
grep -r "<button" --include="*.tsx" | grep -v "onClick"
|
|
168
|
+
|
|
169
|
+
# Forms sem onSubmit
|
|
170
|
+
grep -r "<form" --include="*.tsx" | grep -v "onSubmit"
|
|
171
|
+
|
|
172
|
+
# Handlers vazios
|
|
173
|
+
grep -r "onClick={() => {}}" --include="*.tsx"
|
|
174
|
+
grep -r 'onClick={() => ""}' --include="*.tsx"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 🔍 Production Mock Detection (DATA INTEGRATION SCAN)
|
|
180
|
+
|
|
181
|
+
> [!CAUTION]
|
|
182
|
+
> Before marking implementation as complete, the agent MUST verify that NO production
|
|
183
|
+
> page/route contains mock data.
|
|
184
|
+
|
|
185
|
+
**Mandatory scan (run for EACH page/route in production path):**
|
|
186
|
+
|
|
187
|
+
```markdown
|
|
188
|
+
⚠️ DATA INTEGRATION SCAN — Implementation Complete?
|
|
189
|
+
|
|
190
|
+
For EACH file in src/app/ (pages and routes):
|
|
191
|
+
[ ] Pattern: `mock` (case insensitive) — ZERO occurrences?
|
|
192
|
+
[ ] Pattern: `() => {}` or `() => { }` — ZERO noop callbacks?
|
|
193
|
+
[ ] Pattern: `// TODO` in business logic — ZERO placeholders?
|
|
194
|
+
[ ] Pattern: `// MVP:` — ZERO MVP flags?
|
|
195
|
+
|
|
196
|
+
If ANY pattern found:
|
|
197
|
+
→ LIST affected files
|
|
198
|
+
→ FIX before marking implementation as complete
|
|
199
|
+
→ Connect to database / implement real logic
|
|
200
|
+
|
|
201
|
+
✅ ZERO mock patterns in production → CLEARED
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Recommended scan commands:**
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
grep -rn "mock" src/app/ --include="*.tsx" --include="*.ts" -l
|
|
208
|
+
grep -rn "() => {}" src/app/ --include="*.tsx" --include="*.ts" -l
|
|
209
|
+
grep -rn "// TODO" src/app/ --include="*.tsx" --include="*.ts" -l
|
|
210
|
+
grep -rn "// MVP" src/app/ --include="*.tsx" --include="*.ts" -l
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
> **Historical Lesson:** Phase 5.2 had a gate "Components connected to backend" but no verification
|
|
214
|
+
> mechanism. The agent marked it ✅ without checking. 7 files had `mockData`, `// MVP: mock response`,
|
|
215
|
+
> and `onApprove={() => {}}` in production code.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
> **Regra de Ouro:** Se o usuário pode clicar, o teste deve clicar.
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: intelligent-routing
|
|
3
|
+
description: Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Intelligent Agent Routing
|
|
8
|
+
|
|
9
|
+
**Purpose**: Automatically analyze user requests and route them to the most appropriate specialist agent(s) without requiring explicit user mentions.
|
|
10
|
+
|
|
11
|
+
## Core Principle
|
|
12
|
+
|
|
13
|
+
> **The AI should act as an intelligent Project Manager**, analyzing each request and automatically selecting the best specialist(s) for the job.
|
|
14
|
+
|
|
15
|
+
## How It Works
|
|
16
|
+
|
|
17
|
+
### 1. Request Analysis
|
|
18
|
+
|
|
19
|
+
Before responding to ANY user request, perform automatic analysis:
|
|
20
|
+
|
|
21
|
+
```mermaid
|
|
22
|
+
graph TD
|
|
23
|
+
A[User Request: Add login] --> B[ANALYZE]
|
|
24
|
+
B --> C[Keywords]
|
|
25
|
+
B --> D[Domains]
|
|
26
|
+
B --> E[Complexity]
|
|
27
|
+
C --> F[SELECT AGENT]
|
|
28
|
+
D --> F
|
|
29
|
+
E --> F
|
|
30
|
+
F --> G[security-auditor + backend-specialist]
|
|
31
|
+
G --> H[AUTO-INVOKE with context]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 2. Agent Selection Matrix
|
|
35
|
+
|
|
36
|
+
**Use this matrix to automatically select agents:**
|
|
37
|
+
|
|
38
|
+
| User Intent | Keywords | Selected Agent(s) | Auto-invoke? |
|
|
39
|
+
| ------------------- | ---------------------------------------------- | ------------------------------------------- | ------------ |
|
|
40
|
+
| **Authentication** | "login", "auth", "signup", "password" | `security-auditor` + `backend-specialist` | ✅ YES |
|
|
41
|
+
| **UI Component** | "button", "card", "layout", "style" | `frontend-specialist` | ✅ YES |
|
|
42
|
+
| **Mobile UI** | "screen", "navigation", "touch", "gesture" | `mobile-developer` | ✅ YES |
|
|
43
|
+
| **API Endpoint** | "endpoint", "route", "API", "POST", "GET" | `backend-specialist` | ✅ YES |
|
|
44
|
+
| **Database** | "schema", "migration", "query", "table" | `database-architect` + `backend-specialist` | ✅ YES |
|
|
45
|
+
| **Bug Fix** | "error", "bug", "not working", "broken" | `debugger` | ✅ YES |
|
|
46
|
+
| **Test** | "test", "coverage", "unit", "e2e" | `test-engineer` | ✅ YES |
|
|
47
|
+
| **Deployment** | "deploy", "production", "CI/CD", "docker" | `devops-engineer` | ✅ YES |
|
|
48
|
+
| **Security Review** | "security", "vulnerability", "exploit" | `security-auditor` + `penetration-tester` | ✅ YES |
|
|
49
|
+
| **Performance** | "slow", "optimize", "performance", "speed" | `performance-optimizer` | ✅ YES |
|
|
50
|
+
| **Product Def** | "requirements", "user story", "backlog", "MVP" | `product-owner` | ✅ YES |
|
|
51
|
+
| **New Feature** | "build", "create", "implement", "new app" | `orchestrator` → multi-agent | ⚠️ ASK FIRST |
|
|
52
|
+
| **Complex Task** | Multiple domains detected | `orchestrator` → multi-agent | ⚠️ ASK FIRST |
|
|
53
|
+
|
|
54
|
+
### 3. Pre-Execution Gate (MANDATORY for MODERATE/COMPLEX)
|
|
55
|
+
|
|
56
|
+
> [!CAUTION]
|
|
57
|
+
> **AFTER selecting an agent but BEFORE writing code**, the AI MUST complete the Pre-Execution Gate
|
|
58
|
+
> for tasks classified as MODERATE or COMPLEX. This applies even without a slash command.
|
|
59
|
+
|
|
60
|
+
| Complexity | Gate Required? | Actions |
|
|
61
|
+
| ------------ | -------------- | ----------------------------------------------- |
|
|
62
|
+
| **SIMPLE** | ❌ No | Proceed directly with agent response |
|
|
63
|
+
| **MODERATE** | ✅ Yes | Context Gathering + Tracker Sync |
|
|
64
|
+
| **COMPLEX** | ✅ Yes (full) | Context Gathering + History Check + Tracker Sync |
|
|
65
|
+
|
|
66
|
+
**Gate Checklist:**
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
⚠️ Pre-Execution Gate (MODERATE/COMPLEX tasks)
|
|
70
|
+
|
|
71
|
+
[ ] Context Gathering: Read Flyee task + relevant docs (`docs/flows/`)
|
|
72
|
+
[ ] History Check: Search for related past tasks, learn from bugs (COMPLEX only)
|
|
73
|
+
[ ] Tracker Sync: Create or link to existing Flyee task
|
|
74
|
+
|
|
75
|
+
❌ If ANY item unchecked → DO NOT write code
|
|
76
|
+
✅ ALL checked → Proceed with implementation
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Skills to invoke:**
|
|
80
|
+
|
|
81
|
+
- `@[skills/context-gathering-patterns]` → Read task body, domain docs, TDD
|
|
82
|
+
- `@[skills/history-check-patterns]` → Search for related tasks and bugs
|
|
83
|
+
- `@[skills/Flyee API]` → Create or find Flyee task
|
|
84
|
+
|
|
85
|
+
> 🔴 **FALHA QUE GEROU ESTA REGRA:** Sessão de 5 fixes executada sem ler Flyee,
|
|
86
|
+
> sem consultar docs, e sem sync final — porque o intelligent-routing selecionava o
|
|
87
|
+
> agente mas não exigia nenhum pré-check antes da resposta.
|
|
88
|
+
|
|
89
|
+
### 4. Automatic Routing Protocol
|
|
90
|
+
|
|
91
|
+
## TIER 0 - Automatic Analysis (ALWAYS ACTIVE)
|
|
92
|
+
|
|
93
|
+
Before responding to ANY request:
|
|
94
|
+
|
|
95
|
+
```javascript
|
|
96
|
+
// Pseudo-code for decision tree
|
|
97
|
+
function analyzeRequest(userMessage) {
|
|
98
|
+
// 1. Classify request type
|
|
99
|
+
const requestType = classifyRequest(userMessage)
|
|
100
|
+
|
|
101
|
+
// 2. Detect domains
|
|
102
|
+
const domains = detectDomains(userMessage)
|
|
103
|
+
|
|
104
|
+
// 3. Determine complexity
|
|
105
|
+
const complexity = assessComplexity(domains)
|
|
106
|
+
|
|
107
|
+
// 4. Select agent(s)
|
|
108
|
+
if (complexity === "SIMPLE" && domains.length === 1) {
|
|
109
|
+
return selectSingleAgent(domains[0])
|
|
110
|
+
} else if (complexity === "MODERATE" && domains.length <= 2) {
|
|
111
|
+
return selectMultipleAgents(domains)
|
|
112
|
+
} else {
|
|
113
|
+
return "orchestrator" // Complex task
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## 4. Response Format
|
|
119
|
+
|
|
120
|
+
**When auto-selecting an agent, inform the user concisely:**
|
|
121
|
+
|
|
122
|
+
```markdown
|
|
123
|
+
🤖 **Applying knowledge of `@security-auditor` + `@backend-specialist`...**
|
|
124
|
+
|
|
125
|
+
[Proceed with specialized response]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Benefits:**
|
|
129
|
+
|
|
130
|
+
- ✅ User sees which expertise is being applied
|
|
131
|
+
- ✅ Transparent decision-making
|
|
132
|
+
- ✅ Still automatic (no /commands needed)
|
|
133
|
+
|
|
134
|
+
## Domain Detection Rules
|
|
135
|
+
|
|
136
|
+
### Single-Domain Tasks (Auto-invoke Single Agent)
|
|
137
|
+
|
|
138
|
+
| Domain | Patterns | Agent |
|
|
139
|
+
| --------------- | ------------------------------------------ | ----------------------- |
|
|
140
|
+
| **Security** | auth, login, jwt, password, hash, token | `security-auditor` |
|
|
141
|
+
| **Frontend** | component, react, vue, css, html, tailwind | `frontend-specialist` |
|
|
142
|
+
| **Backend** | api, server, express, fastapi, node | `backend-specialist` |
|
|
143
|
+
| **Mobile** | react native, flutter, ios, android, expo | `mobile-developer` |
|
|
144
|
+
| **Database** | prisma, sql, mongodb, schema, migration | `database-architect` |
|
|
145
|
+
| **Testing** | test, jest, vitest, playwright, cypress | `test-engineer` |
|
|
146
|
+
| **DevOps** | docker, kubernetes, ci/cd, pm2, nginx | `devops-engineer` |
|
|
147
|
+
| **Debug** | error, bug, crash, not working, issue | `debugger` |
|
|
148
|
+
| **Performance** | slow, lag, optimize, cache, performance | `performance-optimizer` |
|
|
149
|
+
| **SEO** | seo, meta, analytics, sitemap, robots | `seo-specialist` |
|
|
150
|
+
| **Game** | unity, godot, phaser, game, multiplayer | `game-developer` |
|
|
151
|
+
|
|
152
|
+
### Multi-Domain Tasks (Auto-invoke Orchestrator)
|
|
153
|
+
|
|
154
|
+
If request matches **2+ domains from different categories**, automatically use `orchestrator`:
|
|
155
|
+
|
|
156
|
+
```text
|
|
157
|
+
Example: "Create a secure login system with dark mode UI"
|
|
158
|
+
→ Detected: Security + Frontend
|
|
159
|
+
→ Auto-invoke: orchestrator
|
|
160
|
+
→ Orchestrator will handle: security-auditor, frontend-specialist, test-engineer
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Complexity Assessment
|
|
164
|
+
|
|
165
|
+
### SIMPLE (Direct agent invocation)
|
|
166
|
+
|
|
167
|
+
- Single file edit
|
|
168
|
+
- Clear, specific task
|
|
169
|
+
- One domain only
|
|
170
|
+
- Example: "Fix the login button style"
|
|
171
|
+
|
|
172
|
+
**Action**: Auto-invoke respective agent
|
|
173
|
+
|
|
174
|
+
### MODERATE (2-3 agents)
|
|
175
|
+
|
|
176
|
+
- 2-3 files affected
|
|
177
|
+
- Clear requirements
|
|
178
|
+
- 2 domains max
|
|
179
|
+
- Example: "Add API endpoint for user profile"
|
|
180
|
+
|
|
181
|
+
**Action**: Auto-invoke relevant agents sequentially
|
|
182
|
+
|
|
183
|
+
### COMPLEX (Orchestrator required)
|
|
184
|
+
|
|
185
|
+
- Multiple files/domains
|
|
186
|
+
- Architectural decisions needed
|
|
187
|
+
- Unclear requirements
|
|
188
|
+
- Example: "Build a social media app"
|
|
189
|
+
|
|
190
|
+
**Action**: Auto-invoke `orchestrator` → will ask Socratic questions
|
|
191
|
+
|
|
192
|
+
## Implementation Rules
|
|
193
|
+
|
|
194
|
+
### Rule 1: Silent Analysis
|
|
195
|
+
|
|
196
|
+
#### DO NOT announce "I'm analyzing your request..."
|
|
197
|
+
|
|
198
|
+
- ✅ Analyze silently
|
|
199
|
+
- ✅ Inform which agent is being applied
|
|
200
|
+
- ❌ Avoid verbose meta-commentary
|
|
201
|
+
|
|
202
|
+
### Rule 2: Inform Agent Selection
|
|
203
|
+
|
|
204
|
+
**DO inform which expertise is being applied:**
|
|
205
|
+
|
|
206
|
+
```markdown
|
|
207
|
+
🤖 **Applying knowledge of `@frontend-specialist`...**
|
|
208
|
+
|
|
209
|
+
I will create the component with the following characteristics:
|
|
210
|
+
[Continue with specialized response]
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Rule 3: Seamless Experience
|
|
214
|
+
|
|
215
|
+
**The user should not notice a difference from talking to the right specialist directly.**
|
|
216
|
+
|
|
217
|
+
### Rule 4: Override Capability
|
|
218
|
+
|
|
219
|
+
**User can still explicitly mention agents:**
|
|
220
|
+
|
|
221
|
+
```text
|
|
222
|
+
User: "Use @backend-specialist to review this"
|
|
223
|
+
→ Override auto-selection
|
|
224
|
+
→ Use explicitly mentioned agent
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## Edge Cases
|
|
228
|
+
|
|
229
|
+
### Case 1: Generic Question
|
|
230
|
+
|
|
231
|
+
```text
|
|
232
|
+
User: "How does React work?"
|
|
233
|
+
→ Type: QUESTION
|
|
234
|
+
→ No agent needed
|
|
235
|
+
→ Respond directly with explanation
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Case 2: Extremely Vague Request
|
|
239
|
+
|
|
240
|
+
```text
|
|
241
|
+
User: "Make it better"
|
|
242
|
+
→ Complexity: UNCLEAR
|
|
243
|
+
→ Action: Ask clarifying questions first
|
|
244
|
+
→ Then route to appropriate agent
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Case 3: Contradictory Patterns
|
|
248
|
+
|
|
249
|
+
```text
|
|
250
|
+
User: "Add mobile support to the web app"
|
|
251
|
+
→ Conflict: mobile vs web
|
|
252
|
+
→ Action: Ask: "Do you want responsive web or native mobile app?"
|
|
253
|
+
→ Then route accordingly
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## Integration with Existing Workflows
|
|
257
|
+
|
|
258
|
+
### With /orchestrate Command
|
|
259
|
+
|
|
260
|
+
- **User types `/orchestrate`**: Explicit orchestration mode
|
|
261
|
+
- **AI detects complex task**: Auto-invoke orchestrator (same result)
|
|
262
|
+
|
|
263
|
+
**Difference**: User doesn't need to know the command exists.
|
|
264
|
+
|
|
265
|
+
### With Socratic Gate
|
|
266
|
+
|
|
267
|
+
- **Auto-routing does NOT bypass Socratic Gate**
|
|
268
|
+
- If task is unclear, still ask questions first
|
|
269
|
+
- Then route to appropriate agent
|
|
270
|
+
|
|
271
|
+
### With GEMINI.md Rules
|
|
272
|
+
|
|
273
|
+
- **Priority**: GEMINI.md rules > intelligent-routing
|
|
274
|
+
- If GEMINI.md specifies explicit routing, follow it
|
|
275
|
+
- Intelligent routing is the DEFAULT when no explicit rule exists
|
|
276
|
+
|
|
277
|
+
## Testing the System
|
|
278
|
+
|
|
279
|
+
### Test Cases
|
|
280
|
+
|
|
281
|
+
#### Test 1: Simple Frontend Task
|
|
282
|
+
|
|
283
|
+
```text
|
|
284
|
+
User: "Create a dark mode toggle button"
|
|
285
|
+
Expected: Auto-invoke frontend-specialist
|
|
286
|
+
Verify: Response shows "Using @frontend-specialist"
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
#### Test 2: Security Task
|
|
290
|
+
|
|
291
|
+
```text
|
|
292
|
+
User: "Review the authentication flow for vulnerabilities"
|
|
293
|
+
Expected: Auto-invoke security-auditor
|
|
294
|
+
Verify: Security-focused analysis
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
#### Test 3: Complex Multi-Domain
|
|
298
|
+
|
|
299
|
+
```text
|
|
300
|
+
User: "Build a chat application with real-time notifications"
|
|
301
|
+
Expected: Auto-invoke orchestrator
|
|
302
|
+
Verify: Multiple agents coordinated (backend, frontend, test)
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
#### Test 4: Bug Fix
|
|
306
|
+
|
|
307
|
+
```text
|
|
308
|
+
User: "Login is not working, getting 401 error"
|
|
309
|
+
Expected: Auto-invoke debugger
|
|
310
|
+
Verify: Systematic debugging approach
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## Performance Considerations
|
|
314
|
+
|
|
315
|
+
### Token Usage
|
|
316
|
+
|
|
317
|
+
- Analysis adds ~50-100 tokens per request
|
|
318
|
+
- Tradeoff: Better accuracy vs slight overhead
|
|
319
|
+
- Overall SAVES tokens by reducing back-and-forth
|
|
320
|
+
|
|
321
|
+
### Response Time
|
|
322
|
+
|
|
323
|
+
- Analysis is instant (pattern matching)
|
|
324
|
+
- No additional API calls required
|
|
325
|
+
- Agent selection happens before first response
|
|
326
|
+
|
|
327
|
+
## User Education
|
|
328
|
+
|
|
329
|
+
### Optional: First-Time Explanation
|
|
330
|
+
|
|
331
|
+
If this is the first interaction in a project:
|
|
332
|
+
|
|
333
|
+
```markdown
|
|
334
|
+
💡 **Tip**: I am configured with automatic specialist agent selection.
|
|
335
|
+
I will always choose the most suitable specialist for your task. You can
|
|
336
|
+
still mention agents explicitly with `@agent-name` if you prefer.
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
## Debugging Agent Selection
|
|
340
|
+
|
|
341
|
+
### Enable Debug Mode (for development)
|
|
342
|
+
|
|
343
|
+
Add to GEMINI.md temporarily:
|
|
344
|
+
|
|
345
|
+
```markdown
|
|
346
|
+
## DEBUG: Intelligent Routing
|
|
347
|
+
|
|
348
|
+
Show selection reasoning:
|
|
349
|
+
|
|
350
|
+
- Detected domains: [list]
|
|
351
|
+
- Selected agent: [name]
|
|
352
|
+
- Reasoning: [why]
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
## Summary
|
|
356
|
+
|
|
357
|
+
**intelligent-routing skill enables:**
|
|
358
|
+
|
|
359
|
+
✅ Zero-command operation (no need for `/orchestrate`)
|
|
360
|
+
✅ Automatic specialist selection based on request analysis
|
|
361
|
+
✅ Transparent communication of which expertise is being applied
|
|
362
|
+
✅ Seamless integration with existing workflows
|
|
363
|
+
✅ Override capability for explicit agent mentions
|
|
364
|
+
✅ Fallback to orchestrator for complex tasks
|
|
365
|
+
|
|
366
|
+
**Result**: User gets specialist-level responses without needing to know the system architecture.
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
**Next Steps**: Integrate this skill into GEMINI.md TIER 0 rules.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lint-and-validate
|
|
3
|
+
description: Automatic quality control, linting, and static analysis procedures. Use after every code modification to ensure syntax correctness and project standards. Triggers onKeywords: lint, format, check, validate, types, static analysis.
|
|
4
|
+
allowed-tools: Read, Glob, Grep, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Lint and Validate Skill
|
|
8
|
+
|
|
9
|
+
> **MANDATORY:** Run appropriate validation tools after EVERY code change. Do not finish a task until the code is error-free.
|
|
10
|
+
|
|
11
|
+
### Procedures by Ecosystem
|
|
12
|
+
|
|
13
|
+
#### Node.js / TypeScript
|
|
14
|
+
1. **Lint/Fix:** `npm run lint` or `npx eslint "path" --fix`
|
|
15
|
+
2. **Types:** `npx tsc --noEmit`
|
|
16
|
+
3. **Security:** `npm audit --audit-level=high`
|
|
17
|
+
|
|
18
|
+
#### Python
|
|
19
|
+
1. **Linter (Ruff):** `ruff check "path" --fix` (Fast & Modern)
|
|
20
|
+
2. **Security (Bandit):** `bandit -r "path" -ll`
|
|
21
|
+
3. **Types (MyPy):** `mypy "path"`
|
|
22
|
+
|
|
23
|
+
## The Quality Loop
|
|
24
|
+
1. **Write/Edit Code**
|
|
25
|
+
2. **Run Audit:** `npm run lint && npx tsc --noEmit`
|
|
26
|
+
3. **Analyze Report:** Check the "FINAL AUDIT REPORT" section.
|
|
27
|
+
4. **Fix & Repeat:** Submitting code with "FINAL AUDIT" failures is NOT allowed.
|
|
28
|
+
|
|
29
|
+
## Error Handling
|
|
30
|
+
- If `lint` fails: Fix the style or syntax issues immediately.
|
|
31
|
+
- If `tsc` fails: Correct type mismatches before proceeding.
|
|
32
|
+
- If no tool is configured: Check the project root for `.eslintrc`, `tsconfig.json`, `pyproject.toml` and suggest creating one.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
**Strict Rule:** No code should be committed or reported as "done" without passing these checks.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Scripts
|
|
40
|
+
|
|
41
|
+
| Script | Purpose | Command |
|
|
42
|
+
|--------|---------|---------|
|
|
43
|
+
| `scripts/lint_runner.py` | Unified lint check | `python scripts/lint_runner.py <project_path>` |
|
|
44
|
+
| `scripts/type_coverage.py` | Type coverage analysis | `python scripts/type_coverage.py <project_path>` |
|
|
45
|
+
|