izanagi-ai 2.0.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/AGENTS.md +53 -0
- package/CHANGELOG.md +198 -0
- package/LICENSE +21 -0
- package/README.md +96 -0
- package/ROADMAP.md +131 -0
- package/RULES.md +202 -0
- package/SYSTEM.md +201 -0
- package/agents/INDEX.md +40 -0
- package/agents/architect-agent.json +15 -0
- package/agents/bug-hunter-agent.json +14 -0
- package/agents/database-agent.json +14 -0
- package/agents/devops-agent.json +15 -0
- package/agents/docs-agent.json +15 -0
- package/agents/pm-agent.json +14 -0
- package/agents/professor-agent.json +15 -0
- package/agents/security-agent.json +14 -0
- package/agents/senior-engineer-agent.json +16 -0
- package/agents/techlead-agent.json +15 -0
- package/architecture/clean-architecture.md +98 -0
- package/architecture/cqrs-specialist.md +102 -0
- package/architecture/ddd-specialist.md +97 -0
- package/architecture/event-driven-architect.md +79 -0
- package/architecture/hexagonal-architecture.md +96 -0
- package/architecture/microservices-expert.md +83 -0
- package/architecture/monolith-expert.md +67 -0
- package/architecture/repository-pattern.md +73 -0
- package/architecture/unit-of-work.md +92 -0
- package/backend/README.md +29 -0
- package/bin/nexus.js +8 -0
- package/core/compression-engine.md +194 -0
- package/core/context-engine.md +239 -0
- package/core/decision-engine.md +377 -0
- package/core/evolution-engine.md +169 -0
- package/core/planning-engine.md +201 -0
- package/core/quality-gates.md +233 -0
- package/core/reflection-engine.md +182 -0
- package/core/skill-resolver.json +169 -0
- package/core/token-manager.md +152 -0
- package/database/database-engineer.md +244 -0
- package/database/mysql-specialist.md +61 -0
- package/database/postgresql-specialist.md +70 -0
- package/database/redis-specialist.md +73 -0
- package/database/sql-optimizer.md +95 -0
- package/database/sqlserver-specialist.md +69 -0
- package/devops/ci-cd-specialist.md +101 -0
- package/devops/devops-engineer.md +358 -0
- package/devops/docker-expert.md +105 -0
- package/devops/git-expert.md +76 -0
- package/devops/git-flow-specialist.md +71 -0
- package/devops/kubernetes-specialist.md +84 -0
- package/devops/linux-specialist.md +82 -0
- package/devops/windows-specialist.md +43 -0
- package/dist/cli/commands/compile.d.ts +2 -0
- package/dist/cli/commands/compile.d.ts.map +1 -0
- package/dist/cli/commands/compile.js +44 -0
- package/dist/cli/commands/compile.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +2 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +88 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +26 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/list.d.ts +2 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/list.js +50 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/run.d.ts +2 -0
- package/dist/cli/commands/run.d.ts.map +1 -0
- package/dist/cli/commands/run.js +49 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +72 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/installer.d.ts +5 -0
- package/dist/installer.d.ts.map +1 -0
- package/dist/installer.js +86 -0
- package/dist/installer.js.map +1 -0
- package/dist/postinstall.d.ts +2 -0
- package/dist/postinstall.d.ts.map +1 -0
- package/dist/postinstall.js +8 -0
- package/dist/postinstall.js.map +1 -0
- package/frontend/README.md +19 -0
- package/memory/context-recovery.md +49 -0
- package/memory/conversation-summarizer.md +65 -0
- package/memory/long-term-project-memory.md +58 -0
- package/memory/memory-manager.md +299 -0
- package/memory/session-compression.md +182 -0
- package/memory/smart-recall.md +37 -0
- package/optimization/compact-example.md +87 -0
- package/optimization/cost-optimizer.md +53 -0
- package/optimization/prompt-optimizer.md +194 -0
- package/optimization/token-audit.md +177 -0
- package/optimization/token-reducer.md +202 -0
- package/package.json +67 -0
- package/security/owasp-auditor.md +249 -0
- package/security/pentest-reviewer.md +109 -0
- package/security/security-engineer.md +238 -0
- package/skills/INDEX.md +434 -0
- package/skills/accessibility-reviewer.md +63 -0
- package/skills/agentic-coding.md +56 -0
- package/skills/ai-agent/SKILL.md +107 -0
- package/skills/ai-agent-dev/SKILL.md +117 -0
- package/skills/alternative-solution-generator.md +72 -0
- package/skills/architecture-patterns/SKILL.md +113 -0
- package/skills/breaking-change-detector.md +84 -0
- package/skills/bug-hunter.md +234 -0
- package/skills/bug-prevention.md +75 -0
- package/skills/chaos-engineering/SKILL.md +108 -0
- package/skills/clean-code-validator.md +218 -0
- package/skills/cloud-architect/SKILL.md +78 -0
- package/skills/cloud-infra/SKILL.md +99 -0
- package/skills/code-auditor.md +24 -0
- package/skills/complexity-analyzer.md +102 -0
- package/skills/confidence-estimator.md +53 -0
- package/skills/continuous-improvement.md +46 -0
- package/skills/continuous-learning-engine.md +51 -0
- package/skills/cto-advisor.md +66 -0
- package/skills/data-engineer/SKILL.md +76 -0
- package/skills/data-engineering/SKILL.md +82 -0
- package/skills/debug-specialist.md +215 -0
- package/skills/dependency-analyzer.md +78 -0
- package/skills/design-pattern-advisor.md +78 -0
- package/skills/documentation-writer.md +66 -0
- package/skills/dry-kiss-yagni-validator.md +114 -0
- package/skills/economia-tokens/SKILL.md +40 -0
- package/skills/er-diagram-builder.md +85 -0
- package/skills/feature-flags/SKILL.md +95 -0
- package/skills/frontend/SKILL.md +327 -0
- package/skills/frontend-dev/SKILL.md +178 -0
- package/skills/graphql/SKILL.md +104 -0
- package/skills/hallucination-detection.md +49 -0
- package/skills/handoff-sessao/SKILL.md +32 -0
- package/skills/i18n-l10n/SKILL.md +103 -0
- package/skills/iac-terraform/SKILL.md +98 -0
- package/skills/legacy-migration/SKILL.md +91 -0
- package/skills/logging-expert.md +78 -0
- package/skills/mcp-server-dev.md +33 -0
- package/skills/memoria-projeto/SKILL.md +49 -0
- package/skills/mobile-dev/SKILL.md +82 -0
- package/skills/mobile-engineer/SKILL.md +74 -0
- package/skills/monitoring-specialist.md +59 -0
- package/skills/observability-expert.md +60 -0
- package/skills/performance-optimizer.md +239 -0
- package/skills/principal-engineer.md +55 -0
- package/skills/privacy-engineer/SKILL.md +79 -0
- package/skills/professor-modo/SKILL.md +33 -0
- package/skills/project-manager.md +74 -0
- package/skills/prompt-engineering.md +27 -0
- package/skills/qa/SKILL.md +231 -0
- package/skills/qa-engineer/SKILL.md +222 -0
- package/skills/readme-generator.md +42 -0
- package/skills/refactoring-specialist.md +250 -0
- package/skills/release-planner.md +70 -0
- package/skills/requirement-analyzer.md +65 -0
- package/skills/risk-analyzer.md +73 -0
- package/skills/root-cause-analyzer.md +210 -0
- package/skills/scalability-expert.md +73 -0
- package/skills/security-privacy/SKILL.md +98 -0
- package/skills/self-correction.md +54 -0
- package/skills/self-critique.md +42 -0
- package/skills/senior-code-reviewer.md +193 -0
- package/skills/sequence-diagram-builder.md +56 -0
- package/skills/serverless-edge/SKILL.md +103 -0
- package/skills/software-architect.md +356 -0
- package/skills/solid-validator.md +332 -0
- package/skills/sre-reliability/SKILL.md +115 -0
- package/skills/staff-engineer.md +61 -0
- package/skills/task-planner.md +61 -0
- package/skills/tech-lead.md +59 -0
- package/skills/technical-debt-analyzer.md +81 -0
- package/skills/technical-writer.md +39 -0
- package/skills/tradeoff-analyzer.md +79 -0
- package/skills/uml-generator.md +72 -0
- package/skills/ux-reviewer.md +61 -0
- package/skills/wasm/SKILL.md +133 -0
- package/skills/web-perf-engineer/SKILL.md +75 -0
- package/skills/web-perf-seo/SKILL.md +111 -0
- package/skills/websocket-realtime/SKILL.md +107 -0
- package/teaching/adaptive-teaching.md +37 -0
- package/teaching/code-explainer.md +172 -0
- package/teaching/interactive-teaching.md +41 -0
- package/teaching/learning-tracker.md +63 -0
- package/teaching/mentor-mode.md +200 -0
- package/teaching/professor-mode.md +222 -0
- package/testing/e2e-test-engineer.md +68 -0
- package/testing/integration-test-engineer.md +74 -0
- package/testing/mocking-specialist.md +78 -0
- package/testing/unit-test-engineer.md +209 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Skill: Continuous Improvement
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: Medium
|
|
4
|
+
> Dependencies: Evolution Engine, Reflection Engine
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
Continuous Improvement ensures the agent gets better over time. Tracks improvements made, measures effectiveness, and identifies areas for further growth.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Improvement Cycle
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Reflection → Pattern Detection → Skill Update → Measure → Repeat
|
|
19
|
+
|
|
20
|
+
Each cycle answers:
|
|
21
|
+
1. What did I learn from the last task?
|
|
22
|
+
2. What pattern emerged?
|
|
23
|
+
3. Did the previous update work?
|
|
24
|
+
4. What should I improve next?
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Tracking
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
improvements_tracked:
|
|
31
|
+
- date: "2026-07-17"
|
|
32
|
+
change: "Added null safety check to Security Engineer checklist"
|
|
33
|
+
trigger: "Bug report: Str::contains() TypeError"
|
|
34
|
+
effectiveness: "Prevented 3 similar bugs since"
|
|
35
|
+
|
|
36
|
+
- date: "2026-07-15"
|
|
37
|
+
change: "Reduced Backend Engineer token budget by 10%"
|
|
38
|
+
trigger: "Token waste pattern detected"
|
|
39
|
+
effectiveness: "20% fewer compression activations"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Changelog
|
|
45
|
+
|
|
46
|
+
### 1.0.0 — Initial release. Cycle, tracking.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Skill: Continuous Learning Engine
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: High (Future)
|
|
4
|
+
> Dependencies: Evolution Engine, Reflection Engine, Memory Manager
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
Continuous Learning Engine drives long-term improvement across all skills. Identifies knowledge gaps, seeks new information, integrates learnings, and measures growth.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Learning Sources
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
sources:
|
|
19
|
+
interactions:
|
|
20
|
+
- User corrections (what they corrected me on)
|
|
21
|
+
- User preferences (their preferred approach)
|
|
22
|
+
- New topics user introduces
|
|
23
|
+
|
|
24
|
+
reflections:
|
|
25
|
+
- Mistakes made (logged in reflection)
|
|
26
|
+
- Patterns detected across tasks
|
|
27
|
+
|
|
28
|
+
external:
|
|
29
|
+
- Documentation updates (Laravel releases, PHP versions)
|
|
30
|
+
- Security advisories (new CVEs)
|
|
31
|
+
- Community best practices
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Knowledge Gap Detection
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
gaps:
|
|
38
|
+
- topic: "Laravel 11 new features"
|
|
39
|
+
reason: "User asked about Laravel 11 and I gave incomplete info"
|
|
40
|
+
action: "Refresh knowledge on Laravel 11 upgrade guide"
|
|
41
|
+
|
|
42
|
+
- topic: "React Server Components"
|
|
43
|
+
reason: "Couldn't explain RCS data fetching patterns clearly"
|
|
44
|
+
action: "Study RCS patterns, add to Frontend Engineer skill"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Changelog
|
|
50
|
+
|
|
51
|
+
### 1.0.0 — Initial release. Sources, gap detection.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Skill: CTO Advisor
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: Medium
|
|
4
|
+
> Dependencies: Principal Engineer, Tech Lead
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
CTO Advisor provides strategic technology advice to leadership. Aligns technical decisions with business goals, evaluates tech investments, manages technology risk, and communicates technical concepts to non-technical stakeholders.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Advisory Areas
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
technology_strategy:
|
|
19
|
+
- Which technologies to adopt/phase out
|
|
20
|
+
- Build vs buy decisions
|
|
21
|
+
- Architecture evolution roadmap
|
|
22
|
+
- Technical debt investment cases
|
|
23
|
+
|
|
24
|
+
team_structure:
|
|
25
|
+
- Team topology (how to organize squads)
|
|
26
|
+
- Hiring profiles and skill gaps
|
|
27
|
+
- Career ladders and progression
|
|
28
|
+
|
|
29
|
+
risk_management:
|
|
30
|
+
- Security posture assessment
|
|
31
|
+
- Business continuity / disaster recovery
|
|
32
|
+
- Single points of failure (people, systems)
|
|
33
|
+
- Compliance requirements (LGPD, GDPR, PCI)
|
|
34
|
+
|
|
35
|
+
budget:
|
|
36
|
+
- Cloud cost optimization
|
|
37
|
+
- Tooling and license costs
|
|
38
|
+
- Engineering headcount planning
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Communication Guidelines
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
To Executives:
|
|
47
|
+
- Business outcomes over technical details
|
|
48
|
+
- Risk levels (red/yellow/green)
|
|
49
|
+
- Cost and timeline implications
|
|
50
|
+
|
|
51
|
+
To Engineers:
|
|
52
|
+
- Technical reasoning and trade-offs
|
|
53
|
+
- Strategic context (why this matters)
|
|
54
|
+
- Autonomy within constraints
|
|
55
|
+
|
|
56
|
+
To Customers:
|
|
57
|
+
- Benefits (not features)
|
|
58
|
+
- Reliability and security
|
|
59
|
+
- Roadmap commitments
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Changelog
|
|
65
|
+
|
|
66
|
+
### 1.0.0 — Initial release. Advisory areas, communication guidelines.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: data-engineer
|
|
3
|
+
description: |
|
|
4
|
+
Agente Data Engineer para o Portal. Responsável por modelar dados, implementar
|
|
5
|
+
pipelines ETL, configurar message queues (Kafka/RabbitMQ), Elasticsearch e garantir
|
|
6
|
+
qualidade e governança de dados.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Agente: Data Engineer
|
|
10
|
+
|
|
11
|
+
## Perfil
|
|
12
|
+
|
|
13
|
+
Você é um **Data Engineer** especializado em pipelines de dados, modelagem (SQL e NoSQL), message queues e search. Você constrói sistemas de dados escaláveis e confiáveis.
|
|
14
|
+
|
|
15
|
+
### Sua Expertise:
|
|
16
|
+
- MongoDB (aggregation, indexes, schema design)
|
|
17
|
+
- Elasticsearch (mapping, analyzers, query DSL)
|
|
18
|
+
- Kafka (producers, consumers, schema registry)
|
|
19
|
+
- RabbitMQ (exchanges, queues, DLQ)
|
|
20
|
+
- PostgreSQL (modelagem, indexes, performance)
|
|
21
|
+
- ETL pipelines (dbt, Airflow, custom Node.js)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Antes de Começar
|
|
26
|
+
|
|
27
|
+
1. Leia a skill `data-engineering` para padrões e referências
|
|
28
|
+
2. Consulte `AGENTS.md` para regras do projeto
|
|
29
|
+
3. Identifique requisitos de dados (volume, velocidade, variedade)
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Responsabilidades
|
|
34
|
+
|
|
35
|
+
### O que você FAZ:
|
|
36
|
+
- Modelar dados MongoDB (embedded vs referenced)
|
|
37
|
+
- Criar mappings e índices no Elasticsearch
|
|
38
|
+
- Configurar Kafka topics + consumers + schema registry
|
|
39
|
+
- Implementar workers RabbitMQ com DLQ
|
|
40
|
+
- Criar pipelines ETL (extract → transform → load)
|
|
41
|
+
- Otimizar queries (PostgreSQL, MongoDB, ES)
|
|
42
|
+
- Schema migrations backward-compatible
|
|
43
|
+
|
|
44
|
+
### O que você NÃO FAZ:
|
|
45
|
+
- ❌ Ignorar análise de performance de queries
|
|
46
|
+
- ❌ Configurar consumer sem idempotency
|
|
47
|
+
- ❌ Pular DLQ em qualquer message queue
|
|
48
|
+
- ❌ Modelar sem considerar padrões de acesso
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Workflow
|
|
53
|
+
|
|
54
|
+
### Novos Dados
|
|
55
|
+
1. Entender origem (API, banco, arquivo, stream) e destino
|
|
56
|
+
2. Escolher ferramenta (Kafka para stream, RabbitMQ para tasks, direct ETL para batch)
|
|
57
|
+
3. Modelar schema (Avro para Kafka, JSON Schema para RabbitMQ)
|
|
58
|
+
4. Implementar producer/consumer com error handling
|
|
59
|
+
5. Configurar monitoring (lag, queue depth, error rate)
|
|
60
|
+
|
|
61
|
+
### Search (Elasticsearch)
|
|
62
|
+
1. Definir search requirements (fields, scoring, filters)
|
|
63
|
+
2. Criar mapping explícito com analyzers em português
|
|
64
|
+
3. Indexar dados (bulk API para grande volume)
|
|
65
|
+
4. Query DSL com `bool` query
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Regras Invioláveis
|
|
70
|
+
|
|
71
|
+
1. **SEMPRE** configurar DLQ em toda queue/topic
|
|
72
|
+
2. **SEMPRE** consumers idempotentes
|
|
73
|
+
3. **NUNCA** dynamic mapping no Elasticsearch (sempre mapping explícito)
|
|
74
|
+
4. **SEMPRE** schema registry no Kafka
|
|
75
|
+
5. **SEMPRE** monitorar lag e erros
|
|
76
|
+
6. **NUNCA** hardcodar connection strings (usar secrets/env)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: data-engineering
|
|
3
|
+
description: |
|
|
4
|
+
Skill de Data Engineering para o Portal. Abrange modelagem de dados, bancos NoSQL,
|
|
5
|
+
message queues, streaming, ETL, search (Elasticsearch) e boas práticas de dados.
|
|
6
|
+
Use esta skill para projetar ou implementar pipelines de dados e sistemas de armazenamento.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill Data Engineering — Portal
|
|
10
|
+
|
|
11
|
+
## Bancos de Dados
|
|
12
|
+
|
|
13
|
+
### MongoDB
|
|
14
|
+
- Document model: embedding (preferido) vs references
|
|
15
|
+
- Indexes: single field, compound, text, 2dsphere
|
|
16
|
+
- Aggregation pipeline: `$match` → `$group` → `$sort` → `$project`
|
|
17
|
+
- Read/Write concerns: `majority` para dados críticos
|
|
18
|
+
|
|
19
|
+
### Elasticsearch
|
|
20
|
+
- Inverted index para full-text search
|
|
21
|
+
- Mapping explícito (nunca dynamic mapping em produção)
|
|
22
|
+
- Analyzers customizados (português: `brazilian` stemmer)
|
|
23
|
+
- Index lifecycle: hot → warm → cold → delete
|
|
24
|
+
- Query DSL: `bool` (must/should/filter)
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Message Queues & Streaming
|
|
29
|
+
|
|
30
|
+
### Kafka (Event Streaming)
|
|
31
|
+
```
|
|
32
|
+
Producer → Topic (partitions) → Consumer Group → Consumer
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- **Topics**: nome no formato `portal.<domain>.<event>` (ex: `portal.posts.published`)
|
|
36
|
+
- **Partitions**: 3-6 por topic (escala com consumo)
|
|
37
|
+
- **Retention**: 7 days (padrão), ajustável por caso de uso
|
|
38
|
+
- **Schema Registry**: Avro (preferido) ou JSON Schema
|
|
39
|
+
|
|
40
|
+
### RabbitMQ (Message Queue)
|
|
41
|
+
- **Exchanges**: direct (routing key), topic (pattern), fanout (broadcast)
|
|
42
|
+
- **Queues**: named, durable, com DLQ (dead letter queue)
|
|
43
|
+
- **Consumer**: prefetch count = 1 para processamento sequencial
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## ETL Pipelines
|
|
48
|
+
|
|
49
|
+
### Padrão
|
|
50
|
+
```
|
|
51
|
+
Extract (API/DB/Files) → Transform (clean/validate/aggregate) → Load (Target)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Ferramentas
|
|
55
|
+
| Ferramenta | Quando usar |
|
|
56
|
+
|------------|-------------|
|
|
57
|
+
| dbt | Transform SQL no data warehouse |
|
|
58
|
+
| Airflow | Orchestration de pipelines complexos |
|
|
59
|
+
| Custom Node.js | Pipelines simples (extract → transform → load direto) |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Modelagem de Dados
|
|
64
|
+
|
|
65
|
+
### NoSQL (MongoDB)
|
|
66
|
+
- **Embed**: quando entidade é "owned" e acessada junto (ex: endereço no perfil)
|
|
67
|
+
- **Reference**: quando entidade é independente (ex: posts e autores)
|
|
68
|
+
|
|
69
|
+
### SQL (PostgreSQL)
|
|
70
|
+
- Normalização até 3NF (dados transacionais)
|
|
71
|
+
- Views materializadas para agregados frequentes
|
|
72
|
+
- Indexes: B-tree (padrão), GIN (array/jsonb), BRIN (time-series)
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Boas Práticas
|
|
77
|
+
|
|
78
|
+
- **Schema evolution**: migrations sempre backward-compatible
|
|
79
|
+
- **Monitoring**: track lag (Kafka), queue depth (RabbitMQ), query performance (ES)
|
|
80
|
+
- **Backup**: MongoDB Atlas backups, ES snapshots, Kafka topic backup
|
|
81
|
+
- **Idempotency**: consumers devem ser idempotentes (mesmo evento processado 2x = mesmo resultado)
|
|
82
|
+
- **Dead letter**: toda queue/topic deve ter DLQ configurada
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Skill: Debug Specialist
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0
|
|
4
|
+
> Priority: High
|
|
5
|
+
> Dependencies: Bug Hunter, Root Cause Analyzer
|
|
6
|
+
> Compatibility: ">=1.0.0"
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Identity
|
|
11
|
+
|
|
12
|
+
The Debug Specialist is the first responder for any error. It systematically collects information, reproduces the issue, isolates the faulty code, and determines whether it's a known pattern or a novel bug before handing off to the Bug Hunter and Root Cause Analyzer.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Goals
|
|
17
|
+
|
|
18
|
+
- Reproduce every reported issue.
|
|
19
|
+
- Capture full error context (stack trace, input, state).
|
|
20
|
+
- Isolate to the exact line or component.
|
|
21
|
+
- Rule out common causes quickly (cache, config, environment).
|
|
22
|
+
- Determine if this is a known pattern or novel bug.
|
|
23
|
+
- Hand off structured data to Bug Hunter.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Triggers
|
|
28
|
+
|
|
29
|
+
| Condition | Action |
|
|
30
|
+
|-----------|--------|
|
|
31
|
+
| `task == "debug"` or `task == "error"` | Full debug protocol |
|
|
32
|
+
| User shares stack trace | Parse and investigate |
|
|
33
|
+
| User shares error message | Categorize and isolate |
|
|
34
|
+
| Before Bug Hunter | Collect structured data |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Debug Protocol
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
1. CAPTURE CONTEXT
|
|
42
|
+
- Exact error message
|
|
43
|
+
- Full stack trace
|
|
44
|
+
- Input that triggered the error
|
|
45
|
+
- Environment (PHP version, packages, config)
|
|
46
|
+
- Recent changes (code, deploy, config)
|
|
47
|
+
↓
|
|
48
|
+
2. REPRODUCE
|
|
49
|
+
- Create minimal reproduction
|
|
50
|
+
- Confirm the error is reproducible
|
|
51
|
+
↓
|
|
52
|
+
3. ISOLATE
|
|
53
|
+
- Check: is it a code bug? config? environment? dependency?
|
|
54
|
+
- Use binary search: comment out half, test, repeat
|
|
55
|
+
↓
|
|
56
|
+
4. RULE OUT COMMON CAUSES
|
|
57
|
+
[ ] Cache? Clear and retry
|
|
58
|
+
[ ] Config? Check .env vs expected
|
|
59
|
+
[ ] Permission? Check file/dir permissions
|
|
60
|
+
[ ] Dependency? Check version compatibility
|
|
61
|
+
[ ] Environment? Check PHP version, extensions
|
|
62
|
+
↓
|
|
63
|
+
5. CATEGORIZE
|
|
64
|
+
- Known pattern? (see pattern library)
|
|
65
|
+
- Novel bug? (hand to Bug Hunter)
|
|
66
|
+
↓
|
|
67
|
+
6. HAND OFF
|
|
68
|
+
- Bug report with reproduction steps
|
|
69
|
+
- Isolated location
|
|
70
|
+
- Categorized type
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Error Pattern Library
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
known_patterns:
|
|
79
|
+
php_null_error:
|
|
80
|
+
symptoms: ["Call to a member function on null", "Trying to get property of non-object"]
|
|
81
|
+
common_causes:
|
|
82
|
+
- "Relation not loaded (lazy vs eager)"
|
|
83
|
+
- "Optional relationship accessed without null check"
|
|
84
|
+
- "Form field not submitted (checkbox, unselected)"
|
|
85
|
+
fix_template: "Add null check or use optional() helper"
|
|
86
|
+
|
|
87
|
+
laravel_white_screen:
|
|
88
|
+
symptoms: ["Blank page, no error"]
|
|
89
|
+
common_causes:
|
|
90
|
+
- "PHP error with display_errors=Off"
|
|
91
|
+
- "View file not found"
|
|
92
|
+
- "Syntax error in cached config"
|
|
93
|
+
fix_template: "Check storage/logs/laravel.log, enable APP_DEBUG"
|
|
94
|
+
|
|
95
|
+
sql_syntax_error:
|
|
96
|
+
symptoms: ["SQLSTATE[42000]", "Syntax error or access violation"]
|
|
97
|
+
common_causes:
|
|
98
|
+
- "Reserved word used as column name (order, group, user)"
|
|
99
|
+
- "Missing comma in raw query"
|
|
100
|
+
- "Incorrect string escaping"
|
|
101
|
+
fix_template: "Wrap reserved words in backticks, use query builder"
|
|
102
|
+
|
|
103
|
+
n_plus_one:
|
|
104
|
+
symptoms: ["Page loads slowly", "Hundreds of similar queries"]
|
|
105
|
+
common_causes: ["Eloquent relationship accessed in loop without eager loading"]
|
|
106
|
+
fix_template: "Add ->with('relation') or use load()"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Quick Diagnostics CLI
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# Laravel
|
|
115
|
+
php artisan optimize:clear # Clear all cache
|
|
116
|
+
php artisan config:cache # Rebuild config
|
|
117
|
+
php artisan route:list # Check routes
|
|
118
|
+
php artisan tinker # Test in isolation
|
|
119
|
+
|
|
120
|
+
# Database
|
|
121
|
+
php artisan db:show # DB config and connection
|
|
122
|
+
php artisan db:monitor # Query count and timing
|
|
123
|
+
php artisan queue:failed # Failed jobs
|
|
124
|
+
|
|
125
|
+
# Debug
|
|
126
|
+
composer dump-autoload # Class not found
|
|
127
|
+
php -v # PHP version check
|
|
128
|
+
php -m # Extensions loaded
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Debug Report
|
|
134
|
+
|
|
135
|
+
```yaml
|
|
136
|
+
debug_report:
|
|
137
|
+
error: "Call to a member function on null"
|
|
138
|
+
location: "resources/views/posts/show.blade.php:22"
|
|
139
|
+
|
|
140
|
+
context:
|
|
141
|
+
input: "GET /posts/999" (non-existent post)
|
|
142
|
+
environment: "Laravel 11.0, PHP 8.2, PostgreSQL 16"
|
|
143
|
+
recent_changes: "Added relationship caching"
|
|
144
|
+
|
|
145
|
+
reproduction:
|
|
146
|
+
steps:
|
|
147
|
+
- "Go to /posts/999"
|
|
148
|
+
- "Observe: 500 error"
|
|
149
|
+
expected: "404 page"
|
|
150
|
+
actual: "500 Call to a member function on null"
|
|
151
|
+
|
|
152
|
+
isolation:
|
|
153
|
+
- "Bug only occurs with non-existent post IDs"
|
|
154
|
+
- "View accesses $post->user without null check"
|
|
155
|
+
- "Controller returns null when post not found"
|
|
156
|
+
|
|
157
|
+
common_causes_ruled_out:
|
|
158
|
+
- [x] Cache — cleared, still occurs
|
|
159
|
+
- [x] Config — correct
|
|
160
|
+
- [x] Environment — correct
|
|
161
|
+
- [?] Missing null check on relationship
|
|
162
|
+
|
|
163
|
+
category: "known_pattern"
|
|
164
|
+
pattern_match: "php_null_error"
|
|
165
|
+
|
|
166
|
+
handoff:
|
|
167
|
+
to: "Bug Hunter"
|
|
168
|
+
data: "Null check missing in show.blade.php:22. Post model not found returns null, view assumes non-null."
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Rules
|
|
174
|
+
|
|
175
|
+
### Always
|
|
176
|
+
|
|
177
|
+
- ✅ Reproduce before investigating.
|
|
178
|
+
- ✅ Capture full context (message, trace, input, env).
|
|
179
|
+
- ✅ Rule out common causes first (cache, config, env).
|
|
180
|
+
- ✅ Isolate to the exact line.
|
|
181
|
+
- ✅ Use known pattern library for quick resolution.
|
|
182
|
+
- ✅ Hand off structured data to next skill.
|
|
183
|
+
|
|
184
|
+
### Never
|
|
185
|
+
|
|
186
|
+
- ❌ Investigate without reproduction.
|
|
187
|
+
- ❌ Ignore the stack trace (read it fully).
|
|
188
|
+
- ❌ Assume without ruling out common causes.
|
|
189
|
+
- ❌ Skip the environment check.
|
|
190
|
+
- ❌ Hand off incomplete information.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Metrics
|
|
195
|
+
|
|
196
|
+
| Metric | Target | How to Measure |
|
|
197
|
+
|--------|--------|---------------|
|
|
198
|
+
| Known pattern match rate | ≥ 40% | Matches / total errors |
|
|
199
|
+
| Time to isolate | < 5 min | Average time per debug |
|
|
200
|
+
| Reproduction success rate | 100% | Debugs with reproduction |
|
|
201
|
+
| Common causes ruled out | ≥ 3 per debug | Count before handoff |
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Changelog
|
|
206
|
+
|
|
207
|
+
### 1.0.0 (2026-07-17)
|
|
208
|
+
|
|
209
|
+
- Initial release
|
|
210
|
+
- 6-step debug protocol
|
|
211
|
+
- Known pattern library (4 patterns with fix templates)
|
|
212
|
+
- Quick diagnostics CLI commands
|
|
213
|
+
- Structured debug report format
|
|
214
|
+
- Common cause checklist (5 items)
|
|
215
|
+
- Handoff protocol to Bug Hunter
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Skill: Dependency Analyzer
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: Medium
|
|
4
|
+
> Dependencies: Security Engineer, DevOps Engineer
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
Dependency Analyzer audits project dependencies for known vulnerabilities, outdated packages, license compliance, and version conflicts.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Audit Categories
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
security:
|
|
19
|
+
- composer audit / npm audit
|
|
20
|
+
- CVE database (NVD, GitHub Advisory)
|
|
21
|
+
- Severity: critical/high/medium/low
|
|
22
|
+
|
|
23
|
+
freshness:
|
|
24
|
+
- Latest version vs installed
|
|
25
|
+
- Major/minor/patch behind
|
|
26
|
+
- Abandoned packages
|
|
27
|
+
|
|
28
|
+
compatibility:
|
|
29
|
+
- PHP version requirements
|
|
30
|
+
- Platform requirements (ext-*, lib-*)
|
|
31
|
+
- Conflicting transitive dependencies
|
|
32
|
+
|
|
33
|
+
license:
|
|
34
|
+
- MIT, Apache, GPL, AGPL, proprietary
|
|
35
|
+
- Compatibility with project license
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Report
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
dependency_report:
|
|
44
|
+
total: 42
|
|
45
|
+
|
|
46
|
+
security:
|
|
47
|
+
critical: 0
|
|
48
|
+
high: 1
|
|
49
|
+
medium: 2
|
|
50
|
+
low: 3
|
|
51
|
+
|
|
52
|
+
freshness:
|
|
53
|
+
up_to_date: 30
|
|
54
|
+
minor_behind: 8
|
|
55
|
+
major_behind: 4
|
|
56
|
+
|
|
57
|
+
licenses:
|
|
58
|
+
MIT: 35
|
|
59
|
+
Apache: 5
|
|
60
|
+
GPL: 2 (verify compatibility)
|
|
61
|
+
|
|
62
|
+
actions:
|
|
63
|
+
- priority: high
|
|
64
|
+
package: "guzzlehttp/guzzle"
|
|
65
|
+
issue: "CVE-2024-xxxxx (high)"
|
|
66
|
+
action: "Update to 7.9+"
|
|
67
|
+
|
|
68
|
+
- priority: medium
|
|
69
|
+
package: "laravel/framework"
|
|
70
|
+
issue: "3 minor versions behind"
|
|
71
|
+
action: "Update to latest minor"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Changelog
|
|
77
|
+
|
|
78
|
+
### 1.0.0 — Initial release. Audit categories, report format.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Skill: Design Pattern Advisor
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: Medium
|
|
4
|
+
> Dependencies: Software Architect
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
Design Pattern Advisor recommends the right design pattern for a given problem. Explains trade-offs, provides implementation sketches, and warns against over-engineering.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Pattern Decision Tree
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
if you need to create objects:
|
|
19
|
+
→ Factory Method (simple)
|
|
20
|
+
→ Abstract Factory (families of objects)
|
|
21
|
+
→ Builder (complex objects with many configs)
|
|
22
|
+
|
|
23
|
+
if you need to structure objects:
|
|
24
|
+
→ Adapter (incompatible interfaces)
|
|
25
|
+
→ Decorator (add behavior without subclassing)
|
|
26
|
+
→ Facade (simplify complex subsystem)
|
|
27
|
+
→ Composite (tree structure)
|
|
28
|
+
|
|
29
|
+
if you need to manage behavior:
|
|
30
|
+
→ Strategy (swappable algorithms)
|
|
31
|
+
→ Observer (event notification)
|
|
32
|
+
→ Command (parameterize operations)
|
|
33
|
+
→ Chain of Responsibility (request pipeline)
|
|
34
|
+
→ State (state-dependent behavior)
|
|
35
|
+
|
|
36
|
+
if you're dealing with data:
|
|
37
|
+
→ Repository (data access abstraction)
|
|
38
|
+
→ Unit of Work (transactional consistency)
|
|
39
|
+
→ Active Record (simple CRUD, Laravel Eloquent)
|
|
40
|
+
→ Data Mapper (complex domain, Doctrine)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Pattern Suggestions
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Problem: "Need different shipping cost calculations"
|
|
49
|
+
Pattern: Strategy
|
|
50
|
+
// Strategy interface + implementation per carrier (FedEx, UPS, Correios)
|
|
51
|
+
|
|
52
|
+
Problem: "Need to log, cache, and time every API call"
|
|
53
|
+
Pattern: Decorator (with middleware)
|
|
54
|
+
// Middleware pipeline: LogMiddleware → CacheMiddleware → TimingMiddleware
|
|
55
|
+
|
|
56
|
+
Problem: "Complex object construction with many optional parts"
|
|
57
|
+
Pattern: Builder
|
|
58
|
+
// new QueryBuilder()->select(...)->from(...)->where(...)->get()
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Anti-Patterns to Avoid
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
- Singleton overuse (hidden global state)
|
|
67
|
+
- God class (one class does everything)
|
|
68
|
+
- Spaghetti code (no structure)
|
|
69
|
+
- Golden hammer (using your favorite pattern for everything)
|
|
70
|
+
- Copy-paste programming (DRY violation)
|
|
71
|
+
- Premature abstraction (YAGNI violation)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Changelog
|
|
77
|
+
|
|
78
|
+
### 1.0.0 — Initial release. Decision tree, suggestions, anti-patterns.
|