@paradigma-inc/flywheel 0.1.16 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +8 -0
  2. package/package.json +1 -1
  3. package/skills/flywheel/SKILL.md +1 -0
  4. package/skills/flywheel/compute/managed-compute.md +111 -2
  5. package/skills/flywheel/references/experiment-design-protocol.md +1 -1
  6. package/skills/flywheel/references/flywheel-mcp-tool-map.md +130 -142
  7. package/skills/flywheel/setting-up-flywheel/updating-flywheel-mcp.md +8 -0
  8. package/skills/flywheel-auto/SKILL.md +14 -6
  9. package/skills/flywheel-auto/evals/evals.json +6 -0
  10. package/skills/flywheel-auto/references/ARTIFACTS.md +46 -216
  11. package/skills/flywheel-auto/references/INTERFACES.md +196 -195
  12. package/skills/flywheel-auto/references/experiment-design-protocol-autonomous.md +62 -0
  13. package/skills/flywheel-auto/references/experiment-design-protocol.md +1 -1
  14. package/skills/flywheel-auto/references/flywheel-mcp-tool-map.md +130 -142
  15. package/skills/flywheel-lookahead/SKILL.md +23 -15
  16. package/skills/flywheel-lookahead/agents/openai.yaml +3 -3
  17. package/skills/flywheel-lookahead/evals/evals.json +13 -1
  18. package/skills/flywheel-lookahead/references/ARTIFACTS.md +46 -216
  19. package/skills/flywheel-lookahead/references/INTERFACES.md +196 -195
  20. package/skills/flywheel-lookahead/references/flywheel-mcp-tool-map.md +130 -142
  21. package/skills/flywheel-prove/SKILL.md +163 -0
  22. package/skills/flywheel-prove/agents/interface.yaml +4 -0
  23. package/skills/flywheel-prove/assets/pipeline_template/bin/tproof +3 -0
  24. package/skills/flywheel-prove/assets/pipeline_template/bin/tproof.cmd +2 -0
  25. package/skills/flywheel-prove/assets/pipeline_template/logs/.gitkeep +1 -0
  26. package/skills/flywheel-prove/assets/pipeline_template/pyproject.toml +23 -0
  27. package/skills/flywheel-prove/assets/pipeline_template/scripts/smoke_test.cmd +2 -0
  28. package/skills/flywheel-prove/assets/pipeline_template/scripts/smoke_test.sh +3 -0
  29. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/__init__.py +1 -0
  30. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/cli.py +298 -0
  31. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/constants.py +10 -0
  32. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/layout.py +51 -0
  33. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/leanops.py +116 -0
  34. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/runstore.py +58 -0
  35. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/tasking.py +94 -0
  36. package/skills/flywheel-prove/assets/pipeline_template/workspace/prompts/fill_sorries.txt +3 -0
  37. package/skills/flywheel-prove/references/workflow.md +193 -0
  38. package/skills/flywheel-prove/scripts/scaffold_pipeline.py +111 -0
  39. package/skills/flywheel-reproduce/SKILL.md +31 -23
  40. package/skills/flywheel-reproduce/evals/evals.json +7 -1
  41. package/skills/flywheel-reproduce/references/ARTIFACTS.md +46 -216
  42. package/skills/flywheel-reproduce/references/INTERFACES.md +196 -195
  43. package/skills/flywheel-reproduce/references/experiment-design-protocol.md +1 -1
  44. package/skills/flywheel-reproduce/references/flywheel-mcp-tool-map.md +130 -142
  45. package/skills/flywheel-reproduce/references/source-blog.md +35 -0
  46. package/skills/flywheel-reproduce/references/source-generic.md +30 -0
  47. package/skills/flywheel-reproduce/references/source-notes.md +35 -0
  48. package/skills/flywheel-reproduce/references/source-paper.md +89 -0
  49. package/skills/flywheel-reproduce/references/source-wiki.md +36 -0
  50. package/skills/flywheel-to-graph/SKILL.md +27 -21
  51. package/skills/flywheel-to-graph/evals/evals.json +7 -1
  52. package/skills/flywheel-to-graph/references/ARTIFACTS.md +46 -216
  53. package/skills/flywheel-to-graph/references/INTERFACES.md +196 -195
  54. package/skills/flywheel-to-graph/references/flywheel-mcp-tool-map.md +130 -142
  55. package/skills/flywheel-to-graph/references/source-blog.md +34 -0
  56. package/skills/flywheel-to-graph/references/source-generic.md +29 -0
  57. package/skills/flywheel-to-graph/references/source-notes.md +34 -0
  58. package/skills/flywheel-to-graph/references/source-paper.md +85 -0
  59. package/skills/flywheel-to-graph/references/source-wiki.md +35 -0
  60. package/src/cli.mjs +69 -3
