pi-maestro-flow 0.2.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 (179) hide show
  1. package/README.md +124 -0
  2. package/agents/aggregator.md +27 -0
  3. package/agents/cli-explore-agent.md +188 -0
  4. package/agents/cross-role-reviewer.md +171 -0
  5. package/agents/delegate.md +19 -0
  6. package/agents/explorer.md +23 -0
  7. package/agents/impeccable-agent.md +99 -0
  8. package/agents/ralph-executor.md +81 -0
  9. package/agents/reference.md +24 -0
  10. package/agents/role-design-author.md +220 -0
  11. package/agents/team-supervisor.md +143 -0
  12. package/agents/team-worker.md +237 -0
  13. package/agents/ui-design-agent.md +270 -0
  14. package/agents/workflow-analyzer.md +116 -0
  15. package/agents/workflow-codebase-mapper.md +77 -0
  16. package/agents/workflow-collab-planner.md +147 -0
  17. package/agents/workflow-debugger.md +104 -0
  18. package/agents/workflow-executor.md +133 -0
  19. package/agents/workflow-external-researcher.md +86 -0
  20. package/agents/workflow-integration-checker.md +83 -0
  21. package/agents/workflow-nyquist-auditor.md +85 -0
  22. package/agents/workflow-phase-researcher.md +85 -0
  23. package/agents/workflow-plan-checker.md +100 -0
  24. package/agents/workflow-planner.md +200 -0
  25. package/agents/workflow-project-researcher.md +74 -0
  26. package/agents/workflow-research-synthesizer.md +70 -0
  27. package/agents/workflow-reviewer.md +82 -0
  28. package/agents/workflow-roadmapper.md +81 -0
  29. package/agents/workflow-verifier.md +120 -0
  30. package/package.json +58 -0
  31. package/skills/codify-to-knowhow/SKILL.md +167 -0
  32. package/skills/delegation-check/SKILL.md +297 -0
  33. package/skills/domain-add/SKILL.md +75 -0
  34. package/skills/insight-challenge/SKILL.md +226 -0
  35. package/skills/learn-decompose/SKILL.md +124 -0
  36. package/skills/learn-follow/SKILL.md +163 -0
  37. package/skills/learn-investigate/SKILL.md +160 -0
  38. package/skills/learn-second-opinion/SKILL.md +128 -0
  39. package/skills/maestro/SKILL.md +239 -0
  40. package/skills/maestro-amend/SKILL.md +169 -0
  41. package/skills/maestro-analyze/SKILL.md +173 -0
  42. package/skills/maestro-blueprint/SKILL.md +159 -0
  43. package/skills/maestro-brainstorm/SKILL.md +193 -0
  44. package/skills/maestro-collab/SKILL.md +181 -0
  45. package/skills/maestro-companion/SKILL.md +536 -0
  46. package/skills/maestro-composer/SKILL.md +192 -0
  47. package/skills/maestro-execute/SKILL.md +193 -0
  48. package/skills/maestro-fork/SKILL.md +104 -0
  49. package/skills/maestro-grill/SKILL.md +151 -0
  50. package/skills/maestro-guard/SKILL.md +124 -0
  51. package/skills/maestro-help/SKILL.md +328 -0
  52. package/skills/maestro-impeccable/SKILL.md +302 -0
  53. package/skills/maestro-init/SKILL.md +151 -0
  54. package/skills/maestro-merge/SKILL.md +90 -0
  55. package/skills/maestro-milestone-audit/SKILL.md +117 -0
  56. package/skills/maestro-milestone-complete/SKILL.md +133 -0
  57. package/skills/maestro-milestone-release/SKILL.md +131 -0
  58. package/skills/maestro-next/SKILL.md +269 -0
  59. package/skills/maestro-overlay/SKILL.md +203 -0
  60. package/skills/maestro-plan/SKILL.md +194 -0
  61. package/skills/maestro-player/SKILL.md +184 -0
  62. package/skills/maestro-quick/SKILL.md +117 -0
  63. package/skills/maestro-ralph/SKILL.md +905 -0
  64. package/skills/maestro-ralph-cli/SKILL.md +976 -0
  65. package/skills/maestro-ralph-cli-execute/SKILL.md +229 -0
  66. package/skills/maestro-ralph-execute/SKILL.md +409 -0
  67. package/skills/maestro-ralph-v2/SKILL.md +1198 -0
  68. package/skills/maestro-roadmap/SKILL.md +157 -0
  69. package/skills/maestro-swarm-workflow/SKILL.md +272 -0
  70. package/skills/maestro-tools-execute/SKILL.md +143 -0
  71. package/skills/maestro-tools-register/SKILL.md +192 -0
  72. package/skills/maestro-ui-codify/SKILL.md +127 -0
  73. package/skills/maestro-universal-workflow/SKILL.md +622 -0
  74. package/skills/maestro-update/SKILL.md +156 -0
  75. package/skills/manage-codebase-rebuild/SKILL.md +111 -0
  76. package/skills/manage-drift-realign/SKILL.md +159 -0
  77. package/skills/manage-harvest/SKILL.md +121 -0
  78. package/skills/manage-issue/SKILL.md +88 -0
  79. package/skills/manage-issue-discover/SKILL.md +104 -0
  80. package/skills/manage-kg-extractors/SKILL.md +147 -0
  81. package/skills/manage-knowhow/SKILL.md +102 -0
  82. package/skills/manage-knowhow-capture/SKILL.md +109 -0
  83. package/skills/manage-knowledge-audit/SKILL.md +147 -0
  84. package/skills/manage-status/SKILL.md +80 -0
  85. package/skills/manage-wiki/SKILL.md +104 -0
  86. package/skills/odyssey-debug/SKILL.md +344 -0
  87. package/skills/odyssey-improve/SKILL.md +423 -0
  88. package/skills/odyssey-planex/SKILL.md +542 -0
  89. package/skills/odyssey-review-test-fix/SKILL.md +392 -0
  90. package/skills/odyssey-ui/SKILL.md +388 -0
  91. package/skills/prompt-generator/SKILL.md +470 -0
  92. package/skills/quality-auto-test/SKILL.md +168 -0
  93. package/skills/quality-debug/SKILL.md +176 -0
  94. package/skills/quality-refactor/SKILL.md +108 -0
  95. package/skills/quality-retrospective/SKILL.md +134 -0
  96. package/skills/quality-review/SKILL.md +169 -0
  97. package/skills/quality-sync/SKILL.md +90 -0
  98. package/skills/quality-test/SKILL.md +183 -0
  99. package/skills/scholar-anti-ai-writing/SKILL.md +173 -0
  100. package/skills/scholar-anti-ai-writing/references/patterns-chinese.md +242 -0
  101. package/skills/scholar-anti-ai-writing/references/patterns-english.md +242 -0
  102. package/skills/scholar-citation-verify/SKILL.md +166 -0
  103. package/skills/scholar-citation-verify/references/api-usage.md +372 -0
  104. package/skills/scholar-citation-verify/references/common-errors.md +384 -0
  105. package/skills/scholar-citation-verify/references/verification-rules.md +399 -0
  106. package/skills/scholar-experiment/SKILL.md +321 -0
  107. package/skills/scholar-ideation/SKILL.md +288 -0
  108. package/skills/scholar-latex-organizer/SKILL.md +186 -0
  109. package/skills/scholar-publish/SKILL.md +220 -0
  110. package/skills/scholar-rebuttal-pro/README.md +313 -0
  111. package/skills/scholar-rebuttal-pro/SKILL.md +511 -0
  112. package/skills/scholar-review/SKILL.md +227 -0
  113. package/skills/scholar-thesis-docx/README.md +111 -0
  114. package/skills/scholar-thesis-docx/README_EN.md +108 -0
  115. package/skills/scholar-thesis-docx/SKILL.md +212 -0
  116. package/skills/scholar-thesis-docx/references/failure-patterns-and-quality-gates.md +178 -0
  117. package/skills/scholar-thesis-docx/references/figure-and-code-rules.md +33 -0
  118. package/skills/scholar-thesis-docx/references/paper-format-workflow.md +68 -0
  119. package/skills/scholar-thesis-docx/references/script-usage.md +157 -0
  120. package/skills/scholar-thesis-docx/scripts/audit_docx_ooxml.py +429 -0
  121. package/skills/scholar-thesis-docx/scripts/check_word_com.ps1 +50 -0
  122. package/skills/scholar-thesis-docx/scripts/export_word_pdf.ps1 +62 -0
  123. package/skills/scholar-thesis-docx/scripts/normalize_word_styles.ps1 +498 -0
  124. package/skills/scholar-thesis-docx/scripts/render_mermaid_figure.ps1 +148 -0
  125. package/skills/scholar-writing/SKILL.md +296 -0
  126. package/skills/security-audit/SKILL.md +244 -0
  127. package/skills/skill-generator/SKILL.md +472 -0
  128. package/skills/skill-iter-tune/SKILL.md +382 -0
  129. package/skills/skill-simplify/SKILL.md +63 -0
  130. package/skills/skill-tuning/SKILL.md +174 -0
  131. package/skills/spec-add/SKILL.md +105 -0
  132. package/skills/spec-load/SKILL.md +98 -0
  133. package/skills/spec-remove/SKILL.md +74 -0
  134. package/skills/spec-setup/SKILL.md +75 -0
  135. package/skills/team-adversarial-swarm/SKILL.md +233 -0
  136. package/skills/team-adversarial-swarm/scripts/__pycache__/pheromone.cpython-313.pyc +0 -0
  137. package/skills/team-adversarial-swarm/scripts/__pycache__/scoring.cpython-313.pyc +0 -0
  138. package/skills/team-adversarial-swarm/scripts/aco.py +473 -0
  139. package/skills/team-adversarial-swarm/scripts/pheromone.py +144 -0
  140. package/skills/team-adversarial-swarm/scripts/scoring.py +92 -0
  141. package/skills/team-adversarial-swarm/scripts/test_aco.py +475 -0
  142. package/skills/team-arch-opt/SKILL.md +158 -0
  143. package/skills/team-brainstorm/SKILL.md +171 -0
  144. package/skills/team-coordinate/SKILL.md +266 -0
  145. package/skills/team-designer/SKILL.md +160 -0
  146. package/skills/team-executor/SKILL.md +189 -0
  147. package/skills/team-frontend/SKILL.md +136 -0
  148. package/skills/team-frontend-debug/SKILL.md +198 -0
  149. package/skills/team-interactive-craft/SKILL.md +141 -0
  150. package/skills/team-issue/SKILL.md +171 -0
  151. package/skills/team-lifecycle-v4/SKILL.md +209 -0
  152. package/skills/team-motion-design/SKILL.md +142 -0
  153. package/skills/team-perf-opt/SKILL.md +175 -0
  154. package/skills/team-planex/SKILL.md +137 -0
  155. package/skills/team-quality-assurance/SKILL.md +147 -0
  156. package/skills/team-review/SKILL.md +147 -0
  157. package/skills/team-roadmap-dev/SKILL.md +169 -0
  158. package/skills/team-swarm/SKILL.md +178 -0
  159. package/skills/team-swarm/scripts/aco.py +473 -0
  160. package/skills/team-swarm/scripts/pheromone.py +144 -0
  161. package/skills/team-swarm/scripts/scoring.py +92 -0
  162. package/skills/team-swarm/scripts/test_aco.py +475 -0
  163. package/skills/team-tech-debt/SKILL.md +128 -0
  164. package/skills/team-testing/SKILL.md +143 -0
  165. package/skills/team-ui-polish/SKILL.md +141 -0
  166. package/skills/team-uidesign/SKILL.md +144 -0
  167. package/skills/team-ultra-analyze/SKILL.md +173 -0
  168. package/skills/team-ux-improve/SKILL.md +151 -0
  169. package/skills/team-visual-a11y/SKILL.md +156 -0
  170. package/skills/workflow-skill-designer/SKILL.md +496 -0
  171. package/src/extension/index.ts +222 -0
  172. package/src/extension/schemas.ts +131 -0
  173. package/src/providers/cli-tools-loader.ts +74 -0
  174. package/src/providers/provider-registry.ts +130 -0
  175. package/src/tools/delegate.ts +85 -0
  176. package/src/tools/explore.ts +134 -0
  177. package/src/tools/moa.ts +213 -0
  178. package/src/tools/status.ts +99 -0
  179. package/src/tools/wait.ts +166 -0
