tech-hub-skills 1.2.0 → 1.5.2

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 (198) hide show
  1. package/{LICENSE → .claude/LICENSE} +21 -21
  2. package/.claude/README.md +291 -0
  3. package/.claude/bin/cli.js +266 -0
  4. package/{bin → .claude/bin}/copilot.js +182 -182
  5. package/{bin → .claude/bin}/postinstall.js +42 -42
  6. package/{tech_hub_skills/skills → .claude/commands}/README.md +336 -336
  7. package/{tech_hub_skills/skills → .claude/commands}/ai-engineer.md +104 -104
  8. package/{tech_hub_skills/skills → .claude/commands}/aws.md +143 -143
  9. package/{tech_hub_skills/skills → .claude/commands}/azure.md +149 -149
  10. package/{tech_hub_skills/skills → .claude/commands}/backend-developer.md +108 -108
  11. package/{tech_hub_skills/skills → .claude/commands}/code-review.md +399 -399
  12. package/{tech_hub_skills/skills → .claude/commands}/compliance-automation.md +747 -747
  13. package/{tech_hub_skills/skills → .claude/commands}/compliance-officer.md +108 -108
  14. package/{tech_hub_skills/skills → .claude/commands}/data-engineer.md +113 -113
  15. package/{tech_hub_skills/skills → .claude/commands}/data-governance.md +102 -102
  16. package/{tech_hub_skills/skills → .claude/commands}/data-scientist.md +123 -123
  17. package/{tech_hub_skills/skills → .claude/commands}/database-admin.md +109 -109
  18. package/{tech_hub_skills/skills → .claude/commands}/devops.md +160 -160
  19. package/{tech_hub_skills/skills → .claude/commands}/docker.md +160 -160
  20. package/{tech_hub_skills/skills → .claude/commands}/enterprise-dashboard.md +613 -613
  21. package/{tech_hub_skills/skills → .claude/commands}/finops.md +184 -184
  22. package/{tech_hub_skills/skills → .claude/commands}/frontend-developer.md +108 -108
  23. package/{tech_hub_skills/skills → .claude/commands}/gcp.md +143 -143
  24. package/{tech_hub_skills/skills → .claude/commands}/ml-engineer.md +115 -115
  25. package/{tech_hub_skills/skills → .claude/commands}/mlops.md +187 -187
  26. package/{tech_hub_skills/skills → .claude/commands}/network-engineer.md +109 -109
  27. package/{tech_hub_skills/skills → .claude/commands}/optimization-advisor.md +329 -329
  28. package/{tech_hub_skills/skills → .claude/commands}/orchestrator.md +623 -623
  29. package/{tech_hub_skills/skills → .claude/commands}/platform-engineer.md +102 -102
  30. package/{tech_hub_skills/skills → .claude/commands}/process-automation.md +226 -226
  31. package/{tech_hub_skills/skills → .claude/commands}/process-changelog.md +184 -184
  32. package/{tech_hub_skills/skills → .claude/commands}/process-documentation.md +484 -484
  33. package/{tech_hub_skills/skills → .claude/commands}/process-kanban.md +324 -324
  34. package/{tech_hub_skills/skills → .claude/commands}/process-versioning.md +214 -214
  35. package/{tech_hub_skills/skills → .claude/commands}/product-designer.md +104 -104
  36. package/{tech_hub_skills/skills → .claude/commands}/project-starter.md +443 -443
  37. package/{tech_hub_skills/skills → .claude/commands}/qa-engineer.md +109 -109
  38. package/{tech_hub_skills/skills → .claude/commands}/security-architect.md +135 -135
  39. package/{tech_hub_skills/skills → .claude/commands}/sre.md +109 -109
  40. package/{tech_hub_skills/skills → .claude/commands}/system-design.md +126 -126
  41. package/{tech_hub_skills/skills → .claude/commands}/technical-writer.md +101 -101
  42. package/.claude/package.json +46 -0
  43. package/{tech_hub_skills → .claude}/roles/ai-engineer/skills/01-prompt-engineering/README.md +252 -252
  44. package/.claude/roles/ai-engineer/skills/01-prompt-engineering/prompt_ab_tester.py +356 -0
  45. package/.claude/roles/ai-engineer/skills/01-prompt-engineering/prompt_template_manager.py +274 -0
  46. package/.claude/roles/ai-engineer/skills/01-prompt-engineering/token_cost_estimator.py +324 -0
  47. package/{tech_hub_skills → .claude}/roles/ai-engineer/skills/02-rag-pipeline/README.md +448 -448
  48. package/.claude/roles/ai-engineer/skills/02-rag-pipeline/document_chunker.py +336 -0
  49. package/.claude/roles/ai-engineer/skills/02-rag-pipeline/rag_pipeline.sql +213 -0
  50. package/{tech_hub_skills → .claude}/roles/ai-engineer/skills/03-agent-orchestration/README.md +599 -599
  51. package/{tech_hub_skills → .claude}/roles/ai-engineer/skills/04-llm-guardrails/README.md +735 -735
  52. package/{tech_hub_skills → .claude}/roles/ai-engineer/skills/05-vector-embeddings/README.md +711 -711
  53. package/{tech_hub_skills → .claude}/roles/ai-engineer/skills/06-llm-evaluation/README.md +777 -777
  54. package/{tech_hub_skills → .claude}/roles/azure/skills/01-infrastructure-fundamentals/README.md +264 -264
  55. package/{tech_hub_skills → .claude}/roles/azure/skills/02-data-factory/README.md +264 -264
  56. package/{tech_hub_skills → .claude}/roles/azure/skills/03-synapse-analytics/README.md +264 -264
  57. package/{tech_hub_skills → .claude}/roles/azure/skills/04-databricks/README.md +264 -264
  58. package/{tech_hub_skills → .claude}/roles/azure/skills/05-functions/README.md +264 -264
  59. package/{tech_hub_skills → .claude}/roles/azure/skills/06-kubernetes-service/README.md +264 -264
  60. package/{tech_hub_skills → .claude}/roles/azure/skills/07-openai-service/README.md +264 -264
  61. package/{tech_hub_skills → .claude}/roles/azure/skills/08-machine-learning/README.md +264 -264
  62. package/{tech_hub_skills → .claude}/roles/azure/skills/09-storage-adls/README.md +264 -264
  63. package/{tech_hub_skills → .claude}/roles/azure/skills/10-networking/README.md +264 -264
  64. package/{tech_hub_skills → .claude}/roles/azure/skills/11-sql-cosmos/README.md +264 -264
  65. package/{tech_hub_skills → .claude}/roles/azure/skills/12-event-hubs/README.md +264 -264
  66. package/{tech_hub_skills → .claude}/roles/code-review/skills/01-automated-code-review/README.md +394 -394
  67. package/{tech_hub_skills → .claude}/roles/code-review/skills/02-pr-review-workflow/README.md +427 -427
  68. package/{tech_hub_skills → .claude}/roles/code-review/skills/03-code-quality-gates/README.md +518 -518
  69. package/{tech_hub_skills → .claude}/roles/code-review/skills/04-reviewer-assignment/README.md +504 -504
  70. package/{tech_hub_skills → .claude}/roles/code-review/skills/05-review-analytics/README.md +540 -540
  71. package/{tech_hub_skills → .claude}/roles/data-engineer/skills/01-lakehouse-architecture/README.md +550 -550
  72. package/.claude/roles/data-engineer/skills/01-lakehouse-architecture/bronze_ingestion.py +337 -0
  73. package/.claude/roles/data-engineer/skills/01-lakehouse-architecture/medallion_queries.sql +300 -0
  74. package/{tech_hub_skills → .claude}/roles/data-engineer/skills/02-etl-pipeline/README.md +580 -580
  75. package/{tech_hub_skills → .claude}/roles/data-engineer/skills/03-data-quality/README.md +579 -579
  76. package/{tech_hub_skills → .claude}/roles/data-engineer/skills/04-streaming-pipelines/README.md +608 -608
  77. package/{tech_hub_skills → .claude}/roles/data-engineer/skills/05-performance-optimization/README.md +547 -547
  78. package/{tech_hub_skills → .claude}/roles/data-governance/skills/01-data-catalog/README.md +112 -112
  79. package/{tech_hub_skills → .claude}/roles/data-governance/skills/02-data-lineage/README.md +129 -129
  80. package/{tech_hub_skills → .claude}/roles/data-governance/skills/03-data-quality-framework/README.md +182 -182
  81. package/{tech_hub_skills → .claude}/roles/data-governance/skills/04-access-control/README.md +39 -39
  82. package/{tech_hub_skills → .claude}/roles/data-governance/skills/05-master-data-management/README.md +40 -40
  83. package/{tech_hub_skills → .claude}/roles/data-governance/skills/06-compliance-privacy/README.md +46 -46
  84. package/{tech_hub_skills → .claude}/roles/data-scientist/skills/01-eda-automation/README.md +230 -230
  85. package/.claude/roles/data-scientist/skills/01-eda-automation/eda_generator.py +446 -0
  86. package/{tech_hub_skills → .claude}/roles/data-scientist/skills/02-statistical-modeling/README.md +264 -264
  87. package/{tech_hub_skills → .claude}/roles/data-scientist/skills/03-feature-engineering/README.md +264 -264
  88. package/{tech_hub_skills → .claude}/roles/data-scientist/skills/04-predictive-modeling/README.md +264 -264
  89. package/{tech_hub_skills → .claude}/roles/data-scientist/skills/05-customer-analytics/README.md +264 -264
  90. package/{tech_hub_skills → .claude}/roles/data-scientist/skills/06-campaign-analysis/README.md +264 -264
  91. package/{tech_hub_skills → .claude}/roles/data-scientist/skills/07-experimentation/README.md +264 -264
  92. package/{tech_hub_skills → .claude}/roles/data-scientist/skills/08-data-visualization/README.md +264 -264
  93. package/{tech_hub_skills → .claude}/roles/devops/skills/01-cicd-pipeline/README.md +264 -264
  94. package/{tech_hub_skills → .claude}/roles/devops/skills/02-container-orchestration/README.md +264 -264
  95. package/{tech_hub_skills → .claude}/roles/devops/skills/03-infrastructure-as-code/README.md +264 -264
  96. package/{tech_hub_skills → .claude}/roles/devops/skills/04-gitops/README.md +264 -264
  97. package/{tech_hub_skills → .claude}/roles/devops/skills/05-environment-management/README.md +264 -264
  98. package/{tech_hub_skills → .claude}/roles/devops/skills/06-automated-testing/README.md +264 -264
  99. package/{tech_hub_skills → .claude}/roles/devops/skills/07-release-management/README.md +264 -264
  100. package/{tech_hub_skills → .claude}/roles/devops/skills/08-monitoring-alerting/README.md +264 -264
  101. package/{tech_hub_skills → .claude}/roles/devops/skills/09-devsecops/README.md +265 -265
  102. package/{tech_hub_skills → .claude}/roles/finops/skills/01-cost-visibility/README.md +264 -264
  103. package/{tech_hub_skills → .claude}/roles/finops/skills/02-resource-tagging/README.md +264 -264
  104. package/{tech_hub_skills → .claude}/roles/finops/skills/03-budget-management/README.md +264 -264
  105. package/{tech_hub_skills → .claude}/roles/finops/skills/04-reserved-instances/README.md +264 -264
  106. package/{tech_hub_skills → .claude}/roles/finops/skills/05-spot-optimization/README.md +264 -264
  107. package/{tech_hub_skills → .claude}/roles/finops/skills/06-storage-tiering/README.md +264 -264
  108. package/{tech_hub_skills → .claude}/roles/finops/skills/07-compute-rightsizing/README.md +264 -264
  109. package/{tech_hub_skills → .claude}/roles/finops/skills/08-chargeback/README.md +264 -264
  110. package/{tech_hub_skills → .claude}/roles/ml-engineer/skills/01-mlops-pipeline/README.md +566 -566
  111. package/{tech_hub_skills → .claude}/roles/ml-engineer/skills/02-feature-engineering/README.md +655 -655
  112. package/{tech_hub_skills → .claude}/roles/ml-engineer/skills/03-model-training/README.md +704 -704
  113. package/{tech_hub_skills → .claude}/roles/ml-engineer/skills/04-model-serving/README.md +845 -845
  114. package/{tech_hub_skills → .claude}/roles/ml-engineer/skills/05-model-monitoring/README.md +874 -874
  115. package/{tech_hub_skills → .claude}/roles/mlops/skills/01-ml-pipeline-orchestration/README.md +264 -264
  116. package/{tech_hub_skills → .claude}/roles/mlops/skills/02-experiment-tracking/README.md +264 -264
  117. package/{tech_hub_skills → .claude}/roles/mlops/skills/03-model-registry/README.md +264 -264
  118. package/{tech_hub_skills → .claude}/roles/mlops/skills/04-feature-store/README.md +264 -264
  119. package/{tech_hub_skills → .claude}/roles/mlops/skills/05-model-deployment/README.md +264 -264
  120. package/{tech_hub_skills → .claude}/roles/mlops/skills/06-model-observability/README.md +264 -264
  121. package/{tech_hub_skills → .claude}/roles/mlops/skills/07-data-versioning/README.md +264 -264
  122. package/{tech_hub_skills → .claude}/roles/mlops/skills/08-ab-testing/README.md +264 -264
  123. package/{tech_hub_skills → .claude}/roles/mlops/skills/09-automated-retraining/README.md +264 -264
  124. package/{tech_hub_skills → .claude}/roles/platform-engineer/skills/01-internal-developer-platform/README.md +153 -153
  125. package/{tech_hub_skills → .claude}/roles/platform-engineer/skills/02-self-service-infrastructure/README.md +57 -57
  126. package/{tech_hub_skills → .claude}/roles/platform-engineer/skills/03-slo-sli-management/README.md +59 -59
  127. package/{tech_hub_skills → .claude}/roles/platform-engineer/skills/04-developer-experience/README.md +57 -57
  128. package/{tech_hub_skills → .claude}/roles/platform-engineer/skills/05-incident-management/README.md +73 -73
  129. package/{tech_hub_skills → .claude}/roles/platform-engineer/skills/06-capacity-management/README.md +59 -59
  130. package/{tech_hub_skills → .claude}/roles/product-designer/skills/01-requirements-discovery/README.md +407 -407
  131. package/{tech_hub_skills → .claude}/roles/product-designer/skills/02-user-research/README.md +382 -382
  132. package/{tech_hub_skills → .claude}/roles/product-designer/skills/03-brainstorming-ideation/README.md +437 -437
  133. package/{tech_hub_skills → .claude}/roles/product-designer/skills/04-ux-design/README.md +496 -496
  134. package/{tech_hub_skills → .claude}/roles/product-designer/skills/05-product-market-fit/README.md +376 -376
  135. package/{tech_hub_skills → .claude}/roles/product-designer/skills/06-stakeholder-management/README.md +412 -412
  136. package/{tech_hub_skills → .claude}/roles/security-architect/skills/01-pii-detection/README.md +319 -319
  137. package/{tech_hub_skills → .claude}/roles/security-architect/skills/02-threat-modeling/README.md +264 -264
  138. package/{tech_hub_skills → .claude}/roles/security-architect/skills/03-infrastructure-security/README.md +264 -264
  139. package/{tech_hub_skills → .claude}/roles/security-architect/skills/04-iam/README.md +264 -264
  140. package/{tech_hub_skills → .claude}/roles/security-architect/skills/05-application-security/README.md +264 -264
  141. package/{tech_hub_skills → .claude}/roles/security-architect/skills/06-secrets-management/README.md +264 -264
  142. package/{tech_hub_skills → .claude}/roles/security-architect/skills/07-security-monitoring/README.md +264 -264
  143. package/{tech_hub_skills → .claude}/roles/system-design/skills/01-architecture-patterns/README.md +337 -337
  144. package/{tech_hub_skills → .claude}/roles/system-design/skills/02-requirements-engineering/README.md +264 -264
  145. package/{tech_hub_skills → .claude}/roles/system-design/skills/03-scalability/README.md +264 -264
  146. package/{tech_hub_skills → .claude}/roles/system-design/skills/04-high-availability/README.md +264 -264
  147. package/{tech_hub_skills → .claude}/roles/system-design/skills/05-cost-optimization-design/README.md +264 -264
  148. package/{tech_hub_skills → .claude}/roles/system-design/skills/06-api-design/README.md +264 -264
  149. package/{tech_hub_skills → .claude}/roles/system-design/skills/07-observability-architecture/README.md +264 -264
  150. package/{tech_hub_skills → .claude}/roles/system-design/skills/08-process-automation/PROCESS_TEMPLATE.md +336 -336
  151. package/{tech_hub_skills → .claude}/roles/system-design/skills/08-process-automation/README.md +521 -521
  152. package/.claude/roles/system-design/skills/08-process-automation/ai_prompt_generator.py +744 -0
  153. package/.claude/roles/system-design/skills/08-process-automation/automation_recommender.py +688 -0
  154. package/.claude/roles/system-design/skills/08-process-automation/plan_generator.py +679 -0
  155. package/.claude/roles/system-design/skills/08-process-automation/process_analyzer.py +528 -0
  156. package/.claude/roles/system-design/skills/08-process-automation/process_parser.py +684 -0
  157. package/.claude/roles/system-design/skills/08-process-automation/role_matcher.py +615 -0
  158. package/.claude/skills/README.md +336 -0
  159. package/.claude/skills/ai-engineer.md +104 -0
  160. package/.claude/skills/aws.md +143 -0
  161. package/.claude/skills/azure.md +149 -0
  162. package/.claude/skills/backend-developer.md +108 -0
  163. package/.claude/skills/code-review.md +399 -0
  164. package/.claude/skills/compliance-automation.md +747 -0
  165. package/.claude/skills/compliance-officer.md +108 -0
  166. package/.claude/skills/data-engineer.md +113 -0
  167. package/.claude/skills/data-governance.md +102 -0
  168. package/.claude/skills/data-scientist.md +123 -0
  169. package/.claude/skills/database-admin.md +109 -0
  170. package/.claude/skills/devops.md +160 -0
  171. package/.claude/skills/docker.md +160 -0
  172. package/.claude/skills/enterprise-dashboard.md +613 -0
  173. package/.claude/skills/finops.md +184 -0
  174. package/.claude/skills/frontend-developer.md +108 -0
  175. package/.claude/skills/gcp.md +143 -0
  176. package/.claude/skills/ml-engineer.md +115 -0
  177. package/.claude/skills/mlops.md +187 -0
  178. package/.claude/skills/network-engineer.md +109 -0
  179. package/.claude/skills/optimization-advisor.md +329 -0
  180. package/.claude/skills/orchestrator.md +623 -0
  181. package/.claude/skills/platform-engineer.md +102 -0
  182. package/.claude/skills/process-automation.md +226 -0
  183. package/.claude/skills/process-changelog.md +184 -0
  184. package/.claude/skills/process-documentation.md +484 -0
  185. package/.claude/skills/process-kanban.md +324 -0
  186. package/.claude/skills/process-versioning.md +214 -0
  187. package/.claude/skills/product-designer.md +104 -0
  188. package/.claude/skills/project-starter.md +443 -0
  189. package/.claude/skills/qa-engineer.md +109 -0
  190. package/.claude/skills/security-architect.md +135 -0
  191. package/.claude/skills/sre.md +109 -0
  192. package/.claude/skills/system-design.md +126 -0
  193. package/.claude/skills/technical-writer.md +101 -0
  194. package/.gitattributes +2 -0
  195. package/GITHUB_COPILOT.md +106 -0
  196. package/README.md +192 -291
  197. package/package.json +16 -46
  198. package/bin/cli.js +0 -241
