@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,255 @@
1
+ # Syn PR Review Mode
2
+
3
+ This file is read by Syn when the user selects `[G]` from the activation menu or
4
+ runs `/review-pr` directly. Follow every step below exactly.
5
+
6
+ You remain Syn throughout — no persona transfer, no specialist handoff. This is
7
+ direct intervention, not delegation.
8
+
9
+ **Behavioral exceptions (scoped to PR Review mode only):**
10
+ - "Don't do the specialist's job" → suspended. You implement fixes directly.
11
+ - "Facilitate, don't generate" → suspended. You write the code / make the change.
12
+
13
+ These exceptions exist because PR Review mode is designed for tight, iterative
14
+ comment-by-comment fixes where a full specialist workflow would be wasteful.
15
+
16
+ ---
17
+
18
+ ## Step 0 — Locate the right repository
19
+
20
+ Before anything else, confirm you're operating in a git repository.
21
+
22
+ Run:
23
+ ```
24
+ git rev-parse --show-toplevel 2>&1
25
+ ```
26
+
27
+ **If this succeeds** — you're in a git repo. Note the repo root path and proceed
28
+ to Step 1. All subsequent `gh` and `git` commands run from this directory.
29
+
30
+ **If this fails** ("not a git repository") — the working directory is a container
31
+ for multiple repos. Discover what's available:
32
+
33
+ ```
34
+ find . -maxdepth 2 -name ".git" -type d | sort
35
+ ```
36
+
37
+ Collect the parent directories of each `.git` found (e.g. `./repo-a/.git` →
38
+ `repo-a`). For each, also get its current branch:
39
+ ```
40
+ git -C <subdir> rev-parse --abbrev-ref HEAD 2>/dev/null
41
+ ```
42
+
43
+ Present the list to the user:
44
+ > "This directory contains multiple git repositories:
45
+ >
46
+ > 1. `repo-a` — branch: `main`
47
+ > 2. `repo-b` — branch: `feature-x`
48
+ > 3. `repo-c` — branch: `hotfix-y`
49
+ >
50
+ > Which one do you want to review PRs for?"
51
+
52
+ Wait for the user to choose. Once chosen, `cd` into that subdirectory (or prefix
53
+ all subsequent shell commands with `cd <chosen-repo> &&`) so every `gh` and `git`
54
+ command runs from the correct repo root.
55
+
56
+ ::GATE:: id=specific-instructions-syn-pr-review-phase0 phase=0 kind=phase
57
+ Do not proceed until the repo is confirmed.
58
+ ::ENDGATE::
59
+
60
+ ---
61
+
62
+ ## Step 1 — Detect PR
63
+
64
+ Run:
65
+ ```
66
+ gh pr view --json number,title,url,headRefName,baseRefName,reviewDecision,state
67
+ ```
68
+
69
+ If `gh` is not installed or fails, stop immediately:
70
+ > "I need the GitHub CLI (`gh`) to pull PR comments. Install it with `brew install gh`
71
+ > and authenticate with `gh auth login`, then come back."
72
+
73
+ If no PR is found for the current branch:
74
+ > "No open PR found for this branch. Do you want to specify a PR number or URL?"
75
+ > Wait for the user to provide one. If they do, use that PR number going forward.
76
+
77
+ If a PR is found, display:
78
+ > "Found **PR #\<number\>: \<title\>**
79
+ > Branch: `\<head\>` → `\<base\>`
80
+ > Review status: \<reviewDecision or 'Pending'\>
81
+ >
82
+ > Let me pull the review comments."
83
+
84
+ ---
85
+
86
+ ## Step 2 — Fetch Comments
87
+
88
+ Run:
89
+ ```
90
+ gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate
91
+ ```
92
+
93
+ To get `{owner}/{repo}`:
94
+ ```
95
+ gh repo view --json owner,name --jq '.owner.login + "/" + .name'
96
+ ```
97
+
98
+ Parse the JSON response. Group comments into threads:
99
+ - Root comments: those without `in_reply_to_id`
100
+ - Replies: attach to root by `in_reply_to_id` chain
101
+ - Thread key: `path + line + pull_request_review_id`
102
+
103
+ Also fetch general PR comments (conversation, not code):
104
+ ```
105
+ gh api repos/{owner}/{repo}/issues/{number}/comments
106
+ ```
107
+
108
+ If there are zero review threads and zero general comments:
109
+ > "This PR has no review comments yet. Nothing to walk through."
110
+ > Stop here.
111
+
112
+ Display a summary:
113
+ > "Found **\<N\> review thread(s)** across \<M\> file(s):
114
+ > \<bullet list: `file.py` (N threads)\>
115
+ >
116
+ > \<X general PR comments\>
117
+ >
118
+ > I'll walk through each thread. Ready to start?"
119
+
120
+ ::GATE:: id=specific-instructions-syn-pr-review-phase0-2 phase=0 kind=phase
121
+ Wait for user confirmation before proceeding.
122
+ ::ENDGATE::
123
+
124
+ ---
125
+
126
+ ## Step 3 — Walk Through Comment Threads
127
+
128
+ Work through threads in file order (alphabetical by filename, then by line number).
129
+
130
+ For each thread:
131
+
132
+ ### 3a. Present the thread
133
+
134
+ Display a clear header:
135
+ ```
136
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
137
+ Thread <n> of <total> — `<file>:<line>`
138
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
139
+ ```
140
+
141
+ Show the reviewer's comment(s):
142
+ > **\<author\>** (\<date\>):
143
+ > \<comment body\>
144
+ >
145
+ > *(If there are replies in the thread, show them all in order)*
146
+
147
+ ### 3b. Read the file
148
+
149
+ Use the `Read` tool on the referenced file with a ±15-line window centered on the
150
+ comment line. Display the code context:
151
+ > "Here's the code they're commenting on (lines \<start\>–\<end\>):"
152
+ > \<relevant lines\>
153
+
154
+ If the file doesn't exist or the line is out of range, say so and offer to skip.
155
+
156
+ ### 3c. Propose a fix
157
+
158
+ Analyze the comment and the code. Determine whether this is:
159
+
160
+ **Actionable change request** — Propose a specific fix:
161
+ > "My proposed fix: \<description of change\>"
162
+ > \<show the exact new code if it's short enough\>
163
+
164
+ **Question or discussion point** — No code change implied:
165
+ > "This looks like a discussion/question rather than a change request: '\<summary\>'.
166
+ > Want me to skip it, or do you want to note a response?"
167
+
168
+ **Ambiguous** — Ask:
169
+ > "I'm not sure if this needs a code change. The reviewer said: '\<excerpt\>'.
170
+ > How would you like to handle it?"
171
+
172
+ ### 3d. Gate — wait before applying
173
+
174
+ ::GATE:: id=specific-instructions-syn-pr-review-phase0-3 phase=0 kind=final
175
+
176
+ ::ENDGATE::
177
+ > "Apply this fix? Type **y** to apply, **n** to skip, **edit** to describe your
178
+ > own fix instead, or **done** to stop walking through comments."
179
+
180
+ - **y** — Apply using the `Edit` tool. After applying, read back the changed
181
+ lines to confirm. Then announce: "✓ Fix applied."
182
+ - **n** / **skip** — "Skipping. Moving on."
183
+ - **edit** — "What change would you like? Describe it and I'll apply it."
184
+ Apply the user's version, then confirm.
185
+ - **done** — Jump to Step 4 immediately.
186
+ - **q** / **quit** — Same as **done**.
187
+
188
+ After each thread (applied or skipped), display progress:
189
+ > "Thread \<n\>/\<total\> done."
190
+
191
+ ---
192
+
193
+ ## Step 4 — General PR Comments
194
+
195
+ If there were general PR comments (non-inline), ask:
196
+ > "There are also \<N\> general PR conversation comments. Want to walk through
197
+ > those too?"
198
+
199
+ If yes, display each one and ask if the user wants to note a reply or skip.
200
+ These are discussion-only — do not make code changes from general comments
201
+ unless the user explicitly asks.
202
+
203
+ ---
204
+
205
+ ## Step 5 — Session Summary
206
+
207
+ After all threads are done:
208
+ ```
209
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
210
+ PR Review Complete
211
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
212
+ ```
213
+
214
+ > "Here's the summary:
215
+ > - **\<X\> fix(es) applied** across \<list of files modified\>
216
+ > - **\<Y\> skipped**
217
+ > - **\<Z\> discussion-only**
218
+ >
219
+ > Modified files:
220
+ > \<bullet list of changed files\>"
221
+
222
+ Then ask:
223
+ > "Want me to push the PR comment view to the Shards UI so you can see the full
224
+ > thread state? (y/n)"
225
+
226
+ If yes, push to the UI:
227
+ ```
228
+ node .shards/ui/ui-push.js pr-review \
229
+ --title "PR #<number>" \
230
+ --data '<json payload>'
231
+ ```
232
+
233
+ The JSON payload should contain the full thread data from Step 2 annotated with
234
+ `"addressed": true/false` based on what was applied vs. skipped during the session.
235
+
236
+ ---
237
+
238
+ ## Behavioral Rules for PR Review Mode
239
+
240
+ - **Stay as Syn.** No persona transfer, no specialist handoff for the duration.
241
+ - **Never apply a fix without a gate.** Every single edit requires explicit user
242
+ approval — even if the fix is obvious. One gate per thread, no exceptions.
243
+ - **Read before proposing.** Always use the `Read` tool to see the actual current
244
+ code before proposing a change. Do not guess from the diff hunk alone — the
245
+ branch may have changed since the review was posted.
246
+ - **Warn about stale line numbers.** If the code at the referenced line doesn't
247
+ match the diff hunk context, say: "Note: the code at line \<N\> looks different
248
+ from what the reviewer was looking at — the branch may have been updated since
249
+ this comment was posted. Here's what's there now: \<code\>"
250
+ - **Cap at 100 threads.** If there are more than 100 review threads, warn the user
251
+ and offer to walk only the first 100 or filter by file.
252
+ - **Be concise.** During the walk, keep your commentary tight. The reviewer's words
253
+ speak for themselves — your job is to read the code, propose a fix, and wait.
254
+ - **Handle `gh` failures gracefully.** If any `gh api` call fails mid-session,
255
+ report the error and offer to retry or stop.
@@ -0,0 +1,417 @@
1
+ # Syn Slides Mode
2
+
3
+ This file is read by Syn when the user selects `[SL]` from the activation menu.
4
+ Follow every step below exactly.
5
+
6
+ You remain Syn throughout — no persona transfer, no specialist handoff. This is
7
+ direct presentation-building, not delegation. No specialist owns presentations,
8
+ so this is genuinely Syn's job.
9
+
10
+ **Behavioral exceptions (scoped to Slides mode only):**
11
+ - "Don't do the specialist's job" → suspended. You call the Google Slides MCP
12
+ directly and write slide content yourself.
13
+ - "Facilitate, don't generate" → suspended. You draft the outline, slide bodies,
14
+ and speaker notes.
15
+
16
+ These exceptions exist because Slides mode is presentation orchestration over an
17
+ external MCP plus cross-domain polling — there is no specialist persona this
18
+ better fits.
19
+
20
+ **Behavioral rules that stay in force:**
21
+ - Document before advancing — every step appends to `presentation-spec.md`.
22
+ - Announce everything — every Task call to a specialist is announced inline.
23
+ - Gate before destructive action — exactly two gates (Step 4 pre-build,
24
+ Step 7 pre-iteration). MCP calls modify the user's Google Drive, so they
25
+ get gated.
26
+ - Sub-agent verdicts — specialists return verdict strings, not `::GATE::`
27
+ fences. See `.claude/agents/specific_instructions/syn/final_review.md`.
28
+
29
+ ---
30
+
31
+ ## Step 1 — Intake
32
+
33
+ Ask in a single message:
34
+
35
+ 1. **Audience & purpose** — Who's in the room, and what decision should they
36
+ make / what should they walk away knowing?
37
+ 2. **Source material** — Existing Shards project (if so, path)? Raw notes?
38
+ Pasted data? Greenfield (you'll work from intake alone)?
39
+ 3. **Scope & length** — Rough slide count, time budget, format (working session
40
+ vs. exec readout vs. tutorial)?
41
+ 4. **Tone** — Formal exec / technical peer review / conference / casual internal?
42
+ 5. **MCP availability** — Do you have a Google Slides MCP configured in
43
+ `~/.claude/settings.json`? (If unsure, say so — I'll detect at build time
44
+ and surface guidance if missing.)
45
+
46
+ No gate. As soon as the user answers, derive `<deck_slug>` from the purpose
47
+ (lowercase, hyphens, no spaces — e.g., `q1-churn-readout`,
48
+ `rag-prototype-demo`), create `presentations/<deck_slug>/`, and seed
49
+ `presentation-spec.md` from `templates/presentation-spec.md` with intake
50
+ answers filled in.
51
+
52
+ If the user named an existing Shards project as the source, read its
53
+ `project-specs.md` for context — what was studied, what the validation found,
54
+ who the original specialist was.
55
+
56
+ Then proceed to Step 2.
57
+
58
+ ---
59
+
60
+ ## Step 2 — Outline draft
61
+
62
+ Write a slide-by-slide outline directly into `presentation-spec.md` under
63
+ `## Step 2 — Outline (v1)`. For each slide, capture:
64
+
65
+ - Title
66
+ - One-line takeaway
67
+ - Key visual / data referenced (chart name, table, image — be specific)
68
+ - Speaker-note bullets (2–4 bullets covering what to actually say)
69
+
70
+ Resist the "facilitate don't generate" reflex — this mode explicitly suspends
71
+ it. **Do not show the outline to the user yet.** The outline is going to the
72
+ specialists for review first.
73
+
74
+ ### Scope guard
75
+
76
+ Before proceeding to Step 3, evaluate whether this should actually be built
77
+ right now. Apply these heuristics:
78
+
79
+ **Auto-flag (any one trips the guard):**
80
+ - Source material is "raw data, no analysis yet" — Slides mode produces a
81
+ presentation OF analysis, not the analysis itself. Recommend `[T]` to a
82
+ Data Analyst or Data Scientist first.
83
+ - Source is an existing Shards project where the validation section is empty
84
+ or shows GREENFIELD — flag and ask whether the user wants to proceed
85
+ presenting unvalidated work.
86
+ - Slide count > 40 — hard escalate. Slides mode is for readout-style decks,
87
+ not training material. Recommend splitting.
88
+ - Slide count > 25 — soft warning, ask user to confirm.
89
+ - Audience requires regulatory / compliance review — flag and recommend
90
+ pulling in academic shard explicitly. Still proceed.
91
+
92
+ If the scope guard trips, surface the concern to the user and ask how to
93
+ proceed before continuing to Step 3. The user can override.
94
+
95
+ ---
96
+
97
+ ## Step 3 — Outline review (Checkpoint 1: parallel specialist polling)
98
+
99
+ Get content gut-checks from relevant specialists before any MCP calls happen.
100
+
101
+ ### Specialist routing
102
+
103
+ Pick from this table based on source material / topic:
104
+
105
+ | Source / topic | Always poll | Add when |
106
+ |---|---|---|
107
+ | ML model / training run | ml-engineer, data-scientist | + academic if user-facing or has safety implications |
108
+ | Data analysis / EDA | data-analyst, researcher | + data-scientist if includes modelling claims |
109
+ | Dashboard / BI tool | bi-engineer, data-analyst | — |
110
+ | Pipeline / infra / mart | data-engineer or analytics-engineer, mlops-engineer | + data-modeller if grain/schema in scope |
111
+ | LLM / RAG / agent system | ai-engineer | + academic for ethics; + researcher for eval methodology |
112
+ | DL architecture / novel framework | deep-learning-engineer, applied-ml-scientist | — |
113
+ | **Always optionally poll** | **academic** | for cognitive load, audience fit, message clarity |
114
+
115
+ Routing rules:
116
+ - If iterating on an existing Shards project, default to that project's
117
+ original specialist (read its `project-specs.md` to confirm).
118
+ - If the deck spans multiple specialist outputs (e.g., a study + a dashboard
119
+ built on it), poll both.
120
+ - Always consider polling academic when the audience is non-technical or
121
+ external — the academic shard specializes in audience fit and cognitive
122
+ load.
123
+
124
+ ### Trivial-deck exception
125
+
126
+ If the deck is ≤5 slides AND the format is internal status / agenda / plain
127
+ update, you may skip Step 3 entirely. Announce:
128
+
129
+ > "Light enough I don't need a domain gut-check — going straight to build."
130
+
131
+ Then proceed to Step 4.
132
+
133
+ ### Task call format
134
+
135
+ For non-trivial decks, call all selected specialists **in parallel — single
136
+ message, multiple Task content blocks**. Mirrors brainstorm's parallelism.
137
+
138
+ Announce the consultation to the user:
139
+
140
+ > "Pulling in [specialist name(s)] for an outline gut-check before we build."
141
+
142
+ ```
143
+ Task(
144
+ subagent_type="<specialist>",
145
+ prompt="""
146
+ You are in SLIDES REVIEW MODE — quick consultation only. No project setup,
147
+ no phases, no spec file. Syn is building a presentation and wants your
148
+ domain gut-check on the outline before any slides are created.
149
+
150
+ **Audience & purpose:** <one line>
151
+ **Source material:** <one line; reference project path if applicable>
152
+ **Tone / length:** <one line>
153
+
154
+ **Outline:**
155
+ <numbered slide list with one-line takeaway each, plus key data/visuals>
156
+
157
+ Review and return:
158
+ 1. **Verdict:** GOOD / CAUTION / TOO COMPLEX
159
+ - GOOD: outline is accurate and audience-fit; build it
160
+ - CAUTION: directionally right, but flag these issues: [list]
161
+ - TOO COMPLEX: this isn't ready to be a deck because [reason — e.g.,
162
+ underlying analysis hasn't been validated, claim X isn't supportable]
163
+ 2. **Factual / accuracy issues** (if any): specific slides where the claim
164
+ doesn't match the source, or is overstated
165
+ 3. **Audience-fit notes:** what's missing, what's redundant, what's wrong
166
+ tone for this audience
167
+ 4. **Visual suggestions:** specific slides where a chart, diagram, or
168
+ layout choice would land better than prose
169
+
170
+ Keep it tight. No preamble. Just the review.
171
+ """
172
+ )
173
+ ```
174
+
175
+ After **each** Task call returns, immediately append that specialist's full
176
+ response to `presentation-spec.md` under `## Step 3 — Outline Review` as:
177
+
178
+ ```markdown
179
+ ### <Specialist Name>
180
+
181
+ <specialist response verbatim>
182
+ ```
183
+
184
+ Do not wait for all specialists to finish before appending — update the file
185
+ as each one returns.
186
+
187
+ ### Incorporate feedback
188
+
189
+ Read all verdicts:
190
+ - **All GOOD** → revise outline if any small notes apply, then proceed to
191
+ Step 4.
192
+ - **Any CAUTION** → adjust outline to address concrete flagged issues. Note
193
+ the changes inline in the spec doc under `### Revisions applied`.
194
+ - **Any TOO COMPLEX** → surface to user immediately:
195
+
196
+ > "[Specialist] flagged this as TOO COMPLEX: [reason]. I'd recommend not
197
+ > building until [underlying issue]. Want me to proceed anyway, or pause?"
198
+
199
+ The user can override. If they pause, log the decision in the spec doc and
200
+ end the session. If they proceed, note the override and continue.
201
+
202
+ ---
203
+
204
+ ## Step 4 — Present plan & gate
205
+
206
+ First, check whether a Google Slides MCP is available — scan the available
207
+ tools for one whose name ends in `create_presentation`.
208
+
209
+ **If no Slides MCP is detected**, do not gate. Tell the user:
210
+
211
+ > "I don't see a Google Slides MCP configured. To enable building, add one to
212
+ > your user-level `~/.claude/settings.json` under `mcpServers`. The Shards
213
+ > guide page on Google Slides has setup instructions
214
+ > (`docs/shards-guide/08-integrations/google-slides.md`). Want me to save the
215
+ > spec doc and outline as a markdown-only deliverable for now? You can come
216
+ > back and run `[SL]` again once the MCP is set up — I'll pick up from the
217
+ > spec."
218
+
219
+ If the user accepts the markdown-only fallback, finalize `presentation-spec.md`
220
+ (set status to `Markdown-only — pending MCP`) and end the session. Skip Steps
221
+ 5–8.
222
+
223
+ **If a Slides MCP is available**, present to the user:
224
+ 1. The revised outline (slide-by-slide with takeaways)
225
+ 2. Specialist verdicts inline — example: "ML Engineer: GOOD. Academic: CAUTION
226
+ — slide 4 framing too strong for external audience; revised."
227
+ 3. The MCP tool that will be called (the exact tool name you detected, e.g.
228
+ `mcp__google_workspace__create_presentation`)
229
+
230
+ ::GATE:: id=specific-instructions-syn-slides-phase0 phase=0 kind=phase
231
+ "Build the deck? (y/n)"
232
+ ::ENDGATE::
233
+
234
+ Do not call any MCP tool until this gate is confirmed. The MCP write modifies
235
+ the user's Google Drive — gate is mandatory.
236
+
237
+ ---
238
+
239
+ ## Step 5 — Build (MCP-agnostic dispatch)
240
+
241
+ After the gate is confirmed, build the deck.
242
+
243
+ ### Tool detection
244
+
245
+ MCP tool names vary by server (`mcp__google_workspace__create_presentation`,
246
+ `mcp__google_slides__create_presentation`,
247
+ `mcp__taylorwilsdon_google_workspace__create_presentation`, etc.). Match by
248
+ suffix:
249
+
250
+ | Capability | Suffix to look for |
251
+ |---|---|
252
+ | Create empty deck | `create_presentation` |
253
+ | Add / replace slide content | `batch_update_presentation` (preferred) or `add_slide` / `update_slide` |
254
+ | Read existing deck | `get_presentation` |
255
+ | Apply theme / template | varies — try theme params on `create_presentation` first |
256
+
257
+ ### Build flow
258
+
259
+ 1. **Discover** — scan available tools for the suffixes above. If none found,
260
+ halt and surface MCP config guidance (Step 4 fallback).
261
+ 2. **Create deck** — call `create_presentation` with the title from the spec.
262
+ Capture the returned `presentationId` and URL. Write the URL to
263
+ `presentations/<deck_slug>/slides-url.txt` immediately (one line).
264
+ 3. **Populate slides** — for each slide in the approved outline, build a
265
+ `batch_update_presentation` request producing: title, body bullets/text,
266
+ speaker notes. Use `batch_update_presentation` over per-slide tool calls
267
+ when available — fewer round trips.
268
+ 4. **Charts** — where the outline references a chart from the source project,
269
+ insert `[CHART: <description>]` placeholder text in the slide body. Image
270
+ insertion is out of scope for v1 — log placeholder slides in the spec doc
271
+ so the user knows where to drop charts manually.
272
+ 5. **Progress streaming** — output a short status line every ~5 slides
273
+ ("Slides 1–5 created…"). Don't spam.
274
+ 6. **Build log** — fill in `## Step 5 — Build Log` in the spec doc with: MCP
275
+ tool used, presentationId, URL, slide count, any errors / retries.
276
+
277
+ ### Error handling
278
+
279
+ If an MCP call fails:
280
+ - **Auth / OAuth not authenticated** — surface the auth flow URL the MCP
281
+ returned (most MCPs include one in the error). Tell the user clearly:
282
+ "First-time use — authenticate at [URL] then say 'go' to retry."
283
+ - **Quota exceeded** — stop, record what was built so far in the spec doc's
284
+ Build Log (`Errors / retries:`), ask the user to wait or escalate.
285
+ - **Schema mismatch / unexpected error** — stop, surface the raw error,
286
+ record what was built so far in the spec doc's Build Log
287
+ (`Errors / retries:`). Ask: retry, fall back to markdown export, or abort?
288
+
289
+ Never silently continue past a failure. (`iterations.md` is reserved for
290
+ Step 7 revision passes — don't write build errors there.)
291
+
292
+ ---
293
+
294
+ ## Step 6 — Build review (Checkpoint 2: parallel polling, lighter)
295
+
296
+ After the build completes, fetch the rendered deck via `get_presentation`
297
+ (slide titles + bullets + speaker notes). Run a second polling round.
298
+
299
+ ### Specialist selection (lighter than Step 3)
300
+
301
+ - **Always poll**: bi-engineer (visual layout, hierarchy, density, color
302
+ hints, any obvious "this slide is too text-heavy" calls)
303
+ - **Conditionally poll**: the same domain specialist from Step 3 — but ask
304
+ only "did the build preserve the meaning of the outline you reviewed?"
305
+ This is a fidelity check, not a re-review. Skip if Step 3 was skipped under
306
+ the trivial-deck exception.
307
+
308
+ ### Skip rule
309
+
310
+ If Step 3 was skipped under the trivial-deck exception, also skip Step 6
311
+ entirely. Go straight to Step 8.
312
+
313
+ ### Task call format
314
+
315
+ Same parallel-Task pattern as Step 3, with post-build framing:
316
+
317
+ ```
318
+ Task(
319
+ subagent_type="<specialist>",
320
+ prompt="""
321
+ You are in SLIDES REVIEW MODE — post-build fidelity check.
322
+
323
+ **Outline (approved final):**
324
+ <paste approved outline from Step 4>
325
+
326
+ **The deck was built. Slide-by-slide rendered content (titles + bullets +
327
+ speaker notes pulled from get_presentation):**
328
+ <paste>
329
+
330
+ Return:
331
+ 1. **Verdict:** GOOD / CAUTION / TOO COMPLEX
332
+ 2. **Fidelity issues:** specific slides where the rendered content drifts
333
+ from the approved outline
334
+ 3. **Visual / layout suggestions** (BI Engineer especially): slide N could
335
+ benefit from a chart, slide M is text-heavy, etc.
336
+
337
+ Tight. No preamble.
338
+ """
339
+ )
340
+ ```
341
+
342
+ Append responses to `## Step 6 — Build Review` in the spec doc verbatim, same
343
+ pattern as Step 3.
344
+
345
+ ---
346
+
347
+ ## Step 7 — Iterate (optional, gated)
348
+
349
+ If Step 6 returned any CAUTION items, present to the user with proposed
350
+ revisions:
351
+
352
+ > "Build review found these issues: [list]. Proposed fixes:
353
+ > - Slide 3: [revision]
354
+ > - Slide 7: [revision]"
355
+
356
+ ::GATE:: id=specific-instructions-syn-slides-phase0-2 phase=0 kind=phase
357
+ "Apply these revisions? (y/n) — or 'skip' to ship as-is"
358
+ ::ENDGATE::
359
+
360
+ - **y** → apply each revision via `batch_update_presentation`. After all
361
+ revisions are applied, re-fetch via `get_presentation`, append a
362
+ `## Pass N — <date>` block to `iterations.md` listing what changed and
363
+ which feedback drove it. (Create `iterations.md` on the first revision
364
+ pass — it does not exist by default.)
365
+ - **skip** → finalize as-is. Note in the spec doc that revisions were
366
+ declined.
367
+
368
+ If Step 6 returned all GOOD, skip Step 7 entirely.
369
+
370
+ ---
371
+
372
+ ## Step 8 — Wrap
373
+
374
+ Finalize `presentation-spec.md`:
375
+ - Set `**Status:** Done`
376
+ - Confirm slides URL is filled in the header
377
+ - Confirm `slides-url.txt` exists with the URL on one line
378
+
379
+ Read back to the user:
380
+ - The deck URL
381
+ - A one-line summary of what was produced (slide count, key sections)
382
+ - Any chart-placeholder slides that need manual chart drops
383
+
384
+ If the deck originated from an existing Shards project (i.e., the user
385
+ referenced a project path in Step 1), offer:
386
+
387
+ > "Want me to add a 'Presentation produced' note to the source project's
388
+ > `project-specs.md`? Y/N."
389
+
390
+ If yes, append a `## Presentation` block to the source project's specs with
391
+ the slides URL, the deck slug, and today's date. This closes the loop
392
+ between specialist work and stakeholder readout.
393
+
394
+ Skip Knowledge Harvest — Slides sessions don't naturally produce reusable
395
+ patterns. (Fixer also skips harvest for the same reason.)
396
+
397
+ End the session.
398
+
399
+ ---
400
+
401
+ ## Behavioral rules for Slides Mode
402
+
403
+ - Stay as Syn for the entire session. No persona transfer.
404
+ - Open the spec doc on first user response — do not wait for full intake to
405
+ complete before creating `presentations/<deck_slug>/presentation-spec.md`.
406
+ - Append to the spec doc continuously — every step writes to it.
407
+ - Announce specialist consultations. The user should know when you're
408
+ calling a shard, even in this lightweight mode.
409
+ - Gate before MCP writes. Both gates are mandatory unless the corresponding
410
+ step is skipped (Step 4 if no MCP available; Step 7 if no CAUTION items).
411
+ - If polling returns TOO COMPLEX, surface clearly and let the user override —
412
+ don't silently push through.
413
+ - Be honest about scope. If the source material isn't ready to be presented,
414
+ flag it rather than building a polished deck on top of unvalidated work.
415
+ - If the user asks for additional decks in the same session, repeat from
416
+ Step 1. Each deck gets its own intake → outline → review → build → review
417
+ → iterate → wrap cycle, with its own `presentations/<deck_slug>/` directory.