@proflandrigan/shards 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 (397) hide show
  1. package/README.md +475 -0
  2. package/package.json +37 -0
  3. package/src/agents/academic.md +276 -0
  4. package/src/agents/ai-engineer.md +377 -0
  5. package/src/agents/analytics-engineer.md +364 -0
  6. package/src/agents/applied-ml-scientist.md +410 -0
  7. package/src/agents/backend-engineer.md +255 -0
  8. package/src/agents/bi-engineer.md +333 -0
  9. package/src/agents/data-analyst.md +343 -0
  10. package/src/agents/data-engineer.md +260 -0
  11. package/src/agents/data-modeller.md +386 -0
  12. package/src/agents/data-scientist.md +366 -0
  13. package/src/agents/deep-learning-engineer.md +389 -0
  14. package/src/agents/ml-engineer.md +424 -0
  15. package/src/agents/mlops-engineer.md +339 -0
  16. package/src/agents/researcher.md +187 -0
  17. package/src/agents/specific_instructions/academic/critical_review.md +263 -0
  18. package/src/agents/specific_instructions/academic/report.md +113 -0
  19. package/src/agents/specific_instructions/ai_engineer/advise.md +162 -0
  20. package/src/agents/specific_instructions/ai_engineer/bi_engineer_handoff.md +86 -0
  21. package/src/agents/specific_instructions/ai_engineer/experiment.md +471 -0
  22. package/src/agents/specific_instructions/ai_engineer/experiment_ui_mode.md +44 -0
  23. package/src/agents/specific_instructions/ai_engineer/phases/index.md +45 -0
  24. package/src/agents/specific_instructions/ai_engineer/phases/phase-1.md +55 -0
  25. package/src/agents/specific_instructions/ai_engineer/phases/phase-2.md +86 -0
  26. package/src/agents/specific_instructions/ai_engineer/phases/phase-3.md +96 -0
  27. package/src/agents/specific_instructions/ai_engineer/phases/phase-4.md +138 -0
  28. package/src/agents/specific_instructions/ai_engineer/phases/phase-5.md +157 -0
  29. package/src/agents/specific_instructions/ai_engineer/phases/phase-6.md +196 -0
  30. package/src/agents/specific_instructions/ai_engineer/phases/phase-7.md +313 -0
  31. package/src/agents/specific_instructions/ai_engineer/phases.md +1011 -0
  32. package/src/agents/specific_instructions/ai_engineer/prompt_lab.md +161 -0
  33. package/src/agents/specific_instructions/ai_engineer/prompt_lab_ui_mode.md +28 -0
  34. package/src/agents/specific_instructions/ai_engineer/research.md +393 -0
  35. package/src/agents/specific_instructions/ai_engineer/research_ui_mode.md +66 -0
  36. package/src/agents/specific_instructions/ai_engineer/review.md +159 -0
  37. package/src/agents/specific_instructions/ai_engineer/validation_checklist.md +182 -0
  38. package/src/agents/specific_instructions/analytics_engineer/advise.md +155 -0
  39. package/src/agents/specific_instructions/analytics_engineer/bi_engineer_handoff.md +91 -0
  40. package/src/agents/specific_instructions/analytics_engineer/data_analyst_handoff.md +84 -0
  41. package/src/agents/specific_instructions/analytics_engineer/deep_phases.md +818 -0
  42. package/src/agents/specific_instructions/analytics_engineer/phases_deep/index.md +24 -0
  43. package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-1.md +77 -0
  44. package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-2.md +106 -0
  45. package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-3.md +93 -0
  46. package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-4.md +79 -0
  47. package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-5.md +61 -0
  48. package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-6.md +45 -0
  49. package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-7.md +235 -0
  50. package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-8.md +221 -0
  51. package/src/agents/specific_instructions/analytics_engineer/phases_quick/index.md +19 -0
  52. package/src/agents/specific_instructions/analytics_engineer/phases_quick/phase-1.md +47 -0
  53. package/src/agents/specific_instructions/analytics_engineer/phases_quick/phase-2.md +78 -0
  54. package/src/agents/specific_instructions/analytics_engineer/quick_phases.md +112 -0
  55. package/src/agents/specific_instructions/analytics_engineer/review.md +167 -0
  56. package/src/agents/specific_instructions/analytics_engineer/service_mode.md +369 -0
  57. package/src/agents/specific_instructions/analytics_engineer/ui_mode.md +45 -0
  58. package/src/agents/specific_instructions/analytics_engineer/update.md +162 -0
  59. package/src/agents/specific_instructions/analytics_engineer/validation_checklist.md +121 -0
  60. package/src/agents/specific_instructions/applied_ml_scientist/advise.md +143 -0
  61. package/src/agents/specific_instructions/applied_ml_scientist/phases/index.md +21 -0
  62. package/src/agents/specific_instructions/applied_ml_scientist/phases/phase-1.md +51 -0
  63. package/src/agents/specific_instructions/applied_ml_scientist/phases/phase-2.md +66 -0
  64. package/src/agents/specific_instructions/applied_ml_scientist/phases/phase-3.md +113 -0
  65. package/src/agents/specific_instructions/applied_ml_scientist/phases/phase-4.md +104 -0
  66. package/src/agents/specific_instructions/applied_ml_scientist/phases/phase-5.md +156 -0
  67. package/src/agents/specific_instructions/applied_ml_scientist/phases.md +428 -0
  68. package/src/agents/specific_instructions/applied_ml_scientist/research.md +379 -0
  69. package/src/agents/specific_instructions/applied_ml_scientist/review.md +142 -0
  70. package/src/agents/specific_instructions/applied_ml_scientist/validation_checklist.md +136 -0
  71. package/src/agents/specific_instructions/backend_engineer/clean.md +149 -0
  72. package/src/agents/specific_instructions/backend_engineer/review.md +91 -0
  73. package/src/agents/specific_instructions/backend_engineer/review_checklist.md +54 -0
  74. package/src/agents/specific_instructions/backend_engineer/service_mode.md +67 -0
  75. package/src/agents/specific_instructions/bi_engineer/advise.md +137 -0
  76. package/src/agents/specific_instructions/bi_engineer/data_analyst_handoff.md +77 -0
  77. package/src/agents/specific_instructions/bi_engineer/incoming_handoff.md +45 -0
  78. package/src/agents/specific_instructions/bi_engineer/phases/index.md +20 -0
  79. package/src/agents/specific_instructions/bi_engineer/phases/phase-1.md +164 -0
  80. package/src/agents/specific_instructions/bi_engineer/phases/phase-2.md +92 -0
  81. package/src/agents/specific_instructions/bi_engineer/phases/phase-3.md +121 -0
  82. package/src/agents/specific_instructions/bi_engineer/phases/phase-4.md +106 -0
  83. package/src/agents/specific_instructions/bi_engineer/phases.md +451 -0
  84. package/src/agents/specific_instructions/bi_engineer/review.md +166 -0
  85. package/src/agents/specific_instructions/bi_engineer/update.md +147 -0
  86. package/src/agents/specific_instructions/bi_engineer/validation_checklist.md +124 -0
  87. package/src/agents/specific_instructions/data_analyst/advise.md +138 -0
  88. package/src/agents/specific_instructions/data_analyst/explain.md +221 -0
  89. package/src/agents/specific_instructions/data_analyst/incoming_handoff.md +40 -0
  90. package/src/agents/specific_instructions/data_analyst/phases/index.md +20 -0
  91. package/src/agents/specific_instructions/data_analyst/phases/phase-1.md +159 -0
  92. package/src/agents/specific_instructions/data_analyst/phases/phase-2.md +112 -0
  93. package/src/agents/specific_instructions/data_analyst/phases/phase-3.md +265 -0
  94. package/src/agents/specific_instructions/data_analyst/phases/phase-4.md +100 -0
  95. package/src/agents/specific_instructions/data_analyst/phases.md +501 -0
  96. package/src/agents/specific_instructions/data_analyst/review.md +138 -0
  97. package/src/agents/specific_instructions/data_analyst/ui_mode.md +26 -0
  98. package/src/agents/specific_instructions/data_analyst/update.md +144 -0
  99. package/src/agents/specific_instructions/data_analyst/validation_checklist.md +95 -0
  100. package/src/agents/specific_instructions/data_engineer/advise.md +137 -0
  101. package/src/agents/specific_instructions/data_engineer/phases.md +466 -0
  102. package/src/agents/specific_instructions/data_engineer/phases_deep/index.md +23 -0
  103. package/src/agents/specific_instructions/data_engineer/phases_deep/phase-1.md +49 -0
  104. package/src/agents/specific_instructions/data_engineer/phases_deep/phase-2.md +93 -0
  105. package/src/agents/specific_instructions/data_engineer/phases_deep/phase-3.md +55 -0
  106. package/src/agents/specific_instructions/data_engineer/phases_deep/phase-4.md +48 -0
  107. package/src/agents/specific_instructions/data_engineer/phases_deep/phase-5.md +40 -0
  108. package/src/agents/specific_instructions/data_engineer/phases_deep/phase-6.md +102 -0
  109. package/src/agents/specific_instructions/data_engineer/phases_deep/phase-7.md +87 -0
  110. package/src/agents/specific_instructions/data_engineer/phases_quick/index.md +19 -0
  111. package/src/agents/specific_instructions/data_engineer/phases_quick/phase-1.md +45 -0
  112. package/src/agents/specific_instructions/data_engineer/phases_quick/phase-2.md +54 -0
  113. package/src/agents/specific_instructions/data_engineer/review.md +135 -0
  114. package/src/agents/specific_instructions/data_engineer/validation_checklist.md +136 -0
  115. package/src/agents/specific_instructions/data_modeller/advise.md +137 -0
  116. package/src/agents/specific_instructions/data_modeller/phases.md +581 -0
  117. package/src/agents/specific_instructions/data_modeller/phases_deep/index.md +23 -0
  118. package/src/agents/specific_instructions/data_modeller/phases_deep/phase-1.md +52 -0
  119. package/src/agents/specific_instructions/data_modeller/phases_deep/phase-2.md +113 -0
  120. package/src/agents/specific_instructions/data_modeller/phases_deep/phase-3.md +47 -0
  121. package/src/agents/specific_instructions/data_modeller/phases_deep/phase-4.md +51 -0
  122. package/src/agents/specific_instructions/data_modeller/phases_deep/phase-5.md +45 -0
  123. package/src/agents/specific_instructions/data_modeller/phases_deep/phase-6.md +105 -0
  124. package/src/agents/specific_instructions/data_modeller/phases_deep/phase-7.md +136 -0
  125. package/src/agents/specific_instructions/data_modeller/phases_quick/index.md +19 -0
  126. package/src/agents/specific_instructions/data_modeller/phases_quick/phase-1.md +47 -0
  127. package/src/agents/specific_instructions/data_modeller/phases_quick/phase-2.md +65 -0
  128. package/src/agents/specific_instructions/data_modeller/review.md +141 -0
  129. package/src/agents/specific_instructions/data_modeller/service_mode.md +218 -0
  130. package/src/agents/specific_instructions/data_modeller/validation_checklist.md +125 -0
  131. package/src/agents/specific_instructions/data_scientist/advise.md +158 -0
  132. package/src/agents/specific_instructions/data_scientist/bi_engineer_handoff.md +63 -0
  133. package/src/agents/specific_instructions/data_scientist/experiment.md +482 -0
  134. package/src/agents/specific_instructions/data_scientist/experiment_ui_mode.md +44 -0
  135. package/src/agents/specific_instructions/data_scientist/explain.md +247 -0
  136. package/src/agents/specific_instructions/data_scientist/greenfield_data.md +35 -0
  137. package/src/agents/specific_instructions/data_scientist/ml_engineer_handoff.md +52 -0
  138. package/src/agents/specific_instructions/data_scientist/notebook_walkthrough.md +76 -0
  139. package/src/agents/specific_instructions/data_scientist/phases/index.md +24 -0
  140. package/src/agents/specific_instructions/data_scientist/phases/phase-1.md +45 -0
  141. package/src/agents/specific_instructions/data_scientist/phases/phase-2.md +67 -0
  142. package/src/agents/specific_instructions/data_scientist/phases/phase-3.md +89 -0
  143. package/src/agents/specific_instructions/data_scientist/phases/phase-4.md +143 -0
  144. package/src/agents/specific_instructions/data_scientist/phases/phase-5.md +71 -0
  145. package/src/agents/specific_instructions/data_scientist/phases/phase-6.md +239 -0
  146. package/src/agents/specific_instructions/data_scientist/phases/phase-7.md +207 -0
  147. package/src/agents/specific_instructions/data_scientist/phases.md +651 -0
  148. package/src/agents/specific_instructions/data_scientist/research.md +345 -0
  149. package/src/agents/specific_instructions/data_scientist/research_ui_mode.md +52 -0
  150. package/src/agents/specific_instructions/data_scientist/review.md +136 -0
  151. package/src/agents/specific_instructions/data_scientist/service_mode.md +247 -0
  152. package/src/agents/specific_instructions/data_scientist/validation_checklist.md +183 -0
  153. package/src/agents/specific_instructions/deep_learning_engineer/advise.md +145 -0
  154. package/src/agents/specific_instructions/deep_learning_engineer/phases/index.md +21 -0
  155. package/src/agents/specific_instructions/deep_learning_engineer/phases/phase-1.md +74 -0
  156. package/src/agents/specific_instructions/deep_learning_engineer/phases/phase-2.md +98 -0
  157. package/src/agents/specific_instructions/deep_learning_engineer/phases/phase-3.md +76 -0
  158. package/src/agents/specific_instructions/deep_learning_engineer/phases/phase-4.md +128 -0
  159. package/src/agents/specific_instructions/deep_learning_engineer/phases/phase-5.md +292 -0
  160. package/src/agents/specific_instructions/deep_learning_engineer/phases.md +567 -0
  161. package/src/agents/specific_instructions/deep_learning_engineer/research.md +389 -0
  162. package/src/agents/specific_instructions/deep_learning_engineer/review.md +155 -0
  163. package/src/agents/specific_instructions/deep_learning_engineer/validation_checklist.md +147 -0
  164. package/src/agents/specific_instructions/ml_engineer/advise.md +174 -0
  165. package/src/agents/specific_instructions/ml_engineer/bi_engineer_handoff.md +71 -0
  166. package/src/agents/specific_instructions/ml_engineer/experiment.md +474 -0
  167. package/src/agents/specific_instructions/ml_engineer/experiment_ui_mode.md +44 -0
  168. package/src/agents/specific_instructions/ml_engineer/notebook_walkthrough.md +75 -0
  169. package/src/agents/specific_instructions/ml_engineer/phases/index.md +25 -0
  170. package/src/agents/specific_instructions/ml_engineer/phases/phase-1.md +49 -0
  171. package/src/agents/specific_instructions/ml_engineer/phases/phase-2.md +75 -0
  172. package/src/agents/specific_instructions/ml_engineer/phases/phase-3.md +124 -0
  173. package/src/agents/specific_instructions/ml_engineer/phases/phase-4.md +279 -0
  174. package/src/agents/specific_instructions/ml_engineer/phases/phase-5.md +160 -0
  175. package/src/agents/specific_instructions/ml_engineer/phases/phase-6-5.md +170 -0
  176. package/src/agents/specific_instructions/ml_engineer/phases/phase-6.md +295 -0
  177. package/src/agents/specific_instructions/ml_engineer/phases/phase-7.md +337 -0
  178. package/src/agents/specific_instructions/ml_engineer/phases.md +1068 -0
  179. package/src/agents/specific_instructions/ml_engineer/research.md +437 -0
  180. package/src/agents/specific_instructions/ml_engineer/research_ui_mode.md +71 -0
  181. package/src/agents/specific_instructions/ml_engineer/review.md +187 -0
  182. package/src/agents/specific_instructions/ml_engineer/service_mode.md +273 -0
  183. package/src/agents/specific_instructions/ml_engineer/validation_checklist.md +185 -0
  184. package/src/agents/specific_instructions/mlops_engineer/advise.md +139 -0
  185. package/src/agents/specific_instructions/mlops_engineer/phases/index.md +23 -0
  186. package/src/agents/specific_instructions/mlops_engineer/phases/phase-1.md +52 -0
  187. package/src/agents/specific_instructions/mlops_engineer/phases/phase-2.md +86 -0
  188. package/src/agents/specific_instructions/mlops_engineer/phases/phase-3.md +105 -0
  189. package/src/agents/specific_instructions/mlops_engineer/phases/phase-4.md +128 -0
  190. package/src/agents/specific_instructions/mlops_engineer/phases/phase-5.md +106 -0
  191. package/src/agents/specific_instructions/mlops_engineer/phases/phase-6.md +128 -0
  192. package/src/agents/specific_instructions/mlops_engineer/phases/phase-7.md +144 -0
  193. package/src/agents/specific_instructions/mlops_engineer/phases.md +671 -0
  194. package/src/agents/specific_instructions/mlops_engineer/review.md +164 -0
  195. package/src/agents/specific_instructions/mlops_engineer/service_mode.md +81 -0
  196. package/src/agents/specific_instructions/mlops_engineer/validation_checklist.md +151 -0
  197. package/src/agents/specific_instructions/researcher/critical_review.md +292 -0
  198. package/src/agents/specific_instructions/researcher/review_checklist.md +67 -0
  199. package/src/agents/specific_instructions/researcher/service_mode.md +224 -0
  200. package/src/agents/specific_instructions/shared/auto_verify_mode.md +141 -0
  201. package/src/agents/specific_instructions/shared/autonomous_research.md +1289 -0
  202. package/src/agents/specific_instructions/shared/behavioral_rules.md +36 -0
  203. package/src/agents/specific_instructions/shared/diverge_protocol.md +387 -0
  204. package/src/agents/specific_instructions/shared/engineering_guidelines.md +136 -0
  205. package/src/agents/specific_instructions/shared/experiment_versioning.md +184 -0
  206. package/src/agents/specific_instructions/shared/goal_mode.md +187 -0
  207. package/src/agents/specific_instructions/shared/incremental_testing.md +139 -0
  208. package/src/agents/specific_instructions/shared/intent_discovery.md +223 -0
  209. package/src/agents/specific_instructions/shared/join_path_protocol.md +168 -0
  210. package/src/agents/specific_instructions/shared/knowledge_checkpoint.md +83 -0
  211. package/src/agents/specific_instructions/shared/knowledge_harvest.md +220 -0
  212. package/src/agents/specific_instructions/shared/knowledge_retrieval.md +100 -0
  213. package/src/agents/specific_instructions/shared/notebook_walkthrough_protocol.md +367 -0
  214. package/src/agents/specific_instructions/shared/reviewer_verdict_protocol.md +74 -0
  215. package/src/agents/specific_instructions/shared/swarm_protocol.md +97 -0
  216. package/src/agents/specific_instructions/shared/validation_protocol.md +139 -0
  217. package/src/agents/specific_instructions/syn/arbiter.md +140 -0
  218. package/src/agents/specific_instructions/syn/brainstorm.md +550 -0
  219. package/src/agents/specific_instructions/syn/code_review.md +232 -0
  220. package/src/agents/specific_instructions/syn/diff.md +239 -0
  221. package/src/agents/specific_instructions/syn/final_review.md +65 -0
  222. package/src/agents/specific_instructions/syn/fixer.md +240 -0
  223. package/src/agents/specific_instructions/syn/free_form.md +130 -0
  224. package/src/agents/specific_instructions/syn/knowledge.md +468 -0
  225. package/src/agents/specific_instructions/syn/notebook_walkthrough.md +78 -0
  226. package/src/agents/specific_instructions/syn/panel_review.md +634 -0
  227. package/src/agents/specific_instructions/syn/pm.md +453 -0
  228. package/src/agents/specific_instructions/syn/pr_review.md +255 -0
  229. package/src/agents/specific_instructions/syn/slides.md +417 -0
  230. package/src/agents/syn.md +729 -0
  231. package/src/commands/academic.md +41 -0
  232. package/src/commands/ai-engineer.md +45 -0
  233. package/src/commands/analytics-engineer.md +48 -0
  234. package/src/commands/applied-ml-scientist.md +45 -0
  235. package/src/commands/backend-engineer.md +35 -0
  236. package/src/commands/bi-engineer.md +40 -0
  237. package/src/commands/brainstorm.md +24 -0
  238. package/src/commands/data-analyst.md +38 -0
  239. package/src/commands/data-engineer.md +37 -0
  240. package/src/commands/data-modeller.md +38 -0
  241. package/src/commands/data-scientist.md +38 -0
  242. package/src/commands/deep-learning-engineer.md +47 -0
  243. package/src/commands/end.md +49 -0
  244. package/src/commands/knowledge.md +24 -0
  245. package/src/commands/ml-engineer.md +42 -0
  246. package/src/commands/mlops-engineer.md +47 -0
  247. package/src/commands/notebook-walkthrough.md +58 -0
  248. package/src/commands/researcher.md +40 -0
  249. package/src/commands/resume.md +57 -0
  250. package/src/commands/review-pr.md +26 -0
  251. package/src/commands/shards-guide.md +41 -0
  252. package/src/commands/shards-ui.md +32 -0
  253. package/src/commands/shards.md +41 -0
  254. package/src/docs/01-getting-started/concepts.md +109 -0
  255. package/src/docs/01-getting-started/first-session.md +79 -0
  256. package/src/docs/01-getting-started/install.md +61 -0
  257. package/src/docs/02-agents/academic.md +71 -0
  258. package/src/docs/02-agents/ai-engineer.md +78 -0
  259. package/src/docs/02-agents/analytics-engineer.md +58 -0
  260. package/src/docs/02-agents/applied-ml-scientist.md +59 -0
  261. package/src/docs/02-agents/backend-engineer.md +58 -0
  262. package/src/docs/02-agents/bi-engineer.md +65 -0
  263. package/src/docs/02-agents/data-analyst.md +67 -0
  264. package/src/docs/02-agents/data-engineer.md +57 -0
  265. package/src/docs/02-agents/data-modeller.md +51 -0
  266. package/src/docs/02-agents/data-scientist.md +78 -0
  267. package/src/docs/02-agents/deep-learning-engineer.md +64 -0
  268. package/src/docs/02-agents/ml-engineer.md +80 -0
  269. package/src/docs/02-agents/mlops-engineer.md +59 -0
  270. package/src/docs/02-agents/overview.md +62 -0
  271. package/src/docs/02-agents/researcher.md +73 -0
  272. package/src/docs/02-agents/syn.md +88 -0
  273. package/src/docs/03-protocols/auto-verify.md +82 -0
  274. package/src/docs/03-protocols/autonomous-research.md +59 -0
  275. package/src/docs/03-protocols/behavioral-rules.md +35 -0
  276. package/src/docs/03-protocols/diverge.md +50 -0
  277. package/src/docs/03-protocols/engineering-guidelines.md +56 -0
  278. package/src/docs/03-protocols/experiment-versioning.md +38 -0
  279. package/src/docs/03-protocols/gate-pattern.md +65 -0
  280. package/src/docs/03-protocols/incremental-testing.md +68 -0
  281. package/src/docs/03-protocols/join-path.md +46 -0
  282. package/src/docs/03-protocols/knowledge-ledger.md +70 -0
  283. package/src/docs/03-protocols/reviewer-verdicts.md +39 -0
  284. package/src/docs/03-protocols/swarm.md +40 -0
  285. package/src/docs/03-protocols/validation.md +174 -0
  286. package/src/docs/04-ui/activity-bar.md +70 -0
  287. package/src/docs/04-ui/chat-pane.md +80 -0
  288. package/src/docs/04-ui/code-intel.md +62 -0
  289. package/src/docs/04-ui/file-editing.md +61 -0
  290. package/src/docs/04-ui/git.md +54 -0
  291. package/src/docs/04-ui/keybindings.md +79 -0
  292. package/src/docs/04-ui/knowledge-map.md +76 -0
  293. package/src/docs/04-ui/overview.md +93 -0
  294. package/src/docs/04-ui/panels.md +49 -0
  295. package/src/docs/04-ui/pinboard-selection.md +66 -0
  296. package/src/docs/04-ui/quick-open-palette.md +56 -0
  297. package/src/docs/04-ui/sessions.md +81 -0
  298. package/src/docs/04-ui/settings-permissions.md +56 -0
  299. package/src/docs/05-commands/reference.md +59 -0
  300. package/src/docs/06-outputs/directory-map.md +116 -0
  301. package/src/docs/07-workflows/ai-eval-first.md +57 -0
  302. package/src/docs/07-workflows/deep-study-to-production.md +76 -0
  303. package/src/docs/07-workflows/diverge-exploration.md +77 -0
  304. package/src/docs/07-workflows/quick-analysis.md +45 -0
  305. package/src/docs/08-integrations/claude-code-auto-mode.md +191 -0
  306. package/src/docs/08-integrations/google-slides.md +175 -0
  307. package/src/docs/README.md +30 -0
  308. package/src/docs/manifest.json +108 -0
  309. package/src/templates/analysis-template.md +20 -0
  310. package/src/templates/branch-report.md +46 -0
  311. package/src/templates/diff-report.md +88 -0
  312. package/src/templates/knowledge-index.md +7 -0
  313. package/src/templates/model-card-schema.json +186 -0
  314. package/src/templates/model-card-schema.md +88 -0
  315. package/src/templates/model-card.md +124 -0
  316. package/src/templates/project-plan.md +47 -0
  317. package/src/templates/project-specs.md +81 -0
  318. package/src/templates/report-template.md +43 -0
  319. package/src/templates/study-template.md +25 -0
  320. package/src/ui/cc-readonly.js +181 -0
  321. package/src/ui/chat-session.js +466 -0
  322. package/src/ui/css/base.css +136 -0
  323. package/src/ui/css/brainstorm.css +525 -0
  324. package/src/ui/css/chat.css +1405 -0
  325. package/src/ui/css/editor.css +546 -0
  326. package/src/ui/css/eval-dashboard.css +157 -0
  327. package/src/ui/css/experiment.css +237 -0
  328. package/src/ui/css/guide.css +186 -0
  329. package/src/ui/css/knowledge-map.css +383 -0
  330. package/src/ui/css/layout.css +431 -0
  331. package/src/ui/css/model-card.css +161 -0
  332. package/src/ui/css/notebook-walkthrough.css +271 -0
  333. package/src/ui/css/pr-review.css +403 -0
  334. package/src/ui/css/prompt-lab.css +325 -0
  335. package/src/ui/css/sessions.css +258 -0
  336. package/src/ui/css/sidebar.css +661 -0
  337. package/src/ui/css/terminal.css +113 -0
  338. package/src/ui/css/theme-light.css +542 -0
  339. package/src/ui/index.html +389 -0
  340. package/src/ui/js/agents.js +32 -0
  341. package/src/ui/js/bookmarks.js +230 -0
  342. package/src/ui/js/chat.js +1776 -0
  343. package/src/ui/js/code-intel.js +328 -0
  344. package/src/ui/js/command-palette.js +142 -0
  345. package/src/ui/js/events.js +591 -0
  346. package/src/ui/js/explorer.js +317 -0
  347. package/src/ui/js/file-view.js +477 -0
  348. package/src/ui/js/git.js +536 -0
  349. package/src/ui/js/guide.js +198 -0
  350. package/src/ui/js/hud.js +75 -0
  351. package/src/ui/js/init.js +351 -0
  352. package/src/ui/js/knowledge-map.js +906 -0
  353. package/src/ui/js/markdown.js +114 -0
  354. package/src/ui/js/monaco.js +164 -0
  355. package/src/ui/js/notebook-walkthrough.js +272 -0
  356. package/src/ui/js/notebook.js +448 -0
  357. package/src/ui/js/panels.js +2681 -0
  358. package/src/ui/js/pinboard.js +186 -0
  359. package/src/ui/js/quick-open.js +164 -0
  360. package/src/ui/js/selection-context.js +131 -0
  361. package/src/ui/js/sessions.js +256 -0
  362. package/src/ui/js/settings.js +476 -0
  363. package/src/ui/js/split-view.js +82 -0
  364. package/src/ui/js/state.js +343 -0
  365. package/src/ui/js/table.js +161 -0
  366. package/src/ui/js/tabs.js +284 -0
  367. package/src/ui/js/tabular.js +125 -0
  368. package/src/ui/js/terminal.js +354 -0
  369. package/src/ui/js/timeline.js +137 -0
  370. package/src/ui/js/utils.js +293 -0
  371. package/src/ui/notebook-kernel.py +790 -0
  372. package/src/ui/open-browser.js +55 -0
  373. package/src/ui/permission-pattern.js +42 -0
  374. package/src/ui/relay.js +513 -0
  375. package/src/ui/server.js +3072 -0
  376. package/src/ui/session-index.js +225 -0
  377. package/src/ui/shards_icon.png +0 -0
  378. package/src/ui/spawn-server.js +41 -0
  379. package/src/ui/symbol-index.js +813 -0
  380. package/src/ui/ui-push.js +177 -0
  381. package/tools/gate-hook/VALIDATION_SPEC.md +273 -0
  382. package/tools/gate-hook/__tests__/auto-verify.test.js +343 -0
  383. package/tools/gate-hook/auto-allowlist.js +179 -0
  384. package/tools/gate-hook/auto-state.js +68 -0
  385. package/tools/gate-hook/classify.js +21 -0
  386. package/tools/gate-hook/log.js +57 -0
  387. package/tools/gate-hook/parser.js +205 -0
  388. package/tools/gate-hook/sql-guard.js +230 -0
  389. package/tools/gate-hook/state.js +170 -0
  390. package/tools/gate-hook/sweep.js +139 -0
  391. package/tools/gate-hook/transcript.js +45 -0
  392. package/tools/gate-hook/validation.js +321 -0
  393. package/tools/gate-hook.js +475 -0
  394. package/tools/install.js +914 -0
  395. package/tools/shards-gates.js +311 -0
  396. package/tools/shards-sessions.js +261 -0
  397. package/tools/shards-ui.js +377 -0
