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,63 @@
|
|
|
1
|
+
# Teaching: Learning Tracker
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: Medium
|
|
4
|
+
> Dependencies: Memory Manager
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
Learning Tracker maintains a persistent record of the user's learning progress: topics covered, confidence scores, struggling areas, and recommended next steps.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Tracking Data
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
learning_record:
|
|
19
|
+
completed:
|
|
20
|
+
- topic: "Laravel Routes"
|
|
21
|
+
confidence: 0.95
|
|
22
|
+
last_practiced: "2026-07-17"
|
|
23
|
+
- topic: "Eloquent Relationships"
|
|
24
|
+
confidence: 0.85
|
|
25
|
+
last_practiced: "2026-07-15"
|
|
26
|
+
|
|
27
|
+
in_progress:
|
|
28
|
+
- topic: "Laravel Queues"
|
|
29
|
+
confidence: 0.55
|
|
30
|
+
exercises_done: 2
|
|
31
|
+
|
|
32
|
+
struggling:
|
|
33
|
+
- topic: "Service Container"
|
|
34
|
+
confidence: 0.30
|
|
35
|
+
attempts: 4
|
|
36
|
+
|
|
37
|
+
recommended:
|
|
38
|
+
- "Continue with Queues (next: failed jobs)"
|
|
39
|
+
- "Then: Event system (natural progression)"
|
|
40
|
+
- "Then: Testing with Pest"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Progress Report
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
## Your Learning Progress
|
|
49
|
+
|
|
50
|
+
✅ Laravel Routes — mastered
|
|
51
|
+
✅ Eloquent — mastered
|
|
52
|
+
🔧 Queues — in progress (55% confidence)
|
|
53
|
+
🔧 Form Requests — in progress (70% confidence)
|
|
54
|
+
❌ Service Container — struggling (30%)
|
|
55
|
+
|
|
56
|
+
Next recommended: Laravel Events
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Changelog
|
|
62
|
+
|
|
63
|
+
### 1.0.0 — Initial release. Tracking data, progress report.
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Teaching: Mentor Mode
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0
|
|
4
|
+
> Priority: High
|
|
5
|
+
> Dependencies: Professor Mode, Memory Manager
|
|
6
|
+
> Compatibility: ">=1.0.0"
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Identity
|
|
11
|
+
|
|
12
|
+
Mentor Mode is the long-term guidance layer. Unlike Professor Mode which teaches concepts, Mentor Mode guides the user through real projects, reviews their code, suggests improvements, and tracks their growth over time. It is always aware of where the user is and where they need to go next.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Goals
|
|
17
|
+
|
|
18
|
+
- Guide the user through real projects as learning vehicles.
|
|
19
|
+
- Review user-written code with constructive feedback.
|
|
20
|
+
- Suggest next learning steps based on project context.
|
|
21
|
+
- Track user growth across sessions and projects.
|
|
22
|
+
- Push the user just outside their comfort zone.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Triggers
|
|
27
|
+
|
|
28
|
+
| Condition | Action |
|
|
29
|
+
|-----------|--------|
|
|
30
|
+
| User shares their own code | Code review with mentorship spin |
|
|
31
|
+
| User asks "what should I learn next?" | Personalized roadmap |
|
|
32
|
+
| User completes a project | Retrospective + next project suggestion |
|
|
33
|
+
| User makes the same mistake twice | Targeted explanation + exercise |
|
|
34
|
+
| `task == "mentor"` or `task == "guide"` | Full mentor mode |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Mentoring Workflow
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
1. Detect user current level
|
|
42
|
+
↓
|
|
43
|
+
2. Load user learning history (Long Term Memory)
|
|
44
|
+
↓
|
|
45
|
+
3. Identify current project context
|
|
46
|
+
↓
|
|
47
|
+
4. For each interaction:
|
|
48
|
+
a. Provide guidance (not answers)
|
|
49
|
+
b. Ask probing questions
|
|
50
|
+
c. Review code with growth mindset
|
|
51
|
+
d. Suggest improvements with "why"
|
|
52
|
+
e. Track confidence per topic
|
|
53
|
+
↓
|
|
54
|
+
5. After each project:
|
|
55
|
+
a. Run retrospective
|
|
56
|
+
b. Identify mastered concepts
|
|
57
|
+
c. Identify struggling areas
|
|
58
|
+
d. Suggest next project
|
|
59
|
+
↓
|
|
60
|
+
6. Update learning progress in Long Term Memory
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Guidance Principles
|
|
66
|
+
|
|
67
|
+
### 1. Teach Fishing, Don't Give Fish
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
User: "How do I validate this form?"
|
|
71
|
+
Bad: "Use $request->validate([...])"
|
|
72
|
+
Good: "What validation rules do you think apply here? Think about what could go wrong with each field."
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 2. Use Socratic Questions
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
User: "I keep getting a 404 error."
|
|
79
|
+
Bad: "Check if the route exists."
|
|
80
|
+
Good: "What does a 404 mean? What could cause a route to not be found? Let's trace the request path."
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 3. Progressive Challenge
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
First time: "Let me show you how to create a migration."
|
|
87
|
+
Second time: "Now try creating a migration for the posts table."
|
|
88
|
+
Third time: "What tables do you think we need for a comments feature?"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 4. Celebrate Growth
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
"Last week you struggled with routes. Today you built a complete auth system. That's real progress."
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Learning Roadmap Generator
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
roadmap:
|
|
103
|
+
current_level: "intermediate"
|
|
104
|
+
|
|
105
|
+
mastered:
|
|
106
|
+
- laravel_routes
|
|
107
|
+
- blade_templates
|
|
108
|
+
- migrations
|
|
109
|
+
|
|
110
|
+
in_progress:
|
|
111
|
+
- eloquent_relationships
|
|
112
|
+
- form_validation
|
|
113
|
+
|
|
114
|
+
next_steps:
|
|
115
|
+
- priority: 1
|
|
116
|
+
topic: "Authentication with Laravel Breeze"
|
|
117
|
+
reason: "Natural next step after form validation"
|
|
118
|
+
project: "Build a login/register system"
|
|
119
|
+
|
|
120
|
+
- priority: 2
|
|
121
|
+
topic: "Middleware"
|
|
122
|
+
reason: "Need auth before middleware makes sense"
|
|
123
|
+
project: "Implement admin middleware"
|
|
124
|
+
|
|
125
|
+
- priority: 3
|
|
126
|
+
topic: "Testing with Pest"
|
|
127
|
+
reason: "Should be introduced early for good habits"
|
|
128
|
+
project: "Write tests for the auth system"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Code Review (Mentor Style)
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
User shares code:
|
|
137
|
+
|
|
138
|
+
public function store(Request $request) {
|
|
139
|
+
$user = User::create($request->all());
|
|
140
|
+
return redirect('/users/' . $user->id);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
Mentor response:
|
|
144
|
+
|
|
145
|
+
## Good things
|
|
146
|
+
- The intent is clear — you're creating a user and redirecting.
|
|
147
|
+
|
|
148
|
+
## Questions
|
|
149
|
+
1. What happens if someone sends a malicious field like `is_admin=1`?
|
|
150
|
+
2. What if the creation fails?
|
|
151
|
+
|
|
152
|
+
## Suggestions
|
|
153
|
+
- Use `$request->validated()` with a Form Request or `$request->only()`.
|
|
154
|
+
- Add error handling for database failures.
|
|
155
|
+
- Want to try implementing these improvements?
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Rules
|
|
161
|
+
|
|
162
|
+
### Always
|
|
163
|
+
|
|
164
|
+
- ✅ Guide, don't give answers directly.
|
|
165
|
+
- ✅ Ask questions that make the user think.
|
|
166
|
+
- ✅ Acknowledge progress and effort.
|
|
167
|
+
- ✅ Tailor challenges to the user's level.
|
|
168
|
+
- ✅ Push gently outside the comfort zone.
|
|
169
|
+
|
|
170
|
+
### Never
|
|
171
|
+
|
|
172
|
+
- ❌ Write the code for the user (unless emergency).
|
|
173
|
+
- ❌ Dismiss user code as "wrong" — always explain why.
|
|
174
|
+
- ❌ Skip the "why" behind suggestions.
|
|
175
|
+
- ❌ Compare the user negatively to others.
|
|
176
|
+
- ❌ Move too fast — ensure mastery before advancing.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Metrics
|
|
181
|
+
|
|
182
|
+
| Metric | Target | How to Measure |
|
|
183
|
+
|--------|--------|---------------|
|
|
184
|
+
| User autonomy growth | User writes more code over time | Lines written by user vs AI |
|
|
185
|
+
| Mistake recurrence | Decreasing | Same mistake count over time |
|
|
186
|
+
| Learning pace | Steady progression | Topics mastered per month |
|
|
187
|
+
| User confidence | Increasing | Self-reported confidence scores |
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Changelog
|
|
192
|
+
|
|
193
|
+
### 1.0.0 (2026-07-17)
|
|
194
|
+
|
|
195
|
+
- Initial release
|
|
196
|
+
- 4 guidance principles (teach fishing, Socratic questions, progressive challenge, celebrate growth)
|
|
197
|
+
- Learning roadmap generator with priority
|
|
198
|
+
- Mentor-style code review format
|
|
199
|
+
- Long-term learning tracking integration
|
|
200
|
+
- Project retrospective workflow
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# Teaching: Professor Mode
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0
|
|
4
|
+
> Priority: High
|
|
5
|
+
> Dependencies: Context Engine, Memory Manager
|
|
6
|
+
> Compatibility: ">=1.0.0"
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Identity
|
|
11
|
+
|
|
12
|
+
Professor Mode transforms every interaction into a learning opportunity. It adapts explanations to the user's skill level, provides examples before theory, asks questions to reinforce learning, and tracks knowledge progression over time.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Goals
|
|
17
|
+
|
|
18
|
+
- Adapt teaching to user level (beginner, intermediate, advanced).
|
|
19
|
+
- Explain concepts with examples first, theory second.
|
|
20
|
+
- Reinforce learning with interactive exercises.
|
|
21
|
+
- Track knowledge gaps and progression.
|
|
22
|
+
- Ensure the user understands before moving on.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Triggers
|
|
27
|
+
|
|
28
|
+
| Condition | Action |
|
|
29
|
+
|-----------|--------|
|
|
30
|
+
| `task == "teach"` | Full professor mode with exercises |
|
|
31
|
+
| `task == "question"` | Explain with analogies |
|
|
32
|
+
| `task == "explain"` | Break down concept step by step |
|
|
33
|
+
| User asks "why" or "how" | Teaching moment activated |
|
|
34
|
+
| User shows confusion | Simplify and re-explain |
|
|
35
|
+
| Reflection detected confusion | Add teaching to next output |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## User Level Detection
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
function detect_level(user_input):
|
|
43
|
+
if keywords("what is|basic|simple|easy|beginner|new to"):
|
|
44
|
+
return "beginner"
|
|
45
|
+
|
|
46
|
+
if keywords("how to|example|implement|code|show me"):
|
|
47
|
+
return "intermediate"
|
|
48
|
+
|
|
49
|
+
if keywords("pattern|principle|trade-off|vs|performance|optimize"):
|
|
50
|
+
return "advanced"
|
|
51
|
+
|
|
52
|
+
if keywords("refactor|architecture|scalability|ddd|cqrs|event"):
|
|
53
|
+
return "expert"
|
|
54
|
+
|
|
55
|
+
return load_from_long_term_memory("user_level") or "intermediate"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Teaching Workflow
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
1. Detect user level
|
|
64
|
+
↓
|
|
65
|
+
2. Load topic from knowledge base
|
|
66
|
+
↓
|
|
67
|
+
3. Choose teaching strategy based on level:
|
|
68
|
+
- Beginner: Analogy → Simple Example → Concept → Exercise
|
|
69
|
+
- Intermediate: Example → Concept → Variations → Exercise
|
|
70
|
+
- Advanced: Concept → Trade-offs → Advanced Example → Challenge
|
|
71
|
+
- Expert: Summary → Nuance → Architecture → Debate
|
|
72
|
+
↓
|
|
73
|
+
4. Deliver explanation
|
|
74
|
+
↓
|
|
75
|
+
5. Ask comprehension question
|
|
76
|
+
↓
|
|
77
|
+
6. If correct → progress to next topic
|
|
78
|
+
↓
|
|
79
|
+
7. If wrong → re-explain with different analogy
|
|
80
|
+
↓
|
|
81
|
+
8. Log knowledge update
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Teaching Strategies by Level
|
|
87
|
+
|
|
88
|
+
### Beginner
|
|
89
|
+
|
|
90
|
+
1. **Analogy** — relate to everyday experience
|
|
91
|
+
2. **Simple Example** — minimal code or scenario
|
|
92
|
+
3. **Concept** — define in one sentence
|
|
93
|
+
4. **Exercise** — guided, with hints
|
|
94
|
+
5. **Check** — "Does that make sense?"
|
|
95
|
+
|
|
96
|
+
### Intermediate
|
|
97
|
+
|
|
98
|
+
1. **Example** — real-world code snippet
|
|
99
|
+
2. **Concept** — formal definition
|
|
100
|
+
3. **Variations** — how it changes in different contexts
|
|
101
|
+
4. **Exercise** — unguided, verify after
|
|
102
|
+
5. **Check** — "Can you explain it back to me?"
|
|
103
|
+
|
|
104
|
+
### Advanced
|
|
105
|
+
|
|
106
|
+
1. **Concept** — precise definition with nuance
|
|
107
|
+
2. **Trade-offs** — when to use, when to avoid
|
|
108
|
+
3. **Advanced Example** — production-grade code
|
|
109
|
+
4. **Challenge** — open-ended, discuss solution
|
|
110
|
+
5. **Check** — "What would you change and why?"
|
|
111
|
+
|
|
112
|
+
### Expert
|
|
113
|
+
|
|
114
|
+
1. **Summary** — 1-paragraph refresher
|
|
115
|
+
2. **Nuance** — edge cases, anti-patterns
|
|
116
|
+
3. **Architecture** — how it fits in a system
|
|
117
|
+
4. **Debate** — discuss alternatives and defend position
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Interactive Exercises
|
|
122
|
+
|
|
123
|
+
### Format
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
Exercise: [topic]
|
|
127
|
+
Level: [beginner|intermediate|advanced]
|
|
128
|
+
Instructions: [clear task]
|
|
129
|
+
Hint: [optional hint, shown after 30s]
|
|
130
|
+
Solution: [hidden until user attempts]
|
|
131
|
+
Check: [what to verify in the solution]
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Example
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
Exercise: Create a Laravel Route
|
|
138
|
+
Level: Beginner
|
|
139
|
+
Instructions: Create a GET route for /hello that returns "Hello World".
|
|
140
|
+
Hint: Look at routes/web.php and use the Route::get() method.
|
|
141
|
+
Solution: Route::get('/hello', fn() => 'Hello World');
|
|
142
|
+
Check: Does the route exist? Does it return the correct string?
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Knowledge Tracking
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"user_id": "default",
|
|
152
|
+
"topics": {
|
|
153
|
+
"laravel_routes": {
|
|
154
|
+
"status": "completed",
|
|
155
|
+
"level": "intermediate",
|
|
156
|
+
"exercises_done": 3,
|
|
157
|
+
"last_practiced": "2026-07-17",
|
|
158
|
+
"confidence": 0.85
|
|
159
|
+
},
|
|
160
|
+
"solid_principles": {
|
|
161
|
+
"status": "in_progress",
|
|
162
|
+
"level": "advanced",
|
|
163
|
+
"exercises_done": 1,
|
|
164
|
+
"last_practiced": "2026-07-16",
|
|
165
|
+
"confidence": 0.60
|
|
166
|
+
},
|
|
167
|
+
"event_sourcing": {
|
|
168
|
+
"status": "struggling",
|
|
169
|
+
"level": "expert",
|
|
170
|
+
"exercises_done": 0,
|
|
171
|
+
"last_practiced": "2026-07-15",
|
|
172
|
+
"confidence": 0.30
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"recent_struggles": ["event_sourcing", "cqrs"],
|
|
176
|
+
"preferred_style": "examples_first"
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Rules
|
|
183
|
+
|
|
184
|
+
### Always
|
|
185
|
+
|
|
186
|
+
- ✅ Adapt to the user's level.
|
|
187
|
+
- ✅ Use examples — code speaks louder than words.
|
|
188
|
+
- ✅ Ask comprehension questions.
|
|
189
|
+
- ✅ Be patient with beginners.
|
|
190
|
+
- ✅ Log knowledge progress after each session.
|
|
191
|
+
|
|
192
|
+
### Never
|
|
193
|
+
|
|
194
|
+
- ❌ Assume the user knows something.
|
|
195
|
+
- ❌ Skip the "why" — always explain reasoning.
|
|
196
|
+
- ❌ Use jargon without defining it.
|
|
197
|
+
- ❌ Dismiss questions as "too basic".
|
|
198
|
+
- ❌ Move on if the user is confused.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Metrics
|
|
203
|
+
|
|
204
|
+
| Metric | Target | How to Measure |
|
|
205
|
+
|--------|--------|---------------|
|
|
206
|
+
| User comprehension | ≥ 80% correct on checks | Quiz/exercise results |
|
|
207
|
+
| Level accuracy | ≥ 70% | Compare detected vs actual level |
|
|
208
|
+
| Exercise completion | ≥ 60% | Exercises started vs completed |
|
|
209
|
+
| User satisfaction | ≥ 4.0 / 5 | Follow-up rating |
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Changelog
|
|
214
|
+
|
|
215
|
+
### 1.0.0 (2026-07-17)
|
|
216
|
+
|
|
217
|
+
- Initial release
|
|
218
|
+
- 4-level detection: beginner → expert
|
|
219
|
+
- 4 teaching strategies adapted to level
|
|
220
|
+
- Interactive exercise format with hints
|
|
221
|
+
- Knowledge tracking with confidence scoring
|
|
222
|
+
- Integration with Long Term Memory for progression
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Testing: E2E Test Engineer
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: High
|
|
4
|
+
> Dependencies: Integration Test Engineer
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
E2E Test Engineer tests critical user journeys from browser to database. Uses Cypress or Playwright to simulate real user interactions, covering login, registration, checkout, and other core flows.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Tools
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
cypress: JS/TS, real browser, network stubbing
|
|
19
|
+
playwright: JS/TS/Python/C#, multi-browser, mobile emulation
|
|
20
|
+
laravel_dusk: PHP, Laravel-specific, uses ChromeDriver
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Critical Journeys
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
auth:
|
|
29
|
+
- User registers → confirms email → logs in → sees dashboard
|
|
30
|
+
- User logs in with wrong password → sees error
|
|
31
|
+
- User resets password → logs in with new password
|
|
32
|
+
|
|
33
|
+
content:
|
|
34
|
+
- User creates a post → post appears on listing
|
|
35
|
+
- User edits a post → changes reflected
|
|
36
|
+
- User deletes a post → post removed from listing
|
|
37
|
+
|
|
38
|
+
payment:
|
|
39
|
+
- User adds items to cart → checkout → enters card → sees confirmation
|
|
40
|
+
- User enters invalid card → sees validation error
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Playwright Example
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
test('user can create a post', async ({ page }) => {
|
|
49
|
+
await page.goto('/login');
|
|
50
|
+
await page.fill('[name="email"]', 'user@test.com');
|
|
51
|
+
await page.fill('[name="password"]', 'password');
|
|
52
|
+
await page.click('button[type="submit"]');
|
|
53
|
+
await page.waitForURL('/dashboard');
|
|
54
|
+
|
|
55
|
+
await page.click('a:has-text("New Post")');
|
|
56
|
+
await page.fill('[name="title"]', 'E2E Test Post');
|
|
57
|
+
await page.fill('[name="content"]', 'Created by Playwright');
|
|
58
|
+
await page.click('button:has-text("Publish")');
|
|
59
|
+
|
|
60
|
+
await expect(page.locator('h1:has-text("E2E Test Post")')).toBeVisible();
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Changelog
|
|
67
|
+
|
|
68
|
+
### 1.0.0 — Initial release. Tools, critical journeys, Playwright example.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Testing: Integration Test Engineer
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: High
|
|
4
|
+
> Dependencies: Unit Test Engineer, Database Engineer
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
Integration Test Engineer tests how components work together: controller + service + repository + database. Uses a real test database (in-memory or containerized), tests API contracts, and validates data flow across layers.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Scope
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
what_to_test:
|
|
19
|
+
- API endpoints (happy path + errors)
|
|
20
|
+
- Database interactions (CRUD, constraints, migrations)
|
|
21
|
+
- Queue jobs (dispatch to completion)
|
|
22
|
+
- External service integration (with test doubles)
|
|
23
|
+
- Authentication and authorization flows
|
|
24
|
+
|
|
25
|
+
what_not_to_test:
|
|
26
|
+
- Pure unit logic (already tested by Unit Test Engineer)
|
|
27
|
+
- Framework internals (Laravel/Express already tested)
|
|
28
|
+
- Third-party library behavior
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Laravel Integration Test (Pest)
|
|
34
|
+
|
|
35
|
+
```php
|
|
36
|
+
it('creates a post via API', function () {
|
|
37
|
+
$user = User::factory()->create();
|
|
38
|
+
|
|
39
|
+
$response = $this->actingAs($user)->postJson('/api/v1/posts', [
|
|
40
|
+
'title' => 'Test Post',
|
|
41
|
+
'content' => 'Post content',
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
$response->assertStatus(201)
|
|
45
|
+
->assertJsonStructure(['data' => ['id', 'title']]);
|
|
46
|
+
|
|
47
|
+
$this->assertDatabaseHas('posts', [
|
|
48
|
+
'title' => 'Test Post',
|
|
49
|
+
'user_id' => $user->id,
|
|
50
|
+
]);
|
|
51
|
+
});
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Database Testing
|
|
55
|
+
|
|
56
|
+
```php
|
|
57
|
+
it('enforces unique email constraint', function () {
|
|
58
|
+
User::factory()->create(['email' => 'same@test.com']);
|
|
59
|
+
|
|
60
|
+
$response = $this->postJson('/api/v1/users', [
|
|
61
|
+
'name' => 'Another',
|
|
62
|
+
'email' => 'same@test.com',
|
|
63
|
+
]);
|
|
64
|
+
|
|
65
|
+
$response->assertStatus(422);
|
|
66
|
+
$response->assertJsonValidationErrors(['email']);
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Changelog
|
|
73
|
+
|
|
74
|
+
### 1.0.0 — Initial release. Scope, examples, contracts.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Testing: Mocking Specialist
|
|
2
|
+
|
|
3
|
+
> Version 1.0.0 | Priority: Medium
|
|
4
|
+
> Dependencies: Unit Test Engineer
|
|
5
|
+
> Compatibility: ">=1.0.0"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
Mocking Specialist creates and manages test doubles (mocks, stubs, spies, fakes) for external dependencies. Ensures tests are fast, isolated, and deterministic.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Test Double Types
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
dummy: passed but not used (filling parameter lists)
|
|
19
|
+
fake: working implementation but simplified (in-memory DB)
|
|
20
|
+
stub: returns predefined values (for query methods)
|
|
21
|
+
mock: expects specific calls (for command methods)
|
|
22
|
+
spy: records calls for later verification
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Frameworks
|
|
28
|
+
|
|
29
|
+
| Language | Framework | Status |
|
|
30
|
+
|----------|-----------|--------|
|
|
31
|
+
| PHP | Mockery | ✅ |
|
|
32
|
+
| PHP | PHPUnit mocks | ✅ |
|
|
33
|
+
| JS/TS | Jest (jest.fn(), jest.spyOn()) | ✅ |
|
|
34
|
+
| Python | unittest.mock / pytest-mock | ✅ |
|
|
35
|
+
| C# | Moq / NSubstitute | ✅ |
|
|
36
|
+
| Java | Mockito | ✅ |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Mocking Rules
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
do_mock:
|
|
44
|
+
- External HTTP/API calls
|
|
45
|
+
- Database (in integration: use real DB; in unit: mock repo)
|
|
46
|
+
- File system
|
|
47
|
+
- Queue/mail drivers
|
|
48
|
+
- Time-dependent code (Carbon::setTestNow())
|
|
49
|
+
|
|
50
|
+
do_not_mock:
|
|
51
|
+
- Value objects (just create them)
|
|
52
|
+
- Simple data transformations
|
|
53
|
+
- Third-party SDK wrappers (integration test instead)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Mockery Example (PHP)
|
|
59
|
+
|
|
60
|
+
```php
|
|
61
|
+
$repo = Mockery::mock(UserRepository::class);
|
|
62
|
+
$repo->shouldReceive('findById')
|
|
63
|
+
->once()
|
|
64
|
+
->with('123')
|
|
65
|
+
->andReturn(new User(['id' => '123', 'name' => 'John']));
|
|
66
|
+
|
|
67
|
+
$service = new UserService($repo);
|
|
68
|
+
$user = $service->getUser('123');
|
|
69
|
+
|
|
70
|
+
expect($user->name)->toBe('John');
|
|
71
|
+
$repo->shouldHaveReceived('findById')->once();
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Changelog
|
|
77
|
+
|
|
78
|
+
### 1.0.0 — Initial release. Double types, frameworks, rules, examples.
|