antigravity-devkit 1.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.
Files changed (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +421 -0
  3. package/bin/cli.js +179 -0
  4. package/package.json +38 -0
  5. package/template/ARCHITECTURE.md +148 -0
  6. package/template/README.md +421 -0
  7. package/template/agents/backend-specialist.md +137 -0
  8. package/template/agents/database-architect.md +114 -0
  9. package/template/agents/debugger.md +108 -0
  10. package/template/agents/devops-engineer.md +125 -0
  11. package/template/agents/documentation-writer.md +109 -0
  12. package/template/agents/explorer-agent.md +107 -0
  13. package/template/agents/frontend-specialist.md +231 -0
  14. package/template/agents/orchestrator.md +100 -0
  15. package/template/agents/performance-optimizer.md +109 -0
  16. package/template/agents/project-planner.md +123 -0
  17. package/template/agents/security-auditor.md +107 -0
  18. package/template/agents/test-engineer.md +133 -0
  19. package/template/rules/GEMINI.md +180 -0
  20. package/template/scripts/checklist.py +170 -0
  21. package/template/scripts/verify_all.py +243 -0
  22. package/template/skills/api-patterns/SKILL.md +116 -0
  23. package/template/skills/architecture/SKILL.md +98 -0
  24. package/template/skills/aspnet-patterns/SKILL.md +120 -0
  25. package/template/skills/azure-aks/SKILL.md +136 -0
  26. package/template/skills/azure-devops/SKILL.md +123 -0
  27. package/template/skills/azure-keyvault/SKILL.md +100 -0
  28. package/template/skills/brainstorming/SKILL.md +96 -0
  29. package/template/skills/clean-code/SKILL.md +84 -0
  30. package/template/skills/csharp-patterns/SKILL.md +115 -0
  31. package/template/skills/documentation-templates/SKILL.md +127 -0
  32. package/template/skills/english-education/SKILL.md +116 -0
  33. package/template/skills/english-education/references/lesson-templates.md +151 -0
  34. package/template/skills/english-education/references/quiz-templates.md +177 -0
  35. package/template/skills/english-education/scripts/curriculum_validator.py +175 -0
  36. package/template/skills/frontend-design/SKILL.md +199 -0
  37. package/template/skills/frontend-design/animation-guide.md +217 -0
  38. package/template/skills/frontend-design/design-systems.md +230 -0
  39. package/template/skills/frontend-design/ux-psychology.md +128 -0
  40. package/template/skills/gitops-patterns/SKILL.md +105 -0
  41. package/template/skills/grafana-logging/SKILL.md +107 -0
  42. package/template/skills/intelligent-routing/SKILL.md +75 -0
  43. package/template/skills/plan-writing/SKILL.md +96 -0
  44. package/template/skills/sqlserver-design/SKILL.md +97 -0
  45. package/template/skills/systematic-debugging/SKILL.md +98 -0
  46. package/template/skills/testing-patterns/SKILL.md +102 -0
  47. package/template/skills/vitest-testing/SKILL.md +116 -0
  48. package/template/skills/vue3-patterns/SKILL.md +195 -0
  49. package/template/skills/vulnerability-scanner/SKILL.md +104 -0
  50. package/template/skills/xunit-testing/SKILL.md +127 -0
  51. package/template/workflows/brainstorm.md +69 -0
  52. package/template/workflows/code.md +82 -0
  53. package/template/workflows/create.md +79 -0
  54. package/template/workflows/debug.md +83 -0
  55. package/template/workflows/deploy.md +101 -0
  56. package/template/workflows/orchestrate.md +86 -0
  57. package/template/workflows/plan.md +79 -0
  58. package/template/workflows/review.md +85 -0
  59. package/template/workflows/status.md +90 -0
  60. package/template/workflows/test.md +89 -0
@@ -0,0 +1,128 @@
1
+ # UX Psychology Reference
2
+
3
+ > Core UX laws, emotional design, trust building, and cognitive load management.
4
+
5
+ ---
6
+
7
+ ## Core UX Laws
8
+
9
+ | Law | Principle | Application |
10
+ |-----|-----------|-------------|
11
+ | **Hick's Law** | More choices = slower decisions | Max 5-7 nav items, progressive disclosure |
12
+ | **Fitts' Law** | Bigger + closer = easier to click | CTAs min 44px height, touch 44×44px |
13
+ | **Miller's Law** | 7±2 items in working memory | Chunk content, group related items |
14
+ | **Von Restorff** | Different = memorable | Make CTAs visually distinct |
15
+ | **Serial Position** | First/last remembered | Key info at start and end |
16
+
17
+ ---
18
+
19
+ ## Emotional Design (Don Norman)
20
+
21
+ ```
22
+ VISCERAL (instant) → First impression: colors, imagery, overall feel
23
+ "Wow, this looks beautiful!"
24
+
25
+ BEHAVIORAL (use) → Using it: speed, feedback, efficiency
26
+ "This works exactly how I expected!"
27
+
28
+ REFLECTIVE (memory) → After: identity, values, loyalty
29
+ "This brand represents who I am"
30
+ ```
31
+
32
+ ### Designing for Each Level
33
+
34
+ | Level | Focus | Implementation |
35
+ |-------|-------|----------------|
36
+ | **Visceral** | Beauty, first impression | Hero visuals, micro-interactions |
37
+ | **Behavioral** | Usability, feedback | Instant confirmations, smooth flows |
38
+ | **Reflective** | Identity, story | Brand values, testimonials, story |
39
+
40
+ ---
41
+
42
+ ## Trust Building
43
+
44
+ | Category | Elements | Placement |
45
+ |----------|----------|-----------|
46
+ | **Security** | SSL badges, encryption | Forms, checkout |
47
+ | **Social Proof** | Reviews, testimonials | Hero, product pages |
48
+ | **Transparency** | Clear pricing, policies | Footer, checkout |
49
+ | **Professional** | Consistent design | Everywhere |
50
+ | **Authority** | Certifications, media mentions | Header, about |
51
+
52
+ ```
53
+ Trust Signal Placement:
54
+ ┌─────────────────────────────────────────┐
55
+ │ HEADER: Trust banner, security icons │
56
+ ├─────────────────────────────────────────┤
57
+ │ HERO: Social proof ("10,000+ users") │
58
+ ├─────────────────────────────────────────┤
59
+ │ PRODUCT: Reviews, guarantees │
60
+ ├─────────────────────────────────────────┤
61
+ │ CHECKOUT: Payment icons, SSL badge │
62
+ ├─────────────────────────────────────────┤
63
+ │ FOOTER: Contact, policies, certs │
64
+ └─────────────────────────────────────────┘
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Cognitive Load Management
70
+
71
+ | Type | Definition | Designer's Role |
72
+ |------|------------|-----------------|
73
+ | **Intrinsic** | Task complexity | Break into smaller steps |
74
+ | **Extraneous** | Poor design load | **ELIMINATE THIS!** |
75
+ | **Germane** | Learning effort | Support and encourage |
76
+
77
+ ### Reduction Strategies
78
+
79
+ 1. **Simplify** - Remove visual noise, clean layouts
80
+ 2. **Chunk** - Group into 5-7 item sets
81
+ 3. **Progressive Disclosure** - Hide advanced options
82
+ 4. **Familiar Patterns** - Standard placements
83
+ 5. **Offload** - Don't make users remember
84
+
85
+ ---
86
+
87
+ ## Audience → Design Approach
88
+
89
+ | Audience | Colors | Typography | Layout | Trust |
90
+ |----------|--------|------------|--------|-------|
91
+ | **Gen Z** | Bold, vibrant | Large, experimental | Mobile-first, vertical | Peer reviews |
92
+ | **Millennials** | Muted, earth tones | Clean sans-serif | Card-based | Values, sustainability |
93
+ | **Gen X** | Professional | Conservative | Traditional hierarchy | Track record |
94
+ | **Boomers** | High contrast | Large (18px+) | Simple, linear | Phone numbers, people |
95
+ | **B2B** | Corporate blues | Professional | Data-focused | Certifications |
96
+ | **Luxury** | Black, gold | Elegant serif | Spacious, minimal | Exclusivity |
97
+
98
+ ---
99
+
100
+ ## Emotion Color Mapping
101
+
102
+ | Emotion | Colors | Industry Use |
103
+ |---------|--------|--------------|
104
+ | **Trust** | Blue, Green | Finance, Healthcare |
105
+ | **Excitement** | Red, Orange | Sales, Sports |
106
+ | **Calm** | Soft blue/green | Wellness, Spa |
107
+ | **Luxury** | Black, Gold | Premium brands |
108
+ | **Energy** | Yellow, Orange | Fitness, Kids |
109
+ | **Nature** | Green, Brown | Eco, Organic |
110
+
111
+ ---
112
+
113
+ ## Psychology Checklist
114
+
115
+ Before launch, verify:
116
+
117
+ - [ ] **Hick's Law** - Max 7 nav items
118
+ - [ ] **Fitts' Law** - Large, reachable CTAs
119
+ - [ ] **Miller's Law** - Content chunked properly
120
+ - [ ] **Von Restorff** - CTAs stand out
121
+ - [ ] **Trust signals** - Security, reviews visible
122
+ - [ ] **Cognitive load** - Clean, not overwhelming
123
+ - [ ] **Feedback** - All actions confirmed
124
+ - [ ] **Accessibility** - Inclusive for all users
125
+
126
+ ---
127
+
128
+ > **Remember:** UX is psychology. Every design decision affects user behavior.
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: gitops-patterns
3
+ description: GitOps patterns with ArgoCD and Flux
4
+ ---
5
+
6
+ # GitOps Patterns
7
+
8
+ > Git as the source of truth for infrastructure.
9
+
10
+ ---
11
+
12
+ ## GitOps Flow
13
+
14
+ ```
15
+ Code Change → PR → Merge → CI Build → Image Push → Git Sync → Deploy
16
+ ```
17
+
18
+ | Step | Tool |
19
+ |------|------|
20
+ | CI Build | Azure DevOps |
21
+ | Image Push | Azure Container Registry |
22
+ | Git Sync | ArgoCD / Flux |
23
+ | Deploy | AKS |
24
+
25
+ ---
26
+
27
+ ## Repository Structure
28
+
29
+ ```
30
+ gitops-repo/
31
+ ├── base/ # Base manifests
32
+ │ ├── deployment.yaml
33
+ │ ├── service.yaml
34
+ │ └── kustomization.yaml
35
+ ├── overlays/
36
+ │ ├── dev/
37
+ │ │ └── kustomization.yaml
38
+ │ ├── staging/
39
+ │ │ └── kustomization.yaml
40
+ │ └── prod/
41
+ │ └── kustomization.yaml
42
+ ```
43
+
44
+ ---
45
+
46
+ ## ArgoCD Application
47
+
48
+ ```yaml
49
+ apiVersion: argoproj.io/v1alpha1
50
+ kind: Application
51
+ metadata:
52
+ name: myapp
53
+ namespace: argocd
54
+ spec:
55
+ project: default
56
+ source:
57
+ repoURL: https://github.com/org/gitops-repo
58
+ targetRevision: HEAD
59
+ path: overlays/prod
60
+ destination:
61
+ server: https://kubernetes.default.svc
62
+ namespace: production
63
+ syncPolicy:
64
+ automated:
65
+ prune: true
66
+ selfHeal: true
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Flux Configuration
72
+
73
+ ```yaml
74
+ apiVersion: source.toolkit.fluxcd.io/v1
75
+ kind: GitRepository
76
+ metadata:
77
+ name: myapp
78
+ spec:
79
+ interval: 1m
80
+ url: https://github.com/org/gitops-repo
81
+ ref:
82
+ branch: main
83
+ ---
84
+ apiVersion: kustomize.toolkit.fluxcd.io/v1
85
+ kind: Kustomization
86
+ metadata:
87
+ name: myapp
88
+ spec:
89
+ interval: 10m
90
+ path: ./overlays/prod
91
+ sourceRef:
92
+ kind: GitRepository
93
+ name: myapp
94
+ ```
95
+
96
+ ---
97
+
98
+ ## DO / DON'T
99
+
100
+ | ✅ Do | ❌ Don't |
101
+ |-------|---------|
102
+ | Git for all changes | kubectl apply manually |
103
+ | Automated sync | Manual deployments |
104
+ | Environment overlays | Duplicate manifests |
105
+ | PR reviews | Direct pushes |
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: grafana-logging
3
+ description: Grafana dashboards and metrics logging
4
+ ---
5
+
6
+ # Grafana Logging
7
+
8
+ > Metrics, dashboards, and alerting with Grafana.
9
+
10
+ ---
11
+
12
+ ## Key Metrics
13
+
14
+ ### Application Metrics
15
+ | Metric | Description |
16
+ |--------|-------------|
17
+ | Request rate | Requests per second |
18
+ | Error rate | Errors per second |
19
+ | Duration | Response time percentiles |
20
+ | Active requests | Concurrent requests |
21
+
22
+ ### Infrastructure Metrics
23
+ | Metric | Description |
24
+ |--------|-------------|
25
+ | CPU usage | Percentage used |
26
+ | Memory usage | Bytes used |
27
+ | Disk I/O | Read/write operations |
28
+ | Network | Bytes in/out |
29
+
30
+ ---
31
+
32
+ ## Prometheus Metrics (ASP.NET)
33
+
34
+ ```csharp
35
+ // Install package
36
+ // dotnet add package prometheus-net.AspNetCore
37
+
38
+ // Program.cs
39
+ app.UseMetricServer(); // /metrics endpoint
40
+ app.UseHttpMetrics(); // HTTP request metrics
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Custom Metrics
46
+
47
+ ```csharp
48
+ using Prometheus;
49
+
50
+ public class OrderService
51
+ {
52
+ private static readonly Counter OrdersCreated = Metrics
53
+ .CreateCounter("orders_created_total", "Total orders created");
54
+
55
+ private static readonly Histogram OrderDuration = Metrics
56
+ .CreateHistogram("order_duration_seconds", "Order processing time");
57
+
58
+ public async Task CreateOrder(Order order)
59
+ {
60
+ using (OrderDuration.NewTimer())
61
+ {
62
+ await ProcessOrder(order);
63
+ OrdersCreated.Inc();
64
+ }
65
+ }
66
+ }
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Dashboard Queries
72
+
73
+ ```promql
74
+ # Request rate
75
+ rate(http_requests_total[5m])
76
+
77
+ # Error rate
78
+ rate(http_requests_total{status=~"5.."}[5m])
79
+
80
+ # 95th percentile latency
81
+ histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))
82
+ ```
83
+
84
+ ---
85
+
86
+ ## Alerting
87
+
88
+ ```yaml
89
+ # Alert rule
90
+ - alert: HighErrorRate
91
+ expr: rate(http_requests_total{status=~"5.."}[5m]) > 0.1
92
+ for: 5m
93
+ labels:
94
+ severity: critical
95
+ annotations:
96
+ summary: High error rate detected
97
+ ```
98
+
99
+ ---
100
+
101
+ ## DO / DON'T
102
+
103
+ | ✅ Do | ❌ Don't |
104
+ |-------|---------|
105
+ | RED method (Rate, Error, Duration) | Track everything |
106
+ | Set alerting thresholds | Alert fatigue |
107
+ | Dashboard per service | One giant dashboard |
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: intelligent-routing
3
+ description: Auto-select best agent for each request
4
+ ---
5
+
6
+ # Intelligent Routing
7
+
8
+ > Automatically select the best agent for each task.
9
+
10
+ ---
11
+
12
+ ## Routing Matrix
13
+
14
+ | Keywords | Agent |
15
+ |----------|-------|
16
+ | vue, component, pinia, frontend | frontend-specialist |
17
+ | api, controller, service, c#, aspnet | backend-specialist |
18
+ | sql, database, schema, query | database-architect |
19
+ | deploy, pipeline, aks, kubernetes | devops-engineer |
20
+ | security, keyvault, audit, owasp | security-auditor |
21
+ | test, xunit, vitest, coverage | test-engineer |
22
+ | bug, error, fix, debug | debugger |
23
+ | performance, slow, metrics | performance-optimizer |
24
+ | docs, readme, documentation | documentation-writer |
25
+ | analyze, explore, overview | explorer-agent |
26
+ | plan, design, architecture | project-planner |
27
+ | complex, multi-domain | orchestrator |
28
+
29
+ ---
30
+
31
+ ## Routing Protocol
32
+
33
+ ### Step 1: Analyze Request
34
+ Identify keywords and domain indicators.
35
+
36
+ ### Step 2: Match Agent
37
+ Use routing matrix to find best match.
38
+
39
+ ### Step 3: Check Complexity
40
+ - Single domain → Direct to specialist
41
+ - Multi-domain → Route to orchestrator
42
+
43
+ ### Step 4: Inform User
44
+ ```markdown
45
+ 🤖 **Applying `@[agent-name]`...**
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Multi-Domain Detection
51
+
52
+ | Indicators | Action |
53
+ |------------|--------|
54
+ | "full-stack" | orchestrator |
55
+ | Frontend + Backend | orchestrator |
56
+ | Multiple file types | orchestrator |
57
+
58
+ ---
59
+
60
+ ## Override Rules
61
+
62
+ | User Says | Action |
63
+ |-----------|--------|
64
+ | @agent-name | Use specified agent |
65
+ | /command | Follow command flow |
66
+ | "don't ask" | Skip Socratic Gate |
67
+
68
+ ---
69
+
70
+ ## Fallback
71
+
72
+ If no clear match:
73
+ 1. Ask user to clarify
74
+ 2. Default to `project-planner` for planning
75
+ 3. Default to `orchestrator` for execution
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: plan-writing
3
+ description: Task breakdown and project planning
4
+ ---
5
+
6
+ # Plan Writing
7
+
8
+ > Structure tasks for clear execution.
9
+
10
+ ---
11
+
12
+ ## Plan File Format
13
+
14
+ **Location:** `docs/PLAN-{slug}.md`
15
+
16
+ ```markdown
17
+ # PLAN: [Feature Name]
18
+
19
+ ## Overview
20
+ Brief description of what we're building.
21
+
22
+ ## Requirements
23
+ - [ ] Requirement 1
24
+ - [ ] Requirement 2
25
+
26
+ ## Tasks
27
+
28
+ ### Phase 1: Backend
29
+ - [ ] Task 1 [@backend-specialist]
30
+ - [ ] Task 2 [@database-architect]
31
+
32
+ ### Phase 2: Frontend
33
+ - [ ] Task 3 [@frontend-specialist]
34
+
35
+ ### Phase 3: Testing
36
+ - [ ] Task 4 [@test-engineer]
37
+
38
+ ## Verification
39
+ - [ ] Run checklist.py
40
+ - [ ] Manual testing
41
+ - [ ] Code review
42
+ ```
43
+
44
+ ---
45
+
46
+ ## Task Breakdown Rules
47
+
48
+ | Rule | Description |
49
+ |------|-------------|
50
+ | Specific | Clear deliverable |
51
+ | Atomic | Single responsibility |
52
+ | Assigned | Agent specified |
53
+ | Ordered | Dependencies clear |
54
+
55
+ ---
56
+
57
+ ## Naming Convention
58
+
59
+ | Request | Slug |
60
+ |---------|------|
61
+ | E-commerce cart | ecommerce-cart |
62
+ | User authentication | user-auth |
63
+ | Dashboard analytics | dashboard-analytics |
64
+
65
+ ---
66
+
67
+ ## Task Sizing
68
+
69
+ | Size | Description | Time |
70
+ |------|-------------|------|
71
+ | S | Single file change | < 30 min |
72
+ | M | Few files, one domain | 1-2 hours |
73
+ | L | Multiple domains | 2-4 hours |
74
+ | XL | Break into sub-tasks | - |
75
+
76
+ ---
77
+
78
+ ## Dependencies
79
+
80
+ ```markdown
81
+ ## Tasks
82
+ - [ ] 1. Create database schema [@database-architect]
83
+ - [ ] 2. Create API endpoints [@backend-specialist] (depends: 1)
84
+ - [ ] 3. Create UI components [@frontend-specialist] (depends: 2)
85
+ ```
86
+
87
+ ---
88
+
89
+ ## DO / DON'T
90
+
91
+ | ✅ Do | ❌ Don't |
92
+ |-------|---------|
93
+ | Assign agents | Leave unassigned |
94
+ | Order by dependency | Random order |
95
+ | Include verification | Skip testing tasks |
96
+ | Break large tasks | Massive single tasks |
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: sqlserver-design
3
+ description: SQL Server schema design and query optimization
4
+ ---
5
+
6
+ # SQL Server Design
7
+
8
+ > Efficient schema design and query optimization.
9
+
10
+ ---
11
+
12
+ ## Naming Conventions
13
+
14
+ | Element | Convention | Example |
15
+ |---------|------------|---------|
16
+ | Table | PascalCase, plural | Users, Orders |
17
+ | Column | PascalCase | FirstName |
18
+ | PK | Id | Id |
19
+ | FK | {Table}Id | UserId |
20
+ | Index | IX_{Table}_{Column} | IX_Users_Email |
21
+
22
+ ---
23
+
24
+ ## Standard Columns
25
+
26
+ ```sql
27
+ CREATE TABLE Users (
28
+ Id INT IDENTITY(1,1) PRIMARY KEY,
29
+ -- Business columns
30
+ Email NVARCHAR(255) NOT NULL,
31
+ Name NVARCHAR(100) NOT NULL,
32
+ -- Audit columns
33
+ CreatedAt DATETIME2 DEFAULT GETUTCDATE(),
34
+ UpdatedAt DATETIME2 NULL,
35
+ IsDeleted BIT DEFAULT 0
36
+ );
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Relationships
42
+
43
+ ```sql
44
+ -- One-to-Many
45
+ ALTER TABLE Orders
46
+ ADD CONSTRAINT FK_Orders_Users
47
+ FOREIGN KEY (UserId) REFERENCES Users(Id);
48
+
49
+ -- Many-to-Many
50
+ CREATE TABLE UserRoles (
51
+ UserId INT,
52
+ RoleId INT,
53
+ PRIMARY KEY (UserId, RoleId)
54
+ );
55
+ ```
56
+
57
+ ---
58
+
59
+ ## Indexing
60
+
61
+ | Scenario | Index Type |
62
+ |----------|------------|
63
+ | Primary key | Clustered (auto) |
64
+ | Foreign key | Non-clustered |
65
+ | Search column | Non-clustered |
66
+ | Composite search | Composite |
67
+
68
+ ```sql
69
+ CREATE INDEX IX_Users_Email ON Users(Email);
70
+ CREATE INDEX IX_Orders_UserId ON Orders(UserId);
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Query Patterns
76
+
77
+ ```sql
78
+ -- Parameterized (safe)
79
+ SELECT * FROM Users WHERE Email = @Email
80
+
81
+ -- Pagination
82
+ SELECT * FROM Users
83
+ ORDER BY CreatedAt DESC
84
+ OFFSET @Skip ROWS
85
+ FETCH NEXT @Take ROWS ONLY
86
+ ```
87
+
88
+ ---
89
+
90
+ ## DO / DON'T
91
+
92
+ | ✅ Do | ❌ Don't |
93
+ |-------|---------|
94
+ | Parameterized queries | String concatenation |
95
+ | Index foreign keys | Skip FK indexes |
96
+ | UTC timestamps | Local time |
97
+ | Soft delete | Hard delete (usually) |
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: systematic-debugging
3
+ description: Root cause analysis and debugging methodology
4
+ ---
5
+
6
+ # Systematic Debugging
7
+
8
+ > Find root causes, not just symptoms.
9
+
10
+ ---
11
+
12
+ ## Debugging Flow
13
+
14
+ ```
15
+ 1. REPRODUCE → Can you trigger the bug?
16
+ 2. ISOLATE → Where exactly does it fail?
17
+ 3. IDENTIFY → What is the root cause?
18
+ 4. FIX → Minimal change to solve it
19
+ 5. VERIFY → Does it work? Any regressions?
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Questions to Ask
25
+
26
+ ### Reproduce
27
+ - What are the exact steps?
28
+ - What's expected vs actual?
29
+ - Is it consistent or intermittent?
30
+
31
+ ### Isolate
32
+ - Which file/function fails?
33
+ - What changed recently?
34
+ - What are the inputs?
35
+
36
+ ### Identify
37
+ - Is this the root cause or symptom?
38
+ - Why does this happen?
39
+ - Are there similar issues?
40
+
41
+ ---
42
+
43
+ ## Error Pattern Analysis
44
+
45
+ | Symptom | Check |
46
+ |---------|-------|
47
+ | 500 error | Logs, exception details |
48
+ | 404 error | Routes, URLs |
49
+ | Null reference | Data flow, null checks |
50
+ | Type error | Types, casting |
51
+ | Works locally | Environment config |
52
+ | Intermittent | Race conditions, timing |
53
+
54
+ ---
55
+
56
+ ## Logging Strategy
57
+
58
+ ```csharp
59
+ // C# - structured logging
60
+ _logger.LogError(ex, "Failed to process order {OrderId}", orderId);
61
+ ```
62
+
63
+ ```typescript
64
+ // TypeScript
65
+ console.error('Failed to fetch user:', { userId, error });
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Fix Principles
71
+
72
+ | Principle | Description |
73
+ |-----------|-------------|
74
+ | Minimal | Smallest change that works |
75
+ | Focused | Only fix the bug |
76
+ | Tested | Add regression test |
77
+ | Documented | Comment if complex |
78
+
79
+ ---
80
+
81
+ ## Post-Fix Checklist
82
+
83
+ - [ ] Root cause confirmed
84
+ - [ ] Minimal fix applied
85
+ - [ ] Regression test added
86
+ - [ ] No side effects
87
+ - [ ] Documentation updated
88
+
89
+ ---
90
+
91
+ ## DO / DON'T
92
+
93
+ | ✅ Do | ❌ Don't |
94
+ |-------|---------|
95
+ | Find root cause | Patch symptoms |
96
+ | Minimal changes | Multiple fixes |
97
+ | Add tests | Skip verification |
98
+ | Check side effects | Assume it works |