@synapse-research/synapse 0.2.11 → 0.2.13

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 (207) hide show
  1. package/dist/.next/BUILD_ID +1 -1
  2. package/dist/.next/app-build-manifest.json +124 -124
  3. package/dist/.next/app-path-routes-manifest.json +34 -34
  4. package/dist/.next/build-manifest.json +2 -2
  5. package/dist/.next/server/app/(dashboard)/agents/page_client-reference-manifest.js +1 -1
  6. package/dist/.next/server/app/(dashboard)/compute/page_client-reference-manifest.js +1 -1
  7. package/dist/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
  8. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
  9. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
  10. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
  11. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
  12. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-designs/[designUuid]/page_client-reference-manifest.js +1 -1
  13. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-designs/new/page_client-reference-manifest.js +1 -1
  14. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-designs/page_client-reference-manifest.js +1 -1
  15. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-runs/[runUuid]/page_client-reference-manifest.js +1 -1
  16. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-runs/page_client-reference-manifest.js +1 -1
  17. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiments/new/page_client-reference-manifest.js +1 -1
  18. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiments/page_client-reference-manifest.js +1 -1
  19. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/insights/page_client-reference-manifest.js +1 -1
  20. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/page_client-reference-manifest.js +1 -1
  21. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/related-works/page_client-reference-manifest.js +1 -1
  22. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/research-questions/[questionUuid]/page_client-reference-manifest.js +1 -1
  23. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/research-questions/page_client-reference-manifest.js +1 -1
  24. package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/settings/page_client-reference-manifest.js +1 -1
  25. package/dist/.next/server/app/(dashboard)/research-projects/new/page_client-reference-manifest.js +1 -1
  26. package/dist/.next/server/app/(dashboard)/research-projects/page_client-reference-manifest.js +1 -1
  27. package/dist/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  28. package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  29. package/dist/.next/server/app/_not-found.html +1 -1
  30. package/dist/.next/server/app/_not-found.rsc +1 -1
  31. package/dist/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
  32. package/dist/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
  33. package/dist/.next/server/app/admin/companies/new.html +1 -1
  34. package/dist/.next/server/app/admin/companies/new.rsc +1 -1
  35. package/dist/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
  36. package/dist/.next/server/app/admin/companies.html +1 -1
  37. package/dist/.next/server/app/admin/companies.rsc +1 -1
  38. package/dist/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  39. package/dist/.next/server/app/admin.html +1 -1
  40. package/dist/.next/server/app/admin.rsc +1 -1
  41. package/dist/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
  42. package/dist/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
  43. package/dist/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
  44. package/dist/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
  45. package/dist/.next/server/app/api/admin/stats/route_client-reference-manifest.js +1 -1
  46. package/dist/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  47. package/dist/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  48. package/dist/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  49. package/dist/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  50. package/dist/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  51. package/dist/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  52. package/dist/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  53. package/dist/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  54. package/dist/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  55. package/dist/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  56. package/dist/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  57. package/dist/.next/server/app/api/auth/refresh/route_client-reference-manifest.js +1 -1
  58. package/dist/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
  59. package/dist/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  60. package/dist/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  61. package/dist/.next/server/app/api/compute-gpus/[uuid]/release/route_client-reference-manifest.js +1 -1
  62. package/dist/.next/server/app/api/compute-nodes/[uuid]/route_client-reference-manifest.js +1 -1
  63. package/dist/.next/server/app/api/compute-nodes/route_client-reference-manifest.js +1 -1
  64. package/dist/.next/server/app/api/compute-pools/[uuid]/route_client-reference-manifest.js +1 -1
  65. package/dist/.next/server/app/api/compute-pools/route_client-reference-manifest.js +1 -1
  66. package/dist/.next/server/app/api/documents/[uuid]/images/[filename]/route_client-reference-manifest.js +1 -1
  67. package/dist/.next/server/app/api/documents/[uuid]/images/route_client-reference-manifest.js +1 -1
  68. package/dist/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  69. package/dist/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  70. package/dist/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  71. package/dist/.next/server/app/api/experiment-designs/[uuid]/approve/route_client-reference-manifest.js +1 -1
  72. package/dist/.next/server/app/api/experiment-designs/[uuid]/close/route_client-reference-manifest.js +1 -1
  73. package/dist/.next/server/app/api/experiment-designs/[uuid]/reject/route_client-reference-manifest.js +1 -1
  74. package/dist/.next/server/app/api/experiment-designs/[uuid]/route_client-reference-manifest.js +1 -1
  75. package/dist/.next/server/app/api/experiment-runs/[uuid]/claim/route_client-reference-manifest.js +1 -1
  76. package/dist/.next/server/app/api/experiment-runs/[uuid]/dependencies/[dependsOnRunUuid]/route_client-reference-manifest.js +1 -1
  77. package/dist/.next/server/app/api/experiment-runs/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  78. package/dist/.next/server/app/api/experiment-runs/[uuid]/evaluate-criteria/route_client-reference-manifest.js +1 -1
  79. package/dist/.next/server/app/api/experiment-runs/[uuid]/registry/route_client-reference-manifest.js +1 -1
  80. package/dist/.next/server/app/api/experiment-runs/[uuid]/release/route_client-reference-manifest.js +1 -1
  81. package/dist/.next/server/app/api/experiment-runs/[uuid]/route_client-reference-manifest.js +1 -1
  82. package/dist/.next/server/app/api/experiment-runs/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  83. package/dist/.next/server/app/api/experiments/[uuid]/complete/route_client-reference-manifest.js +1 -1
  84. package/dist/.next/server/app/api/experiments/[uuid]/progress/route_client-reference-manifest.js +1 -1
  85. package/dist/.next/server/app/api/experiments/[uuid]/request-plan/route_client-reference-manifest.js +1 -1
  86. package/dist/.next/server/app/api/experiments/[uuid]/reset/route_client-reference-manifest.js +1 -1
  87. package/dist/.next/server/app/api/experiments/[uuid]/review/route.js +1 -1
  88. package/dist/.next/server/app/api/experiments/[uuid]/review/route_client-reference-manifest.js +1 -1
  89. package/dist/.next/server/app/api/experiments/[uuid]/route_client-reference-manifest.js +1 -1
  90. package/dist/.next/server/app/api/experiments/[uuid]/start/route_client-reference-manifest.js +1 -1
  91. package/dist/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  92. package/dist/.next/server/app/api/mcp/route.js +1 -1
  93. package/dist/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  94. package/dist/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  95. package/dist/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  96. package/dist/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  97. package/dist/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  98. package/dist/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  99. package/dist/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  100. package/dist/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  101. package/dist/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  102. package/dist/.next/server/app/api/onboarding/status/route_client-reference-manifest.js +1 -1
  103. package/dist/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  104. package/dist/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  105. package/dist/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  106. package/dist/.next/server/app/api/research-projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  107. package/dist/.next/server/app/api/research-projects/[uuid]/agent-activity/route_client-reference-manifest.js +1 -1
  108. package/dist/.next/server/app/api/research-projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  109. package/dist/.next/server/app/api/research-projects/[uuid]/baselines/route_client-reference-manifest.js +1 -1
  110. package/dist/.next/server/app/api/research-projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  111. package/dist/.next/server/app/api/research-projects/[uuid]/experiment-designs/[designUuid]/validate/route_client-reference-manifest.js +1 -1
  112. package/dist/.next/server/app/api/research-projects/[uuid]/experiment-designs/route_client-reference-manifest.js +1 -1
  113. package/dist/.next/server/app/api/research-projects/[uuid]/experiment-designs/summary/route_client-reference-manifest.js +1 -1
  114. package/dist/.next/server/app/api/research-projects/[uuid]/experiment-runs/dependencies/route_client-reference-manifest.js +1 -1
  115. package/dist/.next/server/app/api/research-projects/[uuid]/experiment-runs/route_client-reference-manifest.js +1 -1
  116. package/dist/.next/server/app/api/research-projects/[uuid]/experiments/route_client-reference-manifest.js +1 -1
  117. package/dist/.next/server/app/api/research-projects/[uuid]/github/branches/route_client-reference-manifest.js +1 -1
  118. package/dist/.next/server/app/api/research-projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  119. package/dist/.next/server/app/api/research-projects/[uuid]/related-works/[workUuid]/route_client-reference-manifest.js +1 -1
  120. package/dist/.next/server/app/api/research-projects/[uuid]/related-works/auto-search/complete/route_client-reference-manifest.js +1 -1
  121. package/dist/.next/server/app/api/research-projects/[uuid]/related-works/auto-search/route_client-reference-manifest.js +1 -1
  122. package/dist/.next/server/app/api/research-projects/[uuid]/related-works/deep-research/complete/route_client-reference-manifest.js +1 -1
  123. package/dist/.next/server/app/api/research-projects/[uuid]/related-works/deep-research/route_client-reference-manifest.js +1 -1
  124. package/dist/.next/server/app/api/research-projects/[uuid]/related-works/route_client-reference-manifest.js +1 -1
  125. package/dist/.next/server/app/api/research-projects/[uuid]/research-questions/route_client-reference-manifest.js +1 -1
  126. package/dist/.next/server/app/api/research-projects/[uuid]/route_client-reference-manifest.js +1 -1
  127. package/dist/.next/server/app/api/research-projects/[uuid]/synthesis/complete/route_client-reference-manifest.js +1 -1
  128. package/dist/.next/server/app/api/research-projects/[uuid]/synthesis/refresh/route_client-reference-manifest.js +1 -1
  129. package/dist/.next/server/app/api/research-projects/[uuid]/synthesis/trigger/route_client-reference-manifest.js +1 -1
  130. package/dist/.next/server/app/api/research-projects/route_client-reference-manifest.js +1 -1
  131. package/dist/.next/server/app/api/research-questions/[uuid]/claim/route_client-reference-manifest.js +1 -1
  132. package/dist/.next/server/app/api/research-questions/[uuid]/move/route_client-reference-manifest.js +1 -1
  133. package/dist/.next/server/app/api/research-questions/[uuid]/release/route_client-reference-manifest.js +1 -1
  134. package/dist/.next/server/app/api/research-questions/[uuid]/review/route_client-reference-manifest.js +1 -1
  135. package/dist/.next/server/app/api/research-questions/[uuid]/route_client-reference-manifest.js +1 -1
  136. package/dist/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  137. package/dist/.next/server/app/api/settings/integrations/route_client-reference-manifest.js +1 -1
  138. package/dist/.next/server/app/api/ssh-config/route_client-reference-manifest.js +1 -1
  139. package/dist/.next/server/app/index.html +1 -1
  140. package/dist/.next/server/app/index.rsc +1 -1
  141. package/dist/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  142. package/dist/.next/server/app/login/admin.html +1 -1
  143. package/dist/.next/server/app/login/admin.rsc +1 -1
  144. package/dist/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  145. package/dist/.next/server/app/login/callback.html +1 -1
  146. package/dist/.next/server/app/login/callback.rsc +1 -1
  147. package/dist/.next/server/app/login/page_client-reference-manifest.js +1 -1
  148. package/dist/.next/server/app/login/silent-refresh/page_client-reference-manifest.js +1 -1
  149. package/dist/.next/server/app/login/silent-refresh.html +1 -1
  150. package/dist/.next/server/app/login/silent-refresh.rsc +1 -1
  151. package/dist/.next/server/app/login.html +1 -1
  152. package/dist/.next/server/app/login.rsc +1 -1
  153. package/dist/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  154. package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
  155. package/dist/.next/server/app/research-projects/new.html +1 -1
  156. package/dist/.next/server/app/research-projects/new.rsc +1 -1
  157. package/dist/.next/server/app/research-projects.html +1 -1
  158. package/dist/.next/server/app/research-projects.rsc +1 -1
  159. package/dist/.next/server/app/settings.html +1 -1
  160. package/dist/.next/server/app/settings.rsc +1 -1
  161. package/dist/.next/server/app-paths-manifest.json +34 -34
  162. package/dist/.next/server/chunks/8499.js +1 -1
  163. package/dist/.next/server/middleware-manifest.json +1 -1
  164. package/dist/.next/server/pages/404.html +1 -1
  165. package/dist/.next/server/pages/500.html +1 -1
  166. package/dist/.next/server/server-reference-manifest.js +1 -1
  167. package/dist/.next/server/server-reference-manifest.json +1 -1
  168. package/package.json +4 -2
  169. package/dist/public/skill/SKILL.md +0 -200
  170. package/dist/public/skill/aris-synapse-sync/SKILL.md +0 -368
  171. package/dist/public/skill/package.json +0 -79
  172. package/dist/public/skill/references/00-common-tools.md +0 -253
  173. package/dist/public/skill/references/01-setup.md +0 -251
  174. package/dist/public/skill/references/02-pm-workflow.md +0 -584
  175. package/dist/public/skill/references/03-developer-workflow.md +0 -325
  176. package/dist/public/skill/references/04-admin-workflow.md +0 -328
  177. package/dist/public/skill/references/06-claude-code-agent-teams.md +0 -233
  178. package/dist/public/synapse-plugin/.claude-plugin/plugin.json +0 -20
  179. package/dist/public/synapse-plugin/.mcp.json +0 -11
  180. package/dist/public/synapse-plugin/bin/on-pre-enter-plan.sh +0 -26
  181. package/dist/public/synapse-plugin/bin/on-pre-exit-plan.sh +0 -22
  182. package/dist/public/synapse-plugin/bin/on-pre-spawn-agent.sh +0 -64
  183. package/dist/public/synapse-plugin/bin/on-session-end.sh +0 -39
  184. package/dist/public/synapse-plugin/bin/on-session-start.sh +0 -283
  185. package/dist/public/synapse-plugin/bin/on-subagent-start.sh +0 -233
  186. package/dist/public/synapse-plugin/bin/on-subagent-stop.sh +0 -80
  187. package/dist/public/synapse-plugin/bin/on-task-completed.sh +0 -66
  188. package/dist/public/synapse-plugin/bin/on-teammate-idle.sh +0 -47
  189. package/dist/public/synapse-plugin/bin/on-user-prompt.sh +0 -57
  190. package/dist/public/synapse-plugin/bin/synapse-api.sh +0 -387
  191. package/dist/public/synapse-plugin/bin/test-syntax.sh +0 -85
  192. package/dist/public/synapse-plugin/hooks/hooks.json +0 -105
  193. package/dist/public/synapse-plugin/skills/autonomy/SKILL.md +0 -140
  194. package/dist/public/synapse-plugin/skills/experiments/SKILL.md +0 -87
  195. package/dist/public/synapse-plugin/skills/research/SKILL.md +0 -58
  196. package/dist/public/synapse-plugin/skills/sessions/SKILL.md +0 -174
  197. package/dist/public/synapse-plugin/skills/setup/SKILL.md +0 -73
  198. package/dist/public/synapse-plugin/skills/synapse/SKILL.md +0 -144
  199. package/dist/public/synapse-plugin/skills/synapse/package.json +0 -49
  200. package/dist/public/synapse-plugin/skills/synapse/references/00-common-tools.md +0 -107
  201. package/dist/public/synapse-plugin/skills/synapse/references/01-setup.md +0 -112
  202. package/dist/public/synapse-plugin/skills/synapse/references/02-research-workflow.md +0 -145
  203. package/dist/public/synapse-plugin/skills/synapse/references/03-experiment-workflow.md +0 -319
  204. package/dist/public/synapse-plugin/skills/synapse/references/04-autonomous-loop.md +0 -223
  205. package/dist/public/synapse-plugin/skills/synapse/references/05-session-sub-agent.md +0 -251
  206. /package/dist/.next/static/{duLVRogIrNQ1Tarxga53z → VlyiqgSt6DSLuCX7rlcKa}/_buildManifest.js +0 -0
  207. /package/dist/.next/static/{duLVRogIrNQ1Tarxga53z → VlyiqgSt6DSLuCX7rlcKa}/_ssgManifest.js +0 -0
