@paradigma-inc/flywheel 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/package.json +1 -1
  2. package/skills/flywheel/SKILL.md +7 -25
  3. package/skills/flywheel/agents/openai.yaml +2 -2
  4. package/skills/flywheel/example-workflows/organizing-exploring-and-iterating-on-a-research-topic.md +8 -8
  5. package/skills/flywheel/example-workflows/reproducing-papers-on-a-budget.md +8 -8
  6. package/skills/flywheel/getting-started/flywheel-tutorial-overview.md +1 -1
  7. package/skills/flywheel/references/experiment-design-protocol.md +204 -0
  8. package/skills/flywheel/references/flywheel-mcp-tool-map.md +160 -0
  9. package/skills/flywheel/web-ui/flywheel-webui-map.md +1 -1
  10. package/skills/flywheel-auto/SKILL.md +156 -0
  11. package/skills/flywheel-auto/agents/openai.yaml +12 -0
  12. package/skills/flywheel-auto/evals/evals.json +20 -0
  13. package/skills/flywheel-auto/references/ARTIFACTS.md +218 -0
  14. package/skills/flywheel-auto/references/INTERFACES.md +201 -0
  15. package/skills/{flywheel/reference → flywheel-auto/references}/experiment-design-protocol.md +9 -5
  16. package/skills/flywheel-lookahead/SKILL.md +145 -0
  17. package/skills/flywheel-lookahead/agents/openai.yaml +12 -0
  18. package/skills/flywheel-lookahead/evals/evals.json +20 -0
  19. package/skills/flywheel-lookahead/references/ARTIFACTS.md +218 -0
  20. package/skills/flywheel-lookahead/references/INTERFACES.md +201 -0
  21. package/skills/flywheel-lookahead/references/flywheel-mcp-tool-map.md +160 -0
  22. package/skills/flywheel-reproduce/SKILL.md +212 -0
  23. package/skills/flywheel-reproduce/agents/openai.yaml +12 -0
  24. package/skills/flywheel-reproduce/evals/evals.json +20 -0
  25. package/skills/flywheel-reproduce/references/ARTIFACTS.md +218 -0
  26. package/skills/flywheel-reproduce/references/INTERFACES.md +201 -0
  27. package/skills/flywheel-reproduce/references/experiment-design-protocol.md +204 -0
  28. package/skills/flywheel-reproduce/references/flywheel-mcp-tool-map.md +160 -0
  29. package/skills/flywheel-to-graph/SKILL.md +187 -0
  30. package/skills/flywheel-to-graph/agents/openai.yaml +12 -0
  31. package/skills/flywheel-to-graph/evals/evals.json +20 -0
  32. package/skills/flywheel-to-graph/references/ARTIFACTS.md +218 -0
  33. package/skills/flywheel-to-graph/references/INTERFACES.md +201 -0
  34. package/skills/flywheel-to-graph/references/flywheel-mcp-tool-map.md +160 -0
  35. package/skills/flywheel/reference/command-presets.md +0 -230
  36. package/skills/flywheel/reference/wiki-porting.md +0 -92
  37. /package/skills/{flywheel/reference → flywheel-auto/references}/flywheel-mcp-tool-map.md +0 -0