@@ -1,203 +1,204 @@
1
1
  # Interfaces
2
2
 
3
- Canonical reference for Flywheel user-facing interfaces and public contracts.
4
-
5
- Last updated: 2026-04-08
6
-
7
- ## Primary Clients
8
-
9
- - `project/flywheel-webui` - canonical web product UI
10
- - `project/flywheel-api` - canonical programmatic client interface (local + HTTP)
11
- - MCP hosts (Codex/Claude/ChatGPT) via `/mcp-server`
3
+ Canonical reference for Flywheel MCP public interfaces and contract pointers.
4
+
5
+ ## Canonical Contract References
6
+
7
+ - `flywheel_get_contract` is the top-level contract entry point.
8
+ - `flywheel_get_contract_section(section_id)` returns section-scoped payloads.
9
+ - Section order:
10
+ - `quickstart` (Quickstart): Recommended first calls and section read order for onboarding.
11
+ - `graph` (Graph): Node model, graph topology guidance, and durable behavior rules.
12
+ - `stage_commit` (Stage and commit): Stage/commit operations, commit-time validation requirements, and reproducibility guidance.
13
+ - `sharing` (Sharing): Sharing modes, derived visibility, collaborator roles, and query translation.
14
+ - `artifacts` (Artifacts): Prepare/upload/finalize requirements and artifact type rules.
15
+ - `compute` (Compute): Lease ownership, token-scoped control, approval session, and budget source semantics.
16
+ - `compute/troubleshooting_v1` (Compute Troubleshooting v1): Provider-specific acquire/retry hints for launch kwargs and request tuning.
17
+ - `campaign` (Campaign Contract): Campaign projection and budget contracts plus template section pointers.
12
18
 
13
19
  ## Canonical Entity Model
14
20
 
