@synapse-research/synapse 0.2.11 → 0.2.12
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 +118 -118
- package/dist/.next/app-path-routes-manifest.json +38 -38
- 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.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.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 +38 -38
- package/dist/.next/server/chunks/8499.js +1 -1
- 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/dist/.next/server/server-reference-manifest.js +1 -1
- package/dist/.next/server/server-reference-manifest.json +1 -1
- package/dist/public/skill/aris-synapse-sync/SKILL.md +2 -2
- package/dist/public/synapse-plugin/.claude-plugin/plugin.json +1 -1
- package/dist/public/synapse-plugin/bin/on-post-create-experiment.sh +61 -0
- package/dist/public/synapse-plugin/bin/on-post-submit-results.sh +56 -0
- package/dist/public/synapse-plugin/bin/on-session-start.sh +2 -1
- package/dist/public/synapse-plugin/hooks/hooks.json +20 -0
- package/dist/public/synapse-plugin/skills/autonomy/SKILL.md +37 -0
- package/dist/public/synapse-plugin/skills/experiments/SKILL.md +52 -4
- package/dist/public/synapse-plugin/skills/sessions/SKILL.md +3 -1
- package/dist/public/synapse-plugin/skills/setup/SKILL.md +39 -4
- package/dist/public/synapse-plugin/skills/synapse/SKILL.md +2 -1
- package/dist/public/synapse-plugin/skills/synapse/references/00-common-tools.md +38 -1
- package/dist/public/synapse-plugin/skills/synapse/references/01-setup.md +28 -10
- package/dist/public/synapse-plugin/skills/synapse/references/03-experiment-workflow.md +4 -4
- package/dist/public/synapse-plugin/skills/synapse/references/05-session-sub-agent.md +3 -1
- package/package.json +1 -1
- /package/dist/.next/static/{duLVRogIrNQ1Tarxga53z → CTg26EE4IkxbdY0E6xEiL}/_buildManifest.js +0 -0
- /package/dist/.next/static/{duLVRogIrNQ1Tarxga53z → CTg26EE4IkxbdY0E6xEiL}/_ssgManifest.js +0 -0
|
@@ -33,10 +33,56 @@ Hand off to:
|
|
|
33
33
|
If `synapse_get_assigned_experiments` returns empty, do not idle. Ask the user which path:
|
|
34
34
|
|
|
35
35
|
1. **Execute an approved experiment** — list `pending_start` experiments in the project with `synapse_get_project_full_context` and ask which to start.
|
|
36
|
-
2. **Flesh out a quick idea** — call `synapse_get_project_full_context`, then draft a plan with `synapse_create_experiment` (defaults to `
|
|
36
|
+
2. **Flesh out a quick idea** — call `synapse_get_project_full_context`, then draft a plan with `synapse_create_experiment` (defaults to `draft`; run a self-review sub-agent before pushing to `pending_review` per the "Create → Self-Review → Pending Review → Verbal Approve" section below).
|
|
37
37
|
3. **Create the foundational experiment** — if the project has no completed experiments, offer the foundational template below.
|
|
38
38
|
4. **Enter the autonomous loop** — hand off to **[autonomy](../autonomy/SKILL.md)** to propose and auto-dispatch the next experiment.
|
|
39
39
|
|
|
40
|
+
## Create → Self-Review → Pending Review → Verbal Approve
|
|
41
|
+
|
|
42
|
+
Every agent-created experiment goes through this sequence before reaching `pending_review`.
|
|
43
|
+
|
|
44
|
+
1. `synapse_create_experiment(...)` — defaults to `draft`. The PostToolUse hook will remind you to run self-review next.
|
|
45
|
+
2. Spawn a self-review sub-agent with the `Task` tool. Use a prompt similar to:
|
|
46
|
+
```
|
|
47
|
+
Self-review experiment <experimentUuid> for project <projectUuid>.
|
|
48
|
+
Call synapse_get_experiment to read the plan. Then evaluate against the project's evaluationMethods:
|
|
49
|
+
- Is the objective specific and measurable?
|
|
50
|
+
- Is the methodology sound and reproducible?
|
|
51
|
+
- Do the success criteria align with the project's evaluation methods?
|
|
52
|
+
- Is the compute budget realistic given current availability (synapse_list_compute_nodes)?
|
|
53
|
+
Return a short verdict: "pass" or a bulleted list of concrete revisions.
|
|
54
|
+
Do NOT write back to Synapse — your verdict is consumed in-session by the main agent.
|
|
55
|
+
```
|
|
56
|
+
3. If the verdict surfaces issues, apply revisions with `synapse_update_experiment_plan({ experimentUuid, ... })`.
|
|
57
|
+
4. `synapse_update_experiment_status({ experimentUuid, status: "pending_review" })` to push the draft into review.
|
|
58
|
+
5. Present the self-review summary and the plan summary to the user in the terminal. Wait for a verbal answer.
|
|
59
|
+
6. **On verbal approve:**
|
|
60
|
+
```
|
|
61
|
+
synapse_review_experiment({
|
|
62
|
+
experimentUuid,
|
|
63
|
+
decision: "approved",
|
|
64
|
+
reviewNote: 'User verbally approved in terminal: "<exact words>"',
|
|
65
|
+
})
|
|
66
|
+
```
|
|
67
|
+
That call atomically transitions to `pending_start`, writes the activity, and emits `task_assigned` so execution can begin.
|
|
68
|
+
7. **On verbal reject:** summarize the user's revision request in second-person Chinese, including a quoted phrase from the user, and pass it as `reviewNote`:
|
|
69
|
+
```
|
|
70
|
+
synapse_review_experiment({
|
|
71
|
+
experimentUuid,
|
|
72
|
+
decision: "rejected",
|
|
73
|
+
reviewNote: '用户口头要求修改:…(原话:"…")',
|
|
74
|
+
})
|
|
75
|
+
```
|
|
76
|
+
The review tool writes the comment and emits `experiment_revision_requested` automatically — **do not** also call `synapse_add_comment`.
|
|
77
|
+
8. After a reject, the experiment is back in `draft`. Revise per feedback, run self-review again, then resubmit to `pending_review`.
|
|
78
|
+
9. **Full-auto mode** (set verbally via the `autonomy` skill, lives only in the current CC session): after step 4, skip steps 5–8 and immediately call `synapse_review_experiment` with the fixed full-auto template:
|
|
79
|
+
```
|
|
80
|
+
reviewNote: 'Full-auto session authorized by <ownerName> at <ISO time>. Self-review pass: <key points>.'
|
|
81
|
+
```
|
|
82
|
+
If self-review timed out or errored: `'Self-review skipped: <reason>.'`. Full-auto **never pauses** on advisory self-review output — it only exits on user-stop or hard external errors.
|
|
83
|
+
|
|
84
|
+
The `synapse_review_experiment` tool requires `admin` or `pi_agent` role. To run verbal-approve flows on Claude Code, configure the CC agent with one of those roles.
|
|
85
|
+
|
|
40
86
|
## Foundational First Experiment
|
|
41
87
|
|
|
42
88
|
If the project has no completed experiments yet, the first experiment is not a normal research run — it is the project's baseline infrastructure. Drive it through three bundled deliverables before any comparison work:
|
|
@@ -51,20 +97,20 @@ If the project has a repo, commit all three onto the base branch (or a per-exper
|
|
|
51
97
|
|
|
52
98
|
1. `synapse_checkin()` — refresh identity and assignments
|
|
53
99
|
2. Author or fetch the experiment
|
|
54
|
-
- New plan: `synapse_create_experiment(...)` (defaults to `
|
|
100
|
+
- New plan: `synapse_create_experiment(...)` (defaults to `draft`; run a self-review sub-agent and revise before pushing to `pending_review` per the section below)
|
|
55
101
|
- Existing assignment: `synapse_get_assigned_experiments()` then `synapse_get_experiment({ experimentUuid })`
|
|
56
102
|
3. If drafting or revising: `synapse_update_experiment_status({ status: "draft", liveStatus: "writing" })` + `synapse_update_experiment_plan(...)`, then `synapse_update_experiment_status({ status: "pending_review" })`
|
|
57
103
|
4. Before execution: `synapse_list_compute_nodes({ onlyAvailable: true, researchProjectUuid })`
|
|
58
104
|
5. Reserve compute: optional `synapse_reserve_gpus(...)` or inline via `synapse_start_experiment({ gpuUuids })`
|
|
59
105
|
6. `synapse_start_experiment({ experimentUuid, workingNotes })` — moves to `in_progress`
|
|
60
106
|
7. If remote compute: `synapse_get_node_access_bundle({ experimentUuid, nodeUuid })`, write the returned `privateKeyPemBase64` to a local PEM, `chmod 600`, SSH with the returned host/user/port
|
|
61
|
-
8. If repo-backed: `synapse_get_repo_access` → clone → branch from the experiment's base branch
|
|
107
|
+
8. If repo-backed: `synapse_get_repo_access` → clone → branch from the experiment's base branch (commit + push back to this repo at the end is mandatory)
|
|
62
108
|
9. Run the workload in a persistent remote shell (`tmux`/`screen`) with unbuffered output (`python -u …` or `PYTHONUNBUFFERED=1`) so logs never stall a tool call
|
|
63
109
|
10. Report progress with `synapse_report_experiment_progress` at milestones — `phase` ∈ `setup` | `training` | `evaluation` | `analysis`; `liveStatus` ∈ `checking_resources` | `queuing` | `running`
|
|
64
110
|
11. For long runs (>30 min), schedule periodic progress updates (cron on the remote node, or the main agent polling and calling `synapse_report_experiment_progress` on a timer) so the card never looks dead
|
|
65
111
|
12. Commit code/artifacts to the experiment branch or base branch; capture the commit SHA
|
|
66
112
|
13. Finish with `synapse_submit_experiment_results({ outcome, experimentResults, branch, commitSha })` — `outcome` ∈ `success` | `failure` | `inconclusive`; on failure include the error and partial results
|
|
67
|
-
14.
|
|
113
|
+
14. **Always** follow `synapse_submit_experiment_results` with `synapse_save_experiment_report({ experimentUuid, title, content })` — write a full markdown writeup (objective, methodology, results, analysis, charts where relevant). Do **not** post the report as a comment, and do **not** treat this step as optional even for `failure` / `inconclusive` runs
|
|
68
114
|
15. If revising per reviewer feedback, read the full thread first with `synapse_get_comments({ targetType: "experiment", targetUuid })` before editing the plan
|
|
69
115
|
|
|
70
116
|
## Core Rules
|
|
@@ -72,6 +118,8 @@ If the project has a repo, commit all three onto the base branch (or a per-exper
|
|
|
72
118
|
- **Never assume a server-local SSH key path exists.** Always fetch the access bundle and write the PEM locally.
|
|
73
119
|
- **One independent run per experiment card.** Do not bundle comparison runs, ablations, or parameter sweeps into a single experiment — create multiple cards.
|
|
74
120
|
- **Match the project description's language.** If the project brief is in Chinese, write the plan, progress, and report in Chinese.
|
|
121
|
+
- **If the project is repo-backed, you must commit back.** Whenever `synapse_get_repo_access` returns a configured repo, all experiment code, configs, and meaningful artifacts must be committed and pushed to that repo (on the experiment branch or merged to base), and the resulting `branch` + `commitSha` must be passed to `synapse_submit_experiment_results`. Local-only runs without a commit are not acceptable when a repo exists.
|
|
122
|
+
- **Always save an experiment report after submitting results.** Every `synapse_submit_experiment_results` call must be immediately followed by `synapse_save_experiment_report({ experimentUuid, title, content })` with a full markdown writeup. This applies to `success`, `failure`, and `inconclusive` outcomes alike.
|
|
75
123
|
- **Split plan / execution / report tools.** Use `synapse_update_experiment_plan` for plan edits, `synapse_report_experiment_progress` for live status, `synapse_submit_experiment_results` for completion, and `synapse_save_experiment_report` for the dedicated report. Do not substitute with comments.
|
|
76
124
|
- **Revision stays durable.** When a reviewer sends an experiment back, flip to `draft`, revise, then move it back to `pending_review`; leave a reply via `synapse_add_comment` using `@[name](actorType:uuid)` format to notify the reviewer.
|
|
77
125
|
- **Failures are data.** An experiment that crashes or shows a regression is still a valid submission: set `outcome: "failure"` (or `"inconclusive"`) and write up what happened in `experimentResults` and the report.
|
|
@@ -130,7 +130,9 @@ synapse_get_assigned_experiments({
|
|
|
130
130
|
# For any experiment still in_progress, read its latest state
|
|
131
131
|
synapse_get_experiment({ experimentUuid })
|
|
132
132
|
|
|
133
|
-
# Once all have completed, synthesize
|
|
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.
|
|
134
136
|
synapse_propose_experiment({ researchProjectUuid, title, description })
|
|
135
137
|
```
|
|
136
138
|
|
|
@@ -30,13 +30,33 @@ This skill does not cover day-to-day research or experiment execution. Hand off
|
|
|
30
30
|
## Recommended Flow
|
|
31
31
|
|
|
32
32
|
1. Get an API key from the Synapse **Agents** page.
|
|
33
|
-
2.
|
|
34
|
-
3. Restart Claude Code
|
|
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
35
|
4. Call `synapse_checkin()` and confirm expected roles/tools are visible.
|
|
36
36
|
|
|
37
|
-
|
|
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
38
|
|
|
39
|
-
|
|
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:
|
|
40
60
|
|
|
41
61
|
```json
|
|
42
62
|
{
|
|
@@ -52,6 +72,20 @@ The plugin ships a project-level template at `public/synapse-plugin/.mcp.json`.
|
|
|
52
72
|
}
|
|
53
73
|
```
|
|
54
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
|
+
|
|
55
89
|
## Verification
|
|
56
90
|
|
|
57
91
|
Use:
|
|
@@ -64,6 +98,7 @@ If the connection is wrong, check:
|
|
|
64
98
|
- the key starts with `syn_`
|
|
65
99
|
- `SYNAPSE_URL` is reachable
|
|
66
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)
|
|
67
102
|
- the agent has the roles needed for the tools you expect to use
|
|
68
103
|
|
|
69
104
|
## Reference
|
|
@@ -104,7 +104,8 @@ Each stage skill repeats this onboarding prompt from its own perspective when en
|
|
|
104
104
|
| Documents and synthesis | `synapse_get_documents`, `synapse_get_document`, `synapse_save_project_synthesis` |
|
|
105
105
|
| Literature and deep research | `synapse_search_papers`, `synapse_add_related_work`, `synapse_get_related_works`, `synapse_get_deep_research_report` |
|
|
106
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_start_experiment`, `synapse_report_experiment_progress`, `synapse_submit_experiment_results`, `synapse_propose_experiment` |
|
|
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` |
|
|
108
109
|
| Compute | `synapse_list_compute_nodes`, `synapse_reserve_gpus`, `synapse_get_node_access_bundle` |
|
|
109
110
|
| Collaboration | `synapse_add_comment`, `synapse_get_comments`, `synapse_search_mentionables` |
|
|
110
111
|
| Task cleanup | `synapse_complete_task` except where a task-specific save/submit tool already clears state |
|
|
@@ -61,7 +61,7 @@ Requires the `experiment` tool family.
|
|
|
61
61
|
| `synapse_report_experiment_progress` | Report live progress to the experiment card and timeline. Supports `liveStatus` such as `queuing`, `checking_resources`, or `running`. |
|
|
62
62
|
| `synapse_submit_experiment_results` | Finish an experiment and submit structured results. |
|
|
63
63
|
| `synapse_save_experiment_report` | Create or update the dedicated experiment result document after completion. |
|
|
64
|
-
| `synapse_propose_experiment` |
|
|
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
65
|
| `synapse_list_compute_nodes` | List pools, nodes, GPUs, and access details. |
|
|
66
66
|
| `synapse_get_node_access_bundle` | Get managed SSH access details and `privateKeyPemBase64`. |
|
|
67
67
|
| `synapse_sync_node_inventory` | Sync node instance metadata and GPU inventory. |
|
|
@@ -70,6 +70,43 @@ Requires the `experiment` tool family.
|
|
|
70
70
|
|
|
71
71
|
---
|
|
72
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
|
+
|
|
73
110
|
## Literature And Related Works
|
|
74
111
|
|
|
75
112
|
Usually requires `pre_research`.
|
|
@@ -28,27 +28,44 @@ If you do not have an API key yet:
|
|
|
28
28
|
|
|
29
29
|
## 2. MCP Server Configuration
|
|
30
30
|
|
|
31
|
-
Synapse MCP uses the HTTP Streamable transport.
|
|
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
32
|
|
|
33
|
-
The
|
|
34
|
-
|
|
35
|
-
Replace `<BASE_URL>` with the Synapse address (for example `https://synapse.example.com` or `http://localhost:3000`).
|
|
33
|
+
The bundled file uses env placeholders:
|
|
36
34
|
|
|
37
35
|
```json
|
|
38
36
|
{
|
|
39
37
|
"mcpServers": {
|
|
40
38
|
"synapse": {
|
|
41
39
|
"type": "http",
|
|
42
|
-
"url": "
|
|
40
|
+
"url": "${SYNAPSE_URL}/api/mcp",
|
|
43
41
|
"headers": {
|
|
44
|
-
"Authorization": "Bearer
|
|
42
|
+
"Authorization": "Bearer ${SYNAPSE_API_KEY}"
|
|
45
43
|
}
|
|
46
44
|
}
|
|
47
45
|
}
|
|
48
46
|
}
|
|
49
47
|
```
|
|
50
48
|
|
|
51
|
-
|
|
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.
|
|
52
69
|
|
|
53
70
|
### Optional: Project Filtering
|
|
54
71
|
|
|
@@ -88,9 +105,10 @@ A successful response includes your agent identity, roles, current assignments,
|
|
|
88
105
|
|
|
89
106
|
If it fails, check:
|
|
90
107
|
- Is the API key correct and does it start with `syn_`?
|
|
91
|
-
- Is the URL reachable?
|
|
92
|
-
- Did you restart Claude Code
|
|
93
|
-
-
|
|
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.
|
|
94
112
|
|
|
95
113
|
---
|
|
96
114
|
|
|
@@ -208,7 +208,7 @@ This is the detailed flow for moving an experiment through `in_progress` to `com
|
|
|
208
208
|
|
|
209
209
|
9. **Monitoring — short runs** (a few minutes): skip the cron, report progress inline at setup / mid-training / evaluation / analysis transitions.
|
|
210
210
|
|
|
211
|
-
10. **Commit code and artifacts** — commit configs, scripts, and meaningful artifacts to the experiment branch (or base branch) and
|
|
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
212
|
|
|
213
213
|
11. **Submit results**
|
|
214
214
|
|
|
@@ -227,7 +227,7 @@ This is the detailed flow for moving an experiment through `in_progress` to `com
|
|
|
227
227
|
|
|
228
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
229
|
|
|
230
|
-
12. **Save the dedicated experiment report** —
|
|
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
231
|
|
|
232
232
|
```text
|
|
233
233
|
synapse_save_experiment_report({
|
|
@@ -237,7 +237,7 @@ This is the detailed flow for moving an experiment through `in_progress` to `com
|
|
|
237
237
|
})
|
|
238
238
|
```
|
|
239
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.
|
|
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
241
|
|
|
242
242
|
13. **Match the project description's language** — if the project brief is in Chinese, write plan, progress messages, and report in Chinese.
|
|
243
243
|
|
|
@@ -313,7 +313,7 @@ When a reviewer sends `pending_review` back to `draft`:
|
|
|
313
313
|
8. Run workload in tmux + unbuffered python
|
|
314
314
|
9. `synapse_report_experiment_progress()` at milestones
|
|
315
315
|
10. `synapse_submit_experiment_results()` — success, failure, or inconclusive
|
|
316
|
-
11. `synapse_save_experiment_report()`
|
|
316
|
+
11. `synapse_save_experiment_report()` — **always** runs immediately after submit, regardless of outcome
|
|
317
317
|
12. `synapse_add_comment()` for durable findings and mention the reviewer
|
|
318
318
|
|
|
319
319
|
For parallel multi-experiment dispatch (main agent orchestrates, sub-agents execute), see **[05-session-sub-agent.md](05-session-sub-agent.md)**.
|
|
@@ -184,7 +184,9 @@ synapse_get_assigned_experiments({
|
|
|
184
184
|
# For any experiment still in_progress, read its latest state:
|
|
185
185
|
synapse_get_experiment({ experimentUuid })
|
|
186
186
|
|
|
187
|
-
# Once all have completed, synthesize
|
|
187
|
+
# Once all have completed, synthesize. If this is the assigned autonomous-loop
|
|
188
|
+
# agent, propose follow-ups; otherwise use synapse_create_experiment for
|
|
189
|
+
# user-directed terminal work.
|
|
188
190
|
synapse_save_project_synthesis({ researchProjectUuid, title, content })
|
|
189
191
|
synapse_propose_experiment({ researchProjectUuid, title, description })
|
|
190
192
|
```
|
package/package.json
CHANGED
/package/dist/.next/static/{duLVRogIrNQ1Tarxga53z → CTg26EE4IkxbdY0E6xEiL}/_buildManifest.js
RENAMED
|
File without changes
|
|
File without changes
|