@@ -0,0 +1,160 @@
1
+ # Flywheel MCP Tool Map
2
+
3
+ This reference describes the Flywheel MCP tool families and the common runtime
4
+ contract expected by the public Flywheel skill.
5
+
6
+ Use it as a routing guide, not as a session snapshot. Always verify the exact
7
+ tool surface exposed by your current MCP host before executing critical flows.
8
+
9
+ ## Core Contract Expectations
10
+
11
+ - Node lifecycle and graph-mutation flows use optimistic locking
12
+ (`expected_revision`).
13
+ - Node commits require `kind`, `outcome`, and `summary`.
14
+ - `kind` is typically `insight` or `empirical`.
15
+ - `insight` commits require non-empty `insights`.
16
+ - `empirical` commits require a non-empty `hypothesis`; completed empirical
17
+ commits also require artifacts or a `no_artifacts_reason`.
18
+ - Artifact publish is a two-step flow:
19
+ prepare upload, upload raw bytes to returned signed URLs, then finalize
20
+ the upload batch.
21
+
22
+ ## Tool Families
23
+
24
+ ### Session, Auth, and Contract
25
+
26
+ - `mcp__flywheel__flywheel_auth_status`
27
+ - `mcp__flywheel__flywheel_get_contract`
28
+ - `mcp__flywheel__flywheel_get_contract_section`
29
+ - `mcp__flywheel__flywheel_get_credits_balance`
30
+
31
+ ### Node Discovery and Read
32
+
33
+ - `mcp__flywheel__flywheel_list_nodes`
34
+ - `mcp__flywheel__flywheel_get_node`
35
+ - `mcp__flywheel__flywheel_get_node_tree`
36
+ - `mcp__flywheel__flywheel_get_node_ancestry`
37
+ - `mcp__flywheel__flywheel_summarize_node_tree`
38
+ - `mcp__flywheel__flywheel_get_campaign_snapshot`
39
+ - `mcp__flywheel__flywheel_list_audit`
40
+
41
+ ### Node Mutation, Branching, and Commit
42
+
43
+ - `mcp__flywheel__flywheel_stage_node_create`
44
+ - `mcp__flywheel__flywheel_stage_node_update`
45
+ - `mcp__flywheel__flywheel_commit_node`
46
+ - `mcp__flywheel__flywheel_branch_node`
47
+ - `mcp__flywheel__flywheel_merge_nodes`
48
+ - `mcp__flywheel__flywheel_add_parent`
49
+ - `mcp__flywheel__flywheel_remove_parent`
50
+ - `mcp__flywheel__flywheel_delete_node`
51
+ - `mcp__flywheel__flywheel_bulk_delete_nodes`
52
+
53
+ ### Access Policy and Collaboration
54
+
55
+ - `mcp__flywheel__flywheel_get_node_sharing`
56
+ - `mcp__flywheel__flywheel_set_sharing_for_node`
57
+ - `mcp__flywheel__flywheel_set_sharing_for_nodes`
58
+
59
+ ### Tags and Graph Annotation
60
+
61
+ - `mcp__flywheel__flywheel_create_node_tag`
62
+ - `mcp__flywheel__flywheel_update_node_tag`
63
+ - `mcp__flywheel__flywheel_delete_node_tag`
64
+ - `mcp__flywheel__flywheel_set_node_tag_assignments`
65
+
66
+ ### Artifacts
67
+
68
+ - `mcp__flywheel__flywheel_list_artifacts`
69
+ - `mcp__flywheel__flywheel_get_artifact`
70
+ - `mcp__flywheel__flywheel_get_artifact_preview`
71
+ - `mcp__flywheel__flywheel_prepare_artifact_uploads`
72
+ - `mcp__flywheel__flywheel_finalize_artifact_uploads`
73
+ - `mcp__flywheel__flywheel_set_artifact_note`
74
+ - `mcp__flywheel__flywheel_delete_artifact`
75
+
76
+ Common artifact types include:
77
+ `text`, `table`, `json`, `image`, `banner`, `html`, `plotly_html`, `vega`,
78
+ `checkpoint`, and `diff_carousel`.
79
+
80
+ ### Export and Import
81
+
82
+ - `mcp__flywheel__flywheel_export_subgraph`
83
+ - `mcp__flywheel__flywheel_import_subgraph`
84
+ - `mcp__flywheel__flywheel_export_summary`
85
+ - `mcp__flywheel__flywheel_export_summary_stream`
86
+ - `mcp__flywheel__flywheel_export_summary_pdf`
87
+ - `mcp__flywheel__flywheel_export_summary_render_pdf`
88
+
89
+ ### Executions
90
+
91
+ - `mcp__flywheel__flywheel_launch_execution`
92
+ - `mcp__flywheel__flywheel_list_executions`
93
+ - `mcp__flywheel__flywheel_terminate_execution`
94
+
95
+ ### Managed Compute
96
+
97
+ - `mcp__flywheel__flywheel_approval_session_heartbeat`
98
+ - `mcp__flywheel__flywheel_list_approval_sessions`
99
+ - `mcp__flywheel__flywheel_expire_approval_session`
100
+ - `mcp__flywheel__flywheel_request_compute_grant_approval`
101
+ - `mcp__flywheel__flywheel_list_compute_grants`
102
+ - `mcp__flywheel__flywheel_compute_list_options`
103
+ - `mcp__flywheel__flywheel_compute_acquire`
104
+ - `mcp__flywheel__flywheel_compute_status`
105
+ - `mcp__flywheel__flywheel_compute_connection`
106
+ - `mcp__flywheel__flywheel_compute_release`
107
+ - `mcp__flywheel__flywheel_compute_release_all`
108
+
109
+ ### Campaign Budgets (Organizer Flows)
110
+
111
+ - `mcp__flywheel__flywheel_list_campaign_budgets`
112
+ - `mcp__flywheel__flywheel_create_campaign_budget`
113
+ - `mcp__flywheel__flywheel_update_campaign_budget`
114
+ - `mcp__flywheel__flywheel_revoke_campaign_budget`
115
+
116
+ ### Migration Helpers
117
+
118
+ Some installations may expose migration-only helper tools with hashed names.
119
+ Treat these as specialized one-off tools, not part of day-to-day research
120
+ workflows.
121
+
122
+ ## Practical Tool Sequences
123
+
124
+ ### Insight Node Flow
125
+
126
+ 1. `mcp__flywheel__flywheel_stage_node_create`
127
+ 2. `mcp__flywheel__flywheel_stage_node_update`
128
+ 3. `mcp__flywheel__flywheel_commit_node`
129
+
130
+ ### Empirical Node With Artifacts
131
+
132
+ 1. `mcp__flywheel__flywheel_stage_node_create`
133
+ 2. `mcp__flywheel__flywheel_stage_node_update`
134
+ 3. Run experiment or compute steps
135
+ 4. `mcp__flywheel__flywheel_prepare_artifact_uploads`
136
+ 5. Upload artifact bytes to signed URLs
137
+ 6. `mcp__flywheel__flywheel_finalize_artifact_uploads`
138
+ 7. `mcp__flywheel__flywheel_commit_node`
139
+
140
+ ### Managed Compute Flow
141
+
142
+ 1. `mcp__flywheel__flywheel_approval_session_heartbeat`
143
+ 2. `mcp__flywheel__flywheel_request_compute_grant_approval`
144
+ 3. `mcp__flywheel__flywheel_list_compute_grants` (if needed)
145
+ 4. `mcp__flywheel__flywheel_compute_acquire`
146
+ 5. `mcp__flywheel__flywheel_compute_status` until ready
147
+ 6. `mcp__flywheel__flywheel_compute_connection`
148
+ 7. `mcp__flywheel__flywheel_compute_release` (or `..._release_all`)
149
+
150
+ ### Share a Graph With Collaborators
151
+
152
+ 1. `mcp__flywheel__flywheel_get_node_sharing`
153
+ 2. `mcp__flywheel__flywheel_set_sharing_for_node` (or `..._for_nodes`)
154
+ 3. `mcp__flywheel__flywheel_export_summary` or `..._export_subgraph` for handoff
155
+
156
+ ## Safety Notes
157
+
158
+ - Prefer `get_contract` before implementing strict assumptions in automation.
159
+ - Avoid call-order assumptions not mandated by contract.
160
+ - Keep checks bounded: list/read first, then mutate only the intended nodes.
@@ -0,0 +1,212 @@
1
+ ---
2
+ name: flywheel-reproduce
3
+ description: Graphify claim-bearing source material in Flywheel with Flywheel MCP and validate it empirically within a hard maximum budget. Use for reproduction, replication, or claim validation, not planning-only lookahead, source-to-graph authoring without validation, or autonomous frontier expansion.
4
+ ---
5
+
6
+ # flywheel-reproduce
7
+
8
+ ## When To Use
9
+
10
+ Use this skill when the task is to shape information inside Flywheel rather than only discuss it. Use the flywheel-reproduce skill when the source is claim-bearing and the user wants Flywheel to both structure the source and run empirical validation. Flywheel MCP is a node-first durable system of record for research work: nodes hold durable state, artifacts hold supporting files, executions record runs, and compute leases provide managed hardware. Conceptually, the flywheel-reproduce skill is `$flywheel-to-graph` plus budgeted empirical execution: graphify the source first, split it into explicit validation branches, then execute those branches within a hard maximum budget.
11
+
12
+ If exact tool or field semantics are unclear, load [references/flywheel-mcp-tool-map.md](references/flywheel-mcp-tool-map.md) and [references/INTERFACES.md](references/INTERFACES.md) before mutating nodes or acquiring compute.
13
+
14
+ ## Input Contract
15
+
16
+ Before execution, recover or establish these inputs:
17
+
18
+ - Required before execution: claim-bearing source material or existing claim nodes, a measurable objective, a hard max budget, and an explicit stopping criterion.
19
+ - Optional: preferred validation branch types, execution constraints, and source-format hints.
20
+ - Recovery rules:
21
+ - Ask only when a required execution input cannot be recovered from explicit user instructions, current conversational context, or recent graph state.
22
+ - If the source is already structured in Flywheel, recover the governing source or claim nodes from graph state before asking.
23
+ - If the objective is missing, ask once; if the user refuses, infer an objective such as validating the central claims within the available budget and persist it before execution.
24
+ - If the hard max budget is missing, ask once before execution. Until the budget is explicit, graph construction and branch planning may proceed, but empirical execution must not start.
25
+ - If the stopping criterion is missing, ask once; if it remains unspecified, persist a criterion such as stopping when the core claim is resolved or the budget ceiling is reached.
26
+
27
+ ## Working Terms
28
+
29
+ - `claim-bearing source`: source material that contains concrete empirical claims worth validating or refuting.
30
+ - `validation branch`: an explicit node or subtree that tests one claim, mechanism, baseline, robustness property, or failure mode.
31
+ - `hard max budget`: a non-negotiable spend ceiling that empirical execution must not exceed.
32
+ - `normalized Flywheel graph export`: already-structured Flywheel node JSON with DAG-safe edges, suitable for `flywheel_import_subgraph`.
33
+ - `expected_revision`: the node's current revision token used for optimistic-locking writes.
34
+
35
+ ## Core Rules
36
+
37
+ - Prefer explicit Flywheel node and artifact operations over ad hoc bulk-import stories, because node-first authoring keeps the graph legible and auditable.
38
+ - Treat the main page body as the node readme/body field (`content` on modern Flywheel surfaces).
39
+ - Use artifacts for supporting files and evidence, not as a substitute for the node's main narrative, because the node body should remain the readable source-of-truth for the claim and validation story.
40
+ - Only create graph edges for durable semantic relationships, because graphifying every wiki link floods the graph with noise that hides decision-relevant structure.
41
+ - Use `flywheel_import_subgraph` only for prebuilt Flywheel graph JSON, not for raw markdown repositories, because raw corpora are usually file-centric and cyclic rather than clean node-centric payloads.
42
+ - Treat the flywheel-reproduce skill as claim validation, not as a magical importer. It combines graphification with budgeted empirical execution, because claim-bearing work should become explicit validation branches before compute is spent.
43
+ - Ask only the minimum clarification questions needed to establish a coherent validation contract, and ask none when the required answers are already recoverable from user instructions, conversational context, or graph state.
44
+ - For empirical execution, load [references/experiment-design-protocol.md](references/experiment-design-protocol.md) and [references/flywheel-mcp-tool-map.md](references/flywheel-mcp-tool-map.md) before spending compute.
45
+
46
+ ## Workflow
47
+
48
+ 1. Resolve the starting context.
49
+ - Start from existing knowledge that should be validated, not from an open-ended frontier expansion loop.
50
+ - Resolve source or claim nodes in this order: explicit node ids/slugs, explicitly named current context, focused or recently referenced nodes, then ask the user if nothing stable is recoverable.
51
+ 2. Resolve the validation contract.
52
+ - Recover required execution inputs from the current conversation and graph first. Ask only for inputs that remain genuinely missing after that recovery pass.
53
+ - The flywheel-reproduce skill requires a measurable objective and a hard max budget. Ask once for missing prerequisites; if the user refuses to specify an objective, infer it from the available graph context and state it explicitly before continuing.
54
+ - Run the design gate from [references/experiment-design-protocol.md](references/experiment-design-protocol.md) before any compute request: confirm objective, decision criterion, evidence plan, branch strategy, and budget readiness.
55
+ - Persist the validation contract in a dedicated `insight` control node for this source or claim family. Put the canonical contract in node `content`, keep a one-line synopsis in `summary`, and keep brief validation rationale in `insights` so the commit contract stays valid.
56
+ - The control contract must name: objective, decision criterion, source or claim nodes under test, budget ceiling and unit, and an explicit stopping criterion.
57
+ - Later reproduce passes must read the control node `content` first and continue from that persisted contract rather than from chat memory.
58
+ 3. Classify the source.
59
+ - If the input is already a normalized Flywheel graph export, `flywheel_import_subgraph` may be appropriate.
60
+ - If it is a markdown wiki, README corpus, blog post, or paper, port it explicitly with node and artifact tools before execution.
61
+ - If it is a claim-bearing paper or benchmark result, split the work into explicit validation branches rather than treating the whole source as one flat note.
62
+ 4. Map each stable page, claim, or concept to a node.
63
+ - For exact node-mutation shapes, load [references/flywheel-mcp-tool-map.md](references/flywheel-mcp-tool-map.md).
64
+ - Create a new node with `flywheel_stage_node_create` when needed.
65
+ - Update an existing node with `flywheel_get_node` + `flywheel_stage_node_update` when continuing work.
66
+ 5. Put the primary page markdown or validation rationale in the node body/readme field (`content`).
67
+ - Keep `summary` concise.
68
+ - Populate `hypothesis`, `insights`, `outcome`, and similar fields only when the source actually supports them.
69
+ 6. Publish supporting files with the artifact upload flow.
70
+ - For exact artifact contract details, load [references/ARTIFACTS.md](references/ARTIFACTS.md).
71
+ - Use `flywheel_prepare_artifact_uploads`.
72
+ - Upload raw file bytes to the returned signed URLs.
73
+ - Call `flywheel_finalize_artifact_uploads` once all uploads in the batch are staged.
74
+ - Keep the artifact filename stable enough to reference from markdown when inline rendering matters.
75
+ 7. Add graph structure sparingly.
76
+ - Promote only decision-relevant relationships to edges.
77
+ - Leave ordinary cross-links inside the markdown body.
78
+ 8. Plan and execute validation branches against the hard max budget.
79
+ - Prioritize the cheapest branches that most reduce uncertainty first.
80
+ - Prefer explicit validation branches such as baseline checks, mechanism or intermediate-signal checks, ablations, efficiency checks, robustness checks, failure analysis, and follow-up analysis branches after results land.
81
+ - If the branch can run through Flywheel execution directly, use `flywheel_launch_execution` and inspect terminal status before commit.
82
+ - If the branch needs managed compute, use `flywheel_request_compute_grant_approval`, resolve the approved `compute_grant_id` with `flywheel_list_compute_grants` or `flywheel_list_approval_sessions`, then `flywheel_compute_acquire`, poll `flywheel_compute_status`, and use `flywheel_compute_connection` when the lease is ready.
83
+ - Release managed compute with `flywheel_compute_release` or `flywheel_compute_release_all` when a branch is done.
84
+ - Stop when the core claim is resolved or the budget ceiling is reached.
85
+ 9. Commit after the node snapshot is coherent with `flywheel_commit_node`.
86
+ - Commit resolved insight nodes only when they have non-empty `insights`.
87
+ - Commit resolved empirical nodes only when outcome and artifact rules are satisfied.
88
+ - Leave unresolved plan nodes staged.
89
+
90
+ ## Result Contract
91
+
92
+ When the skill completes a pass, it should leave behind:
93
+
94
+ - Graphified source nodes or updated claim nodes that preserve the source material legibly in `content`.
95
+ - One persisted `insight` control node containing the canonical validation contract.
96
+ - Zero or more explicit validation branches staged or resolved under the hard max budget.
97
+ - Coherent committed empirical or insight nodes, with artifacts attached where required by the outcome contract.
98
+ - Released managed compute if any lease was acquired during the pass.
99
+
100
+ ## Persisted Validation Contract
101
+
102
+ Use a dedicated `insight` node as the durable validation controller for the current source or claim family. Do not rely on unstated product fields or fresh chat context.
103
+
104
+ For the canonical entity model and public contract terminology behind this controller, load [references/INTERFACES.md](references/INTERFACES.md).
105
+
106
+ Use this storage convention:
107
+
108
+ 1. Reuse an existing control node when one already governs the same source or claim family; otherwise create one with `flywheel_stage_node_create`.
109
+ 2. Put the canonical contract in node `content`.
110
+ 3. Put a one-line synopsis in `summary`.
111
+ 4. Put the validation rationale, branch-priority logic, or continuation rule in `insights` so the `insight` commit contract is satisfied.
112
+ 5. Update the control node with `flywheel_stage_node_update`.
113
+ 6. Read the control node with `flywheel_get_node` before later passes that need a fresh `expected_revision`.
114
+ 7. Commit the control node with `flywheel_commit_node` once the contract is coherent, even if downstream validation branches remain staged or in progress.
115
+
116
+ Canonical contract shape:
117
+
118
+ ```md
119
+ ## Validation contract
120
+
121
+ - Objective:
122
+ - Decision criterion:
123
+ - Source or claim nodes under test:
124
+ - Budget ceiling:
125
+ - Budget unit:
126
+ - Stopping criterion:
127
+ - Preferred branch types: optional
128
+ ```
129
+
130
+ The `Source or claim nodes under test` line is the recovery anchor for later validation passes. If multiple claim nodes are in scope, list the governing node ids or slugs explicitly.
131
+
132
+ ## Wiki Porting
133
+
134
+ Use this guide when the source material is a markdown wiki, README corpus, or a Karpathy-style LLM wiki that should become Flywheel nodes. In the flywheel-reproduce skill, do this graphification pass before empirical execution starts.
135
+
136
+ ### Default Mapping
137
+
138
+ - One wiki page or stable concept -> one Flywheel node.
139
+ - The main page markdown -> the node body/readme field (`content`).
140
+ - A short synopsis of the page -> `summary`.
141
+ - Images, PDFs, datasets, notebooks, code snippets, and other supporting files -> node artifacts.
142
+ - Durable structural relationships -> graph edges.
143
+ - Ordinary wiki hyperlinks -> remain markdown links inside the node body.
144
+
145
+ Do not try to preserve the source wiki as a file-first mirror inside Flywheel. Flywheel is node-first.
146
+
147
+ ### What The Model Should Do
148
+
149
+ Assume the model is expected to perform the port directly unless the user explicitly asks to build a dedicated importer.
150
+
151
+ That means:
152
+
153
+ 1. Read the source pages and supporting files.
154
+ 2. Create or update nodes explicitly.
155
+ 3. Write the page body into node `content`.
156
+ 4. Publish supporting files as artifacts.
157
+ 5. Add only the graph edges that materially help reasoning or navigation.
158
+ 6. Split the claim-bearing work into explicit validation branches before execution.
159
+
160
+ Do not wait for a magical bulk-import surface if the available Flywheel primitives are already enough.
161
+
162
+ ## `flywheel_import_subgraph`
163
+
164
+ Use `flywheel_import_subgraph` only when the input is already normalized into Flywheel node JSON with DAG-safe edges.
165
+
166
+ Do not use it for raw markdown repositories because those are usually:
167
+
168
+ - file-centric rather than node-centric
169
+ - heavily cross-linked
170
+ - cyclic in ways that are natural for a wiki but not a clean Flywheel graph
171
+
172
+ Treat raw wiki content as authoring input, not as a direct subgraph payload.
173
+
174
+ ## Edge Policy
175
+
176
+ Promote a relation to a graph edge only when it carries durable meaning such as:
177
+
178
+ - hierarchy or decomposition
179
+ - prerequisite or dependency
180
+ - derived-from or result-of
181
+ - canonical comparison target
182
+
183
+ Do not create edges for every incidental mention, backlink, or navigational cross-reference. Keep those inside the markdown body instead.
184
+
185
+ ## Inline Artifact Embeds
186
+
187
+ When the node body supports inline artifact rendering, keep references on their own lines so the renderer can replace them with the matching artifact preview.
188
+
189
+ Examples:
190
+
191
+ ```md
192
+ ![Loss curve](loss-curve.png)
193
+
194
+ [Evaluation metrics](metrics.json)
195
+ ```
196
+
197
+ Guidelines:
198
+
199
+ - Upload the artifact first, then reference it from the body.
200
+ - Keep filenames stable enough for the renderer to match them.
201
+ - Use inline embeds for supporting visuals or data, but keep the main explanation in the node body itself.
202
+ - If a reference does not match an artifact, it should remain valid markdown rather than break the page.
203
+
204
+ ## Guardrails
205
+
206
+ - Do not treat the flywheel-reproduce skill as a magical bulk importer.
207
+ - Do not blur `$flywheel-reproduce` and `$flywheel-auto`, because `$flywheel-reproduce` validates existing knowledge claims while `$flywheel-auto` expands a frontier autonomously under budget.
208
+ - Build the graph explicitly with nodes, artifacts, and selected edges.
209
+ - Keep the source material legible in `content`; do not dump everything into artifacts.
210
+ - Keep the flywheel-reproduce skill scoped by cost and decision value, not by exhaustively trying every possible branch.
211
+
212
+ See also: invoke `$flywheel-to-graph` to port source material into Flywheel without implicit execution, invoke `$flywheel-lookahead` to stage next-step frontier nodes from existing graph state without execution, and invoke `$flywheel-auto` to advance a frontier autonomously under an explicit budget and persisted stop condition.
@@ -0,0 +1,12 @@
1
+ interface:
2
+ display_name: "flywheel-reproduce"
3
+ short_description: "Validate claim-bearing work in Flywheel"
4
+ default_prompt: "Use $flywheel-reproduce to structure this claim-bearing source in Flywheel and run budgeted validation."
5
+
6
+ dependencies:
7
+ tools:
8
+ - type: "mcp"
9
+ value: "flywheel"
10
+ description: "Flywheel MCP server"
11
+ transport: "streamable_http"
12
+ url: "https://flywheel.paradigma.inc/mcp-server"
@@ -0,0 +1,20 @@
1
+ [
2
+ {
3
+ "id": "claim-bearing-paper-with-no-budget-yet",
4
+ "prompt": "Use $flywheel-reproduce to validate the central empirical claims from this paper in Flywheel. I have not given you a max budget yet, but I do want the source structured and the validation plan prepared.",
5
+ "expected_output": "Graphify the source and plan explicit validation branches, ask once for a hard max budget before any compute acquisition, and avoid empirical execution until the budget is explicit.",
6
+ "files": []
7
+ },
8
+ {
9
+ "id": "existing-graph-needs-validation-branches",
10
+ "prompt": "Use $flywheel-reproduce to validate the main claim nodes that already exist in this Flywheel graph under a hard budget ceiling of 20 credits. Prioritize the cheapest high-information checks first.",
11
+ "expected_output": "Recover the existing claim nodes from graph state, persist a validation contract, split the work into explicit validation branches, and execute the cheapest high-information branches first within the stated hard max budget.",
12
+ "files": []
13
+ },
14
+ {
15
+ "id": "markdown-wiki-should-not-use-import-subgraph",
16
+ "prompt": "Use $flywheel-reproduce to validate the strong empirical claims in this markdown wiki. The source is a raw README-style corpus, not a normalized Flywheel graph export.",
17
+ "expected_output": "Port the markdown/wiki source with explicit node and artifact authoring rather than `flywheel_import_subgraph`, then split the claim-bearing work into explicit validation branches for later or budgeted execution.",
18
+ "files": []
19
+ }
20
+ ]
@@ -0,0 +1,218 @@
1
+ # Flywheel Artifacts
2
+
3
+ Canonical reference for node artifact publishing in Flywheel MCP 0.9.
4
+
5
+ Legacy note:
6
+
7
+ - historical `run_artifacts` rows are retained for backward reads.
8
+ - new artifact writes must use the MCP batch upload workflow:
9
+ `flywheel_prepare_artifact_uploads` -> raw file upload(s) ->
10
+ `flywheel_finalize_artifact_uploads`.
11
+
12
+ ## Node MCP Contract
13
+
14
+ Artifacts are managed through node MCP tools:
15
+
16
+ - `flywheel_prepare_artifact_uploads` prepares one or more signed raw-file
17
+ upload requests for a node.
18
+ - The caller executes each returned upload request with raw bytes.
19
+ - `flywheel_finalize_artifact_uploads` appends all staged uploads in that batch
20
+ to the node and bumps node revision once.
21
+ - `flywheel_list_artifacts` and `flywheel_get_artifact` return artifact
22
+ metadata.
23
+ - `flywheel_get_artifact_preview` reads persisted preview payload content by
24
+ artifact id.
25
+ - `flywheel_commit_node` commits/finalizes node state after terminal fields are
26
+ already staged.
27
+
28
+ Contract rules:
29
+
30
+ - `flywheel_prepare_artifact_uploads` requires `expected_revision` and enforces
31
+ optimistic locking before issuing upload tickets.
32
+ - Upload uses the signed one-time ticket in each returned `upload_url`;
33
+ client-supplied path/reference fields are not part of this contract.
34
+ - Raw upload only stages payloads. It does not mutate node state or bump node
35
+ revision.
36
+ - `flywheel_finalize_artifact_uploads` is the single node mutation point for an
37
+ artifact batch.
38
+ - `flywheel_commit_node` is finalize-only:
39
+ - request shape is `expected_revision` with optional `summary` override.
40
+ - node kind/outcome/hypothesis/insights/no_artifacts_reason must already be
41
+ staged.
42
+ - commit transitions lifecycle to `committed`.
43
+ - committed node contract rules remain strict:
44
+ - `kind=empirical` + `outcome=completed` requires artifacts or
45
+ `no_artifacts_reason`.
46
+ - `kind=insight` requires non-empty `insights`.
47
+ - `kind=empirical` requires empty `insights`.
48
+ - MCP mutating calls require idempotency:
49
+ - tool transport auto-manages idempotency keys for tool calls.
50
+ - direct HTTP callers must provide `Idempotency-Key` on mutating MCP
51
+ endpoints.
52
+
53
+ `artifact_type=banner` is supported for campaign root visuals. It follows the
54
+ same raw image upload validation path as `artifact_type=image` and is intended
55
+ for zoomed-out canvas visibility.
56
+
57
+ ## Prepare Request Shape
58
+
59
+ `POST /mcp/nodes/{node_id}/artifacts/uploads/prepare`
60
+
61
+ ```json
62
+ {
63
+ "expected_revision": 7,
64
+ "items": [
65
+ {
66
+ "artifact_type": "image",
67
+ "title": "Loss curve",
68
+ "execution_id": "optional-execution-id",
69
+ "metadata": {
70
+ "source": "training-run"
71
+ },
72
+ "filename": "loss_curve.png",
73
+ "media_type": "image/png"
74
+ }
75
+ ]
76
+ }
77
+ ```
78
+
79
+ Notes:
80
+
81
+ - `items` must contain at least one structured object item.
82
+ - String or JSON-encoded item payloads are invalid at the tool boundary.
83
+ - `filename` and `media_type` are required for each item.
84
+ - `metadata` is caller-defined JSON.
85
+
86
+ ## Prepare Response Shape
87
+
88
+ ```json
89
+ {
90
+ "batch": {
91
+ "batch_token": "uuid",
92
+ "expires_at": "2026-03-09T16:00:00+00:00",
93
+ "max_upload_bytes": 10485760,
94
+ "items": [
95
+ {
96
+ "upload_id": "uuid",
97
+ "upload_url": "https://.../mcp/artifacts/uploads/{upload_id}?ticket=...",
98
+ "method": "PUT",
99
+ "headers": {
100
+ "Content-Type": "image/png",
101
+ "X-Flywheel-Artifact-Filename": "loss_curve.png"
102
+ },
103
+ "curl_command": "curl -sS -X PUT '...' -H 'Content-Type: image/png' -H 'X-Flywheel-Artifact-Filename: loss_curve.png' --data-binary @/absolute/path/to/file"
104
+ }
105
+ ]
106
+ }
107
+ }
108
+ ```
109
+
110
+ ## Raw Upload Step
111
+
112
+ Execute each returned request exactly:
113
+
114
+ - Method: `PUT`
115
+ - URL: `batch.items[i].upload_url`
116
+ - Body: raw file bytes
117
+ - Headers:
118
+ - `Content-Type` (media type)
119
+ - `X-Flywheel-Artifact-Filename` (filename hint)
120
+
121
+ A successful upload:
122
+
123
+ - validates the uploaded bytes against the requested artifact type
124
+ - stages canonical payload JSON in blob storage
125
+ - returns `202 Accepted`
126
+ - does not yet append an artifact record to the node
127
+
128
+ ## Finalize Request and Response
129
+
130
+ `POST /mcp/nodes/{node_id}/artifacts/uploads/finalize`
131
+
132
+ ```json
133
+ {
134
+ "batch_token": "uuid"
135
+ }
136
+ ```
137
+
138
+ Successful finalize:
139
+
140
+ - validates the batch is complete and still revision-compatible
141
+ - appends all staged artifacts to the node
142
+ - persists canonical payload JSON to `artifacts/nodes/{node_id}/{artifact_id}.json`
143
+ - bumps node revision once
144
+ - returns `{ "node": ..., "artifacts": [...] }`
145
+
146
+ ## Artifact Preview Behavior
147
+
148
+ Artifact preview endpoint:
149
+ `GET /mcp/nodes/{node_id}/artifacts/{artifact_id}/preview`.
150
+ MCP tool: `flywheel_get_artifact_preview`.
151
+
152
+ - Preview reads canonical persisted payload blob (`storage_path`) only.
153
+ - No workspace dependency or local-file fallback is required.
154
+ - `data_url` in preview responses is render output only; never upload JSON
155
+ metadata wrappers.
156
+ - Preview-normalized types:
157
+ - `image` -> image payload with `data_url`
158
+ - `html` / `plotly_html` -> HTML payload
159
+ - `json` -> JSON payload
160
+ - `text` / `diff_carousel` and common text/code extensions -> text payload
161
+
162
+ ## WebUI Artifact Payload Reads
163
+
164
+ When artifacts are projected through node responses, the server returns
165
+ normalized storage references for each artifact payload:
166
+
167
+ - `storage_path`: canonical blob path (for example
168
+ `artifacts/nodes/{node_id}/{artifact_id}.json`).
169
+ - `storage_url`: the single client/host read URL for that payload.
170
+ - All blob backends: `/blobs/{storage_path}` authenticated byte-serving
171
+ proxy after access checks.
172
+
173
+ Clients should read artifact bytes from `storage_url` only. `storage_path`
174
+ remains metadata/debug context and must not be reconstructed into fetch URLs by
175
+ clients. Payload loads are coordinated through a shared loader with in-flight
176
+ deduplication, cache reuse, and bounded fetch concurrency to avoid bursty
177
+ request storms and `429` backpressure under artifact-heavy nodes.
178
+
179
+ The node overview panel additionally avoids eager load spikes by defaulting to
180
+ collapsed mode for artifact-heavy nodes and deferring artifact rendering until
181
+ cards approach the viewport.
182
+
183
+ ## Artifact Load Telemetry
184
+
185
+ The WebUI emits a batched first-party product analytics event,
186
+ `web_artifact_payload_batch`, through `POST /analytics/events`.
187
+
188
+ This event is intended for aggregate artifact read-path observability and
189
+ includes fields such as:
190
+
191
+ - load volume (`loads_started`, `loads_completed`, `loads_failed`)
192
+ - rate-limit incidence (`loads_429`)
193
+ - queue/load latency aggregates
194
+ - source mix (`/blobs/*` authenticated proxy)
195
+ - top per-node load/failure summaries in the batch window
196
+
197
+ ## File Inventory Surfaces
198
+
199
+ Artifacts and attachments are exposed through two HTTP inventory endpoints:
200
+
201
+ - `GET /users/me/files` for account-wide browsing in Settings.
202
+ - `GET /nodes/{node_id}/files` for node lineage-scoped browsing in the node
203
+ details panel.
204
+
205
+ Inventory entries include source context (`node_id`, `execution_id`) so the UI
206
+ can jump directly to the originating node or execution.
207
+
208
+ ## Common Invalid Payload Causes
209
+
210
+ - stale `expected_revision` at prepare or finalize time
211
+ - missing/invalid upload ticket
212
+ - expired upload ticket or batch
213
+ - upload body exceeds configured size limit
214
+ - uploaded bytes do not match requested artifact format (for example invalid
215
+ JSON)
216
+ - finalize called before every prepared upload is staged
217
+ - commit contract violations (for example empirical `completed` without
218
+ artifacts or `no_artifacts_reason`)