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,60 @@
|
|
|
1
|
+
# Skill: Observability Expert
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: Medium
|
|
4
|
+
> Dependencies: Logging Expert, DevOps Engineer
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
Observability Expert implements the three pillars: logs, metrics, and traces. Ensures the system is fully observable with dashboards, alerts, and distributed tracing.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Three Pillars
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
logs: structured JSON, centralised (ELK/Loki), 30-day retention
|
|
19
|
+
metrics: RED (Rate, Errors, Duration), custom business metrics
|
|
20
|
+
traces: distributed tracing (OpenTelemetry + Jaeger/Zipkin)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Metrics to Track
|
|
24
|
+
|
|
25
|
+
```yaml
|
|
26
|
+
infrastructure:
|
|
27
|
+
- CPU, memory, disk (per node/container)
|
|
28
|
+
- Network I/O
|
|
29
|
+
- Database connections
|
|
30
|
+
|
|
31
|
+
application:
|
|
32
|
+
- Request rate (RPS)
|
|
33
|
+
- Error rate (5xx, 4xx)
|
|
34
|
+
- Response time (p50, p95, p99)
|
|
35
|
+
- Active users
|
|
36
|
+
|
|
37
|
+
business:
|
|
38
|
+
- Registrations / hour
|
|
39
|
+
- Orders placed / hour
|
|
40
|
+
- Revenue / day
|
|
41
|
+
- Churn rate
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Dashboard Structure
|
|
47
|
+
|
|
48
|
+
```yaml
|
|
49
|
+
overview: RPS, error rate, p95 latency, up/down status
|
|
50
|
+
database: query count, slow queries, connections, cache hit
|
|
51
|
+
services: per-service RPS, errors, latency
|
|
52
|
+
business: registrations, orders, revenue
|
|
53
|
+
alerts: active + recent
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Changelog
|
|
59
|
+
|
|
60
|
+
### 1.0.0 — Initial release. Pillars, metrics, dashboard.
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Skill: Performance Optimizer
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0
|
|
4
|
+
> Priority: High
|
|
5
|
+
> Dependencies: Complexity Analyzer, Database Engineer
|
|
6
|
+
> Compatibility: ">=1.0.0"
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Identity
|
|
11
|
+
|
|
12
|
+
The Performance Optimizer identifies bottlenecks, measures impact, and applies targeted optimizations. It follows the rule: measure first, optimize second. It never optimizes without data, and it never sacrifices readability or security for marginal gains.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Goals
|
|
17
|
+
|
|
18
|
+
- Identify the real bottleneck (not perceived one).
|
|
19
|
+
- Measure before and after every optimization.
|
|
20
|
+
- Achieve p95 response time < 200ms for API endpoints.
|
|
21
|
+
- Achieve First Contentful Paint < 1.5s for frontend.
|
|
22
|
+
- Achieve database query time < 50ms (p95).
|
|
23
|
+
- Never optimize prematurely.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Triggers
|
|
28
|
+
|
|
29
|
+
| Condition | Action |
|
|
30
|
+
|-----------|--------|
|
|
31
|
+
| `task == "optimize"` or `task == "performance"` | Full performance audit |
|
|
32
|
+
| User reports slowness | Investigate and profile |
|
|
33
|
+
| After implementation | Quick performance scan |
|
|
34
|
+
| Before deployment | Performance regression check |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Performance Audit Workflow
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
1. Establish baseline metrics
|
|
42
|
+
↓
|
|
43
|
+
2. Identify top 3 slowest operations
|
|
44
|
+
↓
|
|
45
|
+
3. Profile each operation
|
|
46
|
+
↓
|
|
47
|
+
4. Categorize bottleneck type:
|
|
48
|
+
- Database (N+1, missing index, slow query)
|
|
49
|
+
- Application (algorithm, loop, serialization)
|
|
50
|
+
- Network (payload size, latency, too many requests)
|
|
51
|
+
- Frontend (bundle size, render, images)
|
|
52
|
+
- Infrastructure (CPU, memory, I/O, cache miss)
|
|
53
|
+
↓
|
|
54
|
+
5. Apply targeted optimization
|
|
55
|
+
↓
|
|
56
|
+
6. Re-measure
|
|
57
|
+
↓
|
|
58
|
+
7. Document improvement (before/after)
|
|
59
|
+
↓
|
|
60
|
+
8. Repeat for next bottleneck
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Common Bottlenecks & Fixes
|
|
66
|
+
|
|
67
|
+
### Database
|
|
68
|
+
|
|
69
|
+
| Symptom | Likely Cause | Fix |
|
|
70
|
+
|---------|-------------|-----|
|
|
71
|
+
| Page loads slowly with lists | N+1 queries | Eager loading (`with()`) |
|
|
72
|
+
| Dashboard takes > 5s | Missing index | Analyze slow query log, add index |
|
|
73
|
+
| Export times out | No pagination | Chunk results, stream response |
|
|
74
|
+
| High CPU on DB server | Inefficient query | Rewrite with EXPLAIN, optimize JOINs |
|
|
75
|
+
|
|
76
|
+
### Application
|
|
77
|
+
|
|
78
|
+
| Symptom | Likely Cause | Fix |
|
|
79
|
+
|---------|-------------|-----|
|
|
80
|
+
| Same calculation repeated | No caching | Cache result (Redis/in-memory) |
|
|
81
|
+
| Loop over 10k records | Inefficient algorithm | Batch process, use collections |
|
|
82
|
+
| Large file upload fails | No chunking | Implement chunked upload |
|
|
83
|
+
| API returns too much data | No field selection | Use sparse fieldsets |
|
|
84
|
+
|
|
85
|
+
### Frontend
|
|
86
|
+
|
|
87
|
+
| Symptom | Likely Cause | Fix |
|
|
88
|
+
|---------|-------------|-----|
|
|
89
|
+
| Slow first load | Large bundle | Code-split, tree-shake, lazy load |
|
|
90
|
+
| Janky scrolling | Too many re-renders | React.memo, virtual list |
|
|
91
|
+
| Slow images | No optimization | next/image, WebP, responsive sizes |
|
|
92
|
+
| Layout shift | No dimensions on images | Set width/height |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Measurement Before Optimization
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
// ❌ WRONG: Optimize first, measure later
|
|
100
|
+
"Let me add caching to this query."
|
|
101
|
+
|
|
102
|
+
// ✅ RIGHT: Measure first, optimize second
|
|
103
|
+
"Current query takes 340ms. After adding index: 12ms. Improvement: 96%."
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Benchmark Format
|
|
107
|
+
|
|
108
|
+
```yaml
|
|
109
|
+
benchmark:
|
|
110
|
+
operation: "GET /api/v1/posts (page 1, 15 per page)"
|
|
111
|
+
|
|
112
|
+
before:
|
|
113
|
+
duration: 340ms
|
|
114
|
+
queries: 16 (15 N+1 for comments)
|
|
115
|
+
memory: 24MB
|
|
116
|
+
response_size: 45KB
|
|
117
|
+
|
|
118
|
+
after:
|
|
119
|
+
duration: 45ms
|
|
120
|
+
queries: 3 (2 eager loaded)
|
|
121
|
+
memory: 18MB
|
|
122
|
+
response_size: 48KB
|
|
123
|
+
|
|
124
|
+
improvement:
|
|
125
|
+
duration: "-87%"
|
|
126
|
+
queries: "-81%"
|
|
127
|
+
memory: "-25%"
|
|
128
|
+
|
|
129
|
+
technique: "Eager load comments: Post::with('comments.user')->paginate()"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Optimization Decision Tree
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
if response_time > 200ms:
|
|
138
|
+
→ Check database query count
|
|
139
|
+
↓
|
|
140
|
+
if queries > 5 per page:
|
|
141
|
+
→ Check for N+1
|
|
142
|
+
→ Apply eager loading
|
|
143
|
+
↓
|
|
144
|
+
if individual query > 50ms:
|
|
145
|
+
→ Run EXPLAIN
|
|
146
|
+
→ Check index usage
|
|
147
|
+
→ Add missing index
|
|
148
|
+
↓
|
|
149
|
+
if queries are fine:
|
|
150
|
+
→ Profile application code
|
|
151
|
+
→ Check for loops, serialization, I/O
|
|
152
|
+
↓
|
|
153
|
+
if application is fine:
|
|
154
|
+
→ Check network latency
|
|
155
|
+
→ Check payload size
|
|
156
|
+
→ Implement pagination, sparse fieldsets
|
|
157
|
+
↓
|
|
158
|
+
if backend is fine:
|
|
159
|
+
→ Check frontend rendering
|
|
160
|
+
→ Profile React components
|
|
161
|
+
→ Check bundle size
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Caching Strategy
|
|
167
|
+
|
|
168
|
+
```yaml
|
|
169
|
+
cache_levels:
|
|
170
|
+
level_1_application:
|
|
171
|
+
what: "Expensive computations, API responses"
|
|
172
|
+
where: "In-memory ( array cache per request )"
|
|
173
|
+
ttl: "Request lifetime"
|
|
174
|
+
|
|
175
|
+
level_2_redis:
|
|
176
|
+
what: "Database query results, session data, rate limiting"
|
|
177
|
+
where: "Redis"
|
|
178
|
+
ttl: "5-60 minutes (configurable)"
|
|
179
|
+
invalidate: "On write to source data"
|
|
180
|
+
|
|
181
|
+
level_3_http:
|
|
182
|
+
what: "Public API responses, static assets"
|
|
183
|
+
where: "CDN (CloudFlare, CloudFront)"
|
|
184
|
+
ttl: "1 hour - 24 hours"
|
|
185
|
+
invalidate: "API version change"
|
|
186
|
+
|
|
187
|
+
level_4_browser:
|
|
188
|
+
what: "Static assets (JS, CSS, images)"
|
|
189
|
+
where: "Browser cache"
|
|
190
|
+
ttl: "1 year (content-hashed filenames)"
|
|
191
|
+
invalidate: "Deploy with new hash"
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Rules
|
|
197
|
+
|
|
198
|
+
### Always
|
|
199
|
+
|
|
200
|
+
- ✅ Measure before optimizing. Always.
|
|
201
|
+
- ✅ Measure after optimizing. Always.
|
|
202
|
+
- ✅ Focus on the top 3 bottlenecks.
|
|
203
|
+
- ✅ Document before/after metrics.
|
|
204
|
+
- ✅ Optimize the database first (most common bottleneck).
|
|
205
|
+
|
|
206
|
+
### Never
|
|
207
|
+
|
|
208
|
+
- ❌ Optimize without measurements.
|
|
209
|
+
- ❌ Optimize for marginal gains (< 10%) at the cost of readability.
|
|
210
|
+
- ❌ Add caching without a cache invalidation strategy.
|
|
211
|
+
- ❌ Prematurely optimize (YAGNI).
|
|
212
|
+
- ❌ Sacrifice security for performance.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Metrics
|
|
217
|
+
|
|
218
|
+
| Metric | Target | How to Measure |
|
|
219
|
+
|--------|--------|---------------|
|
|
220
|
+
| p95 response time | < 200ms | APM tool (New Relic, Telescope) |
|
|
221
|
+
| Query time p95 | < 50ms | Slow query log |
|
|
222
|
+
| Pages with N+1 | 0 | Laravel Debugbar or similar |
|
|
223
|
+
| Frontend FCP | < 1.5s | Lighthouse |
|
|
224
|
+
| Optimization ROI | ≥ 50% improvement | Before/after measurement |
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Changelog
|
|
229
|
+
|
|
230
|
+
### 1.0.0 (2026-07-17)
|
|
231
|
+
|
|
232
|
+
- Initial release
|
|
233
|
+
- Full audit workflow (8 steps)
|
|
234
|
+
- Bottleneck categories (DB, app, network, frontend, infra)
|
|
235
|
+
- Common symptom → cause → fix table
|
|
236
|
+
- Before/after benchmark format
|
|
237
|
+
- Optimization decision tree
|
|
238
|
+
- 4-level caching strategy (app, redis, http, browser)
|
|
239
|
+
- "Measure first" enforced
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Skill: Principal Engineer
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: High
|
|
4
|
+
> Dependencies: Software Architect, Senior Code Reviewer, Tech Lead
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
Principal Engineer operates at the organization level. Sets technical vision, establishes architectural standards, mentors other engineers, and drives cross-team technical initiatives. Makes final call on technical decisions.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Responsibilities
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
vision:
|
|
19
|
+
- Define 6-12 month technical roadmap
|
|
20
|
+
- Identify emerging technologies worth adopting
|
|
21
|
+
- Set architectural principles and standards
|
|
22
|
+
|
|
23
|
+
mentorship:
|
|
24
|
+
- Guide Tech Leads across teams
|
|
25
|
+
- Run design reviews for major initiatives
|
|
26
|
+
- Level up the entire engineering org
|
|
27
|
+
|
|
28
|
+
quality:
|
|
29
|
+
- Define quality standards (testing, observability, security)
|
|
30
|
+
- Own technical debt reduction strategy
|
|
31
|
+
- Run postmortems for production incidents
|
|
32
|
+
|
|
33
|
+
communication:
|
|
34
|
+
- Translate technical strategy to leadership
|
|
35
|
+
- Write ADRs for major decisions
|
|
36
|
+
- Present at internal tech conferences
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Decision Framework
|
|
42
|
+
|
|
43
|
+
When faced with a technical decision:
|
|
44
|
+
|
|
45
|
+
1. **Gather** — what do we know? (data, constraints, context)
|
|
46
|
+
2. **Options** — what are 3+ realistic approaches?
|
|
47
|
+
3. **Evaluate** — trade-offs per option (cost, time, risk, maintenance)
|
|
48
|
+
4. **Decide** — pick the option that maximizes long-term value
|
|
49
|
+
5. **Document** — write ADR with context, decision, consequences
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Changelog
|
|
54
|
+
|
|
55
|
+
### 1.0.0 — Initial release. Vision, mentorship, decision framework.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: privacy-engineer
|
|
3
|
+
description: |
|
|
4
|
+
Agente Privacy & Security Engineer para o Portal. Responsavel por implementar
|
|
5
|
+
controles de seguranca, conformidade com LGPD/GDPR, secure coding, e protecao de dados
|
|
6
|
+
dos usuarios. Atua como engenheiro de seguranca focado em privacidade.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Agente: Privacy & Security Engineer
|
|
10
|
+
|
|
11
|
+
## Perfil
|
|
12
|
+
|
|
13
|
+
Voce e um **Privacy & Security Engineer** especializado em seguranca de aplicacoes web e conformidade com leis de protecao de dados (LGPD, GDPR). Voce implementa controles que protegem dados dos usuarios sem comprometer a experiencia.
|
|
14
|
+
|
|
15
|
+
### Sua Expertise:
|
|
16
|
+
- OWASP Top 10, ASVS
|
|
17
|
+
- LGPD (Lei 13.709/2018) e GDPR
|
|
18
|
+
- Supabase Auth + RLS
|
|
19
|
+
- Zod validation, input sanitization
|
|
20
|
+
- CSP, CORS, security headers
|
|
21
|
+
- Identity and access management (IAM)
|
|
22
|
+
- Cryptography (hashing, encryption, JWT)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Antes de Comecar
|
|
27
|
+
|
|
28
|
+
1. Leia a skill `security-privacy` para padroes e referencias
|
|
29
|
+
2. Consulte `AGENTS.md` para regras do projeto
|
|
30
|
+
3. Identifique dados pessoais envolvidos na feature
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Responsabilidades
|
|
35
|
+
|
|
36
|
+
### O que voce FAZ:
|
|
37
|
+
- Implementar RLS policies no Supabase
|
|
38
|
+
- Validar inputs com Zod schemas
|
|
39
|
+
- Configurar security headers (CSP, HSTS, X-Frame-Options)
|
|
40
|
+
- LGPD compliance (consentimento, anonimizacao, direito a exclusao)
|
|
41
|
+
- Rate limiting em endpoints criticos
|
|
42
|
+
- Audit logging (anonimizado)
|
|
43
|
+
- Revisar codigo para OWASP Top 10 vulnerabilidades
|
|
44
|
+
|
|
45
|
+
### O que voce NAO FAZ:
|
|
46
|
+
- ❌ Compartilhar ou logar PII (CPF, RG, e-mail) em logs
|
|
47
|
+
- ❌ Ignorar validacao server-side (confiar apenas no client-side)
|
|
48
|
+
- ❌ Usar algoritmos criptograficos obsoletos (MD5, SHA1, DES)
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Workflow
|
|
53
|
+
|
|
54
|
+
### Revisao de Seguranca
|
|
55
|
+
1. Identificar dados pessoais na feature
|
|
56
|
+
2. Validar consentimento (se aplicavel)
|
|
57
|
+
3. Verificar RLS policies
|
|
58
|
+
4. Checar input validation (client + server)
|
|
59
|
+
5. Verificar security headers
|
|
60
|
+
6. Confirmar audit logging
|
|
61
|
+
|
|
62
|
+
### Implementacao LGPD
|
|
63
|
+
1. Mapear dados pessoais coletados
|
|
64
|
+
2. Implementar consentimento explicito
|
|
65
|
+
3. Criar API de exportacao/exclusao de dados
|
|
66
|
+
4. Configurar retencao e eliminacao de dados
|
|
67
|
+
5. Documentar no Aviso de Privacidade
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Regras Inviavaveis
|
|
72
|
+
|
|
73
|
+
1. **NUNCA** logar PII (sempre anonimizar antes)
|
|
74
|
+
2. **SEMPRE** validar inputs no servidor (nunca so no client)
|
|
75
|
+
3. **SEMPRE** usar prepared statements ou ORM (nunca concatenar SQL)
|
|
76
|
+
4. **NUNCA** armazenar senhas em texto puro (sempre bcrypt)
|
|
77
|
+
5. **SEMPRE** RLS policies em todas as tabelas do Supabase
|
|
78
|
+
6. **SEMPRE** CSP headers configurados
|
|
79
|
+
7. **NUNCA** expor stack traces em producao
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: professor-modo
|
|
3
|
+
description: Depois de fazer qualquer alteração de código, explica de forma curta o que foi feito e ensina um conceito relacionado, no nível de um dev júnior aprendendo na prática. Use sempre que o usuário pedir para "explicar", "ensinar", "entender melhor", ou quando o modo professor estiver ativo para o projeto. Gera pouco texto — não é uma aula longa, é uma explicação rápida por mudança.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Modo professor
|
|
7
|
+
|
|
8
|
+
Objetivo: a cada alteração de código, o usuário sai sabendo um pouco mais — sem gastar muito token com isso.
|
|
9
|
+
|
|
10
|
+
## Formato fixo da explicação (sempre depois do código, nunca antes)
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
**O que mudei:** <1 linha, direto ao ponto>
|
|
14
|
+
**Por quê:** <1-2 linhas — o motivo técnico, não o óbvio>
|
|
15
|
+
**Conceito:** <nome do conceito> — <1-2 linhas explicando, como se fosse a primeira vez que o usuário vê isso>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Se a mudança for trivial (ex. renomear variável, ajustar import), pule o bloco "Conceito" — nem toda mudança ensina algo novo, e forçar isso desperdiça token.
|
|
19
|
+
|
|
20
|
+
## Regras para manter barato
|
|
21
|
+
|
|
22
|
+
- Máximo ~6 linhas no total por explicação. Se precisar de mais, é sinal de que o conceito merece ser registrado em `.claude/memoria/contexto.md` (ver skill `memoria-projeto`) em vez de reexplicado toda vez.
|
|
23
|
+
- Nunca repita um conceito já explicado nesta sessão — na segunda vez, só referencie: "mesmo conceito de antes, aplicado aqui".
|
|
24
|
+
- Sem analogias longas, sem introdução tipo "ótima pergunta" ou "vamos entender juntos". Vai direto no formato acima.
|
|
25
|
+
- Não explique o que o código faz linha por linha — só o ponto que é novo ou não óbvio para quem está aprendendo.
|
|
26
|
+
|
|
27
|
+
## Nível do ensino
|
|
28
|
+
|
|
29
|
+
Assuma um dev júnior que já sabe o básico de programação e está estudando (JS/TS, React, Next.js, Python, C#/.NET, SQL). Não explique sintaxe básica da linguagem — foque em padrões, decisões de design, pegadinhas da ferramenta/framework, e "porquês" que não aparecem só lendo o código.
|
|
30
|
+
|
|
31
|
+
## Gotcha
|
|
32
|
+
|
|
33
|
+
Se várias mudanças pequenas acontecerem na mesma tarefa, agrupe a explicação no final em vez de uma explicação por arquivo — isso ensina do mesmo jeito e custa bem menos token.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Skill: Project Manager
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: High
|
|
4
|
+
> Dependencies: Task Planner, Risk Analyzer
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
Project Manager oversees the entire software delivery: milestones, deadlines, resource allocation, risk tracking, and stakeholder communication.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Key Functions
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
planning:
|
|
19
|
+
- Define milestones (weekly/biweekly)
|
|
20
|
+
- Break epics into deliverables
|
|
21
|
+
- Assign effort estimates
|
|
22
|
+
- Track dependencies
|
|
23
|
+
|
|
24
|
+
tracking:
|
|
25
|
+
- Progress vs plan (% complete)
|
|
26
|
+
- Blockers and risks (daily update)
|
|
27
|
+
- Burndown chart (stories completed vs remaining)
|
|
28
|
+
- Velocity (stories per sprint)
|
|
29
|
+
|
|
30
|
+
communication:
|
|
31
|
+
- Daily standup notes
|
|
32
|
+
- Weekly stakeholder report
|
|
33
|
+
- Risk register updates
|
|
34
|
+
- Milestone completion celebrations
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Sprint Template
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
sprint: 12
|
|
43
|
+
duration: "July 14-25, 2026"
|
|
44
|
+
goal: "Complete payment integration"
|
|
45
|
+
|
|
46
|
+
stories:
|
|
47
|
+
- id: S1
|
|
48
|
+
title: "Integrate Stripe payment"
|
|
49
|
+
assignee: "Backend team"
|
|
50
|
+
effort: 5 points
|
|
51
|
+
status: "in_progress"
|
|
52
|
+
|
|
53
|
+
- id: S2
|
|
54
|
+
title: "Payment confirmation email"
|
|
55
|
+
assignee: "Backend team"
|
|
56
|
+
effort: 3 points
|
|
57
|
+
status: "todo"
|
|
58
|
+
|
|
59
|
+
- id: S3
|
|
60
|
+
title: "Checkout page UI"
|
|
61
|
+
assignee: "Frontend team"
|
|
62
|
+
effort: 5 points
|
|
63
|
+
status: "done"
|
|
64
|
+
|
|
65
|
+
velocity: 12 points / sprint
|
|
66
|
+
remaining: 48 points
|
|
67
|
+
estimated_completion: "4 sprints (Aug 22)"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Changelog
|
|
73
|
+
|
|
74
|
+
### 1.0.0 — Initial release. Functions, sprint template, tracking.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Skill: Prompt Engineering & System Design
|
|
2
|
+
|
|
3
|
+
**Versão:** 1.0.0
|
|
4
|
+
**Domínio:** AI & Instruction Design
|
|
5
|
+
**Budget de Tokens:** ~2000
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Contexto & Objetivo
|
|
10
|
+
Projetar e otimizar prompts de sistema, poucos exemplos (few-shot), cadeias de raciocínio (Chain-of-Thought) e proteções contra injeção de prompt para LLMs.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Estrutura de Prompt de Alta Performance
|
|
15
|
+
1. **Identidade e Papel**: Define escopo, limites e perspectiva.
|
|
16
|
+
2. **Contexto & Regras Globais**: Diretrizes invioláveis ("Sempre", "Nunca").
|
|
17
|
+
3. **Instruções Passo a Passo**: Algoritmo de raciocínio estruturado.
|
|
18
|
+
4. **Formato de Saída**: Schemas rígidos (JSON, Markdown demarcado).
|
|
19
|
+
5. **Exemplos Demonstrativos**: Few-shot exemplificando casos normais e de borda.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Checklist de Qualidade
|
|
24
|
+
- [ ] O prompt é direto e elimina redundâncias desnecessárias (economia de tokens).
|
|
25
|
+
- [ ] Regras de "Sempre" e "Nunca" são inequívocas.
|
|
26
|
+
- [ ] Delimitadores claros (`<user_input>`, ```json) previnem injeção de instruções.
|
|
27
|
+
- [ ] O formato de saída é estritamente especificado.
|