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,66 @@
|
|
|
1
|
+
# Skill: Documentation Writer
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: Medium
|
|
4
|
+
> Dependencies: Technical Writer
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
Documentation Writer creates comprehensive project documentation: READMEs, API docs, setup guides, architecture docs, and contribution guidelines.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Documentation Types
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
README: "Project overview, quick start, badges, links"
|
|
19
|
+
API: "OpenAPI spec, endpoints, examples, auth"
|
|
20
|
+
setup: "Prerequisites, installation, configuration, development"
|
|
21
|
+
architecture: "Patterns, folder structure, key decisions (ADRs)"
|
|
22
|
+
contribution: "PR process, coding standards, testing guidelines"
|
|
23
|
+
deployment: "Infrastructure, CI/CD, environments, runbooks"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## README Template
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
# Project Name
|
|
32
|
+
|
|
33
|
+
> Short description (1-2 sentences)
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git clone ...
|
|
39
|
+
cp .env.example .env
|
|
40
|
+
composer install
|
|
41
|
+
php artisan serve
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Features
|
|
45
|
+
|
|
46
|
+
- Feature 1
|
|
47
|
+
- Feature 2
|
|
48
|
+
|
|
49
|
+
## Tech Stack
|
|
50
|
+
|
|
51
|
+
- Backend: Laravel 11
|
|
52
|
+
- Frontend: React + Tailwind
|
|
53
|
+
- Database: PostgreSQL 16
|
|
54
|
+
|
|
55
|
+
## Documentation
|
|
56
|
+
|
|
57
|
+
- [API Docs](/docs/api.md)
|
|
58
|
+
- [Architecture](/docs/architecture.md)
|
|
59
|
+
- [Contributing](/CONTRIBUTING.md)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Changelog
|
|
65
|
+
|
|
66
|
+
### 1.0.0 — Initial release. Types, README template.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Skill: DRY / KISS / YAGNI Validator
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: Medium
|
|
4
|
+
> Dependencies: Clean Code Validator
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
Ensures code follows three fundamental principles: Don't Repeat Yourself (DRY), Keep It Simple Stupid (KISS), and You Ain't Gonna Need It (YAGNI).
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## DRY — Don't Repeat Yourself
|
|
16
|
+
|
|
17
|
+
### Checks
|
|
18
|
+
|
|
19
|
+
- [ ] No duplicated logic across methods/classes
|
|
20
|
+
- [ ] No copy-pasted code blocks
|
|
21
|
+
- [ ] Repeated patterns extracted into functions/classes
|
|
22
|
+
- [ ] Business rules defined once
|
|
23
|
+
- [ ] Configuration externalized (not hardcoded)
|
|
24
|
+
|
|
25
|
+
### Examples
|
|
26
|
+
|
|
27
|
+
```php
|
|
28
|
+
// ❌ Violation
|
|
29
|
+
$total = $price + $tax;
|
|
30
|
+
$finalTotal = $price + $tax + $shipping;
|
|
31
|
+
$discountedTotal = ($price + $tax) * 0.9;
|
|
32
|
+
|
|
33
|
+
// ✅ DRY
|
|
34
|
+
function calculateSubtotal(float $price, float $tax): float {
|
|
35
|
+
return $price + $tax;
|
|
36
|
+
}
|
|
37
|
+
$total = calculateSubtotal($price, $tax);
|
|
38
|
+
$finalTotal = calculateSubtotal($price, $tax) + $shipping;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## KISS — Keep It Simple
|
|
44
|
+
|
|
45
|
+
### Checks
|
|
46
|
+
|
|
47
|
+
- [ ] Simplest solution that works
|
|
48
|
+
- [ ] No over-engineered abstractions
|
|
49
|
+
- [ ] No design patterns applied where not needed
|
|
50
|
+
- [ ] Code is readable at first glance
|
|
51
|
+
- [ ] No premature optimization
|
|
52
|
+
|
|
53
|
+
### Signs of Over-Engineering
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
- FactoryFactory pattern
|
|
57
|
+
- Strategy pattern for a single if-else
|
|
58
|
+
- Abstract base class with one concrete implementation
|
|
59
|
+
- Event system when a simple function call works
|
|
60
|
+
- Microservice for a CRUD module
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## YAGNI — You Ain't Gonna Need It
|
|
66
|
+
|
|
67
|
+
### Checks
|
|
68
|
+
|
|
69
|
+
- [ ] No unused parameters, methods, or classes
|
|
70
|
+
- [ ] No commented-out "future" code
|
|
71
|
+
- [ ] No "we might need this later" abstractions
|
|
72
|
+
- [ ] No unused dependencies in composer.json
|
|
73
|
+
- [ ] No unused imports
|
|
74
|
+
|
|
75
|
+
### Examples
|
|
76
|
+
|
|
77
|
+
```php
|
|
78
|
+
// ❌ YAGNI violation — building for hypothetical future
|
|
79
|
+
class PaymentProcessor
|
|
80
|
+
{
|
|
81
|
+
public function process(
|
|
82
|
+
PaymentMethod $method,
|
|
83
|
+
?bool $useCrypto = null, // might need later?
|
|
84
|
+
?string $fallbackCurrency = null, // for future expansion?
|
|
85
|
+
) { ... }
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// ✅ YAGNI — only what's needed now
|
|
89
|
+
class PaymentProcessor
|
|
90
|
+
{
|
|
91
|
+
public function process(PaymentMethod $method): void { ... }
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Score
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
dry_score: 4/5
|
|
101
|
+
kiss_score: 5/5
|
|
102
|
+
yagni_score: 3/5
|
|
103
|
+
|
|
104
|
+
violations:
|
|
105
|
+
- principle: yagni
|
|
106
|
+
location: "UserService.php:22"
|
|
107
|
+
detail: "Unused method getHistory that calls an API that doesn't exist yet"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Changelog
|
|
113
|
+
|
|
114
|
+
### 1.0.0 — Initial release. DRY, KISS, YAGNI checks with examples.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: economia-tokens
|
|
3
|
+
description: Reduz o consumo de tokens em QUALQUER tarefa de código ou análise de arquivos. Use sempre, em toda tarefa — não é preciso o usuário pedir "economize tokens". Ativa quando for ler arquivos grandes, editar código, explicar mudanças, rodar comandos, ou revisar um diff. Evita reler arquivos inteiros sem necessidade, corta narração desnecessária, prefere trechos/diffs a colar arquivos completos, e agrupa chamadas de ferramentas.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Economia de tokens
|
|
7
|
+
|
|
8
|
+
Instruções permanentes de como trabalhar de forma econômica. Valem para a sessão inteira, não só na primeira leitura.
|
|
9
|
+
|
|
10
|
+
## Leitura de arquivos
|
|
11
|
+
|
|
12
|
+
- Antes de ler um arquivo inteiro, pergunte: "uma busca (grep/glob) direcionada resolve?". Se sim, use busca em vez de abrir o arquivo todo.
|
|
13
|
+
- Ao investigar um bug ou função específica, leia só o trecho relevante (range de linhas), não o arquivo inteiro.
|
|
14
|
+
- Nunca releia um arquivo que já está no contexto e não mudou desde a última leitura.
|
|
15
|
+
- Se precisar ver várias partes de um mesmo arquivo grande, agrupe numa única leitura em vez de várias chamadas pequenas.
|
|
16
|
+
|
|
17
|
+
## Edição de código
|
|
18
|
+
|
|
19
|
+
- Prefira edições pontuais (diff/patch) a reescrever o arquivo inteiro quando só uma parte muda.
|
|
20
|
+
- Não cole de volta o arquivo inteiro no chat para "mostrar o resultado" — mostre só o trecho alterado, a menos que o usuário peça o arquivo completo.
|
|
21
|
+
|
|
22
|
+
## Comunicação
|
|
23
|
+
|
|
24
|
+
- Não narre o que vai fazer antes de fazer ("vou analisar o código...", "deixa eu verificar..."). Só execute e reporte o resultado.
|
|
25
|
+
- Respostas diretas: sem repetir de volta o que o usuário já disse, sem resumir o pedido antes de responder.
|
|
26
|
+
- Ao explicar uma mudança, seja telegráfico: bullets curtos, sem parágrafos de introdução/conclusão.
|
|
27
|
+
- Evite frases de preenchimento ("Com certeza!", "Ótima pergunta!", "Vamos lá!").
|
|
28
|
+
|
|
29
|
+
## Comandos e ferramentas
|
|
30
|
+
|
|
31
|
+
- Agrupe comandos relacionados numa única chamada de terminal (ex.: `comando1 && comando2`) em vez de várias chamadas separadas.
|
|
32
|
+
- Ao rodar comandos que geram saída grande (ex. `git diff`, logs, build), filtre ou limite a saída (`--stat`, `| head`, `| tail`) em vez de despejar tudo no contexto.
|
|
33
|
+
- Não rode o mesmo comando de verificação repetidamente sem necessidade (ex. rodar testes 3x seguidas sem mudar nada).
|
|
34
|
+
|
|
35
|
+
## Gotchas (erros comuns que fazem gastar token à toa)
|
|
36
|
+
|
|
37
|
+
- Reler o mesmo arquivo em cada turno "por segurança" — só releia se o arquivo pode ter mudado (edição externa, outro processo).
|
|
38
|
+
- Colar o diff inteiro de um commit grande quando só 2-3 linhas importam para a pergunta.
|
|
39
|
+
- Explicar de novo um conceito que já foi explicado nesta sessão.
|
|
40
|
+
- Rodar `ls -R` ou `find` em diretórios grandes (ex. `node_modules`) sem filtro.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Skill: ER Diagram Builder
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: Low
|
|
4
|
+
> Dependencies: Database Engineer
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
ER Diagram Builder generates entity-relationship diagrams from schema definitions or descriptions.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## PlantUML ER
|
|
16
|
+
|
|
17
|
+
```plantuml
|
|
18
|
+
@startuml
|
|
19
|
+
!define table(x) class x << (T,#FFAAAA) >>
|
|
20
|
+
|
|
21
|
+
table(users) {
|
|
22
|
+
*id: UUID
|
|
23
|
+
*name: string
|
|
24
|
+
*email: string [unique]
|
|
25
|
+
created_at: datetime
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
table(posts) {
|
|
29
|
+
*id: UUID
|
|
30
|
+
*title: string
|
|
31
|
+
*content: text
|
|
32
|
+
*user_id: UUID
|
|
33
|
+
*status: string
|
|
34
|
+
published_at: datetime
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
table(comments) {
|
|
38
|
+
*id: UUID
|
|
39
|
+
*body: text
|
|
40
|
+
*user_id: UUID
|
|
41
|
+
*post_id: UUID
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
users ||--o{ posts : creates
|
|
45
|
+
users ||--o{ comments : writes
|
|
46
|
+
posts ||--o{ comments : has
|
|
47
|
+
@enduml
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Mermaid ER
|
|
53
|
+
|
|
54
|
+
```mermaid
|
|
55
|
+
erDiagram
|
|
56
|
+
users {
|
|
57
|
+
uuid id PK
|
|
58
|
+
string name
|
|
59
|
+
string email UK
|
|
60
|
+
datetime created_at
|
|
61
|
+
}
|
|
62
|
+
posts {
|
|
63
|
+
uuid id PK
|
|
64
|
+
string title
|
|
65
|
+
text content
|
|
66
|
+
uuid user_id FK
|
|
67
|
+
string status
|
|
68
|
+
datetime published_at
|
|
69
|
+
}
|
|
70
|
+
comments {
|
|
71
|
+
uuid id PK
|
|
72
|
+
text body
|
|
73
|
+
uuid user_id FK
|
|
74
|
+
uuid post_id FK
|
|
75
|
+
}
|
|
76
|
+
users ||--o{ posts : ""
|
|
77
|
+
users ||--o{ comments : ""
|
|
78
|
+
posts ||--o{ comments : ""
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Changelog
|
|
84
|
+
|
|
85
|
+
### 1.0.0 — Initial release. PlantUML ER, Mermaid ER.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: feature-flags
|
|
3
|
+
description: |
|
|
4
|
+
Skill de Feature Flags e A/B Testing para o Portal. Aborda estrategias de rollout,
|
|
5
|
+
targeted releases, canary deployments, A/B/n experiments e ferramentas de gerenciamento
|
|
6
|
+
de flags. Use esta skill para implementar entregas graduais e experimentacao.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill Feature Flags — Portal
|
|
10
|
+
|
|
11
|
+
## Provedores
|
|
12
|
+
|
|
13
|
+
| Ferramenta | Uso |
|
|
14
|
+
|------------|-----|
|
|
15
|
+
| LaunchDarkly | Feature flags enterprise |
|
|
16
|
+
| Statsig | Flags + experimentacao + analytics |
|
|
17
|
+
| Split.io | Flags + metrics |
|
|
18
|
+
| Flagsmith | Open-source (self-hosted) |
|
|
19
|
+
| Custom (env vars) | Flags simples, sem target |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Estrategias de Flag
|
|
24
|
+
|
|
25
|
+
### Boolean Flags
|
|
26
|
+
```tsx
|
|
27
|
+
if (isEnabled("new-checkout-flow")) {
|
|
28
|
+
return <NewCheckout />;
|
|
29
|
+
}
|
|
30
|
+
return <LegacyCheckout />;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Percentage Rollout
|
|
34
|
+
```tsx
|
|
35
|
+
// Lancamento gradual: 10% → 25% → 50% → 100%
|
|
36
|
+
await flagsmith.setPercentage("new-header", 10);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Targeted Release
|
|
40
|
+
```tsx
|
|
41
|
+
// Liberar para grupo especifico
|
|
42
|
+
"targets": [
|
|
43
|
+
{ "audience": "internal-team", "enabled": true },
|
|
44
|
+
{ "audience": "beta-users", "enabled": true },
|
|
45
|
+
{ "audience": "all", "enabled": false }
|
|
46
|
+
]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Canary / Ring Deployment
|
|
50
|
+
```
|
|
51
|
+
Ring 0 (dev) → Ring 1 (internal) → Ring 2 (beta) → Ring 3 (all)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## A/B Testing
|
|
57
|
+
|
|
58
|
+
### Estrutura
|
|
59
|
+
```tsx
|
|
60
|
+
const experiment = statsig.getExperiment("homepage-hero-v2");
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<div>
|
|
64
|
+
{experiment.get("variant") === "v1" ? <HeroV1 /> : <HeroV2 />}
|
|
65
|
+
</div>
|
|
66
|
+
);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Metricas
|
|
70
|
+
| Metrica | Descricao |
|
|
71
|
+
|---------|-----------|
|
|
72
|
+
| Primary | O que queremos melhorar (ex: click rate) |
|
|
73
|
+
| Secondary | Efeitos colaterais (ex: bounce rate) |
|
|
74
|
+
| Guardrail | O que nao pode piorar (ex: page load time) |
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Boas Praticas
|
|
79
|
+
|
|
80
|
+
### Nomenclatura
|
|
81
|
+
```
|
|
82
|
+
<area>.<feature>.<variant>
|
|
83
|
+
ex: checkout.new-flow.control
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Lifecycle
|
|
87
|
+
```
|
|
88
|
+
dev → staging → rollout (5%) → rollout (25%) → rollout (100%) → cleanup (remover flag)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Anti-Padroes
|
|
92
|
+
- ❌ Flags eternas (que nunca saem) — sempre cleanup apos stable
|
|
93
|
+
- ❌ Flags em cascata (flag A depende de flag B)
|
|
94
|
+
- ❌ Flags sem owner definido
|
|
95
|
+
- ❌ Testar apenas com flag ON (esquecer de testar flag OFF)
|