15
- All interfaces operate on the same core entities:
16
-
17
- - node
18
- - node edge (branch/merge graph links)
19
- - artifact
20
- - execution
21
- - compute lease
22
- - compute budget
23
- - compute grant (session-scoped)
24
-
25
- Node snapshots are the canonical durable contract for resume, review, and
26
- cross-client interoperability.
27
-
28
- ## Core HTTP Surface
29
-
30
- ### Node lifecycle and graph
31
-
32
- - `GET /mcp/nodes`
33
- - `GET /mcp/nodes/{node_id}`
34
- - `GET /mcp/nodes/{node_id}/tree`
35
- - `POST /mcp/nodes/stage/create`
36
- - `PATCH /mcp/nodes/{node_id}/stage/update`
37
- - `POST /mcp/nodes/{node_id}/commit`
38
- - `POST /mcp/nodes/{node_id}/branch`
39
- - `POST /mcp/nodes/merge`
40
- - `DELETE /mcp/nodes/{node_id}`
41
- - `POST /mcp/nodes/bulk-delete`
42
-
43
- ### Artifact lifecycle
44
-
45
- - `POST /mcp/nodes/{node_id}/artifacts/uploads/prepare`
46
- - `POST /mcp/nodes/{node_id}/artifacts/uploads/finalize`
47
- - `GET /mcp/nodes/{node_id}/artifacts`
48
- - `GET /mcp/nodes/{node_id}/artifacts/{artifact_id}`
49
- - `GET /mcp/nodes/{node_id}/artifacts/{artifact_id}/preview`
50
- - `DELETE /mcp/nodes/{node_id}/artifacts/{artifact_id}`
51
- - `PUT /mcp/artifacts/uploads/{upload_id}`
52
-
53
- ### Execution lifecycle
54
-
55
- - `POST /mcp/nodes/{node_id}/executions`
56
- - `GET /mcp/nodes/{node_id}/executions`
57
- - `POST /mcp/nodes/{node_id}/executions/{execution_id}/terminate`
58
-
59
- ### Compute catalog
60
-
61
- - `GET /compute/providers`
62
- - `GET /compute/offers`
63
- - `GET /compute/offers/{provider}`
64
-
65
- ### Managed compute and budgets
66
-
67
- - `GET /mcp/nodes/{node_id}/compute/options`
68
- - `POST /mcp/nodes/{node_id}/compute/acquire`
69
- - `GET /mcp/compute/status`
70
- - `GET /mcp/compute/connection`
71
- - `POST /mcp/compute/release`
72
- - `POST /mcp/compute/release-all`
73
- - `GET /mcp/compute/grants`
74
- - `GET /mcp/nodes/{node_id}/budgets`
75
- - `GET /mcp/nodes/{root_node_id}/campaign-budgets`
76
- - `POST /mcp/nodes/{root_node_id}/campaign-budgets`
77
- - `PATCH /mcp/nodes/{root_node_id}/campaign-budgets/{compute_budget_id}`
78
- - `DELETE /mcp/nodes/{root_node_id}/campaign-budgets/{compute_budget_id}`
79
-
80
- ### Sharing, tags, and audit
81
-
82
- - `GET /mcp/nodes/{node_id}/sharing`
83
- - `PUT /mcp/nodes/{node_id}/sharing`
84
- - `POST /mcp/nodes/sharing/bulk`
85
- - `GET /mcp/nodes/{node_id}/audit`
86
- - `POST /mcp/nodes/{root_node_id}/tags`
87
- - `PATCH /mcp/nodes/{root_node_id}/tags/{tag_id}`
88
- - `DELETE /mcp/nodes/{root_node_id}/tags/{tag_id}`
89
- - `PUT /mcp/nodes/{node_id}/tags`
90
-
91
- ### Export and summaries
92
-
93
- - `POST /mcp/export`
94
- - `POST /mcp/import`
95
- - `POST /mcp/export-summary`
96
- - `POST /mcp/export-summary-stream`
97
- - `POST /mcp/export-summary-pdf`
98
- - `POST /mcp/export-summary-render-pdf`
99
-
100
- ### Auth and integrations
101
-
102
- - `GET /auth/status`
103
- - `GET /auth/accounts`
104
- - `POST /auth/accounts/merge/source-proof`
105
- - `POST /auth/accounts/merge/preview`
106
- - `POST /auth/accounts/merge`
107
- - `POST /auth/accounts/detach`
108
- - `GET /auth/integrations/status`
109
- - `PUT /auth/integrations/wandb`
110
- - `PUT /auth/integrations/huggingface`
111
- - `DELETE /auth/integrations/wandb`
112
- - `DELETE /auth/integrations/huggingface`
113
-
114
- ### Analytics
115
-
116
- - `POST /analytics/events`
117
- - `GET /admin/analytics/kpis`
118
- - `GET /admin/analytics/overview`
21
+ - Canonical durable entity: `node`.
22
+ - Node kind values: `untyped`, `empirical`, `insight`.
23
+ - Node references: `node_id`, `slug_name`.
24
+ - `slug_name` format: `adjective-noun-####` (immutable when present).
25
+ - Approval sessions and compute grants are distinct entities; approvals are session-scoped bindings.
26
+ - Campaign projections are derived from root config and attempt submission JSON artifacts.
119
27
 
120
28
  ## MCP Tool Surface
121
29
 
