kiro-agent-team 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 (155) hide show
  1. package/.kiro/README.md +228 -0
  2. package/.kiro/agents/backend-engineer.json +6 -0
  3. package/.kiro/agents/backend-engineer.md +643 -0
  4. package/.kiro/agents/database-specialist.json +6 -0
  5. package/.kiro/agents/database-specialist.md +390 -0
  6. package/.kiro/agents/development-logger.json +6 -0
  7. package/.kiro/agents/development-logger.md +265 -0
  8. package/.kiro/agents/devops-engineer.json +6 -0
  9. package/.kiro/agents/devops-engineer.md +287 -0
  10. package/.kiro/agents/frontend-architect.json +6 -0
  11. package/.kiro/agents/frontend-architect.md +1032 -0
  12. package/.kiro/agents/hooks/backend-engineer-hooks.yaml +540 -0
  13. package/.kiro/agents/hooks/database-specialist-hooks.yaml +488 -0
  14. package/.kiro/agents/hooks/development-logger-hooks.yaml +361 -0
  15. package/.kiro/agents/hooks/devops-engineer-hooks.yaml +345 -0
  16. package/.kiro/agents/hooks/frontend-architect-hooks.yaml +521 -0
  17. package/.kiro/agents/hooks/project-manager-hooks.yaml +513 -0
  18. package/.kiro/agents/hooks/security-specialist-hooks.yaml +358 -0
  19. package/.kiro/agents/hooks/test-orchestrator-hooks.yaml +380 -0
  20. package/.kiro/agents/hooks/ui-ux-designer-hooks.yaml +353 -0
  21. package/.kiro/agents/project-manager.json +6 -0
  22. package/.kiro/agents/project-manager.md +344 -0
  23. package/.kiro/agents/prompts/backend-engineer-system.md +815 -0
  24. package/.kiro/agents/prompts/database-specialist-system.md +332 -0
  25. package/.kiro/agents/prompts/development-logger-system.md +232 -0
  26. package/.kiro/agents/prompts/devops-engineer-system.md +260 -0
  27. package/.kiro/agents/prompts/frontend-architect-system.md +305 -0
  28. package/.kiro/agents/prompts/project-manager-system.md +285 -0
  29. package/.kiro/agents/prompts/security-specialist-system.md +231 -0
  30. package/.kiro/agents/prompts/test-orchestrator-system.md +214 -0
  31. package/.kiro/agents/prompts/ui-ux-designer-system.md +270 -0
  32. package/.kiro/agents/security-specialist.json +6 -0
  33. package/.kiro/agents/security-specialist.md +277 -0
  34. package/.kiro/agents/test-orchestrator.json +6 -0
  35. package/.kiro/agents/test-orchestrator.md +266 -0
  36. package/.kiro/agents/ui-ux-designer.json +6 -0
  37. package/.kiro/agents/ui-ux-designer.md +284 -0
  38. package/.kiro/devlog/00-START-HERE.md +444 -0
  39. package/.kiro/devlog/COMPLETE-WORKFLOW.md +553 -0
  40. package/.kiro/devlog/DEVLOG-INTEGRATION.md +413 -0
  41. package/.kiro/devlog/DEVLOG-PROCESS-FLOWS.md +484 -0
  42. package/.kiro/devlog/DEVLOG-QUICK-REF.md +299 -0
  43. package/.kiro/devlog/DEVLOG.md +22 -0
  44. package/.kiro/devlog/IMPLEMENTATION-COMPLETE.txt +434 -0
  45. package/.kiro/devlog/IMPLEMENTATION-SUMMARY.md +358 -0
  46. package/.kiro/devlog/README.md +363 -0
  47. package/.kiro/devlog/devlog-update.bat +136 -0
  48. package/.kiro/devlog/devlog-update.sh +275 -0
  49. package/.kiro/devlog/feature-completion-hook.bat +78 -0
  50. package/.kiro/devlog/feature-completion-hook.sh +84 -0
  51. package/.kiro/documentation/cli.md +31 -0
  52. package/.kiro/documentation/docs_cli.md +41 -0
  53. package/.kiro/documentation/docs_cli_authentication.md +43 -0
  54. package/.kiro/documentation/docs_cli_autocomplete.md +132 -0
  55. package/.kiro/documentation/docs_cli_billing.md +31 -0
  56. package/.kiro/documentation/docs_cli_billing_contact-support.md +43 -0
  57. package/.kiro/documentation/docs_cli_billing_managing-taxes.md +67 -0
  58. package/.kiro/documentation/docs_cli_billing_related-questions.md +49 -0
  59. package/.kiro/documentation/docs_cli_billing_subscription-portal.md +31 -0
  60. package/.kiro/documentation/docs_cli_chat.md +84 -0
  61. package/.kiro/documentation/docs_cli_chat_configuration.md +40 -0
  62. package/.kiro/documentation/docs_cli_chat_context.md +258 -0
  63. package/.kiro/documentation/docs_cli_chat_git-aware-selection.md +41 -0
  64. package/.kiro/documentation/docs_cli_chat_images.md +53 -0
  65. package/.kiro/documentation/docs_cli_chat_manage-prompts.md +216 -0
  66. package/.kiro/documentation/docs_cli_chat_model-selection.md +153 -0
  67. package/.kiro/documentation/docs_cli_chat_permissions.md +68 -0
  68. package/.kiro/documentation/docs_cli_chat_planning-agent.md +230 -0
  69. package/.kiro/documentation/docs_cli_chat_responding.md +123 -0
  70. package/.kiro/documentation/docs_cli_chat_security.md +87 -0
  71. package/.kiro/documentation/docs_cli_chat_subagents.md +77 -0
  72. package/.kiro/documentation/docs_cli_code-intelligence.md +251 -0
  73. package/.kiro/documentation/docs_cli_custom-agents.md +37 -0
  74. package/.kiro/documentation/docs_cli_custom-agents_configuration-reference.md +941 -0
  75. package/.kiro/documentation/docs_cli_custom-agents_creating.md +93 -0
  76. package/.kiro/documentation/docs_cli_custom-agents_examples.md +360 -0
  77. package/.kiro/documentation/docs_cli_custom-agents_troubleshooting.md +180 -0
  78. package/.kiro/documentation/docs_cli_enterprise_billing.md +33 -0
  79. package/.kiro/documentation/docs_cli_enterprise_concepts.md +34 -0
  80. package/.kiro/documentation/docs_cli_enterprise_getting-started.md +19 -0
  81. package/.kiro/documentation/docs_cli_enterprise_iam.md +251 -0
  82. package/.kiro/documentation/docs_cli_enterprise_monitor-and-track.md +15 -0
  83. package/.kiro/documentation/docs_cli_enterprise_monitor-and-track_dashboard.md +62 -0
  84. package/.kiro/documentation/docs_cli_enterprise_monitor-and-track_prompt-logging.md +165 -0
  85. package/.kiro/documentation/docs_cli_enterprise_monitor-and-track_user-activity.md +123 -0
  86. package/.kiro/documentation/docs_cli_enterprise_settings.md +15 -0
  87. package/.kiro/documentation/docs_cli_enterprise_subscribe.md +36 -0
  88. package/.kiro/documentation/docs_cli_enterprise_subscription-management.md +55 -0
  89. package/.kiro/documentation/docs_cli_enterprise_supported-regions.md +39 -0
  90. package/.kiro/documentation/docs_cli_experimental.md +282 -0
  91. package/.kiro/documentation/docs_cli_experimental_checkpointing.md +439 -0
  92. package/.kiro/documentation/docs_cli_experimental_delegate.md +422 -0
  93. package/.kiro/documentation/docs_cli_experimental_knowledge-management.md +449 -0
  94. package/.kiro/documentation/docs_cli_experimental_tangent-mode.md +357 -0
  95. package/.kiro/documentation/docs_cli_experimental_thinking.md +331 -0
  96. package/.kiro/documentation/docs_cli_experimental_todo-lists.md +385 -0
  97. package/.kiro/documentation/docs_cli_hooks.md +207 -0
  98. package/.kiro/documentation/docs_cli_installation.md +235 -0
  99. package/.kiro/documentation/docs_cli_mcp.md +106 -0
  100. package/.kiro/documentation/docs_cli_mcp_configuration.md +294 -0
  101. package/.kiro/documentation/docs_cli_mcp_examples.md +273 -0
  102. package/.kiro/documentation/docs_cli_mcp_governance.md +436 -0
  103. package/.kiro/documentation/docs_cli_mcp_security.md +77 -0
  104. package/.kiro/documentation/docs_cli_migrating-from-q.md +129 -0
  105. package/.kiro/documentation/docs_cli_privacy-and-security.md +83 -0
  106. package/.kiro/documentation/docs_cli_privacy-and-security_compliance-validation.md +17 -0
  107. package/.kiro/documentation/docs_cli_privacy-and-security_data-protection.md +104 -0
  108. package/.kiro/documentation/docs_cli_privacy-and-security_firewalls.md +26 -0
  109. package/.kiro/documentation/docs_cli_privacy-and-security_infrastructure-security.md +10 -0
  110. package/.kiro/documentation/docs_cli_privacy-and-security_vpc-endpoints.md +41 -0
  111. package/.kiro/documentation/docs_cli_reference_built-in-tools.md +624 -0
  112. package/.kiro/documentation/docs_cli_reference_cli-commands.md +689 -0
  113. package/.kiro/documentation/docs_cli_reference_settings.md +294 -0
  114. package/.kiro/documentation/docs_cli_reference_slash-commands.md +559 -0
  115. package/.kiro/documentation/docs_cli_steering.md +84 -0
  116. package/.kiro/guides/AGENT_WORKFLOW_GUIDE.md +294 -0
  117. package/.kiro/guides/DEVLOG.md +882 -0
  118. package/.kiro/guides/IMPLEMENTATION_EXAMPLES.md +611 -0
  119. package/.kiro/guides/PIV Loop.md +122 -0
  120. package/.kiro/guides/PIV Loop.png +0 -0
  121. package/.kiro/guides/PIVLoop.png +0 -0
  122. package/.kiro/guides/QUICK_REFERENCE.md +202 -0
  123. package/.kiro/guides/README.md +149 -0
  124. package/.kiro/guides/advanced-patterns.md +514 -0
  125. package/.kiro/guides/agent-coordination.md +434 -0
  126. package/.kiro/guides/core-workflows.md +409 -0
  127. package/.kiro/guides/emergency-procedures.md +414 -0
  128. package/.kiro/guides/project-evaluation.md +534 -0
  129. package/.kiro/guides/quality-assurance.md +431 -0
  130. package/.kiro/guides/quick-start.md +235 -0
  131. package/.kiro/guides/troubleshooting.md +575 -0
  132. package/.kiro/guides/walkthroughs.md +711 -0
  133. package/.kiro/prompts/add-to-devlog.md +263 -0
  134. package/.kiro/prompts/code-review-fix.md +18 -0
  135. package/.kiro/prompts/code-review-hackathon.md +167 -0
  136. package/.kiro/prompts/code-review-security.md +454 -0
  137. package/.kiro/prompts/code-review.md +113 -0
  138. package/.kiro/prompts/create-prd.md +151 -0
  139. package/.kiro/prompts/execute-backend.md +257 -0
  140. package/.kiro/prompts/execute-frontend.md +438 -0
  141. package/.kiro/prompts/execute-logging.md +491 -0
  142. package/.kiro/prompts/execute-security.md +482 -0
  143. package/.kiro/prompts/execute-testing.md +528 -0
  144. package/.kiro/prompts/execute.md +101 -0
  145. package/.kiro/prompts/execution-report.md +72 -0
  146. package/.kiro/prompts/implement-fix.md +228 -0
  147. package/.kiro/prompts/plan-feature.md +433 -0
  148. package/.kiro/prompts/prime.md +73 -0
  149. package/.kiro/prompts/quality-metrics.md +622 -0
  150. package/.kiro/prompts/quickstart.md +318 -0
  151. package/.kiro/prompts/rca.md +220 -0
  152. package/.kiro/prompts/system-review.md +189 -0
  153. package/README.md +32 -0
  154. package/bin/cli.js +97 -0
  155. package/package.json +33 -0