@@ -0,0 +1,321 @@
1
+ ---
2
+ name: scholar-experiment
3
+ description: "Systematic experimental results analysis workflow for ML/AI research papers. Connects experimental data to publication-ready Results sections with statistical validation, visualizations, and quality checks. Triggers on \"analyze experimental results\", \"generate results section\", \"statistical analysis of experiments\", \"compare model performance\", \"create results visualization\"."
4
+ allowed-tools: Read Write Edit Bash Glob Grep AskUserQuestion TodoWrite
5
+ ---
6
+
7
+ # Scholar Experiment: Results Analysis Workflow
8
+
9
+ A systematic workflow for analyzing ML/AI experimental results and generating publication-ready Results sections. Transforms raw experimental data into validated statistical analyses, publication-quality visualizations, and well-structured paper content.
10
+
11
+ ## Pre-load (before execution)
12
+
13
+ 1. **Codebase docs**: If `.workflow/codebase/ARCHITECTURE.md` exists, read for project context
14
+ 2. **Specs**: `maestro load --type spec --category coding` — load coding conventions
15
+ 3. **Wiki knowledge**: `maestro search "academic writing research paper" --json` — top 5 entries as prior context
16
+ 4. All optional — proceed without if unavailable
17
+
18
+ ## Architecture Overview
19
+
20
+ ```
21
+ scholar-experiment
22
+ |
23
+ ┌─────────────────────┼─────────────────────┐
24
+ | | |
25
+ [User Input] [Experiment Context] [Preferences]
26
+ | | |
27
+ └─────────┬───────────┘ |
28
+ v |
29
+ ┌──────────────────────────┐ |
30
+ │ Phase 1: Data Loading │ <─ preferences ───────┘
31
+ │ Load, validate, inspect │
32
+ └────────────┬─────────────┘
33
+ │ cleanedData, dataProfile
34
+ v
35
+ ┌──────────────────────────┐
36
+ │ Phase 2: Statistical │
37
+ │ Analysis & Testing │
38
+ └────────────┬─────────────┘
39
+ │ statisticalResults
40
+ v
41
+ ┌──────────────────────────┐
42
+ │ Phase 3: Visualization │
43
+ │ Plots, charts, tables │
44
+ └────────────┬─────────────┘
45
+ │ figureSpecs, tableSpecs
46
+ v
47
+ ┌──────────────────────────┐
48
+ │ Phase 4: Results Writing│
49
+ │ Draft Results section │
50
+ └────────────┬─────────────┘
51
+ │ resultsDraft
52
+ v
53
+ ┌──────────────────────────┐
54
+ │ Phase 5: Quality Check │
55
+ │ Validate & verify │
56
+ └──────────────────────────┘
57
+
58
+ v
59
+ [Output Files]
60
+ - analysis-report.md
61
+ - results-draft.md
62
+ - visualization-specs.md
63
+ ```
64
+
65
+ ## Key Design Principles
66
+
67
+ 1. **Statistical rigor first**: Every claim must be backed by appropriate statistical tests with complete reporting (mean, SD/SE, p-value, effect size)
68
+ 2. **Pre-test before test**: Always check assumptions (normality, variance homogeneity) before selecting parametric vs non-parametric tests
69
+ 3. **Publication-quality output**: All visualizations must meet journal standards (vector format, colorblind-friendly, proper error representation)
70
+ 4. **Complete reporting**: Never report p-values alone — always include effect sizes, confidence intervals, and descriptive statistics
71
+ 5. **No cherry-picking**: Report all planned comparisons, not just significant results
72
+ 6. **Reproducibility**: Document all analysis steps, parameters, and random seeds
73
+
74
+ ## Statistical Tools and Libraries
75
+
76
+ This workflow requires statistical computing capabilities. Recommended implementations:
77
+
78
+ **Python Stack** (recommended for ML/AI research):
79
+ ```python
80
+ import numpy as np # Numerical computing
81
+ import pandas as pd # Data manipulation
82
+ import scipy.stats as stats # Statistical tests
83
+ import matplotlib.pyplot as plt # Visualization
84
+ import seaborn as sns # Statistical visualization
85
+ from statsmodels.stats import multitest # Multiple comparison corrections
86
+ ```
87
+
88
+ **R Stack** (alternative for advanced statistics):
89
+ ```r
90
+ library(tidyverse) # Data manipulation and visualization
91
+ library(stats) # Statistical tests
92
+ library(effsize) # Effect size calculations
93
+ library(multcomp) # Multiple comparisons
94
+ ```
95
+
96
+ **Minimum Requirements**:
97
+ - Statistical test functions (t-test, ANOVA, Mann-Whitney, Kruskal-Wallis, etc.)
98
+ - Effect size calculations (Cohen's d, eta-squared, r)
99
+ - Multiple comparison corrections (Bonferroni, Holm, FDR)
100
+ - Normality tests (Shapiro-Wilk, Kolmogorov-Smirnov)
101
+ - Variance homogeneity tests (Levene's test)
102
+
103
+ **Note**: If these libraries are not available, the workflow will guide you to use online statistical calculators or manual computation, but automated analysis is strongly recommended for reproducibility.
104
+ 2. **Pre-test before test**: Always verify assumptions (normality, homogeneity of variance) before selecting parametric tests
105
+ 3. **No cherry-picking**: Report all experimental runs, not just the best ones
106
+ 4. **Publication-quality output**: All visualizations follow colorblind-friendly, vector-format, error-bar standards
107
+ 5. **Reproducibility**: Track random seeds, hyperparameter ranges, compute resources, and experimental setup
108
+
109
+ ## Interactive Preference Collection
110
+
111
+ Before dispatching to phases, collect analysis preferences:
112
+
113
+ ```javascript
114
+ const prefResponse = AskUserQuestion({
115
+ question: "How would you like to configure the analysis?",
116
+ options: [
117
+ {
118
+ label: "Analysis Type",
119
+ description: "Select the type of analysis",
120
+ choices: [
121
+ { value: "full", label: "Full Analysis", description: "Complete pipeline: stats + visualization + writing" },
122
+ { value: "comparison", label: "Model Comparison", description: "Focus on comparing multiple models/methods" },
123
+ { value: "ablation", label: "Ablation Study", description: "Focus on component contribution analysis" },
124
+ { value: "visualization", label: "Visualization Only", description: "Generate visualization specs only" }
125
+ ]
126
+ },
127
+ {
128
+ label: "Statistical Reporting",
129
+ description: "Choose error reporting format",
130
+ choices: [
131
+ { value: "sd", label: "Standard Deviation (SD)", description: "Report mean +/- SD (describes data variability)" },
132
+ { value: "se", label: "Standard Error (SE)", description: "Report mean +/- SE (describes mean uncertainty)" },
133
+ { value: "ci", label: "95% Confidence Interval", description: "Report mean [95% CI: low, high]" }
134
+ ]
135
+ },
136
+ {
137
+ label: "Visualization Style",
138
+ description: "Choose visualization palette",
139
+ choices: [
140
+ { value: "okabe-ito", label: "Okabe-Ito (Recommended)", description: "Most widely used colorblind-friendly palette" },
141
+ { value: "paul-tol", label: "Paul Tol", description: "Alternative colorblind-friendly palette" }
142
+ ]
143
+ }
144
+ ]
145
+ });
146
+
147
+ const workflowPreferences = {
148
+ analysisType: prefResponse.analysisType || "full",
149
+ errorFormat: prefResponse.statisticalReporting || "sd",
150
+ colorPalette: prefResponse.visualizationStyle || "okabe-ito"
151
+ };
152
+ ```
153
+
154
+ ## Auto Mode Defaults
155
+
156
+ When user provides explicit analysis type (e.g., `/scholar-experiment comparison`):
157
+ - `analysisType`: from argument
158
+ - `errorFormat`: "sd" (standard deviation)
159
+ - `colorPalette`: "okabe-ito"
160
+
161
+ ## Execution Flow
162
+
163
+ > **COMPACT DIRECTIVE**: Context compression MUST check TodoWrite phase status.
164
+ > The phase currently marked `in_progress` is the active execution phase -- preserve its FULL content.
165
+ > Only compress phases marked `completed` or `pending`.
166
+
167
+ ### Phase 1: Data Loading
168
+ Load experimental data, validate format, perform initial inspection.
169
+ - Ref: phases/01-data-loading.md
170
+ - Input: raw data files (CSV, JSON, TensorBoard logs, pickle), experiment context
171
+ - Output: `cleanedData`, `dataProfile` (format, dimensions, completeness, outlier flags)
172
+
173
+ ### Phase 2: Statistical Analysis
174
+ Compute descriptive statistics, run pre-tests, perform hypothesis testing, calculate effect sizes.
175
+ - Ref: phases/02-statistical-analysis.md
176
+ - Input: `cleanedData`, `dataProfile`, `workflowPreferences`
177
+ - Output: `statisticalResults` (descriptive stats, test results, effect sizes, multiple comparison corrections)
178
+
179
+ ### Phase 3: Visualization
180
+ Generate visualization specifications for publication-quality figures and tables.
181
+ - Ref: phases/03-visualization.md
182
+ - Input: `cleanedData`, `statisticalResults`, `workflowPreferences`
183
+ - Output: `figureSpecs`, `tableSpecs`, `visualization-specs.md`
184
+
185
+ ### Phase 4: Results Writing
186
+ Draft the Results section with proper statistical reporting and figure/table references.
187
+ - Ref: phases/04-results-writing.md
188
+ - Input: `statisticalResults`, `figureSpecs`, `tableSpecs`, `workflowPreferences`
189
+ - Output: `resultsDraft`, `results-draft.md`
190
+
191
+ ### Phase 5: Quality Check
192
+ Validate analysis completeness, check reproducibility, verify statistical reporting.
193
+ - Ref: phases/05-quality-check.md
194
+ - Input: all prior outputs
195
+ - Output: `analysis-report.md` (final validated report), quality checklist
196
+
197
+ **Phase Reference Documents** (read on-demand when phase executes):
198
+
199
+ | Phase | Document | Purpose | Compact |
200
+ |-------|----------|---------|---------|
201
+ | 1 | [phases/01-data-loading.md](phases/01-data-loading.md) | Load and validate data | TodoWrite driven |
202
+ | 2 | [phases/02-statistical-analysis.md](phases/02-statistical-analysis.md) | Statistical testing | TodoWrite driven + sentinel |
203
+ | 3 | [phases/03-visualization.md](phases/03-visualization.md) | Figure/table specs | TodoWrite driven |
204
+ | 4 | [phases/04-results-writing.md](phases/04-results-writing.md) | Draft Results section | TodoWrite driven + sentinel |
205
+ | 5 | [phases/05-quality-check.md](phases/05-quality-check.md) | Validate and verify | TodoWrite driven |
206
+
207
+ **Compact Rules**:
208
+ 1. **TodoWrite `in_progress`** -> preserve full content, do not compress
209
+ 2. **TodoWrite `completed`** -> may compress to summary
210
+ 3. **sentinel fallback** -> phases marked with sentinel contain compact sentinel; if after compact only sentinel remains without full Step protocol, MUST immediately `Read("phases/0N-xxx.md")` to recover before continuing
211
+
212
+ ## Core Rules
213
+
214
+ 1. **Never skip pre-tests**: Always run normality (Shapiro-Wilk) and homogeneity of variance (Levene) tests before parametric testing
215
+ 2. **Report completely**: Every statistical result must include test statistic, degrees of freedom, p-value, and effect size
216
+ 3. **Correct for multiple comparisons**: When running multiple tests, apply Bonferroni or FDR correction
217
+ 4. **Use appropriate tests**: Select parametric or non-parametric tests based on pre-test results
218
+ 5. **Vector format only**: All figure specs must target PDF/EPS output format
219
+ 6. **Colorblind-friendly**: All visualizations must use Okabe-Ito or Paul Tol palettes
220
+ 7. **Honest reporting**: Report all runs including negative results; never cherry-pick
221
+
222
+ ## Input Processing
223
+
224
+ User provides data path and optional analysis type:
225
+
226
+ ```
227
+ USER INPUT: [data_path] [analysis_type?]
228
+
229
+ Structured format:
230
+ DATA_PATH: path/to/results/ or path/to/results.csv
231
+ ANALYSIS_TYPE: full | comparison | ablation | visualization
232
+ EXPERIMENT_CONTEXT: (read from experiment session if available)
233
+ ```
234
+
235
+ Supported data formats:
236
+ - CSV files: tabular data with headers
237
+ - JSON files: structured results objects
238
+ - TensorBoard logs: training curves
239
+ - Python pickle: complex objects
240
+
241
+ ## Data Flow
242
+
243
+ ```
244
+ Phase 1 output:
245
+ cleanedData → Phase 2, 3
246
+ dataProfile → Phase 2
247
+
248
+ Phase 2 output:
249
+ statisticalResults → Phase 3, 4, 5
250
+
251
+ Phase 3 output:
252
+ figureSpecs → Phase 4, 5
253
+ tableSpecs → Phase 4, 5
254
+
255
+ Phase 4 output:
256
+ resultsDraft → Phase 5
257
+
258
+ Phase 5 output:
259
+ analysis-report.md (final report)
260
+ results-draft.md (paper-ready text)
261
+ visualization-specs.md (figure specifications)
262
+ ```
263
+
264
+ ## TodoWrite Pattern
265
+
266
+ ```
267
+ Phase starts:
268
+ -> Sub-tasks ATTACHED to TodoWrite (in_progress + pending)
269
+ -> Execute sub-tasks sequentially
270
+
271
+ Phase ends:
272
+ -> Sub-tasks COLLAPSED back to high-level summary (completed)
273
+ -> Next phase begins
274
+ ```
275
+
276
+ Example:
277
+ ```
278
+ [x] Phase 1: Data Loading (completed - 3 datasets loaded, validated)
279
+ [ ] Phase 2: Statistical Analysis (in_progress)
280
+ [ ] 2.1 Descriptive statistics
281
+ [ ] 2.2 Pre-tests (normality, variance)
282
+ [ ] 2.3 Hypothesis testing
283
+ [ ] 2.4 Effect size calculation
284
+ [ ] 2.5 Multiple comparison correction
285
+ [ ] Phase 3: Visualization
286
+ [ ] Phase 4: Results Writing
287
+ [ ] Phase 5: Quality Check
288
+ ```
289
+
290
+ ## Error Handling
291
+
292
+ | Error | Recovery |
293
+ |-------|----------|
294
+ | Data format unreadable | Ask user for format clarification, try alternative parsers |
295
+ | Sample size too small (< 3 runs) | Warn user, proceed with non-parametric tests, note limitation |
296
+ | Normality assumption violated | Switch to non-parametric tests (Wilcoxon, Mann-Whitney U, Kruskal-Wallis) |
297
+ | Variance homogeneity violated | Switch to Welch's t-test or Welch's ANOVA |
298
+ | Missing values detected | Report percentage, suggest imputation or exclusion strategy |
299
+ | Outliers detected | Report via IQR method, run sensitivity analysis (with/without outliers) |
300
+
301
+ ## Coordinator Checklist
302
+
303
+ **Before each phase**:
304
+ - [ ] Previous phase output available
305
+ - [ ] TodoWrite updated (current phase in_progress)
306
+ - [ ] Phase document read via `Read("phases/0N-xxx.md")`
307
+
308
+ **After each phase**:
309
+ - [ ] Output files generated
310
+ - [ ] TodoWrite updated (current phase completed, next phase in_progress)
311
+ - [ ] Data flow variables passed to next phase
312
+
313
+ **After all phases**:
314
+ - [ ] All output files present (analysis-report.md, results-draft.md, visualization-specs.md)
315
+ - [ ] Quality checklist completed
316
+ - [ ] User notified of results
317
+
318
+ ## Related Skills
319
+
320
+ - **scholar-writing**: Integrates results-draft.md into full paper structure
321
+ - **scholar-review**: Reviews the Results section for quality and completeness
@@ -0,0 +1,288 @@
1
+ ---
2
+ name: scholar-ideation
3
+ description: "Research ideation workflow from literature search to research planning. Triggers on \"brainstorm research ideas\", \"identify research gaps\", \"conduct gap analysis\", \"start research project\", \"conduct literature review\", \"define research question\", \"select research method\", \"plan research\", \"research ideation\"."
4
+ allowed-tools: WebSearch WebFetch Read Write Edit Bash Glob Grep TodoWrite AskUserQuestion
5
+ ---
6
+
7
+ # Scholar Ideation
8
+
9
+ Supports the complete research project initiation workflow: from literature search and gap analysis through research question formulation, method selection, and research planning. Produces a structured research plan with literature review, identified gaps, formulated questions, selected methods, and a timeline.
10
+
11
+ ## Pre-load (before execution)
12
+
13
+ 1. **Codebase docs**: If `.workflow/codebase/ARCHITECTURE.md` exists, read for project context
14
+ 2. **Specs**: `maestro load --type spec --category coding` — load coding conventions
15
+ 3. **Wiki knowledge**: `maestro search "academic writing research paper" --json` — top 5 entries as prior context
16
+ 4. All optional — proceed without if unavailable
17
+
18
+ ## Architecture Overview
19
+
20
+ ```
21
+ User Input (research topic/interest)
22
+ |
23
+ v
24
+ ┌─────────────────────────────────────────────────────────────┐
25
+ │ SKILL.md Orchestrator │
26
+ │ Collect preferences → Dispatch phases → Track progress │
27
+ └──────────┬──────────────────────────────────────────────────┘
28
+ |
29
+ ┌───────┼───────┬───────────┬───────────┬───────────┐
30
+ v v v v v v
31
+ ┌──────┐┌──────┐┌──────┐┌──────────┐┌──────────┐┌──────────┐
32
+ │Input ││Phase1││Phase2││ Phase3 ││ Phase4 ││ Phase5 │
33
+ │Parse ││LitSrc││GapAnl││ RQ Form ││ Method ││ Plan │
34
+ └──────┘└──────┘└──────┘└──────────┘└──────────┘└──────────┘
35
+ | | | | | |
36
+ topic papers gaps questions methods plan
37
+ scope trends opps hypotheses justify timeline
38
+ ```
39
+
40
+ ## Key Design Principles
41
+
42
+ 1. **Progressive depth**: Each phase builds on previous outputs — literature informs gaps, gaps inform questions, questions inform methods
43
+ 2. **Interactive guidance**: Collect user preferences and domain context before each major phase
44
+ 3. **Zotero integration**: Automatically organize discovered papers into Zotero collections when MCP tools are available
45
+ 4. **Structured outputs**: Each phase produces structured artifacts that feed into the final research plan
46
+ 5. **5W1H grounding**: Use the 5W1H framework to ensure comprehensive research scoping
47
+
48
+ ## Interactive Preference Collection
49
+
50
+ Before dispatching to phases, collect research context and workflow preferences:
51
+
52
+ ```
53
+ AskUserQuestion:
54
+ question: "Please describe your research topic or interest area."
55
+ → Store as: researchTopic
56
+
57
+ AskUserQuestion:
58
+ question: "What is the scope and context of your research?"
59
+ options:
60
+ - "Broad exploration (survey a field)"
61
+ - "Focused investigation (specific problem)"
62
+ - "Applied research (practical application)"
63
+ → Store as: researchScope
64
+
65
+ AskUserQuestion:
66
+ question: "What is your target research timeline?"
67
+ options:
68
+ - "Short-term (3-6 months)"
69
+ - "Medium-term (6-12 months)"
70
+ - "Long-term (1-2 years)"
71
+ → Store as: researchTimeline
72
+
73
+ AskUserQuestion:
74
+ question: "Do you have access to Zotero for literature management?"
75
+ options:
76
+ - "Yes (auto-import papers to Zotero)"
77
+ - "No (skip Zotero integration)"
78
+ → Store as: useZotero
79
+
80
+ AskUserQuestion:
81
+ question: "Workflow mode?"
82
+ options:
83
+ - "Interactive (confirm at each phase)"
84
+ - "Auto (run all phases continuously)"
85
+ → Store as: workflowMode
86
+ ```
87
+
88
+ Derived preferences:
89
+ ```
90
+ workflowPreferences = {
91
+ topic: researchTopic,
92
+ scope: researchScope,
93
+ timeline: researchTimeline,
94
+ useZotero: useZotero === "Yes",
95
+ autoYes: workflowMode === "Auto"
96
+ }
97
+ ```
98
+
99
+ ## Auto Mode Defaults
100
+
101
+ When `workflowPreferences.autoYes === true`: Execute all 5 phases sequentially without confirmation prompts between phases. Still pause for user input when phase-specific questions arise (e.g., confirming search keywords, selecting papers for deep reading).
102
+
103
+ ## Execution Flow
104
+
105
+ > **COMPACT DIRECTIVE**: Context compression MUST check TodoWrite phase status.
106
+ > The phase currently marked `in_progress` is the active execution phase — preserve its FULL content.
107
+ > Only compress phases marked `completed` or `pending`.
108
+
109
+ ### TodoWrite Initialization
110
+
111
+ ```
112
+ TodoWrite:
113
+ - "Phase 1: Literature Search" (pending)
114
+ - "Phase 2: Gap Analysis" (pending)
115
+ - "Phase 3: Research Question Formulation" (pending)
116
+ - "Phase 4: Method Selection" (pending)
117
+ - "Phase 5: Research Planning" (pending)
118
+ ```
119
+
120
+ ### Phase Dispatch
121
+
122
+ ```
123
+ Phase 1: Literature Search
124
+ Mark TodoWrite Phase 1 → in_progress
125
+ └─ Ref: phases/01-literature-search.md
126
+ ├─ Input: workflowPreferences (topic, scope, useZotero)
127
+ └─ Output: literatureResults (papers, trends, keyFindings)
128
+
129
+ Phase 2: Gap Analysis
130
+ Mark TodoWrite Phase 1 → completed, Phase 2 → in_progress
131
+ └─ Ref: phases/02-gap-analysis.md
132
+ ├─ Input: literatureResults
133
+ └─ Output: gapAnalysis (gaps, opportunities, priorities)
134
+
135
+ Phase 3: Research Question Formulation
136
+ Mark TodoWrite Phase 2 → completed, Phase 3 → in_progress
137
+ └─ Ref: phases/03-research-question.md
138
+ ├─ Input: gapAnalysis + literatureResults
139
+ └─ Output: researchQuestions (questions, hypotheses, objectives)
140
+
141
+ Phase 4: Method Selection
142
+ Mark TodoWrite Phase 3 → completed, Phase 4 → in_progress
143
+ └─ Ref: phases/04-method-selection.md
144
+ ├─ Input: researchQuestions + gapAnalysis
145
+ └─ Output: selectedMethods (methods, justification, resources)
146
+
147
+ Phase 5: Research Planning
148
+ Mark TodoWrite Phase 4 → completed, Phase 5 → in_progress
149
+ └─ Ref: phases/05-research-planning.md
150
+ ├─ Input: ALL previous outputs
151
+ └─ Output: research-plan.md (final deliverable)
152
+
153
+ Mark TodoWrite Phase 5 → completed
154
+ ```
155
+
156
+ **Phase Reference Documents** (read on-demand when phase executes):
157
+
158
+ | Phase | Document | Purpose | Compact |
159
+ |-------|----------|---------|---------|
160
+ | 1 | [phases/01-literature-search.md](phases/01-literature-search.md) | Search, discover, and organize literature | TodoWrite driven |
161
+ | 2 | [phases/02-gap-analysis.md](phases/02-gap-analysis.md) | Identify research gaps and opportunities | TodoWrite driven |
162
+ | 3 | [phases/03-research-question.md](phases/03-research-question.md) | Formulate research questions and hypotheses | TodoWrite driven |
163
+ | 4 | [phases/04-method-selection.md](phases/04-method-selection.md) | Select and justify research methods | TodoWrite driven + sentinel |
164
+ | 5 | [phases/05-research-planning.md](phases/05-research-planning.md) | Create timeline, milestones, and final plan | TodoWrite driven + sentinel |
165
+
166
+ **Compact Rules**:
167
+ 1. **TodoWrite `in_progress`** — preserve full content, do not compress
168
+ 2. **TodoWrite `completed`** — may compress to summary
169
+ 3. **sentinel fallback** — phases marked with sentinel: if compact leaves only sentinel without full Step protocol, immediately `Read()` to recover
170
+
171
+ ## Core Rules
172
+
173
+ 1. **Literature first**: Always complete literature search before gap analysis — gaps must be grounded in actual literature
174
+ 2. **Evidence-based gaps**: Every identified gap must reference specific papers or missing coverage areas
175
+ 3. **SMART questions**: Research questions must satisfy Specific, Measurable, Achievable, Relevant, Time-bound criteria
176
+ 4. **Method-question alignment**: Selected methods must directly address the formulated research questions
177
+ 5. **Feasibility check**: Research plan must account for available resources (compute, data, time, personnel)
178
+ 6. **No hallucinated papers**: Only reference papers actually found via WebSearch — never fabricate citations
179
+
180
+ ## Input Processing
181
+
182
+ User input (free text or structured) is converted to:
183
+
184
+ ```
185
+ TOPIC: [research topic or interest]
186
+ SCOPE: [broad | focused | applied]
187
+ TIMELINE: [short | medium | long]
188
+ CONTEXT: [additional constraints, domain, background]
189
+ ```
190
+
191
+ If user provides a simple topic string, derive scope and timeline from the topic description or ask via AskUserQuestion.
192
+
193
+ ## Data Flow
194
+
195
+ ```
196
+ workflowPreferences
197
+ ├─→ Phase 1: topic, scope, useZotero
198
+ │ └─→ literatureResults {papers[], trends[], keyFindings[], zoteroCollection?}
199
+
200
+ ├─→ Phase 2: literatureResults
201
+ │ └─→ gapAnalysis {gaps[], opportunities[], prioritizedGaps[]}
202
+
203
+ ├─→ Phase 3: gapAnalysis + literatureResults
204
+ │ └─→ researchQuestions {questions[], hypotheses[], objectives[]}
205
+
206
+ ├─→ Phase 4: researchQuestions + gapAnalysis
207
+ │ └─→ selectedMethods {methods[], justification, resources[]}
208
+
209
+ └─→ Phase 5: ALL outputs
210
+ └─→ research-plan.md (final structured document)
211
+ ```
212
+
213
+ ## TodoWrite Pattern
214
+
215
+ **Phase start — Attach sub-tasks**:
216
+ ```
217
+ Mark Phase N → in_progress
218
+ Add sub-tasks:
219
+ - "Step N.1: ..." (in_progress)
220
+ - "Step N.2: ..." (pending)
221
+ - "Step N.3: ..." (pending)
222
+ ```
223
+
224
+ **Phase end — Collapse**:
225
+ ```
226
+ Mark all Phase N sub-tasks → completed
227
+ Mark Phase N → completed
228
+ Mark Phase N+1 → in_progress
229
+ ```
230
+
231
+ ## Post-Phase Updates
232
+
233
+ After each phase completes, update an accumulated research notes document:
234
+
235
+ ```markdown
236
+ ## Research Notes (accumulated)
237
+
238
+ ### After Phase 1 (Literature Search)
239
+ - Papers found: [count]
240
+ - Key trends: [list]
241
+ - Zotero collection: [name, if applicable]
242
+
243
+ ### After Phase 2 (Gap Analysis)
244
+ - Gaps identified: [count]
245
+ - Top priorities: [list]
246
+
247
+ ### After Phase 3 (Research Questions)
248
+ - Primary RQ: [question]
249
+ - Sub-questions: [count]
250
+
251
+ ### After Phase 4 (Method Selection)
252
+ - Selected approach: [method]
253
+ - Required resources: [list]
254
+ ```
255
+
256
+ ## Error Handling
257
+
258
+ 1. **WebSearch fails**: Retry with modified keywords; if persistent, ask user for alternative search terms
259
+ 2. **No papers found**: Broaden search scope, try synonyms and related terms, try different databases
260
+ 3. **Zotero unavailable**: Skip Zotero integration, continue with manual paper tracking in markdown
261
+ 4. **Gap analysis inconclusive**: Return to Phase 1 for additional targeted literature search
262
+ 5. **Infeasible plan**: Adjust scope, timeline, or methods; consult user for trade-off decisions
263
+
264
+ ## Coordinator Checklist
265
+
266
+ **Pre-phase**:
267
+ - [ ] Verify previous phase outputs are available
268
+ - [ ] Update TodoWrite status
269
+ - [ ] Read phase document (`Read("phases/0N-xxx.md")`)
270
+
271
+ **Post-phase**:
272
+ - [ ] Validate phase outputs (non-empty, well-structured)
273
+ - [ ] Update accumulated research notes
274
+ - [ ] Collapse TodoWrite sub-tasks
275
+ - [ ] If not autoYes, confirm with user before proceeding
276
+
277
+ ## Output Files
278
+
279
+ The workflow produces:
280
+ - **`research-plan.md`** — Final structured research proposal with all sections
281
+ - **`literature-review.md`** — Structured literature review with categorized papers
282
+ - **Zotero collection** — Organized papers with PDFs (if Zotero enabled)
283
+
284
+ ## Related Skills
285
+
286
+ - **scholar-experiment** — Experiment execution and tracking (follows this skill)
287
+ - **scholar-writing** — Paper writing workflow (uses outputs from experiment)
288
+ - **scholar-review** — Paper review and revision workflow