@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.
- package/package.json +1 -1
- package/skills/flywheel/SKILL.md +7 -25
- package/skills/flywheel/agents/openai.yaml +2 -2
- package/skills/flywheel/example-workflows/organizing-exploring-and-iterating-on-a-research-topic.md +8 -8
- package/skills/flywheel/example-workflows/reproducing-papers-on-a-budget.md +8 -8
- package/skills/flywheel/getting-started/flywheel-tutorial-overview.md +1 -1
- package/skills/flywheel/references/experiment-design-protocol.md +204 -0
- package/skills/flywheel/references/flywheel-mcp-tool-map.md +160 -0
- package/skills/flywheel/web-ui/flywheel-webui-map.md +1 -1
- package/skills/flywheel-auto/SKILL.md +156 -0
- package/skills/flywheel-auto/agents/openai.yaml +12 -0
- package/skills/flywheel-auto/evals/evals.json +20 -0
- package/skills/flywheel-auto/references/ARTIFACTS.md +218 -0
- package/skills/flywheel-auto/references/INTERFACES.md +201 -0
- package/skills/{flywheel/reference → flywheel-auto/references}/experiment-design-protocol.md +9 -5
- package/skills/flywheel-lookahead/SKILL.md +145 -0
- package/skills/flywheel-lookahead/agents/openai.yaml +12 -0
- package/skills/flywheel-lookahead/evals/evals.json +20 -0
- package/skills/flywheel-lookahead/references/ARTIFACTS.md +218 -0
- package/skills/flywheel-lookahead/references/INTERFACES.md +201 -0
- package/skills/flywheel-lookahead/references/flywheel-mcp-tool-map.md +160 -0
- package/skills/flywheel-reproduce/SKILL.md +212 -0
- package/skills/flywheel-reproduce/agents/openai.yaml +12 -0
- package/skills/flywheel-reproduce/evals/evals.json +20 -0
- package/skills/flywheel-reproduce/references/ARTIFACTS.md +218 -0
- package/skills/flywheel-reproduce/references/INTERFACES.md +201 -0
- package/skills/flywheel-reproduce/references/experiment-design-protocol.md +204 -0
- package/skills/flywheel-reproduce/references/flywheel-mcp-tool-map.md +160 -0
- package/skills/flywheel-to-graph/SKILL.md +187 -0
- package/skills/flywheel-to-graph/agents/openai.yaml +12 -0
- package/skills/flywheel-to-graph/evals/evals.json +20 -0
- package/skills/flywheel-to-graph/references/ARTIFACTS.md +218 -0
- package/skills/flywheel-to-graph/references/INTERFACES.md +201 -0
- package/skills/flywheel-to-graph/references/flywheel-mcp-tool-map.md +160 -0
- package/skills/flywheel/reference/command-presets.md +0 -230
- package/skills/flywheel/reference/wiki-porting.md +0 -92
- /package/skills/{flywheel/reference → flywheel-auto/references}/flywheel-mcp-tool-map.md +0 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flywheel-auto
|
|
3
|
+
description: Advance a Flywheel frontier autonomously with Flywheel MCP under an explicit budget by persisting control state, executing branches, and replanning after each resolution. Use for autonomous research continuation, not planning-only lookahead, claim validation, or source-to-graph authoring.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# flywheel-auto
|
|
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-auto skill when the user wants Flywheel to keep advancing a research frontier autonomously under a specified budget. 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-auto skill is what you get when you invoke `$flywheel-lookahead`, then execute and replan after each resolution: persist the run contract in the graph, keep the plan `n` hops ahead, and spend only within an explicit measured 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: start nodes, objective, budget ceiling, budget unit, and an explicit terminal condition.
|
|
19
|
+
- Optional with defaults: `lookahead_depth` defaults to `n=1`; `frontier_width` defaults to `k=1` and also caps concurrent executable branches.
|
|
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 start nodes cannot be recovered from explicit ids/slugs, named current context, or recent graph context, ask once.
|
|
23
|
+
- If the objective is missing, ask once; if the user refuses, infer it from graph context and persist it before execution.
|
|
24
|
+
- If budget ceiling, budget unit, or terminal condition is missing, ask once before execution. If the budget contract remains incomplete, keep planning but do not request compute approval or acquire compute.
|
|
25
|
+
- If the user gives a non-credit budget unit, persist that exact user-facing unit and derive the operational compute approval cap before acquisition.
|
|
26
|
+
|
|
27
|
+
## Working Terms
|
|
28
|
+
|
|
29
|
+
- `frontier`: the current unresolved next-step nodes or candidate branches worth planning or executing next.
|
|
30
|
+
- `resolved frontier`: the latest resolved nodes from which the next frontier should be expanded, not the original source corpus again.
|
|
31
|
+
- `graph-local`: continuation and stopping decisions should be recoverable from persisted node state alone, not from chat memory.
|
|
32
|
+
- `control node`: the dedicated `insight` node that stores the canonical run contract for the current frontier.
|
|
33
|
+
|
|
34
|
+
## Core Rules
|
|
35
|
+
|
|
36
|
+
- Treat the main page body as the node readme/body field (`content` on modern Flywheel surfaces).
|
|
37
|
+
- Use artifacts for supporting files and evidence, not as a substitute for the node's main narrative.
|
|
38
|
+
- Only create graph edges for durable semantic relationships, because graphifying every wiki link floods the graph with noise that hides decision-relevant structure.
|
|
39
|
+
- Treat the flywheel-auto skill as graph-local autonomous research: persist the run contract in the graph, keep the plan `n` hops ahead, and spend only within an explicit measured budget.
|
|
40
|
+
- Ask only the minimum clarification questions needed to establish a coherent control contract, and ask none when the required answers are already recoverable from user instructions, conversational context, or graph state.
|
|
41
|
+
- Planned nodes that are expected to produce evidence or artifacts should be typed `empirical`; planned nodes that only encode synthesis, decomposition, or decision structure should be typed `insight`.
|
|
42
|
+
- Keep the control node typed `insight` and keep its `insights` non-empty so the insight commit contract stays valid.
|
|
43
|
+
- Do not rely on fresh user feedback to decide whether the flywheel-auto skill should continue, so later replans can resume from node state alone in a fresh chat.
|
|
44
|
+
|
|
45
|
+
## Workflow
|
|
46
|
+
|
|
47
|
+
1. Resolve the starting context.
|
|
48
|
+
- Resolve starting 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.
|
|
49
|
+
2. Resolve the objective and budget contract.
|
|
50
|
+
- Recover required execution inputs from the current conversation and graph first. Ask only for inputs that remain genuinely missing after that recovery pass.
|
|
51
|
+
- The flywheel-auto skill requires a measurable objective and an explicit terminal condition. 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.
|
|
52
|
+
- The budget contract must be explicit before execution starts. Ask once for any missing budget ceiling, budget unit, or terminal condition. If those inputs remain unavailable after one clarification round, keep planning but do not request compute approval or acquire compute.
|
|
53
|
+
- Managed compute spend is billed in Flywheel credits. If the user gives dollars, hours, or another measurable budget semantic, persist that user-facing cap explicitly and derive the operational compute approval cap before acquisition.
|
|
54
|
+
- Persist the run contract in a dedicated `insight` control node for this frontier. Put the canonical contract in node `content`, keep a one-line synopsis in `summary`, and keep brief run rationale in `insights` so the commit contract stays valid.
|
|
55
|
+
- The control contract must name: objective, decision criterion, start nodes, budget ceiling and unit, lookahead depth `n`, frontier width `k`, and an explicit terminal condition.
|
|
56
|
+
- Later flywheel-auto replans must read the control node `content` first and continue from that persisted contract rather than from chat memory.
|
|
57
|
+
- Run the design gate from [references/experiment-design-protocol.md](references/experiment-design-protocol.md) before the first compute request: confirm objective, decision criterion, evidence plan, and budget readiness, even though later continuation decisions become graph-local.
|
|
58
|
+
3. Map each stable page, claim, or concept to a node.
|
|
59
|
+
- For exact node-mutation shapes, load [references/flywheel-mcp-tool-map.md](references/flywheel-mcp-tool-map.md).
|
|
60
|
+
- Create a new node with `flywheel_stage_node_create` when needed.
|
|
61
|
+
- Update an existing node with `flywheel_get_node` + `flywheel_stage_node_update` when continuing work.
|
|
62
|
+
4. Put the primary page markdown or plan rationale in the node body/readme field (`content`).
|
|
63
|
+
- Keep `summary` concise.
|
|
64
|
+
- Populate `hypothesis`, `insights`, `outcome`, and similar fields only when the source actually supports them.
|
|
65
|
+
5. Publish supporting files with the artifact upload flow.
|
|
66
|
+
- For exact artifact contract details, load [references/ARTIFACTS.md](references/ARTIFACTS.md).
|
|
67
|
+
- Use `flywheel_prepare_artifact_uploads`.
|
|
68
|
+
- Upload raw file bytes to the returned signed URLs.
|
|
69
|
+
- Call `flywheel_finalize_artifact_uploads` once all uploads in the batch are staged.
|
|
70
|
+
- Keep the artifact filename stable enough to reference from markdown when inline rendering matters.
|
|
71
|
+
6. Add graph structure sparingly.
|
|
72
|
+
- Promote only decision-relevant relationships to edges.
|
|
73
|
+
- Leave ordinary cross-links inside the markdown body.
|
|
74
|
+
7. Expand the frontier deliberately.
|
|
75
|
+
- Expand from the resolved frontier rather than mirroring the source corpus again.
|
|
76
|
+
- Depth `n` means plan `n` hops ahead from the currently resolved frontier. Default `n=1`.
|
|
77
|
+
- Width `k` means plan up to `k` distinct non-redundant frontier directions. Default `k=1`.
|
|
78
|
+
- In the flywheel-auto skill, the same `k` also caps concurrent workers pursuing executable frontier nodes.
|
|
79
|
+
- Keep unresolved plan nodes staged until the corresponding work is resolved.
|
|
80
|
+
8. Execute and replan continuously.
|
|
81
|
+
- For exact execution and compute request shapes, load [references/flywheel-mcp-tool-map.md](references/flywheel-mcp-tool-map.md) and [references/experiment-design-protocol.md](references/experiment-design-protocol.md).
|
|
82
|
+
- Use `flywheel_launch_execution` when the branch can run as a Flywheel node execution without a separate leased machine, and inspect terminal status before commit.
|
|
83
|
+
- Use managed compute when the branch needs provider or SKU choice, SSH access, a custom runtime, or longer-lived hardware. In that case 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.
|
|
84
|
+
- Spawn up to `k` workers for distinct executable frontier nodes.
|
|
85
|
+
- Route additional viable branches sequentially when there are more than `k` worthwhile directions.
|
|
86
|
+
- After each resolved node, refresh the lookahead so the graph remains `n` hops ahead.
|
|
87
|
+
- Release managed compute with `flywheel_compute_release` or `flywheel_compute_release_all` when a branch is done.
|
|
88
|
+
- Stop only when the graph-local terminal condition says to stop, such as: objective met, budget exhausted, or no non-redundant frontier branch is likely to produce enough decision-relevant information to justify the remaining budget and duplication risk.
|
|
89
|
+
9. Commit after the node snapshot is coherent with `flywheel_commit_node`.
|
|
90
|
+
- Commit resolved insight nodes only when they have non-empty `insights`.
|
|
91
|
+
- Commit resolved empirical nodes only when outcome and artifact rules are satisfied.
|
|
92
|
+
- Leave unresolved plan nodes staged.
|
|
93
|
+
|
|
94
|
+
## Result Contract
|
|
95
|
+
|
|
96
|
+
When the skill completes a pass, it should leave behind:
|
|
97
|
+
|
|
98
|
+
- One persisted `insight` control node containing the canonical run contract.
|
|
99
|
+
- Zero or more staged frontier nodes up to the current `n` and `k` limits.
|
|
100
|
+
- Zero or more committed resolved nodes, but only when their commit contracts are satisfied.
|
|
101
|
+
- Uploaded artifacts for completed empirical work, or an explicit `no_artifacts_reason` when artifacts are absent by design.
|
|
102
|
+
- Released managed compute if any lease was acquired during the pass.
|
|
103
|
+
- An explicit stop reason, continuation rule, or next action recorded in node state so a later pass can resume graph-locally.
|
|
104
|
+
|
|
105
|
+
## Persisted Control Contract
|
|
106
|
+
|
|
107
|
+
Use a dedicated `insight` node as the durable run controller for the current
|
|
108
|
+
frontier. Do not rely on unstated product fields or fresh chat context.
|
|
109
|
+
|
|
110
|
+
For the canonical entity model and public contract terminology behind this
|
|
111
|
+
controller, load [references/INTERFACES.md](references/INTERFACES.md).
|
|
112
|
+
|
|
113
|
+
Use this storage convention:
|
|
114
|
+
|
|
115
|
+
1. Reuse an existing control node when one already governs the same frontier;
|
|
116
|
+
otherwise create one with `flywheel_stage_node_create`.
|
|
117
|
+
2. Put the canonical contract in node `content`.
|
|
118
|
+
3. Put a one-line synopsis in `summary`.
|
|
119
|
+
4. Put the run rationale, continuation rule, or prioritization logic in
|
|
120
|
+
`insights` so the `insight` commit contract is satisfied.
|
|
121
|
+
5. Update the control node with `flywheel_stage_node_update`.
|
|
122
|
+
6. Read the control node with `flywheel_get_node` before later replans that need
|
|
123
|
+
a fresh `expected_revision` revision token for optimistic-locking writes.
|
|
124
|
+
7. Commit the control node with `flywheel_commit_node` once the contract is
|
|
125
|
+
coherent, even if executable frontier nodes remain staged or in progress.
|
|
126
|
+
|
|
127
|
+
Canonical contract shape:
|
|
128
|
+
|
|
129
|
+
```md
|
|
130
|
+
## Run contract
|
|
131
|
+
|
|
132
|
+
- Objective:
|
|
133
|
+
- Decision criterion:
|
|
134
|
+
- Start nodes:
|
|
135
|
+
- Budget ceiling:
|
|
136
|
+
- Budget unit:
|
|
137
|
+
- Compute approval cap:
|
|
138
|
+
- Lookahead depth:
|
|
139
|
+
- Frontier width:
|
|
140
|
+
- Terminal condition:
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Use `Compute approval cap` for the operational cap that will govern managed
|
|
144
|
+
compute acquisition. If the user already budgets directly in credits, it can
|
|
145
|
+
match `Budget ceiling`. If the user budgets in another unit, keep both values so
|
|
146
|
+
later continuations can recover the user-facing constraint and the executable
|
|
147
|
+
approval cap from node state alone.
|
|
148
|
+
|
|
149
|
+
## Guardrails
|
|
150
|
+
|
|
151
|
+
- Do not blur `$flywheel-reproduce` and the flywheel-auto skill, because `$flywheel-reproduce` validates existing claims under budget while the flywheel-auto skill expands the frontier to create new knowledge.
|
|
152
|
+
- Build the graph explicitly with nodes, artifacts, and selected edges.
|
|
153
|
+
- Keep the flywheel-auto skill graph-local: future continuation and stopping decisions should be derivable from the persisted node state rather than from fresh chat context.
|
|
154
|
+
- Do not ask follow-up questions after the control contract is coherent unless a contradiction, missing required approval, or tool/runtime failure makes autonomous continuation impossible.
|
|
155
|
+
|
|
156
|
+
See also: invoke `$flywheel-to-graph` to port source material into Flywheel without implicit execution, invoke `$flywheel-reproduce` to graphify claim-bearing sources and run budgeted validation branches, and invoke `$flywheel-lookahead` to stage next-step frontier nodes from existing graph state without execution.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "flywheel-auto"
|
|
3
|
+
short_description: "Run budgeted autonomous Flywheel research"
|
|
4
|
+
default_prompt: "Use $flywheel-auto to advance this Flywheel frontier autonomously under an explicit budget."
|
|
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": "continuation-from-existing-frontier",
|
|
4
|
+
"prompt": "Use $flywheel-auto at /Users/g.f.g.f./Documents/GitHub/paradigma/project/flywheel-setup/skills/flywheel-auto to continue a Flywheel frontier that already has a persisted control node. Keep going under the existing credit cap and do not ask again for the objective or budget unless the control node is missing or contradictory.",
|
|
5
|
+
"expected_output": "Read the persisted contract from the control node content before replanning, continue from that stored objective and budget, avoid re-asking for the objective or budget when the control node is coherent, and leave behind an updated control node plus staged or committed frontier work.",
|
|
6
|
+
"files": []
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"id": "cold-start-with-non-credit-budget",
|
|
10
|
+
"prompt": "Use $flywheel-auto at /Users/g.f.g.f./Documents/GitHub/paradigma/project/flywheel-setup/skills/flywheel-auto to explore this frontier autonomously with at most $25 of managed-compute spend. Persist the dollar-denominated cap verbatim and derive whatever operational compute approval cap is needed before acquisition.",
|
|
11
|
+
"expected_output": "Persist the dollar-denominated budget ceiling and unit verbatim in the control node, derive an operational compute approval cap before acquisition, record both values before any compute request is made, and leave a coherent run contract behind for later continuation.",
|
|
12
|
+
"files": []
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "cold-start-with-no-objective",
|
|
16
|
+
"prompt": "Use $flywheel-auto at /Users/g.f.g.f./Documents/GitHub/paradigma/project/flywheel-setup/skills/flywheel-auto to go autonomous on this Flywheel graph until you find something interesting. If I refuse to specify an objective, infer one from the graph context and make it explicit before you execute.",
|
|
17
|
+
"expected_output": "Ask for an objective first, infer one from graph context if the user refuses, write that objective explicitly into the control node, and only then proceed toward execution with a coherent control node and frontier plan.",
|
|
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`)
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Interfaces
|
|
2
|
+
|
|
3
|
+
Canonical reference for Flywheel user-facing interfaces and public contracts.
|
|
4
|
+
|
|
5
|
+
Last updated: 2026-03-21
|
|
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`
|
|
12
|
+
|
|
13
|
+
## Canonical Entity Model
|
|
14
|
+
|
|
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
|
+
- budget grant
|
|
23
|
+
|
|
24
|
+
Node snapshots are the canonical durable contract for resume, review, and
|
|
25
|
+
cross-client interoperability.
|
|
26
|
+
|
|
27
|
+
## Core HTTP Surface
|
|
28
|
+
|
|
29
|
+
### Node lifecycle and graph
|
|
30
|
+
|
|
31
|
+
- `GET /mcp/nodes`
|
|
32
|
+
- `GET /mcp/nodes/{node_id}`
|
|
33
|
+
- `GET /mcp/nodes/{node_id}/tree`
|
|
34
|
+
- `POST /mcp/nodes/stage/create`
|
|
35
|
+
- `PATCH /mcp/nodes/{node_id}/stage/update`
|
|
36
|
+
- `POST /mcp/nodes/{node_id}/commit`
|
|
37
|
+
- `POST /mcp/nodes/{node_id}/branch`
|
|
38
|
+
- `POST /mcp/nodes/merge`
|
|
39
|
+
- `DELETE /mcp/nodes/{node_id}`
|
|
40
|
+
- `POST /mcp/nodes/bulk-delete`
|
|
41
|
+
|
|
42
|
+
### Artifact lifecycle
|
|
43
|
+
|
|
44
|
+
- `POST /mcp/nodes/{node_id}/artifacts/uploads/prepare`
|
|
45
|
+
- `POST /mcp/nodes/{node_id}/artifacts/uploads/finalize`
|
|
46
|
+
- `GET /mcp/nodes/{node_id}/artifacts`
|
|
47
|
+
- `GET /mcp/nodes/{node_id}/artifacts/{artifact_id}`
|
|
48
|
+
- `GET /mcp/nodes/{node_id}/artifacts/{artifact_id}/preview`
|
|
49
|
+
- `DELETE /mcp/nodes/{node_id}/artifacts/{artifact_id}`
|
|
50
|
+
- `PUT /mcp/artifacts/uploads/{upload_id}`
|
|
51
|
+
|
|
52
|
+
### Execution lifecycle
|
|
53
|
+
|
|
54
|
+
- `POST /mcp/nodes/{node_id}/executions`
|
|
55
|
+
- `GET /mcp/nodes/{node_id}/executions`
|
|
56
|
+
- `POST /mcp/nodes/{node_id}/executions/{execution_id}/terminate`
|
|
57
|
+
|
|
58
|
+
### Compute catalog
|
|
59
|
+
|
|
60
|
+
- `GET /compute/providers`
|
|
61
|
+
- `GET /compute/offers`
|
|
62
|
+
- `GET /compute/offers/{provider}`
|
|
63
|
+
|
|
64
|
+
### Managed compute and budgets
|
|
65
|
+
|
|
66
|
+
- `GET /mcp/nodes/{node_id}/compute/options`
|
|
67
|
+
- `POST /mcp/nodes/{node_id}/compute/acquire`
|
|
68
|
+
- `GET /mcp/compute/status`
|
|
69
|
+
- `GET /mcp/compute/connection`
|
|
70
|
+
- `POST /mcp/compute/release`
|
|
71
|
+
- `POST /mcp/compute/release-all`
|
|
72
|
+
- `GET /mcp/nodes/{node_id}/budget/grants`
|
|
73
|
+
- `GET /mcp/nodes/{node_id}/budget/campaign-grants`
|
|
74
|
+
- `POST /mcp/nodes/{node_id}/budget/campaign-grants`
|
|
75
|
+
- `PATCH /mcp/nodes/{node_id}/budget/campaign-grants/{budget_grant_id}`
|
|
76
|
+
- `DELETE /mcp/nodes/{node_id}/budget/campaign-grants/{budget_grant_id}`
|
|
77
|
+
|
|
78
|
+
### Sharing, tags, and audit
|
|
79
|
+
|
|
80
|
+
- `GET /mcp/nodes/{node_id}/sharing`
|
|
81
|
+
- `PUT /mcp/nodes/{node_id}/sharing`
|
|
82
|
+
- `POST /mcp/nodes/sharing/bulk`
|
|
83
|
+
- `GET /mcp/nodes/{node_id}/audit`
|
|
84
|
+
- `POST /mcp/nodes/{root_node_id}/tags`
|
|
85
|
+
- `PATCH /mcp/nodes/{root_node_id}/tags/{tag_id}`
|
|
86
|
+
- `DELETE /mcp/nodes/{root_node_id}/tags/{tag_id}`
|
|
87
|
+
- `PUT /mcp/nodes/{node_id}/tags`
|
|
88
|
+
|
|
89
|
+
### Export and summaries
|
|
90
|
+
|
|
91
|
+
- `POST /mcp/export`
|
|
92
|
+
- `POST /mcp/import`
|
|
93
|
+
- `POST /mcp/export-summary`
|
|
94
|
+
- `POST /mcp/export-summary-stream`
|
|
95
|
+
- `POST /mcp/export-summary-pdf`
|
|
96
|
+
- `POST /mcp/export-summary-render-pdf`
|
|
97
|
+
|
|
98
|
+
### Auth and integrations
|
|
99
|
+
|
|
100
|
+
- `GET /auth/status`
|
|
101
|
+
- `GET /auth/accounts`
|
|
102
|
+
- `POST /auth/accounts/merge/source-proof`
|
|
103
|
+
- `POST /auth/accounts/merge/preview`
|
|
104
|
+
- `POST /auth/accounts/merge`
|
|
105
|
+
- `POST /auth/accounts/detach`
|
|
106
|
+
- `GET /auth/integrations/status`
|
|
107
|
+
- `PUT /auth/integrations/wandb`
|
|
108
|
+
- `PUT /auth/integrations/huggingface`
|
|
109
|
+
- `DELETE /auth/integrations/wandb`
|
|
110
|
+
- `DELETE /auth/integrations/huggingface`
|
|
111
|
+
|
|
112
|
+
### Analytics
|
|
113
|
+
|
|
114
|
+
- `POST /analytics/events`
|
|
115
|
+
- `GET /admin/analytics/kpis`
|
|
116
|
+
- `GET /admin/analytics/overview`
|
|
117
|
+
|
|
118
|
+
## MCP Tool Surface
|
|
119
|
+
|
|
120
|
+
### Discovery and sharing tools
|
|
121
|
+
|
|
122
|
+
- `flywheel_auth_status`
|
|
123
|
+
- `flywheel_get_credits_balance`
|
|
124
|
+
- `flywheel_list_nodes`
|
|
125
|
+
- `flywheel_get_node`
|
|
126
|
+
- `flywheel_get_node_tree`
|
|
127
|
+
- `flywheel_get_node_sharing`
|
|
128
|
+
- `flywheel_set_node_sharing`
|
|
129
|
+
- `flywheel_bulk_set_node_sharing`
|
|
130
|
+
- `flywheel_create_node_tag`
|
|
131
|
+
- `flywheel_update_node_tag`
|
|
132
|
+
- `flywheel_delete_node_tag`
|
|
133
|
+
- `flywheel_set_node_tag_assignments`
|
|
134
|
+
|
|
135
|
+
### Node and graph tools
|
|
136
|
+
|
|
137
|
+
- `flywheel_stage_node_create`
|
|
138
|
+
- `flywheel_stage_node_update`
|
|
139
|
+
- `flywheel_commit_node`
|
|
140
|
+
- `flywheel_branch_node`
|
|
141
|
+
- `flywheel_merge_nodes`
|
|
142
|
+
- `flywheel_delete_node`
|
|
143
|
+
- `flywheel_bulk_delete_nodes`
|
|
144
|
+
|
|
145
|
+
### Artifact tools
|
|
146
|
+
|
|
147
|
+
- `flywheel_prepare_artifact_uploads`
|
|
148
|
+
- `flywheel_finalize_artifact_uploads`
|
|
149
|
+
- `flywheel_list_artifacts`
|
|
150
|
+
- `flywheel_get_artifact`
|
|
151
|
+
- `flywheel_get_artifact_preview`
|
|
152
|
+
- `flywheel_delete_artifact`
|
|
153
|
+
|
|
154
|
+
### Execution tools
|
|
155
|
+
|
|
156
|
+
- `flywheel_launch_execution`
|
|
157
|
+
- `flywheel_list_executions`
|
|
158
|
+
- `flywheel_terminate_execution`
|
|
159
|
+
|
|
160
|
+
### Compute lease and budget tools
|
|
161
|
+
|
|
162
|
+
- `flywheel_compute_list_options`
|
|
163
|
+
- `flywheel_request_compute_grant_approval`
|
|
164
|
+
- `flywheel_list_compute_grants`
|
|
165
|
+
- `flywheel_compute_acquire`
|
|
166
|
+
- `flywheel_compute_status`
|
|
167
|
+
- `flywheel_compute_connection`
|
|
168
|
+
- `flywheel_compute_release`
|
|
169
|
+
- `flywheel_compute_release_all`
|
|
170
|
+
|
|
171
|
+
### Campaign budget tools
|
|
172
|
+
|
|
173
|
+
- `flywheel_list_campaign_budgets`
|
|
174
|
+
- `flywheel_create_campaign_budget`
|
|
175
|
+
- `flywheel_update_campaign_budget`
|
|
176
|
+
- `flywheel_revoke_campaign_budget`
|
|
177
|
+
|
|
178
|
+
### Contract, audit, and export tools
|
|
179
|
+
|
|
180
|
+
- `flywheel_get_contract`
|
|
181
|
+
- `flywheel_list_audit`
|
|
182
|
+
- `flywheel_summarize_node_tree`
|
|
183
|
+
- `flywheel_export_subgraph`
|
|
184
|
+
- `flywheel_import_subgraph`
|
|
185
|
+
- `flywheel_export_summary`
|
|
186
|
+
- `flywheel_export_summary_stream`
|
|
187
|
+
- `flywheel_export_summary_pdf`
|
|
188
|
+
- `flywheel_export_summary_render_pdf`
|
|
189
|
+
|
|
190
|
+
## Legacy Archival Export
|
|
191
|
+
|
|
192
|
+
Experimental settings keep legacy history export available as an archival
|
|
193
|
+
migration aid. This path is read-only and outside canonical node workflows.
|
|
194
|
+
|
|
195
|
+
## Related Docs
|
|
196
|
+
|
|
197
|
+
- `docs/flywheel/CONCEPT.md`
|
|
198
|
+
- `docs/flywheel/FLYWHEEL_MCP.md`
|
|
199
|
+
- `docs/flywheel/PROVISIONING.md`
|
|
200
|
+
- `docs/flywheel/ARTIFACTS.md`
|
|
201
|
+
- `docs/flywheel/GIT_INTEGRATION.md`
|
package/skills/{flywheel/reference → flywheel-auto/references}/experiment-design-protocol.md
RENAMED
|
@@ -119,6 +119,9 @@ If the run is expensive or high-risk, ask for explicit confirmation.
|
|
|
119
119
|
|
|
120
120
|
Use Flywheel in layers when possible.
|
|
121
121
|
|
|
122
|
+
Before execution, load `references/flywheel-mcp-tool-map.md` and verify the
|
|
123
|
+
exact tool surface exposed by the current MCP host before critical flows.
|
|
124
|
+
|
|
122
125
|
### Design layer
|
|
123
126
|
|
|
124
127
|
Use an `insight` node to capture rationale, open questions, experiment shape, and any decomposition needed for exploratory or multi-stage work.
|
|
@@ -137,11 +140,12 @@ Typical flow:
|
|
|
137
140
|
|
|
138
141
|
1. `mcp__flywheel__flywheel_branch_node` or `mcp__flywheel__flywheel_stage_node_create`
|
|
139
142
|
2. `mcp__flywheel__flywheel_stage_node_update` with the explicit run summary and the local question or hypothesis for that branch
|
|
140
|
-
3. `
|
|
141
|
-
4. `
|
|
142
|
-
5. `
|
|
143
|
-
6.
|
|
144
|
-
7.
|
|
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`
|
|
145
|
+
5. `mcp__flywheel__flywheel_compute_acquire` and related compute tools only when execution is actually needed
|
|
146
|
+
6. `mcp__flywheel__flywheel_prepare_artifact_uploads`, raw upload to the returned signed URLs, then `mcp__flywheel__flywheel_finalize_artifact_uploads`
|
|
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.
|
|
148
|
+
8. `mcp__flywheel__flywheel_commit_node`
|
|
145
149
|
|
|
146
150
|
Important notes:
|
|
147
151
|
|