@paradigma-inc/flywheel 0.1.26 → 0.1.35
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/example-workflows/organizing-exploring-and-iterating-on-a-research-topic.md +11 -11
- package/skills/flywheel/example-workflows/reproducing-papers-on-a-budget.md +8 -8
- package/skills/flywheel/references/ARTIFACTS.md +48 -0
- package/skills/flywheel/references/INTERFACES.md +206 -0
- package/skills/flywheel/references/experiment-design-protocol.md +5 -5
- package/skills/flywheel/references/flywheel-mcp-tool-map.md +72 -60
- package/skills/flywheel-auto/SKILL.md +4 -4
- package/skills/flywheel-auto/references/ARTIFACTS.md +1 -1
- package/skills/flywheel-auto/references/INTERFACES.md +59 -59
- package/skills/flywheel-auto/references/experiment-design-protocol.md +5 -5
- package/skills/flywheel-auto/references/flywheel-mcp-tool-map.md +72 -60
- package/skills/flywheel-lookahead/references/ARTIFACTS.md +1 -1
- package/skills/flywheel-lookahead/references/INTERFACES.md +59 -59
- package/skills/flywheel-lookahead/references/flywheel-mcp-tool-map.md +72 -60
- package/skills/flywheel-prove/SKILL.md +8 -0
- package/skills/flywheel-reproduce/SKILL.md +4 -4
- package/skills/flywheel-reproduce/references/ARTIFACTS.md +1 -1
- package/skills/flywheel-reproduce/references/INTERFACES.md +59 -59
- package/skills/flywheel-reproduce/references/experiment-design-protocol.md +5 -5
- package/skills/flywheel-reproduce/references/flywheel-mcp-tool-map.md +72 -60
- package/skills/flywheel-to-graph/SKILL.md +4 -4
- package/skills/flywheel-to-graph/references/ARTIFACTS.md +1 -1
- package/skills/flywheel-to-graph/references/INTERFACES.md +59 -59
- package/skills/flywheel-to-graph/references/flywheel-mcp-tool-map.md +72 -60
- package/skills/flywheel-tree/SKILL.md +61 -0
- package/skills/flywheel-tree/agents/interface.yaml +4 -0
- package/skills/flywheel-tree/assets/ansi_palette.json +29 -0
- package/skills/flywheel-tree/references/workflow.md +108 -0
- package/skills/flywheel-tree/scripts/render_tree.py +407 -0
- package/skills/flywheel-tree/scripts/render_tree_via_mcp.py +694 -0
|
@@ -12,6 +12,16 @@ Flywheel is a graph-based system for tracking research work, decisions, and evid
|
|
|
12
12
|
- Node references include immutable `node_id` and optional immutable `slug_name`; prefer communicating both together for human clarity and disambiguation.
|
|
13
13
|
- Insight nodes should represent conceptual observations (theoretical insights, intuitions, motivations, decision-relevant framing); empirical nodes should represent experiments with explicit hypotheses and measured outcomes.
|
|
14
14
|
- Graph topology should encode logical/causal relations between concepts and experiments. Avoid defaulting to shallow root-only branching unless work items are truly independent.
|
|
15
|
+
- Node staging is local (non-canonical) and commit is the only canonical persistence boundary (`commit_new_node`, `commit_node`).
|
|
16
|
+
- Mutating node writes are optimistic-locking operations: read latest state, pass `expected_revision` or `base_committed_revision` as required, and handle `409 conflict` with explicit reconciliation.
|
|
17
|
+
- Mutating operations are idempotent; MCP tool transport auto-manages `Idempotency-Key` on mutating tool calls.
|
|
18
|
+
- Existing-node field editing may use a session-scoped stage lease (`flywheel_acquire_stage_lease`, `flywheel_heartbeat_stage_lease`, `flywheel_release_stage_lease`) to coordinate local staged state before commit.
|
|
19
|
+
- Existing-node commit publishes a full staged payload under an active stage lease: commit requests require `stage_session_id`, `base_committed_revision`, and `staged_payload`; conflicts on stale committed revisions are surfaced directly and are not transport-retried.
|
|
20
|
+
- Stage/backfill helpers (`stage_backfill_hypothesis`, `stage_backfill_insights`) return non-canonical staged payload patches and explicit status fields (`staged_changes_pending`, `commit_required`, `next_action_hint`).
|
|
21
|
+
- Committed node state must still satisfy strict contract (`summary` required; `empirical` requires hypothesis plus artifacts or `no_artifacts_reason`; `insight` requires non-empty insights).
|
|
22
|
+
- When code is involved, pass `repo_url`/`branch_name`/`head_commit_sha` and align git structure with graph topology where practical (without forcing one-to-one mapping).
|
|
23
|
+
- Summaries, hypotheses, and artifacts should be reproduction-grade: enough setup, method, evidence, and interpretation for another reader to reproduce or audit results.
|
|
24
|
+
- Empirical workflow is hypothesis-driven: launch execution, inspect outcomes, publish evidence artifacts, and commit only after terminal status.
|
|
15
25
|
- For empirical work, publish evidence with `flywheel_prepare_artifact_uploads`, upload raw file bytes, then `flywheel_finalize_artifact_uploads` before commit.
|
|
16
26
|
- Artifact metadata records expose a non-empty `title` suitable for display labels; title normalization must never derive from `storage_url`.
|
|
17
27
|
|
|
@@ -21,84 +31,84 @@ Flywheel is a graph-based system for tracking research work, decisions, and evid
|
|
|
21
31
|
|
|
22
32
|
- `flywheel_auth_status` (read; scopes: `read`; HTTP: `GET /auth/status`; core surface): Return Flywheel auth status for the current access token.
|
|
23
33
|
- `flywheel_get_credits_balance` (read; scopes: `read`; HTTP: `GET /credits`; core surface): Return current user credits balance and lifetime counters.
|
|
24
|
-
- `flywheel_updates_list` (read; scopes: `read`; HTTP: `
|
|
25
|
-
- `flywheel_updates_hide` (mutating; scopes: `write`; HTTP: `POST /
|
|
26
|
-
- `flywheel_updates_hide_all_active` (mutating; scopes: `write`; HTTP: `POST /
|
|
27
|
-
- `flywheel_updates_unhide` (mutating; scopes: `write`; HTTP: `DELETE /
|
|
28
|
-
- `flywheel_list_nodes` (read; scopes: `read`; HTTP: `GET /
|
|
29
|
-
- `flywheel_resolve_node_slug` (read; scopes: `read`; HTTP: `GET /
|
|
30
|
-
- `flywheel_get_node_sharing` (read; scopes: `read`; HTTP: `
|
|
31
|
-
- `flywheel_set_sharing_for_node` (mutating; scopes: `write`; HTTP: `
|
|
32
|
-
- `flywheel_set_sharing_for_nodes` (mutating; scopes: `write`; HTTP: `POST /
|
|
33
|
-
- `flywheel_get_node` (read; scopes: `read`; HTTP: `
|
|
34
|
-
- `flywheel_create_node_tag` (mutating; scopes: `write`; HTTP: `POST /
|
|
35
|
-
- `flywheel_update_node_tag` (mutating; scopes: `write`; HTTP: `PATCH /
|
|
36
|
-
- `flywheel_delete_node_tag` (mutating; scopes: `write`; HTTP: `DELETE /
|
|
37
|
-
- `flywheel_set_node_tag_assignments` (mutating; scopes: `write`; HTTP: `PUT /
|
|
38
|
-
- `flywheel_get_node_tree` (read; scopes: `read`; HTTP: `GET /
|
|
39
|
-
- `flywheel_get_node_ancestry` (read; scopes: `read`; HTTP: `GET /
|
|
40
|
-
- `flywheel_get_campaign_snapshot` (read; scopes: `read`; HTTP: `GET /
|
|
41
|
-
- `flywheel_list_audit` (read; scopes: `read`; HTTP: `GET /
|
|
34
|
+
- `flywheel_updates_list` (read; scopes: `read`; HTTP: `tool-mediated`; core surface): List in-app updates/announcements for the signed-in user.
|
|
35
|
+
- `flywheel_updates_hide` (mutating; scopes: `write`; HTTP: `POST /updates/{announcement_id}/hide`; core surface): Mark one update as hidden for the current user (Don't show again).
|
|
36
|
+
- `flywheel_updates_hide_all_active` (mutating; scopes: `write`; HTTP: `POST /updates/hide-all-active`; core surface): Hide all active updates for the current user (Don't show all active again).
|
|
37
|
+
- `flywheel_updates_unhide` (mutating; scopes: `write`; HTTP: `DELETE /updates/{announcement_id}/hide`; core surface): Restore one hidden update for the current user.
|
|
38
|
+
- `flywheel_list_nodes` (read; scopes: `read`; HTTP: `GET /nodes`; full-surface only): List nodes with optional owners/writers/visibility filters and projection control (`core`, `topology`, `full`).
|
|
39
|
+
- `flywheel_resolve_node_slug` (read; scopes: `read`; HTTP: `GET /nodes/resolve-by-slug`; core surface): Resolve a node by slug_name with explicit conflict handling (`unique`, `context_resolved`, `ambiguous`, `not_found`).
|
|
40
|
+
- `flywheel_get_node_sharing` (read; scopes: `read`; HTTP: `tool-mediated`; full-surface only): Get node sharing for one node (owner/collaborators/visibility).
|
|
41
|
+
- `flywheel_set_sharing_for_node` (mutating; scopes: `write`; HTTP: `tool-mediated`; full-surface only): Set sharing for one owned node (collaborators/private-unlisted-public visibility).
|
|
42
|
+
- `flywheel_set_sharing_for_nodes` (mutating; scopes: `write`; HTTP: `POST /nodes/access-policy/bulk`; full-surface only): Apply one sharing configuration across multiple owned nodes in bulk.
|
|
43
|
+
- `flywheel_get_node` (read; scopes: `read`; HTTP: `tool-mediated`; core surface): Get one node by node_id.
|
|
44
|
+
- `flywheel_create_node_tag` (mutating; scopes: `write`; HTTP: `POST /nodes/{root_node_id}/tags`; full-surface only): Create one graph tag from a root node. `track_history` is effective only when `one_only=true`; when `one_only=false`, the effective track_history=false.
|
|
45
|
+
- `flywheel_update_node_tag` (mutating; scopes: `write`; HTTP: `PATCH /nodes/{root_node_id}/tags/{tag_id}`; full-surface only): Update one graph tag from a root node.
|
|
46
|
+
- `flywheel_delete_node_tag` (mutating; scopes: `write`; HTTP: `DELETE /nodes/{root_node_id}/tags/{tag_id}`; full-surface only): Delete one graph tag from a root node.
|
|
47
|
+
- `flywheel_set_node_tag_assignments` (mutating; scopes: `write`; HTTP: `PUT /nodes/{node_id}/tags`; full-surface only): Set graph tag assignments for one node (`tag_ids` must be a JSON array of strings; omit `tag_ids` to clear all assignments to `[]`).
|
|
48
|
+
- `flywheel_get_node_tree` (read; scopes: `read`; HTTP: `GET /nodes/{node_id}/tree`; full-surface only): Get a root-aware bounded tree/DAG projection for an anchor node.
|
|
49
|
+
- `flywheel_get_node_ancestry` (read; scopes: `read`; HTTP: `GET /nodes/{node_id}/ancestry`; full-surface only): Get ordered ancestry metadata from an anchor node to root boundaries.
|
|
50
|
+
- `flywheel_get_campaign_snapshot` (read; scopes: `read`; HTTP: `GET /nodes/{node_id}/campaign/snapshot`; core surface): Read the current campaign snapshot for a node's root campaign, including configured views and derived records.
|
|
51
|
+
- `flywheel_list_audit` (read; scopes: `read`; HTTP: `GET /nodes/{node_id}/audit`; full-surface only): List node MCP audit events.
|
|
42
52
|
|
|
43
53
|
### Node stage and commit
|
|
44
54
|
|
|
45
|
-
- `flywheel_commit_new_node` (mutating; scopes: `write`; HTTP: `POST /
|
|
46
|
-
- `flywheel_acquire_stage_lease` (mutating; scopes: `write`; HTTP: `POST /
|
|
47
|
-
- `flywheel_heartbeat_stage_lease` (mutating; scopes: `write`; HTTP: `POST /
|
|
48
|
-
- `flywheel_release_stage_lease` (mutating; scopes: `write`; HTTP: `POST /
|
|
49
|
-
- `flywheel_commit_node` (mutating; scopes: `write`; HTTP: `POST /
|
|
50
|
-
- `flywheel_branch_node` (mutating; scopes: `write`; HTTP: `POST /
|
|
51
|
-
- `flywheel_merge_nodes` (mutating; scopes: `write`; HTTP: `POST /
|
|
52
|
-
- `flywheel_add_parent` (mutating; scopes: `write`; HTTP: `POST /
|
|
53
|
-
- `flywheel_remove_parent` (mutating; scopes: `write`; HTTP: `POST /
|
|
54
|
-
- `flywheel_delete_node` (mutating; scopes: `write`; HTTP: `DELETE /
|
|
55
|
-
- `flywheel_bulk_delete_nodes` (mutating; scopes: `write`; HTTP: `POST /
|
|
55
|
+
- `flywheel_commit_new_node` (mutating; scopes: `write`; HTTP: `POST /nodes/commit-new`; full-surface only): Commit a locally staged new node into canonical storage and return the persisted node.
|
|
56
|
+
- `flywheel_acquire_stage_lease` (mutating; scopes: `write`; HTTP: `POST /nodes/{node_id}/stage/lease/acquire`; full-surface only): Acquire a session-scoped stage lease for an existing node before local staged edits.
|
|
57
|
+
- `flywheel_heartbeat_stage_lease` (mutating; scopes: `write`; HTTP: `POST /nodes/{node_id}/stage/lease/heartbeat`; full-surface only): Refresh the active stage lease for the current editing session.
|
|
58
|
+
- `flywheel_release_stage_lease` (mutating; scopes: `write`; HTTP: `POST /nodes/{node_id}/stage/lease/release`; full-surface only): Release the active stage lease for the current editing session.
|
|
59
|
+
- `flywheel_commit_node` (mutating; scopes: `write`; HTTP: `POST /nodes/{node_id}/commit`; core surface): Commit an existing node by publishing the caller's staged payload under an active stage lease.
|
|
60
|
+
- `flywheel_branch_node` (mutating; scopes: `write`; HTTP: `POST /nodes/{node_id}/branch`; full-surface only): Create a child branch node with optimistic locking (`expected_revision` required).
|
|
61
|
+
- `flywheel_merge_nodes` (mutating; scopes: `write`; HTTP: `POST /nodes/merge`; full-surface only): Merge nodes with caller-resolved node payload.
|
|
62
|
+
- `flywheel_add_parent` (mutating; scopes: `write`; HTTP: `POST /nodes/{node_id}/parents/add`; full-surface only): Attach an additional parent edge to an existing node (keeps node identity, validates against cycles).
|
|
63
|
+
- `flywheel_remove_parent` (mutating; scopes: `write`; HTTP: `POST /nodes/{node_id}/parents/remove`; full-surface only): Detach one parent edge from a node without deleting the node.
|
|
64
|
+
- `flywheel_delete_node` (mutating; scopes: `write`; HTTP: `DELETE /nodes/{node_id}`; full-surface only): Delete a node and its descendants. Modes: `cascade` (delete full subtree), `detach_shared` (preserve descendants with surviving parents).
|
|
65
|
+
- `flywheel_bulk_delete_nodes` (mutating; scopes: `write`; HTTP: `POST /nodes/bulk-delete`; full-surface only): Delete multiple node subtrees in one operation.
|
|
56
66
|
|
|
57
67
|
### Artifacts
|
|
58
68
|
|
|
59
|
-
- `flywheel_prepare_artifact_uploads` (mutating; scopes: `write`; HTTP: `POST /
|
|
60
|
-
- `flywheel_finalize_artifact_uploads` (mutating; scopes: `write`; HTTP: `POST /
|
|
61
|
-
- `flywheel_list_artifacts` (read; scopes: `read`; HTTP: `
|
|
62
|
-
- `flywheel_get_artifact` (read; scopes: `read`; HTTP: `
|
|
63
|
-
- `flywheel_delete_artifact` (mutating; scopes: `write`; HTTP: `DELETE /
|
|
64
|
-
- `flywheel_set_artifact_note` (mutating; scopes: `write`; HTTP: `PATCH /
|
|
69
|
+
- `flywheel_prepare_artifact_uploads` (mutating; scopes: `write`; HTTP: `POST /nodes/{node_id}/artifacts/uploads/prepare`; core surface): Prepare one or more raw-file artifact uploads (returns batch token + signed upload URLs). Upload must send raw file bytes to the returned URLs (do not upload JSON metadata wrappers).
|
|
70
|
+
- `flywheel_finalize_artifact_uploads` (mutating; scopes: `write`; HTTP: `POST /nodes/{node_id}/artifacts/uploads/finalize`; core surface): Finalize a prepared artifact upload batch and append all staged artifacts to the node in one revision bump.
|
|
71
|
+
- `flywheel_list_artifacts` (read; scopes: `read`; HTTP: `tool-mediated`; core surface): List node artifacts.
|
|
72
|
+
- `flywheel_get_artifact` (read; scopes: `read`; HTTP: `tool-mediated`; core surface): Get one artifact by id.
|
|
73
|
+
- `flywheel_delete_artifact` (mutating; scopes: `write`; HTTP: `DELETE /nodes/{node_id}/artifacts/{artifact_id}`; core surface): Delete one artifact by id with optimistic locking.
|
|
74
|
+
- `flywheel_set_artifact_note` (mutating; scopes: `write`; HTTP: `PATCH /nodes/{node_id}/artifacts/{artifact_id}/note`; core surface): Set or clear one artifact note with optimistic locking.
|
|
65
75
|
|
|
66
76
|
### Executions
|
|
67
77
|
|
|
68
|
-
- `flywheel_launch_execution` (mutating; scopes: `write`; HTTP: `POST /
|
|
69
|
-
- `flywheel_list_executions` (read; scopes: `read`; HTTP: `GET /
|
|
70
|
-
- `flywheel_terminate_execution` (mutating; scopes: `write`; HTTP: `POST /
|
|
78
|
+
- `flywheel_launch_execution` (mutating; scopes: `write`; HTTP: `POST /nodes/{node_id}/executions`; core surface): Launch node execution.
|
|
79
|
+
- `flywheel_list_executions` (read; scopes: `read`; HTTP: `GET /nodes/{node_id}/executions`; core surface): List node executions.
|
|
80
|
+
- `flywheel_terminate_execution` (mutating; scopes: `write`; HTTP: `POST /nodes/{node_id}/executions/{execution_id}/terminate`; core surface): Terminate a node execution.
|
|
71
81
|
|
|
72
82
|
### Compute and budgets
|
|
73
83
|
|
|
74
|
-
- `flywheel_compute_list_options` (read; scopes: `compute`; HTTP: `GET /
|
|
75
|
-
- `flywheel_compute_funding` (read; scopes: `compute`; HTTP: `GET /
|
|
76
|
-
- `flywheel_compute_status` (read; scopes: `compute`; HTTP: `GET /
|
|
77
|
-
- `flywheel_compute_connection` (read; scopes: `compute`; HTTP: `GET /
|
|
78
|
-
- `flywheel_approval_session_heartbeat` (read; scopes: `compute`; HTTP: `POST /
|
|
79
|
-
- `flywheel_list_approval_sessions` (read; scopes: `compute`; HTTP: `GET /
|
|
80
|
-
- `flywheel_expire_approval_session` (mutating; scopes: `compute`; HTTP: `POST /
|
|
84
|
+
- `flywheel_compute_list_options` (read; scopes: `compute`; HTTP: `GET /compute/catalog`; core surface): List managed compute options allowed for a node. When using grant-backed compute, pass the same compute_grant_id you will use for acquire.
|
|
85
|
+
- `flywheel_compute_funding` (read; scopes: `compute`; HTTP: `GET /compute/funding`; core surface): Read grant-scoped funding context (`grant_cents`, `remaining_cents`, and backing budget fields) for a `compute_grant_id` before compute acquire.
|
|
86
|
+
- `flywheel_compute_status` (read; scopes: `compute`; HTTP: `GET /compute/status`; core surface): Read managed compute lease status for the current user and current lease_control_token scope. Lease rows include ownership flags so hosts can distinguish user-owned leases from sponsor-visible campaign leases. When checking a grant-backed lease, reuse the same compute_grant_id passed to acquire.
|
|
87
|
+
- `flywheel_compute_connection` (read; scopes: `compute`; HTTP: `GET /compute/connection`; core surface): Read SSH connection material for an active managed compute lease once flywheel_compute_status indicates the lease is usable. This tool is token-scoped to lease_control_token and only leases owned by the current user are connectable. Pass lease_id or node_id to disambiguate when needed.
|
|
88
|
+
- `flywheel_approval_session_heartbeat` (read; scopes: `compute`; HTTP: `POST /approval-sessions/heartbeat`; core surface): Create or refresh a compute-grant approval session for the current MCP host session.
|
|
89
|
+
- `flywheel_list_approval_sessions` (read; scopes: `compute`; HTTP: `GET /approval-sessions`; core surface): List approval sessions visible to the current user.
|
|
90
|
+
- `flywheel_expire_approval_session` (mutating; scopes: `compute`; HTTP: `POST /approval-sessions/expire`; core surface): Expire the current compute-grant approval session context without releasing active leases.
|
|
81
91
|
- `flywheel_request_compute_grant_approval` (mutating; scopes: `compute`; HTTP: `tool-mediated`; core surface): Request budget approval context before managed compute acquisition; branch on response status.
|
|
82
|
-
- `flywheel_list_compute_grants` (read; scopes: `compute`; HTTP: `GET /
|
|
83
|
-
- `flywheel_list_campaign_budgets` (read; scopes: `compute`; HTTP: `GET /
|
|
84
|
-
- `flywheel_create_campaign_budget` (mutating; scopes: `compute`; HTTP: `POST /
|
|
85
|
-
- `flywheel_update_campaign_budget` (mutating; scopes: `compute`; HTTP: `PATCH /
|
|
86
|
-
- `flywheel_revoke_campaign_budget` (mutating; scopes: `compute`; HTTP: `DELETE /
|
|
87
|
-
- `flywheel_compute_acquire` (mutating; scopes: `compute`; HTTP: `tool-mediated`; core surface): Acquire managed compute with explicit SKU + region and required compute_grant_id (returns accepted/completed lease state only; poll flywheel_compute_status for readiness, not SSH key material). This tool forwards approval_session_id
|
|
88
|
-
- `flywheel_compute_release` (mutating; scopes: `compute`; HTTP: `
|
|
89
|
-
- `flywheel_compute_release_all` (mutating; scopes: `compute`; HTTP: `
|
|
92
|
+
- `flywheel_list_compute_grants` (read; scopes: `compute`; HTTP: `GET /compute/grants`; core surface): List active/exhausted compute grants available to the current user.
|
|
93
|
+
- `flywheel_list_campaign_budgets` (read; scopes: `compute`; HTTP: `GET /nodes/{root_node_id}/campaign-budgets`; full-surface only): List campaign compute budgets for a campaign root. Organizer-only management view.
|
|
94
|
+
- `flywheel_create_campaign_budget` (mutating; scopes: `compute`; HTTP: `POST /nodes/{root_node_id}/campaign-budgets`; full-surface only): Create an organizer-funded campaign compute budget shared with participants.
|
|
95
|
+
- `flywheel_update_campaign_budget` (mutating; scopes: `compute`; HTTP: `PATCH /nodes/{root_node_id}/campaign-budgets/{compute_budget_id}`; full-surface only): Update hard caps or metadata for an organizer-funded campaign compute budget.
|
|
96
|
+
- `flywheel_revoke_campaign_budget` (mutating; scopes: `compute`; HTTP: `DELETE /nodes/{root_node_id}/campaign-budgets/{compute_budget_id}`; full-surface only): Revoke an organizer-funded campaign compute budget.
|
|
97
|
+
- `flywheel_compute_acquire` (mutating; scopes: `compute`; HTTP: `tool-mediated`; core surface): Acquire managed compute for a node with explicit SKU + region and required compute_grant_id (returns accepted/completed lease state only; poll flywheel_compute_status for readiness, not SSH key material). This tool forwards approval_session_id.
|
|
98
|
+
- `flywheel_compute_release` (mutating; scopes: `compute`; HTTP: `tool-mediated`; core surface): Asynchronously release one managed compute lease by lease_id within the current lease_control_token scope.
|
|
99
|
+
- `flywheel_compute_release_all` (mutating; scopes: `compute`; HTTP: `tool-mediated`; core surface): Asynchronously release active managed compute leases in the current lease_control_token scope; set force=true for explicit account-wide cleanup for the current user.
|
|
90
100
|
|
|
91
101
|
### Contract, audit, and export
|
|
92
102
|
|
|
93
103
|
- `flywheel_get_contract` (read; scopes: `read`; HTTP: `GET /mcp/contract`; core surface): Return Flywheel MCP contract overview (scopes, write safety, operation catalog, and section index).
|
|
94
104
|
- `flywheel_get_contract_section` (read; scopes: `read`; HTTP: `GET /mcp/contract/sections/{section_id}`; core surface): Return one contract section by section_id (for example `graph` or `campaign/template_v1`).
|
|
95
|
-
- `flywheel_export_subgraph` (read; scopes: `read`; HTTP: `POST /
|
|
96
|
-
- `flywheel_import_subgraph` (mutating; scopes: `write`; HTTP: `POST /
|
|
97
|
-
- `flywheel_summarize_node_tree` (read; scopes: `read`; HTTP: `GET /
|
|
98
|
-
- `flywheel_export_summary` (read; scopes: `read`; HTTP: `POST /
|
|
99
|
-
- `flywheel_export_summary_stream` (read; scopes: `read`; HTTP: `POST /
|
|
100
|
-
- `flywheel_export_summary_pdf` (read; scopes: `read`; HTTP: `POST /
|
|
101
|
-
- `flywheel_export_summary_render_pdf` (read; scopes: `read`; HTTP: `POST /
|
|
105
|
+
- `flywheel_export_subgraph` (read; scopes: `read`; HTTP: `POST /export`; full-surface only): Export selected graph/subgraph nodes as JSON.
|
|
106
|
+
- `flywheel_import_subgraph` (mutating; scopes: `write`; HTTP: `POST /import`; full-surface only): Import graph/subgraph JSON payload into new node IDs. Set normalize_cycles=true to drop cycle/self-loop edges; default rejects cyclic payloads.
|
|
107
|
+
- `flywheel_summarize_node_tree` (read; scopes: `read`; HTTP: `GET /nodes/{node_id}/summary`; full-surface only): Summarize a node tree using node fields only.
|
|
108
|
+
- `flywheel_export_summary` (read; scopes: `read`; HTTP: `POST /export-summary`; full-surface only): Generate markdown summary for selected nodes.
|
|
109
|
+
- `flywheel_export_summary_stream` (read; scopes: `read`; HTTP: `POST /export-summary-stream`; full-surface only): Generate summary stream events for selected nodes.
|
|
110
|
+
- `flywheel_export_summary_pdf` (read; scopes: `read`; HTTP: `POST /export-summary-pdf`; full-surface only): Generate PDF summary for selected nodes.
|
|
111
|
+
- `flywheel_export_summary_render_pdf` (read; scopes: `read`; HTTP: `POST /export-summary-render-pdf`; full-surface only): Render provided markdown to PDF and embed export metadata.
|
|
102
112
|
|
|
103
113
|
## Practical Tool Sequences
|
|
104
114
|
|
|
@@ -134,6 +144,8 @@ Flywheel is a graph-based system for tracking research work, decisions, and evid
|
|
|
134
144
|
- `flywheel_acquire_stage_lease`, `flywheel_heartbeat_stage_lease`, `flywheel_release_stage_lease`: coordinate session-scoped local staged edits for an existing node before commit.
|
|
135
145
|
- `flywheel_get_campaign_snapshot`: read the current derived campaign state for this node's root campaign instead of inferring standings from freeform text.
|
|
136
146
|
- `flywheel_get_node_sharing`: after sharing writes, verify with flywheel_get_node_sharing before reporting private/shared/public state.
|
|
147
|
+
- `flywheel_set_node_tag_assignments`: pass `tag_ids` as a JSON array of strings; omitting `tag_ids` clears all assignments (`[]`).
|
|
148
|
+
- `flywheel_list_nodes`: canonical filter inputs for `owners`, `writers`, and `visibility` are arrays; scalar `owners`/`writers` may be normalized by transport compatibility layers, but array form is preferred.
|
|
137
149
|
- `flywheel_compute_status`: check first when work may need managed compute (GPU), using the active lease_control_token from host context (or pass it explicitly).
|
|
138
150
|
- `flywheel_list_compute_grants`: list active compute grants (funded by user/root budgets) and select one `compute_grant_id` for acquisition.
|
|
139
151
|
- `flywheel_request_compute_grant_approval`: request/confirm budget before acquire and choose a budget source (`user` or `root`); branch on status (`already_approved`, `approval_required`, `insufficient_credits`).
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flywheel-tree
|
|
3
|
+
description: Render Flywheel DAGs as terminal tree views.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Flywheel Tree
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when the user wants a Flywheel graph shown in classical CLI tree format from a node id or slug.
|
|
11
|
+
Use it to inspect structure, compare branch topology, or audit parent-child relationships in read-only mode.
|
|
12
|
+
Always print the descendant subgraph rooted at the user-provided node; print the full DAG only when that provided node is the actual DAG root.
|
|
13
|
+
This skill uses one local wrapper command (selector -> MCP resolve/get_node_tree -> in-process render) to keep output deterministic and latency low.
|
|
14
|
+
|
|
15
|
+
## Input Contract
|
|
16
|
+
|
|
17
|
+
Accept any of these as the root selector:
|
|
18
|
+
|
|
19
|
+
- Node id (UUID-like string)
|
|
20
|
+
- Slug name (for example `quiet-snow-3839`)
|
|
21
|
+
- Natural-language root reference in the user message (for example "DAG whose root is quiet-snow-3839")
|
|
22
|
+
|
|
23
|
+
If no node id or slug is explicitly provided:
|
|
24
|
+
|
|
25
|
+
- Infer the root from user wording.
|
|
26
|
+
- If inference is not possible, ask one concise question requesting the root id or slug.
|
|
27
|
+
|
|
28
|
+
## Workflow
|
|
29
|
+
|
|
30
|
+
1. Follow [workflow.md](references/workflow.md) end-to-end.
|
|
31
|
+
2. Use `scripts/render_tree_via_mcp.py` as the only execution path:
|
|
32
|
+
- The script resolves slug selectors via `flywheel_resolve_node_slug` when needed.
|
|
33
|
+
- The script fetches topology via `flywheel_get_node_tree`.
|
|
34
|
+
- The script renders in-process with `render_tree.py`.
|
|
35
|
+
- Run it via `uv run --quiet --with mcp python ...` so the skill does not depend on any repository layout and keeps stdout clean.
|
|
36
|
+
- The script auto-discovers MCP config from `--codex-config`/`--mcp-config`, `CODEX_CONFIG`, `CODEX_HOME/config.toml`, nearest project `.codex/config.toml`, `~/.codex/config.toml`, nearest project `.mcp.json`, then `~/.claude.json`, and tries candidates until one resolves the requested alias.
|
|
37
|
+
- Default MCP alias is `flywheel`; when missing, the script auto-resolves a compatible `flywheel*` alias.
|
|
38
|
+
- Do not pipe full tree JSON through shell here-strings.
|
|
39
|
+
- Do not write temporary JSON files.
|
|
40
|
+
3. Preserve renderer output formatting exactly:
|
|
41
|
+
- In chat responses, wrap renderer stdout in a fenced `text` code block.
|
|
42
|
+
- Do not alter indentation or rewrite line prefixes.
|
|
43
|
+
4. Keep visual conventions produced by the renderer:
|
|
44
|
+
- Node label: `name [kind] | slugname` when slug exists.
|
|
45
|
+
- Omit `| slugname` entirely when slug is missing.
|
|
46
|
+
- `[insight]` is pastel red, `[empirical]` is pastel yellow, `[untyped]` is gray.
|
|
47
|
+
- `slugname` is always gray.
|
|
48
|
+
|
|
49
|
+
## Result Contract
|
|
50
|
+
|
|
51
|
+
- Do not edit the graph.
|
|
52
|
+
- Use read-only analysis only.
|
|
53
|
+
- Do not mutate nodes, tags, artifacts, parents, sharing, or executions.
|
|
54
|
+
- If data retrieval or script execution fails, report the failure reason and stop.
|
|
55
|
+
|
|
56
|
+
## Resources
|
|
57
|
+
|
|
58
|
+
- `scripts/render_tree.py`: deterministic tree renderer for raw `flywheel_get_node_tree` JSON.
|
|
59
|
+
- `scripts/render_tree_via_mcp.py`: one-command MCP wrapper (resolve selector -> get tree -> render).
|
|
60
|
+
- `references/workflow.md`: full operational workflow and invocation commands.
|
|
61
|
+
- `assets/ansi_palette.json`: color palette used by the renderer.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Flywheel Tree"
|
|
3
|
+
short_description: "Render Flywheel DAGs as terminal tree views with low-latency MCP wrapper"
|
|
4
|
+
default_prompt: "Resolve a Flywheel node id or slug, then run scripts/render_tree_via_mcp.py once using auto-discovered MCP config/alias (Codex or Claude) (selector -> MCP resolve/get_node_tree -> in-process render) and return stdout exactly."
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"colors": [
|
|
3
|
+
"\u001b[38;5;224m",
|
|
4
|
+
"\u001b[38;5;217m",
|
|
5
|
+
"\u001b[38;5;210m",
|
|
6
|
+
"\u001b[38;5;223m",
|
|
7
|
+
"\u001b[38;5;216m",
|
|
8
|
+
"\u001b[38;5;209m",
|
|
9
|
+
"\u001b[38;5;230m",
|
|
10
|
+
"\u001b[38;5;229m",
|
|
11
|
+
"\u001b[38;5;228m",
|
|
12
|
+
"\u001b[38;5;157m",
|
|
13
|
+
"\u001b[38;5;150m",
|
|
14
|
+
"\u001b[38;5;114m",
|
|
15
|
+
"\u001b[38;5;159m",
|
|
16
|
+
"\u001b[38;5;116m",
|
|
17
|
+
"\u001b[38;5;73m",
|
|
18
|
+
"\u001b[38;5;153m",
|
|
19
|
+
"\u001b[38;5;111m",
|
|
20
|
+
"\u001b[38;5;75m",
|
|
21
|
+
"\u001b[38;5;183m",
|
|
22
|
+
"\u001b[38;5;147m",
|
|
23
|
+
"\u001b[38;5;141m",
|
|
24
|
+
"\u001b[38;5;225m",
|
|
25
|
+
"\u001b[38;5;218m",
|
|
26
|
+
"\u001b[38;5;211m"
|
|
27
|
+
],
|
|
28
|
+
"reset": "\u001b[0m"
|
|
29
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Flywheel Tree Workflow
|
|
2
|
+
|
|
3
|
+
Follow this workflow exactly.
|
|
4
|
+
|
|
5
|
+
## 1. Resolve Selector In Agent
|
|
6
|
+
|
|
7
|
+
Infer the best selector string from the user request (node id or slug).
|
|
8
|
+
|
|
9
|
+
- If selector is explicit in user text, use it directly.
|
|
10
|
+
- If selector is implicit but inferable, extract it.
|
|
11
|
+
- If no selector is provided, infer from user wording.
|
|
12
|
+
- If inference is not possible, ask one concise question for the root id or slug.
|
|
13
|
+
|
|
14
|
+
## 2. Run One Wrapper Command (No JSON Marshalling)
|
|
15
|
+
|
|
16
|
+
Do not call `flywheel_get_node_tree` in the agent and then re-emit large JSON.
|
|
17
|
+
Run `scripts/render_tree_via_mcp.py`, which calls MCP tools and renders in-process.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Ubuntu/macOS (bash/zsh)
|
|
21
|
+
SKILL_ROOT=""
|
|
22
|
+
for CANDIDATE in \
|
|
23
|
+
"$(pwd)/.agents/skills/flywheel-tree" \
|
|
24
|
+
"$HOME/.agents/skills/flywheel-tree" \
|
|
25
|
+
"$HOME/.codex/skills/flywheel-tree" \
|
|
26
|
+
"${CODEX_HOME:+$CODEX_HOME/skills/flywheel-tree}"; do
|
|
27
|
+
if [ -n "$CANDIDATE" ] && [ -f "$CANDIDATE/scripts/render_tree_via_mcp.py" ]; then
|
|
28
|
+
SKILL_ROOT="$CANDIDATE"
|
|
29
|
+
break
|
|
30
|
+
fi
|
|
31
|
+
done
|
|
32
|
+
if [ -z "$SKILL_ROOT" ]; then
|
|
33
|
+
echo "flywheel-tree skill not found" >&2
|
|
34
|
+
exit 2
|
|
35
|
+
fi
|
|
36
|
+
# No repository checkout is required.
|
|
37
|
+
uv run --quiet --with mcp python \
|
|
38
|
+
"$SKILL_ROOT/scripts/render_tree_via_mcp.py" \
|
|
39
|
+
--selector "<node-id-or-slug>" \
|
|
40
|
+
--projection topology \
|
|
41
|
+
--max-nodes 1000
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```powershell
|
|
45
|
+
# Windows (PowerShell)
|
|
46
|
+
$candidates = @(
|
|
47
|
+
(Join-Path (Get-Location).Path ".agents/skills/flywheel-tree"),
|
|
48
|
+
(Join-Path $HOME ".agents/skills/flywheel-tree"),
|
|
49
|
+
(Join-Path $HOME ".codex/skills/flywheel-tree")
|
|
50
|
+
)
|
|
51
|
+
if ($env:CODEX_HOME) {
|
|
52
|
+
$candidates += (Join-Path $env:CODEX_HOME "skills/flywheel-tree")
|
|
53
|
+
}
|
|
54
|
+
$skillRoot = $null
|
|
55
|
+
foreach ($candidate in $candidates) {
|
|
56
|
+
if (Test-Path (Join-Path $candidate "scripts/render_tree_via_mcp.py")) {
|
|
57
|
+
$skillRoot = $candidate
|
|
58
|
+
break
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (-not $skillRoot) {
|
|
62
|
+
throw "flywheel-tree skill not found"
|
|
63
|
+
}
|
|
64
|
+
# No repository checkout is required.
|
|
65
|
+
uv run --quiet --with mcp python `
|
|
66
|
+
"$skillRoot/scripts/render_tree_via_mcp.py" `
|
|
67
|
+
--selector "<node-id-or-slug>" `
|
|
68
|
+
--projection topology `
|
|
69
|
+
--max-nodes 1000
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
MCP endpoint and credentials source:
|
|
73
|
+
|
|
74
|
+
- Config is auto-discovered in this order:
|
|
75
|
+
- `--codex-config <path>` or `--mcp-config <path>` when provided
|
|
76
|
+
- `CODEX_CONFIG` env var
|
|
77
|
+
- `CODEX_HOME/config.toml`
|
|
78
|
+
- nearest `./.codex/config.toml` (walking parent directories)
|
|
79
|
+
- `~/.codex/config.toml`
|
|
80
|
+
- nearest `./.mcp.json` (walking parent directories)
|
|
81
|
+
- `~/.claude.json`
|
|
82
|
+
- MCP alias default is `flywheel`. If that alias is missing, the wrapper auto-selects a compatible `flywheel*` alias.
|
|
83
|
+
- Use `--codex-mcp-server` to force a specific alias.
|
|
84
|
+
- Use `--mcp-url` / `--access-token` only for explicit overrides.
|
|
85
|
+
|
|
86
|
+
Do not edit the graph.
|
|
87
|
+
|
|
88
|
+
## 3. Print Renderer Output As-Is
|
|
89
|
+
|
|
90
|
+
Preserve renderer stdout exactly. Do not rewrite formatting.
|
|
91
|
+
|
|
92
|
+
- In chat responses, present the tree inside a fenced `text` code block.
|
|
93
|
+
- Preserve all leading indentation spaces and box-drawing characters.
|
|
94
|
+
|
|
95
|
+
Expected output format:
|
|
96
|
+
|
|
97
|
+
- Terminal tree with box-drawing characters
|
|
98
|
+
- Node label format: `name [kind] | slugname` when slug exists, otherwise `name [kind]`
|
|
99
|
+
- Duplicate views for multi-parent nodes
|
|
100
|
+
- One unique color per multi-parent set
|
|
101
|
+
- Kind colors are fixed:
|
|
102
|
+
- `[insight]` pastel red
|
|
103
|
+
- `[empirical]` pastel yellow
|
|
104
|
+
- `[untyped]` gray
|
|
105
|
+
- `slugname` segment is always gray
|
|
106
|
+
- Summary with exactly:
|
|
107
|
+
- `root: <title>`
|
|
108
|
+
- `node_count: <count>`
|