@@ -0,0 +1,488 @@
1
+ # Database Specialist Agent - Hook Configurations
2
+
3
+ # Initial Database Consultation
4
+ consultation:
5
+ - name: "database_consultation"
6
+ description: "Initiate database design consultation for new projects"
7
+ trigger:
8
+ type: "message_pattern"
9
+ pattern: "(?i)(database design|schema design|database setup|data modeling|postgresql)"
10
+ action:
11
+ type: "send_message"
12
+ message: |
13
+ 🗄️ **Database Specialist Consultation Started**
14
+
15
+ I'll help you design the optimal database solution for your specific needs:
16
+
17
+ **📊 Data Requirements Questions:**
18
+ - What type of data will you be storing?
19
+ • User accounts and profiles
20
+ • Transactional/business data
21
+ • Analytics and metrics
22
+ • Content management
23
+ • Other (please specify)
24
+
25
+ - What are the core entities and their relationships?
26
+ - Expected data volumes? (Users, transactions per day, storage growth)
27
+ - Any data compliance requirements? (GDPR, HIPAA, SOX)
28
+
29
+ **⚡ Performance & Scalability Questions:**
30
+ - What are your performance expectations?
31
+ • Response times (< 100ms, < 500ms, < 1s)
32
+ • Concurrent users (10s, 100s, 1000s+)
33
+ • Throughput requirements
34
+
35
+ - What are the primary data access patterns?
36
+ • Read-heavy (analytics, reporting)
37
+ • Write-heavy (logging, real-time data)
38
+ • Mixed workload
39
+ • Batch processing needs
40
+
41
+ **🏗️ Technology & Infrastructure Questions:**
42
+ - Do you have existing database infrastructure or preferences?
43
+ - Deployment environment? (Cloud, on-premise, hybrid)
44
+ - Any technology constraints or organizational standards?
45
+ - Backup and disaster recovery requirements?
46
+
47
+ **🔗 Integration Requirements:**
48
+ - How will the database integrate with your application stack?
49
+ - Need API access, direct connections, or both?
50
+ - Any third-party integrations or data synchronization needs?
51
+ - Authentication and authorization requirements?
52
+
53
+ Based on your answers, I'll design a tailored database architecture with optimal schema design, performance tuning, and integration strategies!
54
+ agent: "database-specialist"
55
+
56
+ # Schema Management Hooks
57
+ schema_management:
58
+ - name: "systematic_database_implementation"
59
+ description: "Execute systematic database development using standardized framework"
60
+ trigger:
61
+ type: "user_command"
62
+ conditions:
63
+ - command: "execute"
64
+ - agent: "database-specialist"
65
+ action:
66
+ type: "execute_prompt"
67
+ prompt: "execute.md"
68
+ message: "Executing systematic database development with comprehensive schema validation and performance optimization..."
69
+ agent: "database-specialist"
70
+ include_context:
71
+ - schema_requirements: true
72
+ - performance_targets: true
73
+ - data_integrity_rules: true
74
+ - migration_strategy: true
75
+
76
+ - name: "schema_change_detection"
77
+ description: "Detect and analyze database schema changes"
78
+ trigger:
79
+ type: "file_change"
80
+ conditions:
81
+ - file_pattern: ["**/migrations/*.sql", "**/schema/*.sql", "**/prisma/schema.prisma"]
82
+ - change_type: ["created", "modified"]
83
+ action:
84
+ type: "send_message"
85
+ message: "Database schema change detected. Use @execute for systematic analysis, validation, and implementation with proper safety checks."
86
+ agent: "database-specialist"
87
+ include_context:
88
+ - schema_changes: true
89
+ - migration_history: true
90
+ - performance_impact: true
91
+
92
+ - name: "migration_creation_request"
93
+ description: "Handle requests for new database migrations"
94
+ trigger:
95
+ type: "task_assignment"
96
+ conditions:
97
+ - assignee: "Database Specialist"
98
+ - task_type: ["migration", "schema"]
99
+ - keywords: ["database", "schema", "migration", "table"]
100
+ action:
101
+ type: "send_message"
102
+ message: "Database migration task assigned. Analyze requirements, design schema changes, create migration scripts with rollback procedures, and plan deployment strategy."
103
+ agent: "database-specialist"
104
+ include_context:
105
+ - task_requirements: true
106
+ - current_schema: true
107
+ - performance_considerations: true
108
+
109
+ - name: "schema_validation"
110
+ description: "Validate schema changes before deployment"
111
+ trigger:
112
+ type: "pre_deployment"
113
+ conditions:
114
+ - deployment_type: ["staging", "production"]
115
+ - schema_changes: true
116
+ action:
117
+ type: "send_message"
118
+ message: "Pre-deployment schema validation required. Verify migration safety, check constraint integrity, validate index strategies, and confirm rollback procedures."
119
+ agent: "database-specialist"
120
+ include_context:
121
+ - pending_migrations: true
122
+ - deployment_environment: true
123
+ - rollback_plan: true
124
+
125
+ # Performance Monitoring Hooks
126
+ performance_monitoring:
127
+ - name: "slow_query_detection"
128
+ description: "Detect and analyze slow database queries"
129
+ trigger:
130
+ type: "performance_threshold"
131
+ conditions:
132
+ - metric_type: "query_duration"
133
+ - threshold: "> 1000ms"
134
+ - frequency: "> 5 occurrences/hour"
135
+ action:
136
+ type: "send_message"
137
+ message: "Slow query detected exceeding performance thresholds. Analyze query execution plan, identify bottlenecks, recommend indexing strategies, and optimize query structure."
138
+ agent: "database-specialist"
139
+ include_context:
140
+ - query_details: true
141
+ - execution_plan: true
142
+ - table_statistics: true
143
+
144
+ - name: "index_usage_analysis"
145
+ description: "Analyze index effectiveness and usage patterns"
146
+ trigger:
147
+ type: "schedule"
148
+ conditions:
149
+ - time: "02:00"
150
+ - days: ["sunday"]
151
+ action:
152
+ type: "send_message"
153
+ message: "Weekly index usage analysis. Review index effectiveness, identify unused indexes, recommend new indexes for common queries, and optimize index strategies."
154
+ agent: "database-specialist"
155
+ include_context:
156
+ - index_statistics: true
157
+ - query_patterns: true
158
+ - table_usage: true
159
+
160
+ - name: "connection_pool_monitoring"
161
+ description: "Monitor database connection pool health"
162
+ trigger:
163
+ type: "performance_threshold"
164
+ conditions:
165
+ - metric_type: "connection_pool_usage"
166
+ - threshold: "> 80%"
167
+ - duration: "> 10 minutes"
168
+ action:
169
+ type: "send_message"
170
+ message: "High connection pool usage detected. Analyze connection patterns, identify connection leaks, optimize pool configuration, and recommend scaling strategies."
171
+ agent: "database-specialist"
172
+ include_context:
173
+ - connection_metrics: true
174
+ - pool_configuration: true
175
+ - application_patterns: true
176
+
177
+ # Data Integrity Hooks
178
+ data_integrity:
179
+ - name: "constraint_violation_detection"
180
+ description: "Handle database constraint violations"
181
+ trigger:
182
+ type: "database_error"
183
+ conditions:
184
+ - error_type: ["foreign_key_violation", "unique_violation", "check_constraint"]
185
+ - frequency: "> 3 occurrences/hour"
186
+ action:
187
+ type: "send_message"
188
+ message: "Database constraint violations detected. Investigate data integrity issues, analyze violation patterns, recommend schema improvements, and coordinate with Backend Engineer for application fixes."
189
+ agent: "database-specialist"
190
+ include_context:
191
+ - error_details: true
192
+ - violation_patterns: true
193
+ - affected_tables: true
194
+
195
+ - name: "data_corruption_check"
196
+ description: "Regular data integrity verification"
197
+ trigger:
198
+ type: "schedule"
199
+ conditions:
200
+ - time: "03:00"
201
+ - days: ["monday", "wednesday", "friday"]
202
+ action:
203
+ type: "send_message"
204
+ message: "Scheduled data integrity check. Verify referential integrity, check for orphaned records, validate constraint compliance, and report any data inconsistencies."
205
+ agent: "database-specialist"
206
+ include_context:
207
+ - integrity_checks: true
208
+ - constraint_status: true
209
+ - data_statistics: true
210
+
211
+ - name: "backup_verification"
212
+ description: "Verify database backup integrity and recovery procedures"
213
+ trigger:
214
+ type: "schedule"
215
+ conditions:
216
+ - time: "04:00"
217
+ - day: "saturday"
218
+ action:
219
+ type: "send_message"
220
+ message: "Weekly backup verification. Test backup integrity, verify recovery procedures, check backup completeness, and update disaster recovery documentation."
221
+ agent: "database-specialist"
222
+ include_context:
223
+ - backup_status: true
224
+ - recovery_metrics: true
225
+ - backup_history: true
226
+
227
+ # Migration Management Hooks
228
+ migration_management:
229
+ - name: "migration_execution"
230
+ description: "Execute database migrations with monitoring"
231
+ trigger:
232
+ type: "deployment_start"
233
+ conditions:
234
+ - deployment_type: ["staging", "production"]
235
+ - migration_pending: true
236
+ action:
237
+ type: "send_message"
238
+ message: "Database migration execution starting. Monitor migration progress, verify data integrity during migration, prepare rollback if needed, and coordinate with DevOps Assistant."
239
+ agent: "database-specialist"
240
+ include_context:
241
+ - migration_scripts: true
242
+ - rollback_procedures: true
243
+ - deployment_environment: true
244
+
245
+ - name: "migration_rollback_trigger"
246
+ description: "Handle migration rollback scenarios"
247
+ trigger:
248
+ type: "deployment_failure"
249
+ conditions:
250
+ - failure_type: "database_migration"
251
+ - rollback_required: true
252
+ action:
253
+ type: "send_message"
254
+ message: "Migration rollback required due to deployment failure. Execute rollback procedures, verify data integrity post-rollback, investigate failure cause, and coordinate recovery with team."
255
+ agent: "database-specialist"
256
+ include_context:
257
+ - failure_details: true
258
+ - rollback_scripts: true
259
+ - data_state: true
260
+
261
+ - name: "post_migration_validation"
262
+ description: "Validate database state after successful migration"
263
+ trigger:
264
+ type: "deployment_success"
265
+ conditions:
266
+ - deployment_type: ["staging", "production"]
267
+ - migration_executed: true
268
+ action:
269
+ type: "send_message"
270
+ message: "Post-migration validation required. Verify schema changes applied correctly, check data integrity, validate constraint functionality, and update documentation."
271
+ agent: "database-specialist"
272
+ include_context:
273
+ - migration_results: true
274
+ - schema_state: true
275
+ - data_validation: true
276
+
277
+ # Collaboration Hooks
278
+ team_collaboration:
279
+ - name: "backend_integration_support"
280
+ description: "Support Backend Engineer with database integration"
281
+ trigger:
282
+ type: "agent_request"
283
+ conditions:
284
+ - requesting_agent: "Backend Engineer"
285
+ - request_type: ["query_optimization", "schema_question", "performance_issue"]
286
+ action:
287
+ type: "send_message"
288
+ message: "Backend Engineer requesting database support. Analyze their requirements, provide query optimization guidance, suggest schema improvements, and coordinate integration approach."
289
+ agent: "database-specialist"
290
+ include_context:
291
+ - request_details: true
292
+ - current_implementation: true
293
+ - performance_requirements: true
294
+
295
+ - name: "frontend_data_requirements"
296
+ description: "Support Frontend Architect with data structure needs"
297
+ trigger:
298
+ type: "agent_request"
299
+ conditions:
300
+ - requesting_agent: "Frontend Architect"
301
+ - request_type: ["data_structure", "api_optimization", "real_time_data"]
302
+ action:
303
+ type: "send_message"
304
+ message: "Frontend Architect requesting data support. Analyze frontend data requirements, optimize database queries for UI needs, design efficient data structures, and coordinate with Backend Engineer."
305
+ agent: "database-specialist"
306
+ include_context:
307
+ - frontend_requirements: true
308
+ - current_queries: true
309
+ - performance_targets: true
310
+
311
+ - name: "test_data_provision"
312
+ description: "Provide test data and fixtures for testing"
313
+ trigger:
314
+ type: "agent_request"
315
+ conditions:
316
+ - requesting_agent: "Test Orchestrator"
317
+ - request_type: ["test_data", "fixtures", "database_setup"]
318
+ action:
319
+ type: "send_message"
320
+ message: "Test Orchestrator requesting test database support. Create test data fixtures, set up test database schemas, provide data seeding scripts, and ensure test isolation."
321
+ agent: "database-specialist"
322
+ include_context:
323
+ - test_requirements: true
324
+ - schema_structure: true
325
+ - data_relationships: true
326
+
327
+ # Maintenance Hooks
328
+ database_maintenance:
329
+ - name: "routine_maintenance"
330
+ description: "Perform routine database maintenance tasks"
331
+ trigger:
332
+ type: "schedule"
333
+ conditions:
334
+ - time: "01:00"
335
+ - day: "sunday"
336
+ action:
337
+ type: "send_message"
338
+ message: "Weekly database maintenance window. Perform VACUUM ANALYZE, update table statistics, check index bloat, optimize query plans, and review performance metrics."
339
+ agent: "database-specialist"
340
+ include_context:
341
+ - maintenance_checklist: true
342
+ - performance_history: true
343
+ - system_health: true
344
+
345
+ - name: "storage_monitoring"
346
+ description: "Monitor database storage usage and growth"
347
+ trigger:
348
+ type: "performance_threshold"
349
+ conditions:
350
+ - metric_type: "storage_usage"
351
+ - threshold: "> 80%"
352
+ action:
353
+ type: "send_message"
354
+ message: "Database storage usage approaching capacity limits. Analyze storage growth patterns, identify large tables, recommend archiving strategies, and coordinate with DevOps for scaling."
355
+ agent: "database-specialist"
356
+ include_context:
357
+ - storage_metrics: true
358
+ - growth_patterns: true
359
+ - table_sizes: true
360
+
361
+ - name: "security_audit"
362
+ description: "Regular database security audit"
363
+ trigger:
364
+ type: "schedule"
365
+ conditions:
366
+ - time: "05:00"
367
+ - day: "first_monday_of_month"
368
+ action:
369
+ type: "send_message"
370
+ message: "Monthly database security audit. Review user permissions, check access logs, validate security configurations, update security policies, and report security status."
371
+ agent: "database-specialist"
372
+ include_context:
373
+ - security_configuration: true
374
+ - access_patterns: true
375
+ - audit_logs: true
376
+
377
+ # Development Support Hooks
378
+ development_support:
379
+ - name: "new_feature_database_planning"
380
+ description: "Plan database changes for new features"
381
+ trigger:
382
+ type: "feature_planning"
383
+ conditions:
384
+ - feature_type: ["user_management", "data_storage", "analytics"]
385
+ - database_changes_required: true
386
+ action:
387
+ type: "send_message"
388
+ message: "New feature requires database changes. Analyze feature requirements, design schema modifications, plan migration strategy, and coordinate with development team."
389
+ agent: "database-specialist"
390
+ include_context:
391
+ - feature_requirements: true
392
+ - current_schema: true
393
+ - integration_points: true
394
+
395
+ - name: "performance_optimization_request"
396
+ description: "Handle performance optimization requests"
397
+ trigger:
398
+ type: "performance_issue"
399
+ conditions:
400
+ - issue_type: "database_performance"
401
+ - severity: ["medium", "high", "critical"]
402
+ action:
403
+ type: "send_message"
404
+ message: "Database performance optimization requested. Analyze performance bottlenecks, identify optimization opportunities, implement improvements, and monitor results."
405
+ agent: "database-specialist"
406
+ include_context:
407
+ - performance_metrics: true
408
+ - query_analysis: true
409
+ - system_resources: true
410
+
411
+ # Manual Control Hooks
412
+ manual_controls:
413
+ - name: "manual_schema_analysis"
414
+ description: "Perform comprehensive schema analysis on demand"
415
+ trigger:
416
+ type: "user_command"
417
+ conditions:
418
+ - command: "analyze-schema"
419
+ action:
420
+ type: "send_message"
421
+ message: "Manual schema analysis requested. Perform comprehensive schema review, identify optimization opportunities, check normalization, validate constraints, and provide recommendations."
422
+ agent: "database-specialist"
423
+
424
+ - name: "manual_performance_review"
425
+ description: "Conduct detailed performance review"
426
+ trigger:
427
+ type: "user_command"
428
+ conditions:
429
+ - command: "db-performance-review"
430
+ action:
431
+ type: "send_message"
432
+ message: "Manual database performance review requested. Analyze query performance, review index effectiveness, check resource utilization, and provide optimization recommendations."
433
+ agent: "database-specialist"
434
+
435
+ - name: "emergency_database_support"
436
+ description: "Provide emergency database support"
437
+ trigger:
438
+ type: "user_command"
439
+ conditions:
440
+ - command: "db-emergency"
441
+ - priority: "critical"
442
+ action:
443
+ type: "send_message"
444
+ message: "Emergency database support requested. Immediately assess database health, identify critical issues, implement emergency fixes, and coordinate with team for resolution."
445
+ agent: "database-specialist"
446
+
447
+ - name: "quality_metrics_collection"
448
+ description: "Collect database-specific quality metrics and performance data"
449
+ trigger:
450
+ type: "schema_deployment"
451
+ conditions:
452
+ - deployment_type: ["staging", "production"]
453
+ action:
454
+ type: "execute_prompt"
455
+ prompt: "quality-metrics.md"
456
+ message: "Collecting database quality metrics: query performance, data integrity, and optimization opportunities..."
457
+ agent: "database-specialist"
458
+ include_context:
459
+ - query_performance: true
460
+ - data_integrity_checks: true
461
+ - optimization_metrics: true
462
+
463
+ # Configuration
464
+ hook_settings:
465
+ global:
466
+ enabled: true
467
+ log_level: "info"
468
+ database_monitoring: true
469
+
470
+ schema_management:
471
+ auto_validation: true
472
+ migration_safety_checks: true
473
+ documentation_updates: true
474
+
475
+ performance_monitoring:
476
+ slow_query_threshold: "1000ms"
477
+ index_analysis_frequency: "weekly"
478
+ connection_pool_alerts: true
479
+
480
+ data_integrity:
481
+ constraint_monitoring: true
482
+ backup_verification: true
483
+ corruption_checks: true
484
+
485
+ maintenance:
486
+ routine_maintenance: true
487
+ storage_monitoring: true
488
+ security_audits: true