@paradigma-inc/flywheel 0.1.4 → 0.1.9

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 (28) hide show
  1. package/README.md +129 -24
  2. package/package.json +10 -8
  3. package/skills/flywheel/SKILL.md +52 -0
  4. package/skills/flywheel/agents/openai.yaml +15 -0
  5. package/skills/flywheel/campaigns/participating-in-a-campaign.md +18 -0
  6. package/skills/flywheel/compute/credits-and-billing.md +11 -0
  7. package/skills/flywheel/compute/managed-compute.md +44 -0
  8. package/skills/flywheel/example-workflows/organizing-exploring-and-iterating-on-a-research-topic.md +255 -0
  9. package/skills/flywheel/example-workflows/reproducing-papers-on-a-budget.md +151 -0
  10. package/skills/flywheel/getting-started/account-access.md +8 -0
  11. package/skills/flywheel/getting-started/flywheel-quickstart.md +23 -0
  12. package/skills/flywheel/getting-started/flywheel-tutorial-overview.md +30 -0
  13. package/skills/flywheel/reference/experiment-design-protocol.md +200 -0
  14. package/skills/flywheel/reference/flywheel-mcp-tool-map.md +160 -0
  15. package/skills/flywheel/setting-up-flywheel/claude-code-cli-installation.md +16 -0
  16. package/skills/flywheel/setting-up-flywheel/codex-cli-installation.md +16 -0
  17. package/skills/flywheel/setting-up-flywheel/how-can-i-get-an-authorized-client_id-for-the-oauth-flow.md +50 -0
  18. package/skills/flywheel/setting-up-flywheel/installation-overview.md +26 -0
  19. package/skills/flywheel/setting-up-flywheel/other-hosts-installation.md +40 -0
  20. package/skills/flywheel/setting-up-flywheel/updating-flywheel-mcp.md +21 -0
  21. package/skills/flywheel/usage-and-workflows/using-local-hardware-with-flywheel.md +57 -0
  22. package/skills/flywheel/usage-and-workflows/what-to-do-with-flywheel.md +34 -0
  23. package/skills/flywheel/web-ui/flywheel-webui-map.md +28 -0
  24. package/skills/flywheel/web-ui/the-flywheel-web-ui.md +17 -0
  25. package/src/cli.mjs +508 -54
  26. package/src/mcp-writer.mjs +128 -3
  27. package/src/setup-auth.mjs +231 -27
  28. package/src/skill-installer.mjs +542 -0
