create-genia-os 2.0.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +154 -0
- package/bin/index.js +240 -0
- package/package.json +40 -42
- package/template/.claude/CLAUDE.md +215 -0
- package/template/.claude/agent-memory/analyst/MEMORY.md +20 -0
- package/template/.claude/agent-memory/architect/MEMORY.md +20 -0
- package/template/.claude/agent-memory/dev/MEMORY.md +20 -0
- package/template/.claude/agent-memory/devops/MEMORY.md +20 -0
- package/template/.claude/agent-memory/pm/MEMORY.md +20 -0
- package/template/.claude/agent-memory/po/MEMORY.md +20 -0
- package/template/.claude/agent-memory/qa/MEMORY.md +20 -0
- package/template/.claude/agent-memory/reviewer/MEMORY.md +20 -0
- package/template/.claude/agent-memory/sm/MEMORY.md +20 -0
- package/template/.claude/hooks/enforce-git-push-authority.py +70 -0
- package/template/.claude/hooks/precompact-session-digest.cjs +87 -0
- package/template/.claude/hooks/sql-governance.py +65 -0
- package/template/.claude/hooks/synapse-engine.cjs +122 -0
- package/template/.claude/hooks/write-path-validation.py +59 -0
- package/template/.claude/rules/agent-authority.md +39 -0
- package/template/.claude/rules/agent-handoff.md +71 -0
- package/template/.claude/rules/agent-memory.md +61 -0
- package/template/.claude/rules/ids-principles.md +52 -0
- package/template/.claude/rules/mcp-usage.md +49 -0
- package/template/.claude/rules/story-lifecycle.md +87 -0
- package/template/.claude/rules/workflow-execution.md +68 -0
- package/template/.claude/settings.json +58 -0
- package/template/.claude/settings.local.json +14 -0
- package/template/.genia/CONSTITUTION.md +129 -0
- package/template/.genia/contexts/api-patterns.md +134 -0
- package/template/.genia/contexts/nextjs-react.md +210 -0
- package/template/.genia/contexts/projeto.md +18 -0
- package/template/.genia/contexts/supabase.md +152 -0
- package/template/.genia/contexts/whatsapp-cloud.md +176 -0
- package/template/.genia/core-config.yaml +192 -0
- package/template/.genia/development/agents/analyst.md +138 -0
- package/template/.genia/development/agents/architect.md +171 -0
- package/template/.genia/development/agents/dev.md +160 -0
- package/template/.genia/development/agents/devops.md +200 -0
- package/template/.genia/development/agents/pm.md +142 -0
- package/template/.genia/development/agents/po.md +165 -0
- package/template/.genia/development/agents/qa.md +183 -0
- package/template/.genia/development/agents/reviewer.md +198 -0
- package/template/.genia/development/agents/sm.md +230 -0
- package/template/.genia/development/checklists/architecture-review.md +189 -0
- package/template/.genia/development/checklists/pre-commit.md +205 -0
- package/template/.genia/development/checklists/pre-deploy.md +230 -0
- package/template/.genia/development/checklists/qa-gate.md +216 -0
- package/template/.genia/development/checklists/story-dod.md +155 -0
- package/template/.genia/development/tasks/code-review.md +197 -0
- package/template/.genia/development/tasks/criar-prd.md +170 -0
- package/template/.genia/development/tasks/criar-spec.md +188 -0
- package/template/.genia/development/tasks/criar-story.md +185 -0
- package/template/.genia/development/tasks/debug-sistematico.md +230 -0
- package/template/.genia/development/tasks/dev-implement.md +199 -0
- package/template/.genia/development/tasks/qa-review.md +224 -0
- package/template/.genia/development/workflows/brownfield.md +178 -0
- package/template/.genia/development/workflows/delivery.md +208 -0
- package/template/.genia/development/workflows/development.md +189 -0
- package/template/.genia/development/workflows/greenfield.md +166 -0
- package/template/.genia/development/workflows/planning.md +167 -0
- package/template/.genia/development/workflows/qa-loop.md +179 -0
- package/template/.genia/development/workflows/spec-pipeline.md +192 -0
- package/template/.genia/development/workflows/story-development-cycle.md +252 -0
- package/template/.genia/guidelines/clean-code.md +98 -0
- package/template/.genia/guidelines/testing.md +176 -0
- package/template/.genia/skills/design/canvas-design.md +109 -0
- package/template/.genia/skills/design/frontend-design.md +140 -0
- package/template/.genia/skills/dev/mcp-builder.md +172 -0
- package/template/.genia/skills/dev/webapp-testing.md +150 -0
- package/template/.genia/skills/documents/docx.md +153 -0
- package/template/.genia/skills/documents/pdf.md +134 -0
- package/template/.genia/skills/documents/pptx.md +118 -0
- package/template/.genia/skills/documents/xlsx.md +140 -0
- package/template/.synapse/agent-analyst +8 -0
- package/template/.synapse/agent-architect +8 -0
- package/template/.synapse/agent-dev +8 -0
- package/template/.synapse/agent-devops +8 -0
- package/template/.synapse/agent-pm +8 -0
- package/template/.synapse/agent-po +7 -0
- package/template/.synapse/agent-qa +8 -0
- package/template/.synapse/agent-reviewer +7 -0
- package/template/.synapse/agent-sm +7 -0
- package/template/.synapse/constitution +7 -0
- package/template/.synapse/context +8 -0
- package/template/.synapse/global +8 -0
- package/template/.synapse/manifest +14 -0
- package/template/README.md +53 -0
- package/bin/create.js +0 -181
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Skill: /canvas-design
|
|
2
|
+
|
|
3
|
+
## Metadata
|
|
4
|
+
- **Nome**: Canvas Design
|
|
5
|
+
- **Comando**: /canvas-design
|
|
6
|
+
- **Agente**: @dev
|
|
7
|
+
- **Categoria**: design
|
|
8
|
+
- **Versao**: 2.0
|
|
9
|
+
|
|
10
|
+
## Descricao
|
|
11
|
+
Criar arte visual bonita em .png e .pdf usando filosofia de design. Criar designs visuais originais para posters, pecas de arte e designs estaticos.
|
|
12
|
+
|
|
13
|
+
## Quando Usar
|
|
14
|
+
- Criar posters
|
|
15
|
+
- Criar pecas de arte
|
|
16
|
+
- Criar designs estaticos
|
|
17
|
+
- Criar material visual para apresentacoes
|
|
18
|
+
|
|
19
|
+
## Processo em Duas Etapas
|
|
20
|
+
|
|
21
|
+
### 1. Criacao da Filosofia de Design (.md)
|
|
22
|
+
### 2. Expressao no Canvas (.pdf ou .png)
|
|
23
|
+
|
|
24
|
+
## Filosofia de Design
|
|
25
|
+
|
|
26
|
+
### Nomear o Movimento (1-2 palavras)
|
|
27
|
+
Exemplos:
|
|
28
|
+
- "Brutalist Joy"
|
|
29
|
+
- "Chromatic Silence"
|
|
30
|
+
- "Metabolist Dreams"
|
|
31
|
+
|
|
32
|
+
### Articular a Filosofia (4-6 paragrafos)
|
|
33
|
+
Expressar como a filosofia se manifesta atraves de:
|
|
34
|
+
- Espaco e forma
|
|
35
|
+
- Cor e material
|
|
36
|
+
- Escala e ritmo
|
|
37
|
+
- Composicao e equilibrio
|
|
38
|
+
- Hierarquia visual
|
|
39
|
+
|
|
40
|
+
### Diretrizes Criticas
|
|
41
|
+
- **Evitar redundancia**: Cada aspecto mencionado uma vez
|
|
42
|
+
- **Enfatizar craftsmanship**: O trabalho deve parecer meticulosamente elaborado
|
|
43
|
+
- **Deixar espaco criativo**: Especifico mas conciso
|
|
44
|
+
|
|
45
|
+
## Exemplos de Filosofia
|
|
46
|
+
|
|
47
|
+
### "Concrete Poetry"
|
|
48
|
+
Comunicacao atraves de forma monumental e geometria bold. Blocos de cor massivos, tipografia escultural, divisoes espaciais brutalistas. Energia de poster polones encontra Le Corbusier.
|
|
49
|
+
|
|
50
|
+
### "Chromatic Language"
|
|
51
|
+
Cor como sistema primario de informacao. Precisao geometrica onde zonas de cor criam significado. Tipografia minimal - pequenas labels sans-serif.
|
|
52
|
+
|
|
53
|
+
### "Analog Meditation"
|
|
54
|
+
Contemplacao visual quieta atraves de textura e espaco respirando. Grao de papel, bleeds de tinta, vasto espaco negativo. Estetica de photobook japones.
|
|
55
|
+
|
|
56
|
+
### "Geometric Silence"
|
|
57
|
+
Ordem pura e contencao. Precisao baseada em grid, fotografia bold ou graficos stark, espaco negativo dramatico. Formalismo suico encontra honestidade material brutalista.
|
|
58
|
+
|
|
59
|
+
## Criacao do Canvas
|
|
60
|
+
|
|
61
|
+
### Principios
|
|
62
|
+
- Trabalho de qualidade de museu ou revista
|
|
63
|
+
- Padroes repetitivos e formas perfeitas
|
|
64
|
+
- Tratamento como um diagrama de disciplina imaginaria
|
|
65
|
+
- Tipografia esparsa e clinica
|
|
66
|
+
- Paleta de cores limitada e intencional
|
|
67
|
+
|
|
68
|
+
### Texto como Elemento Visual
|
|
69
|
+
- Texto sempre minimal e visual-first
|
|
70
|
+
- Contexto guia a escala
|
|
71
|
+
- Sofisticacao nao-negociavel
|
|
72
|
+
- Usar fontes do diretorio `./canvas-fonts`
|
|
73
|
+
|
|
74
|
+
### Qualidade
|
|
75
|
+
- Parecer que levou incontaveis horas para criar
|
|
76
|
+
- Alguem no topo absoluto da sua area
|
|
77
|
+
- Cuidado meticuloso em cada detalhe
|
|
78
|
+
- Nada sobrepoe, formatacao impecavel
|
|
79
|
+
|
|
80
|
+
## Output
|
|
81
|
+
|
|
82
|
+
- Arquivo .md com a filosofia de design
|
|
83
|
+
- Arquivo .pdf ou .png com o canvas final
|
|
84
|
+
|
|
85
|
+
## Segunda Passagem (Refinamento)
|
|
86
|
+
|
|
87
|
+
**CRITICO**: Ao refinar:
|
|
88
|
+
- NAO adicionar mais graficos
|
|
89
|
+
- Refinar o que ja foi criado
|
|
90
|
+
- Tornar extremamente crisp
|
|
91
|
+
- Respeitar filosofia de design
|
|
92
|
+
- Respeitar principios de minimalismo
|
|
93
|
+
|
|
94
|
+
## Multi-Paginas
|
|
95
|
+
|
|
96
|
+
Quando solicitado multiplas paginas:
|
|
97
|
+
- Criar paginas criativas na mesma linha da filosofia
|
|
98
|
+
- Cada pagina distintamente diferente
|
|
99
|
+
- Bundlar no mesmo .pdf ou multiplos .pngs
|
|
100
|
+
- Tratar como um livro de mesa de cafe
|
|
101
|
+
- Paginas como twists e memorias do original
|
|
102
|
+
|
|
103
|
+
## Tasks Relacionadas
|
|
104
|
+
- task:criar-poster
|
|
105
|
+
- task:criar-arte-visual
|
|
106
|
+
- task:design-grafico
|
|
107
|
+
|
|
108
|
+
## Workflows
|
|
109
|
+
- workflow:criacao-material-visual
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Skill: /frontend-design
|
|
2
|
+
|
|
3
|
+
## Metadata
|
|
4
|
+
- **Nome**: Frontend Design
|
|
5
|
+
- **Comando**: /frontend-design
|
|
6
|
+
- **Agente**: @dev
|
|
7
|
+
- **Categoria**: design
|
|
8
|
+
- **Versao**: 2.0
|
|
9
|
+
|
|
10
|
+
## Descricao
|
|
11
|
+
Criar interfaces frontend distintivas e production-grade com alta qualidade de design. Gera codigo criativo e polido que evita estetica generica de IA.
|
|
12
|
+
|
|
13
|
+
## Quando Usar
|
|
14
|
+
- Construir componentes web
|
|
15
|
+
- Criar landing pages
|
|
16
|
+
- Desenvolver dashboards
|
|
17
|
+
- Criar componentes React
|
|
18
|
+
- Estilizar/embelezar qualquer UI web
|
|
19
|
+
|
|
20
|
+
## Design Thinking
|
|
21
|
+
|
|
22
|
+
Antes de codar, entender contexto e comprometer-se com direcao estetica BOLD:
|
|
23
|
+
|
|
24
|
+
### Proposito
|
|
25
|
+
O que este interface resolve? Quem usa?
|
|
26
|
+
|
|
27
|
+
### Tom (Escolher um extremo)
|
|
28
|
+
- Brutalmente minimal
|
|
29
|
+
- Maximalismo caotico
|
|
30
|
+
- Retro-futurista
|
|
31
|
+
- Organico/natural
|
|
32
|
+
- Luxo/refinado
|
|
33
|
+
- Playful/toy-like
|
|
34
|
+
- Editorial/magazine
|
|
35
|
+
- Brutalista/raw
|
|
36
|
+
- Art deco/geometrico
|
|
37
|
+
- Soft/pastel
|
|
38
|
+
- Industrial/utilitario
|
|
39
|
+
|
|
40
|
+
### Diferenciacao
|
|
41
|
+
O que torna isso INESQUECIVEL? Qual e a coisa que alguem vai lembrar?
|
|
42
|
+
|
|
43
|
+
## Diretrizes Esteticas
|
|
44
|
+
|
|
45
|
+
### Tipografia
|
|
46
|
+
- Escolher fontes BONITAS, UNICAS e INTERESSANTES
|
|
47
|
+
- EVITAR: Arial, Inter, Roboto, system fonts
|
|
48
|
+
- PREFERIR: Fonts distintivos que elevam a estetica
|
|
49
|
+
- Parear display font com body font refinado
|
|
50
|
+
|
|
51
|
+
### Cor e Tema
|
|
52
|
+
- Comprometer-se com estetica coesa
|
|
53
|
+
- Usar CSS variables para consistencia
|
|
54
|
+
- Cores dominantes com acentos fortes > paletas timidas
|
|
55
|
+
|
|
56
|
+
### Motion
|
|
57
|
+
- Usar animacoes para efeitos e micro-interacoes
|
|
58
|
+
- Priorizar CSS-only para HTML
|
|
59
|
+
- Usar Motion library para React
|
|
60
|
+
- Focus em momentos de alto impacto: page load com staggered reveals
|
|
61
|
+
|
|
62
|
+
### Composicao Espacial
|
|
63
|
+
- Layouts inesperados
|
|
64
|
+
- Assimetria
|
|
65
|
+
- Overlap
|
|
66
|
+
- Flow diagonal
|
|
67
|
+
- Elementos que quebram o grid
|
|
68
|
+
- Negative space generoso OU densidade controlada
|
|
69
|
+
|
|
70
|
+
### Backgrounds e Detalhes Visuais
|
|
71
|
+
- Criar atmosfera e profundidade
|
|
72
|
+
- Gradient meshes
|
|
73
|
+
- Noise textures
|
|
74
|
+
- Geometric patterns
|
|
75
|
+
- Layered transparencies
|
|
76
|
+
- Dramatic shadows
|
|
77
|
+
- Custom cursors
|
|
78
|
+
- Grain overlays
|
|
79
|
+
|
|
80
|
+
## NUNCA Usar
|
|
81
|
+
|
|
82
|
+
- Familias de fonte overused (Inter, Roboto, Arial)
|
|
83
|
+
- Esquemas de cor cliche (purple gradients on white)
|
|
84
|
+
- Layouts previsiveis
|
|
85
|
+
- Design cookie-cutter sem carater
|
|
86
|
+
|
|
87
|
+
## Exemplo de Implementacao
|
|
88
|
+
|
|
89
|
+
```css
|
|
90
|
+
:root {
|
|
91
|
+
--bg-dark: #0a0a0b;
|
|
92
|
+
--accent: #ff6b35;
|
|
93
|
+
--text: #fafafa;
|
|
94
|
+
--gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
body {
|
|
98
|
+
background: var(--bg-dark);
|
|
99
|
+
background-image: url("data:image/svg+xml,..."); /* noise texture */
|
|
100
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
101
|
+
color: var(--text);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.hero {
|
|
105
|
+
display: grid;
|
|
106
|
+
grid-template-columns: 1fr 1.5fr;
|
|
107
|
+
gap: 4rem;
|
|
108
|
+
min-height: 100vh;
|
|
109
|
+
padding: 6rem;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.card {
|
|
113
|
+
background: rgba(255,255,255,0.03);
|
|
114
|
+
backdrop-filter: blur(10px);
|
|
115
|
+
border: 1px solid rgba(255,255,255,0.1);
|
|
116
|
+
border-radius: 16px;
|
|
117
|
+
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.card:hover {
|
|
121
|
+
transform: translateY(-4px);
|
|
122
|
+
box-shadow: 0 20px 40px rgba(0,0,0,0.3);
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Principios
|
|
127
|
+
|
|
128
|
+
1. **Intencionalidade**: Executar a visao com precisao
|
|
129
|
+
2. **Memorabilidade**: Criar algo que pessoas lembrem
|
|
130
|
+
3. **Coesao**: Ponto de vista estetico claro
|
|
131
|
+
4. **Refinamento**: Meticuloso em cada detalhe
|
|
132
|
+
|
|
133
|
+
## Tasks Relacionadas
|
|
134
|
+
- task:criar-landing-page
|
|
135
|
+
- task:design-dashboard
|
|
136
|
+
- task:estilizar-componente
|
|
137
|
+
|
|
138
|
+
## Workflows
|
|
139
|
+
- workflow:desenvolvimento-frontend
|
|
140
|
+
- workflow:criar-interface
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Skill: /mcp-builder
|
|
2
|
+
|
|
3
|
+
## Metadata
|
|
4
|
+
- **Nome**: MCP Server Builder
|
|
5
|
+
- **Comando**: /mcp-builder
|
|
6
|
+
- **Agente**: @dev
|
|
7
|
+
- **Categoria**: dev
|
|
8
|
+
- **Versao**: 2.0
|
|
9
|
+
|
|
10
|
+
## Descricao
|
|
11
|
+
Guia para criar servidores MCP (Model Context Protocol) de alta qualidade que permitem LLMs interagirem com servicos externos atraves de tools bem projetadas.
|
|
12
|
+
|
|
13
|
+
## Quando Usar
|
|
14
|
+
- Construir servidores MCP
|
|
15
|
+
- Integrar APIs externas
|
|
16
|
+
- Criar tools para LLMs
|
|
17
|
+
- Python (FastMCP) ou TypeScript (MCP SDK)
|
|
18
|
+
|
|
19
|
+
## Stack Recomendada
|
|
20
|
+
|
|
21
|
+
- **Linguagem**: TypeScript (melhor suporte SDK)
|
|
22
|
+
- **Transport**: Streamable HTTP para servidores remotos, stdio para locais
|
|
23
|
+
|
|
24
|
+
## Workflow de Alto Nivel
|
|
25
|
+
|
|
26
|
+
### Fase 1: Pesquisa e Planejamento
|
|
27
|
+
|
|
28
|
+
#### 1.1 Design MCP Moderno
|
|
29
|
+
- **API Coverage vs Workflow Tools**: Balancear cobertura de endpoints com tools de workflow
|
|
30
|
+
- **Naming**: Prefixos consistentes (`github_create_issue`, `github_list_repos`)
|
|
31
|
+
- **Contexto**: Retornar dados focados e relevantes
|
|
32
|
+
- **Erros**: Mensagens que guiam para solucoes
|
|
33
|
+
|
|
34
|
+
#### 1.2 Documentacao MCP
|
|
35
|
+
```
|
|
36
|
+
Sitemap: https://modelcontextprotocol.io/sitemap.xml
|
|
37
|
+
Paginas: https://modelcontextprotocol.io/specification/draft.md
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### 1.3 Documentacao SDK
|
|
41
|
+
- **TypeScript**: https://github.com/modelcontextprotocol/typescript-sdk
|
|
42
|
+
- **Python**: https://github.com/modelcontextprotocol/python-sdk
|
|
43
|
+
|
|
44
|
+
### Fase 2: Implementacao
|
|
45
|
+
|
|
46
|
+
#### 2.1 Estrutura do Projeto (TypeScript)
|
|
47
|
+
```
|
|
48
|
+
mcp-server/
|
|
49
|
+
├── src/
|
|
50
|
+
│ ├── index.ts # Entry point
|
|
51
|
+
│ ├── tools/ # Tools definitions
|
|
52
|
+
│ ├── resources/ # Resources
|
|
53
|
+
│ └── utils/ # Helpers
|
|
54
|
+
├── package.json
|
|
55
|
+
└── tsconfig.json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
#### 2.2 Infraestrutura Core
|
|
59
|
+
- Cliente API com autenticacao
|
|
60
|
+
- Helpers de error handling
|
|
61
|
+
- Formatacao de resposta (JSON/Markdown)
|
|
62
|
+
- Suporte a paginacao
|
|
63
|
+
|
|
64
|
+
#### 2.3 Implementar Tools
|
|
65
|
+
|
|
66
|
+
**Input Schema** (Zod para TypeScript, Pydantic para Python):
|
|
67
|
+
```typescript
|
|
68
|
+
const schema = z.object({
|
|
69
|
+
query: z.string().describe("Search query"),
|
|
70
|
+
limit: z.number().optional().default(10)
|
|
71
|
+
});
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Annotations**:
|
|
75
|
+
- `readOnlyHint`: true/false
|
|
76
|
+
- `destructiveHint`: true/false
|
|
77
|
+
- `idempotentHint`: true/false
|
|
78
|
+
|
|
79
|
+
### Fase 3: Review e Teste
|
|
80
|
+
|
|
81
|
+
#### 3.1 Qualidade de Codigo
|
|
82
|
+
- Sem codigo duplicado (DRY)
|
|
83
|
+
- Error handling consistente
|
|
84
|
+
- Cobertura de tipos completa
|
|
85
|
+
- Descricoes de tools claras
|
|
86
|
+
|
|
87
|
+
#### 3.2 Build e Teste
|
|
88
|
+
```bash
|
|
89
|
+
# TypeScript
|
|
90
|
+
npm run build
|
|
91
|
+
npx @modelcontextprotocol/inspector
|
|
92
|
+
|
|
93
|
+
# Python
|
|
94
|
+
python -m py_compile server.py
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Fase 4: Avaliacoes
|
|
98
|
+
|
|
99
|
+
Criar 10 perguntas de avaliacao:
|
|
100
|
+
- Independentes
|
|
101
|
+
- Read-only
|
|
102
|
+
- Complexas (multiplas tool calls)
|
|
103
|
+
- Realisticas
|
|
104
|
+
- Verificaveis
|
|
105
|
+
|
|
106
|
+
**Formato XML**:
|
|
107
|
+
```xml
|
|
108
|
+
<evaluation>
|
|
109
|
+
<qa_pair>
|
|
110
|
+
<question>Pergunta complexa aqui?</question>
|
|
111
|
+
<answer>Resposta verificavel</answer>
|
|
112
|
+
</qa_pair>
|
|
113
|
+
</evaluation>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Exemplo TypeScript
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
120
|
+
import { z } from "zod";
|
|
121
|
+
|
|
122
|
+
const server = new McpServer({
|
|
123
|
+
name: "my-mcp-server",
|
|
124
|
+
version: "1.0.0"
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
server.registerTool({
|
|
128
|
+
name: "search_items",
|
|
129
|
+
description: "Search for items by query",
|
|
130
|
+
inputSchema: z.object({
|
|
131
|
+
query: z.string(),
|
|
132
|
+
limit: z.number().optional()
|
|
133
|
+
}),
|
|
134
|
+
handler: async ({ query, limit = 10 }) => {
|
|
135
|
+
const results = await api.search(query, limit);
|
|
136
|
+
return {
|
|
137
|
+
content: [{ type: "text", text: JSON.stringify(results) }]
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Exemplo Python (FastMCP)
|
|
144
|
+
|
|
145
|
+
```python
|
|
146
|
+
from fastmcp import FastMCP
|
|
147
|
+
from pydantic import BaseModel
|
|
148
|
+
|
|
149
|
+
mcp = FastMCP("my-server")
|
|
150
|
+
|
|
151
|
+
class SearchInput(BaseModel):
|
|
152
|
+
query: str
|
|
153
|
+
limit: int = 10
|
|
154
|
+
|
|
155
|
+
@mcp.tool
|
|
156
|
+
async def search_items(input: SearchInput) -> str:
|
|
157
|
+
results = await api.search(input.query, input.limit)
|
|
158
|
+
return json.dumps(results)
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Recursos de Referencia
|
|
162
|
+
- `reference/mcp_best_practices.md` - Guidelines universais
|
|
163
|
+
- `reference/node_mcp_server.md` - Guia TypeScript
|
|
164
|
+
- `reference/python_mcp_server.md` - Guia Python
|
|
165
|
+
- `reference/evaluation.md` - Guia de avaliacoes
|
|
166
|
+
|
|
167
|
+
## Tasks Relacionadas
|
|
168
|
+
- task:criar-mcp-server
|
|
169
|
+
- task:integrar-api-externa
|
|
170
|
+
|
|
171
|
+
## Workflows
|
|
172
|
+
- workflow:desenvolvimento-integracao
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Skill: /webapp-testing
|
|
2
|
+
|
|
3
|
+
## Metadata
|
|
4
|
+
- **Nome**: Web Application Testing
|
|
5
|
+
- **Comando**: /webapp-testing
|
|
6
|
+
- **Agente**: @qa
|
|
7
|
+
- **Categoria**: dev
|
|
8
|
+
- **Versao**: 2.0
|
|
9
|
+
|
|
10
|
+
## Descricao
|
|
11
|
+
Toolkit para interagir e testar aplicacoes web locais usando Playwright. Suporta verificacao de funcionalidade frontend, debug de comportamento UI, capturas de tela e logs do browser.
|
|
12
|
+
|
|
13
|
+
## Quando Usar
|
|
14
|
+
- Testar aplicacoes web locais
|
|
15
|
+
- Verificar funcionalidade frontend
|
|
16
|
+
- Debugar comportamento de UI
|
|
17
|
+
- Capturar screenshots
|
|
18
|
+
- Ver logs do browser
|
|
19
|
+
|
|
20
|
+
## Scripts Helper
|
|
21
|
+
|
|
22
|
+
- `scripts/with_server.py` - Gerencia lifecycle do servidor
|
|
23
|
+
|
|
24
|
+
**Sempre rodar scripts com `--help` primeiro** para ver uso.
|
|
25
|
+
|
|
26
|
+
## Arvore de Decisao
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Tarefa → E HTML estatico?
|
|
30
|
+
├── Sim → Ler arquivo HTML para identificar selectors
|
|
31
|
+
│ ├── Sucesso → Escrever script Playwright
|
|
32
|
+
│ └── Falha → Tratar como dinamico
|
|
33
|
+
│
|
|
34
|
+
└── Nao (webapp dinamico) → Servidor ja rodando?
|
|
35
|
+
├── Nao → Rodar: python scripts/with_server.py --help
|
|
36
|
+
│ Usar helper + script Playwright simplificado
|
|
37
|
+
│
|
|
38
|
+
└── Sim → Reconhecimento-depois-acao:
|
|
39
|
+
1. Navegar e esperar networkidle
|
|
40
|
+
2. Screenshot ou inspecionar DOM
|
|
41
|
+
3. Identificar selectors do estado renderizado
|
|
42
|
+
4. Executar acoes com selectors descobertos
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Usando with_server.py
|
|
46
|
+
|
|
47
|
+
### Servidor Unico
|
|
48
|
+
```bash
|
|
49
|
+
python scripts/with_server.py --server "npm run dev" --port 5173 -- python automation.py
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Multiplos Servidores (backend + frontend)
|
|
53
|
+
```bash
|
|
54
|
+
python scripts/with_server.py \
|
|
55
|
+
--server "cd backend && python server.py" --port 3000 \
|
|
56
|
+
--server "cd frontend && npm run dev" --port 5173 \
|
|
57
|
+
-- python automation.py
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Script de Automacao
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
from playwright.sync_api import sync_playwright
|
|
64
|
+
|
|
65
|
+
with sync_playwright() as p:
|
|
66
|
+
browser = p.chromium.launch(headless=True) # Sempre headless
|
|
67
|
+
page = browser.new_page()
|
|
68
|
+
page.goto('http://localhost:5173')
|
|
69
|
+
page.wait_for_load_state('networkidle') # CRITICO: Esperar JS executar
|
|
70
|
+
|
|
71
|
+
# ... logica de automacao
|
|
72
|
+
|
|
73
|
+
browser.close()
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Padrao Reconhecimento-Depois-Acao
|
|
77
|
+
|
|
78
|
+
### 1. Inspecionar DOM renderizado
|
|
79
|
+
```python
|
|
80
|
+
page.screenshot(path='/tmp/inspect.png', full_page=True)
|
|
81
|
+
content = page.content()
|
|
82
|
+
page.locator('button').all()
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 2. Identificar selectors dos resultados
|
|
86
|
+
|
|
87
|
+
### 3. Executar acoes com selectors descobertos
|
|
88
|
+
|
|
89
|
+
## Armadilha Comum
|
|
90
|
+
|
|
91
|
+
**NAO** inspecionar DOM antes de esperar `networkidle` em apps dinamicos
|
|
92
|
+
|
|
93
|
+
**SIM** esperar `page.wait_for_load_state('networkidle')` antes de inspecao
|
|
94
|
+
|
|
95
|
+
## Best Practices
|
|
96
|
+
|
|
97
|
+
- Usar scripts bundled como caixas pretas
|
|
98
|
+
- Usar `sync_playwright()` para scripts sincronos
|
|
99
|
+
- Sempre fechar browser quando terminar
|
|
100
|
+
- Usar selectors descritivos: `text=`, `role=`, CSS, IDs
|
|
101
|
+
- Adicionar waits apropriados: `wait_for_selector()`, `wait_for_timeout()`
|
|
102
|
+
|
|
103
|
+
## Exemplos de Selectors
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
# Por texto
|
|
107
|
+
page.click('text=Submit')
|
|
108
|
+
|
|
109
|
+
# Por role
|
|
110
|
+
page.get_by_role('button', name='Submit').click()
|
|
111
|
+
|
|
112
|
+
# Por CSS
|
|
113
|
+
page.click('.btn-primary')
|
|
114
|
+
page.click('#submit-button')
|
|
115
|
+
|
|
116
|
+
# Por data-testid
|
|
117
|
+
page.click('[data-testid="submit-btn"]')
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Capturando Logs do Console
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
page.on('console', lambda msg: print(f"Console: {msg.text}"))
|
|
124
|
+
page.goto('http://localhost:5173')
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Screenshots
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
# Pagina inteira
|
|
131
|
+
page.screenshot(path='screenshot.png', full_page=True)
|
|
132
|
+
|
|
133
|
+
# Elemento especifico
|
|
134
|
+
page.locator('.card').screenshot(path='card.png')
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Arquivos de Referencia
|
|
138
|
+
|
|
139
|
+
- `examples/element_discovery.py` - Descobrir botoes, links, inputs
|
|
140
|
+
- `examples/static_html_automation.py` - Usar file:// URLs
|
|
141
|
+
- `examples/console_logging.py` - Capturar logs do console
|
|
142
|
+
|
|
143
|
+
## Tasks Relacionadas
|
|
144
|
+
- task:testar-frontend
|
|
145
|
+
- task:automacao-e2e
|
|
146
|
+
- task:debug-ui
|
|
147
|
+
|
|
148
|
+
## Workflows
|
|
149
|
+
- workflow:qa-automatizado
|
|
150
|
+
- workflow:validacao-frontend
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Skill: /docx
|
|
2
|
+
|
|
3
|
+
## Metadata
|
|
4
|
+
- **Nome**: Word Document Processing
|
|
5
|
+
- **Comando**: /docx
|
|
6
|
+
- **Agente**: @dev
|
|
7
|
+
- **Categoria**: documents
|
|
8
|
+
- **Versao**: 2.0
|
|
9
|
+
|
|
10
|
+
## Descricao
|
|
11
|
+
Criacao, edicao e analise de documentos Word com suporte a tracked changes, comentarios, formatacao e extracao de texto.
|
|
12
|
+
|
|
13
|
+
## Quando Usar
|
|
14
|
+
- Criar novos documentos Word
|
|
15
|
+
- Modificar/editar conteudo
|
|
16
|
+
- Trabalhar com tracked changes
|
|
17
|
+
- Adicionar comentarios
|
|
18
|
+
- Extrair texto de documentos
|
|
19
|
+
|
|
20
|
+
## Arvore de Decisao
|
|
21
|
+
|
|
22
|
+
### Ler/Analisar
|
|
23
|
+
→ Usar "Extracao de texto" ou "Acesso XML raw"
|
|
24
|
+
|
|
25
|
+
### Criar Novo Documento
|
|
26
|
+
→ Usar **docx-js** (JavaScript)
|
|
27
|
+
|
|
28
|
+
### Editar Documento Existente
|
|
29
|
+
- Documento proprio + mudancas simples → "Edicao OOXML basica"
|
|
30
|
+
- Documento de terceiros → **Workflow de Redlining**
|
|
31
|
+
- Docs juridicos/academicos/empresariais → **Workflow de Redlining**
|
|
32
|
+
|
|
33
|
+
## Extracao de Texto
|
|
34
|
+
```bash
|
|
35
|
+
# Converter para markdown com tracked changes
|
|
36
|
+
pandoc --track-changes=all documento.docx -o output.md
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Acesso XML Raw
|
|
40
|
+
|
|
41
|
+
### Desempacotar arquivo
|
|
42
|
+
```bash
|
|
43
|
+
python ooxml/scripts/unpack.py <arquivo.docx> <diretorio>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Estrutura de arquivos
|
|
47
|
+
- `word/document.xml` - Conteudo principal
|
|
48
|
+
- `word/comments.xml` - Comentarios
|
|
49
|
+
- `word/media/` - Imagens e midia
|
|
50
|
+
- Tracked changes: `<w:ins>` (insercoes) e `<w:del>` (delecoes)
|
|
51
|
+
|
|
52
|
+
## Criar Novo Documento (docx-js)
|
|
53
|
+
|
|
54
|
+
```javascript
|
|
55
|
+
import { Document, Paragraph, TextRun, Packer } from 'docx';
|
|
56
|
+
|
|
57
|
+
const doc = new Document({
|
|
58
|
+
sections: [{
|
|
59
|
+
properties: {},
|
|
60
|
+
children: [
|
|
61
|
+
new Paragraph({
|
|
62
|
+
children: [
|
|
63
|
+
new TextRun({ text: "Titulo", bold: true, size: 32 }),
|
|
64
|
+
],
|
|
65
|
+
}),
|
|
66
|
+
new Paragraph({
|
|
67
|
+
children: [
|
|
68
|
+
new TextRun("Conteudo do documento..."),
|
|
69
|
+
],
|
|
70
|
+
}),
|
|
71
|
+
],
|
|
72
|
+
}],
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// Exportar
|
|
76
|
+
const buffer = await Packer.toBuffer(doc);
|
|
77
|
+
fs.writeFileSync("documento.docx", buffer);
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Workflow de Redlining
|
|
81
|
+
|
|
82
|
+
### 1. Obter markdown
|
|
83
|
+
```bash
|
|
84
|
+
pandoc --track-changes=all arquivo.docx -o atual.md
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 2. Identificar mudancas
|
|
88
|
+
- Agrupar em batches de 3-10 mudancas
|
|
89
|
+
- Metodos de localizacao: secao/heading, paragrafos numerados, grep patterns
|
|
90
|
+
|
|
91
|
+
### 3. Ler documentacao e desempacotar
|
|
92
|
+
```bash
|
|
93
|
+
python ooxml/scripts/unpack.py arquivo.docx diretorio
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 4. Implementar mudancas em batches
|
|
97
|
+
Usar `get_node` para encontrar nos, implementar mudancas, `doc.save()`
|
|
98
|
+
|
|
99
|
+
### 5. Reempacotar
|
|
100
|
+
```bash
|
|
101
|
+
python ooxml/scripts/pack.py diretorio documento-revisado.docx
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 6. Verificacao final
|
|
105
|
+
```bash
|
|
106
|
+
pandoc --track-changes=all documento-revisado.docx -o verificacao.md
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Principio: Edicoes Minimas e Precisas
|
|
110
|
+
|
|
111
|
+
### ERRADO - Substitui sentenca inteira
|
|
112
|
+
```xml
|
|
113
|
+
<w:del><w:delText>O prazo e 30 dias.</w:delText></w:del>
|
|
114
|
+
<w:ins><w:t>O prazo e 60 dias.</w:t></w:ins>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### CORRETO - Marca apenas o que mudou
|
|
118
|
+
```xml
|
|
119
|
+
<w:r><w:t>O prazo e </w:t></w:r>
|
|
120
|
+
<w:del><w:delText>30</w:delText></w:del>
|
|
121
|
+
<w:ins><w:t>60</w:t></w:ins>
|
|
122
|
+
<w:r><w:t> dias.</w:t></w:r>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Converter para Imagens
|
|
126
|
+
```bash
|
|
127
|
+
# DOCX → PDF
|
|
128
|
+
soffice --headless --convert-to pdf documento.docx
|
|
129
|
+
|
|
130
|
+
# PDF → JPEG
|
|
131
|
+
pdftoppm -jpeg -r 150 documento.pdf pagina
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Dependencias
|
|
135
|
+
```bash
|
|
136
|
+
# Python
|
|
137
|
+
pip install defusedxml
|
|
138
|
+
|
|
139
|
+
# Node
|
|
140
|
+
npm install docx
|
|
141
|
+
|
|
142
|
+
# Sistema
|
|
143
|
+
sudo apt-get install pandoc libreoffice poppler-utils
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Tasks Relacionadas
|
|
147
|
+
- task:criar-contrato
|
|
148
|
+
- task:revisar-documento
|
|
149
|
+
- task:gerar-relatorio-word
|
|
150
|
+
|
|
151
|
+
## Workflows
|
|
152
|
+
- workflow:revisao-documentos
|
|
153
|
+
- workflow:geracao-contratos
|