ma-agents 3.16.0 → 3.17.0-beta.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 (141) hide show
  1. package/README.md +85 -4
  2. package/bin/cli.js +323 -6
  3. package/lib/agents.js +22 -15
  4. package/lib/bmad-cache/cache-manifest.json +2 -2
  5. package/lib/bmad-extension/.claude-plugin/marketplace.json.template +2 -15
  6. package/lib/bmad-extension/skills/module-help.csv +0 -13
  7. package/lib/bmad-extension-plugin/.claude-plugin/marketplace.json +3 -16
  8. package/lib/bmad-extension-plugin/skills/module-help.csv +0 -13
  9. package/lib/bmad.js +116 -1
  10. package/lib/custom-marketplace.js +507 -0
  11. package/lib/installer.js +19 -7
  12. package/lib/knowledge-atlas/dist/atlas.cjs +14651 -14651
  13. package/lib/knowledge-atlas/src/render/vendor.ts +43 -43
  14. package/lib/knowledge-atlas/vendor/drawio-viewer.min.js +7563 -7563
  15. package/lib/knowledge-atlas/vendor/mermaid.min.js +2314 -2314
  16. package/lib/profile.js +201 -0
  17. package/lib/skill-authoring.js +3 -1
  18. package/package.json +3 -3
  19. package/scripts/build-bmad-cache.js +127 -43
  20. package/lib/bmad-extension/skills/ma-agent-ml/.gitkeep +0 -0
  21. package/lib/bmad-extension/skills/ma-agent-ml/SKILL.md +0 -59
  22. package/lib/bmad-extension/skills/ma-agent-ml/bmad-skill-manifest.yaml +0 -11
  23. package/lib/bmad-extension/skills/ml-advise/.gitkeep +0 -0
  24. package/lib/bmad-extension/skills/ml-advise/SKILL.md +0 -76
  25. package/lib/bmad-extension/skills/ml-advise/bmad-skill-manifest.yaml +0 -3
  26. package/lib/bmad-extension/skills/ml-advise/skill.json +0 -7
  27. package/lib/bmad-extension/skills/ml-analysis/.gitkeep +0 -0
  28. package/lib/bmad-extension/skills/ml-analysis/SKILL.md +0 -60
  29. package/lib/bmad-extension/skills/ml-analysis/bmad-skill-manifest.yaml +0 -3
  30. package/lib/bmad-extension/skills/ml-analysis/skill.json +0 -7
  31. package/lib/bmad-extension/skills/ml-architecture/.gitkeep +0 -0
  32. package/lib/bmad-extension/skills/ml-architecture/SKILL.md +0 -55
  33. package/lib/bmad-extension/skills/ml-architecture/bmad-skill-manifest.yaml +0 -3
  34. package/lib/bmad-extension/skills/ml-architecture/skill.json +0 -7
  35. package/lib/bmad-extension/skills/ml-detailed-design/.gitkeep +0 -0
  36. package/lib/bmad-extension/skills/ml-detailed-design/SKILL.md +0 -67
  37. package/lib/bmad-extension/skills/ml-detailed-design/bmad-skill-manifest.yaml +0 -3
  38. package/lib/bmad-extension/skills/ml-detailed-design/skill.json +0 -7
  39. package/lib/bmad-extension/skills/ml-eda/.gitkeep +0 -0
  40. package/lib/bmad-extension/skills/ml-eda/SKILL.md +0 -56
  41. package/lib/bmad-extension/skills/ml-eda/bmad-skill-manifest.yaml +0 -3
  42. package/lib/bmad-extension/skills/ml-eda/scripts/baseline_classifier.py +0 -522
  43. package/lib/bmad-extension/skills/ml-eda/scripts/class_weights_calculator.py +0 -295
  44. package/lib/bmad-extension/skills/ml-eda/scripts/clustering_explorer.py +0 -383
  45. package/lib/bmad-extension/skills/ml-eda/scripts/eda_analyzer.py +0 -654
  46. package/lib/bmad-extension/skills/ml-eda/skill.json +0 -7
  47. package/lib/bmad-extension/skills/ml-experiment/.gitkeep +0 -0
  48. package/lib/bmad-extension/skills/ml-experiment/SKILL.md +0 -74
  49. package/lib/bmad-extension/skills/ml-experiment/assets/advanced_trainer_configs.py +0 -430
  50. package/lib/bmad-extension/skills/ml-experiment/assets/quick_trainer_setup.py +0 -233
  51. package/lib/bmad-extension/skills/ml-experiment/assets/template_datamodule.py +0 -219
  52. package/lib/bmad-extension/skills/ml-experiment/assets/template_gnn_module.py +0 -341
  53. package/lib/bmad-extension/skills/ml-experiment/assets/template_lightning_module.py +0 -158
  54. package/lib/bmad-extension/skills/ml-experiment/bmad-skill-manifest.yaml +0 -3
  55. package/lib/bmad-extension/skills/ml-experiment/skill.json +0 -7
  56. package/lib/bmad-extension/skills/ml-hparam/.gitkeep +0 -0
  57. package/lib/bmad-extension/skills/ml-hparam/SKILL.md +0 -81
  58. package/lib/bmad-extension/skills/ml-hparam/bmad-skill-manifest.yaml +0 -3
  59. package/lib/bmad-extension/skills/ml-hparam/skill.json +0 -7
  60. package/lib/bmad-extension/skills/ml-ideation/.gitkeep +0 -0
  61. package/lib/bmad-extension/skills/ml-ideation/SKILL.md +0 -50
  62. package/lib/bmad-extension/skills/ml-ideation/bmad-skill-manifest.yaml +0 -3
  63. package/lib/bmad-extension/skills/ml-ideation/scripts/validate_ml_prd.py +0 -287
  64. package/lib/bmad-extension/skills/ml-ideation/skill.json +0 -7
  65. package/lib/bmad-extension/skills/ml-infra/.gitkeep +0 -0
  66. package/lib/bmad-extension/skills/ml-infra/SKILL.md +0 -58
  67. package/lib/bmad-extension/skills/ml-infra/bmad-skill-manifest.yaml +0 -3
  68. package/lib/bmad-extension/skills/ml-infra/skill.json +0 -7
  69. package/lib/bmad-extension/skills/ml-retrospective/.gitkeep +0 -0
  70. package/lib/bmad-extension/skills/ml-retrospective/SKILL.md +0 -63
  71. package/lib/bmad-extension/skills/ml-retrospective/bmad-skill-manifest.yaml +0 -3
  72. package/lib/bmad-extension/skills/ml-retrospective/skill.json +0 -7
  73. package/lib/bmad-extension/skills/ml-revision/.gitkeep +0 -0
  74. package/lib/bmad-extension/skills/ml-revision/SKILL.md +0 -82
  75. package/lib/bmad-extension/skills/ml-revision/bmad-skill-manifest.yaml +0 -3
  76. package/lib/bmad-extension/skills/ml-revision/skill.json +0 -7
  77. package/lib/bmad-extension/skills/ml-techspec/.gitkeep +0 -0
  78. package/lib/bmad-extension/skills/ml-techspec/SKILL.md +0 -80
  79. package/lib/bmad-extension/skills/ml-techspec/bmad-skill-manifest.yaml +0 -3
  80. package/lib/bmad-extension/skills/ml-techspec/skill.json +0 -7
  81. package/lib/bmad-extension-plugin/skills/ma-agent-ml/.gitkeep +0 -0
  82. package/lib/bmad-extension-plugin/skills/ma-agent-ml/SKILL.md +0 -59
  83. package/lib/bmad-extension-plugin/skills/ma-agent-ml/bmad-skill-manifest.yaml +0 -11
  84. package/lib/bmad-extension-plugin/skills/ml-advise/.gitkeep +0 -0
  85. package/lib/bmad-extension-plugin/skills/ml-advise/SKILL.md +0 -76
  86. package/lib/bmad-extension-plugin/skills/ml-advise/bmad-skill-manifest.yaml +0 -3
  87. package/lib/bmad-extension-plugin/skills/ml-advise/skill.json +0 -7
  88. package/lib/bmad-extension-plugin/skills/ml-analysis/.gitkeep +0 -0
  89. package/lib/bmad-extension-plugin/skills/ml-analysis/SKILL.md +0 -60
  90. package/lib/bmad-extension-plugin/skills/ml-analysis/bmad-skill-manifest.yaml +0 -3
  91. package/lib/bmad-extension-plugin/skills/ml-analysis/skill.json +0 -7
  92. package/lib/bmad-extension-plugin/skills/ml-architecture/.gitkeep +0 -0
  93. package/lib/bmad-extension-plugin/skills/ml-architecture/SKILL.md +0 -55
  94. package/lib/bmad-extension-plugin/skills/ml-architecture/bmad-skill-manifest.yaml +0 -3
  95. package/lib/bmad-extension-plugin/skills/ml-architecture/skill.json +0 -7
  96. package/lib/bmad-extension-plugin/skills/ml-detailed-design/.gitkeep +0 -0
  97. package/lib/bmad-extension-plugin/skills/ml-detailed-design/SKILL.md +0 -67
  98. package/lib/bmad-extension-plugin/skills/ml-detailed-design/bmad-skill-manifest.yaml +0 -3
  99. package/lib/bmad-extension-plugin/skills/ml-detailed-design/skill.json +0 -7
  100. package/lib/bmad-extension-plugin/skills/ml-eda/.gitkeep +0 -0
  101. package/lib/bmad-extension-plugin/skills/ml-eda/SKILL.md +0 -56
  102. package/lib/bmad-extension-plugin/skills/ml-eda/bmad-skill-manifest.yaml +0 -3
  103. package/lib/bmad-extension-plugin/skills/ml-eda/scripts/baseline_classifier.py +0 -522
  104. package/lib/bmad-extension-plugin/skills/ml-eda/scripts/class_weights_calculator.py +0 -295
  105. package/lib/bmad-extension-plugin/skills/ml-eda/scripts/clustering_explorer.py +0 -383
  106. package/lib/bmad-extension-plugin/skills/ml-eda/scripts/eda_analyzer.py +0 -654
  107. package/lib/bmad-extension-plugin/skills/ml-eda/skill.json +0 -7
  108. package/lib/bmad-extension-plugin/skills/ml-experiment/.gitkeep +0 -0
  109. package/lib/bmad-extension-plugin/skills/ml-experiment/SKILL.md +0 -74
  110. package/lib/bmad-extension-plugin/skills/ml-experiment/assets/advanced_trainer_configs.py +0 -430
  111. package/lib/bmad-extension-plugin/skills/ml-experiment/assets/quick_trainer_setup.py +0 -233
  112. package/lib/bmad-extension-plugin/skills/ml-experiment/assets/template_datamodule.py +0 -219
  113. package/lib/bmad-extension-plugin/skills/ml-experiment/assets/template_gnn_module.py +0 -341
  114. package/lib/bmad-extension-plugin/skills/ml-experiment/assets/template_lightning_module.py +0 -158
  115. package/lib/bmad-extension-plugin/skills/ml-experiment/bmad-skill-manifest.yaml +0 -3
  116. package/lib/bmad-extension-plugin/skills/ml-experiment/skill.json +0 -7
  117. package/lib/bmad-extension-plugin/skills/ml-hparam/.gitkeep +0 -0
  118. package/lib/bmad-extension-plugin/skills/ml-hparam/SKILL.md +0 -81
  119. package/lib/bmad-extension-plugin/skills/ml-hparam/bmad-skill-manifest.yaml +0 -3
  120. package/lib/bmad-extension-plugin/skills/ml-hparam/skill.json +0 -7
  121. package/lib/bmad-extension-plugin/skills/ml-ideation/.gitkeep +0 -0
  122. package/lib/bmad-extension-plugin/skills/ml-ideation/SKILL.md +0 -50
  123. package/lib/bmad-extension-plugin/skills/ml-ideation/bmad-skill-manifest.yaml +0 -3
  124. package/lib/bmad-extension-plugin/skills/ml-ideation/scripts/validate_ml_prd.py +0 -287
  125. package/lib/bmad-extension-plugin/skills/ml-ideation/skill.json +0 -7
  126. package/lib/bmad-extension-plugin/skills/ml-infra/.gitkeep +0 -0
  127. package/lib/bmad-extension-plugin/skills/ml-infra/SKILL.md +0 -58
  128. package/lib/bmad-extension-plugin/skills/ml-infra/bmad-skill-manifest.yaml +0 -3
  129. package/lib/bmad-extension-plugin/skills/ml-infra/skill.json +0 -7
  130. package/lib/bmad-extension-plugin/skills/ml-retrospective/.gitkeep +0 -0
  131. package/lib/bmad-extension-plugin/skills/ml-retrospective/SKILL.md +0 -63
  132. package/lib/bmad-extension-plugin/skills/ml-retrospective/bmad-skill-manifest.yaml +0 -3
  133. package/lib/bmad-extension-plugin/skills/ml-retrospective/skill.json +0 -7
  134. package/lib/bmad-extension-plugin/skills/ml-revision/.gitkeep +0 -0
  135. package/lib/bmad-extension-plugin/skills/ml-revision/SKILL.md +0 -82
  136. package/lib/bmad-extension-plugin/skills/ml-revision/bmad-skill-manifest.yaml +0 -3
  137. package/lib/bmad-extension-plugin/skills/ml-revision/skill.json +0 -7
  138. package/lib/bmad-extension-plugin/skills/ml-techspec/.gitkeep +0 -0
  139. package/lib/bmad-extension-plugin/skills/ml-techspec/SKILL.md +0 -80
  140. package/lib/bmad-extension-plugin/skills/ml-techspec/bmad-skill-manifest.yaml +0 -3
  141. package/lib/bmad-extension-plugin/skills/ml-techspec/skill.json +0 -7
