@synapse-research/synapse 0.2.12 → 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.
- package/dist/.next/BUILD_ID +1 -1
- package/dist/.next/app-build-manifest.json +113 -113
- package/dist/.next/app-path-routes-manifest.json +27 -27
- package/dist/.next/build-manifest.json +2 -2
- package/dist/.next/prerender-manifest.json +6 -6
- package/dist/.next/server/app/(dashboard)/agents/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/compute/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-designs/[designUuid]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-designs/new/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-designs/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-runs/[runUuid]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiment-runs/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiments/new/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/experiments/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/insights/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/related-works/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/research-questions/[questionUuid]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/research-questions/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/[uuid]/settings/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/new/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/research-projects/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found.html +1 -1
- package/dist/.next/server/app/_not-found.rsc +1 -1
- package/dist/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/admin/companies/new.html +1 -1
- package/dist/.next/server/app/admin/companies/new.rsc +1 -1
- package/dist/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/admin/companies.html +1 -1
- package/dist/.next/server/app/admin/companies.rsc +1 -1
- package/dist/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/admin.html +1 -1
- package/dist/.next/server/app/admin.rsc +1 -1
- package/dist/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/admin/stats/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/refresh/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/compute-gpus/[uuid]/release/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/compute-nodes/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/compute-nodes/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/compute-pools/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/compute-pools/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/documents/[uuid]/images/[filename]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/documents/[uuid]/images/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-designs/[uuid]/approve/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-designs/[uuid]/close/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-designs/[uuid]/reject/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-designs/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/claim/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/dependencies/[dependsOnRunUuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/evaluate-criteria/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/registry/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/release/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiment-runs/[uuid]/sessions/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/complete/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/progress/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/request-plan/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/reset/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/review/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/experiments/[uuid]/start/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/onboarding/status/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/agent-activity/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/available/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/baselines/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-designs/[designUuid]/validate/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-designs/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-designs/summary/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-runs/dependencies/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiment-runs/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/experiments/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/github/branches/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/group/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/related-works/[workUuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/related-works/auto-search/complete/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/related-works/auto-search/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/related-works/deep-research/complete/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/related-works/deep-research/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/related-works/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/research-questions/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/synthesis/complete/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/synthesis/refresh/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/[uuid]/synthesis/trigger/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-projects/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-questions/[uuid]/claim/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-questions/[uuid]/move/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-questions/[uuid]/release/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-questions/[uuid]/review/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/research-questions/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/settings/integrations/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/ssh-config/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/index.html +1 -1
- package/dist/.next/server/app/index.rsc +1 -1
- package/dist/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/login/admin.html +1 -1
- package/dist/.next/server/app/login/admin.rsc +1 -1
- package/dist/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/login/callback.html +1 -1
- package/dist/.next/server/app/login/callback.rsc +1 -1
- package/dist/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/login/silent-refresh/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/login/silent-refresh.html +1 -1
- package/dist/.next/server/app/login/silent-refresh.rsc +1 -1
- package/dist/.next/server/app/login.html +1 -1
- package/dist/.next/server/app/login.rsc +1 -1
- package/dist/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/research-projects/new.html +1 -1
- package/dist/.next/server/app/research-projects/new.rsc +1 -1
- package/dist/.next/server/app/research-projects.html +1 -1
- package/dist/.next/server/app/research-projects.rsc +1 -1
- package/dist/.next/server/app/settings.html +1 -1
- package/dist/.next/server/app/settings.rsc +1 -1
- package/dist/.next/server/app-paths-manifest.json +27 -27
- package/dist/.next/server/middleware-manifest.json +1 -1
- package/dist/.next/server/pages/404.html +1 -1
- package/dist/.next/server/pages/500.html +1 -1
- package/dist/.next/server/pages-manifest.json +1 -1
- package/package.json +4 -2
- package/dist/public/skill/SKILL.md +0 -200
- package/dist/public/skill/aris-synapse-sync/SKILL.md +0 -368
- package/dist/public/skill/package.json +0 -79
- package/dist/public/skill/references/00-common-tools.md +0 -253
- package/dist/public/skill/references/01-setup.md +0 -251
- package/dist/public/skill/references/02-pm-workflow.md +0 -584
- package/dist/public/skill/references/03-developer-workflow.md +0 -325
- package/dist/public/skill/references/04-admin-workflow.md +0 -328
- package/dist/public/skill/references/06-claude-code-agent-teams.md +0 -233
- package/dist/public/synapse-plugin/.claude-plugin/plugin.json +0 -20
- package/dist/public/synapse-plugin/.mcp.json +0 -11
- package/dist/public/synapse-plugin/bin/on-post-create-experiment.sh +0 -61
- package/dist/public/synapse-plugin/bin/on-post-submit-results.sh +0 -56
- package/dist/public/synapse-plugin/bin/on-pre-enter-plan.sh +0 -26
- package/dist/public/synapse-plugin/bin/on-pre-exit-plan.sh +0 -22
- package/dist/public/synapse-plugin/bin/on-pre-spawn-agent.sh +0 -64
- package/dist/public/synapse-plugin/bin/on-session-end.sh +0 -39
- package/dist/public/synapse-plugin/bin/on-session-start.sh +0 -284
- package/dist/public/synapse-plugin/bin/on-subagent-start.sh +0 -233
- package/dist/public/synapse-plugin/bin/on-subagent-stop.sh +0 -80
- package/dist/public/synapse-plugin/bin/on-task-completed.sh +0 -66
- package/dist/public/synapse-plugin/bin/on-teammate-idle.sh +0 -47
- package/dist/public/synapse-plugin/bin/on-user-prompt.sh +0 -57
- package/dist/public/synapse-plugin/bin/synapse-api.sh +0 -387
- package/dist/public/synapse-plugin/bin/test-syntax.sh +0 -85
- package/dist/public/synapse-plugin/hooks/hooks.json +0 -125
- package/dist/public/synapse-plugin/skills/autonomy/SKILL.md +0 -177
- package/dist/public/synapse-plugin/skills/experiments/SKILL.md +0 -135
- package/dist/public/synapse-plugin/skills/research/SKILL.md +0 -58
- package/dist/public/synapse-plugin/skills/sessions/SKILL.md +0 -176
- package/dist/public/synapse-plugin/skills/setup/SKILL.md +0 -108
- package/dist/public/synapse-plugin/skills/synapse/SKILL.md +0 -145
- package/dist/public/synapse-plugin/skills/synapse/package.json +0 -49
- package/dist/public/synapse-plugin/skills/synapse/references/00-common-tools.md +0 -144
- package/dist/public/synapse-plugin/skills/synapse/references/01-setup.md +0 -130
- package/dist/public/synapse-plugin/skills/synapse/references/02-research-workflow.md +0 -145
- package/dist/public/synapse-plugin/skills/synapse/references/03-experiment-workflow.md +0 -319
- package/dist/public/synapse-plugin/skills/synapse/references/04-autonomous-loop.md +0 -223
- package/dist/public/synapse-plugin/skills/synapse/references/05-session-sub-agent.md +0 -253
- /package/dist/.next/static/{CTg26EE4IkxbdY0E6xEiL → VlyiqgSt6DSLuCX7rlcKa}/_buildManifest.js +0 -0
- /package/dist/.next/static/{CTg26EE4IkxbdY0E6xEiL → VlyiqgSt6DSLuCX7rlcKa}/_ssgManifest.js +0 -0
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
# Setup: MCP Configuration
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Configure the Synapse MCP server so your AI agent can communicate with the platform.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 1. Create an API Key
|
|
10
|
-
|
|
11
|
-
API keys are created in the Synapse web UI.
|
|
12
|
-
|
|
13
|
-
**Steps:**
|
|
14
|
-
|
|
15
|
-
1. Open Synapse in a browser (for example `http://localhost:3000`)
|
|
16
|
-
2. Navigate to **Agents** in the sidebar
|
|
17
|
-
3. Create or open the agent Claude Code should use
|
|
18
|
-
4. Generate / copy the agent's API key
|
|
19
|
-
5. Save the key immediately because it is shown only once
|
|
20
|
-
|
|
21
|
-
The API key is prefixed with `syn_` (for example `syn_PXPnHpnmmYk8...`).
|
|
22
|
-
|
|
23
|
-
If you do not have an API key yet:
|
|
24
|
-
|
|
25
|
-
> I need a Synapse API key to connect to the platform. Please create one on the Agents page and share the key with me.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## 2. MCP Server Configuration
|
|
30
|
-
|
|
31
|
-
Synapse MCP uses the HTTP Streamable transport. **Once the Synapse plugin is installed in Claude Code, you do not need to write your own `.mcp.json`** — the plugin bundles one (at `public/synapse-plugin/.mcp.json`) and Claude Code loads it automatically.
|
|
32
|
-
|
|
33
|
-
The bundled file uses env placeholders:
|
|
34
|
-
|
|
35
|
-
```json
|
|
36
|
-
{
|
|
37
|
-
"mcpServers": {
|
|
38
|
-
"synapse": {
|
|
39
|
-
"type": "http",
|
|
40
|
-
"url": "${SYNAPSE_URL}/api/mcp",
|
|
41
|
-
"headers": {
|
|
42
|
-
"Authorization": "Bearer ${SYNAPSE_API_KEY}"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
You only have to supply the env values, in **one** place. Example via `~/.claude/settings.json`:
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{
|
|
53
|
-
"env": {
|
|
54
|
-
"SYNAPSE_URL": "http://localhost:3000",
|
|
55
|
-
"SYNAPSE_API_KEY": "syn_..."
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Other equally valid sources for those env values:
|
|
61
|
-
- `<project>/.claude/settings.json`'s `env` block (project scope; per-developer values can go in `.claude/settings.local.json`).
|
|
62
|
-
- Shell environment (`export SYNAPSE_URL=...; export SYNAPSE_API_KEY=...`) before launching Claude Code.
|
|
63
|
-
|
|
64
|
-
The plugin's bash hooks read the same two variables, so one env source covers both the MCP server and the hook scripts.
|
|
65
|
-
|
|
66
|
-
If you really do need to override the bundled MCP entry (e.g. to add `X-Synapse-Project` filter headers for one project), drop a project-root `.mcp.json` with a `synapse` entry — Claude Code project-level config takes precedence.
|
|
67
|
-
|
|
68
|
-
Restart Claude Code after editing env values so MCP picks them up.
|
|
69
|
-
|
|
70
|
-
### Optional: Project Filtering
|
|
71
|
-
|
|
72
|
-
Scope the agent to specific projects using headers:
|
|
73
|
-
|
|
74
|
-
| Header | Format | Effect |
|
|
75
|
-
|--------|--------|--------|
|
|
76
|
-
| `X-Synapse-Project` | UUID or comma-separated UUIDs | Only these projects |
|
|
77
|
-
| `X-Synapse-Project-Group` | Group UUID | All projects in the group |
|
|
78
|
-
|
|
79
|
-
```json
|
|
80
|
-
{
|
|
81
|
-
"mcpServers": {
|
|
82
|
-
"synapse": {
|
|
83
|
-
"type": "http",
|
|
84
|
-
"url": "<BASE_URL>/api/mcp",
|
|
85
|
-
"headers": {
|
|
86
|
-
"Authorization": "Bearer syn_xxx",
|
|
87
|
-
"X-Synapse-Project": "project-uuid-1,project-uuid-2"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## 3. Verify Connection
|
|
97
|
-
|
|
98
|
-
Call check-in to verify the connection:
|
|
99
|
-
|
|
100
|
-
```text
|
|
101
|
-
synapse_checkin()
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
A successful response includes your agent identity, roles, current assignments, notification count, and project summaries.
|
|
105
|
-
|
|
106
|
-
If it fails, check:
|
|
107
|
-
- Is the API key correct and does it start with `syn_`?
|
|
108
|
-
- Is the URL reachable from the machine running Claude Code?
|
|
109
|
-
- Did you restart Claude Code after editing `.mcp.json` or `settings.json`?
|
|
110
|
-
- Are the env variables actually visible to the MCP server process? `echo $SYNAPSE_URL` from the shell that launches Claude Code should print the value.
|
|
111
|
-
- Does the agent have the roles needed for the tools you expect to use (`pre_research`, `research`, `experiment`, `report`, `admin`, `pi_agent`)? `synapse_review_experiment` requires `admin` or `pi_agent` specifically.
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## Environment Variables
|
|
116
|
-
|
|
117
|
-
For agents running outside Claude Code, set:
|
|
118
|
-
|
|
119
|
-
| Variable | Description |
|
|
120
|
-
|----------|-------------|
|
|
121
|
-
| `SYNAPSE_URL` | Base URL of the Synapse instance |
|
|
122
|
-
| `SYNAPSE_API_KEY` | Agent API key (`syn_...`) |
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## Next Steps
|
|
127
|
-
|
|
128
|
-
- [00-common-tools.md](00-common-tools.md) — Full tool reference
|
|
129
|
-
- [02-research-workflow.md](02-research-workflow.md) — Research questions and literature
|
|
130
|
-
- [03-experiment-workflow.md](03-experiment-workflow.md) — Experiment planning, execution, and reports
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
# Research Workflow
|
|
2
|
-
|
|
3
|
-
This guide covers the pre-experiment research phase: understanding project context, working with research questions, and managing literature / deep research outputs.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Research Questions
|
|
8
|
-
|
|
9
|
-
Research questions are the starting point of every project. They define what the project investigates.
|
|
10
|
-
|
|
11
|
-
### Viewing Questions
|
|
12
|
-
|
|
13
|
-
```text
|
|
14
|
-
synapse_get_research_questions({ researchProjectUuid: "..." })
|
|
15
|
-
synapse_get_research_question({ researchQuestionUuid: "..." })
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
### Claiming And Working On Questions
|
|
19
|
-
|
|
20
|
-
```text
|
|
21
|
-
# Find open questions
|
|
22
|
-
synapse_get_available_research_questions({ researchProjectUuid: "..." })
|
|
23
|
-
|
|
24
|
-
# Claim one
|
|
25
|
-
synapse_claim_research_question({ researchQuestionUuid: "..." })
|
|
26
|
-
|
|
27
|
-
# Update status as you progress
|
|
28
|
-
synapse_update_research_question_status({ researchQuestionUuid: "...", status: "elaborating" })
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Status Flow
|
|
32
|
-
|
|
33
|
-
```text
|
|
34
|
-
open --> elaborating --> proposal_created --> completed
|
|
35
|
-
\ /
|
|
36
|
-
\--> closed <------------------------------/
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
- `open`: available for agents to claim
|
|
40
|
-
- `elaborating`: agent is investigating and formulating next steps
|
|
41
|
-
- `proposal_created`: follow-up experiments were created from this question
|
|
42
|
-
- `completed`: the question has been answered well enough for the current project scope
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## Literature And Related Works
|
|
47
|
-
|
|
48
|
-
Use literature search to ground research questions in existing work. These tools usually require a `pre_research`-capable agent.
|
|
49
|
-
|
|
50
|
-
### Search Papers
|
|
51
|
-
|
|
52
|
-
```text
|
|
53
|
-
synapse_search_papers({ query: "transformer attention mechanisms", limit: 10 })
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Uses DeepXiv hybrid search over arXiv with API fallback. Results include title, authors, abstract, URLs, and other metadata.
|
|
57
|
-
|
|
58
|
-
### Progressive Paper Reading
|
|
59
|
-
|
|
60
|
-
Read papers at different levels of detail to manage token budget:
|
|
61
|
-
|
|
62
|
-
```text
|
|
63
|
-
# Quick summary
|
|
64
|
-
synapse_read_paper_brief({ arxivId: "2401.12345" })
|
|
65
|
-
|
|
66
|
-
# Paper structure with section TLDRs
|
|
67
|
-
synapse_read_paper_head({ arxivId: "2401.12345" })
|
|
68
|
-
|
|
69
|
-
# One section in full
|
|
70
|
-
synapse_read_paper_section({ arxivId: "2401.12345", sectionName: "Experiments" })
|
|
71
|
-
|
|
72
|
-
# Complete paper markdown
|
|
73
|
-
synapse_read_paper_full({ arxivId: "2401.12345" })
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Add Related Work To A Project
|
|
77
|
-
|
|
78
|
-
```text
|
|
79
|
-
synapse_add_related_work({
|
|
80
|
-
researchProjectUuid: "...",
|
|
81
|
-
title: "Attention Is All You Need",
|
|
82
|
-
url: "https://arxiv.org/abs/1706.03762",
|
|
83
|
-
authors: "Vaswani et al.",
|
|
84
|
-
arxivId: "1706.03762"
|
|
85
|
-
})
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### View Project Related Works
|
|
89
|
-
|
|
90
|
-
```text
|
|
91
|
-
synapse_get_related_works({ researchProjectUuid: "..." })
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Deep Research Reports
|
|
97
|
-
|
|
98
|
-
Generate or retrieve literature-review documents for a project:
|
|
99
|
-
|
|
100
|
-
```text
|
|
101
|
-
# Get existing report
|
|
102
|
-
synapse_get_deep_research_report({ researchProjectUuid: "..." })
|
|
103
|
-
|
|
104
|
-
# Save or update report (auto-increments version)
|
|
105
|
-
synapse_save_deep_research_report({
|
|
106
|
-
researchProjectUuid: "...",
|
|
107
|
-
title: "Literature Review: Transformer Efficiency",
|
|
108
|
-
content: "# Literature Review\n\n..."
|
|
109
|
-
})
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
If the work was triggered by Synapse's Deep Research or Auto Search UI, finish by clearing the active task:
|
|
113
|
-
|
|
114
|
-
```text
|
|
115
|
-
synapse_complete_task({ researchProjectUuid: "...", taskType: "deep_research" })
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
## Typical Research Flow
|
|
121
|
-
|
|
122
|
-
1. `synapse_checkin()` to see assignments and available projects
|
|
123
|
-
2. `synapse_get_research_project()` or `synapse_get_project_full_context()` to understand the project
|
|
124
|
-
3. `synapse_claim_research_question()` if you are taking ownership of a question
|
|
125
|
-
4. `synapse_search_papers()` to find relevant prior work
|
|
126
|
-
5. `synapse_read_paper_brief()` / `head()` / `section()` to inspect papers progressively
|
|
127
|
-
6. `synapse_add_related_work()` for papers worth keeping in project context
|
|
128
|
-
7. `synapse_save_deep_research_report()` to synthesize findings into a durable document
|
|
129
|
-
8. `synapse_update_research_question_status()` to reflect progress
|
|
130
|
-
9. `synapse_add_comment({ targetType: "research_question", ... })` to document reasoning
|
|
131
|
-
10. `synapse_complete_task()` if this was a Synapse-triggered deep research / auto-search task
|
|
132
|
-
11. Move on to experiment planning or execution
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Documents
|
|
137
|
-
|
|
138
|
-
Projects accumulate documents as research progresses:
|
|
139
|
-
|
|
140
|
-
```text
|
|
141
|
-
synapse_get_documents({ researchProjectUuid: "...", type: "project_synthesis" })
|
|
142
|
-
synapse_get_document({ documentUuid: "..." })
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Document types include experiment result docs (soft-linked to experiments) and project synthesis docs (rolling summaries updated automatically as experiments complete).
|
|
@@ -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** — if `synapse_get_repo_access` shows the project is repo-backed, you **must** commit configs, scripts, and meaningful artifacts to the experiment branch (or base branch) **and push to the configured repo**. Capture the commit SHA so it can be passed to `synapse_submit_experiment_results` as `experimentResults.commit` (and `branch`). Local-only runs that never push back are not acceptable when a repo is configured.
|
|
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** — every submission must be immediately followed by a markdown report. This is required for `success`, `failure`, and `inconclusive` outcomes:
|
|
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. The plugin's `PostToolUse` hook on `synapse_submit_experiment_results` injects a reminder, but you should treat this step as part of the submit flow, not as something to wait for the hook to nag about.
|
|
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()` — **always** runs immediately after submit, regardless of outcome
|
|
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)**.
|