get-research-done 1.1.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 (127) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +560 -0
  3. package/agents/grd-architect.md +789 -0
  4. package/agents/grd-codebase-mapper.md +738 -0
  5. package/agents/grd-critic.md +1065 -0
  6. package/agents/grd-debugger.md +1203 -0
  7. package/agents/grd-evaluator.md +948 -0
  8. package/agents/grd-executor.md +784 -0
  9. package/agents/grd-explorer.md +2063 -0
  10. package/agents/grd-graduator.md +484 -0
  11. package/agents/grd-integration-checker.md +423 -0
  12. package/agents/grd-phase-researcher.md +641 -0
  13. package/agents/grd-plan-checker.md +745 -0
  14. package/agents/grd-planner.md +1386 -0
  15. package/agents/grd-project-researcher.md +865 -0
  16. package/agents/grd-research-synthesizer.md +256 -0
  17. package/agents/grd-researcher.md +2361 -0
  18. package/agents/grd-roadmapper.md +605 -0
  19. package/agents/grd-verifier.md +778 -0
  20. package/bin/install.js +1294 -0
  21. package/commands/grd/add-phase.md +207 -0
  22. package/commands/grd/add-todo.md +193 -0
  23. package/commands/grd/architect.md +283 -0
  24. package/commands/grd/audit-milestone.md +277 -0
  25. package/commands/grd/check-todos.md +228 -0
  26. package/commands/grd/complete-milestone.md +136 -0
  27. package/commands/grd/debug.md +169 -0
  28. package/commands/grd/discuss-phase.md +86 -0
  29. package/commands/grd/evaluate.md +1095 -0
  30. package/commands/grd/execute-phase.md +339 -0
  31. package/commands/grd/explore.md +258 -0
  32. package/commands/grd/graduate.md +323 -0
  33. package/commands/grd/help.md +482 -0
  34. package/commands/grd/insert-phase.md +227 -0
  35. package/commands/grd/insights.md +231 -0
  36. package/commands/grd/join-discord.md +18 -0
  37. package/commands/grd/list-phase-assumptions.md +50 -0
  38. package/commands/grd/map-codebase.md +71 -0
  39. package/commands/grd/new-milestone.md +721 -0
  40. package/commands/grd/new-project.md +1008 -0
  41. package/commands/grd/pause-work.md +134 -0
  42. package/commands/grd/plan-milestone-gaps.md +295 -0
  43. package/commands/grd/plan-phase.md +525 -0
  44. package/commands/grd/progress.md +364 -0
  45. package/commands/grd/quick-explore.md +236 -0
  46. package/commands/grd/quick.md +309 -0
  47. package/commands/grd/remove-phase.md +349 -0
  48. package/commands/grd/research-phase.md +200 -0
  49. package/commands/grd/research.md +681 -0
  50. package/commands/grd/resume-work.md +40 -0
  51. package/commands/grd/set-profile.md +106 -0
  52. package/commands/grd/settings.md +136 -0
  53. package/commands/grd/update.md +172 -0
  54. package/commands/grd/verify-work.md +219 -0
  55. package/get-research-done/config/default.json +15 -0
  56. package/get-research-done/references/checkpoints.md +1078 -0
  57. package/get-research-done/references/continuation-format.md +249 -0
  58. package/get-research-done/references/git-integration.md +254 -0
  59. package/get-research-done/references/model-profiles.md +73 -0
  60. package/get-research-done/references/planning-config.md +94 -0
  61. package/get-research-done/references/questioning.md +141 -0
  62. package/get-research-done/references/tdd.md +263 -0
  63. package/get-research-done/references/ui-brand.md +160 -0
  64. package/get-research-done/references/verification-patterns.md +612 -0
  65. package/get-research-done/templates/DEBUG.md +159 -0
  66. package/get-research-done/templates/UAT.md +247 -0
  67. package/get-research-done/templates/archive-reason.md +195 -0
  68. package/get-research-done/templates/codebase/architecture.md +255 -0
  69. package/get-research-done/templates/codebase/concerns.md +310 -0
  70. package/get-research-done/templates/codebase/conventions.md +307 -0
  71. package/get-research-done/templates/codebase/integrations.md +280 -0
  72. package/get-research-done/templates/codebase/stack.md +186 -0
  73. package/get-research-done/templates/codebase/structure.md +285 -0
  74. package/get-research-done/templates/codebase/testing.md +480 -0
  75. package/get-research-done/templates/config.json +35 -0
  76. package/get-research-done/templates/context.md +283 -0
  77. package/get-research-done/templates/continue-here.md +78 -0
  78. package/get-research-done/templates/critic-log.md +288 -0
  79. package/get-research-done/templates/data-report.md +173 -0
  80. package/get-research-done/templates/debug-subagent-prompt.md +91 -0
  81. package/get-research-done/templates/decision-log.md +58 -0
  82. package/get-research-done/templates/decision.md +138 -0
  83. package/get-research-done/templates/discovery.md +146 -0
  84. package/get-research-done/templates/experiment-readme.md +104 -0
  85. package/get-research-done/templates/graduated-script.md +180 -0
  86. package/get-research-done/templates/iteration-summary.md +234 -0
  87. package/get-research-done/templates/milestone-archive.md +123 -0
  88. package/get-research-done/templates/milestone.md +115 -0
  89. package/get-research-done/templates/objective.md +271 -0
  90. package/get-research-done/templates/phase-prompt.md +567 -0
  91. package/get-research-done/templates/planner-subagent-prompt.md +117 -0
  92. package/get-research-done/templates/project.md +184 -0
  93. package/get-research-done/templates/requirements.md +231 -0
  94. package/get-research-done/templates/research-project/ARCHITECTURE.md +204 -0
  95. package/get-research-done/templates/research-project/FEATURES.md +147 -0
  96. package/get-research-done/templates/research-project/PITFALLS.md +200 -0
  97. package/get-research-done/templates/research-project/STACK.md +120 -0
  98. package/get-research-done/templates/research-project/SUMMARY.md +170 -0
  99. package/get-research-done/templates/research.md +529 -0
  100. package/get-research-done/templates/roadmap.md +202 -0
  101. package/get-research-done/templates/scorecard.json +113 -0
  102. package/get-research-done/templates/state.md +287 -0
  103. package/get-research-done/templates/summary.md +246 -0
  104. package/get-research-done/templates/user-setup.md +311 -0
  105. package/get-research-done/templates/verification-report.md +322 -0
  106. package/get-research-done/workflows/complete-milestone.md +756 -0
  107. package/get-research-done/workflows/diagnose-issues.md +231 -0
  108. package/get-research-done/workflows/discovery-phase.md +289 -0
  109. package/get-research-done/workflows/discuss-phase.md +433 -0
  110. package/get-research-done/workflows/execute-phase.md +657 -0
  111. package/get-research-done/workflows/execute-plan.md +1844 -0
  112. package/get-research-done/workflows/list-phase-assumptions.md +178 -0
  113. package/get-research-done/workflows/map-codebase.md +322 -0
  114. package/get-research-done/workflows/resume-project.md +307 -0
  115. package/get-research-done/workflows/transition.md +556 -0
  116. package/get-research-done/workflows/verify-phase.md +628 -0
  117. package/get-research-done/workflows/verify-work.md +596 -0
  118. package/hooks/dist/grd-check-update.js +61 -0
  119. package/hooks/dist/grd-statusline.js +84 -0
  120. package/package.json +47 -0
  121. package/scripts/audit-help-commands.sh +115 -0
  122. package/scripts/build-hooks.js +42 -0
  123. package/scripts/verify-all-commands.sh +246 -0
  124. package/scripts/verify-architect-warning.sh +35 -0
  125. package/scripts/verify-insights-mode.sh +40 -0
  126. package/scripts/verify-quick-mode.sh +20 -0
  127. package/scripts/verify-revise-data-routing.sh +139 -0