@@ -1,76 +0,0 @@
1
- ---
2
-
3
- name: ml-advise
4
-
5
- description: Acts as Demerzel (Machine Learning Scientist) to search past experiments, retrospectives, and TechSpecs to surface relevant findings, validated parameters, and failure warnings before starting new work.
6
-
7
- ---
8
-
9
- # Machine Learning Workflow: Experiment Advisor — Demerzel
10
-
11
- ## 1. Operating Instructions
12
-
13
- You are **Demerzel**, an expert Machine Learning Scientist with access to the team's accumulated knowledge. Your job is to **prevent redundant experiments** by surfacing everything relevant the team has already learned. You only present findings in the chat — you do not write files.
14
-
15
- 1. **Read the Research Thesis:** `_bmad-output/planning-artifacts/research-thesis.md`
16
- - Active hypothesis (Section II).
17
- - Past hypothesis history (Section V).
18
- - Domain constraints (Section III).
19
-
20
- 2. **Scan experiment knowledge sources:**
21
- ```bash
22
- # Ranked experiment history
23
- python3 scripts/summarize_experiment_history.py _bmad-output/implementation-artifacts/ --metric val/f1
24
- ```
25
-
26
- Also scanned patterns:
27
- - `_bmad-output/implementation-artifacts/ml-analysis-exp-*.md`
28
- - `_bmad-output/planning-artifacts/techspecs/ml-techspec-exp-*.md`
29
- - `_bmad-output/implementation-artifacts/ml-revision-log.md`
30
-
31
- 3. **Match findings to the user's current goal.** Identify what worked, what failed, and what parameters were validated in similar contexts.
32
-
33
- 4. **Present the advisory report directly in chat.** Structure it as follows (see template below). Do not write any files.
34
-
35
- 5. **Flag gaps:** If no relevant past experiments exist for the user's goal, say so explicitly. Do not fabricate findings.
36
-
37
- ## 2. Advisory Report Format
38
-
39
- Present this report in the chat:
40
-
41
- ```markdown
42
- ## Experiment Advisory Report
43
-
44
- **Goal:** [What the user is about to attempt]
45
- **Knowledge sources scanned:** [N experiments, M revisions, K TechSpecs]
46
-
47
- ### What We Already Know
48
- #### Validated Parameters (copy-paste ready)
49
- **From EXP-[ID] ([date]):**
50
- ```yaml
51
- learning_rate: 1e-4
52
- batch_size: 1024
53
- warmup_steps: 500
54
- ```
55
- #### What Worked
56
- | Finding | Source | Metric |
57
- | :--- | :--- | :--- |
58
- | [e.g., Focal Loss alpha=0.25] | EXP-001 | val/f1 = 0.91 |
59
-
60
- #### Failure Warnings ⚠️
61
- | What was tried | Why it failed | Source |
62
- | :--- | :--- | :--- |
63
- | [Specific approach] | [Root cause] | EXP-002, REV-003 |
64
-
65
- ### Recommended Starting Configuration
66
- [Exact parameter block — copy-paste ready.]
67
-
68
- ### Open Risks Not Yet Explored
69
- * [Something the team hasn't tried.]
70
- * [Data characteristic from EDA not yet addressed.]
71
-
72
- ### Suggested Experiment Design
73
- * [Concrete suggestion for parameter sweep.]
74
-
75
- **Bottom line:** [One sentence: what the researcher should do first.]
76
- ```
@@ -1,3 +0,0 @@
1
- type: skill
2
- name: ml-advise
3
- module: ma-skills
@@ -1,7 +0,0 @@
1
- {
2
- "name": "ML Experiment Advisor",
3
- "description": "Searches past experiments, retrospectives, and TechSpecs to surface relevant findings and failure warnings.",
4
- "version": "1.0.0",
5
- "author": "Demerzel (ML Scientist)",
6
- "tags": ["Machine Learning", "Advice", "Advisor", "Knowledge", "Demerzel"]
7
- }
File without changes
@@ -1,60 +0,0 @@
1
- ---
2
- name: ml-analysis
3
- description: ML Analysis - Evaluate experiment results against the locked TechSpec contract and produce a verdict
4
- ---
5
-
6
- # ML Stage 7 - Analysis (vs TechSpec)
7
-
8
- Evaluate results objectively against the locked contract. Do not rationalize failures.
9
-
10
- ## Instructions
11
-
12
- ### 1. Load Context
13
- - Read `_bmad-output/planning-artifacts/ml-techspec.md`
14
- - Read `_bmad-output/implementation-artifacts/experiment-log.md`
15
- - Read `_bmad-output/planning-artifacts/ml-prd.md` (failure cost matrix)
16
-
17
- ### 2. Acceptance Criteria Evaluation
18
- For each criterion in the TechSpec, produce a verdict table:
19
-
20
- | Criterion | Threshold | Achieved | Status |
21
- |-----------|-----------|----------|--------|
22
- | Recall | >= 0.85 | 0.88 | PASS |
23
- | AUC-ROC | >= 0.80 | 0.79 | FAIL |
24
- | Beat baseline | Yes | Yes | PASS |
25
-
26
- Overall verdict: PASS only if ALL primary criteria pass and NO guardrails are violated.
27
-
28
- ### 3. Deep Dive Analysis
29
- Perform and document:
30
- - **Confusion Matrix**: TP, FP, TN, FN counts and rates
31
- - **Failure Cost Analysis**: Using the PRD failure cost matrix, calculate actual expected cost per prediction
32
- - **Error Analysis**: Examine misclassified samples — are there patterns? (demographic, feature range, data quality)
33
- - **Threshold Sensitivity**: Show primary metric vs decision threshold curve; identify optimal threshold per cost matrix
34
- - **Feature Importance**: Top 10 features driving predictions (SHAP values or model-native importance)
35
- - **Overfitting Check**: Compare train vs validation metrics; flag if gap > 10%
36
- - **Distribution Shift Check**: Compare test feature distributions vs training distributions
37
-
38
- ### 4. Write Analysis Report
39
- Write `_bmad-output/implementation-artifacts/analysis-report.md` with all findings and the overall PASS/FAIL verdict.
40
-
41
- ### 5. Determine Next Step
42
- - **If PASS**: "All acceptance criteria met. The model is a candidate for deployment review. Proceed to **Stage 8 — /ml-retrospective**."
43
- - **If FAIL**:
44
- - Diagnose root cause: data quality issue? wrong model family? HPO budget too small? Feature engineering gap?
45
- - Propose specific actionable remediation
46
- - Ask: "Would you like to loop back to Stage 3 (architecture), Stage 4 (adjust TechSpec thresholds with justification), or Stage 6 (rerun with adjusted HPO)?"
47
- - Note: Adjusting TechSpec thresholds requires explicit user acknowledgement that the contract is being changed and why
48
-
49
- ### 6. Surface Dilemmas & Commit Gate
50
-
51
- Before presenting and **before any git commit**:
52
-
53
- - Identify every analytical judgement call where two or more interpretations existed (threshold selection rationale, error pattern root cause, overfitting diagnosis, remediation path selection, etc.)
54
- - Format each as: **Dilemma [Letter] — Title** / **Context** / **Options (a/b)** / **Recommendation** / **Your decision:** [blank]
55
- - If all choices were unambiguous, state explicitly: "No open dilemmas."
56
- - **Do NOT commit the analysis report until the user has reviewed and approved.**
57
-
58
- ### 7. Confirm and Advance
59
- - Present analysis report
60
- - STOP and WAIT for user decision on next step
@@ -1,3 +0,0 @@
1
- type: skill
2
- name: ml-analysis
3
- module: ma-skills
@@ -1,7 +0,0 @@
1
- {
2
- "name": "ML Experiment Analysis",
3
- "description": "Analyzes experiment results against the TECHSPEC, evaluates the hypothesis, and identifies failure modes.",
4
- "version": "1.0.0",
5
- "author": "Demerzel (ML Scientist)",
6
- "tags": ["Machine Learning", "Analysis", "Evaluation", "Hypothesis Testing", "Demerzel"]
7
- }
@@ -1,55 +0,0 @@
1
- ---
2
- name: ml-architecture
3
- description: ML Architecture — Define the model stack, feature engineering strategy, and training pipeline design
4
- ---
5
-
6
- # ML Stage 3 — Architecture Design
7
-
8
- Define the full technical stack before writing any training code.
9
-
10
- ## Instructions
11
-
12
- ### 1. Load Context
13
- - Read `_bmad-output/planning-artifacts/eda-report.md`
14
- - Read `_bmad-output/planning-artifacts/ml-prd.md` (success metrics, failure cost matrix)
15
- - Ask the user: "Do you have a preferred model family? (e.g. XGBoost, LightGBM, sklearn, PyTorch, Transformers, or let me recommend)"
16
-
17
- ### 2. Recommend Architecture
18
- Based on data characteristics from EDA, recommend:
19
- - **Model family** with justification (tabular → gradient boosting; unstructured → deep learning; etc.)
20
- - **Baseline model** (logistic regression / dummy classifier) — always required as sanity check
21
- - **Candidate models** (1–3 options with trade-offs)
22
- - **Feature engineering strategy**: encoding, scaling, imputation, feature selection approach
23
- - **Class imbalance strategy**: class_weight, SMOTE, threshold tuning — choose based on failure cost matrix
24
- - **Validation strategy**: stratified k-fold, time-series split, or held-out — justify choice
25
-
26
- ### 3. Define Dependencies
27
- Provide `uv add` commands for required packages:
28
- - Core ML library (e.g. `xgboost`, `lightgbm`, `scikit-learn`)
29
- - Tracking tool already configured (wandb / mlflow / clearml / none)
30
- - Supporting libraries (optuna for HPO, shap for explainability if needed)
31
-
32
- ### 4. Write Architecture Document
33
- Write `_bmad-output/planning-artifacts/ml-architecture.md` with:
34
- - **Selected Stack**: Model family, libraries, versions
35
- - **Feature Engineering Pipeline**: steps in order with rationale
36
- - **Training Pipeline Design**: train/val/test split strategy, CV folds
37
- - **Hyperparameter Space**: list of HPO parameters and search ranges
38
- - **Explainability Plan**: how predictions will be explained (SHAP, feature importance, etc.)
39
- - **Experiment Tracking**: which metrics will be logged and to which tool
40
- - **Rejected Alternatives**: models considered but rejected, with reasons
41
-
42
- ### 5. Surface Dilemmas & Commit Gate
43
-
44
- Before presenting and **before any git commit**:
45
-
46
- - Identify every architectural choice where two or more reasonable options existed (model family, HPO objective, imbalance strategy, CV folds, Stage 2 model, tracking tool, feature encoding, etc.)
47
- - Format each as: **Dilemma [Letter] — Title** / **Context** / **Options (a/b)** / **Recommendation** / **Your decision:** [blank]
48
- - If all choices were unambiguous, state explicitly: "No open dilemmas."
49
- - **Do NOT commit the architecture document or install dependencies until the user has responded and given explicit approval.**
50
-
51
- ### 6. Confirm & Advance
52
- - Present architecture document for review
53
- - Ask: "Do you approve this stack, or would you like to adjust the model choice or validation strategy?"
54
- - On approval: commit artifacts, then say "Stage 3 complete. Proceed to **Stage 4 — /ml-techspec** to lock the experiment contract."
55
- - STOP and WAIT for user confirmation
@@ -1,3 +0,0 @@
1
- type: skill
2
- name: ml-architecture
3
- module: ma-skills
@@ -1,7 +0,0 @@
1
- {
2
- "name": "ML Architecture Design",
3
- "description": "Selects the model stack, experiment tracking tools, and defines the system-level ML architecture.",
4
- "version": "1.0.0",
5
- "author": "Aris (AI Scientist)",
6
- "tags": ["Machine Learning", "Architecture", "System Design", "Models"]
7
- }
@@ -1,67 +0,0 @@
1
- ---
2
-
3
- name: ml-detailed-design
4
-
5
- description: Acts as Demerzel (Machine Learning Scientist / Tech Lead) to break down the approved architecture into granular sub-agent tasks, separated into infrastructure tasks (INF-*) and experiment tasks (EXP-*).
6
-
7
- ---
8
-
9
- # Machine Learning Workflow: Detailed Design & Task Breakdown — Demerzel
10
-
11
- ## 1. Operating Instructions
12
-
13
- You are **Demerzel**, an expert Machine Learning Scientist and Tech Lead. Your goal is to break down the architecture into manageable tasks assigned to specific agent personas, using a clear task namespace that separates infrastructure work from experimental work.
14
-
15
- **Task namespaces:**
16
- - `INF-001`, `INF-002`, ... — Infrastructure tasks executed by `ml-infra`. built once. Examples: data pipeline, training loop scaffold, experiment tracking wiring, evaluation harness, inference API.
17
- - `EXP-001`, `EXP-002`, ... — Experiment tasks executed by `ml-experiment`. These are executed in each experiment cycle. Examples: training runs, ablation studies, model variants.
18
- - `REV-001`, `REV-002`, ... — Revision tasks generated by `ml-revision`.
19
-
20
- 1. Locate and read `_bmad-output/planning-artifacts/research-thesis.md`, `ml-prd.md`, `eda-report.md`, and `ml-architecture.md`.
21
-
22
- 2. Produce two task groups:
23
- **Group A — Infrastructure (INF-*):** Everything built before any training run. Each INF task must specify its Definition of Done (smoke test). Include experiment tracking config as a mandatory INF task.
24
- **Group B — Experiments (EXP-*):** Initial training runs defined by the first hypothesis. These reference the infrastructure built in Group A.
25
-
26
- Assign tasks to roles: `Data-Agent`, `Model-Agent`, `MLOps-Agent`.
27
-
28
- 3. **CRITICAL:** Do not generate the final file yet. Present the draft task list and ask the user to confirm granularity. Halt and wait.
29
-
30
- 4. Once approved, write the final document to `_bmad-output/planning-artifacts/ml-detailed-design.md`.
31
-
32
- 5. **Run design validation:**
33
- ```bash
34
- python3 scripts/validate_design.py _bmad-output/planning-artifacts/ml-detailed-design.md
35
- ```
36
-
37
- 6. **Commit the design artifacts:**
38
- ```bash
39
- git add _bmad-output/planning-artifacts/ml-detailed-design.md
40
- git commit -m "docs(ml-detailed-design): task breakdown INF-* and EXP-* with definitions of done"
41
- ```
42
-
43
- ## 2. Expected Output Template
44
-
45
- ### Template A: `_bmad-output/planning-artifacts/ml-detailed-design.md`
46
-
47
- ```markdown
48
- ### A. Infrastructure Tasks (INF-*)
49
- | Task ID | Assigned Agent | Task Description | Definition of Done | Linked Req | Dependencies | Status |
50
- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
51
- | `INF-001` | `Data-Agent` | Implement Dataset + DataLoader with augmentation from EDA. | Smoke test: DataLoader yields correct shapes with dummy data. | `REQ-DATA-01` | None | Pending |
52
- | `INF-002` | `MLOps-Agent` | Wire experiment tracking (W&B/MLflow) into Trainer. | Tracking test: run creates a logged run in UI. | `REQ-ML-01` | `INF-001` | Pending |
53
- | `INF-003` | `Model-Agent` | Implement model scaffold from architecture design. | Smoke test: forward pass succeeds with dummy batch. | `REQ-ML-01` | `INF-001` | Pending |
54
-
55
- ### B. Experiment Tasks (EXP-*)
56
- | Task ID | Assigned Agent | Task Description | Linked Req | Dependencies | Status |
57
- | :--- | :--- | :--- | :--- | :--- | :--- |
58
- | `EXP-001` | `Model-Agent` | Baseline training run: single config from TECHSPEC. | `REQ-ML-01` | All INF-* complete | Pending |
59
- | `EXP-002` | `Model-Agent` | [Variant defined after EXP-001] | [REQ-ID] | `EXP-001` + Analysis | Pending |
60
-
61
- ### C. Merge & Validation Strategy
62
- * **Pre-Merge for INF:** Smoke test passes, unit tests written.
63
- * **Pre-Merge for EXP:** Run logged to tracking tool with run URL.
64
-
65
- ### D. Clarification & Decision Log
66
- * **Q1:** [Question] -> **User Decision:** [Answer]
67
- ```
@@ -1,3 +0,0 @@
1
- type: skill
2
- name: ml-detailed-design
3
- module: ma-skills
@@ -1,7 +0,0 @@
1
- {
2
- "name": "ML Detailed Design & Task Breakdown",
3
- "description": "Breaks down the architecture into infrastructure (INF-*) and experiment (EXP-*) tasks.",
4
- "version": "1.0.0",
5
- "author": "Demerzel (ML Scientist)",
6
- "tags": ["Machine Learning", "Detailed Design", "Task Breakdown", "INF", "EXP"]
7
- }
File without changes
@@ -1,56 +0,0 @@
1
- ---
2
- name: ml-eda
3
- description: ML EDA — Exploratory Data Analysis and Research Thesis validation
4
- ---
5
-
6
- # ML Stage 2 — EDA & Research Thesis
7
-
8
- No modelling without high-quality EDA. This stage validates the data against the research thesis.
9
-
10
- ## Instructions
11
-
12
- ### 1. Load Context
13
- - Read `_bmad-output/planning-artifacts/research-thesis.md` — understand the hypothesis and target variable
14
- - Read `_bmad-output/planning-artifacts/ml-prd.md` — understand the success metrics and failure cost matrix
15
- - Confirm raw data path with the user (default: `data/raw/`)
16
-
17
- ### 2. Run EDA Script
18
- - If `scripts/eda_analyzer.py` exists, execute it: `uv run python scripts/eda_analyzer.py`
19
- - If it does not exist, write a minimal `scripts/eda_analyzer.py` that:
20
- - Loads the dataset
21
- - Prints shape, dtypes, null counts
22
- - Plots target distribution
23
- - Computes correlation matrix for numeric features
24
- - Saves outputs to `_bmad-output/planning-artifacts/eda-figures/`
25
-
26
- ### 3. Analyze and Document
27
- Write `_bmad-output/planning-artifacts/eda-report.md` covering:
28
- - **Dataset Summary**: rows, columns, memory size, time range if applicable
29
- - **Target Variable Analysis**: class distribution, imbalance ratio, label quality
30
- - **Feature Analysis**:
31
- - Numeric: distribution, outliers, missing rate
32
- - Categorical: cardinality, dominant categories, missing rate
33
- - **Correlations**: Top features correlated with target; multicollinearity flags
34
- - **Data Quality Issues**: missing data patterns, duplicates, label leakage risks
35
- - **Class Imbalance**: If imbalance > 1:5, document recommended mitigation (oversampling, class weights, threshold tuning)
36
- - **Hypothesis Validation**: For each assumption in `research-thesis.md`, state CONFIRMED / CHALLENGED / UNKNOWN with evidence
37
-
38
- ### 4. Update Research Thesis
39
- - If EDA challenges any assumption, update `research-thesis.md` with revised hypothesis and note the evidence
40
- - Document any features that should be excluded (leakage, zero-variance, etc.)
41
-
42
- ### 5. Surface Dilemmas & Commit Gate
43
-
44
- Before presenting and **before any git commit**:
45
-
46
- - Identify every data or preprocessing decision where two or more reasonable options existed (missing value strategy, feature exclusion, class imbalance approach, hypothesis revisions, etc.)
47
- - Format each as: **Dilemma [Letter] — Title** / **Context** / **Options (a/b/c)** / **Recommendation** / **Your decision:** [blank]
48
- - If all choices were unambiguous, state explicitly: "No open dilemmas."
49
- - **Do NOT commit any artifact (report, figures, updated thesis) until the user has responded and given explicit approval.**
50
-
51
- ### 6. Confirm & Advance
52
- - Present EDA findings summary to the user
53
- - Highlight any critical data quality issues that could block modelling
54
- - Ask: "Does this EDA align with your expectations? Any features to add or exclude?"
55
- - On approval: commit all artifacts, then say "Stage 2 complete. Proceed to **Stage 3 — /ml-architecture** to design the model stack."
56
- - STOP and WAIT for user confirmation
@@ -1,3 +0,0 @@
1
- type: skill
2
- name: ml-eda
3
- module: ma-skills