@@ -1,319 +0,0 @@
1
- # Experiment Workflow
2
-
3
- This guide covers the current experiment lifecycle: planning or revising experiment specs, executing approved experiments, reporting progress, and saving final reports.
4
-
5
- All execution happens through Synapse MCP tools plus Claude Code's own tools (Bash for remote shells, Task for sub-agent dispatch). The Synapse Claude Code plugin never requires a custom runtime on GPU nodes — remote work is driven over SSH using the access bundle.
6
-
7
- ---
8
-
9
- ## Experiment Lifecycle
10
-
11
- ```text
12
- draft --> pending_review --> pending_start --> in_progress --> completed
13
- ```
14
-
15
- - `draft` — being authored or revised
16
- - `pending_review` — waiting for human review
17
- - `pending_start` — approved and ready for execution
18
- - `in_progress` — actively running
19
- - `completed` — results submitted
20
-
21
- Each experiment card must represent **one independent run**. Do not bundle comparison runs, ablations, or parameter sweeps into a single card — create multiple cards instead.
22
-
23
- ---
24
-
25
- ## Getting Assigned Experiments
26
-
27
- ```text
28
- synapse_get_assigned_experiments()
29
- synapse_get_assigned_experiments({ researchProjectUuid: "..." })
30
- synapse_get_assigned_experiments({ statuses: ["pending_start", "in_progress"] })
31
- ```
32
-
33
- For full details:
34
-
35
- ```text
36
- synapse_get_experiment({ experimentUuid: "..." })
37
- ```
38
-
39
- ---
40
-
41
- ## Foundational First Experiment
42
-
43
- If a project has no completed experiments yet, treat the first experiment as foundational infrastructure, not a normal research run. Bundle three deliverables:
44
-
45
- 1. **Data preparation** — normalize the raw dataset into a single canonical format every future experiment will consume. Script lives under the project's repo (if `synapse_get_repo_access` shows one is configured).
46
- 2. **Baseline** — the simplest reasonable approach, run end-to-end, with metrics recorded via `synapse_submit_experiment_results`. This becomes the reference all future experiments compare against.
47
- 3. **Evaluation script** — a canonical eval harness that future experiments call. Committed alongside data prep.
48
-
49
- If the project has a repo, commit all three onto the base branch (or a per-experiment branch merged back into the base branch). Every subsequent experiment branches from that base so it inherits prep + eval.
50
-
51
- ---
52
-
53
- ## Planning Or Revising An Experiment
54
-
55
- When Synapse asks you to flesh out a quick experiment idea or revise a reviewer-returned experiment:
56
-
57
- ```text
58
- # Mark that you are drafting
59
- synapse_update_experiment_status({
60
- experimentUuid: "...",
61
- status: "draft",
62
- liveStatus: "writing",
63
- liveMessage: "Drafting experiment plan"
64
- })
65
-
66
- # Save the full plan
67
- synapse_update_experiment_plan({
68
- experimentUuid: "...",
69
- title: "Refined title",
70
- description: "## Objective\n\n...",
71
- researchQuestionUuid: "...",
72
- priority: "high"
73
- })
74
-
75
- # Hand it back for review
76
- synapse_update_experiment_status({
77
- experimentUuid: "...",
78
- status: "pending_review"
79
- })
80
- ```
81
-
82
- When revising based on reviewer feedback, read the full comment thread first — feedback is often scattered across multiple comments:
83
-
84
- ```text
85
- synapse_get_comments({
86
- targetType: "experiment",
87
- targetUuid: "..."
88
- })
89
- ```
90
-
91
- Write the plan in the same language as the project description. After revising, reply to the reviewer with `synapse_add_comment` using the exact mention format `@[name](actorType:uuid)`.
92
-
93
- ### Plan content
94
-
95
- A good experiment plan covers:
96
- - **Objective** — the one thing this experiment is trying to learn
97
- - **Methodology** — enough detail that another agent (or sub-agent) could execute it unattended
98
- - **Expected outcomes** — what success and failure look like against the project's evaluation method
99
- - **Implementation steps** — data prep, training/inference, evaluation, analysis
100
- - **Resource requirements** — expected GPU count, wall clock, dataset size
101
-
102
- ---
103
-
104
- ## Creating A New Experiment
105
-
106
- When the user asks you to author a brand-new experiment outside autonomous loop, create it directly:
107
-
108
- ```text
109
- synapse_create_experiment({
110
- researchProjectUuid: "...",
111
- title: "Baseline reproduction with revised tokenizer",
112
- description: "## Objective\n\n...",
113
- researchQuestionUuid: "...",
114
- priority: "high"
115
- })
116
- ```
117
-
118
- Defaults:
119
- - `status = pending_review` for the normal agent-created path
120
- - Use `status: "draft"` if you want to keep refining before sending it to review
121
-
122
- Typical follow-up after creating a draft:
123
-
124
- ```text
125
- synapse_update_experiment_plan({ experimentUuid: "...", description: "## Objective\n\n..." })
126
- synapse_update_experiment_status({ experimentUuid: "...", status: "pending_review" })
127
- ```
128
-
129
- ---
130
-
131
- ## Execution Checklist
132
-
133
- This is the detailed flow for moving an experiment through `in_progress` to `completed`. It assumes the experiment is already `pending_start`.
134
-
135
- 1. **Build an internal todo list** covering: compute reservation, repo setup, data prep, run, monitoring, commit, submission. Keeps complex experiments honest.
136
-
137
- 2. **Inspect available compute**
138
-
139
- ```text
140
- synapse_list_compute_nodes({
141
- researchProjectUuid: "...",
142
- onlyAvailable: true
143
- })
144
- ```
145
-
146
- If the project has a `computePoolUuid`, your reservations must stay inside that pool.
147
-
148
- 3. **Reserve GPUs** — either inline via `synapse_start_experiment({ gpuUuids: [...] })` or explicitly ahead of time:
149
-
150
- ```text
151
- synapse_reserve_gpus({
152
- experimentUuid: "...",
153
- gpuUuids: ["gpu-uuid-1", "gpu-uuid-2"]
154
- })
155
- ```
156
-
157
- 4. **Start the experiment** — moves it to `in_progress` and creates/updates the experiment result document:
158
-
159
- ```text
160
- synapse_start_experiment({
161
- experimentUuid: "...",
162
- workingNotes: "Starting with baseline configuration"
163
- })
164
- ```
165
-
166
- 5. **Fetch SSH access** — never assume a server-local key path exists:
167
-
168
- ```text
169
- synapse_get_node_access_bundle({
170
- experimentUuid: "...",
171
- nodeUuid: "..."
172
- })
173
- ```
174
-
175
- Returns host / user / port and `privateKeyPemBase64`. Decode, write to a local PEM, `chmod 600`, then SSH using the returned host/user/port and the PEM.
176
-
177
- 6. **Check out the repo** — if the project is repo-backed:
178
-
179
- ```text
180
- synapse_get_repo_access({ experimentUuid: "..." })
181
- ```
182
-
183
- Clone on the remote node, then check out the experiment's base branch (or create a per-experiment branch off the base). Subsequent experiments must inherit the base branch's data prep + eval scripts.
184
-
185
- 7. **Run the workload in a persistent remote shell** — use `tmux` (or `screen`) so the session survives disconnects, and run Python with unbuffered output so logs do not stall tool calls:
186
-
187
- ```bash
188
- tmux new -d -s exp-<short> 'cd ~/work && PYTHONUNBUFFERED=1 python -u train.py --config exp.yaml 2>&1 | tee run.log'
189
- ```
190
-
191
- 8. **Monitoring — long runs (>30 min)**: poll from the main agent on a cadence, or set up a cron / periodic job on the remote node that calls back with a progress update. Use `synapse_report_experiment_progress` to push each milestone:
192
-
193
- ```text
194
- synapse_report_experiment_progress({
195
- experimentUuid: "...",
196
- message: "Epoch 15/100, loss: 0.342, val_acc: 87.2%",
197
- phase: "training",
198
- liveStatus: "running"
199
- })
200
- ```
201
-
202
- `liveStatus` values:
203
- - `checking_resources` while probing compute
204
- - `queuing` while waiting for GPUs (status-only, does not create a progress-log row)
205
- - `running` during active execution
206
-
207
- `phase` labels: `setup`, `training`, `evaluation`, `analysis`.
208
-
209
- 9. **Monitoring — short runs** (a few minutes): skip the cron, report progress inline at setup / mid-training / evaluation / analysis transitions.
210
-
211
- 10. **Commit code and artifacts** — commit configs, scripts, and meaningful artifacts to the experiment branch (or base branch) and capture the commit SHA to include in the submission.
212
-
213
- 11. **Submit results**
214
-
215
- ```text
216
- synapse_submit_experiment_results({
217
- experimentUuid: "...",
218
- outcome: "success",
219
- experimentResults: {
220
- "accuracy": 0.923,
221
- "summary": "Ablation outperformed baseline",
222
- "branch": "exp-ablation-3",
223
- "commit": "abc1234"
224
- }
225
- })
226
- ```
227
-
228
- `outcome` is optional, typically `success`, `failure`, or `inconclusive`. Submitting moves the experiment to `completed`, refreshes the experiment result document, and triggers the project synthesis refresh.
229
-
230
- 12. **Save the dedicated experiment report** — when the flow asks for a full writeup:
231
-
232
- ```text
233
- synapse_save_experiment_report({
234
- experimentUuid: "...",
235
- title: "Experiment Report: Baseline vs Ablation",
236
- content: "# Objective\n\n..."
237
- })
238
- ```
239
-
240
- Use python + a plotting library to generate charts and embed them in the markdown where they help. Do **not** post the report as a comment — always use `synapse_save_experiment_report` so the dedicated result document exists.
241
-
242
- 13. **Match the project description's language** — if the project brief is in Chinese, write plan, progress messages, and report in Chinese.
243
-
244
- ---
245
-
246
- ## Handling Failures And Inconclusive Runs
247
-
248
- A failed or inconclusive experiment is still a valid submission — it is data. Do not leave it stuck in `in_progress`:
249
-
250
- ```text
251
- synapse_submit_experiment_results({
252
- experimentUuid: "...",
253
- outcome: "failure",
254
- experimentResults: {
255
- "error": "OOM at batch size 32 on 2x L40S",
256
- "completedEpochs": 3,
257
- "lastLoss": 1.82,
258
- "nextSteps": "Retry with gradient accumulation or batch 16"
259
- }
260
- })
261
- ```
262
-
263
- Follow up with a comment explaining the failure so the reviewer can decide whether to revise and retry:
264
-
265
- ```text
266
- synapse_add_comment({
267
- targetType: "experiment",
268
- targetUuid: "...",
269
- content: "Failed due to OOM. Proposing a revised plan..."
270
- })
271
- ```
272
-
273
- ---
274
-
275
- ## Reviving A Stuck Experiment
276
-
277
- An experiment stuck in `in_progress` (sub-agent crashed, SSH died, user killed the run) can be unblocked in two ways:
278
-
279
- 1. **Resume** — respawn a sub-agent with the same experiment UUID. The `SubagentStart` hook reuses the existing Synapse session if still active; otherwise it reopens the closed one. The sub-agent re-fetches node access and continues.
280
- 2. **Close out** — if the run cannot be resumed, submit a failure:
281
-
282
- ```text
283
- synapse_submit_experiment_results({
284
- experimentUuid: "...",
285
- outcome: "failure",
286
- experimentResults: { "error": "Sub-agent lost remote session, no checkpoint" }
287
- })
288
- ```
289
-
290
- ---
291
-
292
- ## Handling Rejection During Review
293
-
294
- When a reviewer sends `pending_review` back to `draft`:
295
-
296
- 1. Read the full comment thread — feedback may span multiple comments and a re-read of the plan.
297
- 2. Flip to `draft` with `liveStatus: "writing"`.
298
- 3. Revise title / description / researchQuestionUuid / priority via `synapse_update_experiment_plan`.
299
- 4. Move it back with `synapse_update_experiment_status({ status: "pending_review" })`.
300
- 5. `synapse_add_comment` on the experiment with `@[reviewerName](actorType:uuid)` so the reviewer sees the update.
301
-
302
- ---
303
-
304
- ## Typical Execution Flow (Short Form)
305
-
306
- 1. `synapse_checkin()` — see assigned experiments
307
- 2. `synapse_get_experiment()` — understand the task
308
- 3. `synapse_create_experiment()` — only if authoring new
309
- 4. If drafting or revising: `synapse_update_experiment_status` + `synapse_update_experiment_plan`
310
- 5. `synapse_list_compute_nodes()` — inspect availability
311
- 6. `synapse_start_experiment()` with optional inline / explicit `synapse_reserve_gpus()`
312
- 7. `synapse_get_node_access_bundle()` — write PEM locally, chmod 600, SSH
313
- 8. Run workload in tmux + unbuffered python
314
- 9. `synapse_report_experiment_progress()` at milestones
315
- 10. `synapse_submit_experiment_results()` — success, failure, or inconclusive
316
- 11. `synapse_save_experiment_report()` if a dedicated report is required
317
- 12. `synapse_add_comment()` for durable findings and mention the reviewer
318
-
319
- For parallel multi-experiment dispatch (main agent orchestrates, sub-agents execute), see **[05-session-sub-agent.md](05-session-sub-agent.md)**.
@@ -1,223 +0,0 @@
1
- # Autonomous Loop (Claude Code-Client)
2
-
3
- This guide covers the **CC-client autonomous loop**: the main Claude Code agent drives research on a project without waiting for per-step human instruction. It proposes experiments, dispatches sub-agents to execute them, monitors progress, synthesizes results, and iterates.
4
-
5
- The CC-client loop runs entirely inside the current Claude Code session. It does not depend on the server-side `ResearchProject.autonomousLoopEnabled` flag — that flag is for realtime-transport agents. A user opens Claude Code, says "enable autonomous loop on project X", and the main agent takes over.
6
-
7
- ---
8
-
9
- ## Architecture
10
-
11
- ```
12
- Main CC agent (orchestrator)
13
- ├── synapse_get_project_full_context (each iteration)
14
- ├── synapse_get_assigned_experiments (each iteration)
15
- ├── synapse_list_compute_nodes (before proposing)
16
- ├── Task() → sub-agent → executes experiment
17
- ├── Task() → sub-agent → executes experiment (parallel)
18
- ├── synapse_save_project_synthesis (when new results exist)
19
- ├── synapse_propose_experiment (when queue empty)
20
- └── synapse_add_comment (audit trail)
21
- ```
22
-
23
- - The main agent **never** runs training itself. It monitors and proposes.
24
- - Sub-agents spawned via the Task tool are auto-enrolled by the `SubagentStart` hook: session created, UUID injected, execution workflow attached.
25
- - State persists in Synapse (experiments, results, synthesis document). No extra local state is required.
26
-
27
- ---
28
-
29
- ## Modes
30
-
31
- ### Full Auto (default)
32
-
33
- - Proposals created as `pending_start` and immediately dispatched to sub-agents.
34
- - No human approval between iterations.
35
- - User can stop at any time by interrupting the session or saying "stop autonomous loop".
36
-
37
- ### Review
38
-
39
- - Proposals created as `pending_review`.
40
- - The main agent pauses until a human approves, then returns to the loop.
41
- - Use when the user wants a sanity check on each proposed experiment.
42
-
43
- Choose the mode at loop start. Default is full auto unless the user explicitly asks for review.
44
-
45
- ---
46
-
47
- ## Before Starting
48
-
49
- 1. `synapse_checkin()` — refresh identity, roles, assignments.
50
- 2. `synapse_get_research_project({ researchProjectUuid })` — confirm the target project and check its `autonomousLoopEnabled` flag.
51
- 3. If `autonomousLoopEnabled = true` and a realtime loop agent is already assigned, warn the user: running the CC-client loop against the same project will double-dispatch proposals. Ask the user to either disable the server-side loop or run the CC loop on a different project.
52
- 4. `synapse_get_project_full_context({ researchProjectUuid })` — load the brief, evaluation methods, past experiments, and latest synthesis.
53
- 5. If the project has no completed experiments, do not enter the loop cold. Offer the foundational path first (see **[03-experiment-workflow.md](03-experiment-workflow.md)** — Foundational First Experiment). Once the baseline exists, the loop has something to build on.
54
- 6. Collect budgets from the user: `maxIterations`, `maxExperimentsProposed`, optional `maxComputeHours`.
55
-
56
- ---
57
-
58
- ## Iteration Procedure
59
-
60
- Each iteration runs the same five steps:
61
-
62
- ### Step 1: Refresh state
63
-
64
- ```text
65
- synapse_get_project_full_context({ researchProjectUuid: "..." })
66
- synapse_get_assigned_experiments({
67
- researchProjectUuid: "...",
68
- statuses: ["pending_start", "in_progress"]
69
- })
70
- ```
71
-
72
- ### Step 2: Decide what this iteration does
73
-
74
- Priority order:
75
-
76
- - **Monitor** — if any experiment is `in_progress`, do not propose. Poll `synapse_get_experiment` for each, write a short progress note, and yield.
77
- - **Dispatch** — if any experiment is `pending_start` and mode is `full_auto`, spawn a Task sub-agent per experiment (see Step 3). Do not wait for them to finish — sub-agents run in parallel.
78
- - **Synthesize** — if the queue is empty and new completed experiments exist, read the current `project_synthesis` document with `synapse_get_documents({ type: "project_synthesis" })` + `synapse_get_document`. Update it with `synapse_save_project_synthesis` only if the new evidence is not already covered.
79
- - **Propose** — if the queue is empty and synthesis is current, call `synapse_propose_experiment`. One independent run per proposal — split comparisons, ablations, and parameter sweeps into separate proposals.
80
-
81
- ### Step 3: Dispatch sub-agents for `pending_start` experiments
82
-
83
- ```text
84
- Task({
85
- subagent_type: "general-purpose",
86
- name: "exp-<short-id>",
87
- prompt: "Your Synapse experiment UUID: <experiment-uuid>. Execute the experiment end to end following the experiments skill."
88
- })
89
- ```
90
-
91
- The `SubagentStart` hook automatically creates/reuses a Synapse session, injects the session UUID, and includes the execution workflow. The main agent does not call `synapse_create_session`.
92
-
93
- Dispatch all `pending_start` experiments concurrently if compute allows. Let the sub-agents do the work — the main agent only tracks them via `synapse_get_assigned_experiments` and `synapse_get_experiment` on subsequent iterations.
94
-
95
- ### Step 4: Respect compute reality
96
-
97
- Before proposing new experiments:
98
-
99
- ```text
100
- synapse_list_compute_nodes({
101
- researchProjectUuid: "...",
102
- onlyAvailable: true
103
- })
104
- ```
105
-
106
- Do not over-propose concurrent experiments beyond what free GPUs can accommodate. If the project has a `computePoolUuid`, all proposals must fit within that pool.
107
-
108
- ### Step 5: Log and check stop conditions
109
-
110
- Leave an audit trail for the human:
111
-
112
- ```text
113
- synapse_add_comment({
114
- targetType: "research_project",
115
- targetUuid: "...",
116
- content: "Iteration 5 — dispatched exp <uuid1>, <uuid2>; no proposal (queue saturated)."
117
- })
118
- ```
119
-
120
- Then evaluate stop conditions (next section). If none trigger, continue to the next iteration.
121
-
122
- ---
123
-
124
- ## Writing A Proposal
125
-
126
- `synapse_propose_experiment` creates a new experiment card. A good proposal includes:
127
-
128
- - **Motivation** — what prior result or gap this addresses
129
- - **Hypothesis** — what you expect to learn
130
- - **Method** — enough detail that a sub-agent can execute without further prompting
131
- - **Success criteria** — how the result will be judged against the project's evaluation method
132
- - **Compute fit** — realistic given current availability
133
-
134
- ```text
135
- synapse_propose_experiment({
136
- researchProjectUuid: "...",
137
- title: "Ablation: remove cross-attention from layer 6",
138
- description: "## Motivation\n\nExperiment <uuid> showed..."
139
- })
140
- ```
141
-
142
- In full auto mode the resulting experiment lands as `pending_start` and is auto-assigned back to the loop agent for execution on the next iteration. In review mode it lands as `pending_review`.
143
-
144
- **One independent run per proposal.** Do not bundle comparisons, ablations, or parameter sweeps into one card — create multiple proposals instead.
145
-
146
- ---
147
-
148
- ## Stop Conditions
149
-
150
- Exit the loop cleanly when any of the following hold:
151
-
152
- - `maxIterations` reached
153
- - `maxExperimentsProposed` reached
154
- - `maxComputeHours` consumed across loop-dispatched experiments
155
- - synthesis unchanged across K consecutive iterations (no-progress signal)
156
- - all research questions are `completed` and no promising direction remains
157
- - compute pool exhausted and no experiment is making forward progress
158
- - user interrupts or says "stop"
159
-
160
- On exit, summarize for the user:
161
-
162
- - experiments dispatched and their outcomes
163
- - whether the synthesis changed materially
164
- - open questions and recommended next steps the human should consider
165
-
166
- ---
167
-
168
- ## Mutual Exclusion With The Server-Side Loop
169
-
170
- The server-side autonomous loop (`autonomousLoopEnabled`) is designed for realtime-transport agents and dispatches proposals through a different path than the CC-client loop. Running both against the same project will cause double-dispatch.
171
-
172
- Before entering the CC-client loop:
173
-
174
- - If `autonomousLoopEnabled = true` → warn the user, do not start.
175
- - If the user insists, ask them to disable the server-side loop first, or use a different project.
176
-
177
- Do not try to take over the server-side flag from inside Claude Code.
178
-
179
- ---
180
-
181
- ## Compact End-to-End Example
182
-
183
- ```text
184
- # Turn 1 — enter loop
185
- synapse_checkin()
186
- synapse_get_research_project({ researchProjectUuid }) # check flag
187
- synapse_get_project_full_context({ researchProjectUuid })
188
-
189
- # Iteration 1
190
- synapse_get_assigned_experiments({ researchProjectUuid, statuses: ["pending_start", "in_progress"] })
191
- # queue empty, no new results
192
- synapse_list_compute_nodes({ researchProjectUuid, onlyAvailable: true })
193
- synapse_propose_experiment({ researchProjectUuid, title, description })
194
- synapse_add_comment({ targetType: "research_project", targetUuid, content: "Iter 1 — proposed <title>" })
195
-
196
- # Iteration 2 (same turn or next turn)
197
- synapse_get_assigned_experiments(...) # one pending_start now
198
- Task({ name: "exp-ablation-1", prompt: "Your Synapse experiment UUID: <uuid>. Execute end to end." })
199
- synapse_add_comment({ ..., content: "Iter 2 — dispatched exp <uuid>" })
200
-
201
- # Iteration 3
202
- synapse_get_assigned_experiments(...) # in_progress
203
- # monitor only, no proposal
204
-
205
- # Iteration 4
206
- synapse_get_assigned_experiments(...) # completed
207
- synapse_get_documents({ researchProjectUuid, type: "project_synthesis" })
208
- synapse_save_project_synthesis({ researchProjectUuid, title, content })
209
- # queue empty again → next propose
210
-
211
- # ...until a stop condition fires
212
- ```
213
-
214
- ---
215
-
216
- ## Tips
217
-
218
- - Do not re-propose an experiment that has already completed. Always check `synapse_get_project_full_context` for prior work first.
219
- - Build on failures — an `outcome: "failure"` experiment is signal, not noise.
220
- - Stay aligned with the project's research questions and evaluation method.
221
- - Proposals should be specific enough that a sub-agent can execute them unattended.
222
- - Use the compute availability summary to keep proposals realistic.
223
- - Leave a comment on the project each iteration — it is the user's only visible log when the loop runs for hours.