omgkit 2.20.0 → 2.21.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 (73) hide show
  1. package/README.md +125 -10
  2. package/package.json +1 -1
  3. package/plugin/agents/ai-architect-agent.md +282 -0
  4. package/plugin/agents/data-scientist-agent.md +221 -0
  5. package/plugin/agents/experiment-analyst-agent.md +318 -0
  6. package/plugin/agents/ml-engineer-agent.md +165 -0
  7. package/plugin/agents/mlops-engineer-agent.md +324 -0
  8. package/plugin/agents/model-optimizer-agent.md +287 -0
  9. package/plugin/agents/production-engineer-agent.md +360 -0
  10. package/plugin/agents/research-scientist-agent.md +274 -0
  11. package/plugin/commands/omgdata/augment.md +86 -0
  12. package/plugin/commands/omgdata/collect.md +81 -0
  13. package/plugin/commands/omgdata/label.md +83 -0
  14. package/plugin/commands/omgdata/split.md +83 -0
  15. package/plugin/commands/omgdata/validate.md +76 -0
  16. package/plugin/commands/omgdata/version.md +85 -0
  17. package/plugin/commands/omgdeploy/ab.md +94 -0
  18. package/plugin/commands/omgdeploy/cloud.md +89 -0
  19. package/plugin/commands/omgdeploy/edge.md +93 -0
  20. package/plugin/commands/omgdeploy/package.md +91 -0
  21. package/plugin/commands/omgdeploy/serve.md +92 -0
  22. package/plugin/commands/omgfeature/embed.md +93 -0
  23. package/plugin/commands/omgfeature/extract.md +93 -0
  24. package/plugin/commands/omgfeature/select.md +85 -0
  25. package/plugin/commands/omgfeature/store.md +97 -0
  26. package/plugin/commands/omgml/init.md +60 -0
  27. package/plugin/commands/omgml/status.md +82 -0
  28. package/plugin/commands/omgops/drift.md +87 -0
  29. package/plugin/commands/omgops/monitor.md +99 -0
  30. package/plugin/commands/omgops/pipeline.md +102 -0
  31. package/plugin/commands/omgops/registry.md +109 -0
  32. package/plugin/commands/omgops/retrain.md +91 -0
  33. package/plugin/commands/omgoptim/distill.md +90 -0
  34. package/plugin/commands/omgoptim/profile.md +92 -0
  35. package/plugin/commands/omgoptim/prune.md +81 -0
  36. package/plugin/commands/omgoptim/quantize.md +83 -0
  37. package/plugin/commands/omgtrain/baseline.md +78 -0
  38. package/plugin/commands/omgtrain/compare.md +99 -0
  39. package/plugin/commands/omgtrain/evaluate.md +85 -0
  40. package/plugin/commands/omgtrain/train.md +81 -0
  41. package/plugin/commands/omgtrain/tune.md +89 -0
  42. package/plugin/registry.yaml +252 -2
  43. package/plugin/skills/ml-systems/SKILL.md +65 -0
  44. package/plugin/skills/ml-systems/ai-accelerators/SKILL.md +342 -0
  45. package/plugin/skills/ml-systems/data-eng/SKILL.md +126 -0
  46. package/plugin/skills/ml-systems/deep-learning-primer/SKILL.md +143 -0
  47. package/plugin/skills/ml-systems/deployment-paradigms/SKILL.md +148 -0
  48. package/plugin/skills/ml-systems/dnn-architectures/SKILL.md +128 -0
  49. package/plugin/skills/ml-systems/edge-deployment/SKILL.md +366 -0
  50. package/plugin/skills/ml-systems/efficient-ai/SKILL.md +316 -0
  51. package/plugin/skills/ml-systems/feature-engineering/SKILL.md +151 -0
  52. package/plugin/skills/ml-systems/ml-frameworks/SKILL.md +187 -0
  53. package/plugin/skills/ml-systems/ml-serving-optimization/SKILL.md +371 -0
  54. package/plugin/skills/ml-systems/ml-systems-fundamentals/SKILL.md +103 -0
  55. package/plugin/skills/ml-systems/ml-workflow/SKILL.md +162 -0
  56. package/plugin/skills/ml-systems/mlops/SKILL.md +386 -0
  57. package/plugin/skills/ml-systems/model-deployment/SKILL.md +350 -0
  58. package/plugin/skills/ml-systems/model-dev/SKILL.md +160 -0
  59. package/plugin/skills/ml-systems/model-optimization/SKILL.md +339 -0
  60. package/plugin/skills/ml-systems/robust-ai/SKILL.md +395 -0
  61. package/plugin/skills/ml-systems/training-data/SKILL.md +152 -0
  62. package/plugin/workflows/ml-systems/data-preparation-workflow.md +276 -0
  63. package/plugin/workflows/ml-systems/edge-deployment-workflow.md +413 -0
  64. package/plugin/workflows/ml-systems/full-ml-lifecycle-workflow.md +405 -0
  65. package/plugin/workflows/ml-systems/hyperparameter-tuning-workflow.md +352 -0
  66. package/plugin/workflows/ml-systems/mlops-pipeline-workflow.md +384 -0
  67. package/plugin/workflows/ml-systems/model-deployment-workflow.md +392 -0
  68. package/plugin/workflows/ml-systems/model-development-workflow.md +218 -0
  69. package/plugin/workflows/ml-systems/model-evaluation-workflow.md +416 -0
  70. package/plugin/workflows/ml-systems/model-optimization-workflow.md +390 -0
  71. package/plugin/workflows/ml-systems/monitoring-drift-workflow.md +446 -0
  72. package/plugin/workflows/ml-systems/retraining-workflow.md +401 -0
  73. package/plugin/workflows/ml-systems/training-pipeline-workflow.md +382 -0
