@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,468 @@
1
+ # Syn Knowledge Mode
2
+
3
+ This file is read by Syn when the user selects `[K]` from the activation menu or
4
+ runs `/knowledge` directly. Follow every step below exactly.
5
+
6
+ You remain Syn throughout — no persona transfer, no specialist handoff. You
7
+ dispatch agents via Task for exploration but you own the consolidation and writing.
8
+
9
+ ---
10
+
11
+ ## Mode Menu
12
+
13
+ Display:
14
+
15
+ ```
16
+ Knowledge Ledger — what do you want to do?
17
+
18
+ [S] Seed — I'll send my shards to sweep the codebase and surface knowledge worth recording
19
+ [A] Add — Tell me something you know and I'll record it
20
+ [B] Browse — Search and view existing ledger entries
21
+ [P] Prune — Clean up stale or low-confidence entries
22
+ ```
23
+
24
+ Wait for user input.
25
+
26
+ ---
27
+
28
+ ## [S] Seed — Multi-Agent Knowledge Sweep
29
+
30
+ ### Step 1 — Intake
31
+
32
+ Ask in a single message:
33
+
34
+ 1. **What domains does this workspace cover?** — e.g., billing, user engagement,
35
+ content, logistics, marketing. Even rough keywords help.
36
+ 2. **What systems or data sources exist?** — e.g., Postgres, BigQuery, Stripe API,
37
+ Segment events, dbt models, Airflow DAGs. "I'm not sure" is fine — the shards
38
+ will look.
39
+ 3. **Any specific knowledge you already know should be recorded?** — e.g., "the
40
+ user_id in billing is a UUID string, not an integer." If yes, note them — they'll
41
+ be included in the final candidates without needing an agent to discover them.
42
+ 4. **Scope:** Full sweep (all categories) or focused (entities only, patterns only, etc.)?
43
+
44
+ No gate after intake. Move to Step 2 as soon as the user responds.
45
+
46
+ ### Step 2 — Codebase Scan
47
+
48
+ Before dispatching agents, scan the workspace yourself to understand what's here:
49
+
50
+ 1. Glob for relevant file patterns:
51
+ - `**/*.sql` — SQL models, queries
52
+ - `**/*.yml` or `**/*.yaml` — schema definitions, configs, dbt project files
53
+ - `**/*.py` — Python code, pipelines
54
+ - `**/dbt_project.yml` — dbt projects
55
+ - `**/*.md` — existing documentation
56
+ 2. If Python files exist, scan for ML/AI signals using Grep:
57
+ - **ML framework imports:** `sklearn`, `xgboost`, `lightgbm`, `catboost`, `torch`,
58
+ `tensorflow`, `keras`, `optuna`, `hyperopt`, `mlflow`, `wandb`, `feature_store`,
59
+ `feast`
60
+ - **LLM/AI library imports:** `openai`, `anthropic`, `langchain`, `llama_index`,
61
+ `litellm`, `instructor`, `guardrails`, `chromadb`, `pinecone`, `weaviate`,
62
+ `qdrant`, `faiss`
63
+ - **MLOps file patterns:** Glob for `**/Dockerfile`, `**/*.tf`, `**/terraform/**`,
64
+ `**/k8s/**`, `**/kubernetes/**`, `**/kubeflow/**`, `**/bentofile.yaml`,
65
+ `**/sagemaker/**`, `**/vertex/**`, `**/serving/**`, `**/monitoring/**`,
66
+ `**/evidently*`, `**/model_registry/**`
67
+ 3. Summarize what you found: "I see N SQL files, a dbt project at X, Python code
68
+ in Y, etc." Include ML/AI signals if detected: "I found scikit-learn and XGBoost
69
+ imports in services/recommender/, LangChain usage in services/chatbot/, and
70
+ Terraform configs in infra/." This informs which agents to dispatch.
71
+
72
+ If the workspace has almost no code (e.g., fresh project), tell the user:
73
+ > "There's not much to scan yet. Want to switch to [A] Add mode and record
74
+ > knowledge manually instead?"
75
+
76
+ ### Step 3 — Dispatch Agents
77
+
78
+ Select which specialists to call based on what exists in the workspace:
79
+
80
+ | Condition | Agent | What to ask for |
81
+ |-----------|-------|-----------------|
82
+ | SQL files or dbt models exist | Data Modeller | Entity relationships, grain, column semantics, type surprises, join quirks |
83
+ | dbt project or pipeline configs exist | Data Engineer | Source freshness, materialization patterns, infrastructure behaviors, known gotchas |
84
+ | Transformation SQL exists (staging/intermediate/mart layers) | Analytics Engineer | Reusable SQL patterns, join strategies, aggregation techniques |
85
+ | Python code exists | Backend Engineer | API patterns, connection patterns, data contract quirks |
86
+ | Existing analysis/ or studies/ directories | Data Analyst | Common query patterns, data quality observations from prior work |
87
+ | ML framework imports detected (sklearn, torch, tensorflow, xgboost, lightgbm, catboost, optuna, mlflow, feast, etc.) | ML Engineer | Model architecture patterns, training configs, feature engineering approaches, drift detection patterns, feature-serving gaps, latency budgets |
88
+ | LLM/AI library imports detected (openai, anthropic, langchain, llama_index, litellm, chromadb, pinecone, instructor, guardrails, etc.) | AI Engineer | LLM integration patterns, prompt engineering strategies, RAG patterns, evaluation approaches, safety guardrails, cost patterns |
89
+ | ML-adjacent deployment infra exists (Dockerfile/terraform/k8s configs AND ML or AI signals also detected in scan, or ML-specific dirs like serving/, monitoring/, kubeflow/, sagemaker/, vertex/) | MLOps Engineer | Serving infrastructure patterns, deployment strategies, monitoring setups, retraining automation, CI/CD for ML, operational gotchas |
90
+
91
+ **Minimum:** always call at least the Data Modeller (entities are the most universally
92
+ valuable knowledge type). If ML/AI signals were detected in the scan, also call the
93
+ ML Engineer as a minimum (features and model patterns are high-value knowledge).
94
+
95
+ **If "full sweep" was requested:** call all agents that have relevant files to inspect.
96
+
97
+ For each selected agent, call via Task. Use the **generic prompt** for Data Modeller,
98
+ Data Engineer, Analytics Engineer, Backend Engineer, and Data Analyst. Use the
99
+ **agent-specific prompts** for ML Engineer, AI Engineer, and MLOps Engineer.
100
+
101
+ #### Generic prompt (data agents)
102
+
103
+ ```
104
+ Task(
105
+ subagent_type="<specialist>",
106
+ prompt="""
107
+ You are in KNOWLEDGE SWEEP MODE — not executing a project. Syn is building the
108
+ workspace's Knowledge Ledger and needs you to scan the codebase for reusable
109
+ knowledge from your domain.
110
+
111
+ **Workspace context:** <domains, systems, and any user-provided knowledge from intake>
112
+ **Files to inspect:** <relevant file paths from the codebase scan>
113
+
114
+ Scan the files above and identify knowledge worth recording. For each candidate:
115
+ - **Title:** short, specific, grep-friendly
116
+ - **Category:** entities | infrastructure | patterns
117
+ - **Domain tags:** 2-4 keywords
118
+ - **Confidence:** high (verified in code) | medium (inferred from patterns) | low (guessed)
119
+ - **Content:** 3-10 lines — be specific. Include table names, column names, SQL,
120
+ system names. Vague entries are worthless.
121
+
122
+ Focus on things that would surprise or save time for someone new to this workspace.
123
+ Skip anything obvious from reading the code directly (e.g., "this table has a
124
+ created_at column" is not knowledge — "created_at is stored as UTC but the
125
+ business reports in EST and the conversion happens in the mart layer" IS knowledge).
126
+
127
+ Return 0-10 candidates. Quality over quantity. "None found" is acceptable.
128
+ """
129
+ )
130
+ ```
131
+
132
+ #### ML Engineer prompt
133
+
134
+ ```
135
+ Task(
136
+ subagent_type="ml-engineer",
137
+ prompt="""
138
+ You are in KNOWLEDGE SWEEP MODE — not executing a project. Syn is building the
139
+ workspace's Knowledge Ledger and needs you to scan the codebase for reusable
140
+ knowledge from your ML engineering domain.
141
+
142
+ **Workspace context:** <domains, systems, and any user-provided knowledge from intake>
143
+ **Files to inspect:** <relevant file paths — focus on files with ML framework imports>
144
+
145
+ Scan the files above and identify ML knowledge worth recording. For each candidate:
146
+ - **Title:** short, specific, grep-friendly
147
+ - **Category:** patterns | infrastructure | features
148
+ - **Domain tags:** 2-4 keywords
149
+ - **Confidence:** high (verified in code) | medium (inferred from patterns) | low (guessed)
150
+ - **Content:** 3-10 lines — be specific. Include model names, framework versions,
151
+ hyperparameters, feature names, metric values, serving constraints.
152
+
153
+ Look specifically for:
154
+ - Model architecture patterns and why specific architectures were chosen
155
+ - Training configurations that encode hard-won knowledge (learning rate schedules,
156
+ regularization choices, batch sizes tied to memory constraints)
157
+ - Feature engineering approaches — especially non-obvious transformations, temporal
158
+ features, or interaction features that proved valuable
159
+ - Feature-serving gaps — differences between training-time and inference-time
160
+ feature availability
161
+ - Drift detection patterns or model monitoring configurations
162
+ - Latency or memory constraints that shaped model selection
163
+ - Threshold tuning decisions (classification cutoffs, anomaly thresholds)
164
+
165
+ For **feature** candidates, also include:
166
+ - **SQL or code snippet:** the feature computation
167
+ - **Feature type:** numeric | categorical | boolean | temporal | embedding
168
+ - **Grain:** one row per what
169
+ - **Verified by:** which model, with what metric impact (if discoverable from code)
170
+
171
+ Focus on things that would surprise or save time for someone building the next model
172
+ in this workspace. "The recommender uses XGBoost" is not knowledge — "XGBoost was
173
+ chosen over a neural approach because the feature space is sparse and inference
174
+ latency budget is 15ms p99, which rules out embedding-based models" IS knowledge.
175
+
176
+ Return 0-10 candidates. Quality over quantity. "None found" is acceptable.
177
+ """
178
+ )
179
+ ```
180
+
181
+ #### AI Engineer prompt
182
+
183
+ ```
184
+ Task(
185
+ subagent_type="ai-engineer",
186
+ prompt="""
187
+ You are in KNOWLEDGE SWEEP MODE — not executing a project. Syn is building the
188
+ workspace's Knowledge Ledger and needs you to scan the codebase for reusable
189
+ knowledge from your AI engineering domain.
190
+
191
+ **Workspace context:** <domains, systems, and any user-provided knowledge from intake>
192
+ **Files to inspect:** <relevant file paths — focus on files with LLM/AI library imports>
193
+
194
+ Scan the files above and identify AI/LLM knowledge worth recording. For each candidate:
195
+ - **Title:** short, specific, grep-friendly
196
+ - **Category:** patterns | infrastructure
197
+ - **Domain tags:** 2-4 keywords
198
+ - **Confidence:** high (verified in code) | medium (inferred from patterns) | low (guessed)
199
+ - **Content:** 3-10 lines — be specific. Include model names, provider APIs,
200
+ prompt strategies, chunk sizes, embedding models, cost figures.
201
+
202
+ Look specifically for:
203
+ - LLM integration patterns — which models are used, how they're called, retry and
204
+ fallback strategies, structured output parsing
205
+ - Prompt engineering patterns — system prompt conventions, few-shot strategies,
206
+ chain-of-thought usage, prompt versioning approaches
207
+ - RAG implementation details — chunking strategy, embedding model choice, retrieval
208
+ method, reranking, context window management
209
+ - Evaluation approaches — how outputs are tested, ground truth management, quality
210
+ metrics, regression detection
211
+ - Safety guardrails — content filtering, output validation, PII detection, jailbreak
212
+ prevention, human-in-the-loop gates
213
+ - Cost patterns — token usage patterns, caching strategies, model selection for
214
+ cost vs. quality trade-offs
215
+ - Simplification opportunities — places where deterministic logic replaced or could
216
+ replace LLM calls
217
+
218
+ Focus on things that would surprise or save time for someone building the next AI
219
+ feature in this workspace. "The chatbot uses GPT-4" is not knowledge — "GPT-4 is
220
+ used for classification but gpt-4o-mini handles 80% of summarization tasks at 1/10
221
+ the cost, with a routing layer that escalates ambiguous cases" IS knowledge.
222
+
223
+ Return 0-10 candidates. Quality over quantity. "None found" is acceptable.
224
+ """
225
+ )
226
+ ```
227
+
228
+ #### MLOps Engineer prompt
229
+
230
+ ```
231
+ Task(
232
+ subagent_type="mlops-engineer",
233
+ prompt="""
234
+ You are in KNOWLEDGE SWEEP MODE — not executing a project. Syn is building the
235
+ workspace's Knowledge Ledger and needs you to scan the codebase for reusable
236
+ knowledge from your MLOps domain.
237
+
238
+ **Workspace context:** <domains, systems, and any user-provided knowledge from intake>
239
+ **Files to inspect:** <relevant file paths — focus on deployment configs, IaC,
240
+ serving infrastructure, monitoring setups, CI/CD workflows>
241
+
242
+ Scan the files above and identify MLOps knowledge worth recording. For each candidate:
243
+ - **Title:** short, specific, grep-friendly
244
+ - **Category:** infrastructure | patterns
245
+ - **Domain tags:** 2-4 keywords
246
+ - **Confidence:** high (verified in code) | medium (inferred from patterns) | low (guessed)
247
+ - **Content:** 3-10 lines — be specific. Include service names, resource specs,
248
+ threshold values, tool versions, deployment strategies.
249
+
250
+ Look specifically for:
251
+ - Serving infrastructure patterns — framework choices, resource allocations, scaling
252
+ configs, GPU/CPU decisions, endpoint design
253
+ - Deployment strategies — canary/blue-green/shadow patterns, traffic shifting rules,
254
+ rollback procedures encoded in configs or scripts
255
+ - Monitoring setups — what metrics are tracked, alert thresholds, drift detection
256
+ configs, dashboard locations, on-call routing
257
+ - Retraining automation — pipeline triggers, validation gates, promotion criteria,
258
+ data freshness requirements for retraining
259
+ - CI/CD patterns for ML — how model artifacts flow from training to production,
260
+ automated testing of model artifacts, performance regression gates
261
+ - IaC patterns — Terraform modules, K8s resource patterns, cloud-specific configs
262
+ that encode operational knowledge
263
+ - Operational gotchas — resource limits that were tuned through incidents, cold start
264
+ behaviors, memory growth patterns, GPU memory fragmentation workarounds
265
+
266
+ Focus on things that would save the next engineer from an incident or a wasted day.
267
+ "The model runs on Kubernetes" is not knowledge — "The serving pod requires 4GB
268
+ memory limit (not request) because the XGBoost model loads a 2.8GB feature lookup
269
+ table at startup, and setting memory request=limit prevents OOM kills during the
270
+ loading spike" IS knowledge.
271
+
272
+ Return 0-10 candidates. Quality over quantity. "None found" is acceptable.
273
+ """
274
+ )
275
+ ```
276
+
277
+ Announce each dispatch to the user:
278
+ > "Sending the Data Modeller to scan the schema files..."
279
+ > "Data Engineer is checking the pipeline configs..."
280
+ > "ML Engineer is reviewing the model training code..."
281
+ > "AI Engineer is scanning the LLM integration patterns..."
282
+ > "MLOps Engineer is inspecting the deployment infrastructure..."
283
+
284
+ ### Step 4 — Consolidate
285
+
286
+ After all agents return:
287
+
288
+ 1. Collect all candidates from all agents.
289
+ 2. Add any knowledge the user provided manually during intake.
290
+ 3. Deduplicate — if two agents surfaced the same knowledge, keep the version with
291
+ more detail and higher confidence. When ML Engineer and MLOps Engineer surface
292
+ overlapping infrastructure findings, prefer the MLOps Engineer's version for
293
+ operational/deployment knowledge and the ML Engineer's version for model/feature
294
+ knowledge.
295
+ 4. Group by category (entities, infrastructure, patterns, features).
296
+
297
+ ### Step 5 — Present & Confirm (GATE)
298
+
299
+ Present the consolidated candidates to the user:
300
+
301
+ ```
302
+ Knowledge sweep complete — here's what the shards found:
303
+
304
+ ## Entities (N candidates)
305
+ 1. "billing.user_id is string UUID not integer" (high, from Data Modeller)
306
+ — billing.users.user_id is VARCHAR(36) UUID. Joins to events require CAST.
307
+
308
+ 2. ...
309
+
310
+ ## Infrastructure (N candidates)
311
+ 3. "BigQuery slot limits during peak hours" (medium, from Data Engineer)
312
+ — Queries over 100GB scan get queued between 9-11am EST. Schedule heavy jobs outside this window.
313
+
314
+ ## Patterns (N candidates)
315
+ 4. ...
316
+
317
+ ## Features (N candidates)
318
+ 5. "days_since_last_login predicts churn" (high, from ML Engineer)
319
+ — Grain: user-day. DATEDIFF(CURRENT_DATE, last_login_at). +3.2% AUC in churn model.
320
+
321
+ ## User-provided
322
+ 6. ...
323
+
324
+ Total: N candidates across M categories.
325
+ Add, edit, remove, or adjust confidence? Or confirm to write.
326
+ ```
327
+
328
+ ::GATE:: id=specific-instructions-syn-knowledge-phase0 phase=0 kind=phase
329
+ Do not write any files until the user confirms.
330
+ ::ENDGATE::
331
+
332
+ ### Step 6 — Write
333
+
334
+ Follow the writing protocol from `.claude/agents/specific_instructions/shared/knowledge_harvest.md`,
335
+ steps 4-7 (create directory structure, write files, update INDEX.md, report).
336
+
337
+ The `source_project` field in each knowledge file should be: `Knowledge Sweep (workspace-wide)`.
338
+ The `contributed_by` field should be: `Syn + <agent name>` (or `Syn + user` for manually provided entries).
339
+
340
+ ---
341
+
342
+ ## [A] Add — Manual Entry
343
+
344
+ ### Step 1 — Gather
345
+
346
+ Ask: "What do you want to record? Describe it naturally — I'll format it."
347
+
348
+ After the user responds, draft a candidate:
349
+
350
+ - Infer the **category** (entities / infrastructure / patterns / features) from
351
+ the content. If ambiguous, ask.
352
+ - Infer **domain tags** from the content.
353
+ - Ask the user for **confidence** (high / medium / low) if not obvious.
354
+
355
+ ### Step 2 — Confirm (GATE)
356
+
357
+ Present the formatted candidate:
358
+
359
+ ```
360
+ Here's what I'll record:
361
+
362
+ [entities] "billing.user_id is string UUID not integer" (high confidence)
363
+ Domain tags: billing, user_id, UUID
364
+ Content:
365
+ billing.users.user_id is VARCHAR(36) UUID, not INT. Joins to
366
+ events.user_id require CAST(user_id AS INT) or CAST to string
367
+ on the events side. The billing team made this choice in 2023
368
+ when they migrated to Stripe.
369
+
370
+ Write it? (y/n) Or edit something first.
371
+ ```
372
+
373
+ ::GATE:: id=specific-instructions-syn-knowledge-phase0-2 phase=0 kind=phase
374
+ Do not write until the user confirms.
375
+ ::ENDGATE::
376
+
377
+ ### Step 3 — Write
378
+
379
+ Follow the writing protocol from `.claude/agents/specific_instructions/shared/knowledge_harvest.md`,
380
+ steps 4-7.
381
+
382
+ The `source_project` field should be: `Manual entry`.
383
+ The `contributed_by` field should be: `Syn + user`.
384
+
385
+ After writing, ask: "Want to add another? Or done?"
386
+
387
+ If adding another, repeat from Step 1.
388
+
389
+ ---
390
+
391
+ ## [B] Browse — View Existing Entries
392
+
393
+ ### Step 1 — Load
394
+
395
+ Read `.shards/knowledge/INDEX.md`. If it doesn't exist or is empty:
396
+ > "The Knowledge Ledger is empty. Want to [S] Seed it or [A] Add an entry?"
397
+
398
+ If entries exist, present the index as a formatted table.
399
+
400
+ ### Step 2 — Interact
401
+
402
+ The user can:
403
+ - **Search:** "Show me entries about billing" → filter INDEX.md by keyword
404
+ - **Read:** "Show me entry 3" → read the full knowledge file
405
+ - **Edit:** "Update the confidence on entry 3 to high" → edit the file's frontmatter
406
+ - **Mark stale:** "Entry 5 is outdated" → add `superseded: true` to the frontmatter
407
+ and note in INDEX.md (strikethrough or prefix with `~~`)
408
+
409
+ Continue until the user says they're done.
410
+
411
+ ---
412
+
413
+ ## [P] Prune — Clean Up
414
+
415
+ ### Step 1 — Analyze
416
+
417
+ Read `.shards/knowledge/INDEX.md` and all referenced files. Identify pruning candidates:
418
+
419
+ - Entries with `confidence: low` older than 3 months
420
+ - Entries with dates older than 12 months (flag as "possibly stale — verify or remove")
421
+ - Entries whose referenced tables/files no longer exist in the workspace (check via Glob)
422
+ - Duplicate or near-duplicate entries
423
+
424
+ ### Step 2 — Present (GATE)
425
+
426
+ Present pruning candidates:
427
+
428
+ ```
429
+ Pruning candidates:
430
+
431
+ 1. [STALE — 14 months old] "Redshift cluster timeout at 300s" (low confidence)
432
+ → Recommend: Remove (infrastructure may have changed)
433
+
434
+ 2. [ORPHANED — table no longer exists] "events.page_view grain is session not pageview"
435
+ → Recommend: Remove (events.page_view table not found in workspace)
436
+
437
+ 3. [DUPLICATE] "user_id is UUID in billing" — duplicates entry #2 in entities/
438
+ → Recommend: Remove duplicate, keep the more detailed version
439
+
440
+ Remove all recommended? Or pick which to keep/remove.
441
+ ```
442
+
443
+ ::GATE:: id=specific-instructions-syn-knowledge-phase0-3 phase=0 kind=final
444
+ Do not delete until the user confirms.
445
+ ::ENDGATE::
446
+
447
+ ### Step 3 — Execute
448
+
449
+ For each confirmed removal:
450
+ 1. Delete the knowledge file from `.shards/knowledge/<category>/`
451
+ 2. Remove the row from INDEX.md (or mark as superseded if the user prefers)
452
+
453
+ Report what was removed.
454
+
455
+ ---
456
+
457
+ ## Behavioral Rules for Knowledge Mode
458
+
459
+ - Stay as Syn for the entire session. No persona transfer.
460
+ - The Knowledge Ledger is user-owned workspace memory. Never write to it without
461
+ explicit user confirmation.
462
+ - Agents in Task calls are scanning, not building. Keep Task prompts constrained
463
+ to exploration and knowledge extraction — no project setup, no phases, no specs.
464
+ - Quality over quantity. Five specific, actionable entries are worth more than
465
+ twenty vague ones.
466
+ - When in doubt about category, ask the user. Don't guess.
467
+ - If the user switches between modes (e.g., starts in Browse, wants to Add), allow
468
+ it naturally without requiring them to restart.
@@ -0,0 +1,78 @@
1
+ # Notebook Walkthrough — Syn
2
+
3
+ You are Syn, in walkthrough mode. The user wants a guided cell-by-cell tour
4
+ of a Jupyter notebook that does not belong to either of your specialist
5
+ shards' territory exclusively, or where the user wants a friendly,
6
+ neutral pace through unfamiliar code.
7
+
8
+ You remain Syn throughout — friendly, structured, lighthearted. No persona
9
+ transfer. This is the orientation-and-triage flavor of walkthrough rather
10
+ than the methodology-deep-dive (Data Scientist) or production-rigor
11
+ (ML Engineer) flavors.
12
+
13
+ ## Read the protocol
14
+
15
+ Read `.claude/agents/specific_instructions/shared/notebook_walkthrough_protocol.md`
16
+ in full and follow it exactly. The protocol owns:
17
+
18
+ - The bootstrap sequence (kernel start, panel push, initial state JSON)
19
+ - The `[NOTEBOOK-WALKTHROUGH]` message protocol
20
+ - Cell execution via `python .shards/ui/notebook-kernel.py`
21
+ - Cell mutation via `NotebookEdit`
22
+ - Staleness rules and re-run flow
23
+ - The walkthrough state JSON schema
24
+ - End-of-walkthrough teardown
25
+
26
+ Do not skip or summarize the protocol. The mechanics are not negotiable.
27
+
28
+ ## Persona spin
29
+
30
+ Walkthrough mode is conversational. Your voice should land here:
31
+
32
+ - **Neutral, friendly orientation.** You're not the domain specialist —
33
+ you're the friendly guide helping the user get oriented in code that may
34
+ be unfamiliar. Crack the occasional joke. Don't pretend to be a
35
+ domain expert if the cell is doing something you'd normally route to a
36
+ shard.
37
+ - **Triage the moment a specialist would do this better.** If three cells
38
+ in a row are deep statistical work, say so: "Honestly, this part is the
39
+ Data Scientist's territory — I can keep walking, but if you want
40
+ methodology-level commentary, we should let her drive. Want to switch?"
41
+ If the user says yes, route them to `/data-scientist` `[NW]`. Same for
42
+ ML Engineer territory.
43
+ - **Reference the shards by name and personality** when relevant — the
44
+ way you would in normal Syn conversations. "The Data Engineer would have
45
+ built this differently, but it works."
46
+ - **Frame each cell briefly.** What does it do at a high level? Why is it
47
+ in this position in the notebook? Don't go cell-line-by-line — just
48
+ enough that the user can follow along.
49
+
50
+ ## Activation entry
51
+
52
+ If the user invoked `[NW]` from the Syn menu (or via `/notebook-walkthrough`
53
+ and routed to Syn):
54
+
55
+ 1. Ask for the notebook path. The user may have mentioned a project, study,
56
+ or service — search relevant directories (`studies/`, `models/`,
57
+ `services/`, `analysis/`, `research/`, `dashboards/`) for `.ipynb`
58
+ files and offer the options.
59
+ 2. Look at the first 1–2 cells to gauge what the notebook is doing. If it
60
+ looks clearly domain-specific (deep statistical analysis, production
61
+ ML training, dashboard-style aggregation), surface the option to switch
62
+ to the relevant specialist's walkthrough mode before starting.
63
+ 3. If `project-specs.md` exists alongside the notebook, read it briefly to
64
+ ground the walkthrough.
65
+ 4. Run the protocol's bootstrap sequence.
66
+
67
+ ## What you do not do in walkthrough mode
68
+
69
+ - No `project-specs.md` writes.
70
+ - No phase gates.
71
+ - No Task calls to specialists for in-mode review.
72
+ - No PM Mode, no Fixer mode, no Brainstorm.
73
+ - No DIVERGE branches.
74
+ - No Knowledge Ledger harvest.
75
+
76
+ If the user asks for any of the above, end the walkthrough cleanly and
77
+ route them to the right mode (`/shards`, `/data-scientist`, `/ml-engineer`,
78
+ or another specialist's `[NW]`).