122
- ### Discovery and sharing tools
123
-
124
- - `flywheel_auth_status`
125
- - `flywheel_get_credits_balance`
126
- - `flywheel_list_nodes`
127
- - `flywheel_get_node`
128
- - `flywheel_get_node_tree`
129
- - `flywheel_get_node_sharing`
130
- - `flywheel_set_node_sharing`
131
- - `flywheel_bulk_set_node_sharing`
132
- - `flywheel_create_node_tag`
133
- - `flywheel_update_node_tag`
134
- - `flywheel_delete_node_tag`
135
- - `flywheel_set_node_tag_assignments`
136
-
137
- ### Node and graph tools
138
-
139
- - `flywheel_stage_node_create`
140
- - `flywheel_stage_node_update`
141
- - `flywheel_commit_node`
142
- - `flywheel_branch_node`
143
- - `flywheel_merge_nodes`
144
- - `flywheel_delete_node`
145
- - `flywheel_bulk_delete_nodes`
146
-
147
- ### Artifact tools
148
-
149
- - `flywheel_prepare_artifact_uploads`
150
- - `flywheel_finalize_artifact_uploads`
151
- - `flywheel_list_artifacts`
152
- - `flywheel_get_artifact`
153
- - `flywheel_get_artifact_preview`
154
- - `flywheel_delete_artifact`
155
-
156
- ### Execution tools
157
-
158
- - `flywheel_launch_execution`
159
- - `flywheel_list_executions`
160
- - `flywheel_terminate_execution`
161
-
162
- ### Compute lease and budget tools
163
-
164
- - `flywheel_compute_list_options`
165
- - `flywheel_request_compute_grant_approval`
166
- - `flywheel_list_compute_grants`
167
- - `flywheel_compute_acquire`
168
- - `flywheel_compute_status`
169
- - `flywheel_compute_connection`
170
- - `flywheel_compute_release`
171
- - `flywheel_compute_release_all`
172
-
173
- ### Campaign budget tools
174
-
175
- - `flywheel_list_campaign_budgets`
176
- - `flywheel_create_campaign_budget`
177
- - `flywheel_update_campaign_budget`
178
- - `flywheel_revoke_campaign_budget`
179
-
180
- ### Contract, audit, and export tools
181
-
182
- - `flywheel_get_contract`
183
- - `flywheel_list_audit`
184
- - `flywheel_summarize_node_tree`
185
- - `flywheel_export_subgraph`
186
- - `flywheel_import_subgraph`
187
- - `flywheel_export_summary`
188
- - `flywheel_export_summary_stream`
189
- - `flywheel_export_summary_pdf`
190
- - `flywheel_export_summary_render_pdf`
191
-
192
- ## Legacy Archival Export
193
-
194
- Experimental settings keep legacy history export available as an archival
195
- migration aid. This path is read-only and outside canonical node workflows.
196
-
197
- ## Related Docs
198
-
199
- - `docs/flywheel/CONCEPT.md`
200
- - `docs/flywheel/FLYWHEEL_MCP.md`
201
- - `docs/flywheel/PROVISIONING.md`
202
- - `docs/flywheel/ARTIFACTS.md`
203
- - `docs/flywheel/GIT_INTEGRATION.md`
30
+ ### Discovery and sharing
31
+
32
+ - `flywheel_auth_status` (read; scopes: `read`; core surface; binding: `operation`)
33
+ - `flywheel_get_credits_balance` (read; scopes: `read`; core surface; binding: `operation`)
34
+ - `flywheel_updates_list` (read; scopes: `read`; core surface; binding: `operation`)
35
+ - `flywheel_updates_hide` (mutating; scopes: `write`; core surface; binding: `operation`)
36
+ - `flywheel_updates_hide_all_active` (mutating; scopes: `write`; core surface; binding: `operation`)
37
+ - `flywheel_updates_unhide` (mutating; scopes: `write`; core surface; binding: `operation`)
38
+ - `flywheel_list_nodes` (read; scopes: `read`; full-surface only; binding: `operation`)
39
+ - `flywheel_resolve_node_slug` (read; scopes: `read`; core surface; binding: `operation`)
40
+ - `flywheel_get_node_sharing` (read; scopes: `read`; full-surface only; binding: `operation`)
41
+ - `flywheel_set_sharing_for_node` (mutating; scopes: `write`; full-surface only; binding: `operation`)
42
+ - `flywheel_set_sharing_for_nodes` (mutating; scopes: `write`; full-surface only; binding: `operation`)
43
+ - `flywheel_get_node` (read; scopes: `read`; core surface; binding: `operation`)
44
+ - `flywheel_create_node_tag` (mutating; scopes: `write`; full-surface only; binding: `operation`)
45
+ - `flywheel_update_node_tag` (mutating; scopes: `write`; full-surface only; binding: `operation`)
46
+ - `flywheel_delete_node_tag` (mutating; scopes: `write`; full-surface only; binding: `operation`)
47
+ - `flywheel_set_node_tag_assignments` (mutating; scopes: `write`; full-surface only; binding: `operation`)
48
+ - `flywheel_get_node_tree` (read; scopes: `read`; full-surface only; binding: `operation`)
49
+ - `flywheel_get_node_ancestry` (read; scopes: `read`; full-surface only; binding: `operation`)
50
+ - `flywheel_get_campaign_snapshot` (read; scopes: `read`; core surface; binding: `operation`)
51
+ - `flywheel_list_audit` (read; scopes: `read`; full-surface only; binding: `operation`)
52
+
53
+ ### Node stage and commit
54
+
55
+ - `flywheel_commit_new_node` (mutating; scopes: `write`; full-surface only; binding: `operation`)
56
+ - `flywheel_acquire_stage_lease` (mutating; scopes: `write`; full-surface only; binding: `operation`)
57
+ - `flywheel_heartbeat_stage_lease` (mutating; scopes: `write`; full-surface only; binding: `operation`)
58
+ - `flywheel_release_stage_lease` (mutating; scopes: `write`; full-surface only; binding: `operation`)
59
+ - `flywheel_commit_node` (mutating; scopes: `write`; core surface; binding: `operation`)
60
+ - `flywheel_branch_node` (mutating; scopes: `write`; full-surface only; binding: `operation`)
61
+ - `flywheel_merge_nodes` (mutating; scopes: `write`; full-surface only; binding: `operation`)
62
+ - `flywheel_add_parent` (mutating; scopes: `write`; full-surface only; binding: `operation`)
63
+ - `flywheel_remove_parent` (mutating; scopes: `write`; full-surface only; binding: `operation`)
64
+ - `flywheel_delete_node` (mutating; scopes: `write`; full-surface only; binding: `operation`)
65
+ - `flywheel_bulk_delete_nodes` (mutating; scopes: `write`; full-surface only; binding: `operation`)
66
+
67
+ ### Artifacts
68
+
69
+ - `flywheel_prepare_artifact_uploads` (mutating; scopes: `write`; core surface; binding: `binding_helper`)
70
+ - `flywheel_finalize_artifact_uploads` (mutating; scopes: `write`; core surface; binding: `binding_helper`)
71
+ - `flywheel_list_artifacts` (read; scopes: `read`; core surface; binding: `operation`)
72
+ - `flywheel_get_artifact` (read; scopes: `read`; core surface; binding: `operation`)
73
+ - `flywheel_delete_artifact` (mutating; scopes: `write`; core surface; binding: `operation`)
74
+ - `flywheel_set_artifact_note` (mutating; scopes: `write`; core surface; binding: `operation`)
75
+
76
+ ### Executions
77
+
78
+ - `flywheel_launch_execution` (mutating; scopes: `write`; core surface; binding: `operation`)
79
+ - `flywheel_list_executions` (read; scopes: `read`; core surface; binding: `operation`)
80
+ - `flywheel_terminate_execution` (mutating; scopes: `write`; core surface; binding: `operation`)
81
+
82
+ ### Compute and budgets
83
+
84
+ - `flywheel_compute_list_options` (read; scopes: `compute`; core surface; binding: `operation`)
85
+ - `flywheel_compute_status` (read; scopes: `compute`; core surface; binding: `operation`)
86
+ - `flywheel_compute_connection` (read; scopes: `compute`; core surface; binding: `operation`)
87
+ - `flywheel_approval_session_heartbeat` (read; scopes: `compute`; core surface; binding: `operation`)
88
+ - `flywheel_list_approval_sessions` (read; scopes: `compute`; core surface; binding: `operation`)
89
+ - `flywheel_expire_approval_session` (mutating; scopes: `compute`; core surface; binding: `operation`)
90
+ - `flywheel_request_compute_grant_approval` (mutating; scopes: `compute`; core surface; binding: `operation`)
91
+ - `flywheel_list_compute_grants` (read; scopes: `compute`; core surface; binding: `operation`)
92
+ - `flywheel_list_campaign_budgets` (read; scopes: `compute`; full-surface only; binding: `operation`)
93
+ - `flywheel_create_campaign_budget` (mutating; scopes: `compute`; full-surface only; binding: `operation`)
94
+ - `flywheel_update_campaign_budget` (mutating; scopes: `compute`; full-surface only; binding: `operation`)
95
+ - `flywheel_revoke_campaign_budget` (mutating; scopes: `compute`; full-surface only; binding: `operation`)
96
+ - `flywheel_compute_acquire` (mutating; scopes: `compute`; core surface; binding: `operation`)
97
+ - `flywheel_compute_release` (mutating; scopes: `compute`; core surface; binding: `operation`)
98
+ - `flywheel_compute_release_all` (mutating; scopes: `compute`; core surface; binding: `operation`)
99
+
100
+ ### Contract, audit, and export
101
+
102
+ - `flywheel_get_contract` (read; scopes: `read`; core surface; binding: `operation`)
103
+ - `flywheel_get_contract_section` (read; scopes: `read`; core surface; binding: `operation`)
104
+ - `flywheel_export_subgraph` (read; scopes: `read`; full-surface only; binding: `operation`)
105
+ - `flywheel_import_subgraph` (mutating; scopes: `write`; full-surface only; binding: `operation`)
106
+ - `flywheel_summarize_node_tree` (read; scopes: `read`; full-surface only; binding: `operation`)
107
+ - `flywheel_export_summary` (read; scopes: `read`; full-surface only; binding: `operation`)
108
+ - `flywheel_export_summary_stream` (read; scopes: `read`; full-surface only; binding: `operation`)
109
+ - `flywheel_export_summary_pdf` (read; scopes: `read`; full-surface only; binding: `operation`)
110
+ - `flywheel_export_summary_render_pdf` (read; scopes: `read`; full-surface only; binding: `operation`)
111
+
112
+ ## HTTP Surface
113
+
114
+ ### Discovery and sharing
115
+
116
+ - `GET /auth/status` -> `flywheel_auth_status`
117
+ - `GET /credits` -> `flywheel_get_credits_balance`
118
+ - `GET /mcp/updates` -> `flywheel_updates_list`
119
+ - `POST /mcp/updates/{announcement_id}/hide` -> `flywheel_updates_hide`
120
+ - `POST /mcp/updates/hide-all-active` -> `flywheel_updates_hide_all_active`
121
+ - `DELETE /mcp/updates/{announcement_id}/hide` -> `flywheel_updates_unhide`
122
+ - `GET /mcp/nodes` -> `flywheel_list_nodes`
123
+ - `GET /mcp/nodes/resolve-by-slug` -> `flywheel_resolve_node_slug`
124
+ - `GET /mcp/nodes/{node_id}/sharing` -> `flywheel_get_node_sharing`
125
+ - `PUT /mcp/nodes/{node_id}/sharing` -> `flywheel_set_sharing_for_node`
126
+ - `POST /mcp/nodes/sharing/bulk` -> `flywheel_set_sharing_for_nodes`
127
+ - `GET /mcp/nodes/{node_id}` -> `flywheel_get_node`
128
+ - `POST /mcp/nodes/{root_node_id}/tags` -> `flywheel_create_node_tag`
129
+ - `PATCH /mcp/nodes/{root_node_id}/tags/{tag_id}` -> `flywheel_update_node_tag`
130
+ - `DELETE /mcp/nodes/{root_node_id}/tags/{tag_id}` -> `flywheel_delete_node_tag`
131
+ - `PUT /mcp/nodes/{node_id}/tags` -> `flywheel_set_node_tag_assignments`
132
+ - `GET /mcp/nodes/{node_id}/tree` -> `flywheel_get_node_tree`
133
+ - `GET /mcp/nodes/{node_id}/ancestry` -> `flywheel_get_node_ancestry`
134
+ - `GET /mcp/nodes/{node_id}/campaign/snapshot` -> `flywheel_get_campaign_snapshot`
135
+ - `GET /mcp/nodes/{node_id}/audit` -> `flywheel_list_audit`
136
+
137
+ ### Node stage and commit
138
+
139
+ - `POST /mcp/nodes/commit-new` -> `flywheel_commit_new_node`
140
+ - `POST /mcp/nodes/{node_id}/stage/lease/acquire` -> `flywheel_acquire_stage_lease`
141
+ - `POST /mcp/nodes/{node_id}/stage/lease/heartbeat` -> `flywheel_heartbeat_stage_lease`
142
+ - `POST /mcp/nodes/{node_id}/stage/lease/release` -> `flywheel_release_stage_lease`
143
+ - `POST /mcp/nodes/{node_id}/commit` -> `flywheel_commit_node`
144
+ - `POST /mcp/nodes/{node_id}/branch` -> `flywheel_branch_node`
145
+ - `POST /mcp/nodes/merge` -> `flywheel_merge_nodes`
146
+ - `POST /mcp/nodes/{node_id}/parents/add` -> `flywheel_add_parent`
147
+ - `POST /mcp/nodes/{node_id}/parents/remove` -> `flywheel_remove_parent`
148
+ - `DELETE /mcp/nodes/{node_id}` -> `flywheel_delete_node`
149
+ - `POST /mcp/nodes/bulk-delete` -> `flywheel_bulk_delete_nodes`
150
+
151
+ ### Artifacts
152
+
153
+ - `POST /mcp/nodes/{node_id}/artifacts/uploads/prepare` -> `flywheel_prepare_artifact_uploads`
154
+ - `POST /mcp/nodes/{node_id}/artifacts/uploads/finalize` -> `flywheel_finalize_artifact_uploads`
155
+ - `GET /mcp/nodes/{node_id}/artifacts` -> `flywheel_list_artifacts`
156
+ - `GET /mcp/nodes/{node_id}/artifacts/{artifact_id}` -> `flywheel_get_artifact`
157
+ - `DELETE /mcp/nodes/{node_id}/artifacts/{artifact_id}` -> `flywheel_delete_artifact`
158
+ - `PATCH /mcp/nodes/{node_id}/artifacts/{artifact_id}/note` -> `flywheel_set_artifact_note`
159
+
160
+ ### Executions
161
+
162
+ - `POST /mcp/nodes/{node_id}/executions` -> `flywheel_launch_execution`
163
+ - `GET /mcp/nodes/{node_id}/executions` -> `flywheel_list_executions`
164
+ - `POST /mcp/nodes/{node_id}/executions/{execution_id}/terminate` -> `flywheel_terminate_execution`
165
+
166
+ ### Compute and budgets
167
+
168
+ - `GET /mcp/nodes/{node_id}/compute/options` -> `flywheel_compute_list_options`
169
+ - `GET /mcp/compute/status` -> `flywheel_compute_status`
170
+ - `GET /mcp/compute/connection` -> `flywheel_compute_connection`
171
+ - `POST /mcp/approval-sessions/heartbeat` -> `flywheel_approval_session_heartbeat`
172
+ - `GET /mcp/approval-sessions` -> `flywheel_list_approval_sessions`
173
+ - `POST /mcp/approval-sessions/expire` -> `flywheel_expire_approval_session`
174
+ - `tool-mediated` -> `flywheel_request_compute_grant_approval`
175
+ - `GET /mcp/compute/grants` -> `flywheel_list_compute_grants`
176
+ - `GET /mcp/nodes/{root_node_id}/campaign-budgets` -> `flywheel_list_campaign_budgets`
177
+ - `POST /mcp/nodes/{root_node_id}/campaign-budgets` -> `flywheel_create_campaign_budget`
178
+ - `PATCH /mcp/nodes/{root_node_id}/campaign-budgets/{compute_budget_id}` -> `flywheel_update_campaign_budget`
179
+ - `DELETE /mcp/nodes/{root_node_id}/campaign-budgets/{compute_budget_id}` -> `flywheel_revoke_campaign_budget`
180
+ - `tool-mediated` -> `flywheel_compute_acquire`
181
+ - `POST /mcp/compute/release` -> `flywheel_compute_release`
182
+ - `POST /mcp/compute/release-all` -> `flywheel_compute_release_all`
183
+
184
+ ### Contract, audit, and export
185
+
186
+ - `GET /mcp/contract` -> `flywheel_get_contract`
187
+ - `GET /mcp/contract/sections/{section_id}` -> `flywheel_get_contract_section`
188
+ - `POST /mcp/export` -> `flywheel_export_subgraph`
189
+ - `POST /mcp/import` -> `flywheel_import_subgraph`
190
+ - `GET /mcp/nodes/{node_id}/summary` -> `flywheel_summarize_node_tree`
191
+ - `POST /mcp/export-summary` -> `flywheel_export_summary`
192
+ - `POST /mcp/export-summary-stream` -> `flywheel_export_summary_stream`
193
+ - `POST /mcp/export-summary-pdf` -> `flywheel_export_summary_pdf`
194
+ - `POST /mcp/export-summary-render-pdf` -> `flywheel_export_summary_render_pdf`
195
+
196
+ ## Auth and Write Safety
197
+
198
+ - Available scopes: `read`, `write`, `compute`.
199
+ - Default grant scopes: `read`, `write`, `compute`.
200
+ - Transport-required scopes: `read`.
201
+ - Optimistic locking field: `expected_revision`.
202
+ - Conflict status code: `409`.
203
+ - Mutating HTTP calls require `Idempotency-Key`: `True`.
204
+ - MCP tool transport manages idempotency keys for mutating calls: `True`.
@@ -0,0 +1,62 @@
1
+ # Autonomous Experiment Design Gate
2
+
3
+ Use this gate for `$flywheel-auto` runs that must continue autonomously under a
4
+ persisted control contract.
5
+
6
+ ## Goal
7
+
8
+ Prevent wasted spend and ambiguous stop behavior while keeping the run
9
+ non-interactive after the control contract is coherent.
10
+
11
+ ## Operating Rules
12
+
13
+ - Treat this gate as deterministic and non-interactive.
14
+ - Do not wait for user acceptance once required contract fields are coherent.
15
+ - Infer missing objective from graph state only when objective is missing and
16
+ the user refuses to provide one; persist the inferred objective before
17
+ execution.
18
+ - Derive missing terminal condition as `budget ceiling reached` when budget
19
+ ceiling and budget unit are present.
20
+ - Persist every derivation in the control node `content` before compute
21
+ request or acquisition.
22
+ - Require explicit stop recording before any termination.
23
+
24
+ ## Required Gate Checks
25
+
26
+ The run is gate-ready only when all checks below pass.
27
+
28
+ 1. Objective check
29
+ - Objective is explicit in the control contract, or inferred and persisted.
30
+ 2. Decision criterion check
31
+ - Decision criterion is explicit and measurable enough to compare branches.
32
+ 3. Budget contract check
33
+ - Budget ceiling and budget unit are explicit.
34
+ - If user-facing budget uses a non-credit unit, operational compute approval
35
+ cap is derived and both values are persisted.
36
+ 4. Terminal condition check
37
+ - Terminal condition is explicit.
38
+ - If missing while budget ceiling and unit are present, set terminal
39
+ condition to `budget ceiling reached` and persist the derivation.
40
+ 5. Continuation/stop recording check
41
+ - Control contract records continuation rule.
42
+ - Termination requires persisted `stop_reason` with one of:
43
+ `budget_exhausted`, `objective_met`, `no_viable_branch`,
44
+ `user_cancelled`, `runtime_error`.
45
+
46
+ ## Failure Handling
47
+
48
+ - If any required check fails, repair the control contract from available graph
49
+ state and previously supplied inputs.
50
+ - Ask only when a required field cannot be recovered from user instructions,
51
+ conversation, or graph state.
52
+ - Once repaired, continue execution without adding a user-acceptance checkpoint.
53
+
54
+ ## Execution Handoff
55
+
56
+ When gate-ready, continue with the active `$flywheel-auto` execution workflow:
57
+
58
+ - persist control node updates,
59
+ - execute or acquire compute within budget,
60
+ - refresh lookahead after each resolved node,
61
+ - stop only on explicit terminal conditions,
62
+ - persist stop reason before exit.
@@ -141,7 +141,7 @@ Typical flow:
141
141
  1. `mcp__flywheel__flywheel_branch_node` or `mcp__flywheel__flywheel_stage_node_create`
142
142
  2. `mcp__flywheel__flywheel_stage_node_update` with the explicit run summary and the local question or hypothesis for that branch
143
143
  3. `mcp__flywheel__flywheel_request_compute_grant_approval` only after the user accepts the design
144
- 4. `mcp__flywheel__flywheel_list_compute_grants` or `mcp__flywheel__flywheel_list_approval_sessions` when you need to resolve the approved `compute_grant_id`
144
+ 4. `mcp__flywheel__flywheel_list_compute_grants(status=active, approval_session_id=<session_id>)` when you need to resolve the approved `compute_grant_id`
145
145
  5. `mcp__flywheel__flywheel_compute_acquire` and related compute tools only when execution is actually needed
146
146
  6. `mcp__flywheel__flywheel_prepare_artifact_uploads`, raw upload to the returned signed URLs, then `mcp__flywheel__flywheel_finalize_artifact_uploads`
147
147
  7. Do a brief epistemic check before commit: verify what the evidence actually shows, whether it matches the interpretation rule from the brief, and whether any gap between the data and the hoped-for story needs to be named explicitly in the node summary.