@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,176 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sessions
|
|
3
|
-
description: Understand the Synapse Claude Code plugin hooks, session lifecycle, and multi-agent parallel execution. Covers what each hook does, where plugin state lives, and how to run multiple experiments in parallel via Task sub-agents.
|
|
4
|
-
license: AGPL-3.0
|
|
5
|
-
metadata:
|
|
6
|
-
author: Vincentwei1021
|
|
7
|
-
version: "0.6.1"
|
|
8
|
-
category: research
|
|
9
|
-
mcp_server: synapse
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Sessions Skill
|
|
13
|
-
|
|
14
|
-
Use this skill when the task is about how the Synapse plugin itself behaves inside Claude Code: which hooks fire, what they inject into context, how sub-agent sessions are managed, and how to dispatch multiple experiments in parallel to Task sub-agents.
|
|
15
|
-
|
|
16
|
-
## Prompt Boundary
|
|
17
|
-
|
|
18
|
-
Stay inside this skill when the work is about:
|
|
19
|
-
- understanding why Synapse context appeared in the session (which hook injected it)
|
|
20
|
-
- debugging a sub-agent that is not behaving as expected (session, heartbeat, or teardown issue)
|
|
21
|
-
- deciding how a main agent should dispatch parallel experiment work across sub-agents
|
|
22
|
-
- deciding when to call `synapse_create_session` / `synapse_close_session` directly instead of relying on hooks
|
|
23
|
-
|
|
24
|
-
Hand off to:
|
|
25
|
-
- **[experiments](../experiments/SKILL.md)** for the actual work inside one experiment
|
|
26
|
-
- **[autonomy](../autonomy/SKILL.md)** for the CC-client autonomous loop
|
|
27
|
-
|
|
28
|
-
## Core Rule
|
|
29
|
-
|
|
30
|
-
For sub-agents spawned through the Task tool, sessions are fully automatic. Do not manually call `synapse_create_session` or `synapse_close_session` for a sub-agent unless you are debugging the lifecycle itself. The `SubagentStart` and `SubagentStop` hooks already do it.
|
|
31
|
-
|
|
32
|
-
## Plugin Hooks At A Glance
|
|
33
|
-
|
|
34
|
-
The plugin ships ten hooks wired up in `hooks/hooks.json`. Each reads/writes local state under `.synapse/` in the project and, when needed, calls Synapse MCP tools via the bundled `synapse-api.sh` wrapper.
|
|
35
|
-
|
|
36
|
-
| Hook script | Claude Code event | What it does | State touched | MCP calls |
|
|
37
|
-
|---|---|---|---|---|
|
|
38
|
-
| `on-session-start.sh` | `SessionStart` (`startup` \| `resume` \| `compact`) | Calls `synapse_checkin`, caches owner / roles / project UUID into `state.json`, scans for pre-assigned sub-agent session files, and builds the rich `additionalContext` block that orients the agent on assignments, projects, and workflow. | `state.json`, reads `sessions/*.json` | `synapse_checkin`, optional `synapse_session_heartbeat` |
|
|
39
|
-
| `on-user-prompt.sh` | `UserPromptSubmit` | Fast local-only check on every user turn. Scans `.synapse/sessions/` and injects a brief reminder that sub-agent sessions are auto-managed. No network calls (stays under 100 ms). | reads `sessions/` | none |
|
|
40
|
-
| `on-pre-enter-plan.sh` | `PreToolUse` (`EnterPlanMode`) | Injects planning-mode guidance: prefer the current Experiment pipeline (`draft → pending_review → pending_start → in_progress → completed`), plan one independent run per experiment card, do not plan to create sessions manually. | none | none |
|
|
41
|
-
| `on-pre-exit-plan.sh` | `PreToolUse` (`ExitPlanMode`) | Reminds the agent to verify that the plan is expressed as Experiment records before executing. | none | none |
|
|
42
|
-
| `on-pre-spawn-agent.sh` | `PreToolUse` (`Task`) | Before a sub-agent is spawned, atomically writes `.synapse/pending/{name}` with the agent name and type so the `SubagentStart` hook can claim it. Skips read-only sub-agent types. | writes `pending/{name}` | none |
|
|
43
|
-
| `on-subagent-start.sh` | `SubagentStart` | Atomically claims the pending file via `mv`, then either reuses an active session, reopens a closed one, or creates a new one via `synapse_list_sessions` / `synapse_reopen_session` / `synapse_create_session`. Writes `sessions/{name}.json`, stores the mapping in `state.json`, and injects the session UUID plus the execution workflow directly into the sub-agent's context. | `state.json`, `sessions/{name}.json`, `claimed/{agent_id}` | `synapse_list_sessions`, `synapse_create_session`, `synapse_reopen_session`, `synapse_session_heartbeat` |
|
|
44
|
-
| `on-teammate-idle.sh` | `TeammateIdle` | When a teammate sub-agent idles between turns, sends a heartbeat so its Synapse session does not auto-time-out after 1 hour. Output suppressed — this fires too often to notify the user. | reads `state.json` | `synapse_session_heartbeat` |
|
|
45
|
-
| `on-subagent-stop.sh` | `SubagentStop` | Looks up the session UUID, calls `synapse_close_session`, and cleans up `state.json`, `sessions/{name}.json`, and `claimed/{agent_id}`. | deletes state entries, `sessions/{name}.json`, `claimed/{agent_id}` | `synapse_close_session` |
|
|
46
|
-
| `on-task-completed.sh` | `TaskCompleted` | Scans the completed task description/subject for a `synapse:experiment:<uuid>` marker. If found, injects a reminder to finalize the experiment with `synapse_submit_experiment_results` (or report progress if still running). | reads task metadata only | none |
|
|
47
|
-
| `on-session-end.sh` | `SessionEnd` | Safety-checked cleanup. Removes `.synapse/` only when all sub-agent sessions are closed and `state.json` has no meaningful content left. | deletes `.synapse/` if safe | none |
|
|
48
|
-
|
|
49
|
-
## Local State Layout
|
|
50
|
-
|
|
51
|
-
The plugin keeps per-project state under `.synapse/` in the project working directory:
|
|
52
|
-
|
|
53
|
-
- `state.json` — flock-guarded key/value store. Holds owner info cached from `synapse_checkin`, agent roles, the primary project UUID, and the `session_{…}` / `agent_for_session_{…}` / `name_for_agent_{…}` mappings used by the start/stop hooks.
|
|
54
|
-
- `pending/{name}` — written by `on-pre-spawn-agent.sh`, atomically claimed by `on-subagent-start.sh` via `mv`.
|
|
55
|
-
- `claimed/{agent_id}` — marker file showing which pending entry was claimed.
|
|
56
|
-
- `sessions/{name}.json` — per-sub-agent session metadata: `sessionUuid`, `agentId`, `agentName`, `agentType`, `sessionAction`, `createdAt`. Other hooks (idle, stop, user-prompt) read from here to locate the session.
|
|
57
|
-
|
|
58
|
-
`on-session-end.sh` removes `.synapse/` only when it is safe; otherwise state is preserved across sessions so resumed work reconnects to the same Synapse sessions.
|
|
59
|
-
|
|
60
|
-
## MCP Connection Session vs Synapse Agent Session
|
|
61
|
-
|
|
62
|
-
These are two different things — do not confuse them.
|
|
63
|
-
|
|
64
|
-
- **MCP connection session** — the HTTP-streamable session on `/api/mcp`. Identified by the `mcp-session-id` header, auto-renewed on every request, expires after 30 minutes of inactivity. The plugin handles this transparently.
|
|
65
|
-
- **Synapse agent session** — a durable record in Synapse of which agent is working on what (the green / yellow / grey indicators on the Settings page). Created/closed by the plugin hooks above, or explicitly by `synapse_create_session` / `synapse_close_session`.
|
|
66
|
-
|
|
67
|
-
## Session Status Lifecycle
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
active ——(no heartbeat 1h)——> inactive ——(heartbeat)——> active
|
|
71
|
-
\ \
|
|
72
|
-
\—— close ——> closed ——(reopen)——> active
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
| Status | Meaning |
|
|
76
|
-
|---|---|
|
|
77
|
-
| `active` | Agent is working. Green indicator. |
|
|
78
|
-
| `inactive` | No heartbeat in over an hour. Yellow indicator. |
|
|
79
|
-
| `closed` | Session ended. Grey indicator. Can be reopened. |
|
|
80
|
-
|
|
81
|
-
## Session Tools
|
|
82
|
-
|
|
83
|
-
| Tool | Purpose |
|
|
84
|
-
|---|---|
|
|
85
|
-
| `synapse_list_sessions` | List sessions for the current agent. |
|
|
86
|
-
| `synapse_get_session` | Read one session's details. |
|
|
87
|
-
| `synapse_create_session` | Create a named session — usually only needed for direct (non-sub-agent) work. |
|
|
88
|
-
| `synapse_close_session` | Close a session. |
|
|
89
|
-
| `synapse_reopen_session` | Reopen a closed session instead of creating a duplicate with the same name. |
|
|
90
|
-
| `synapse_session_heartbeat` | Keep a session active. Hooks already send heartbeats automatically. |
|
|
91
|
-
|
|
92
|
-
## Running Multiple Experiments In Parallel
|
|
93
|
-
|
|
94
|
-
When the main agent needs to execute several `pending_start` experiments concurrently, it should **orchestrate, not execute**. The plugin does the heavy lifting for session bookkeeping; the main agent only needs to spawn sub-agents and monitor.
|
|
95
|
-
|
|
96
|
-
### Main agent: dispatch
|
|
97
|
-
|
|
98
|
-
```text
|
|
99
|
-
# 1. Refresh and list what needs to run
|
|
100
|
-
synapse_checkin()
|
|
101
|
-
synapse_get_assigned_experiments({ researchProjectUuid, statuses: ["pending_start"] })
|
|
102
|
-
|
|
103
|
-
# 2. Inspect each candidate
|
|
104
|
-
synapse_get_experiment({ experimentUuid })
|
|
105
|
-
|
|
106
|
-
# 3. For each experiment, spawn a Task sub-agent with the experiment UUID in the prompt.
|
|
107
|
-
# The SubagentStart hook auto-creates/reuses a Synapse session and injects the
|
|
108
|
-
# execution workflow. The main agent does not need to call synapse_create_session.
|
|
109
|
-
Task({
|
|
110
|
-
subagent_type: "general-purpose",
|
|
111
|
-
name: "training-worker-<short>",
|
|
112
|
-
prompt: "Your Synapse experiment UUID: <experiment-uuid>. Run the experiment end to end."
|
|
113
|
-
})
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### Sub-agent: execute
|
|
117
|
-
|
|
118
|
-
Each sub-agent follows the full execution checklist in **[experiments](../experiments/SKILL.md)**: `synapse_start_experiment` → `synapse_list_compute_nodes` / `synapse_reserve_gpus` → `synapse_get_node_access_bundle` → run remotely (tmux + unbuffered) → `synapse_report_experiment_progress` at milestones → `synapse_submit_experiment_results` → optional `synapse_save_experiment_report`.
|
|
119
|
-
|
|
120
|
-
### Main agent: monitor
|
|
121
|
-
|
|
122
|
-
The main agent polls for completion rather than blocking on any one sub-agent:
|
|
123
|
-
|
|
124
|
-
```text
|
|
125
|
-
synapse_get_assigned_experiments({
|
|
126
|
-
researchProjectUuid,
|
|
127
|
-
statuses: ["in_progress", "completed"]
|
|
128
|
-
})
|
|
129
|
-
|
|
130
|
-
# For any experiment still in_progress, read its latest state
|
|
131
|
-
synapse_get_experiment({ experimentUuid })
|
|
132
|
-
|
|
133
|
-
# Once all have completed, synthesize. If this is the assigned autonomous-loop
|
|
134
|
-
# agent, propose follow-ups; otherwise use synapse_create_experiment for
|
|
135
|
-
# user-directed terminal work.
|
|
136
|
-
synapse_propose_experiment({ researchProjectUuid, title, description })
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### Sequential multi-experiment sub-agent
|
|
140
|
-
|
|
141
|
-
A single sub-agent can also handle multiple experiments in order when dependencies matter:
|
|
142
|
-
|
|
143
|
-
```text
|
|
144
|
-
Task({
|
|
145
|
-
subagent_type: "general-purpose",
|
|
146
|
-
name: "sequential-worker",
|
|
147
|
-
prompt: """
|
|
148
|
-
Synapse experiments, in order (each depends on the previous):
|
|
149
|
-
1. <experiment-uuid-1> — baseline evaluation
|
|
150
|
-
2. <experiment-uuid-2> — ablation built on #1's results
|
|
151
|
-
|
|
152
|
-
For each: start_experiment → run → report_progress → submit_results.
|
|
153
|
-
"""
|
|
154
|
-
})
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
## Project-Level MCP For Sub-Agents
|
|
158
|
-
|
|
159
|
-
Sub-agents only inherit Synapse MCP access if the MCP server is configured at the project level. Put the config in `.mcp.json` at the project root (the plugin bundle ships the template at `public/synapse-plugin/.mcp.json`). User-level-only MCP configs will not reach sub-agents.
|
|
160
|
-
|
|
161
|
-
## Troubleshooting
|
|
162
|
-
|
|
163
|
-
| Symptom | Likely cause / fix |
|
|
164
|
-
|---|---|
|
|
165
|
-
| Sub-agent cannot see Synapse tools | MCP is user-level only. Move `.mcp.json` to the project root. |
|
|
166
|
-
| Sub-agent session shown as `inactive` | Heartbeat has not fired for 1 h. Usually the sub-agent crashed; respawn with the same name — `SubagentStart` will reopen the existing session instead of making a duplicate. |
|
|
167
|
-
| Duplicate sessions appear with similar names | A previous sub-agent stopped without the `SubagentStop` hook firing (hard crash). Close stale sessions with `synapse_close_session`, then respawn. |
|
|
168
|
-
| Main agent did not receive checkin context | `SessionStart` hook failed (check `SYNAPSE_URL`, `SYNAPSE_API_KEY`). Call `synapse_checkin()` manually to recover. |
|
|
169
|
-
| Experiment stuck in `in_progress` | The sub-agent died before `synapse_submit_experiment_results`. Either resume by respawning the sub-agent with the same experiment UUID, or the main agent calls `synapse_report_experiment_progress` and then `synapse_submit_experiment_results({ outcome: "failure", experimentResults: { error: "..." } })` to close it out. |
|
|
170
|
-
|
|
171
|
-
## Reference
|
|
172
|
-
|
|
173
|
-
- **[Session and sub-agent reference](../synapse/references/05-session-sub-agent.md)**
|
|
174
|
-
- **[Experiments skill](../experiments/SKILL.md)**
|
|
175
|
-
- **[Autonomy skill](../autonomy/SKILL.md)**
|
|
176
|
-
- **[Common tools](../synapse/references/00-common-tools.md)**
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: setup
|
|
3
|
-
description: Configure Synapse MCP access for Claude Code with project-level .mcp.json and verify the connection.
|
|
4
|
-
license: AGPL-3.0
|
|
5
|
-
metadata:
|
|
6
|
-
author: Vincentwei1021
|
|
7
|
-
version: "0.6.1"
|
|
8
|
-
category: research
|
|
9
|
-
mcp_server: synapse
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Setup Skill
|
|
13
|
-
|
|
14
|
-
Use this skill when the task is about getting Synapse connected inside Claude Code: API keys, MCP configuration, project-level `.mcp.json`, or connection debugging.
|
|
15
|
-
|
|
16
|
-
## Scope
|
|
17
|
-
|
|
18
|
-
This skill covers:
|
|
19
|
-
- creating or locating a Synapse API key
|
|
20
|
-
- configuring MCP with `SYNAPSE_URL` and `SYNAPSE_API_KEY`
|
|
21
|
-
- preferring project-level `.mcp.json` so sub-agents inherit access
|
|
22
|
-
- verifying access with `synapse_checkin()`
|
|
23
|
-
|
|
24
|
-
This skill does not cover day-to-day research or experiment execution. Hand off to:
|
|
25
|
-
- **[research](../research/SKILL.md)** for literature and research-question work
|
|
26
|
-
- **[experiments](../experiments/SKILL.md)** for experiment planning and execution
|
|
27
|
-
- **[sessions](../sessions/SKILL.md)** for plugin hook behavior and multi-agent parallel execution
|
|
28
|
-
- **[autonomy](../autonomy/SKILL.md)** to drive the CC-client autonomous research loop
|
|
29
|
-
|
|
30
|
-
## Recommended Flow
|
|
31
|
-
|
|
32
|
-
1. Get an API key from the Synapse **Agents** page.
|
|
33
|
-
2. Set `SYNAPSE_URL` and `SYNAPSE_API_KEY` **in one place** (see "Where the credentials live" below).
|
|
34
|
-
3. Restart Claude Code so it reloads MCP config and re-evaluates env.
|
|
35
|
-
4. Call `synapse_checkin()` and confirm expected roles/tools are visible.
|
|
36
|
-
|
|
37
|
-
The plugin already ships its own `.mcp.json` (at `public/synapse-plugin/.mcp.json` inside the plugin bundle), so you do **not** need to copy a `.mcp.json` into your project. Installing the plugin makes the MCP server available; the only thing you supply is the env values.
|
|
38
|
-
|
|
39
|
-
## Where The Credentials Live (Important)
|
|
40
|
-
|
|
41
|
-
The plugin's bundled `.mcp.json` carries `${SYNAPSE_URL}` and `${SYNAPSE_API_KEY}` placeholders. Claude Code substitutes them at MCP-server-startup time from your env. You only put the real values in **one** location:
|
|
42
|
-
|
|
43
|
-
- **User-level Claude Code settings** — `~/.claude/settings.json`'s `env` block. Best for personal use across projects.
|
|
44
|
-
```json
|
|
45
|
-
{
|
|
46
|
-
"env": {
|
|
47
|
-
"SYNAPSE_URL": "http://localhost:3000",
|
|
48
|
-
"SYNAPSE_API_KEY": "syn_..."
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
```
|
|
52
|
-
- **Project-level Claude Code settings** — `<project>/.claude/settings.json`'s `env` block. Best when several teammates share a project but each needs their own key (use `.claude/settings.local.json` for personal values; never commit the key).
|
|
53
|
-
- **Shell environment** — `export SYNAPSE_URL=...; export SYNAPSE_API_KEY=...` in your shell rc, before launching Claude Code. Ad-hoc only.
|
|
54
|
-
|
|
55
|
-
The plugin's bash hooks (`SessionStart`, `PostToolUse`, etc.) also read the same two env variables, so a single env source covers both the MCP server and the hook scripts.
|
|
56
|
-
|
|
57
|
-
## Plugin's Own `.mcp.json` (For Reference)
|
|
58
|
-
|
|
59
|
-
You don't need to edit or copy this file — the plugin ships and loads it automatically:
|
|
60
|
-
|
|
61
|
-
```json
|
|
62
|
-
{
|
|
63
|
-
"mcpServers": {
|
|
64
|
-
"synapse": {
|
|
65
|
-
"type": "http",
|
|
66
|
-
"url": "${SYNAPSE_URL}/api/mcp",
|
|
67
|
-
"headers": {
|
|
68
|
-
"Authorization": "Bearer ${SYNAPSE_API_KEY}"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
If you have a strong reason to override (e.g. add `X-Synapse-Project` filter headers for one project), you can add a `.mcp.json` at your project root that defines a different `synapse` server entry — Claude Code project-level config takes precedence.
|
|
76
|
-
|
|
77
|
-
## Roles That Matter
|
|
78
|
-
|
|
79
|
-
Set the agent's roles on the **Agents** page based on what you expect Claude Code to do:
|
|
80
|
-
|
|
81
|
-
- `pre_research` — paper search, literature reading.
|
|
82
|
-
- `research` — research-question CRUD.
|
|
83
|
-
- `experiment` — create/start/report/submit experiments, compute tools.
|
|
84
|
-
- `report` — document and synthesis tools.
|
|
85
|
-
- `admin` / `pi_agent` — needed if Claude Code should call `synapse_review_experiment` to carry the user's verbal approve / reject from the terminal into Synapse. Without one of these, `/api/experiments/<uuid>/review` returns 403.
|
|
86
|
-
|
|
87
|
-
If the same Claude Code agent should both execute experiments and verbally-approve them, give it both `experiment` and `admin` (or `pi_agent`).
|
|
88
|
-
|
|
89
|
-
## Verification
|
|
90
|
-
|
|
91
|
-
Use:
|
|
92
|
-
|
|
93
|
-
```text
|
|
94
|
-
synapse_checkin()
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
If the connection is wrong, check:
|
|
98
|
-
- the key starts with `syn_`
|
|
99
|
-
- `SYNAPSE_URL` is reachable
|
|
100
|
-
- Claude Code has reloaded the MCP config
|
|
101
|
-
- the env variables actually reach the MCP server process (`echo $SYNAPSE_URL` from the same shell that launches Claude Code)
|
|
102
|
-
- the agent has the roles needed for the tools you expect to use
|
|
103
|
-
|
|
104
|
-
## Reference
|
|
105
|
-
|
|
106
|
-
- **[Synapse overview](../synapse/SKILL.md)**
|
|
107
|
-
- **[Setup reference](../synapse/references/01-setup.md)**
|
|
108
|
-
- **[Common tools](../synapse/references/00-common-tools.md)**
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: synapse
|
|
3
|
-
description: Synapse platform overview and router skill. Use it to orient on projects and then hand off to the stage-specific Synapse skills.
|
|
4
|
-
license: AGPL-3.0
|
|
5
|
-
metadata:
|
|
6
|
-
author: Vincentwei1021
|
|
7
|
-
version: "0.6.1"
|
|
8
|
-
category: research
|
|
9
|
-
mcp_server: synapse
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Synapse Skill
|
|
13
|
-
|
|
14
|
-
Synapse is a research orchestration platform for human researchers and AI agents. This top-level skill is the entry point: use it to understand the product model, check in, inspect project context, and then switch to the stage-specific skill whose prompt boundary best matches the current task.
|
|
15
|
-
|
|
16
|
-
## Stage Skills
|
|
17
|
-
|
|
18
|
-
| Skill | When to use it |
|
|
19
|
-
|------|-----------------|
|
|
20
|
-
| **[setup](../setup/SKILL.md)** | Configure MCP, API keys, and project-level `.mcp.json` |
|
|
21
|
-
| **[research](../research/SKILL.md)** | Research questions, literature search, related works, deep research |
|
|
22
|
-
| **[experiments](../experiments/SKILL.md)** | Experiment planning, revision, execution, compute, and result submission |
|
|
23
|
-
| **[autonomy](../autonomy/SKILL.md)** | Autonomous loop and next-experiment proposal work |
|
|
24
|
-
| **[sessions](../sessions/SKILL.md)** | Plugin hooks, session lifecycle, and multi-agent parallel execution |
|
|
25
|
-
|
|
26
|
-
## Core Workflow
|
|
27
|
-
|
|
28
|
-
```text
|
|
29
|
-
ResearchProject --> ResearchQuestion --> Experiment --> Report
|
|
30
|
-
^ ^ ^ ^
|
|
31
|
-
Human Human/Agent Agent executes Agent writes
|
|
32
|
-
creates formulates and reports synthesis
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Tool families are exposed according to the agent's Synapse roles. Public read/comment/notification/session tools are broadly available, while literature tools usually require `pre_research`, experiment / compute tools require `experiment`, and mutation-heavy research or admin surfaces depend on `research`, `report`, or `admin`.
|
|
36
|
-
|
|
37
|
-
## Getting Started
|
|
38
|
-
|
|
39
|
-
### Step 1: Setup and check in
|
|
40
|
-
|
|
41
|
-
Configure your MCP connection with **[setup](../setup/SKILL.md)**, then call:
|
|
42
|
-
|
|
43
|
-
```text
|
|
44
|
-
synapse_checkin()
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Returns your agent identity, current assignments, and pending work.
|
|
48
|
-
|
|
49
|
-
### Step 2: Handle active plugin context
|
|
50
|
-
|
|
51
|
-
The Synapse Claude Code plugin may inject active context during session start, user prompts, sub-agent starts, and task completion. Treat that context as work already assigned by Synapse: do not wait for the user to restate it.
|
|
52
|
-
|
|
53
|
-
When hook context mentions an active project, assignment, experiment, synthesis task, deep research task, notification, or sub-agent session:
|
|
54
|
-
|
|
55
|
-
1. Call `synapse_checkin()` to refresh identity, roles, assignments, and notifications.
|
|
56
|
-
2. Use the UUIDs from the hook context with the matching `synapse_get_*` tool.
|
|
57
|
-
3. Continue through the matching stage skill below.
|
|
58
|
-
4. Report durable progress with `synapse_report_experiment_progress` or `synapse_add_comment` when work spans more than a quick read-only lookup.
|
|
59
|
-
5. Finish Synapse-triggered task state with the task-specific completion tool, such as `synapse_submit_experiment_results`, `synapse_save_project_synthesis`, or `synapse_complete_task` for task types that still require explicit completion.
|
|
60
|
-
|
|
61
|
-
### Step 2b: Empty-project onboarding
|
|
62
|
-
|
|
63
|
-
If `synapse_checkin()` returns no assignments and no notifications and the user's current project has no related works, no research questions, and no experiments, do not silently pick a direction. Ask the user which path to start with:
|
|
64
|
-
|
|
65
|
-
1. **Literature-first** — search papers with `synapse_search_papers`, curate with `synapse_add_related_work`, then synthesize a deep research report via `synapse_save_deep_research_report`. Switch to **[research](../research/SKILL.md)**.
|
|
66
|
-
2. **Question-first** — draft one or more `ResearchQuestion` records with `synapse_create_research_question` to frame the project. Switch to **[research](../research/SKILL.md)**.
|
|
67
|
-
3. **Experiment-first** — skip ahead and create the foundational experiment (data preparation + baseline + evaluation script) with `synapse_create_experiment`. Switch to **[experiments](../experiments/SKILL.md)**.
|
|
68
|
-
4. **Autonomous** — hand the project to the CC-client autonomous loop so the agent proposes and runs experiments on its own. Switch to **[autonomy](../autonomy/SKILL.md)**.
|
|
69
|
-
|
|
70
|
-
Each stage skill repeats this onboarding prompt from its own perspective when entered with empty state.
|
|
71
|
-
|
|
72
|
-
### Step 3: Choose the right stage skill
|
|
73
|
-
|
|
74
|
-
| Current work | Skill to use |
|
|
75
|
-
|--------------|---------------|
|
|
76
|
-
| Understanding project context and project state | Stay here, then call `synapse_get_project_full_context()` |
|
|
77
|
-
| Research questions, literature, deep research | **[research](../research/SKILL.md)** |
|
|
78
|
-
| Experiment drafting, revision, execution, compute, reporting | **[experiments](../experiments/SKILL.md)** |
|
|
79
|
-
| Autonomous next-step proposal, queue-empty behavior, driving the CC-client autonomous loop | **[autonomy](../autonomy/SKILL.md)** |
|
|
80
|
-
| Plugin hook behavior, session tracking, multi-agent parallel dispatch in Claude Code | **[sessions](../sessions/SKILL.md)** |
|
|
81
|
-
|
|
82
|
-
## Active Trigger Routing
|
|
83
|
-
|
|
84
|
-
| Trigger or hook context | First action | Then use |
|
|
85
|
-
|-------------------------|--------------|----------|
|
|
86
|
-
| Experiment assignment or assigned experiment UUID | `synapse_get_experiment({ experimentUuid })` | **[experiments](../experiments/SKILL.md)** to start, run, report progress, and submit results |
|
|
87
|
-
| Experiment plan requested | `synapse_get_experiment()` plus `synapse_get_project_full_context()` | **[experiments](../experiments/SKILL.md)** to update the plan |
|
|
88
|
-
| Experiment revision requested | `synapse_get_experiment()` and read relevant comments if needed | **[experiments](../experiments/SKILL.md)** to revise and resubmit/update |
|
|
89
|
-
| Experiment report requested | `synapse_get_experiment()` and inspect completed results | **[experiments](../experiments/SKILL.md)** to write the report/result document |
|
|
90
|
-
| Research question claimed | `synapse_get_research_question()` and `synapse_get_project_full_context()` | **[research](../research/SKILL.md)** |
|
|
91
|
-
| Deep research requested | `synapse_get_project_full_context()`, `synapse_get_related_works()`, then existing report via `synapse_get_deep_research_report()` | **[research](../research/SKILL.md)**; call `synapse_complete_task({ taskType: "deep_research" })` when done |
|
|
92
|
-
| Auto search triggered | `synapse_get_project_full_context()` and inspect existing related works | **[research](../research/SKILL.md)** to search, add related works, and complete the task if required |
|
|
93
|
-
| Synthesis refresh requested | `synapse_get_project_full_context()`, `synapse_get_documents({ type: "project_synthesis" })`, then `synapse_get_document()` if one exists | Save only if new results need analysis; `synapse_save_project_synthesis()` clears the active synthesis task |
|
|
94
|
-
| Autonomous loop or empty queue | `synapse_get_project_full_context()` and `synapse_list_compute_nodes({ researchProjectUuid })` | **[autonomy](../autonomy/SKILL.md)** to drive the CC-client loop |
|
|
95
|
-
| @mention or comment notification | `synapse_get_comments()` for the target when available | Reply with `synapse_add_comment()` using the `@[name](actorType:uuid)` format |
|
|
96
|
-
| Sub-agent start/session context | Use the injected experiment UUID, then `synapse_get_experiment()` | **[sessions](../sessions/SKILL.md)** for hook behavior and **[experiments](../experiments/SKILL.md)** for work execution |
|
|
97
|
-
|
|
98
|
-
## Minimum Tool Map
|
|
99
|
-
|
|
100
|
-
| Need | Tools |
|
|
101
|
-
|------|-------|
|
|
102
|
-
| Identity, assignments, notifications | `synapse_checkin`, `synapse_get_notifications`, `synapse_mark_notification_read` |
|
|
103
|
-
| Project context | `synapse_get_research_project`, `synapse_get_project_full_context` |
|
|
104
|
-
| Documents and synthesis | `synapse_get_documents`, `synapse_get_document`, `synapse_save_project_synthesis` |
|
|
105
|
-
| Literature and deep research | `synapse_search_papers`, `synapse_add_related_work`, `synapse_get_related_works`, `synapse_get_deep_research_report` |
|
|
106
|
-
| Research questions | `synapse_get_research_question` and research-question mutation tools when roles allow |
|
|
107
|
-
| Experiments | `synapse_get_assigned_experiments`, `synapse_get_experiment`, `synapse_create_experiment`, `synapse_start_experiment`, `synapse_report_experiment_progress`, `synapse_submit_experiment_results`, `synapse_propose_experiment` (autonomous loop only) |
|
|
108
|
-
| PI/Admin review | `synapse_review_experiment` |
|
|
109
|
-
| Compute | `synapse_list_compute_nodes`, `synapse_reserve_gpus`, `synapse_get_node_access_bundle` |
|
|
110
|
-
| Collaboration | `synapse_add_comment`, `synapse_get_comments`, `synapse_search_mentionables` |
|
|
111
|
-
| Task cleanup | `synapse_complete_task` except where a task-specific save/submit tool already clears state |
|
|
112
|
-
|
|
113
|
-
## Execution Rules
|
|
114
|
-
|
|
115
|
-
1. **Always check in first** -- call `synapse_checkin()` at session start.
|
|
116
|
-
2. **Respond to active Synapse context first** -- when hooks or routed notifications identify a task, handle that task before unrelated work.
|
|
117
|
-
3. **Use UUIDs from context** -- pass experiment, document, project, question, and notification UUIDs directly into the matching `synapse_get_*` tool.
|
|
118
|
-
4. **Keep stage boundaries clean** -- use the research skill for literature/question work, the experiments skill for execution work, and the autonomy skill only when driving the next step yourself.
|
|
119
|
-
5. **Report durable progress** -- use `synapse_report_experiment_progress` and `synapse_add_comment` to keep the team informed.
|
|
120
|
-
6. **Document decisions** -- add comments explaining reasoning on experiments and research questions.
|
|
121
|
-
7. **Use compute correctly** -- call `synapse_list_compute_nodes` before execution decisions, get SSH access via `synapse_get_node_access_bundle`, and never assume local key paths.
|
|
122
|
-
8. **Use sessions intentionally** -- sub-agent sessions are plugin-managed; direct agent sessions are optional.
|
|
123
|
-
|
|
124
|
-
## Shared References
|
|
125
|
-
|
|
126
|
-
- **[references/00-common-tools.md](references/00-common-tools.md)** -- full tool inventory by category
|
|
127
|
-
- **[references/01-setup.md](references/01-setup.md)** -- setup reference used by the `setup` skill
|
|
128
|
-
- **[references/02-research-workflow.md](references/02-research-workflow.md)** -- research reference used by the `research` skill
|
|
129
|
-
- **[references/03-experiment-workflow.md](references/03-experiment-workflow.md)** -- experiment reference used by the `experiments` skill
|
|
130
|
-
- **[references/04-autonomous-loop.md](references/04-autonomous-loop.md)** -- autonomy reference used by the `autonomy` skill
|
|
131
|
-
- **[references/05-session-sub-agent.md](references/05-session-sub-agent.md)** -- plugin hooks, session lifecycle, and multi-agent parallel execution reference used by the `sessions` skill
|
|
132
|
-
|
|
133
|
-
## Status Lifecycles
|
|
134
|
-
|
|
135
|
-
### Experiment Status Flow
|
|
136
|
-
```text
|
|
137
|
-
draft --> pending_review --> pending_start --> in_progress --> completed
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Research Question Status Flow
|
|
141
|
-
```text
|
|
142
|
-
open --> elaborating --> proposal_created --> completed
|
|
143
|
-
\ /
|
|
144
|
-
\--> closed <------------------------------/
|
|
145
|
-
```
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "synapse",
|
|
3
|
-
"version": "0.7.0",
|
|
4
|
-
"description": "Synapse research orchestration platform skill for Claude Code. Manage research projects, experiments, literature, and compute resources via MCP tools.",
|
|
5
|
-
"author": "Vincentwei1021",
|
|
6
|
-
"license": "AGPL-3.0",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"synapse",
|
|
9
|
-
"skill",
|
|
10
|
-
"research",
|
|
11
|
-
"ai-agent",
|
|
12
|
-
"mcp",
|
|
13
|
-
"experiments",
|
|
14
|
-
"compute",
|
|
15
|
-
"collaboration",
|
|
16
|
-
"claude-code"
|
|
17
|
-
],
|
|
18
|
-
"synapse": {
|
|
19
|
-
"category": "research",
|
|
20
|
-
"mcp_server": "synapse",
|
|
21
|
-
"files": {
|
|
22
|
-
"SKILL.md": "SKILL.md",
|
|
23
|
-
"references/00-common-tools.md": "references/00-common-tools.md",
|
|
24
|
-
"references/01-setup.md": "references/01-setup.md",
|
|
25
|
-
"references/02-research-workflow.md": "references/02-research-workflow.md",
|
|
26
|
-
"references/03-experiment-workflow.md": "references/03-experiment-workflow.md",
|
|
27
|
-
"references/04-autonomous-loop.md": "references/04-autonomous-loop.md",
|
|
28
|
-
"references/05-session-sub-agent.md": "references/05-session-sub-agent.md"
|
|
29
|
-
},
|
|
30
|
-
"requires": {
|
|
31
|
-
"mcp": ["synapse"]
|
|
32
|
-
},
|
|
33
|
-
"triggers": [
|
|
34
|
-
"synapse",
|
|
35
|
-
"checkin",
|
|
36
|
-
"research project",
|
|
37
|
-
"experiment",
|
|
38
|
-
"research question",
|
|
39
|
-
"compute",
|
|
40
|
-
"literature",
|
|
41
|
-
"propose experiment",
|
|
42
|
-
"session",
|
|
43
|
-
"sub-agent",
|
|
44
|
-
"plugin hook",
|
|
45
|
-
"deep research",
|
|
46
|
-
"autonomous loop"
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
# MCP Tools Reference
|
|
2
|
-
|
|
3
|
-
Endpoint: `POST /api/mcp` (HTTP Streamable transport)
|
|
4
|
-
|
|
5
|
-
Auth: `Authorization: Bearer syn_...`
|
|
6
|
-
|
|
7
|
-
Tool availability is enforced server-side by the agent's Synapse roles. Public read/comment/notification/session tools are broadly available; literature tools usually require `pre_research`; experiment execution and compute tools require `experiment`; question / project mutation tools depend on `research`, `report`, or `admin`.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Public Context
|
|
12
|
-
|
|
13
|
-
| Tool | Description |
|
|
14
|
-
|------|-------------|
|
|
15
|
-
| `synapse_checkin` | Agent check-in. Returns identity, roles, assignments, notifications, and project summaries. |
|
|
16
|
-
| `synapse_list_research_projects` | List visible research projects. |
|
|
17
|
-
| `synapse_get_research_project` | Get project details. |
|
|
18
|
-
| `synapse_get_project_full_context` | Get the canonical project context snapshot: questions, experiments with UUIDs, related-work paper titles, document references, synthesis hints, and compute availability summary. |
|
|
19
|
-
| `synapse_get_activity` | Get the project activity stream. |
|
|
20
|
-
| `synapse_get_documents` | List project documents. |
|
|
21
|
-
| `synapse_get_document` | Read a document in full. |
|
|
22
|
-
| `synapse_add_comment` | Add a durable comment. Prefer `research_question`, `experiment`, or `document` targets. |
|
|
23
|
-
| `synapse_get_comments` | Read the full discussion thread for an entity. |
|
|
24
|
-
| `synapse_get_notifications` | Fetch notifications. Unread notifications auto-mark as read unless `autoMarkRead: false`. |
|
|
25
|
-
| `synapse_mark_notification_read` | Explicitly mark a notification read when needed. Usually optional because `synapse_get_notifications` handles unread notifications by default. |
|
|
26
|
-
| `synapse_search_mentionables` | Search people / agents before composing an `@mention`. |
|
|
27
|
-
| `synapse_get_project_groups` | List project groups and summary metrics. |
|
|
28
|
-
| `synapse_get_project_group` | Read a single project group with its projects. |
|
|
29
|
-
| `synapse_get_group_dashboard` | Get aggregated project-group dashboard data. |
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Research Questions
|
|
34
|
-
|
|
35
|
-
Usually requires a research-oriented role.
|
|
36
|
-
|
|
37
|
-
| Tool | Description |
|
|
38
|
-
|------|-------------|
|
|
39
|
-
| `synapse_get_research_questions` | List research questions for a project. |
|
|
40
|
-
| `synapse_get_research_question` | Read one research question in detail. |
|
|
41
|
-
| `synapse_get_available_research_questions` | List claimable questions (`status=open`). |
|
|
42
|
-
| `synapse_claim_research_question` | Claim a question for elaboration. |
|
|
43
|
-
| `synapse_release_research_question` | Release a previously claimed question. |
|
|
44
|
-
| `synapse_update_research_question_status` | Move a question through `open -> elaborating -> proposal_created -> completed` as appropriate. |
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Experiments And Compute
|
|
49
|
-
|
|
50
|
-
Requires the `experiment` tool family.
|
|
51
|
-
|
|
52
|
-
| Tool | Description |
|
|
53
|
-
|------|-------------|
|
|
54
|
-
| `synapse_get_assigned_experiments` | List experiments assigned to the current agent. |
|
|
55
|
-
| `synapse_get_experiment` | Read one experiment in full. |
|
|
56
|
-
| `synapse_create_experiment` | Create a new experiment outside autonomous loop. Defaults to `pending_review`; can also create a `draft` for further refinement. |
|
|
57
|
-
| `synapse_update_experiment_status` | Move an experiment between `draft`, `pending_review`, and `pending_start` during planning or revision. Can also set `liveStatus` / `liveMessage`. |
|
|
58
|
-
| `synapse_update_experiment_plan` | Flesh out or revise an experiment plan: title, description, linked research question, priority. |
|
|
59
|
-
| `synapse_start_experiment` | Move an experiment into execution. Optionally reserve GPUs inline. |
|
|
60
|
-
| `synapse_reserve_gpus` | Reserve GPUs before starting when you want explicit control over allocation. |
|
|
61
|
-
| `synapse_report_experiment_progress` | Report live progress to the experiment card and timeline. Supports `liveStatus` such as `queuing`, `checking_resources`, or `running`. |
|
|
62
|
-
| `synapse_submit_experiment_results` | Finish an experiment and submit structured results. |
|
|
63
|
-
| `synapse_save_experiment_report` | Create or update the dedicated experiment result document after completion. |
|
|
64
|
-
| `synapse_propose_experiment` | Autonomous-loop only: propose the next experiment when the caller is the assigned loop agent. Human-review mode creates `pending_review`; full-auto mode creates `pending_start` and auto-assigns it back to the agent. Use `synapse_create_experiment` for user-directed terminal work. |
|
|
65
|
-
| `synapse_list_compute_nodes` | List pools, nodes, GPUs, and access details. |
|
|
66
|
-
| `synapse_get_node_access_bundle` | Get managed SSH access details and `privateKeyPemBase64`. |
|
|
67
|
-
| `synapse_sync_node_inventory` | Sync node instance metadata and GPU inventory. |
|
|
68
|
-
| `synapse_report_gpu_status` | Report GPU lifecycle or telemetry updates. |
|
|
69
|
-
| `synapse_get_repo_access` | Get repository credentials and the experiment's base branch when a project is repo-backed. |
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## PI / Admin Review
|
|
74
|
-
|
|
75
|
-
Requires `admin`, `pi`, or `pi_agent`.
|
|
76
|
-
|
|
77
|
-
| Tool | Description |
|
|
78
|
-
|------|-------------|
|
|
79
|
-
| `synapse_review_experiment` | Approve a pending experiment into `pending_start` or reject it back to `draft`. Use this for Claude Code terminal review flows. |
|
|
80
|
-
|
|
81
|
-
### `reviewNote` Formatting
|
|
82
|
-
|
|
83
|
-
`synapse_review_experiment` records `reviewNote` in:
|
|
84
|
-
- the activity entry,
|
|
85
|
-
- the recipient notification,
|
|
86
|
-
- and (on reject) a comment authored by the actor.
|
|
87
|
-
|
|
88
|
-
The wording matters because the actor is the agent — `reviewNote` is what makes the human voice visible in audit. Use these formats:
|
|
89
|
-
|
|
90
|
-
- **Verbal approve (Claude Code terminal):**
|
|
91
|
-
```
|
|
92
|
-
reviewNote: 'User verbally approved in terminal: "<exact words from the user>"'
|
|
93
|
-
```
|
|
94
|
-
- **Verbal reject (Claude Code terminal):** summarize the user's revision request in second-person Chinese, including a quoted phrase. Example:
|
|
95
|
-
```
|
|
96
|
-
reviewNote: '用户口头要求修改:把 batch size 改回 32(原话:"那个 batch size 改回 32 试试")'
|
|
97
|
-
```
|
|
98
|
-
The tool writes the comment and emits `experiment_revision_requested` automatically — **do not** also call `synapse_add_comment`.
|
|
99
|
-
- **Claude Code full-auto auto-approve:**
|
|
100
|
-
```
|
|
101
|
-
reviewNote: 'Full-auto session authorized by <ownerName> at <ISO time>. Self-review pass: <key points>.'
|
|
102
|
-
```
|
|
103
|
-
Or, if self-review failed:
|
|
104
|
-
```
|
|
105
|
-
reviewNote: 'Full-auto session authorized by <ownerName> at <ISO time>. Self-review skipped: <reason>.'
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
## Literature And Related Works
|
|
111
|
-
|
|
112
|
-
Usually requires `pre_research`.
|
|
113
|
-
|
|
114
|
-
| Tool | Description |
|
|
115
|
-
|------|-------------|
|
|
116
|
-
| `synapse_search_papers` | Search papers via DeepXiv hybrid search with arXiv fallback. |
|
|
117
|
-
| `synapse_read_paper_brief` | Fast paper summary. |
|
|
118
|
-
| `synapse_read_paper_head` | Section map plus section TLDRs. |
|
|
119
|
-
| `synapse_read_paper_section` | Read a single section in full. |
|
|
120
|
-
| `synapse_read_paper_full` | Read the full paper as Markdown. Use sparingly. |
|
|
121
|
-
| `synapse_add_related_work` | Add a paper to a project's related works. Duplicate adds are skipped. |
|
|
122
|
-
| `synapse_get_related_works` | List all papers already collected for a project. |
|
|
123
|
-
| `synapse_get_deep_research_report` | Load the current literature-review document, if one exists. |
|
|
124
|
-
| `synapse_save_deep_research_report` | Create or update the literature-review document and increment its version on update. |
|
|
125
|
-
| `synapse_complete_task` | Clear the active `auto_search` or `deep_research` task after a Synapse-triggered run finishes. |
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Sessions
|
|
130
|
-
|
|
131
|
-
| Tool | Description |
|
|
132
|
-
|------|-------------|
|
|
133
|
-
| `synapse_list_sessions` | List sessions for the current agent. |
|
|
134
|
-
| `synapse_get_session` | Read one session. |
|
|
135
|
-
| `synapse_create_session` | Create a session for direct work. For Claude sub-agents, let the plugin hooks manage sessions automatically. |
|
|
136
|
-
| `synapse_close_session` | Close a session. |
|
|
137
|
-
| `synapse_reopen_session` | Reopen a closed session instead of creating a duplicate. |
|
|
138
|
-
| `synapse_session_heartbeat` | Keep a session active. |
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## Compatibility Note
|
|
143
|
-
|
|
144
|
-
Legacy `ExperimentDesign` / `ExperimentRun` surfaces still exist in the repository for compatibility, but this Claude plugin intentionally centers the current `ResearchQuestion -> Experiment` workflow.
|