@paradigma-inc/flywheel 0.1.16 → 0.1.19

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