cc-mirror 1.1.2 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cc-mirror.mjs +294 -233
- package/dist/skills/orchestration/SKILL.md +619 -0
- package/dist/skills/{multi-agent-orchestrator → orchestration}/references/tools.md +143 -58
- package/dist/tui.mjs +533 -401
- package/package.json +1 -1
- package/dist/skills/multi-agent-orchestrator/SKILL.md +0 -391
- package/dist/skills/multi-agent-orchestrator/references/code-review.md +0 -266
- package/dist/skills/multi-agent-orchestrator/references/data-analysis.md +0 -315
- package/dist/skills/multi-agent-orchestrator/references/devops.md +0 -309
- package/dist/skills/multi-agent-orchestrator/references/documentation.md +0 -310
- package/dist/skills/multi-agent-orchestrator/references/project-management.md +0 -345
- package/dist/skills/multi-agent-orchestrator/references/research.md +0 -285
- package/dist/skills/multi-agent-orchestrator/references/software-development.md +0 -242
- package/dist/skills/multi-agent-orchestrator/references/testing.md +0 -282
- /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/code-review.md +0 -0
- /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/data-analysis.md +0 -0
- /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/devops.md +0 -0
- /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/documentation.md +0 -0
- /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/project-management.md +0 -0
- /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/research.md +0 -0
- /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/software-development.md +0 -0
- /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/testing.md +0 -0
- /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/examples.md +0 -0
- /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/guide.md +0 -0
- /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/patterns.md +0 -0
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
# Data Analysis Orchestration Patterns
|
|
2
|
-
|
|
3
|
-
## Table of Contents
|
|
4
|
-
1. [Exploratory Data Analysis](#exploratory-data-analysis)
|
|
5
|
-
2. [Data Quality](#data-quality)
|
|
6
|
-
3. [Report Generation](#report-generation)
|
|
7
|
-
4. [ETL Pipelines](#etl-pipelines)
|
|
8
|
-
5. [Statistical Analysis](#statistical-analysis)
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Exploratory Data Analysis
|
|
13
|
-
|
|
14
|
-
### Pattern: Multi-Dimensional Exploration
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
User Request: "Analyze this dataset"
|
|
18
|
-
|
|
19
|
-
Phase 1: FAN-OUT (Parallel initial exploration)
|
|
20
|
-
├─ Agent A: Schema analysis (columns, types, constraints)
|
|
21
|
-
├─ Agent B: Statistical summary (distributions, outliers)
|
|
22
|
-
├─ Agent C: Missing data analysis
|
|
23
|
-
├─ Agent D: Cardinality and uniqueness analysis
|
|
24
|
-
└─ Agent E: Sample data examination
|
|
25
|
-
|
|
26
|
-
Phase 2: REDUCE
|
|
27
|
-
└─ General-purpose agent: Synthesize initial findings
|
|
28
|
-
|
|
29
|
-
Phase 3: FAN-OUT (Deep dive based on findings)
|
|
30
|
-
├─ Agent A: Correlation analysis
|
|
31
|
-
├─ Agent B: Time series patterns (if applicable)
|
|
32
|
-
└─ Agent C: Categorical relationship analysis
|
|
33
|
-
|
|
34
|
-
Phase 4: REDUCE
|
|
35
|
-
└─ General-purpose agent: Complete EDA report
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Pattern: Question-Driven Analysis
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
User Request: "Why are sales declining?"
|
|
42
|
-
|
|
43
|
-
Phase 1: EXPLORE
|
|
44
|
-
└─ Explore agent: Understand available data sources
|
|
45
|
-
|
|
46
|
-
Phase 2: FAN-OUT (Parallel hypothesis investigation)
|
|
47
|
-
├─ Agent A: Analyze sales by region
|
|
48
|
-
├─ Agent B: Analyze sales by product
|
|
49
|
-
├─ Agent C: Analyze sales by customer segment
|
|
50
|
-
├─ Agent D: Analyze external factors (seasonality, competition)
|
|
51
|
-
└─ Agent E: Analyze marketing/promotion effectiveness
|
|
52
|
-
|
|
53
|
-
Phase 3: REDUCE
|
|
54
|
-
└─ General-purpose agent: Identify key drivers, recommendations
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Pattern: Comparative Analysis
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
Phase 1: FAN-OUT
|
|
61
|
-
├─ Agent A: Analyze dataset A characteristics
|
|
62
|
-
├─ Agent B: Analyze dataset B characteristics
|
|
63
|
-
└─ Agent C: Analyze overlap/differences
|
|
64
|
-
|
|
65
|
-
Phase 2: REDUCE
|
|
66
|
-
└─ General-purpose agent: Comparison report with insights
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## Data Quality
|
|
72
|
-
|
|
73
|
-
### Pattern: Comprehensive Quality Audit
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
User Request: "Check data quality for the customer table"
|
|
77
|
-
|
|
78
|
-
Phase 1: FAN-OUT (Parallel quality dimensions)
|
|
79
|
-
├─ Agent A: Completeness (null rates, missing values)
|
|
80
|
-
├─ Agent B: Accuracy (format validation, range checks)
|
|
81
|
-
├─ Agent C: Consistency (cross-field validation)
|
|
82
|
-
├─ Agent D: Timeliness (freshness, update patterns)
|
|
83
|
-
├─ Agent E: Uniqueness (duplicates, key integrity)
|
|
84
|
-
└─ Agent F: Validity (business rule compliance)
|
|
85
|
-
|
|
86
|
-
Phase 2: REDUCE
|
|
87
|
-
└─ General-purpose agent: Quality scorecard with issues
|
|
88
|
-
|
|
89
|
-
Phase 3: FAN-OUT (Remediation)
|
|
90
|
-
├─ Agent A: Fix completeness issues
|
|
91
|
-
├─ Agent B: Fix accuracy issues
|
|
92
|
-
└─ Agent C: Fix consistency issues
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Pattern: Anomaly Detection
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
Phase 1: FAN-OUT
|
|
99
|
-
├─ Agent A: Statistical outlier detection
|
|
100
|
-
├─ Agent B: Business rule violations
|
|
101
|
-
├─ Agent C: Pattern anomalies (sudden changes)
|
|
102
|
-
└─ Agent D: Referential integrity issues
|
|
103
|
-
|
|
104
|
-
Phase 2: REDUCE
|
|
105
|
-
└─ General-purpose agent: Anomaly report with severity
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Pattern: Data Profiling Pipeline
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
Phase 1: PIPELINE
|
|
112
|
-
├─ General-purpose agent: Extract profiling metrics
|
|
113
|
-
├─ General-purpose agent: Compare against historical baseline
|
|
114
|
-
└─ General-purpose agent: Flag deviations
|
|
115
|
-
|
|
116
|
-
Phase 2: BACKGROUND
|
|
117
|
-
└─ Background agent: Generate profile report
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## Report Generation
|
|
123
|
-
|
|
124
|
-
### Pattern: Multi-Section Report
|
|
125
|
-
|
|
126
|
-
```
|
|
127
|
-
User Request: "Generate monthly business report"
|
|
128
|
-
|
|
129
|
-
Phase 1: FAN-OUT (Parallel section generation)
|
|
130
|
-
├─ Agent A: Executive summary section
|
|
131
|
-
├─ Agent B: Sales performance section
|
|
132
|
-
├─ Agent C: Customer metrics section
|
|
133
|
-
├─ Agent D: Product analytics section
|
|
134
|
-
├─ Agent E: Financial summary section
|
|
135
|
-
└─ Agent F: Operational metrics section
|
|
136
|
-
|
|
137
|
-
Phase 2: REDUCE
|
|
138
|
-
└─ General-purpose agent: Compile sections, add insights
|
|
139
|
-
|
|
140
|
-
Phase 3: PIPELINE
|
|
141
|
-
└─ General-purpose agent: Format, add visualizations
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Pattern: Automated Dashboard Refresh
|
|
145
|
-
|
|
146
|
-
```
|
|
147
|
-
Phase 1: FAN-OUT (Parallel data refresh)
|
|
148
|
-
├─ Background agent: Refresh data source 1
|
|
149
|
-
├─ Background agent: Refresh data source 2
|
|
150
|
-
└─ Background agent: Refresh data source 3
|
|
151
|
-
|
|
152
|
-
Phase 2: PIPELINE
|
|
153
|
-
├─ General-purpose agent: Aggregate refreshed data
|
|
154
|
-
└─ General-purpose agent: Update dashboard calculations
|
|
155
|
-
|
|
156
|
-
Phase 3: BACKGROUND
|
|
157
|
-
└─ Background agent: Generate and distribute report
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Pattern: Ad-Hoc Query Report
|
|
161
|
-
|
|
162
|
-
```
|
|
163
|
-
User Request: "Get me sales by region for Q4"
|
|
164
|
-
|
|
165
|
-
Phase 1: EXPLORE
|
|
166
|
-
└─ Explore agent: Find relevant tables and joins
|
|
167
|
-
|
|
168
|
-
Phase 2: PIPELINE
|
|
169
|
-
├─ General-purpose agent: Build and execute query
|
|
170
|
-
├─ General-purpose agent: Format results
|
|
171
|
-
└─ General-purpose agent: Add context and insights
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
## ETL Pipelines
|
|
177
|
-
|
|
178
|
-
### Pattern: ETL Development
|
|
179
|
-
|
|
180
|
-
```
|
|
181
|
-
User Request: "Create ETL pipeline for user events"
|
|
182
|
-
|
|
183
|
-
Phase 1: EXPLORE
|
|
184
|
-
└─ Explore agent: Understand source schema, target requirements
|
|
185
|
-
|
|
186
|
-
Phase 2: PLAN
|
|
187
|
-
└─ Plan agent: Design ETL architecture
|
|
188
|
-
|
|
189
|
-
Phase 3: FAN-OUT (Parallel component development)
|
|
190
|
-
├─ Agent A: Extract logic (source connectors)
|
|
191
|
-
├─ Agent B: Transform logic (cleaning, mapping)
|
|
192
|
-
├─ Agent C: Load logic (target insertion)
|
|
193
|
-
└─ Agent D: Error handling and logging
|
|
194
|
-
|
|
195
|
-
Phase 4: PIPELINE
|
|
196
|
-
├─ General-purpose agent: Wire components
|
|
197
|
-
└─ Background agent: Test with sample data
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Pattern: ETL Debugging
|
|
201
|
-
|
|
202
|
-
```
|
|
203
|
-
User Request: "ETL job is failing"
|
|
204
|
-
|
|
205
|
-
Phase 1: FAN-OUT (Parallel diagnosis)
|
|
206
|
-
├─ Explore agent: Check job logs
|
|
207
|
-
├─ Explore agent: Check source data quality
|
|
208
|
-
├─ Explore agent: Check target schema compatibility
|
|
209
|
-
└─ Explore agent: Check resource utilization
|
|
210
|
-
|
|
211
|
-
Phase 2: REDUCE
|
|
212
|
-
└─ General-purpose agent: Root cause identification
|
|
213
|
-
|
|
214
|
-
Phase 3: PIPELINE
|
|
215
|
-
├─ General-purpose agent: Implement fix
|
|
216
|
-
└─ Background agent: Verify fix with test run
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Pattern: Schema Evolution
|
|
220
|
-
|
|
221
|
-
```
|
|
222
|
-
Phase 1: EXPLORE
|
|
223
|
-
└─ Explore agent: Identify schema changes
|
|
224
|
-
|
|
225
|
-
Phase 2: FAN-OUT
|
|
226
|
-
├─ Agent A: Update extract logic
|
|
227
|
-
├─ Agent B: Update transform mappings
|
|
228
|
-
└─ Agent C: Update load targets
|
|
229
|
-
|
|
230
|
-
Phase 3: PIPELINE
|
|
231
|
-
├─ General-purpose agent: Migration script
|
|
232
|
-
└─ Background agent: Backfill historical data
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
---
|
|
236
|
-
|
|
237
|
-
## Statistical Analysis
|
|
238
|
-
|
|
239
|
-
### Pattern: Hypothesis Testing
|
|
240
|
-
|
|
241
|
-
```
|
|
242
|
-
User Request: "Did the new feature improve conversion?"
|
|
243
|
-
|
|
244
|
-
Phase 1: EXPLORE
|
|
245
|
-
└─ Explore agent: Gather pre and post data
|
|
246
|
-
|
|
247
|
-
Phase 2: FAN-OUT
|
|
248
|
-
├─ Agent A: Descriptive statistics (both groups)
|
|
249
|
-
├─ Agent B: Distribution analysis
|
|
250
|
-
└─ Agent C: Confounding variable check
|
|
251
|
-
|
|
252
|
-
Phase 3: PIPELINE
|
|
253
|
-
├─ General-purpose agent: Select appropriate test
|
|
254
|
-
├─ General-purpose agent: Run statistical test
|
|
255
|
-
└─ General-purpose agent: Interpret results
|
|
256
|
-
|
|
257
|
-
Phase 4: REDUCE
|
|
258
|
-
└─ General-purpose agent: Conclusion with confidence
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
### Pattern: Predictive Modeling
|
|
262
|
-
|
|
263
|
-
```
|
|
264
|
-
Phase 1: FAN-OUT (Data preparation)
|
|
265
|
-
├─ Agent A: Feature engineering
|
|
266
|
-
├─ Agent B: Data cleaning
|
|
267
|
-
└─ Agent C: Train/test split
|
|
268
|
-
|
|
269
|
-
Phase 2: SPECULATIVE (Model selection)
|
|
270
|
-
├─ Agent A: Train model type 1
|
|
271
|
-
├─ Agent B: Train model type 2
|
|
272
|
-
└─ Agent C: Train model type 3
|
|
273
|
-
|
|
274
|
-
Phase 3: REDUCE
|
|
275
|
-
└─ General-purpose agent: Compare models, select best
|
|
276
|
-
|
|
277
|
-
Phase 4: PIPELINE
|
|
278
|
-
└─ General-purpose agent: Final evaluation, documentation
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
### Pattern: Trend Analysis
|
|
282
|
-
|
|
283
|
-
```
|
|
284
|
-
Phase 1: FAN-OUT
|
|
285
|
-
├─ Agent A: Decompose time series
|
|
286
|
-
├─ Agent B: Identify seasonality patterns
|
|
287
|
-
├─ Agent C: Detect change points
|
|
288
|
-
└─ Agent D: Forecast future values
|
|
289
|
-
|
|
290
|
-
Phase 2: REDUCE
|
|
291
|
-
└─ General-purpose agent: Trend report with insights
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
---
|
|
295
|
-
|
|
296
|
-
## TodoWrite for Data Analysis
|
|
297
|
-
|
|
298
|
-
```
|
|
299
|
-
TodoWrite([
|
|
300
|
-
{content: "Understand data sources and requirements", status: "in_progress", activeForm: "Understanding data"},
|
|
301
|
-
{content: "Perform initial exploration", status: "pending", activeForm: "Exploring data"},
|
|
302
|
-
{content: "Clean and prepare data", status: "pending", activeForm: "Preparing data"},
|
|
303
|
-
{content: "Run analysis", status: "pending", activeForm: "Running analysis"},
|
|
304
|
-
{content: "Validate results", status: "pending", activeForm: "Validating results"},
|
|
305
|
-
{content: "Generate report/visualization", status: "pending", activeForm: "Generating report"}
|
|
306
|
-
])
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
## Best Practices
|
|
310
|
-
|
|
311
|
-
1. **Parallelize exploration** across dimensions
|
|
312
|
-
2. **Validate data quality** before analysis
|
|
313
|
-
3. **Background long queries** to maintain responsiveness
|
|
314
|
-
4. **Document assumptions** in reports
|
|
315
|
-
5. **Include confidence levels** in statistical conclusions
|
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
# DevOps Orchestration Patterns
|
|
2
|
-
|
|
3
|
-
## Table of Contents
|
|
4
|
-
1. [CI/CD Pipeline](#cicd-pipeline)
|
|
5
|
-
2. [Deployment](#deployment)
|
|
6
|
-
3. [Infrastructure](#infrastructure)
|
|
7
|
-
4. [Monitoring and Alerting](#monitoring-and-alerting)
|
|
8
|
-
5. [Incident Response](#incident-response)
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## CI/CD Pipeline
|
|
13
|
-
|
|
14
|
-
### Pattern: Pipeline Setup
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
User Request: "Set up CI/CD for this project"
|
|
18
|
-
|
|
19
|
-
Phase 1: EXPLORE
|
|
20
|
-
└─ Explore agent: Analyze project structure, build system, test setup
|
|
21
|
-
|
|
22
|
-
Phase 2: PLAN
|
|
23
|
-
└─ Plan agent: Design pipeline stages and requirements
|
|
24
|
-
|
|
25
|
-
Phase 3: FAN-OUT (Parallel stage implementation)
|
|
26
|
-
├─ Agent A: Build stage (compile, dependencies)
|
|
27
|
-
├─ Agent B: Test stage (unit, integration)
|
|
28
|
-
├─ Agent C: Security scan stage (SAST, dependencies)
|
|
29
|
-
└─ Agent D: Deploy stage (environments, rollback)
|
|
30
|
-
|
|
31
|
-
Phase 4: PIPELINE
|
|
32
|
-
└─ General-purpose agent: Wire stages, add notifications
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Pattern: Pipeline Optimization
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
User Request: "Speed up our CI pipeline"
|
|
39
|
-
|
|
40
|
-
Phase 1: FAN-OUT (Parallel analysis)
|
|
41
|
-
├─ Explore agent: Analyze current pipeline duration by stage
|
|
42
|
-
├─ Explore agent: Find parallelization opportunities
|
|
43
|
-
├─ Explore agent: Check caching effectiveness
|
|
44
|
-
└─ Explore agent: Review resource allocation
|
|
45
|
-
|
|
46
|
-
Phase 2: REDUCE
|
|
47
|
-
└─ Plan agent: Prioritized optimization plan
|
|
48
|
-
|
|
49
|
-
Phase 3: FAN-OUT (Implement optimizations)
|
|
50
|
-
├─ Agent A: Implement caching improvements
|
|
51
|
-
├─ Agent B: Parallelize independent jobs
|
|
52
|
-
└─ Agent C: Optimize resource-heavy stages
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Pattern: Multi-Environment Pipeline
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
Phase 1: EXPLORE
|
|
59
|
-
└─ Explore agent: Map environments (dev, staging, prod)
|
|
60
|
-
|
|
61
|
-
Phase 2: FAN-OUT
|
|
62
|
-
├─ Agent A: Configure dev deployment
|
|
63
|
-
├─ Agent B: Configure staging deployment
|
|
64
|
-
├─ Agent C: Configure prod deployment (with gates)
|
|
65
|
-
└─ Agent D: Configure environment promotions
|
|
66
|
-
|
|
67
|
-
Phase 3: PIPELINE
|
|
68
|
-
└─ General-purpose agent: Add approval workflows, rollback triggers
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Deployment
|
|
74
|
-
|
|
75
|
-
### Pattern: Zero-Downtime Deployment
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
User Request: "Deploy the new version without downtime"
|
|
79
|
-
|
|
80
|
-
Phase 1: EXPLORE
|
|
81
|
-
└─ Explore agent: Current deployment strategy, infrastructure
|
|
82
|
-
|
|
83
|
-
Phase 2: PIPELINE
|
|
84
|
-
├─ General-purpose agent: Build and tag new image
|
|
85
|
-
├─ General-purpose agent: Deploy to canary/blue environment
|
|
86
|
-
├─ Background agent: Run smoke tests
|
|
87
|
-
└─ General-purpose agent: Shift traffic, drain old instances
|
|
88
|
-
|
|
89
|
-
Phase 3: BACKGROUND
|
|
90
|
-
└─ Background agent: Monitor error rates post-deploy
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Pattern: Rollback Preparation
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
Phase 1: FAN-OUT (Pre-deployment)
|
|
97
|
-
├─ Agent A: Tag current stable version
|
|
98
|
-
├─ Agent B: Document database state
|
|
99
|
-
├─ Agent C: Prepare rollback scripts
|
|
100
|
-
└─ Agent D: Verify rollback path
|
|
101
|
-
|
|
102
|
-
Phase 2: PIPELINE (Deployment with safety)
|
|
103
|
-
├─ General-purpose agent: Deploy new version
|
|
104
|
-
├─ Background agent: Health check monitoring
|
|
105
|
-
└─ General-purpose agent: (If needed) Execute rollback
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Pattern: Database Migration Deployment
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
Phase 1: PIPELINE (Safe migration)
|
|
112
|
-
├─ General-purpose agent: Backup current database
|
|
113
|
-
├─ General-purpose agent: Run forward migration
|
|
114
|
-
├─ General-purpose agent: Deploy compatible app version
|
|
115
|
-
└─ Background agent: Verify data integrity
|
|
116
|
-
|
|
117
|
-
Phase 2: BACKGROUND
|
|
118
|
-
└─ Background agent: Monitor for migration issues
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## Infrastructure
|
|
124
|
-
|
|
125
|
-
### Pattern: Infrastructure as Code
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
User Request: "Create Terraform for our AWS setup"
|
|
129
|
-
|
|
130
|
-
Phase 1: EXPLORE
|
|
131
|
-
└─ Explore agent: Map current infrastructure, requirements
|
|
132
|
-
|
|
133
|
-
Phase 2: FAN-OUT (Parallel module creation)
|
|
134
|
-
├─ Agent A: Network module (VPC, subnets, security groups)
|
|
135
|
-
├─ Agent B: Compute module (ECS/EKS, EC2)
|
|
136
|
-
├─ Agent C: Database module (RDS, ElastiCache)
|
|
137
|
-
├─ Agent D: Storage module (S3, EFS)
|
|
138
|
-
└─ Agent E: CDN and DNS module
|
|
139
|
-
|
|
140
|
-
Phase 3: PIPELINE
|
|
141
|
-
├─ General-purpose agent: Wire modules, configure state backend
|
|
142
|
-
└─ Background agent: Validate and plan
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Pattern: Kubernetes Manifest Generation
|
|
146
|
-
|
|
147
|
-
```
|
|
148
|
-
Phase 1: EXPLORE
|
|
149
|
-
└─ Explore agent: Analyze application requirements
|
|
150
|
-
|
|
151
|
-
Phase 2: FAN-OUT
|
|
152
|
-
├─ Agent A: Deployment manifests
|
|
153
|
-
├─ Agent B: Service and ingress manifests
|
|
154
|
-
├─ Agent C: ConfigMaps and Secrets
|
|
155
|
-
├─ Agent D: HPA and PDB configurations
|
|
156
|
-
└─ Agent E: NetworkPolicies
|
|
157
|
-
|
|
158
|
-
Phase 3: PIPELINE
|
|
159
|
-
├─ General-purpose agent: Kustomize or Helm setup
|
|
160
|
-
└─ Background agent: Validate against cluster
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### Pattern: Security Hardening
|
|
164
|
-
|
|
165
|
-
```
|
|
166
|
-
Phase 1: FAN-OUT (Parallel security checks)
|
|
167
|
-
├─ Agent A: Network security (firewall, security groups)
|
|
168
|
-
├─ Agent B: IAM and access control
|
|
169
|
-
├─ Agent C: Encryption (at rest, in transit)
|
|
170
|
-
├─ Agent D: Secrets management
|
|
171
|
-
└─ Agent E: Compliance checks
|
|
172
|
-
|
|
173
|
-
Phase 2: REDUCE
|
|
174
|
-
└─ General-purpose agent: Security report with remediations
|
|
175
|
-
|
|
176
|
-
Phase 3: FAN-OUT (Implement fixes)
|
|
177
|
-
├─ Agents implement security improvements
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
---
|
|
181
|
-
|
|
182
|
-
## Monitoring and Alerting
|
|
183
|
-
|
|
184
|
-
### Pattern: Observability Setup
|
|
185
|
-
|
|
186
|
-
```
|
|
187
|
-
User Request: "Set up monitoring for the application"
|
|
188
|
-
|
|
189
|
-
Phase 1: FAN-OUT (Parallel pillar implementation)
|
|
190
|
-
├─ Agent A: Metrics (Prometheus, CloudWatch)
|
|
191
|
-
├─ Agent B: Logging (ELK, CloudWatch Logs)
|
|
192
|
-
├─ Agent C: Tracing (Jaeger, X-Ray)
|
|
193
|
-
└─ Agent D: Dashboards (Grafana, custom)
|
|
194
|
-
|
|
195
|
-
Phase 2: PIPELINE
|
|
196
|
-
└─ General-purpose agent: Configure alerting rules, runbooks
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### Pattern: Alert Tuning
|
|
200
|
-
|
|
201
|
-
```
|
|
202
|
-
Phase 1: EXPLORE
|
|
203
|
-
└─ Explore agent: Analyze current alerts, noise ratio
|
|
204
|
-
|
|
205
|
-
Phase 2: FAN-OUT
|
|
206
|
-
├─ Agent A: Tune threshold-based alerts
|
|
207
|
-
├─ Agent B: Implement anomaly detection
|
|
208
|
-
└─ Agent C: Configure alert routing
|
|
209
|
-
|
|
210
|
-
Phase 3: PIPELINE
|
|
211
|
-
└─ General-purpose agent: Document runbooks for each alert
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
### Pattern: SLO Definition
|
|
215
|
-
|
|
216
|
-
```
|
|
217
|
-
Phase 1: EXPLORE
|
|
218
|
-
└─ Explore agent: Identify critical user journeys
|
|
219
|
-
|
|
220
|
-
Phase 2: FAN-OUT
|
|
221
|
-
├─ Agent A: Define availability SLIs/SLOs
|
|
222
|
-
├─ Agent B: Define latency SLIs/SLOs
|
|
223
|
-
├─ Agent C: Define error rate SLIs/SLOs
|
|
224
|
-
└─ Agent D: Configure error budget alerts
|
|
225
|
-
|
|
226
|
-
Phase 3: PIPELINE
|
|
227
|
-
└─ General-purpose agent: Create SLO dashboard
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## Incident Response
|
|
233
|
-
|
|
234
|
-
### Pattern: Incident Triage
|
|
235
|
-
|
|
236
|
-
```
|
|
237
|
-
User Request: "Production is down!"
|
|
238
|
-
|
|
239
|
-
Phase 1: FAN-OUT (Rapid parallel diagnosis)
|
|
240
|
-
├─ Agent A: Check application logs for errors
|
|
241
|
-
├─ Agent B: Check infrastructure metrics
|
|
242
|
-
├─ Agent C: Check recent deployments
|
|
243
|
-
├─ Agent D: Check external dependencies
|
|
244
|
-
└─ Agent E: Check database health
|
|
245
|
-
|
|
246
|
-
Phase 2: REDUCE (Fast)
|
|
247
|
-
└─ General-purpose agent: Identify most likely cause
|
|
248
|
-
|
|
249
|
-
Phase 3: PIPELINE
|
|
250
|
-
├─ General-purpose agent: Implement fix or rollback
|
|
251
|
-
└─ Background agent: Verify recovery
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
### Pattern: Post-Incident Review
|
|
255
|
-
|
|
256
|
-
```
|
|
257
|
-
Phase 1: FAN-OUT (Evidence gathering)
|
|
258
|
-
├─ Explore agent: Timeline of events
|
|
259
|
-
├─ Explore agent: Relevant logs and metrics
|
|
260
|
-
├─ Explore agent: Changes before incident
|
|
261
|
-
└─ Explore agent: Response actions taken
|
|
262
|
-
|
|
263
|
-
Phase 2: PIPELINE
|
|
264
|
-
├─ General-purpose agent: Root cause analysis
|
|
265
|
-
├─ General-purpose agent: Impact assessment
|
|
266
|
-
└─ General-purpose agent: Action items and preventions
|
|
267
|
-
|
|
268
|
-
Phase 3: REDUCE
|
|
269
|
-
└─ General-purpose agent: Post-mortem document
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
### Pattern: Runbook Execution
|
|
273
|
-
|
|
274
|
-
```
|
|
275
|
-
Phase 1: EXPLORE
|
|
276
|
-
└─ Explore agent: Find relevant runbook
|
|
277
|
-
|
|
278
|
-
Phase 2: PIPELINE (Step-by-step)
|
|
279
|
-
├─ General-purpose agent: Execute step 1
|
|
280
|
-
├─ General-purpose agent: Verify step 1
|
|
281
|
-
├─ General-purpose agent: Execute step 2
|
|
282
|
-
└─ ... continue until resolved
|
|
283
|
-
|
|
284
|
-
Phase 3: BACKGROUND
|
|
285
|
-
└─ Background agent: Continued monitoring
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
---
|
|
289
|
-
|
|
290
|
-
## TodoWrite for DevOps
|
|
291
|
-
|
|
292
|
-
```
|
|
293
|
-
TodoWrite([
|
|
294
|
-
{content: "Assess current infrastructure state", status: "in_progress", activeForm: "Assessing infrastructure"},
|
|
295
|
-
{content: "Plan changes with minimal disruption", status: "pending", activeForm: "Planning changes"},
|
|
296
|
-
{content: "Implement infrastructure changes", status: "pending", activeForm: "Implementing changes"},
|
|
297
|
-
{content: "Validate deployment", status: "pending", activeForm: "Validating deployment"},
|
|
298
|
-
{content: "Configure monitoring and alerts", status: "pending", activeForm: "Configuring monitoring"},
|
|
299
|
-
{content: "Document runbooks", status: "pending", activeForm: "Documenting runbooks"}
|
|
300
|
-
])
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
## Safety Principles
|
|
304
|
-
|
|
305
|
-
1. **Always have rollback plan** before deploying
|
|
306
|
-
2. **Background monitor** during and after deployment
|
|
307
|
-
3. **Parallel diagnosis** during incidents for speed
|
|
308
|
-
4. **Document everything** for future incidents
|
|
309
|
-
5. **Test in staging** before production
|