gohorsejobs/docs/context/AGENT.md

21 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# GoHorseJobs - AI Engineering Standards
## 📱 Mobile-First Obsession (Frontend)
1. **Padrão de Layout**: Todas as páginas devem ser desenvolvidas para mobile (`width < 640px`) primeiro.
2. **Componentes**: Use o design system ¡ definido. Ã proibido duplicar componentes de "Card de Vaga".
3. **Imagens**: Sempre use o componente `next/image` com `sizes` definido para evitar layouts que "pulam".
## 🧪 Estratégia de Testes
1. **Scraper (Python/Playwright)**: Cada novo site de vagas deve ter um teste de "extração simulada" para garantir que o seletor CSS ainda funciona.
2. **E2E (Playwright)**: Fluxos críticos (Candidatar-se a vaga, Login de Empresa) devem ser testados via Playwright E2E na VPS.
3. **Integration**: Testar a persistência do banco via Postgres diretamente.
## ðŸ ï¸<C3AF> Regras de Código (Go)
- Use **Context** em todas as chamadas de banco e serviços externos.
- Erros devem ser "embrulhados" com contexto: `fmt.Errorf("falha ao salvar vaga: %w", err)`.
## ?? Gestão de Credenciais
- **Prioridade**: O sistema DEVE ler credenciais da tabela 'external_services_credentials' no banco de dados.
- **Fallback**: Variáveis de ambiente (.env) são apenas para bootstrap e desenvolvimento inicial.
- **Serviços Ativos**: Stripe (Pagamentos), CloudAMQP (Mensageria), Appwrite (Chat), Civo (Storage).