@@ -0,0 +1,405 @@
1
+ ---
2
+ name: Full ML Lifecycle Workflow
3
+ description: Complete end-to-end ML lifecycle workflow orchestrating all phases from problem definition through production monitoring and continuous improvement.
4
+ category: ml-systems
5
+ complexity: medium
6
+ agents:
7
+ - ai-architect-agent
8
+ - data-scientist-agent
9
+ - ml-engineer-agent
10
+ - research-scientist-agent
11
+ - model-optimizer-agent
12
+ - production-engineer-agent
13
+ - mlops-engineer-agent
14
+ - experiment-analyst-agent
15
+ ---
16
+
17
+ # Full ML Lifecycle Workflow
18
+
19
+ End-to-end ML project lifecycle management.
20
+
21
+ ## Overview
22
+
23
+ ```
24
+ ┌─────────────────────────────────────────────────────────────────────────┐
25
+ │ FULL ML LIFECYCLE WORKFLOW │
26
+ ├─────────────────────────────────────────────────────────────────────────┤
27
+ │ │
28
+ │ ┌─────────────────────────────────────────────────────────────────────┐│
29
+ │ │ PHASE 1: DISCOVERY & PLANNING ││
30
+ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ││
31
+ │ │ │ Problem │→│ Data │→│ Feasibility│→│ Project │ ││
32
+ │ │ │ Framing │ │ Audit │ │ Study │ │ Plan │ ││
33
+ │ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ ││
34
+ │ └─────────────────────────────────────────────────────────────────────┘│
35
+ │ ↓ │
36
+ │ ┌─────────────────────────────────────────────────────────────────────┐│
37
+ │ │ PHASE 2: DATA & FEATURE ENGINEERING ││
38
+ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ││
39
+ │ │ │ Data │→│ Data │→│ Feature │→│ Feature │ ││
40
+ │ │ │ Collection│ │ Prep │ │ Eng │ │ Store │ ││
41
+ │ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ ││
42
+ │ └─────────────────────────────────────────────────────────────────────┘│
43
+ │ ↓ │
44
+ │ ┌─────────────────────────────────────────────────────────────────────┐│
45
+ │ │ PHASE 3: MODEL DEVELOPMENT ││
46
+ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ││
47
+ │ │ │ Baseline │→│ Model │→│ Hyper- │→│ Evaluation│ ││
48
+ │ │ │ Models │ │ Training │ │ tuning │ │ │ ││
49
+ │ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ ││
50
+ │ └─────────────────────────────────────────────────────────────────────┘│
51
+ │ ↓ │
52
+ │ ┌─────────────────────────────────────────────────────────────────────┐│
53
+ │ │ PHASE 4: OPTIMIZATION & DEPLOYMENT ││
54
+ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ││
55
+ │ │ │ Model │→│ Packaging│→│ Staging │→│ Production│ ││
56
+ │ │ │ Optim │ │ │ │ │ │ │ ││
57
+ │ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ ││
58
+ │ └─────────────────────────────────────────────────────────────────────┘│
59
+ │ ↓ │
60
+ │ ┌─────────────────────────────────────────────────────────────────────┐│
61
+ │ │ PHASE 5: OPERATIONS & CONTINUOUS IMPROVEMENT ││
62
+ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ││
63
+ │ │ │ Monitoring│→│ Drift │→│ Retrain │→│ Iterate │ ↺ ││
64
+ │ │ │ │ │ Detection│ │ │ │ │ ││
65
+ │ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ ││
66
+ │ └─────────────────────────────────────────────────────────────────────┘│
67
+ │ │
68
+ └─────────────────────────────────────────────────────────────────────────┘
69
+ ```
70
+
71
+ ## Steps
72
+
73
+ This workflow consists of 5 major phases:
74
+
75
+ 1. **Phase 1: Discovery & Planning** - Problem framing, data audit, feasibility, project plan
76
+ 2. **Phase 2: Data & Feature Engineering** - Data collection, preparation, feature engineering
77
+ 3. **Phase 3: Model Development** - Baseline, training, hyperparameter tuning, evaluation
78
+ 4. **Phase 4: Optimization & Deployment** - Model optimization, packaging, staging, production
79
+ 5. **Phase 5: Operations & Continuous Improvement** - Monitoring, drift detection, retraining
80
+
81
+ ## Phase 1: Discovery & Planning
82
+
83
+ ### Step 1.1: Problem Framing
84
+ **Agent**: ai-architect-agent
85
+
86
+ **Actions**:
87
+ ```bash
88
+ # Initialize ML project
89
+ /omgml:init <project_name> --template <type>
90
+ ```
91
+
92
+ **Deliverables**:
93
+ - Problem statement document
94
+ - Success metrics definition
95
+ - Business requirements
96
+ - Constraints and assumptions
97
+
98
+ **Template**:
99
+ ```markdown
100
+ # ML Project Brief
101
+
102
+ ## Business Problem
103
+ [Clear description of the business problem]
104
+
105
+ ## ML Objective
106
+ - **Type**: Classification / Regression / Ranking / etc.
107
+ - **Target**: [What we're predicting]
108
+ - **Success Metric**: [Primary metric, e.g., AUC > 0.85]
109
+
110
+ ## Constraints
111
+ - Latency: [e.g., < 100ms p99]
112
+ - Throughput: [e.g., 1000 QPS]
113
+ - Model Size: [e.g., < 100MB for edge]
114
+
115
+ ## Timeline
116
+ - Discovery: Week 1-2
117
+ - Development: Week 3-6
118
+ - Deployment: Week 7-8
119
+ ```
120
+
121
+ ### Step 1.2: Data Audit
122
+ **Agent**: data-scientist-agent
123
+
124
+ **Actions**:
125
+ ```bash
126
+ /omgdata:validate --audit --report data_audit.html
127
+ ```
128
+
129
+ **Checklist**:
130
+ - [ ] Data sources identified
131
+ - [ ] Data quality assessed
132
+ - [ ] Volume sufficient for ML
133
+ - [ ] Labels available or obtainable
134
+ - [ ] Privacy/compliance reviewed
135
+
136
+ ### Step 1.3: Feasibility Study
137
+ **Agent**: research-scientist-agent
138
+
139
+ **Actions**:
140
+ - Literature review
141
+ - Similar problem analysis
142
+ - Quick prototyping
143
+ - Risk assessment
144
+
145
+ **Output**:
146
+ ```python
147
+ feasibility = {
148
+ 'technical_feasibility': 0.8, # 0-1 score
149
+ 'data_readiness': 0.7,
150
+ 'similar_solutions_exist': True,
151
+ 'estimated_accuracy': '85-90%',
152
+ 'risks': ['data quality', 'concept drift'],
153
+ 'recommendation': 'Proceed with Phase 2'
154
+ }
155
+ ```
156
+
157
+ ### Step 1.4: Project Plan
158
+ **Agent**: ai-architect-agent
159
+
160
+ **Deliverables**:
161
+ - Architecture design
162
+ - Resource requirements
163
+ - Timeline and milestones
164
+ - Risk mitigation plan
165
+
166
+ ## Phase 2: Data & Feature Engineering
167
+
168
+ ### Step 2.1: Data Collection
169
+ **Agent**: ml-engineer-agent
170
+
171
+ **Actions**:
172
+ ```bash
173
+ /omgdata:collect --sources sources.yaml --output raw/
174
+ ```
175
+
176
+ **Workflow**: data-preparation-workflow
177
+
178
+ ### Step 2.2: Data Preparation
179
+ **Agent**: data-scientist-agent
180
+
181
+ **Actions**:
182
+ ```bash
183
+ /omgdata:validate --schema schema.yaml
184
+ /omgdata:label --strategy weak_supervision
185
+ /omgdata:augment --strategy smote
186
+ /omgdata:split --train 0.7 --val 0.15 --test 0.15
187
+ ```
188
+
189
+ ### Step 2.3: Feature Engineering
190
+ **Agent**: data-scientist-agent
191
+
192
+ **Actions**:
193
+ ```bash
194
+ /omgfeature:extract --config features.yaml
195
+ /omgfeature:select --method mutual_info --k 50
196
+ ```
197
+
198
+ ### Step 2.4: Feature Store
199
+ **Agent**: ml-engineer-agent
200
+
201
+ **Actions**:
202
+ ```bash
203
+ /omgfeature:store --name project_features --version v1
204
+ ```
205
+
206
+ ## Phase 3: Model Development
207
+
208
+ ### Step 3.1: Baseline Models
209
+ **Agent**: data-scientist-agent
210
+
211
+ **Actions**:
212
+ ```bash
213
+ /omgtrain:baseline --data features.parquet --target label
214
+ ```
215
+
216
+ **Workflow**: model-development-workflow
217
+
218
+ ### Step 3.2: Model Training
219
+ **Agent**: research-scientist-agent
220
+
221
+ **Actions**:
222
+ ```bash
223
+ /omgtrain:train --config experiment.yaml
224
+ ```
225
+
226
+ ### Step 3.3: Hyperparameter Tuning
227
+ **Agent**: research-scientist-agent
228
+
229
+ **Actions**:
230
+ ```bash
231
+ /omgtrain:tune --model xgboost --trials 100
232
+ ```
233
+
234
+ **Workflow**: hyperparameter-tuning-workflow
235
+
236
+ ### Step 3.4: Evaluation
237
+ **Agent**: experiment-analyst-agent
238
+
239
+ **Actions**:
240
+ ```bash
241
+ /omgtrain:evaluate --comprehensive --fairness --robustness
242
+ /omgtrain:compare --experiments baseline,v1,v2
243
+ ```
244
+
245
+ **Workflow**: model-evaluation-workflow
246
+
247
+ ## Phase 4: Optimization & Deployment
248
+
249
+ ### Step 4.1: Model Optimization
250
+ **Agent**: model-optimizer-agent
251
+
252
+ **Actions**:
253
+ ```bash
254
+ /omgoptim:profile --model best_model.pt
255
+ /omgoptim:quantize --precision int8
256
+ /omgoptim:prune --sparsity 0.5
257
+ ```
258
+
259
+ **Workflow**: model-optimization-workflow
260
+
261
+ ### Step 4.2: Packaging
262
+ **Agent**: production-engineer-agent
263
+
264
+ **Actions**:
265
+ ```bash
266
+ /omgdeploy:package --model optimized.pt --handler handler.py
267
+ ```
268
+
269
+ ### Step 4.3: Staging Deployment
270
+ **Agent**: mlops-engineer-agent
271
+
272
+ **Actions**:
273
+ ```bash
274
+ /omgdeploy:serve --env staging --config staging.yaml
275
+ ```
276
+
277
+ ### Step 4.4: Production Deployment
278
+ **Agent**: mlops-engineer-agent
279
+
280
+ **Actions**:
281
+ ```bash
282
+ /omgdeploy:cloud --env production --strategy canary
283
+ ```
284
+
285
+ **Workflow**: model-deployment-workflow
286
+
287
+ ## Phase 5: Operations & Continuous Improvement
288
+
289
+ ### Step 5.1: Monitoring
290
+ **Agent**: mlops-engineer-agent
291
+
292
+ **Actions**:
293
+ ```bash
294
+ /omgops:monitor --config monitoring.yaml
295
+ /omgops:pipeline --action status
296
+ ```
297
+
298
+ **Workflow**: monitoring-drift-workflow
299
+
300
+ ### Step 5.2: Drift Detection
301
+ **Agent**: experiment-analyst-agent
302
+
303
+ **Actions**:
304
+ ```bash
305
+ /omgops:drift --reference baseline.parquet --window 7d
306
+ ```
307
+
308
+ ### Step 5.3: Retraining
309
+ **Agent**: ml-engineer-agent
310
+
311
+ **Actions**:
312
+ ```bash
313
+ /omgops:retrain --trigger drift --priority high
314
+ ```
315
+
316
+ **Workflow**: retraining-workflow
317
+
318
+ ### Step 5.4: Continuous Improvement
319
+ **Agent**: ai-architect-agent
320
+
321
+ **Feedback Loop**:
322
+ - Collect production feedback
323
+ - Analyze failure modes
324
+ - Identify improvement opportunities
325
+ - Plan next iteration
326
+
327
+ ## Project Governance
328
+
329
+ ### Checkpoints
330
+
331
+ | Phase | Checkpoint | Approval |
332
+ |-------|------------|----------|
333
+ | 1 | Feasibility approved | Product + Engineering Lead |
334
+ | 2 | Data ready | Data Team Lead |
335
+ | 3 | Model meets criteria | ML Team Lead |
336
+ | 4 | Staging validated | QA + MLOps |
337
+ | 5 | Production stable | All stakeholders |
338
+
339
+ ### Documentation
340
+
341
+ ```
342
+ project/
343
+ ├── docs/
344
+ │ ├── problem_statement.md
345
+ │ ├── data_dictionary.md
346
+ │ ├── model_card.md
347
+ │ └── runbook.md
348
+ ├── reports/
349
+ │ ├── feasibility_study.pdf
350
+ │ ├── evaluation_report.pdf
351
+ │ └── deployment_report.pdf
352
+ └── decisions/
353
+ ├── adr-001-model-choice.md
354
+ └── adr-002-deployment-strategy.md
355
+ ```
356
+
357
+ ## Success Metrics
358
+
359
+ ```python
360
+ project_success_criteria = {
361
+ 'model_performance': {
362
+ 'accuracy': '>= 0.90',
363
+ 'f1': '>= 0.85',
364
+ 'latency_p99': '<= 100ms'
365
+ },
366
+ 'operational': {
367
+ 'uptime': '>= 99.9%',
368
+ 'drift_detection': '< 24h',
369
+ 'retraining_time': '< 4h'
370
+ },
371
+ 'business': {
372
+ 'adoption_rate': '>= 80%',
373
+ 'cost_reduction': '>= 20%',
374
+ 'decision_quality': 'improved'
375
+ }
376
+ }
377
+ ```
378
+
379
+ ## Artifacts
380
+
381
+ - `project_plan.md` - Project documentation
382
+ - `architecture.png` - System architecture
383
+ - `model_card.md` - Model documentation
384
+ - `runbook.md` - Operational procedures
385
+ - `decisions/` - Architecture Decision Records
386
+
387
+ ## Related Workflows
388
+
389
+ This workflow orchestrates:
390
+ - data-preparation-workflow
391
+ - model-development-workflow
392
+ - hyperparameter-tuning-workflow
393
+ - model-evaluation-workflow
394
+ - model-optimization-workflow
395
+ - model-deployment-workflow
396
+ - monitoring-drift-workflow
397
+ - retraining-workflow
398
+
399
+ ## Quality Gates
400
+
401
+ - [ ] All steps completed successfully
402
+ - [ ] Metrics meet defined thresholds
403
+ - [ ] Documentation updated
404
+ - [ ] Artifacts versioned and stored
405
+ - [ ] Stakeholder approval obtained