aprimoração de ia
This commit is contained in:
parent
1177e31e56
commit
4a9f5f70ff
109 changed files with 8835 additions and 55 deletions
88
agents/deploy/skills/diagnosticar-saude-deploy/SKILL.md
Normal file
88
agents/deploy/skills/diagnosticar-saude-deploy/SKILL.md
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
---
|
||||
name: diagnosticar-saude-deploy
|
||||
description: >
|
||||
Diagnóstico de saúde de deploy e infraestrutura: containers, variáveis
|
||||
de ambiente, healthchecks, logs e estado dos serviços.
|
||||
scope: local
|
||||
---
|
||||
|
||||
# Skill: Diagnosticar Saúde de Deploy
|
||||
|
||||
## Objetivo
|
||||
|
||||
Avaliar o estado de saúde da infraestrutura e pipelines de deploy antes de aplicar mudanças.
|
||||
|
||||
## Etapas
|
||||
|
||||
### 1. Verificar Estado dos Containers
|
||||
|
||||
```sh
|
||||
# Listar containers ativos
|
||||
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
|
||||
|
||||
# Verificar logs recentes de erro
|
||||
docker logs --tail 50 <container> 2>&1 | grep -i "error\|fatal\|exception\|fail"
|
||||
|
||||
# Verificar uso de recursos
|
||||
docker stats --no-stream
|
||||
```
|
||||
|
||||
### 2. Verificar Variáveis de Ambiente
|
||||
|
||||
```sh
|
||||
# Listar variáveis esperadas (schemas Zod de ambiente)
|
||||
rg "z\.Ambiente\|process\.env\." --include='*.ts' <modulo>-back/src/ -n
|
||||
|
||||
# Verificar se há variáveis sem default ou validação
|
||||
rg "process\.env\." --include='*.ts' <modulo>-back/src/ -n | grep -v "z\.\|zod\|Ambiente"
|
||||
```
|
||||
|
||||
### 3. Verificar Healthchecks
|
||||
|
||||
```sh
|
||||
# Verificar endpoints de health
|
||||
rg "health\|alive\|ready" --include='*.ts' <modulo>-back/src/ -n
|
||||
|
||||
# Verificar healthcheck no Docker
|
||||
rg "HEALTHCHECK" Dockerfile* docker-compose* -n
|
||||
```
|
||||
|
||||
### 4. Verificar Build
|
||||
|
||||
```sh
|
||||
# Testar build completo
|
||||
pnpm build 2>&1 | tail -20
|
||||
|
||||
# Verificar migrations pendentes
|
||||
rg "migration\|migrate" --include='*.ts' <modulo>-migracao/src/ -l
|
||||
```
|
||||
|
||||
### 5. Gerar Relatório
|
||||
|
||||
```markdown
|
||||
# Diagnóstico de Deploy — [nome do módulo]
|
||||
|
||||
## Resumo
|
||||
- **Containers:** N ativos / N esperados
|
||||
- **Healthchecks:** N configurados
|
||||
- **Variáveis de ambiente:** N validadas / N sem validação
|
||||
- **Build:** ✅ OK | ❌ Falha
|
||||
|
||||
## Problemas Detectados
|
||||
|
||||
### 🔴 Crítico
|
||||
| Área | Problema | Impacto | Ação |
|
||||
|------|----------|---------|------|
|
||||
|
||||
### 🟡 Moderado
|
||||
| Área | Problema | Impacto | Ação |
|
||||
|------|----------|---------|------|
|
||||
|
||||
## Plano de Ação
|
||||
1. ...
|
||||
```
|
||||
|
||||
## Referências
|
||||
|
||||
- Rule: `global/rules/diagnostico-antes-correcao`
|
||||
- Skill: `global/skills/diagnosticar-antes-corrigir/SKILL`
|
||||
Loading…
Add table
Add a link
Reference in a new issue