@@ -0,0 +1,567 @@
1
+ # Deep Learning Engineer — Phased Workflow (Create Mode)
2
+
3
+ Phases 1 through 6 for the Deep Learning Engineer Create Mode.
4
+ Phase 0 (Problem Ingestion) is already complete.
5
+ Follow every phase, gate, and documentation rule below.
6
+
7
+ ---
8
+
9
+ ## Create Mode — Phase 1: Architecture Selection (Gated)
10
+
11
+ Goal: Select and fully specify the architecture before touching training.
12
+
13
+ 1. **Inductive bias analysis:** What structural property does the data have
14
+ (translation equivariance, sequential order, permutation invariance, etc.)?
15
+ What architecture class encodes that bias?
16
+
17
+ 2. **Assess ≥2 backbone candidates.** For each:
18
+ - Inductive bias alignment with data structure
19
+ - Benchmark context (paper, dataset, metric)
20
+ - Memory estimate at target batch size: parameters + activations
21
+ - Known failure modes or instabilities
22
+
23
+ 3. **Select architecture.** Specify the full top-down stack with shapes at
24
+ every major component:
25
+ - Input normalization (if any): type and rationale
26
+ - Backbone: name, variant, pretrained checkpoint (if applicable)
27
+ - Neck (if applicable): FPN, PANet, global average pooling, CLS token
28
+ - Head: structure, dropout, activation, output shape
29
+ - Final output: shape and interpretation
30
+
31
+ 4. **Normalization strategy:** BatchNorm vs LayerNorm vs GroupNorm vs RMSNorm.
32
+ State the rationale — not a preference, a reason tied to batch size and
33
+ data structure.
34
+
35
+ 5. **Parameter count estimate:** Rough count for backbone + head.
36
+
37
+ ### Document Phase 1
38
+
39
+ Append to `project-specs.md`:
40
+
41
+ ```markdown
42
+ ## Phase 1: Architecture Selection
43
+
44
+ ### Inductive Bias Analysis
45
+ - **Data structure:** <what geometric or sequential property exists>
46
+ - **Required bias:** <what the architecture must encode>
47
+
48
+ ### Candidate Comparison
49
+ | Backbone | Bias Alignment | Benchmark | Memory @ Batch | Failure Modes |
50
+ |---------|---------------|-----------|---------------|---------------|
51
+ | <name> | <1 sentence> | <paper, dataset, metric> | <params + act> | <known issues> |
52
+
53
+ ### Selected Architecture: <Name>
54
+ **Rationale:** <Why this backbone over alternatives, tied to data structure>
55
+
56
+ **Full Forward Pass (with shapes):**
57
+ - Input: <shape, dtype>
58
+ - Input norm: <type> → <shape>
59
+ - Backbone: <name> → <shape>
60
+ - Neck: <type> → <shape> [or N/A]
61
+ - Head: <structure> → <output shape>
62
+
63
+ **Normalization strategy:** <BatchNorm | LayerNorm | GroupNorm | RMSNorm>
64
+ **Rationale:** <concrete reason tied to batch size and data>
65
+
66
+ **Parameter estimate:** ~<N>M total (backbone: ~<X>M, head: ~<Y>M)
67
+ ```
68
+
69
+ ::GATE:: id=specific-instructions-deep-learning-engineer-phases-phase1 phase=1 kind=phase
70
+ Read this section back to the user. Stop here — do not begin the next phase or output any further content. Wait for the user to explicitly confirm before proceeding. Do not interpret silence or partial agreement as confirmation.
71
+ ::ENDGATE::
72
+
73
+ ---
74
+
75
+ ## Create Mode — Phase 2: Training Protocol (Gated)
76
+
77
+ Goal: Fully specify training before writing a line of code.
78
+
79
+ Define:
80
+
81
+ 1. **Loss function:** Formula + justification. Why this loss for this task?
82
+ Known failure modes?
83
+
84
+ 2. **Optimizer:** AdamW is the default. State the reason explicitly if
85
+ deviating. Include:
86
+ - Weight decay value and rationale (decoupled from LR per Loshchilov &
87
+ Hutter, 2019)
88
+ - β₁, β₂, ε values if non-default, with rationale
89
+
90
+ 3. **Learning rate schedule:**
91
+ - Warmup: number of steps and rationale
92
+ - Decay strategy: cosine, linear, polynomial — with rationale
93
+ - Peak LR: concrete value with concrete justification (not "tune it")
94
+ - Minimum LR (if applicable)
95
+
96
+ 4. **Regularization:**
97
+ - Dropout: rate and placement (attention dropout vs residual dropout vs
98
+ classifier dropout — these are different)
99
+ - Label smoothing (if classification): value and rationale
100
+ - Stochastic depth (if applicable): survival probability
101
+ - Weight decay already specified in optimizer
102
+
103
+ 5. **Data augmentation table:**
104
+
105
+ | Transform | Parameters | Invariance Encoded | Apply to Val? |
106
+ |-----------|-----------|-------------------|---------------|
107
+ | <name> | <params> | <what it teaches> | <yes | no> |
108
+
109
+ 6. **Batch configuration:**
110
+ - Effective batch size (global)
111
+ - Per-GPU batch size
112
+ - Gradient accumulation steps (if VRAM-constrained)
113
+
114
+ 7. **Checkpoint strategy:** best validation metric, every N epochs, or both.
115
+
116
+ ### Document Phase 2
117
+
118
+ Append to `project-specs.md`:
119
+
120
+ ```markdown
121
+ ## Phase 2: Training Protocol
122
+
123
+ ### Loss Function
124
+ - **Formula:** <L = ...>
125
+ - **Justification:** <why this loss for this task>
126
+ - **Known failure modes:** <class imbalance, optimization landscape issues, etc.>
127
+
128
+ ### Optimizer
129
+ - **Optimizer:** <AdamW | other>
130
+ - **Deviation rationale:** <if not AdamW, why>
131
+ - **Weight decay:** <value> — <rationale>
132
+ - **β₁, β₂, ε:** <values if non-default>
133
+
134
+ ### Learning Rate Schedule
135
+ - **Warmup:** <N steps> — <rationale>
136
+ - **Decay:** <cosine | linear | polynomial> — <rationale>
137
+ - **Peak LR:** <value> — <justification>
138
+ - **Minimum LR:** <value or "none">
139
+
140
+ ### Regularization
141
+ - **Dropout:** rate=<X>, placement=<where>
142
+ - **Label smoothing:** <value | N/A>
143
+ - **Stochastic depth:** survival_prob=<X | N/A>
144
+
145
+ ### Augmentation
146
+ | Transform | Parameters | Invariance | Val? |
147
+ |-----------|-----------|-----------|------|
148
+ | <name> | <params> | <invariance> | <yes/no> |
149
+
150
+ ### Batch Configuration
151
+ - **Effective batch size:** <N>
152
+ - **Per-GPU batch size:** <N>
153
+ - **Gradient accumulation:** <N steps | none>
154
+
155
+ ### Checkpoint Strategy
156
+ <best val metric | every N epochs | both — rationale>
157
+ ```
158
+
159
+ ::GATE:: id=specific-instructions-deep-learning-engineer-phases-phase2 phase=2 kind=phase
160
+ Read this section back to the user. Stop here — do not begin the next phase or output any further content. Wait for the user to explicitly confirm before proceeding. Do not interpret silence or partial agreement as confirmation.
161
+ ::ENDGATE::
162
+
163
+ ---
164
+
165
+ ## Create Mode — Phase 3: Implementation Specification (Gated)
166
+
167
+ Goal: Translate architecture and training protocol into an engineering plan.
168
+
169
+ Define:
170
+
171
+ 1. **Framework:** PyTorch vs JAX with rationale. Not a preference — a reason
172
+ tied to the training procedure (custom CUDA, vmap, multi-host TPU, etc.).
173
+
174
+ 2. **Code structure:** What each `src/` file contains, `forward()` signature
175
+ with input and output shapes, module interfaces.
176
+
177
+ 3. **Hardware config:**
178
+ - fp16 vs bf16: bf16 preferred for most modern GPUs (A100, H100, RTX 30xx+);
179
+ fp16 for older hardware — state the reason
180
+ - Gradient checkpointing: yes if VRAM is constrained; quantify the compute
181
+ overhead
182
+ - `torch.compile`: compatible with the architecture? Expected speedup?
183
+
184
+ 4. **Experiment tracking:** tool (wandb / tensorboard / MLflow), key metrics
185
+ logged per step and per epoch, visualization plan.
186
+
187
+ 5. **Inference plan:** serving format, quantization (int8 / int4 / GPTQ if
188
+ applicable), expected latency delta from quantization.
189
+
190
+ ### Document Phase 3
191
+
192
+ Append to `project-specs.md`:
193
+
194
+ ```markdown
195
+ ## Phase 3: Implementation Specification
196
+
197
+ ### Framework
198
+ - **Framework:** <PyTorch | JAX>
199
+ - **Rationale:** <concrete reason tied to training procedure>
200
+
201
+ ### Code Structure
202
+ - **model.py:** <what it contains, forward() signature with shapes>
203
+ - **dataset.py:** <Dataset class, transforms, get_dataloaders() fn>
204
+ - **train.py:** <training loop, optimizer/scheduler construction, checkpoint logic>
205
+ - **evaluate.py:** <evaluation loop, metric computation, predict() fn>
206
+ - **configs/config.yaml:** <all hyperparameters from Phases 1-2>
207
+
208
+ ### Hardware Config
209
+ - **Precision:** <bf16 | fp16> — <rationale>
210
+ - **Gradient checkpointing:** <yes — ~X% compute overhead | no>
211
+ - **torch.compile:** <yes — expected ~X% speedup | no — incompatible because>
212
+
213
+ ### Experiment Tracking
214
+ - **Tool:** <wandb | tensorboard | MLflow>
215
+ - **Metrics per step:** <loss, grad norm, LR>
216
+ - **Metrics per epoch:** <val loss, primary metric, secondary metrics>
217
+ - **Visualizations:** <loss curves, confusion matrix, attention maps, etc.>
218
+
219
+ ### Inference Plan
220
+ - **Serving format:** <ONNX | TorchScript | TensorRT | HuggingFace | none>
221
+ - **Quantization:** <int8 | int4 | none> — <latency delta estimate>
222
+ - **Expected inference latency:** ~<X>ms per sample on <hardware>
223
+ ```
224
+
225
+ **DIVERGE check:** If you identified 2-3 mutually exclusive neural architectures (e.g., different backbone families, fundamentally different training paradigms) that are genuinely equally viable, you MAY propose a DIVERGE fork. Read `.claude/agents/specific_instructions/shared/diverge_protocol.md` and follow its DIVERGE Proposal Gate. If confirmed, branches execute autonomously through the remaining phases. After convergence and promotion, resume at Phase 4. If declined or not applicable, continue normally.
226
+
227
+ ::GATE:: id=specific-instructions-deep-learning-engineer-phases-phase3 phase=3 kind=phase
228
+ Read this section back to the user. Stop here — do not begin the next phase or output any further content. Wait for the user to explicitly confirm before proceeding. Do not interpret silence or partial agreement as confirmation.
229
+ ::ENDGATE::
230
+
231
+ ---
232
+
233
+ ## Create Mode — Phase 4: Execute (Gated)
234
+
235
+ Goal: Build the model implementation.
236
+
237
+ **Context checkpoint:** Before building, prompt the user:
238
+
239
+ "Planning's locked — good moment to run `/compact` or `/clear` before we start
240
+ executing. I'll be working from project-specs.md from here. Say the word when
241
+ you're ready."
242
+
243
+ Wait for any signal from the user before beginning build steps.
244
+
245
+ **Knowledge re-check:** Follow `.claude/agents/specific_instructions/shared/knowledge_checkpoint.md` before building.
246
+
247
+ Then create:
248
+
249
+ **`models/<project_name>/notebooks/model_development.ipynb`**
250
+
251
+ Structure:
252
+ 1. **Setup** — imports, config load, device setup, seed setting
253
+ 2. **Dataset Sanity Check** — data loading, shape assertions, sample batch
254
+ visualization, class distribution (if classification)
255
+ 3. **Model Trace** — instantiate model, run forward pass with dummy input,
256
+ print shape at each major component via hooks or explicit prints
257
+ 4. **Training Loop** — full training with logging: loss, eval metric, gradient
258
+ norm, LR per epoch; inline loss curves after training
259
+ 5. **Evaluation** — metric table vs baseline, confusion matrix or equivalent,
260
+ per-class breakdown if applicable
261
+ 6. **Diagnostics** — gradient norm history plot, activation statistics,
262
+ loss curve analysis, dead neuron check (if ReLU backbone)
263
+
264
+ **`models/<project_name>/src/model.py`**
265
+ - Every `forward()` method has a shape comment on the return tensor
266
+ - No magic numbers — all sizes come from config
267
+ - Normalization and dropout layers instantiated in `__init__`, applied in `forward()`
268
+
269
+ **`models/<project_name>/src/dataset.py`**
270
+ - `Dataset` class with `__len__` and `__getitem__`
271
+ - Transform pipeline built from Phase 2 augmentation table
272
+ - `get_dataloaders(config)` convenience function
273
+
274
+ **`models/<project_name>/src/train.py`**
275
+ - `train_epoch(model, loader, optimizer, scheduler, device)` function
276
+ - Optimizer and scheduler construction
277
+ - Checkpoint logic: save best validation metric, load from checkpoint
278
+
279
+ **`models/<project_name>/src/evaluate.py`**
280
+ - `evaluate(model, loader, device)` evaluation loop
281
+ - Primary and secondary metric computation
282
+ - `predict(model, sample, device)` single-sample inference function
283
+
284
+ **`models/<project_name>/configs/config.yaml`**
285
+ - All hyperparameters from Phases 1, 2, and 3
286
+ - No hardcoded values in src/ — everything references config
287
+
288
+ **`models/<project_name>/requirements.txt`**
289
+ - Pinned major dependencies (torch==X.Y, torchvision==X.Y, etc.)
290
+
291
+ ### Document Phase 4
292
+
293
+ Append to `project-specs.md`:
294
+
295
+ ```markdown
296
+ ## Phase 4: Build Log
297
+
298
+ - **Notebook:** `notebooks/model_development.ipynb`
299
+ - **Source modules:** model.py, dataset.py, train.py, evaluate.py
300
+ - **Training run summary:**
301
+ - Hardware: <GPU model, VRAM>
302
+ - Precision: <bf16 | fp16 | fp32>
303
+ - Effective batch size: <N>
304
+ - Steps / epochs: <N>
305
+ - Peak GPU memory: ~<X>GB
306
+ - Loss trajectory: <converged at epoch N | diverged | oscillating — describe>
307
+ - Best validation metric: <metric name>=<value> at epoch <N>
308
+ - **Baseline comparison:**
309
+ | Model | <Metric> | Notes |
310
+ |-------|---------|-------|
311
+ | Baseline (<type>) | <value> | — |
312
+ | **Ours** | <value> | — |
313
+ - **Gradient diagnostics:** <healthy convergence | anomalies observed — describe>
314
+ - **Known implementation limitations:** <what prototype doesn't handle>
315
+ ```
316
+
317
+ ::GATE:: id=specific-instructions-deep-learning-engineer-phases-phase4 phase=4 kind=phase
318
+ Read this section back to the user. Stop here — do not begin the next phase or output any further content. Wait for the user to explicitly confirm before proceeding. Do not interpret silence or partial agreement as confirmation.
319
+ ::ENDGATE::
320
+
321
+ ---
322
+
323
+ ## Create Mode — Phase 5: Review and Handoff (Gated)
324
+
325
+ Goal: Dual specialist review before writing the final report.
326
+
327
+ Both reviews happen before writing `report.md`. If either raises a blocking
328
+ concern, discuss with the user and revise before proceeding.
329
+
330
+ **ML Engineer review (production infrastructure and deployment feasibility):**
331
+
332
+ Tell the user: "Requesting ML Engineer review for production infrastructure
333
+ and deployment feasibility..."
334
+
335
+ ```
336
+ Task(
337
+ subagent_type="ml-engineer",
338
+ description="Production readiness review for deep learning model: <project name>",
339
+ prompt="I am the Deep Learning Engineer shard. I have built a custom deep
340
+ learning model and need a production infrastructure review.
341
+
342
+ Project: <project name>
343
+ Directory: models/<project_name>/
344
+ Specs: models/<project_name>/project-specs.md
345
+
346
+ Summary:
347
+ - Task: <input/output tensor shapes from Phase 0>
348
+ - Architecture: <selected backbone + head from Phase 1>
349
+ - Parameters: ~<N>M
350
+ - Training: <optimizer, LR schedule, augmentation summary from Phase 2>
351
+ - Hardware: <GPU, precision, gradient checkpointing from Phase 3>
352
+ - Results: <best validation metric vs baseline from Phase 4>
353
+ - Serving format: <from Phase 3>
354
+
355
+ Please review for production readiness:
356
+ 1. Is the serving format (or absence of one) appropriate for the stated
357
+ latency budget?
358
+ 2. Are there infrastructure or pipeline concerns for integrating this model
359
+ into production?
360
+ 3. Is the model size and inference cost acceptable for the stated hardware
361
+ constraints?
362
+ 4. What monitoring and retraining triggers would you recommend?
363
+ 5. Are there production failure modes (data drift, distribution shift,
364
+ cold start) not addressed in the current design?
365
+
366
+ Please read project-specs.md for full context."
367
+ )
368
+ ```
369
+
370
+ **Applied ML Scientist review (methodology soundness and cutting-edge alternatives):**
371
+
372
+ Tell the user: "Requesting Applied ML Scientist review for methodology soundness
373
+ and cutting-edge alternatives assessment..."
374
+
375
+ ```
376
+ Task(
377
+ subagent_type="applied-ml-scientist",
378
+ description="Methodology review for deep learning model: <project name>",
379
+ prompt="I am the Deep Learning Engineer shard. I have built a custom deep
380
+ learning model and need a methodology and theory review.
381
+
382
+ Project: <project name>
383
+ Directory: models/<project_name>/
384
+
385
+ Summary:
386
+ - Task: <problem description and input/output from Phase 0>
387
+ - Core hypothesis: <why this architecture for this data>
388
+ - Architecture: <selected approach from Phase 1>
389
+ - Loss function: <formula and justification from Phase 2>
390
+ - Results: <metric table from Phase 4>
391
+
392
+ Please review for methodology soundness:
393
+ 1. Is the inductive bias argument for the selected architecture sound given
394
+ the data structure?
395
+ 2. Are there recent methods (post-2022) that would clearly outperform this
396
+ approach for this problem type?
397
+ 3. Is the loss function well-aligned with the task objective?
398
+ 4. Are there theoretical gaps in the training protocol (optimizer choice,
399
+ regularization, augmentation strategy)?
400
+ 5. What experiments would most efficiently validate or invalidate the core
401
+ design hypothesis?
402
+
403
+ Please read models/<project_name>/project-specs.md for full context."
404
+ )
405
+ ```
406
+
407
+ **MLOps Engineer review (production platform and operationalization):**
408
+
409
+ Tell the user: "And finally, asking the MLOps Engineer to review the production
410
+ platform requirements and operationalization plan..."
411
+
412
+ ```
413
+ Task(
414
+ subagent_type="mlops-engineer",
415
+ description="Production platform review for deep learning model: <project name>",
416
+ prompt="I am the Deep Learning Engineer shard. I have built a custom deep
417
+ learning model and need a production platform and operationalization review.
418
+
419
+ Project: <project name>
420
+ Directory: models/<project_name>/
421
+ Specs: models/<project_name>/project-specs.md
422
+
423
+ Summary:
424
+ - Architecture: <selected backbone + head from Phase 1>
425
+ - Parameters: ~<N>M
426
+ - Serving format: <from Phase 3>
427
+ - Hardware: <GPU, precision from Phase 3>
428
+ - Results: <best validation metric vs baseline from Phase 4>
429
+
430
+ Please review:
431
+ 1. Is the serving format appropriate for the stated latency budget and
432
+ operational constraints?
433
+ 2. What CI/CD pipeline would you recommend for retraining and model
434
+ registry management?
435
+ 3. Is the experiment tracking and model versioning plan sufficient for
436
+ production operation?
437
+ 4. What monitoring and retraining triggers would you build for this model?
438
+ 5. What infrastructure is needed that isn't yet in the plan?
439
+
440
+ Please read project-specs.md for full context."
441
+ )
442
+ ```
443
+
444
+ Append MLOps Engineer's review to specs.
445
+
446
+ **Backend Engineer code review (Python artifacts):**
447
+
448
+ Glob the project directory (`models/<project_name>/`) for `.py` and `.ipynb` files.
449
+ If any are found:
450
+
451
+ Tell the user: "Before we write the report, the Backend Engineer is reviewing
452
+ the Python artifacts. Code quality is not optional."
453
+
454
+ ```
455
+ Task(
456
+ subagent_type="backend-engineer",
457
+ description="Python code review for [project_name]",
458
+ prompt="You are in SERVICE MODE. Review the following Python files in the
459
+ project at models/[project_name]/. Read project-specs.md first for context.
460
+ Files to review: [list of .py and .ipynb files found]"
461
+ )
462
+ ```
463
+
464
+ Append the Backend Engineer's review to project-specs.md. If no Python files are
465
+ found, skip this step.
466
+
467
+ **Multi-reviewer conflict protocol:**
468
+
469
+ If no reviewer returns a blocking verdict (REDESIGN, Revise, or Redesign needed):
470
+ → Proceed to report.md. Document all three verdicts.
471
+
472
+ If all reviewers with blocking concerns agree on the same root cause:
473
+ → Discuss with the user and revise the binding issue before proceeding.
474
+
475
+ If reviewers disagree — one or two block while the other(s) do not:
476
+ → Present the conflict explicitly to the user:
477
+
478
+ "The reviewers disagree:
479
+ - ML Engineer verdict: [DEPLOY | OPTIMIZE | REDESIGN] — [key reason]
480
+ - Applied ML Scientist verdict: [Sound | Consider Alternatives | Revise] — [key reason]
481
+ - MLOps Engineer verdict: [Approved | Concerns | Redesign needed] — [key reason]
482
+
483
+ This is a genuine constraint conflict. Which is the binding constraint for
484
+ this project: production feasibility, methodological rigor, or operational
485
+ readiness? Your answer determines what we fix first."
486
+
487
+ Document the user's decision in project-specs.md:
488
+
489
+ **Reviewer conflict resolution:** Production-first | Methodology-first | Operations-first | User override — <rationale>
490
+
491
+ Then address the binding constraint before proceeding. If the non-binding concern
492
+ remains unresolved after iteration, note it explicitly in report.md Limitations.
493
+
494
+ **Create `models/<project_name>/report.md`:**
495
+
496
+ ```markdown
497
+ # <Project Name> — Deep Learning Engineering Report
498
+
499
+ ## System Specification
500
+ - **Task:** <input → output>
501
+ - **Architecture:** <name, parameter count>
502
+ - **Training:** <optimizer, schedule, key regularization>
503
+ - **Hardware:** <GPU, precision>
504
+
505
+ ## Architecture Rationale
506
+ <Inductive bias argument for the selected architecture. Cite the paper that
507
+ established why this architecture class works for this data modality.>
508
+
509
+ ### Candidate Comparison
510
+ <Table from Phase 1>
511
+
512
+ ## Training Protocol Rationale
513
+ <Justification for optimizer, LR schedule, loss function, and augmentation
514
+ choices. Cite papers where relevant (Loshchilov & Hutter, 2019 for decoupled
515
+ weight decay; Goyal et al., 2017 for LR scaling, etc.)>
516
+
517
+ ## Results
518
+ <Metric table vs baseline from Phase 4>
519
+ <Training dynamics: loss trajectory, convergence epoch, gradient norm behavior>
520
+ <Ablation results if run>
521
+
522
+ ## Production Readiness
523
+ **ML Engineer verdict:** <DEPLOY | OPTIMIZE | REDESIGN>
524
+ <Summary of infrastructure and deployment assessment>
525
+ <Required changes before production: ordered by priority>
526
+
527
+ ## Methodology Review
528
+ **Applied ML Scientist verdict:** <Sound | Consider Alternatives | Revise>
529
+ <Summary of theoretical soundness assessment>
530
+ <Literature gaps or superior alternatives identified>
531
+
532
+ ## Operations Review
533
+ **MLOps Engineer verdict:** <Approved | Concerns | Redesign needed>
534
+ <Summary of production platform and operationalization assessment>
535
+ <CI/CD, monitoring, and retraining gaps identified>
536
+
537
+ ## Code Review
538
+ **Backend Engineer verdict:** <Clean | Minor Issues | Refactor Required | Blocked | N/A — no Python artifacts>
539
+ <Summary of code review findings, or "No Python artifacts found.">
540
+
541
+ ## Limitations
542
+ <What the current implementation does not handle:>
543
+ - <Hardware assumption: trained on X, deployed assumptions unclear>
544
+ - <Data quality: assumes Y, not validated for Z>
545
+ - <Scale: prototype at N examples; behavior at 10× unknown>
546
+
547
+ ## Next Steps
548
+ <Ordered by expected impact:>
549
+ 1. <experiment or engineering step>
550
+ 2. <experiment or engineering step>
551
+ 3. <experiment or engineering step>
552
+
553
+ ## Knowledge Harvested
554
+ - <title> → .shards/knowledge/<type>/<filename>.md
555
+ - Or: None — project did not produce reusable knowledge
556
+ ```
557
+
558
+ **Knowledge harvest.** Before closing, extract reusable knowledge from this project.
559
+ Read `.claude/agents/specific_instructions/shared/knowledge_harvest.md` and follow
560
+ the protocol. Present candidates to the user for confirmation before writing.
561
+
562
+ ::GATE:: id=specific-instructions-deep-learning-engineer-phases-phase4-2 phase=4 kind=final
563
+ Read Phase 5 summary to the user. Stop here — wait for the user to explicitly confirm the project is closed before wrapping up.
564
+ ::ENDGATE::
565
+
566
+ ---
567
+