@@ -0,0 +1,151 @@
1
+ # Reproducing Papers on a Budget
2
+
3
+ > The tool lists below are inferred from the current [Flywheel MCP tool map](../reference/flywheel-mcp-tool-map.md). They are likely tool sequences for each step, not verbatim execution logs.
4
+
5
+ ## [@tensorqt](https://x.com/tensorqt) · [13 Mar 2026, 9:34 pm](https://x.com/tensorqt/status/2032555892399305171)
6
+
7
+ A really interesting way of using Flywheel is to reproduce papers on a budget: I find this new attention trick interesting, although a little counterintuitive in terms of bitterness of the pill. Now I can simply take my MCP host with Flywheel MCP and turn the paper into a graph like this, asking the model to spend at most $10 doing it:
8
+
9
+ ### Likely Flywheel MCP tools for this step
10
+
11
+ - `mcp__flywheel__flywheel_stage_node_create` to create the root reproduction graph or first node for the paper.
12
+ - `mcp__flywheel__flywheel_branch_node` to split the paper into parallel validation branches.
13
+ - `mcp__flywheel__flywheel_stage_node_update` to capture the paper claim, reproduction plan, and budget constraint.
14
+ - `mcp__flywheel__flywheel_request_budget_approval` to enforce the "$10 max" spend before managed compute starts.
15
+ - `mcp__flywheel__flywheel_commit_node` to persist the planned graph structure.
16
+
17
+ ### Image Description
18
+
19
+ ```text
20
+ A tall, minimalist node-link graph on a white background. Near the upper-left-center is a solid black hub node overlaid by the truncated label "Reproduction Graph. Ex...". Thin, light-gray edges radiate outward from this hub into a loose star of small pastel circles. Most intermediate nodes are pale pink, while several terminal leaf nodes are light beige. Around the hub, multiple short branches fan out in different directions, but one branch dominates the composition: it drops almost straight downward through a chain of pink nodes, then splits near the bottom into three short offshoots ending in two pink leaves and one beige leaf. The image contains large areas of empty white space, making the graph feel sparse and schematic, like an execution tree or experiment dependency graph rather than a dense network diagram.
21
+ ```
22
+
23
+ > **Shuangfei Zhai** ([@zhaisf](https://x.com/zhaisf)) · 12 Mar
24
+ >
25
+ > Say hi to Exclusive Self Attention (XSA), a (nearly) free improvement to Transformers for LM. Observation: for y = attn(q, k, v), yi and vi tend to have a very high cosine similarity. Fix: exclude vi from yi via zi = yi - (yiTvi)vi/||vi||². Result: better training/val
26
+ >
27
+ > ### Image Description
28
+ >
29
+ > ```text
30
+ > A compact training-loss chart on a pale gray-lavender grid background. The x-axis is labeled "Training iteration (K)" and runs from 0 to 200; the y-axis is labeled "Training loss" and spans roughly 2.4 to 3.2. Six smooth but slightly noisy curves compare baseline and XSA runs for 0.7b, 1.3b, and 2.7b models, with a legend in the upper-right listing `0.7b_baseline`, `0.7b_xsa`, `1.3b_baseline`, `1.3b_xsa`, `2.7b_baseline`, and `2.7b_xsa`. All curves fall sharply early and then taper into slower improvement. For each model size, the XSA line sits below the corresponding baseline line after the initial drop, visually suggesting better training loss. The 0.7b pair occupies the top of the plot, the 1.3b pair the middle, and the 2.7b pair the bottom, with the best-performing line finishing near the lower-right corner around the mid-2.4s.
31
+ > ```
32
+
33
+ ---
34
+
35
+ ## [@tensorqt](https://x.com/tensorqt) · [13 Mar](https://x.com/tensorqt/status/2032555896014766151)
36
+
37
+ The model decides to play it safe: it starts by showing self-attention correlation on a small A10 GPU (provisioned via Flywheel).
38
+
39
+ ### Likely Flywheel MCP tools for this step
40
+
41
+ - `mcp__flywheel__flywheel_branch_node` to open the first empirical branch for the baseline correlation check.
42
+ - `mcp__flywheel__flywheel_stage_node_update` to record the hypothesis and experiment setup.
43
+ - `mcp__flywheel__flywheel_compute_acquire`, `mcp__flywheel__flywheel_compute_status`, and `mcp__flywheel__flywheel_compute_connection` to provision and use the small A10 GPU.
44
+ - `mcp__flywheel__flywheel_prepare_artifact_publish` to attach `attn_similarity_by_layer.png`.
45
+ - `mcp__flywheel__flywheel_commit_node` to mark the step as a completed empirical result.
46
+
47
+ ### Image Description
48
+
49
+ ```text
50
+ A wide screenshot of a Flywheel artifact viewer card titled `attn_similarity_by_layer.png`, with a light header bar and a `Collapse` control in the top-right. Inside the card is a line chart titled "Exp 1A: Baseline attention similarity bias signal". The x-axis is "Layer index" from 0 to 7, and the y-axis is "Mean cos(y_i, v_i)" from about 0.18 to 0.50. A single blue line with circular markers starts low at roughly 0.19 for layer 0, jumps above 0.38 at layer 1, peaks around 0.50 at layer 2, stays near 0.40 through layers 3 to 5, dips noticeably to about 0.31 at layer 6, and rebounds to about 0.42 at layer 7. A black dashed horizontal reference line labeled `global=0.377` cuts across the figure, with most points except the first and sixth layer sitting above that average. The surrounding UI is clean and white, making the plot feel like a generated experimental artifact rather than a paper figure.
51
+ ```
52
+
53
+ ---
54
+
55
+ ## [@tensorqt](https://x.com/tensorqt) · [13 Mar](https://x.com/tensorqt/status/2032555899424772549)
56
+
57
+ Step two is analogous: orthogonality before and after XSA.
58
+
59
+ ### Likely Flywheel MCP tools for this step
60
+
61
+ - `mcp__flywheel__flywheel_branch_node` to create the next experimental branch.
62
+ - `mcp__flywheel__flywheel_stage_node_update` to record the orthogonality hypothesis for XSA.
63
+ - `mcp__flywheel__flywheel_compute_acquire`, `mcp__flywheel__flywheel_compute_status`, and `mcp__flywheel__flywheel_compute_connection` to run the projection check.
64
+ - `mcp__flywheel__flywheel_prepare_artifact_publish` to attach `orthogonality_by_layer.png`.
65
+ - `mcp__flywheel__flywheel_commit_node` to finalize the branch.
66
+
67
+ ### Image Description
68
+
69
+ ```text
70
+ A Flywheel artifact screenshot titled `orthogonality_by_layer.png`. The central figure is a two-series line chart labeled "Exp 2A: XSA projection orthogonality by layer". The x-axis is "Layer" from 0 to 7, and the y-axis is "Cosine similarity". A blue series with circular markers, labeled `cos(y, v) baseline direction`, begins around 0.20 at layer 0 and then stays high, roughly in the 0.47 to 0.55 range, across the remaining layers. An orange series with square markers, labeled `cos(z, v) after XSA projection`, lies directly on the zero line for every layer, visually emphasizing that the projected vector has become nearly orthogonal to `v`. Below the chart, a separate text block headed `HYPOTHESIS` states that XSA projection should drive the post-projection inner product toward numerical zero relative to standard self-attention while staying stable within a spend budget of about 100 cents.
71
+ ```
72
+
73
+ ---
74
+
75
+ ## [@tensorqt](https://x.com/tensorqt) · [13 Mar](https://x.com/tensorqt/status/2032555903250030762)
76
+
77
+ Then, it moves to overhead of the orthogonal projection.
78
+
79
+ ### Likely Flywheel MCP tools for this step
80
+
81
+ - `mcp__flywheel__flywheel_branch_node` to fork an efficiency-comparison branch.
82
+ - `mcp__flywheel__flywheel_stage_node_update` to define the runtime and VRAM hypothesis.
83
+ - `mcp__flywheel__flywheel_compute_acquire`, `mcp__flywheel__flywheel_compute_status`, and `mcp__flywheel__flywheel_compute_connection` to run the matched SA vs XSA benchmark.
84
+ - `mcp__flywheel__flywheel_prepare_artifact_publish` to attach `efficiency_comparison.png`.
85
+ - `mcp__flywheel__flywheel_commit_node` to finalize the overhead measurement.
86
+
87
+ ### Image Description
88
+
89
+ ```text
90
+ A Flywheel artifact viewer card titled `efficiency_comparison.png`, again with rounded white panel styling and a `Collapse` control in the upper-right. The main plot is a grouped bar chart titled "Exp 3A: SA vs XSA efficiency comparison". Three category labels run along the x-axis: `Train sec`, `Peak VRAM MB`, and `Tok/sec`. Blue bars represent `SA`, while orange bars represent `XSA-final`. On the shared vertical scale, the train-time bars are so short they are nearly flush with the baseline, indicating very similar runtimes. The peak-VRAM bars are close together around the low twelve-thousand-megabyte range, with XSA appearing only slightly different from SA. The throughput bars dominate the chart, both sitting near roughly 125k tokens per second, with the blue SA bar modestly taller than the orange XSA-final bar. Beneath the plot, a `HYPOTHESIS` note says XSA should add only small runtime and VRAM overhead relative to SA for matched shapes under a budget of roughly 150 cents.
91
+ ```
92
+
93
+ ---
94
+
95
+ ## [@tensorqt](https://x.com/tensorqt) · [13 Mar](https://x.com/tensorqt/status/2032555907864039646)
96
+
97
+ Up to now, no trouble. The agent then decides to train a 50M parameter model with XSA versus a SA baseline, finding that, at this size, there seems to be no improvements:
98
+
99
+ ### Likely Flywheel MCP tools for this step
100
+
101
+ - `mcp__flywheel__flywheel_branch_node` to create the larger training branch.
102
+ - `mcp__flywheel__flywheel_stage_node_update` to record the 50M-parameter comparison and evaluation criteria.
103
+ - `mcp__flywheel__flywheel_compute_acquire`, `mcp__flywheel__flywheel_compute_status`, and `mcp__flywheel__flywheel_compute_connection` to run the longer training jobs.
104
+ - `mcp__flywheel__flywheel_prepare_artifact_publish` to attach `run_metrics.csv` and `quality_pairs.csv`.
105
+ - `mcp__flywheel__flywheel_commit_node` to record that the empirical result did not reproduce the expected gain.
106
+
107
+ ### Image Description
108
+
109
+ ```text
110
+ A cropped Flywheel results page showing text summary and tabular artifacts instead of a chart. At the top, a section label `SUMMARY` is followed by a sentence stating that the main quality-gain claim was not reproduced at this compact budget and scale, and that XSA underperformed SA in both matched pairs. Below that, an `ARTIFACTS` section displays an expanded table card titled `run_metrics.csv`. Four runs are visible: `long_sa`, `long_xsa`, `short_sa`, and `short_xsa`. Visible columns include `RUN_ID`, `VAL_BPB`, `TRAINING_SECONDS`, `TOTAL_SECONDS`, `PEAK_VRAM_MB`, and the beginning of an `MFU_...` column. The values show XSA with slightly worse validation BPB and slightly higher total time and VRAM than the corresponding SA runs. A second table card titled `quality_pairs.csv` compares `short` and `long` matched pairs at sequence lengths 1024 and 2048. Its visible `DELTA_XSA_MINUS_SA` values are positive, approximately 0.00455 for the short pair and 0.00756 for the long pair, and the `XSA_BETTER` indicator is 0 for both rows. Horizontal scroll bars under both tables emphasize that the screenshot is a cropped view into wider result tables.
111
+ ```
112
+
113
+ ---
114
+
115
+ ## [@tensorqt](https://x.com/tensorqt) · [13 Mar](https://x.com/tensorqt/status/2032555911999336864)
116
+
117
+ Also, across sequence length, the trend seems to worsen.
118
+
119
+ ### Likely Flywheel MCP tools for this step
120
+
121
+ - `mcp__flywheel__flywheel_branch_node` to spin off an analysis branch for context length.
122
+ - `mcp__flywheel__flywheel_get_node` and `mcp__flywheel__flywheel_list_artifacts` to gather results from the completed training branches.
123
+ - `mcp__flywheel__flywheel_stage_node_update` to record the interpretation that the delta worsens at longer context.
124
+ - `mcp__flywheel__flywheel_prepare_artifact_publish` to attach `length_trend.png`.
125
+ - `mcp__flywheel__flywheel_commit_node` to persist the analysis.
126
+
127
+ ### Image Description
128
+
129
+ ```text
130
+ A Flywheel artifact card titled `length_trend.png` containing a simple two-point line chart labeled "Step 5: Context-length trend of XSA advantage". The x-axis is "Sequence length" and spans from just above 1000 to just above 2000. The y-axis reads `Delta BPB (XSA - SA, lower is better)`. One blue marker sits near sequence length 1024 with a value around 0.0046, and the second sits near 2048 with a value around 0.0076. A single straight line connects them, slanting upward from left to right. A black dashed horizontal line marks zero across the bottom of the chart, and both measured points remain clearly above it. The visual message is that XSA is worse than SA under this metric at both tested context lengths, and the gap grows as the sequence length increases.
131
+ ```
132
+
133
+ ---
134
+
135
+ ## [@tensorqt](https://x.com/tensorqt) · [13 Mar](https://x.com/tensorqt/status/2032555915182789045)
136
+
137
+ At the same time, baseline seems to also win the LR sweeps.
138
+
139
+ ### Likely Flywheel MCP tools for this step
140
+
141
+ - `mcp__flywheel__flywheel_branch_node` to create a robustness branch for LR sweeps and sink-style perturbations.
142
+ - `mcp__flywheel__flywheel_stage_node_update` to capture the robustness hypothesis.
143
+ - `mcp__flywheel__flywheel_compute_acquire`, `mcp__flywheel__flywheel_compute_status`, and `mcp__flywheel__flywheel_compute_connection` to run the compact sweep experiments.
144
+ - `mcp__flywheel__flywheel_prepare_artifact_publish` to attach `robustness_deltas.png`.
145
+ - `mcp__flywheel__flywheel_commit_node` to finalize the robustness verdict.
146
+
147
+ ### Image Description
148
+
149
+ ```text
150
+ A Flywheel artifact screenshot titled `robustness_deltas.png`. The central figure is a vertical bar chart labeled "Exp 6A: Robustness deltas across conditions". The y-axis reads `Delta BPB (XSA - SA, lower is better)`, and the x-axis shows three angled category labels: `default_lr_seq1024`, `low_lr_seq1024`, and `sink_proxy_seq256`. All three bars are blue and all are positive, with heights around 0.0045, 0.0051, and 0.0063 respectively. The rightmost `sink_proxy_seq256` bar is the tallest, while `default_lr_seq1024` is the shortest. Since every bar is above zero, the chart visually indicates that none of the tested robustness conditions produced an XSA win by this metric. Beneath the plot, a `HYPOTHESIS` note says XSA advantage should remain non-negative across a compact learning-rate sweep and one attention-sink perturbation setting under a budget of about 150 cents.
151
+ ```
@@ -0,0 +1,8 @@
1
+ # Account Access
2
+
3
+ You need a Flywheel account to use Flywheel.
4
+
5
+ - Sign up: [https://flywheel.paradigma.inc/signup](https://flywheel.paradigma.inc/signup)
6
+ - Sign in: [https://flywheel.paradigma.inc/login](https://flywheel.paradigma.inc/login)
7
+
8
+ If an MCP host uses an OAuth-style connector flow and you do not already have an account, create one first and then continue the authentication flow.
@@ -0,0 +1,23 @@
1
+ # Welcome to Flywheel
2
+
3
+ Install Flywheel in your MCP host with:
4
+
5
+ ```bash
6
+ npx @paradigma-inc/flywheel setup
7
+ ```
8
+
9
+ If you installed Flywheel MCP before April 2026, migrate to the newer, more stable API key authentication setup with:
10
+
11
+ ```bash
12
+ npx @paradigma-inc/flywheel uninstall
13
+ npx @paradigma-inc/flywheel setup
14
+ ```
15
+
16
+ If your previous install used a server name different from `flywheel`, pass `--name <old-name>` to uninstall that specific entry.
17
+
18
+ If your MCP host is not supported by `npx @paradigma-inc/flywheel setup`, use manual host configuration:
19
+
20
+ - URL: `https://flywheel.paradigma.inc/mcp-server`
21
+ - Header: `Authorization: Bearer <YOUR_MCP_API_KEY>`
22
+
23
+ For hosts that support MCP OAuth connector installs, you can also use the host-native OAuth connector flow with `https://flywheel.paradigma.inc/mcp-server`.
@@ -0,0 +1,30 @@
1
+ # Flywheel Tutorial
2
+
3
+ > Note: We are constantly iterating, so some aspects of this tutorial may be stale.
4
+ >
5
+ > Psst: you need an account to use Flywheel. See [Account access](./account-access.md) or go directly to [sign up](https://flywheel.paradigma.inc/signup) or [sign in](https://flywheel.paradigma.inc/login).
6
+
7
+ Welcome to Flywheel. Below we will cover how to install Flywheel and some tips on usage patterns.
8
+
9
+ ## [](https://flywheel.paradigma.inc//#what-is-flywheel)What is Flywheel?
10
+
11
+ Flywheel's ambition is to serve as the infrastructure upon which autonomous science will run.
12
+
13
+ In its current iteration, you can think of Flywheel as _"git for research"_, to aide researchers and agents in working on research projects.
14
+
15
+ While in SWE we use git to manage changes to code, in research we are interested in manipulating ideas. Flywheel provides the DAG structure and operations (branching, merging, etc) to manage this.
16
+
17
+ ## Documentation Sections
18
+
19
+ - [Account access](./account-access.md)
20
+ - [Setting up Flywheel](../setting-up-flywheel/installation-overview.md)
21
+ - [How to update Flywheel MCP](../setting-up-flywheel/updating-flywheel-mcp.md)
22
+ - [What to do with Flywheel](../usage-and-workflows/what-to-do-with-flywheel.md)
23
+ - [The Flywheel WebUI](../web-ui/the-flywheel-web-ui.md)
24
+ - [Managed Compute](../compute/managed-compute.md)
25
+ - [Credits and billing](../compute/credits-and-billing.md)
26
+ - [Using local hardware with Flywheel](../usage-and-workflows/using-local-hardware-with-flywheel.md)
27
+ - [Participating in a Campaign](../campaigns/participating-in-a-campaign.md)
28
+ - [OAuth client registration FAQ](../setting-up-flywheel/how-can-i-get-an-authorized-client_id-for-the-oauth-flow.md)
29
+ - [Flywheel MCP tool map](../reference/flywheel-mcp-tool-map.md)
30
+ - [Example workflows](../example-workflows/)
@@ -0,0 +1,200 @@
1
+ # Experiment Design Protocol
2
+
3
+ Use this when the user needs help turning research intent into a well-formed experiment or exploration before spending compute.
4
+
5
+ ## Goal
6
+
7
+ Help the user clarify what they are trying to learn, shape the work around that question, and avoid wasting compute before the design is solid.
8
+
9
+ ## Operating rules
10
+
11
+ - Treat design and execution as separate phases.
12
+ - Optimize for clarity of experimental purpose, not speed to a first run.
13
+ - Adapt depth to the user's experience and the clarity already present in the conversation.
14
+ - Apply epistemic discipline: separate what is known from what is assumed, and name uncertainty instead of smoothing it over.
15
+ - Support both hypothesis-driven and exploratory work.
16
+ - Support simple runs and complex shapes such as multi-stage pipelines, sweep-then-deep-dive, multi-arm comparisons, and custom structures.
17
+ - Keep all 10 brief fields, but allow exploratory fields to be marked `exploratory` or `TBD` rather than fabricated.
18
+ - Use quick Socratic questioning to surface assumptions, confidence, and what would change the user's mind. Keep it to 1-2 short questions per turn.
19
+ - Propose defaults for structural choices such as experiment shape, stop condition, or artifact plan. Use questions rather than defaults for epistemic choices such as beliefs, assumptions, and what evidence would matter.
20
+ - When a reasoning or design gap is visible, raise it as a question rather than an assertion.
21
+ - If the core gate is satisfied and the user wants to proceed, stop asking more design questions.
22
+ - Use Flywheel `insight` nodes to preserve design context when it will help across turns or sessions.
23
+
24
+ ## Phase 1: Clarify what the user is trying to learn
25
+
26
+ Start with:
27
+
28
+ 1. What are you trying to learn or decide?
29
+ 2. Is this mainly hypothesis-driven or exploratory right now?
30
+
31
+ Keep this phase quick. Ask 1-2 short questions per turn, and use light Socratic questioning as an epistemic check after the user states the learning goal: briefly surface what seems known versus assumed before moving on.
32
+
33
+ If the work is hypothesis-driven, ask:
34
+
35
+ - What is the hypothesis?
36
+ - Compared to what baseline or alternative?
37
+ - What result would matter?
38
+
39
+ If the work is exploratory, ask:
40
+
41
+ - What is the big question?
42
+ - What would you need to learn first before tackling it?
43
+ - What is the cheapest or cleanest way to learn that first piece?
44
+ - What signal or pattern are you looking for?
45
+
46
+ If the user is still fuzzy after this phase, stay in planning mode. If needed, create or update an `insight` node rather than an `empirical` node.
47
+
48
+ ## Phase 2: Shape the work
49
+
50
+ Choose or define the experiment shape through quick Socratic questioning:
51
+
52
+ - single focused run
53
+ - multi-stage pipeline
54
+ - sweep then deep-dive
55
+ - multi-arm comparison
56
+ - custom shape
57
+
58
+ If the user is unsure about structure, propose a default shape, stop condition, or artifact plan instead of extending the question loop.
59
+
60
+ Then fill the experiment brief:
61
+
62
+ - `question`: the decision or learning goal
63
+ - `hypothesis`: the claim being tested
64
+ - `comparator`: the baseline or alternative
65
+ - `unit_of_work`: what one run, branch, or stage actually changes
66
+ - `primary_metric`: the main number or observable to inspect
67
+ - `artifact_plan`: which artifact will help interpret the result
68
+ - `budget_cap`: max spend or runtime for the current stage
69
+ - `stop_condition`: when to stop rather than letting the run expand
70
+ - `interpretation`: what would count as signal, no signal, or ambiguity
71
+ - `next_branch_if_inconclusive`: the follow-up branch if the result is unclear
72
+
73
+ For exploratory work, `hypothesis` or `comparator` may be marked `exploratory` or `TBD`, but the learning goal still needs to be explicit.
74
+
75
+ ## Phase 3: Run the adaptive design gate
76
+
77
+ Frame the gate as preventing waste, not enforcing bureaucracy.
78
+
79
+ Always check:
80
+
81
+ - the question or goal is explicit
82
+ - at least one metric or observable is defined
83
+ - a budget cap or stop condition exists
84
+
85
+ For hypothesis-driven work, also check:
86
+
87
+ - there is a falsifiable hypothesis
88
+ - there is a comparator or baseline
89
+
90
+ For exploratory work, instead check:
91
+
92
+ - the user can say what they are looking for
93
+ - the first learning step is scoped well enough to run
94
+
95
+ Additional checks when relevant:
96
+
97
+ - an artifact plan or `no_artifacts_reason` exists
98
+ - the run shape matches the question and is not changing too many important things without purpose
99
+ - an interpretation rule or next branch is defined
100
+
101
+ If the core gate passes and the user wants to proceed, let them run even if some non-core details are still `TBD`.
102
+
103
+ When blocked, ask only the next necessary question instead of reopening the whole brief.
104
+
105
+ ## Phase 4: Confirm the plan
106
+
107
+ Before any compute request or training launch, restate:
108
+
109
+ - what we are trying to learn
110
+ - the experiment shape
111
+ - the metric or observable
112
+ - the artifact plan
113
+ - the budget or stop condition
114
+ - what result would change the next step
115
+
116
+ If the run is expensive or high-risk, ask for explicit confirmation.
117
+
118
+ ## Phase 5: Drive Flywheel
119
+
120
+ Use Flywheel in layers when possible.
121
+
122
+ ### Design layer
123
+
124
+ Use an `insight` node to capture rationale, open questions, experiment shape, and any decomposition needed for exploratory or multi-stage work.
125
+
126
+ Typical flow:
127
+
128
+ 1. `mcp__flywheel__flywheel_stage_node_create`
129
+ 2. `mcp__flywheel__flywheel_stage_node_update`
130
+ 3. `mcp__flywheel__flywheel_commit_node`
131
+
132
+ ### Execution layer
133
+
134
+ Only after the design gate passes, create or branch the `empirical` node for the runnable part of the work.
135
+
136
+ Typical flow:
137
+
138
+ 1. `mcp__flywheel__flywheel_branch_node` or `mcp__flywheel__flywheel_stage_node_create`
139
+ 2. `mcp__flywheel__flywheel_stage_node_update` with the explicit run summary and the local question or hypothesis for that branch
140
+ 3. `mcp__flywheel__flywheel_request_budget_approval` only after the user accepts the design
141
+ 4. `mcp__flywheel__flywheel_compute_acquire` and related compute tools only when execution is actually needed
142
+ 5. `mcp__flywheel__flywheel_prepare_artifact_publish`
143
+ 6. 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.
144
+ 7. `mcp__flywheel__flywheel_commit_node`
145
+
146
+ Important notes:
147
+
148
+ - Exploratory work can stay in `insight` nodes until a specific empirical probe is ready.
149
+ - Because `empirical` commits require a non-empty `hypothesis`, turn each runnable exploratory probe into a concrete local question or hypothesis for that branch.
150
+ - For multi-stage or multi-arm work, use branches to represent stages or arms and keep summaries clear about how each branch feeds the next.
151
+ - Completed empirical work needs artifacts or a `no_artifacts_reason`.
152
+
153
+ ## Adaptive question flow
154
+
155
+ Ask in short batches of 1-2 questions per turn. Keep the flow light, Socratic, and epistemic rather than exhaustive.
156
+
157
+ 1. What are you trying to learn or decide?
158
+ 2. Is this hypothesis-driven or exploratory?
159
+ 3. Briefly separate what the user seems to know from what they seem to be assuming before locking the design.
160
+ 4. If hypothesis-driven: what is the hypothesis and compared to what?
161
+ 5. If exploratory: what is the first thing you need to learn and what is the cheapest way to learn it?
162
+ 6. What experiment shape fits this work?
163
+ 7. What metric or observable and artifact will you inspect?
164
+ 8. What budget or stop condition keeps this from wasting compute?
165
+ 9. What interpretation rule will distinguish evidence from expectation?
166
+ 10. If the result is ambiguous, what is the next branch?
167
+
168
+ ## Output template
169
+
170
+ Use this shape when turning a vague request into an executable plan:
171
+
172
+ ```md
173
+ Experiment brief
174
+
175
+ - Question:
176
+ - Hypothesis:
177
+ - Comparator:
178
+ - Unit of work:
179
+ - Primary metric or observable:
180
+ - Artifact plan:
181
+ - Budget/time cap:
182
+ - Stop condition:
183
+ - Interpretation rule:
184
+ - Next branch if inconclusive:
185
+
186
+ Experiment type: hypothesis-driven | exploratory
187
+ Design gate: ready | blocked
188
+ Remaining gap:
189
+ Recommended next action:
190
+ ```
191
+
192
+ ## Generalization rule
193
+
194
+ Reuse the same protocol across domains by changing the unit of work and artifact type:
195
+
196
+ - model training -> metrics tables, loss curves, checkpoints
197
+ - benchmark comparisons -> score tables, latency plots, error slices
198
+ - prompt evaluations -> rubric tables, failure examples, sampled outputs
199
+ - product experiments -> funnels, event tables, user-segment slices
200
+ - scientific workflows -> figures, logs, result tables, notebooks
@@ -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,16 @@
1
+ # [](https://flywheel.paradigma.inc//#installing-on-claude-code)Installing on Claude Code
2
+
3
+ Use the setup wizard:
4
+
5
+ ```bash
6
+ npx @paradigma-inc/flywheel setup
7
+ ```
8
+
9
+ If you installed Flywheel MCP before April 2026, migrate to the newer, more stable API key authentication setup with:
10
+
11
+ ```bash
12
+ npx @paradigma-inc/flywheel uninstall
13
+ npx @paradigma-inc/flywheel setup
14
+ ```
15
+
16
+ If your previous install used a server name different from `flywheel`, pass `--name <old-name>` to uninstall that specific entry.
@@ -0,0 +1,16 @@
1
+ # [](https://flywheel.paradigma.inc//#installing-on-codex)Installing on Codex
2
+
3
+ Use the setup wizard:
4
+
5
+ ```bash
6
+ npx @paradigma-inc/flywheel setup
7
+ ```
8
+
9
+ If you installed Flywheel MCP before April 2026, migrate to the newer, more stable API key authentication setup with:
10
+
11
+ ```bash
12
+ npx @paradigma-inc/flywheel uninstall
13
+ npx @paradigma-inc/flywheel setup
14
+ ```
15
+
16
+ If your previous install used a server name different from `flywheel`, pass `--name <old-name>` to uninstall that specific entry.
@@ -0,0 +1,50 @@
1
+ # [](https://flywheel.paradigma.inc//#faq-how-can-i-get-an-authorized-client_id-for-the-oauth-flow)FAQ: How Can I Get an Authorized `client_id` for the OAuth Flow?
2
+
3
+ We support the standard MCP OAuth flow with dynamic client registration, as documented in the [MCP Authorization spec (dynamic client registration)](https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization#dynamic-client-registration).
4
+
5
+ First, query our OAuth authorization-server metadata:
6
+
7
+ ```bash
8
+ curl -sS https://flywheel.paradigma.inc/mcp-server/.well-known/oauth-authorization-server | jq
9
+ ```
10
+
11
+ That response includes the OAuth endpoints (`authorization_endpoint`, `token_endpoint`, `registration_endpoint`, and others).
12
+
13
+ `response_types_supported` is currently `["code"]`, so register with `"response_types":["code"]`.
14
+
15
+ Then register your OAuth client using the `registration_endpoint`.
16
+
17
+ ## [](https://flywheel-staging.paradigma.inc/tutorial#public-client-default)Public client (default)
18
+
19
+ This is the default for interactive MCP hosts (for example Claude Code, IDE hosts, local desktop clients). If `token_endpoint_auth_method` is omitted, we default to `none`.
20
+
21
+ ```bash
22
+ curl -sS -X POST https://flywheel.paradigma.inc/mcp-server/register \
23
+ -H "content-type: application/json" \
24
+ -d '{
25
+ "client_name":"Flywheel MCP Host",
26
+ "redirect_uris":["http://localhost:3333/callback"],
27
+ "grant_types":["authorization_code","refresh_token"],
28
+ "response_types":["code"]
29
+ }' | jq
30
+ ```
31
+
32
+ The response returns a `client_id` and no `client_secret`.
33
+
34
+ ## [](https://flywheel-staging.paradigma.inc/tutorial#confidential-client-optional)Confidential client (optional)
35
+
36
+ Use this when your app has a trusted backend that can securely store secrets.
37
+
38
+ ```bash
39
+ curl -sS -X POST https://flywheel.paradigma.inc/mcp-server/register \
40
+ -H "content-type: application/json" \
41
+ -d '{
42
+ "client_name":"Flywheel MCP Connector Backend",
43
+ "redirect_uris":["https://YOUR_CALLBACK_URL"],
44
+ "grant_types":["authorization_code","refresh_token"],
45
+ "response_types":["code"],
46
+ "token_endpoint_auth_method":"client_secret_post"
47
+ }' | jq
48
+ ```
49
+
50
+ That response returns both `client_id` and `client_secret`. Keep `client_secret` private in your backend.