@@ -1,613 +1,613 @@
1
- # Enterprise Dashboard & Monitoring
2
-
3
- Centralized visibility into security, compliance, governance, and operational metrics for enterprise applications.
4
-
5
- ## Role Overview
6
-
7
- **Agent**: Enterprise Dashboard Specialist
8
- **Focus**: Real-time monitoring, alerting, dashboards, and operational visibility
9
- **Integration**: Aggregates data from all enterprise skills
10
-
11
- ## When to Use
12
-
13
- Invoke this role when you need to:
14
- - Create unified dashboards for enterprise metrics
15
- - Set up alerting for security and compliance events
16
- - Monitor SLOs across the platform
17
- - Track governance and audit metrics
18
- - Visualize data lineage and access patterns
19
-
20
- ## Dashboard Components
21
-
22
- ### 1. Security Dashboard
23
-
24
- ```yaml
25
- # security-dashboard.yml
26
- panels:
27
- - title: "Security Posture Score"
28
- type: gauge
29
- metrics:
30
- - vulnerability_count
31
- - compliance_score
32
- - incident_count
33
- thresholds:
34
- critical: 60
35
- warning: 80
36
- healthy: 95
37
-
38
- - title: "Active Vulnerabilities"
39
- type: stat
40
- breakdown:
41
- - critical
42
- - high
43
- - medium
44
- - low
45
-
46
- - title: "Security Events (24h)"
47
- type: timeseries
48
- metrics:
49
- - authentication_failures
50
- - authorization_denials
51
- - suspicious_activities
52
-
53
- - title: "Secrets Exposure"
54
- type: stat
55
- metrics:
56
- - exposed_secrets_count
57
- - secrets_rotation_due
58
-
59
- - title: "Container Security"
60
- type: table
61
- columns:
62
- - image_name
63
- - vulnerability_count
64
- - last_scanned
65
- ```
66
-
67
- ### 2. Compliance Dashboard
68
-
69
- ```yaml
70
- # compliance-dashboard.yml
71
- panels:
72
- - title: "Compliance Score by Framework"
73
- type: barchart
74
- frameworks:
75
- - SOC2
76
- - GDPR
77
- - HIPAA
78
- - PCI-DSS
79
-
80
- - title: "Control Status"
81
- type: piechart
82
- statuses:
83
- - passed
84
- - failed
85
- - warning
86
- - not_applicable
87
-
88
- - title: "Audit Trail Activity"
89
- type: timeseries
90
- metrics:
91
- - audit_events_per_hour
92
- - compliance_checks_run
93
-
94
- - title: "Open Findings"
95
- type: table
96
- columns:
97
- - finding_id
98
- - severity
99
- - framework
100
- - age_days
101
- - owner
102
-
103
- - title: "Evidence Collection"
104
- type: stat
105
- metrics:
106
- - evidence_artifacts_count
107
- - last_evidence_generated
108
- ```
109
-
110
- ### 3. Data Governance Dashboard
111
-
112
- ```yaml
113
- # governance-dashboard.yml
114
- panels:
115
- - title: "Data Catalog Coverage"
116
- type: gauge
117
- target: 100%
118
-
119
- - title: "Data Quality Score"
120
- type: stat
121
- dimensions:
122
- - completeness
123
- - accuracy
124
- - timeliness
125
- - consistency
126
-
127
- - title: "PII Data Locations"
128
- type: geomap
129
- data: pii_distribution
130
-
131
- - title: "Access Requests"
132
- type: timeseries
133
- metrics:
134
- - approved_requests
135
- - denied_requests
136
- - pending_requests
137
-
138
- - title: "Data Lineage"
139
- type: flowchart
140
- show: critical_data_flows
141
- ```
142
-
143
- ### 4. Code Review Dashboard
144
-
145
- ```yaml
146
- # code-review-dashboard.yml
147
- panels:
148
- - title: "Review Cycle Time"
149
- type: timeseries
150
- metrics:
151
- - avg_time_to_first_review
152
- - avg_time_to_approval
153
- - avg_cycle_time
154
-
155
- - title: "SLO Compliance"
156
- type: gauge
157
- slos:
158
- - first_review_4h
159
- - approval_24h
160
- - merge_48h
161
-
162
- - title: "Reviewer Load"
163
- type: barchart
164
- by: reviewer
165
-
166
- - title: "PR Size Distribution"
167
- type: piechart
168
- categories: [XS, S, M, L, XL]
169
-
170
- - title: "Quality Gate Pass Rate"
171
- type: stat
172
- breakdown_by: gate_type
173
- ```
174
-
175
- ## Implementation
176
-
177
- ### Grafana Dashboard as Code
178
-
179
- ```json
180
- {
181
- "dashboard": {
182
- "title": "Enterprise Overview",
183
- "uid": "enterprise-overview",
184
- "tags": ["enterprise", "overview"],
185
- "timezone": "browser",
186
- "refresh": "5m",
187
- "rows": [
188
- {
189
- "title": "Executive Summary",
190
- "panels": [
191
- {
192
- "title": "Overall Health Score",
193
- "type": "gauge",
194
- "datasource": "prometheus",
195
- "targets": [
196
- {
197
- "expr": "(security_score + compliance_score + quality_score) / 3"
198
- }
199
- ],
200
- "fieldConfig": {
201
- "defaults": {
202
- "thresholds": {
203
- "steps": [
204
- {"color": "red", "value": null},
205
- {"color": "yellow", "value": 70},
206
- {"color": "green", "value": 90}
207
- ]
208
- },
209
- "min": 0,
210
- "max": 100
211
- }
212
- }
213
- },
214
- {
215
- "title": "Active Incidents",
216
- "type": "stat",
217
- "datasource": "prometheus",
218
- "targets": [
219
- {"expr": "sum(active_incidents)"}
220
- ],
221
- "fieldConfig": {
222
- "defaults": {
223
- "thresholds": {
224
- "steps": [
225
- {"color": "green", "value": null},
226
- {"color": "yellow", "value": 1},
227
- {"color": "red", "value": 5}
228
- ]
229
- }
230
- }
231
- }
232
- },
233
- {
234
- "title": "Compliance Status",
235
- "type": "stat",
236
- "datasource": "prometheus",
237
- "targets": [
238
- {"expr": "compliance_passing_controls / compliance_total_controls * 100"}
239
- ]
240
- },
241
- {
242
- "title": "Open PRs Awaiting Review",
243
- "type": "stat",
244
- "datasource": "github",
245
- "targets": [
246
- {"query": "count(open_prs where status = 'awaiting_review')"}
247
- ]
248
- }
249
- ]
250
- },
251
- {
252
- "title": "Security",
253
- "panels": [
254
- {
255
- "title": "Vulnerabilities by Severity",
256
- "type": "barchart",
257
- "datasource": "security-scanner",
258
- "targets": [
259
- {"expr": "vulnerabilities_count by (severity)"}
260
- ]
261
- },
262
- {
263
- "title": "Security Events Timeline",
264
- "type": "timeseries",
265
- "datasource": "prometheus",
266
- "targets": [
267
- {"expr": "rate(security_events_total[5m])", "legendFormat": "Events/min"}
268
- ]
269
- }
270
- ]
271
- },
272
- {
273
- "title": "Delivery Metrics",
274
- "panels": [
275
- {
276
- "title": "Deployment Frequency",
277
- "type": "stat",
278
- "datasource": "prometheus",
279
- "targets": [
280
- {"expr": "sum(increase(deployments_total[7d]))"}
281
- ]
282
- },
283
- {
284
- "title": "Lead Time for Changes",
285
- "type": "gauge",
286
- "datasource": "prometheus",
287
- "targets": [
288
- {"expr": "avg(lead_time_hours)"}
289
- ]
290
- },
291
- {
292
- "title": "Change Failure Rate",
293
- "type": "stat",
294
- "datasource": "prometheus",
295
- "targets": [
296
- {"expr": "failed_deployments / total_deployments * 100"}
297
- ]
298
- },
299
- {
300
- "title": "MTTR",
301
- "type": "stat",
302
- "datasource": "prometheus",
303
- "targets": [
304
- {"expr": "avg(incident_recovery_time_minutes)"}
305
- ]
306
- }
307
- ]
308
- }
309
- ]
310
- }
311
- }
312
- ```
313
-
314
- ### Alerting Rules
315
-
316
- ```yaml
317
- # alerting-rules.yml
318
- groups:
319
- - name: security-alerts
320
- rules:
321
- - alert: CriticalVulnerabilityDetected
322
- expr: vulnerabilities_critical > 0
323
- for: 0m
324
- labels:
325
- severity: critical
326
- team: security
327
- annotations:
328
- summary: "Critical vulnerability detected"
329
- description: "{{ $value }} critical vulnerabilities found"
330
-
331
- - alert: SecretsExposed
332
- expr: exposed_secrets_count > 0
333
- for: 0m
334
- labels:
335
- severity: critical
336
- team: security
337
- annotations:
338
- summary: "Exposed secrets detected"
339
- runbook: "https://wiki/runbooks/secrets-exposure"
340
-
341
- - alert: UnusualAccessPattern
342
- expr: access_anomaly_score > 0.9
343
- for: 5m
344
- labels:
345
- severity: high
346
- team: security
347
- annotations:
348
- summary: "Unusual access pattern detected"
349
-
350
- - name: compliance-alerts
351
- rules:
352
- - alert: ComplianceControlFailed
353
- expr: compliance_control_status == 0
354
- for: 0m
355
- labels:
356
- severity: high
357
- team: compliance
358
- annotations:
359
- summary: "Compliance control failed: {{ $labels.control }}"
360
-
361
- - alert: AuditLogGap
362
- expr: time() - audit_last_event_timestamp > 3600
363
- for: 5m
364
- labels:
365
- severity: medium
366
- annotations:
367
- summary: "No audit events in the last hour"
368
-
369
- - name: code-review-alerts
370
- rules:
371
- - alert: PRReviewSLOBreach
372
- expr: pr_time_without_review_hours > 24
373
- for: 0m
374
- labels:
375
- severity: medium
376
- team: engineering
377
- annotations:
378
- summary: "PR #{{ $labels.pr_number }} waiting > 24h for review"
379
-
380
- - alert: ReviewerOverloaded
381
- expr: reviewer_active_prs > 7
382
- for: 0m
383
- labels:
384
- severity: low
385
- annotations:
386
- summary: "Reviewer {{ $labels.reviewer }} has too many active reviews"
387
-
388
- - name: data-governance-alerts
389
- rules:
390
- - alert: DataQualityDegraded
391
- expr: data_quality_score < 0.8
392
- for: 15m
393
- labels:
394
- severity: medium
395
- team: data
396
- annotations:
397
- summary: "Data quality below threshold for {{ $labels.dataset }}"
398
-
399
- - alert: PIIAccessAnomaly
400
- expr: pii_access_anomaly_score > 0.8
401
- for: 5m
402
- labels:
403
- severity: high
404
- team: security
405
- annotations:
406
- summary: "Unusual PII access pattern detected"
407
- ```
408
-
409
- ### Dashboard Generator Script
410
-
411
- ```python
412
- #!/usr/bin/env python3
413
- """Generate enterprise dashboards from configuration."""
414
-
415
- import json
416
- from dataclasses import dataclass
417
- from typing import List, Dict, Any
418
-
419
- @dataclass
420
- class Panel:
421
- """Dashboard panel configuration."""
422
- title: str
423
- panel_type: str
424
- datasource: str
425
- queries: List[str]
426
- thresholds: Dict[str, int] = None
427
- position: Dict[str, int] = None
428
-
429
- @dataclass
430
- class Dashboard:
431
- """Complete dashboard configuration."""
432
- title: str
433
- uid: str
434
- panels: List[Panel]
435
- refresh: str = "5m"
436
-
437
- class DashboardGenerator:
438
- """Generate Grafana dashboards from templates."""
439
-
440
- def __init__(self):
441
- self.templates = {
442
- "security": self._security_template,
443
- "compliance": self._compliance_template,
444
- "code-review": self._code_review_template,
445
- "governance": self._governance_template,
446
- }
447
-
448
- def generate(self, template_name: str) -> Dict[str, Any]:
449
- """Generate dashboard from template."""
450
- if template_name not in self.templates:
451
- raise ValueError(f"Unknown template: {template_name}")
452
-
453
- return self.templates[template_name]()
454
-
455
- def _security_template(self) -> Dict:
456
- """Generate security dashboard."""
457
- return {
458
- "dashboard": {
459
- "title": "Security Overview",
460
- "uid": "security-overview",
461
- "panels": [
462
- {
463
- "title": "Security Score",
464
- "type": "gauge",
465
- "gridPos": {"x": 0, "y": 0, "w": 6, "h": 8},
466
- "targets": [{"expr": "security_posture_score"}],
467
- },
468
- {
469
- "title": "Vulnerabilities",
470
- "type": "stat",
471
- "gridPos": {"x": 6, "y": 0, "w": 6, "h": 4},
472
- "targets": [{"expr": "sum(vulnerabilities_count)"}],
473
- },
474
- {
475
- "title": "Security Events",
476
- "type": "timeseries",
477
- "gridPos": {"x": 12, "y": 0, "w": 12, "h": 8},
478
- "targets": [
479
- {"expr": "rate(security_events_total[5m])", "legendFormat": "Events"}
480
- ],
481
- },
482
- ]
483
- }
484
- }
485
-
486
- def _compliance_template(self) -> Dict:
487
- """Generate compliance dashboard."""
488
- return {
489
- "dashboard": {
490
- "title": "Compliance Status",
491
- "uid": "compliance-status",
492
- "panels": [
493
- {
494
- "title": "SOC 2 Compliance",
495
- "type": "gauge",
496
- "gridPos": {"x": 0, "y": 0, "w": 6, "h": 6},
497
- "targets": [{"expr": "soc2_compliance_score"}],
498
- },
499
- {
500
- "title": "GDPR Compliance",
501
- "type": "gauge",
502
- "gridPos": {"x": 6, "y": 0, "w": 6, "h": 6},
503
- "targets": [{"expr": "gdpr_compliance_score"}],
504
- },
505
- {
506
- "title": "Open Findings",
507
- "type": "table",
508
- "gridPos": {"x": 0, "y": 6, "w": 24, "h": 10},
509
- "targets": [{"expr": "compliance_findings"}],
510
- },
511
- ]
512
- }
513
- }
514
-
515
- def _code_review_template(self) -> Dict:
516
- """Generate code review dashboard."""
517
- return {
518
- "dashboard": {
519
- "title": "Code Review Metrics",
520
- "uid": "code-review-metrics",
521
- "panels": [
522
- {
523
- "title": "Avg Time to First Review",
524
- "type": "stat",
525
- "gridPos": {"x": 0, "y": 0, "w": 6, "h": 4},
526
- "targets": [{"expr": "avg(pr_time_to_first_review_hours)"}],
527
- },
528
- {
529
- "title": "Review Cycle Time Trend",
530
- "type": "timeseries",
531
- "gridPos": {"x": 6, "y": 0, "w": 18, "h": 8},
532
- "targets": [
533
- {"expr": "avg(pr_cycle_time_hours)", "legendFormat": "Cycle Time"}
534
- ],
535
- },
536
- {
537
- "title": "Reviewer Load",
538
- "type": "barchart",
539
- "gridPos": {"x": 0, "y": 8, "w": 12, "h": 8},
540
- "targets": [{"expr": "reviews_per_person by (reviewer)"}],
541
- },
542
- ]
543
- }
544
- }
545
-
546
- def _governance_template(self) -> Dict:
547
- """Generate data governance dashboard."""
548
- return {
549
- "dashboard": {
550
- "title": "Data Governance",
551
- "uid": "data-governance",
552
- "panels": [
553
- {
554
- "title": "Data Catalog Coverage",
555
- "type": "gauge",
556
- "gridPos": {"x": 0, "y": 0, "w": 8, "h": 6},
557
- "targets": [{"expr": "catalog_coverage_percent"}],
558
- },
559
- {
560
- "title": "Data Quality Score",
561
- "type": "gauge",
562
- "gridPos": {"x": 8, "y": 0, "w": 8, "h": 6},
563
- "targets": [{"expr": "data_quality_score"}],
564
- },
565
- {
566
- "title": "PII Distribution",
567
- "type": "piechart",
568
- "gridPos": {"x": 16, "y": 0, "w": 8, "h": 6},
569
- "targets": [{"expr": "pii_count by (classification)"}],
570
- },
571
- ]
572
- }
573
- }
574
-
575
- def export_all(self, output_dir: str = "dashboards") -> None:
576
- """Export all dashboards to JSON files."""
577
- import os
578
- os.makedirs(output_dir, exist_ok=True)
579
-
580
- for name, template_fn in self.templates.items():
581
- dashboard = template_fn()
582
- with open(f"{output_dir}/{name}.json", "w") as f:
583
- json.dump(dashboard, f, indent=2)
584
- print(f"Generated: {output_dir}/{name}.json")
585
-
586
-
587
- if __name__ == "__main__":
588
- generator = DashboardGenerator()
589
- generator.export_all()
590
- ```
591
-
592
- ## Enterprise Integration
593
-
594
- ### Connected Skills
595
- - **Security Architect (sa-07)**: Security monitoring data
596
- - **Data Governance (dg-01-06)**: Governance metrics
597
- - **Code Review (cr-05)**: Review analytics
598
- - **Compliance Automation**: Compliance status
599
-
600
- ### Data Sources
601
- - Prometheus/Grafana for metrics
602
- - GitHub API for code review data
603
- - Security scanners (Snyk, SonarQube)
604
- - Audit log systems
605
-
606
- ## Quick Reference
607
-
608
- ```bash
609
- # In Claude Code
610
- @enterprise-dashboard "Create security monitoring dashboard"
611
- @enterprise-dashboard "Set up compliance alerting"
612
- @enterprise-dashboard "Generate DORA metrics dashboard"
613
- ```
1
+ # Enterprise Dashboard & Monitoring
2
+
3
+ Centralized visibility into security, compliance, governance, and operational metrics for enterprise applications.
4
+
5
+ ## Role Overview
6
+
7
+ **Agent**: Enterprise Dashboard Specialist
8
+ **Focus**: Real-time monitoring, alerting, dashboards, and operational visibility
9
+ **Integration**: Aggregates data from all enterprise skills
10
+
11
+ ## When to Use
12
+
13
+ Invoke this role when you need to:
14
+ - Create unified dashboards for enterprise metrics
15
+ - Set up alerting for security and compliance events
16
+ - Monitor SLOs across the platform
17
+ - Track governance and audit metrics
18
+ - Visualize data lineage and access patterns
19
+
20
+ ## Dashboard Components
21
+
22
+ ### 1. Security Dashboard
23
+
24
+ ```yaml
25
+ # security-dashboard.yml
26
+ panels:
27
+ - title: "Security Posture Score"
28
+ type: gauge
29
+ metrics:
30
+ - vulnerability_count
31
+ - compliance_score
32
+ - incident_count
33
+ thresholds:
34
+ critical: 60
35
+ warning: 80
36
+ healthy: 95
37
+
38
+ - title: "Active Vulnerabilities"
39
+ type: stat
40
+ breakdown:
41
+ - critical
42
+ - high
43
+ - medium
44
+ - low
45
+
46
+ - title: "Security Events (24h)"
47
+ type: timeseries
48
+ metrics:
49
+ - authentication_failures
50
+ - authorization_denials
51
+ - suspicious_activities
52
+
53
+ - title: "Secrets Exposure"
54
+ type: stat
55
+ metrics:
56
+ - exposed_secrets_count
57
+ - secrets_rotation_due
58
+
59
+ - title: "Container Security"
60
+ type: table
61
+ columns:
62
+ - image_name
63
+ - vulnerability_count
64
+ - last_scanned
65
+ ```
66
+
67
+ ### 2. Compliance Dashboard
68
+
69
+ ```yaml
70
+ # compliance-dashboard.yml
71
+ panels:
72
+ - title: "Compliance Score by Framework"
73
+ type: barchart
74
+ frameworks:
75
+ - SOC2
76
+ - GDPR
77
+ - HIPAA
78
+ - PCI-DSS
79
+
80
+ - title: "Control Status"
81
+ type: piechart
82
+ statuses:
83
+ - passed
84
+ - failed
85
+ - warning
86
+ - not_applicable
87
+
88
+ - title: "Audit Trail Activity"
89
+ type: timeseries
90
+ metrics:
91
+ - audit_events_per_hour
92
+ - compliance_checks_run
93
+
94
+ - title: "Open Findings"
95
+ type: table
96
+ columns:
97
+ - finding_id
98
+ - severity
99
+ - framework
100
+ - age_days
101
+ - owner
102
+
103
+ - title: "Evidence Collection"
104
+ type: stat
105
+ metrics:
106
+ - evidence_artifacts_count
107
+ - last_evidence_generated
108
+ ```
109
+
110
+ ### 3. Data Governance Dashboard
111
+
112
+ ```yaml
113
+ # governance-dashboard.yml
114
+ panels:
115
+ - title: "Data Catalog Coverage"
116
+ type: gauge
117
+ target: 100%
118
+
119
+ - title: "Data Quality Score"
120
+ type: stat
121
+ dimensions:
122
+ - completeness
123
+ - accuracy
124
+ - timeliness
125
+ - consistency
126
+
127
+ - title: "PII Data Locations"
128
+ type: geomap
129
+ data: pii_distribution
130
+
131
+ - title: "Access Requests"
132
+ type: timeseries
133
+ metrics:
134
+ - approved_requests
135
+ - denied_requests
136
+ - pending_requests
137
+
138
+ - title: "Data Lineage"
139
+ type: flowchart
140
+ show: critical_data_flows
141
+ ```
142
+
143
+ ### 4. Code Review Dashboard
144
+
145
+ ```yaml
146
+ # code-review-dashboard.yml
147
+ panels:
148
+ - title: "Review Cycle Time"
149
+ type: timeseries
150
+ metrics:
151
+ - avg_time_to_first_review
152
+ - avg_time_to_approval
153
+ - avg_cycle_time
154
+
155
+ - title: "SLO Compliance"
156
+ type: gauge
157
+ slos:
158
+ - first_review_4h
159
+ - approval_24h
160
+ - merge_48h
161
+
162
+ - title: "Reviewer Load"
163
+ type: barchart
164
+ by: reviewer
165
+
166
+ - title: "PR Size Distribution"
167
+ type: piechart
168
+ categories: [XS, S, M, L, XL]
169
+
170
+ - title: "Quality Gate Pass Rate"
171
+ type: stat
172
+ breakdown_by: gate_type
173
+ ```
174
+
175
+ ## Implementation
176
+
177
+ ### Grafana Dashboard as Code
178
+
179
+ ```json
180
+ {
181
+ "dashboard": {
182
+ "title": "Enterprise Overview",
183
+ "uid": "enterprise-overview",
184
+ "tags": ["enterprise", "overview"],
185
+ "timezone": "browser",
186
+ "refresh": "5m",
187
+ "rows": [
188
+ {
189
+ "title": "Executive Summary",
190
+ "panels": [
191
+ {
192
+ "title": "Overall Health Score",
193
+ "type": "gauge",
194
+ "datasource": "prometheus",
195
+ "targets": [
196
+ {
197
+ "expr": "(security_score + compliance_score + quality_score) / 3"
198
+ }
199
+ ],
200
+ "fieldConfig": {
201
+ "defaults": {
202
+ "thresholds": {
203
+ "steps": [
204
+ {"color": "red", "value": null},
205
+ {"color": "yellow", "value": 70},
206
+ {"color": "green", "value": 90}
207
+ ]
208
+ },
209
+ "min": 0,
210
+ "max": 100
211
+ }
212
+ }
213
+ },
214
+ {
215
+ "title": "Active Incidents",
216
+ "type": "stat",
217
+ "datasource": "prometheus",
218
+ "targets": [
219
+ {"expr": "sum(active_incidents)"}
220
+ ],
221
+ "fieldConfig": {
222
+ "defaults": {
223
+ "thresholds": {
224
+ "steps": [
225
+ {"color": "green", "value": null},
226
+ {"color": "yellow", "value": 1},
227
+ {"color": "red", "value": 5}
228
+ ]
229
+ }
230
+ }
231
+ }
232
+ },
233
+ {
234
+ "title": "Compliance Status",
235
+ "type": "stat",
236
+ "datasource": "prometheus",
237
+ "targets": [
238
+ {"expr": "compliance_passing_controls / compliance_total_controls * 100"}
239
+ ]
240
+ },
241
+ {
242
+ "title": "Open PRs Awaiting Review",
243
+ "type": "stat",
244
+ "datasource": "github",
245
+ "targets": [
246
+ {"query": "count(open_prs where status = 'awaiting_review')"}
247
+ ]
248
+ }
249
+ ]
250
+ },
251
+ {
252
+ "title": "Security",
253
+ "panels": [
254
+ {
255
+ "title": "Vulnerabilities by Severity",
256
+ "type": "barchart",
257
+ "datasource": "security-scanner",
258
+ "targets": [
259
+ {"expr": "vulnerabilities_count by (severity)"}
260
+ ]
261
+ },
262
+ {
263
+ "title": "Security Events Timeline",
264
+ "type": "timeseries",
265
+ "datasource": "prometheus",
266
+ "targets": [
267
+ {"expr": "rate(security_events_total[5m])", "legendFormat": "Events/min"}
268
+ ]
269
+ }
270
+ ]
271
+ },
272
+ {
273
+ "title": "Delivery Metrics",
274
+ "panels": [
275
+ {
276
+ "title": "Deployment Frequency",
277
+ "type": "stat",
278
+ "datasource": "prometheus",
279
+ "targets": [
280
+ {"expr": "sum(increase(deployments_total[7d]))"}
281
+ ]
282
+ },
283
+ {
284
+ "title": "Lead Time for Changes",
285
+ "type": "gauge",
286
+ "datasource": "prometheus",
287
+ "targets": [
288
+ {"expr": "avg(lead_time_hours)"}
289
+ ]
290
+ },
291
+ {
292
+ "title": "Change Failure Rate",
293
+ "type": "stat",
294
+ "datasource": "prometheus",
295
+ "targets": [
296
+ {"expr": "failed_deployments / total_deployments * 100"}
297
+ ]
298
+ },
299
+ {
300
+ "title": "MTTR",
301
+ "type": "stat",
302
+ "datasource": "prometheus",
303
+ "targets": [
304
+ {"expr": "avg(incident_recovery_time_minutes)"}
305
+ ]
306
+ }
307
+ ]
308
+ }
309
+ ]
310
+ }
311
+ }
312
+ ```
313
+
314
+ ### Alerting Rules
315
+
316
+ ```yaml
317
+ # alerting-rules.yml
318
+ groups:
319
+ - name: security-alerts
320
+ rules:
321
+ - alert: CriticalVulnerabilityDetected
322
+ expr: vulnerabilities_critical > 0
323
+ for: 0m
324
+ labels:
325
+ severity: critical
326
+ team: security
327
+ annotations:
328
+ summary: "Critical vulnerability detected"
329
+ description: "{{ $value }} critical vulnerabilities found"
330
+
331
+ - alert: SecretsExposed
332
+ expr: exposed_secrets_count > 0
333
+ for: 0m
334
+ labels:
335
+ severity: critical
336
+ team: security
337
+ annotations:
338
+ summary: "Exposed secrets detected"
339
+ runbook: "https://wiki/runbooks/secrets-exposure"
340
+
341
+ - alert: UnusualAccessPattern
342
+ expr: access_anomaly_score > 0.9
343
+ for: 5m
344
+ labels:
345
+ severity: high
346
+ team: security
347
+ annotations:
348
+ summary: "Unusual access pattern detected"
349
+
350
+ - name: compliance-alerts
351
+ rules:
352
+ - alert: ComplianceControlFailed
353
+ expr: compliance_control_status == 0
354
+ for: 0m
355
+ labels:
356
+ severity: high
357
+ team: compliance
358
+ annotations:
359
+ summary: "Compliance control failed: {{ $labels.control }}"
360
+
361
+ - alert: AuditLogGap
362
+ expr: time() - audit_last_event_timestamp > 3600
363
+ for: 5m
364
+ labels:
365
+ severity: medium
366
+ annotations:
367
+ summary: "No audit events in the last hour"
368
+
369
+ - name: code-review-alerts
370
+ rules:
371
+ - alert: PRReviewSLOBreach
372
+ expr: pr_time_without_review_hours > 24
373
+ for: 0m
374
+ labels:
375
+ severity: medium
376
+ team: engineering
377
+ annotations:
378
+ summary: "PR #{{ $labels.pr_number }} waiting > 24h for review"
379
+
380
+ - alert: ReviewerOverloaded
381
+ expr: reviewer_active_prs > 7
382
+ for: 0m
383
+ labels:
384
+ severity: low
385
+ annotations:
386
+ summary: "Reviewer {{ $labels.reviewer }} has too many active reviews"
387
+
388
+ - name: data-governance-alerts
389
+ rules:
390
+ - alert: DataQualityDegraded
391
+ expr: data_quality_score < 0.8
392
+ for: 15m
393
+ labels:
394
+ severity: medium
395
+ team: data
396
+ annotations:
397
+ summary: "Data quality below threshold for {{ $labels.dataset }}"
398
+
399
+ - alert: PIIAccessAnomaly
400
+ expr: pii_access_anomaly_score > 0.8
401
+ for: 5m
402
+ labels:
403
+ severity: high
404
+ team: security
405
+ annotations:
406
+ summary: "Unusual PII access pattern detected"
407
+ ```
408
+
409
+ ### Dashboard Generator Script
410
+
411
+ ```python
412
+ #!/usr/bin/env python3
413
+ """Generate enterprise dashboards from configuration."""
414
+
415
+ import json
416
+ from dataclasses import dataclass
417
+ from typing import List, Dict, Any
418
+
419
+ @dataclass
420
+ class Panel:
421
+ """Dashboard panel configuration."""
422
+ title: str
423
+ panel_type: str
424
+ datasource: str
425
+ queries: List[str]
426
+ thresholds: Dict[str, int] = None
427
+ position: Dict[str, int] = None
428
+
429
+ @dataclass
430
+ class Dashboard:
431
+ """Complete dashboard configuration."""
432
+ title: str
433
+ uid: str
434
+ panels: List[Panel]
435
+ refresh: str = "5m"
436
+
437
+ class DashboardGenerator:
438
+ """Generate Grafana dashboards from templates."""
439
+
440
+ def __init__(self):
441
+ self.templates = {
442
+ "security": self._security_template,
443
+ "compliance": self._compliance_template,
444
+ "code-review": self._code_review_template,
445
+ "governance": self._governance_template,
446
+ }
447
+
448
+ def generate(self, template_name: str) -> Dict[str, Any]:
449
+ """Generate dashboard from template."""
450
+ if template_name not in self.templates:
451
+ raise ValueError(f"Unknown template: {template_name}")
452
+
453
+ return self.templates[template_name]()
454
+
455
+ def _security_template(self) -> Dict:
456
+ """Generate security dashboard."""
457
+ return {
458
+ "dashboard": {
459
+ "title": "Security Overview",
460
+ "uid": "security-overview",
461
+ "panels": [
462
+ {
463
+ "title": "Security Score",
464
+ "type": "gauge",
465
+ "gridPos": {"x": 0, "y": 0, "w": 6, "h": 8},
466
+ "targets": [{"expr": "security_posture_score"}],
467
+ },
468
+ {
469
+ "title": "Vulnerabilities",
470
+ "type": "stat",
471
+ "gridPos": {"x": 6, "y": 0, "w": 6, "h": 4},
472
+ "targets": [{"expr": "sum(vulnerabilities_count)"}],
473
+ },
474
+ {
475
+ "title": "Security Events",
476
+ "type": "timeseries",
477
+ "gridPos": {"x": 12, "y": 0, "w": 12, "h": 8},
478
+ "targets": [
479
+ {"expr": "rate(security_events_total[5m])", "legendFormat": "Events"}
480
+ ],
481
+ },
482
+ ]
483
+ }
484
+ }
485
+
486
+ def _compliance_template(self) -> Dict:
487
+ """Generate compliance dashboard."""
488
+ return {
489
+ "dashboard": {
490
+ "title": "Compliance Status",
491
+ "uid": "compliance-status",
492
+ "panels": [
493
+ {
494
+ "title": "SOC 2 Compliance",
495
+ "type": "gauge",
496
+ "gridPos": {"x": 0, "y": 0, "w": 6, "h": 6},
497
+ "targets": [{"expr": "soc2_compliance_score"}],
498
+ },
499
+ {
500
+ "title": "GDPR Compliance",
501
+ "type": "gauge",
502
+ "gridPos": {"x": 6, "y": 0, "w": 6, "h": 6},
503
+ "targets": [{"expr": "gdpr_compliance_score"}],
504
+ },
505
+ {
506
+ "title": "Open Findings",
507
+ "type": "table",
508
+ "gridPos": {"x": 0, "y": 6, "w": 24, "h": 10},
509
+ "targets": [{"expr": "compliance_findings"}],
510
+ },
511
+ ]
512
+ }
513
+ }
514
+
515
+ def _code_review_template(self) -> Dict:
516
+ """Generate code review dashboard."""
517
+ return {
518
+ "dashboard": {
519
+ "title": "Code Review Metrics",
520
+ "uid": "code-review-metrics",
521
+ "panels": [
522
+ {
523
+ "title": "Avg Time to First Review",
524
+ "type": "stat",
525
+ "gridPos": {"x": 0, "y": 0, "w": 6, "h": 4},
526
+ "targets": [{"expr": "avg(pr_time_to_first_review_hours)"}],
527
+ },
528
+ {
529
+ "title": "Review Cycle Time Trend",
530
+ "type": "timeseries",
531
+ "gridPos": {"x": 6, "y": 0, "w": 18, "h": 8},
532
+ "targets": [
533
+ {"expr": "avg(pr_cycle_time_hours)", "legendFormat": "Cycle Time"}
534
+ ],
535
+ },
536
+ {
537
+ "title": "Reviewer Load",
538
+ "type": "barchart",
539
+ "gridPos": {"x": 0, "y": 8, "w": 12, "h": 8},
540
+ "targets": [{"expr": "reviews_per_person by (reviewer)"}],
541
+ },
542
+ ]
543
+ }
544
+ }
545
+
546
+ def _governance_template(self) -> Dict:
547
+ """Generate data governance dashboard."""
548
+ return {
549
+ "dashboard": {
550
+ "title": "Data Governance",
551
+ "uid": "data-governance",
552
+ "panels": [
553
+ {
554
+ "title": "Data Catalog Coverage",
555
+ "type": "gauge",
556
+ "gridPos": {"x": 0, "y": 0, "w": 8, "h": 6},
557
+ "targets": [{"expr": "catalog_coverage_percent"}],
558
+ },
559
+ {
560
+ "title": "Data Quality Score",
561
+ "type": "gauge",
562
+ "gridPos": {"x": 8, "y": 0, "w": 8, "h": 6},
563
+ "targets": [{"expr": "data_quality_score"}],
564
+ },
565
+ {
566
+ "title": "PII Distribution",
567
+ "type": "piechart",
568
+ "gridPos": {"x": 16, "y": 0, "w": 8, "h": 6},
569
+ "targets": [{"expr": "pii_count by (classification)"}],
570
+ },
571
+ ]
572
+ }
573
+ }
574
+
575
+ def export_all(self, output_dir: str = "dashboards") -> None:
576
+ """Export all dashboards to JSON files."""
577
+ import os
578
+ os.makedirs(output_dir, exist_ok=True)
579
+
580
+ for name, template_fn in self.templates.items():
581
+ dashboard = template_fn()
582
+ with open(f"{output_dir}/{name}.json", "w") as f:
583
+ json.dump(dashboard, f, indent=2)
584
+ print(f"Generated: {output_dir}/{name}.json")
585
+
586
+
587
+ if __name__ == "__main__":
588
+ generator = DashboardGenerator()
589
+ generator.export_all()
590
+ ```
591
+
592
+ ## Enterprise Integration
593
+
594
+ ### Connected Skills
595
+ - **Security Architect (sa-07)**: Security monitoring data
596
+ - **Data Governance (dg-01-06)**: Governance metrics
597
+ - **Code Review (cr-05)**: Review analytics
598
+ - **Compliance Automation**: Compliance status
599
+
600
+ ### Data Sources
601
+ - Prometheus/Grafana for metrics
602
+ - GitHub API for code review data
603
+ - Security scanners (Snyk, SonarQube)
604
+ - Audit log systems
605
+
606
+ ## Quick Reference
607
+
608
+ ```bash
609
+ # In Claude Code
610
+ @enterprise-dashboard "Create security monitoring dashboard"
611
+ @enterprise-dashboard "Set up compliance alerting"
612
+ @enterprise-dashboard "Generate DORA metrics dashboard"
613
+ ```