@@ -0,0 +1,323 @@
1
+ # /grd:graduate
2
+
3
+ **Graduate validated notebooks to production Python scripts (Phase 6 command)**
4
+
5
+ ---
6
+ name: graduate
7
+ description: Graduate a validated notebook to a production Python script in src/experiments/
8
+ argument-hint: "<notebook_path> [--run <run_number>] [--name <script_name>]"
9
+ allowed-tools: [Read, Write, Bash, Glob, Grep, Task]
10
+ ---
11
+
12
+ <objective>
13
+
14
+ Graduate an exploratory notebook that has received Critic PROCEED verdict into a validated Python script.
15
+
16
+ This command:
17
+ 1. Validates notebook meets graduation requirements (seeds, parameters cell)
18
+ 2. Confirms Critic PROCEED verdict exists for a run of this notebook
19
+ 3. Converts notebook to Python script via nbconvert
20
+ 4. Adds graduation metadata header from template
21
+ 5. Places script in src/experiments/
22
+ 6. Logs graduation to decision_log.md
23
+
24
+ **Requirements:**
25
+ - Notebook must have passing Critic PROCEED verdict (any confidence level)
26
+ - Notebook must meet graduation checklist (random seed set, parameters cell tagged)
27
+ - Original notebook stays in notebooks/exploration/ (not moved/deleted)
28
+
29
+ **Use cases:**
30
+ - After successful validation: Convert approved notebook to script for production
31
+ - Multiple notebooks: Graduate each independently with separate scripts
32
+ - Script refactoring: Generated script includes refactoring checklist for manual completion
33
+
34
+ **After this command:** Review graduated script, complete refactoring checklist, add tests.
35
+
36
+ </objective>
37
+
38
+ <execution_context>
39
+
40
+ @~/.claude/get-research-done/templates/graduated-script.md
41
+
42
+ </execution_context>
43
+
44
+ <process>
45
+
46
+ ## Phase 1: Validate Arguments
47
+
48
+ **Check if project initialized:**
49
+
50
+ ```bash
51
+ [ ! -f .planning/PROJECT.md ] && echo "ERROR: Project not initialized. Run /grd:new-project first." && exit 1
52
+ ```
53
+
54
+ **Validate notebook_path argument:**
55
+
56
+ 1. Verify notebook_path is provided:
57
+ ```bash
58
+ [ -z "$NOTEBOOK_PATH" ] && echo "ERROR: notebook_path required. Usage: /grd:graduate <notebook_path>" && exit 1
59
+ ```
60
+
61
+ 2. Verify file exists and is a notebook:
62
+ ```bash
63
+ [ ! -f "$NOTEBOOK_PATH" ] && echo "ERROR: Notebook not found: $NOTEBOOK_PATH" && exit 1
64
+ [[ "$NOTEBOOK_PATH" != *.ipynb ]] && echo "ERROR: File must be a Jupyter notebook (.ipynb)" && exit 1
65
+ ```
66
+
67
+ 3. Verify notebook is in notebooks/exploration/:
68
+ ```bash
69
+ if [[ "$NOTEBOOK_PATH" != notebooks/exploration/* ]]; then
70
+ echo "WARNING: Notebook is not in notebooks/exploration/"
71
+ echo "Graduation is intended for exploration notebooks."
72
+ # Allow proceeding but warn
73
+ fi
74
+ ```
75
+
76
+ **Parse optional arguments:**
77
+
78
+ - `--run RUN_NUM`: Specific run number that passed (auto-detect if omitted)
79
+ - `--name SCRIPT_NAME`: Name for graduated script (default: notebook name)
80
+
81
+ ## Phase 2: Find Passing Run
82
+
83
+ **If --run specified:**
84
+
85
+ ```bash
86
+ RUN_DIR="experiments/run_${RUN_NUM}*"
87
+ RUN_DIR=$(ls -d $RUN_DIR 2>/dev/null | head -1)
88
+
89
+ if [ -z "$RUN_DIR" ] || [ ! -d "$RUN_DIR" ]; then
90
+ echo "ERROR: Run directory not found: experiments/run_${RUN_NUM}*"
91
+ exit 1
92
+ fi
93
+
94
+ # Verify CRITIC_LOG.md exists and has PROCEED verdict
95
+ if [ ! -f "$RUN_DIR/CRITIC_LOG.md" ]; then
96
+ echo "ERROR: No CRITIC_LOG.md found in $RUN_DIR"
97
+ exit 1
98
+ fi
99
+
100
+ VERDICT=$(grep "^\*\*Decision:\*\*" "$RUN_DIR/CRITIC_LOG.md" | head -1 | sed 's/.*: //')
101
+ if [ "$VERDICT" != "PROCEED" ]; then
102
+ echo "ERROR: Run $RUN_DIR has verdict '$VERDICT', not PROCEED"
103
+ echo "Only runs with PROCEED verdict can be graduated."
104
+ exit 1
105
+ fi
106
+
107
+ # Verify run used this notebook (check config.yaml source_notebook)
108
+ if [ -f "$RUN_DIR/config.yaml" ]; then
109
+ SOURCE_NB=$(grep "source_notebook:" "$RUN_DIR/config.yaml" | sed 's/.*: //')
110
+ if [ -n "$SOURCE_NB" ] && [ "$SOURCE_NB" != "$NOTEBOOK_PATH" ]; then
111
+ echo "WARNING: Run was executed with different notebook: $SOURCE_NB"
112
+ fi
113
+ fi
114
+ ```
115
+
116
+ **If --run not specified:**
117
+
118
+ ```bash
119
+ # Scan experiments/run_*/CRITIC_LOG.md for PROCEED verdicts
120
+ PASSING_RUNS=""
121
+
122
+ for run_dir in experiments/run_*; do
123
+ if [ -f "$run_dir/CRITIC_LOG.md" ]; then
124
+ verdict=$(grep "^\*\*Decision:\*\*" "$run_dir/CRITIC_LOG.md" | head -1 | sed 's/.*: //')
125
+ if [ "$verdict" = "PROCEED" ]; then
126
+ # Check if this run used our notebook
127
+ if [ -f "$run_dir/config.yaml" ]; then
128
+ source_nb=$(grep "source_notebook:" "$run_dir/config.yaml" | sed 's/.*: //' | tr -d ' "')
129
+ if [ "$source_nb" = "$NOTEBOOK_PATH" ]; then
130
+ PASSING_RUNS="$PASSING_RUNS $run_dir"
131
+ fi
132
+ fi
133
+ fi
134
+ fi
135
+ done
136
+
137
+ if [ -z "$PASSING_RUNS" ]; then
138
+ echo "ERROR: No PROCEED verdict found for $NOTEBOOK_PATH"
139
+ echo "Run /grd:research with this notebook first."
140
+ exit 1
141
+ fi
142
+
143
+ # Use most recent passing run
144
+ RUN_DIR=$(echo $PASSING_RUNS | tr ' ' '\n' | sort -r | head -1)
145
+ echo "Auto-detected passing run: $RUN_DIR"
146
+ ```
147
+
148
+ **Extract verdict date:**
149
+
150
+ ```bash
151
+ VERDICT_DATE=$(grep "^\*\*Timestamp:\*\*" "$RUN_DIR/CRITIC_LOG.md" | head -1 | sed 's/.*: //')
152
+ CRITIC_CONFIDENCE=$(grep "^\*\*Confidence:\*\*" "$RUN_DIR/CRITIC_LOG.md" | head -1 | sed 's/.*: //')
153
+ ```
154
+
155
+ ## Phase 3: Run Graduation Validation
156
+
157
+ Display graduation banner:
158
+ ```
159
+ -------------------------------------------------------
160
+ GRD > GRADUATION VALIDATION
161
+ -------------------------------------------------------
162
+
163
+ Notebook: {notebook_path}
164
+ Passing run: {run_dir}
165
+ Verdict: PROCEED ({confidence})
166
+ ```
167
+
168
+ Spawn grd-graduator agent with:
169
+ - notebook_path
170
+ - run_dir (from Phase 2)
171
+ - script_name (from --name or derived from notebook)
172
+
173
+ ```python
174
+ graduation_result = Task(prompt=f"""
175
+ <graduation_context>
176
+ Notebook: {notebook_path}
177
+ Run directory: {run_dir}
178
+ Script name: {script_name}
179
+ Verdict date: {verdict_date}
180
+ </graduation_context>
181
+
182
+ <instructions>
183
+ Execute notebook graduation workflow:
184
+
185
+ 1. Validate graduation requirements using graduation_validator
186
+ 2. Convert notebook to script via nbconvert
187
+ 3. Apply graduated-script template for metadata header
188
+ 4. Write to src/experiments/
189
+ 5. Report completion with warnings if any
190
+
191
+ Template: @get-research-done/templates/graduated-script.md
192
+ </instructions>
193
+ """, subagent_type="grd-graduator", model="sonnet", description="Graduate notebook to script")
194
+ ```
195
+
196
+ ## Phase 4: Log Graduation
197
+
198
+ **Update human_eval/decision_log.md:**
199
+
200
+ ```bash
201
+ # Ensure human_eval directory exists
202
+ mkdir -p human_eval
203
+
204
+ # Create log file if doesn't exist
205
+ if [ ! -f human_eval/decision_log.md ]; then
206
+ cat > human_eval/decision_log.md << 'EOF'
207
+ # Human Evaluation Decision Log
208
+
209
+ This log tracks all human evaluation decisions for this research project.
210
+
211
+ | Date | Run | Decision | Rationale |
212
+ |------|-----|----------|-----------|
213
+ EOF
214
+ fi
215
+
216
+ # Append graduation entry
217
+ TIMESTAMP=$(date +"%Y-%m-%d")
218
+ echo "| $TIMESTAMP | $(basename $RUN_DIR) | GRADUATED | Notebook graduated to src/experiments/${SCRIPT_NAME}.py |" >> human_eval/decision_log.md
219
+ ```
220
+
221
+ ## Phase 5: Report Success
222
+
223
+ Display completion message:
224
+
225
+ ```
226
+ -------------------------------------------------------
227
+ GRD > GRADUATION COMPLETE
228
+ -------------------------------------------------------
229
+
230
+ Source notebook: {notebook_path}
231
+ Validated run: {run_dir}
232
+ Graduated script: src/experiments/{script_name}.py
233
+
234
+ Graduation details:
235
+ - Critic verdict: PROCEED ({confidence})
236
+ - Verdict date: {verdict_date}
237
+ - Graduation warnings: {warnings_list or "None"}
238
+
239
+ MANUAL REFACTORING REQUIRED:
240
+ The graduated script needs manual cleanup before production use:
241
+
242
+ - [ ] Remove/convert magic commands (grep "^%" in script)
243
+ - [ ] Extract code into functions
244
+ - [ ] Replace parameter cell with argparse
245
+ - [ ] Add docstrings and type hints
246
+ - [ ] Verify all random seeds are set
247
+ - [ ] Write tests for core functions
248
+
249
+ See the script header for full checklist.
250
+
251
+ Decision logged to: human_eval/decision_log.md
252
+ ```
253
+
254
+ </process>
255
+
256
+ <arguments>
257
+
258
+ ## Arguments
259
+
260
+ | Argument | Required | Description |
261
+ |----------|----------|-------------|
262
+ | `notebook_path` | Yes | Path to notebook in notebooks/exploration/ |
263
+ | `--run` | No | Specific run number that passed (auto-detect if omitted) |
264
+ | `--name` | No | Name for graduated script (default: notebook name) |
265
+
266
+ </arguments>
267
+
268
+ <examples>
269
+
270
+ **Graduate with auto-detected run:**
271
+ ```
272
+ /grd:graduate notebooks/exploration/001_initial_experiment.ipynb
273
+ # Auto-detects latest PROCEED run for this notebook
274
+ # Creates: src/experiments/001_initial_experiment.py
275
+ ```
276
+
277
+ **Graduate with specific run:**
278
+ ```
279
+ /grd:graduate notebooks/exploration/baseline.ipynb --run 003
280
+ # Uses experiments/run_003_*/CRITIC_LOG.md for validation
281
+ # Creates: src/experiments/baseline.py
282
+ ```
283
+
284
+ **Graduate with custom name:**
285
+ ```
286
+ /grd:graduate notebooks/exploration/my_experiment.ipynb --name production_model
287
+ # Creates: src/experiments/production_model.py
288
+ ```
289
+
290
+ **Full specification:**
291
+ ```
292
+ /grd:graduate notebooks/exploration/feature_eng.ipynb --run 005 --name feature_pipeline
293
+ # Uses specific run, custom script name
294
+ # Creates: src/experiments/feature_pipeline.py
295
+ ```
296
+
297
+ </examples>
298
+
299
+ <output>
300
+
301
+ - `src/experiments/{script_name}.py` — Graduated Python script containing:
302
+ - Metadata header with source notebook, run, verdict
303
+ - Refactoring checklist as TODO comments
304
+ - Converted notebook code (via nbconvert)
305
+ - Template functions for reproducibility
306
+
307
+ - `human_eval/decision_log.md` — Updated with graduation entry
308
+
309
+ </output>
310
+
311
+ <success_criteria>
312
+
313
+ - [ ] Notebook path validated (exists, is .ipynb, in exploration/)
314
+ - [ ] PROCEED verdict confirmed for run (specified or auto-detected)
315
+ - [ ] Graduation requirements validated (seeds, parameters cell)
316
+ - [ ] Notebook converted to script via nbconvert
317
+ - [ ] Metadata header applied from template
318
+ - [ ] Script written to src/experiments/
319
+ - [ ] Graduation logged to decision_log.md
320
+ - [ ] Original notebook unchanged in notebooks/exploration/
321
+ - [ ] Warnings reported (if any)
322
+
323
+ </success_criteria>