plan + fmt
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
### Task 1: Prove Stateful Proxy Behavior
|
### Task 1: Prove Stateful Proxy Behavior
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/fixtures/mcp_echo_server.py`
|
- Modify: `tests/fixtures/mcp_echo_server.py`
|
||||||
- Modify: `tests/wf_mcp/test_proxy.py`
|
- Modify: `tests/wf_mcp/test_proxy.py`
|
||||||
- Modify: `tests/wf_mcp/test_protocol_relay.py`
|
- Modify: `tests/wf_mcp/test_protocol_relay.py`
|
||||||
@@ -25,6 +26,7 @@
|
|||||||
### Task 2: Use FastMCP Stateful Proxy Sessions
|
### Task 2: Use FastMCP Stateful Proxy Sessions
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/proxy/mounts.py`
|
- Modify: `src/wf_mcp/proxy/mounts.py`
|
||||||
|
|
||||||
- [ ] Replace `create_proxy(Client(...))` with `StatefulProxyClient(...)` and `FastMCPProxy(client_factory=client.new_stateful, ...)`.
|
- [ ] Replace `create_proxy(Client(...))` with `StatefulProxyClient(...)` and `FastMCPProxy(client_factory=client.new_stateful, ...)`.
|
||||||
@@ -34,6 +36,7 @@
|
|||||||
### Task 3: Verification
|
### Task 3: Verification
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Test: `tests/wf_mcp/test_proxy.py`
|
- Test: `tests/wf_mcp/test_proxy.py`
|
||||||
- Test: `tests/wf_mcp/test_protocol_relay.py`
|
- Test: `tests/wf_mcp/test_protocol_relay.py`
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ thin MCP-facing delegation points.
|
|||||||
### Task 1: Add A Versioned `RunState` Storage Codec
|
### Task 1: Add A Versioned `RunState` Storage Codec
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_core/run_codec.py`
|
- Create: `src/wf_core/run_codec.py`
|
||||||
- Modify: `src/wf_core/__init__.py`
|
- Modify: `src/wf_core/__init__.py`
|
||||||
- Create: `tests/core/test_run_codec.py`
|
- Create: `tests/core/test_run_codec.py`
|
||||||
@@ -225,6 +226,7 @@ Expected: PASS and `0 errors`.
|
|||||||
### Task 2: Add Typed Run Records And A File-Backed Run Store
|
### Task 2: Add Typed Run Records And A File-Backed Run Store
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_artifacts/runs/__init__.py`
|
- Create: `src/wf_artifacts/runs/__init__.py`
|
||||||
- Create: `src/wf_artifacts/runs/models.py`
|
- Create: `src/wf_artifacts/runs/models.py`
|
||||||
- Create: `src/wf_artifacts/runs/store.py`
|
- Create: `src/wf_artifacts/runs/store.py`
|
||||||
@@ -436,6 +438,7 @@ Expected: PASS and `0 errors`.
|
|||||||
### Task 3: Pin The Resolved Saved-Child Environment Used By A Run
|
### Task 3: Pin The Resolved Saved-Child Environment Used By A Run
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/saved_subgraphs.py`
|
- Modify: `src/wf_mcp/workflow_surface/saved_subgraphs.py`
|
||||||
- Modify: `src/wf_mcp/broker/service/core.py`
|
- Modify: `src/wf_mcp/broker/service/core.py`
|
||||||
- Test: `tests/wf_mcp/test_saved_subgraphs.py`
|
- Test: `tests/wf_mcp/test_saved_subgraphs.py`
|
||||||
@@ -541,6 +544,7 @@ Expected: PASS and `0 errors`.
|
|||||||
### Task 4: Replace Process-Local Active Runs With Durable Lifecycle Helpers
|
### Task 4: Replace Process-Local Active Runs With Durable Lifecycle Helpers
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_core/runtime/engine.py`
|
- Modify: `src/wf_core/runtime/engine.py`
|
||||||
- Create: `src/wf_mcp/workflow_surface/run_lifecycle.py`
|
- Create: `src/wf_mcp/workflow_surface/run_lifecycle.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
@@ -833,6 +837,7 @@ Expected: PASS and `0 errors`.
|
|||||||
### Task 5: Block Resume When Pinned External Dependencies Are No Longer Ready
|
### Task 5: Block Resume When Pinned External Dependencies Are No Longer Ready
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/run_lifecycle.py`
|
- Modify: `src/wf_mcp/workflow_surface/run_lifecycle.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
- Test: `tests/wf_mcp/test_durable_runs.py`
|
- Test: `tests/wf_mcp/test_durable_runs.py`
|
||||||
@@ -941,6 +946,7 @@ Expected: PASS and `0 errors`.
|
|||||||
### Task 6: Expose Inspect And Bounded Trace Tools
|
### Task 6: Expose Inspect And Bounded Trace Tools
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/tools.py`
|
- Modify: `src/wf_mcp/workflow_surface/tools.py`
|
||||||
- Modify: `src/wf_mcp/broker/artifact_tools.py`
|
- Modify: `src/wf_mcp/broker/artifact_tools.py`
|
||||||
@@ -1027,6 +1033,7 @@ Expected: PASS and `0 errors`.
|
|||||||
### Task 7: Documentation, Regression Verification, And Unsupported Policy Notes
|
### Task 7: Documentation, Regression Verification, And Unsupported Policy Notes
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `docs/current_roadmap.md`
|
- Modify: `docs/current_roadmap.md`
|
||||||
- Modify: `docs/workflow_artifacts.md`
|
- Modify: `docs/workflow_artifacts.md`
|
||||||
- Modify: `docs/wf_mcp_operator_manual.md`
|
- Modify: `docs/wf_mcp_operator_manual.md`
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ Output shape:
|
|||||||
## Task 1: Dependency And Plan Reset
|
## Task 1: Dependency And Plan Reset
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `pyproject.toml`
|
- Modify: `pyproject.toml`
|
||||||
- Modify: `uv.lock`
|
- Modify: `uv.lock`
|
||||||
- Modify: `docs/superpowers/plans/2026-05-27-openapi-capability-source.md`
|
- Modify: `docs/superpowers/plans/2026-05-27-openapi-capability-source.md`
|
||||||
@@ -174,6 +175,7 @@ Expected: prints `openapi_core httpx`.
|
|||||||
## Task 2: Remove Generated-Client Runtime Coupling
|
## Task 2: Remove Generated-Client Runtime Coupling
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_openapi/codegen.py`
|
- Modify: `src/wf_openapi/codegen.py`
|
||||||
- Modify: `src/wf_openapi/executor.py`
|
- Modify: `src/wf_openapi/executor.py`
|
||||||
- Modify: `tests/openapi/test_codegen_executor.py`
|
- Modify: `tests/openapi/test_codegen_executor.py`
|
||||||
@@ -249,6 +251,7 @@ Expected: generated-client tests that no longer match are removed/replaced; rema
|
|||||||
## Task 3: Generic Request Builder
|
## Task 3: Generic Request Builder
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_openapi/request.py`
|
- Create: `src/wf_openapi/request.py`
|
||||||
- Test: `tests/openapi/test_request_builder.py`
|
- Test: `tests/openapi/test_request_builder.py`
|
||||||
|
|
||||||
@@ -367,6 +370,7 @@ Expected: PASS.
|
|||||||
## Task 4: openapi-core Validation Adapter
|
## Task 4: openapi-core Validation Adapter
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_openapi/validation.py`
|
- Create: `src/wf_openapi/validation.py`
|
||||||
- Test: `tests/openapi/test_validation.py`
|
- Test: `tests/openapi/test_validation.py`
|
||||||
|
|
||||||
@@ -442,6 +446,7 @@ Expected: PASS.
|
|||||||
## Task 5: Generic HTTP Executor
|
## Task 5: Generic HTTP Executor
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_openapi/executor.py`
|
- Modify: `src/wf_openapi/executor.py`
|
||||||
- Test: `tests/openapi/test_executor.py`
|
- Test: `tests/openapi/test_executor.py`
|
||||||
|
|
||||||
@@ -522,6 +527,7 @@ Expected: PASS.
|
|||||||
## Task 6: Source Integration
|
## Task 6: Source Integration
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_openapi/source.py`
|
- Modify: `src/wf_openapi/source.py`
|
||||||
- Test: `tests/openapi/test_source.py`
|
- Test: `tests/openapi/test_source.py`
|
||||||
|
|
||||||
@@ -574,6 +580,7 @@ Expected: PASS.
|
|||||||
## Task 7: Docs And Final Cleanup
|
## Task 7: Docs And Final Cleanup
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `docs/openapi_capability_source.md`
|
- Create: `docs/openapi_capability_source.md`
|
||||||
- Modify: `docs/current_roadmap.md`
|
- Modify: `docs/current_roadmap.md`
|
||||||
- Delete or rewrite: generated-client-only tests/files if no longer used.
|
- Delete or rewrite: generated-client-only tests/files if no longer used.
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ If top-level `output` is empty, the runtime keeps the legacy same-name fallback:
|
|||||||
for every field in `output_schema`, it copies the top-level state field with the
|
for every field in `output_schema`, it copies the top-level state field with the
|
||||||
same name when present. That fallback is convenient, but explicit output
|
same name when present. That fallback is convenient, but explicit output
|
||||||
projection is clearer for new workflows.
|
projection is clearer for new workflows.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- [ ] **Step 2: Run grep check**
|
- [ ] **Step 2: Run grep check**
|
||||||
@@ -138,6 +139,7 @@ For explicit final output projection from state, use:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Do not use `source` at top level. `source` belongs to step output bindings.
|
Do not use `source` at top level. `source` belongs to step output bindings.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- [ ] **Step 2: Run grep check**
|
- [ ] **Step 2: Run grep check**
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
### Task 1: Add Generic Next-Actions Unit Tests
|
### Task 1: Add Generic Next-Actions Unit Tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `tests/wf_mcp/workflow_surface/test_next_actions.py`
|
- Create: `tests/wf_mcp/workflow_surface/test_next_actions.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Write failing tests for high-confidence wrapper hints**
|
- [ ] **Step 1: Write failing tests for high-confidence wrapper hints**
|
||||||
@@ -143,6 +144,7 @@ Expected: FAIL with `ModuleNotFoundError: No module named 'wf_mcp.workflow_surfa
|
|||||||
### Task 2: Implement `next_actions.py`
|
### Task 2: Implement `next_actions.py`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_mcp/workflow_surface/next_actions.py`
|
- Create: `src/wf_mcp/workflow_surface/next_actions.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Create the generic models and wrapper-hints constructor**
|
- [ ] **Step 1: Create the generic models and wrapper-hints constructor**
|
||||||
@@ -332,6 +334,7 @@ Expected: PASS.
|
|||||||
### Task 3: Replace Wrapper-Specific MCP Models with Generic Models
|
### Task 3: Replace Wrapper-Specific MCP Models with Generic Models
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/models.py`
|
- Modify: `src/wf_mcp/workflow_surface/models.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Import generic next-action models**
|
- [ ] **Step 1: Import generic next-action models**
|
||||||
@@ -396,6 +399,7 @@ NextActions
|
|||||||
### Task 4: Replace Handler Dict Helpers with `NextActions`
|
### Task 4: Replace Handler Dict Helpers with `NextActions`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Import `NextActions`**
|
- [ ] **Step 1: Import `NextActions`**
|
||||||
@@ -448,6 +452,7 @@ Expected: PASS except for assertions that still need additive `can_continue` che
|
|||||||
### Task 5: Update Integration and Schema Tests
|
### Task 5: Update Integration and Schema Tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/wf_mcp/workflow_surface/test_drafts.py`
|
- Modify: `tests/wf_mcp/workflow_surface/test_drafts.py`
|
||||||
- Modify: `tests/wf_mcp/server/test_config.py`
|
- Modify: `tests/wf_mcp/server/test_config.py`
|
||||||
|
|
||||||
@@ -515,6 +520,7 @@ Expected: PASS.
|
|||||||
### Task 6: Add a Small Documentation Note
|
### Task 6: Add a Small Documentation Note
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `docs/workflow_capabilities.md`
|
- Modify: `docs/workflow_capabilities.md`
|
||||||
|
|
||||||
- [ ] **Step 1: Add an advisory-guidance note**
|
- [ ] **Step 1: Add an advisory-guidance note**
|
||||||
@@ -543,6 +549,7 @@ Expected: PASS.
|
|||||||
### Task 7: Full Verification
|
### Task 7: Full Verification
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- All touched files.
|
- All touched files.
|
||||||
|
|
||||||
- [ ] **Step 1: Run focused tests**
|
- [ ] **Step 1: Run focused tests**
|
||||||
|
|||||||
@@ -179,6 +179,7 @@ delete_deployment for temporary deployments
|
|||||||
```
|
```
|
||||||
|
|
||||||
Do not expect a newly saved workflow to appear as a new MCP tool in an existing client session. Use `run_deployment` and `call_capability` as stable front doors.
|
Do not expect a newly saved workflow to appear as a new MCP tool in an existing client session. Use `run_deployment` and `call_capability` as stable front doors.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- [ ] **Step 3: Add an explicit live validation example**
|
- [ ] **Step 3: Add an explicit live validation example**
|
||||||
@@ -208,6 +209,7 @@ Expected successful shape:
|
|||||||
```
|
```
|
||||||
|
|
||||||
If a bound upstream source is down, expect `status="unrunnable"` and a diagnostic with `code="source_unreachable"`.
|
If a bound upstream source is down, expect `status="unrunnable"` and a diagnostic with `code="source_unreachable"`.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- [ ] **Step 4: Add a cleanup example**
|
- [ ] **Step 4: Add a cleanup example**
|
||||||
@@ -233,6 +235,7 @@ Expected:
|
|||||||
"deleted": true
|
"deleted": true
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- [ ] **Step 5: Run grep sanity check**
|
- [ ] **Step 5: Run grep sanity check**
|
||||||
@@ -305,6 +308,7 @@ arguments:
|
|||||||
```
|
```
|
||||||
|
|
||||||
This deletes only the mutable deployment binding. Saved artifacts and durable run records remain.
|
This deletes only the mutable deployment binding. Saved artifacts and durable run records remain.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- [ ] **Step 4: Run grep sanity check**
|
- [ ] **Step 4: Run grep sanity check**
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
### Task 1: Add Constructor Unit Tests
|
### Task 1: Add Constructor Unit Tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/wf_mcp/workflow_surface/test_next_actions.py`
|
- Modify: `tests/wf_mcp/workflow_surface/test_next_actions.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add imports**
|
- [ ] **Step 1: Add imports**
|
||||||
@@ -172,6 +173,7 @@ Expected: FAIL with `AttributeError` for missing `from_deployment_validation` an
|
|||||||
### Task 2: Implement Deployment/Run Constructors
|
### Task 2: Implement Deployment/Run Constructors
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/next_actions.py`
|
- Modify: `src/wf_mcp/workflow_surface/next_actions.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add type-only imports**
|
- [ ] **Step 1: Add type-only imports**
|
||||||
@@ -379,6 +381,7 @@ Expected: PASS.
|
|||||||
### Task 3: Thread NextActions Through Deployment Validation
|
### Task 3: Thread NextActions Through Deployment Validation
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
- Modify: `tests/wf_mcp/workflow_surface/test_deployments.py`
|
- Modify: `tests/wf_mcp/workflow_surface/test_deployments.py`
|
||||||
|
|
||||||
@@ -449,6 +452,7 @@ Expected: PASS.
|
|||||||
### Task 4: Thread NextActions Through Run Payloads
|
### Task 4: Thread NextActions Through Run Payloads
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
- Modify: `tests/wf_mcp/workflow_surface/test_runs.py`
|
- Modify: `tests/wf_mcp/workflow_surface/test_runs.py`
|
||||||
|
|
||||||
@@ -548,6 +552,7 @@ Expected: PASS.
|
|||||||
### Task 5: Update MCP Output Schema Tests
|
### Task 5: Update MCP Output Schema Tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/wf_mcp/server/test_config.py`
|
- Modify: `tests/wf_mcp/server/test_config.py`
|
||||||
- Modify: `tests/wf_mcp/server/test_tools.py`
|
- Modify: `tests/wf_mcp/server/test_tools.py`
|
||||||
|
|
||||||
@@ -597,6 +602,7 @@ Expected: PASS.
|
|||||||
### Task 6: Update Docs
|
### Task 6: Update Docs
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `docs/workflow_capabilities.md`
|
- Modify: `docs/workflow_capabilities.md`
|
||||||
|
|
||||||
- [ ] **Step 1: Add deployment/run guidance note**
|
- [ ] **Step 1: Add deployment/run guidance note**
|
||||||
@@ -626,6 +632,7 @@ Expected: PASS.
|
|||||||
### Task 7: Verification
|
### Task 7: Verification
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- All touched files.
|
- All touched files.
|
||||||
|
|
||||||
- [ ] **Step 1: Run focused test set**
|
- [ ] **Step 1: Run focused test set**
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
### Task 1: Create `src/wf_api/models.py` with RawWorkflowPlan
|
### Task 1: Create `src/wf_api/models.py` with RawWorkflowPlan
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/models.py`
|
- Create: `src/wf_api/models.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Create the file with the model**
|
- [ ] **Step 1: Create the file with the model**
|
||||||
@@ -63,6 +64,7 @@ Expected: `RawWorkflowPlan`
|
|||||||
### Task 2: Replace `wf_mcp.models.RawWorkflowPlan` definition with shim
|
### Task 2: Replace `wf_mcp.models.RawWorkflowPlan` definition with shim
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/models.py`
|
- Modify: `src/wf_mcp/models.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Replace the RawWorkflowPlan class definition with a re-export**
|
- [ ] **Step 1: Replace the RawWorkflowPlan class definition with a re-export**
|
||||||
@@ -95,6 +97,7 @@ Expected: no errors
|
|||||||
### Task 3: Update `wf_mcp/__init__.py` to import from shim
|
### Task 3: Update `wf_mcp/__init__.py` to import from shim
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Verify: `src/wf_mcp/__init__.py`
|
- Verify: `src/wf_mcp/__init__.py`
|
||||||
|
|
||||||
No change needed — `wf_mcp/__init__.py` already imports `RawWorkflowPlan` from `.models`, and the shim re-exports it. Verify this still works.
|
No change needed — `wf_mcp/__init__.py` already imports `RawWorkflowPlan` from `.models`, and the shim re-exports it. Verify this still works.
|
||||||
@@ -109,6 +112,7 @@ Expected: `RawWorkflowPlan`
|
|||||||
### Task 4: Add focused tests
|
### Task 4: Add focused tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `tests/wf_api/test_raw_workflow_plan_extraction.py`
|
- Create: `tests/wf_api/test_raw_workflow_plan_extraction.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Write the tests**
|
- [ ] **Step 1: Write the tests**
|
||||||
@@ -148,16 +152,20 @@ Expected: all 3 PASS
|
|||||||
### Task 5: Update test imports to use canonical path
|
### Task 5: Update test imports to use canonical path
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/wf_mcp/service/conftest.py`
|
- Modify: `tests/wf_mcp/service/conftest.py`
|
||||||
- Modify: `tests/wf_mcp/workflow_surface/test_runs.py`
|
- Modify: `tests/wf_mcp/workflow_surface/test_runs.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Update `tests/wf_mcp/service/conftest.py`**
|
- [ ] **Step 1: Update `tests/wf_mcp/service/conftest.py`**
|
||||||
|
|
||||||
Change line 8 from:
|
Change line 8 from:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from wf_mcp.models import AuthRecord, ConnectionConfig, RawWorkflowPlan
|
from wf_mcp.models import AuthRecord, ConnectionConfig, RawWorkflowPlan
|
||||||
```
|
```
|
||||||
|
|
||||||
to:
|
to:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from wf_api.models import RawWorkflowPlan
|
from wf_api.models import RawWorkflowPlan
|
||||||
from wf_mcp.models import AuthRecord, ConnectionConfig
|
from wf_mcp.models import AuthRecord, ConnectionConfig
|
||||||
@@ -166,10 +174,13 @@ from wf_mcp.models import AuthRecord, ConnectionConfig
|
|||||||
- [ ] **Step 2: Update `tests/wf_mcp/workflow_surface/test_runs.py`**
|
- [ ] **Step 2: Update `tests/wf_mcp/workflow_surface/test_runs.py`**
|
||||||
|
|
||||||
Change line 32 from:
|
Change line 32 from:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from wf_mcp.models import RawWorkflowPlan
|
from wf_mcp.models import RawWorkflowPlan
|
||||||
```
|
```
|
||||||
|
|
||||||
to:
|
to:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from wf_api.models import RawWorkflowPlan
|
from wf_api.models import RawWorkflowPlan
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ wf_cli -> wf_mcp (OK — config/s
|
|||||||
## Task 1: Create `wf_api` package root
|
## Task 1: Create `wf_api` package root
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/__init__.py`
|
- Create: `src/wf_api/__init__.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Create the package directory**
|
- [ ] **Step 1: Create the package directory**
|
||||||
@@ -136,6 +137,7 @@ These modules have zero `wf_mcp` imports. Moving them is a prerequisite for `wf_
|
|||||||
### Task 2a: Move `constants`
|
### Task 2a: Move `constants`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/constants.py`
|
- Create: `src/wf_api/constants.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/constants.py` → shim
|
- Modify: `src/wf_mcp/workflow_surface/constants.py` → shim
|
||||||
|
|
||||||
@@ -199,6 +201,7 @@ git commit -m "refactor: move constants to wf_api, leave shim in wf_mcp"
|
|||||||
### Task 2b: Move `wrapper_hints`
|
### Task 2b: Move `wrapper_hints`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/wrapper_hints.py`
|
- Create: `src/wf_api/wrapper_hints.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/wrapper_hints.py` → shim
|
- Modify: `src/wf_mcp/workflow_surface/wrapper_hints.py` → shim
|
||||||
|
|
||||||
@@ -232,6 +235,7 @@ git commit -m "refactor: move wrapper_hints to wf_api, leave shim"
|
|||||||
### Task 2c: Move `refs`
|
### Task 2c: Move `refs`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/refs.py`
|
- Create: `src/wf_api/refs.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/refs.py` → shim
|
- Modify: `src/wf_mcp/workflow_surface/refs.py` → shim
|
||||||
|
|
||||||
@@ -265,6 +269,7 @@ git commit -m "refactor: move refs to wf_api, leave shim"
|
|||||||
### Task 2d: Move `next_actions`
|
### Task 2d: Move `next_actions`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/next_actions.py`
|
- Create: `src/wf_api/next_actions.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/next_actions.py` → shim
|
- Modify: `src/wf_mcp/workflow_surface/next_actions.py` → shim
|
||||||
|
|
||||||
@@ -298,6 +303,7 @@ git commit -m "refactor: move next_actions to wf_api, leave shim"
|
|||||||
### Task 2e: Move `runtime_dependencies`
|
### Task 2e: Move `runtime_dependencies`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/runtime_dependencies.py`
|
- Create: `src/wf_api/runtime_dependencies.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/runtime_dependencies.py` → shim
|
- Modify: `src/wf_mcp/workflow_surface/runtime_dependencies.py` → shim
|
||||||
|
|
||||||
@@ -323,12 +329,14 @@ git commit -m "refactor: move runtime_dependencies to wf_api, leave shim"
|
|||||||
### Task 2f: Move `saved_subgraphs`
|
### Task 2f: Move `saved_subgraphs`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/saved_subgraphs.py`
|
- Create: `src/wf_api/saved_subgraphs.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/saved_subgraphs.py` → shim
|
- Modify: `src/wf_mcp/workflow_surface/saved_subgraphs.py` → shim
|
||||||
|
|
||||||
- [ ] **Step 1: Copy `src/wf_mcp/workflow_surface/saved_subgraphs.py` to `src/wf_api/saved_subgraphs.py`**
|
- [ ] **Step 1: Copy `src/wf_mcp/workflow_surface/saved_subgraphs.py` to `src/wf_api/saved_subgraphs.py`**
|
||||||
|
|
||||||
Update internal imports:
|
Update internal imports:
|
||||||
|
|
||||||
- `from ..models import RawWorkflowPlan` → `from wf_api.models import RawWorkflowPlan`
|
- `from ..models import RawWorkflowPlan` → `from wf_api.models import RawWorkflowPlan`
|
||||||
- `from .runtime_dependencies import resolve_runtime_dependencies` → `from wf_api.runtime_dependencies import resolve_runtime_dependencies`
|
- `from .runtime_dependencies import resolve_runtime_dependencies` → `from wf_api.runtime_dependencies import resolve_runtime_dependencies`
|
||||||
|
|
||||||
@@ -358,12 +366,14 @@ git commit -m "refactor: move saved_subgraphs to wf_api, leave shim"
|
|||||||
### Task 2g: Move `run_lifecycle`
|
### Task 2g: Move `run_lifecycle`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/run_lifecycle.py`
|
- Create: `src/wf_api/run_lifecycle.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/run_lifecycle.py` → shim
|
- Modify: `src/wf_mcp/workflow_surface/run_lifecycle.py` → shim
|
||||||
|
|
||||||
- [ ] **Step 1: Copy `src/wf_mcp/workflow_surface/run_lifecycle.py` to `src/wf_api/run_lifecycle.py`**
|
- [ ] **Step 1: Copy `src/wf_mcp/workflow_surface/run_lifecycle.py` to `src/wf_api/run_lifecycle.py`**
|
||||||
|
|
||||||
Update internal import:
|
Update internal import:
|
||||||
|
|
||||||
- `from .saved_subgraphs import SavedSubgraphTree` → `from wf_api.saved_subgraphs import SavedSubgraphTree`
|
- `from .saved_subgraphs import SavedSubgraphTree` → `from wf_api.saved_subgraphs import SavedSubgraphTree`
|
||||||
|
|
||||||
- [ ] **Step 2: Replace old file with shim**
|
- [ ] **Step 2: Replace old file with shim**
|
||||||
@@ -388,6 +398,7 @@ git commit -m "refactor: move run_lifecycle to wf_api, leave shim"
|
|||||||
### Task 3a: Move `McpEvent` + `make_event` to `wf_api.events`
|
### Task 3a: Move `McpEvent` + `make_event` to `wf_api.events`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/events.py`
|
- Create: `src/wf_api/events.py`
|
||||||
- Modify: `src/wf_mcp/events/models.py` → shim
|
- Modify: `src/wf_mcp/events/models.py` → shim
|
||||||
|
|
||||||
@@ -462,6 +473,7 @@ git commit -m "refactor: move McpEvent/make_event to wf_api.events, leave shim"
|
|||||||
### Task 3b: Move `matches_query` + `paged_list_payload` to `wf_api.listing`
|
### Task 3b: Move `matches_query` + `paged_list_payload` to `wf_api.listing`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/listing.py`
|
- Create: `src/wf_api/listing.py`
|
||||||
- Modify: `src/wf_mcp/shared/listing.py` → shim
|
- Modify: `src/wf_mcp/shared/listing.py` → shim
|
||||||
|
|
||||||
@@ -569,6 +581,7 @@ git commit -m "refactor: move listing helpers to wf_api.listing, leave shim"
|
|||||||
## Task 4: Move `RawWorkflowPlan` and `TraceRange` to `wf_api.models`
|
## Task 4: Move `RawWorkflowPlan` and `TraceRange` to `wf_api.models`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/models.py`
|
- Create: `src/wf_api/models.py`
|
||||||
- Modify: `src/wf_mcp/models.py` → add re-export shim for `RawWorkflowPlan`
|
- Modify: `src/wf_mcp/models.py` → add re-export shim for `RawWorkflowPlan`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/models.py` → update `NextActions` import
|
- Modify: `src/wf_mcp/workflow_surface/models.py` → update `NextActions` import
|
||||||
@@ -638,10 +651,13 @@ This shadows the local `RawWorkflowPlan` class. Keep the local class definition
|
|||||||
- [ ] **Step 3: Update `src/wf_mcp/workflow_surface/models.py` imports**
|
- [ ] **Step 3: Update `src/wf_mcp/workflow_surface/models.py` imports**
|
||||||
|
|
||||||
Change line 7 from:
|
Change line 7 from:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from .next_actions import NextActionPatchExample, NextActions
|
from .next_actions import NextActionPatchExample, NextActions
|
||||||
```
|
```
|
||||||
|
|
||||||
to:
|
to:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from wf_api.next_actions import NextActionPatchExample, NextActions
|
from wf_api.next_actions import NextActionPatchExample, NextActions
|
||||||
```
|
```
|
||||||
@@ -673,6 +689,7 @@ git commit -m "refactor: move RawWorkflowPlan and TraceRange to wf_api.models"
|
|||||||
## Task 5: Create `WorkflowApiBackend` protocol
|
## Task 5: Create `WorkflowApiBackend` protocol
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/backend.py`
|
- Create: `src/wf_api/backend.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Write `src/wf_api/backend.py`**
|
- [ ] **Step 1: Write `src/wf_api/backend.py`**
|
||||||
@@ -792,6 +809,7 @@ git commit -m "feat(wf_api): add WorkflowApiBackend protocol"
|
|||||||
## Task 6: Create `WorkflowApi` service
|
## Task 6: Create `WorkflowApi` service
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/service.py`
|
- Create: `src/wf_api/service.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Write `src/wf_api/service.py`**
|
- [ ] **Step 1: Write `src/wf_api/service.py`**
|
||||||
@@ -812,6 +830,7 @@ This is the largest step. The body is `WorkflowSurfaceHandlers` from `src/wf_mcp
|
|||||||
12. **`_required_capabilities_for_plan(..., service=self.service)`** → `_required_capabilities_for_plan(..., backend=self.backend)`
|
12. **`_required_capabilities_for_plan(..., service=self.service)`** → `_required_capabilities_for_plan(..., backend=self.backend)`
|
||||||
|
|
||||||
**Import changes** (top of file):
|
**Import changes** (top of file):
|
||||||
|
|
||||||
- Remove: `from ..broker.service.adapters import require_adapter`
|
- Remove: `from ..broker.service.adapters import require_adapter`
|
||||||
- Remove: `from ..events import make_event`
|
- Remove: `from ..events import make_event`
|
||||||
- Remove: `from ..models import RawWorkflowPlan`
|
- Remove: `from ..models import RawWorkflowPlan`
|
||||||
@@ -826,6 +845,7 @@ This is the largest step. The body is `WorkflowSurfaceHandlers` from `src/wf_mcp
|
|||||||
- Update all `.constants`, `.models`, `.refs`, `.next_actions`, `.saved_subgraphs`, `.run_lifecycle`, `.wrapper_hints` to `wf_api.*`
|
- Update all `.constants`, `.models`, `.refs`, `.next_actions`, `.saved_subgraphs`, `.run_lifecycle`, `.wrapper_hints` to `wf_api.*`
|
||||||
|
|
||||||
**Module-level helpers to update:**
|
**Module-level helpers to update:**
|
||||||
|
|
||||||
- `_available_sources(service: WfMcpService)` → `_available_sources(backend: WorkflowApiBackend)` — change `service.capability_sources` to `backend.capability_sources`
|
- `_available_sources(service: WfMcpService)` → `_available_sources(backend: WorkflowApiBackend)` — change `service.capability_sources` to `backend.capability_sources`
|
||||||
- `_observed_node_specs(service: WfMcpService)` → `_observed_node_specs(backend: WorkflowApiBackend)` — change `service.capability_sources` to `backend.capability_sources`
|
- `_observed_node_specs(service: WfMcpService)` → `_observed_node_specs(backend: WorkflowApiBackend)` — change `service.capability_sources` to `backend.capability_sources`
|
||||||
- `_required_capabilities_for_plan(..., service: WfMcpService)` → `_required_capabilities_for_plan(..., backend: WorkflowApiBackend)` — change `service` references to `backend`
|
- `_required_capabilities_for_plan(..., service: WfMcpService)` → `_required_capabilities_for_plan(..., backend: WorkflowApiBackend)` — change `service` references to `backend`
|
||||||
@@ -834,6 +854,7 @@ This is the largest step. The body is `WorkflowSurfaceHandlers` from `src/wf_mcp
|
|||||||
- **Remove** `LIVE_SOURCE_CHECK_TIMEOUT_SECONDS` and `_LIVE_SOURCE_CHECK_FAILURES` constants
|
- **Remove** `LIVE_SOURCE_CHECK_TIMEOUT_SECONDS` and `_LIVE_SOURCE_CHECK_FAILURES` constants
|
||||||
|
|
||||||
**`validate_deployment` method change:**
|
**`validate_deployment` method change:**
|
||||||
|
|
||||||
```python
|
```python
|
||||||
async def validate_deployment(
|
async def validate_deployment(
|
||||||
self,
|
self,
|
||||||
@@ -874,6 +895,7 @@ git commit -m "feat(wf_api): add WorkflowApi service"
|
|||||||
## Task 7: Replace `handlers.py` with shim
|
## Task 7: Replace `handlers.py` with shim
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Replace entire file with shim**
|
- [ ] **Step 1: Replace entire file with shim**
|
||||||
@@ -906,6 +928,7 @@ git commit -m "refactor: replace handlers.py with shim to wf_api.service"
|
|||||||
## Task 8: Create `WfMcpWorkflowApiBackend` adapter
|
## Task 8: Create `WfMcpWorkflowApiBackend` adapter
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_mcp/broker/service/workflow_api_backend.py`
|
- Create: `src/wf_mcp/broker/service/workflow_api_backend.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Write `src/wf_mcp/broker/service/workflow_api_backend.py`**
|
- [ ] **Step 1: Write `src/wf_mcp/broker/service/workflow_api_backend.py`**
|
||||||
@@ -1111,11 +1134,13 @@ git commit -m "feat(wf_mcp): add WfMcpWorkflowApiBackend adapter"
|
|||||||
## Task 9: Update MCP tool registration to use `WorkflowApi`
|
## Task 9: Update MCP tool registration to use `WorkflowApi`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/tools.py`
|
- Modify: `src/wf_mcp/workflow_surface/tools.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Update imports in `src/wf_mcp/workflow_surface/tools.py`**
|
- [ ] **Step 1: Update imports in `src/wf_mcp/workflow_surface/tools.py`**
|
||||||
|
|
||||||
Change:
|
Change:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from wf_mcp.broker.service import WfMcpService
|
from wf_mcp.broker.service import WfMcpService
|
||||||
from .handlers import WorkflowSurfaceHandlers
|
from .handlers import WorkflowSurfaceHandlers
|
||||||
@@ -1127,6 +1152,7 @@ from .models import (
|
|||||||
```
|
```
|
||||||
|
|
||||||
To:
|
To:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from wf_api.service import WorkflowApi
|
from wf_api.service import WorkflowApi
|
||||||
from wf_api.models import TraceRange
|
from wf_api.models import TraceRange
|
||||||
@@ -1142,6 +1168,7 @@ from .models import (
|
|||||||
- [ ] **Step 2: Update `register_workflow_tools` function body**
|
- [ ] **Step 2: Update `register_workflow_tools` function body**
|
||||||
|
|
||||||
Change:
|
Change:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def register_workflow_tools(server: FastMCP[Any], service: WfMcpService) -> None:
|
def register_workflow_tools(server: FastMCP[Any], service: WfMcpService) -> None:
|
||||||
"""Register stable workflow tools on the public MCP server surface."""
|
"""Register stable workflow tools on the public MCP server surface."""
|
||||||
@@ -1149,6 +1176,7 @@ def register_workflow_tools(server: FastMCP[Any], service: WfMcpService) -> None
|
|||||||
```
|
```
|
||||||
|
|
||||||
To:
|
To:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def register_workflow_tools(server: FastMCP[Any], service: WfMcpService) -> None:
|
def register_workflow_tools(server: FastMCP[Any], service: WfMcpService) -> None:
|
||||||
"""Register stable workflow tools on the public MCP server surface."""
|
"""Register stable workflow tools on the public MCP server surface."""
|
||||||
@@ -1177,16 +1205,19 @@ git commit -m "refactor: use WorkflowApi in MCP tool registration"
|
|||||||
## Task 10: Update `wf_cli.context` to use `WorkflowApi`
|
## Task 10: Update `wf_cli.context` to use `WorkflowApi`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_cli/context.py`
|
- Modify: `src/wf_cli/context.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Update imports**
|
- [ ] **Step 1: Update imports**
|
||||||
|
|
||||||
Change:
|
Change:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from wf_mcp.workflow_surface import WorkflowSurfaceHandlers
|
from wf_mcp.workflow_surface import WorkflowSurfaceHandlers
|
||||||
```
|
```
|
||||||
|
|
||||||
To:
|
To:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from wf_api import WorkflowApi
|
from wf_api import WorkflowApi
|
||||||
from wf_mcp.broker.service.workflow_api_backend import WfMcpWorkflowApiBackend
|
from wf_mcp.broker.service.workflow_api_backend import WfMcpWorkflowApiBackend
|
||||||
@@ -1195,6 +1226,7 @@ from wf_mcp.broker.service.workflow_api_backend import WfMcpWorkflowApiBackend
|
|||||||
- [ ] **Step 2: Update `CliContext` dataclass**
|
- [ ] **Step 2: Update `CliContext` dataclass**
|
||||||
|
|
||||||
Change:
|
Change:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class CliContext:
|
class CliContext:
|
||||||
@@ -1204,6 +1236,7 @@ class CliContext:
|
|||||||
```
|
```
|
||||||
|
|
||||||
To:
|
To:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class CliContext:
|
class CliContext:
|
||||||
@@ -1215,6 +1248,7 @@ class CliContext:
|
|||||||
- [ ] **Step 3: Update `load_cli_context` function**
|
- [ ] **Step 3: Update `load_cli_context` function**
|
||||||
|
|
||||||
Change:
|
Change:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def load_cli_context(config_path: str | Path) -> CliContext:
|
def load_cli_context(config_path: str | Path) -> CliContext:
|
||||||
resolved_config_path = Path(config_path)
|
resolved_config_path = Path(config_path)
|
||||||
@@ -1228,6 +1262,7 @@ def load_cli_context(config_path: str | Path) -> CliContext:
|
|||||||
```
|
```
|
||||||
|
|
||||||
To:
|
To:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def load_cli_context(config_path: str | Path) -> CliContext:
|
def load_cli_context(config_path: str | Path) -> CliContext:
|
||||||
resolved_config_path = Path(config_path)
|
resolved_config_path = Path(config_path)
|
||||||
@@ -1243,11 +1278,13 @@ def load_cli_context(config_path: str | Path) -> CliContext:
|
|||||||
- [ ] **Step 4: Update `src/wf_cli/commands/runs.py`**
|
- [ ] **Step 4: Update `src/wf_cli/commands/runs.py`**
|
||||||
|
|
||||||
Change:
|
Change:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from wf_mcp.workflow_surface import TraceRange
|
from wf_mcp.workflow_surface import TraceRange
|
||||||
```
|
```
|
||||||
|
|
||||||
To:
|
To:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from wf_api.models import TraceRange
|
from wf_api.models import TraceRange
|
||||||
```
|
```
|
||||||
@@ -1272,6 +1309,7 @@ git commit -m "refactor: use WorkflowApi in CLI context"
|
|||||||
## Task 11: Add `wf_api` to `pyproject.toml` packages
|
## Task 11: Add `wf_api` to `pyproject.toml` packages
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `pyproject.toml`
|
- Modify: `pyproject.toml`
|
||||||
|
|
||||||
- [ ] **Step 1: Find the packages list in `pyproject.toml`**
|
- [ ] **Step 1: Find the packages list in `pyproject.toml`**
|
||||||
@@ -1281,6 +1319,7 @@ Grep for `packages` or `find` in the `[tool.setuptools]` or `[tool.hatch]` secti
|
|||||||
- [ ] **Step 2: Add `src/wf_api` to the packages list**
|
- [ ] **Step 2: Add `src/wf_api` to the packages list**
|
||||||
|
|
||||||
If using `find`:
|
If using `find`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[tool.setuptools.packages.find]
|
[tool.setuptools.packages.find]
|
||||||
where = ["src"]
|
where = ["src"]
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ wf_cli -> wf_mcp (OK — config/s
|
|||||||
## Task 1: Create `wf_api` package with `WorkflowApiBackend` protocol
|
## Task 1: Create `wf_api` package with `WorkflowApiBackend` protocol
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/__init__.py`
|
- Create: `src/wf_api/__init__.py`
|
||||||
- Create: `src/wf_api/backend.py`
|
- Create: `src/wf_api/backend.py`
|
||||||
|
|
||||||
@@ -441,6 +442,7 @@ Expected: `OK`.
|
|||||||
## Task 2: Create `WorkflowApi` facade
|
## Task 2: Create `WorkflowApi` facade
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/service.py`
|
- Create: `src/wf_api/service.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Write `src/wf_api/service.py`**
|
- [ ] **Step 1: Write `src/wf_api/service.py`**
|
||||||
@@ -927,6 +929,7 @@ Expected: `OK`.
|
|||||||
## Task 3: Create `WfMcpWorkflowApiBackend` adapter
|
## Task 3: Create `WfMcpWorkflowApiBackend` adapter
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_mcp/broker/service/workflow_api_backend.py`
|
- Create: `src/wf_mcp/broker/service/workflow_api_backend.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Write `src/wf_mcp/broker/service/workflow_api_backend.py`**
|
- [ ] **Step 1: Write `src/wf_mcp/broker/service/workflow_api_backend.py`**
|
||||||
@@ -1415,6 +1418,7 @@ Expected: `OK`.
|
|||||||
## Task 4: Update `wf_cli.context` to use `WorkflowApi`
|
## Task 4: Update `wf_cli.context` to use `WorkflowApi`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_cli/context.py`
|
- Modify: `src/wf_cli/context.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Update `src/wf_cli/context.py`**
|
- [ ] **Step 1: Update `src/wf_cli/context.py`**
|
||||||
@@ -1486,11 +1490,13 @@ Expected: all pass. CLI commands use `context.handlers.X()` which now calls thro
|
|||||||
## Task 5: Update MCP tool registration to use `WorkflowApi`
|
## Task 5: Update MCP tool registration to use `WorkflowApi`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/tools.py`
|
- Modify: `src/wf_mcp/workflow_surface/tools.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Update imports in `src/wf_mcp/workflow_surface/tools.py`**
|
- [ ] **Step 1: Update imports in `src/wf_mcp/workflow_surface/tools.py`**
|
||||||
|
|
||||||
Change lines 10-12 from:
|
Change lines 10-12 from:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from wf_mcp.broker.service import WfMcpService
|
from wf_mcp.broker.service import WfMcpService
|
||||||
|
|
||||||
@@ -1498,6 +1504,7 @@ from .handlers import WorkflowSurfaceHandlers
|
|||||||
```
|
```
|
||||||
|
|
||||||
To:
|
To:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from wf_api import WorkflowApi
|
from wf_api import WorkflowApi
|
||||||
from wf_mcp.broker.service import WfMcpService
|
from wf_mcp.broker.service import WfMcpService
|
||||||
@@ -1507,11 +1514,13 @@ from wf_mcp.broker.service.workflow_api_backend import WfMcpWorkflowApiBackend
|
|||||||
- [ ] **Step 2: Update `register_workflow_tools` function body**
|
- [ ] **Step 2: Update `register_workflow_tools` function body**
|
||||||
|
|
||||||
Change line 39 from:
|
Change line 39 from:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
handlers = WorkflowSurfaceHandlers(service)
|
handlers = WorkflowSurfaceHandlers(service)
|
||||||
```
|
```
|
||||||
|
|
||||||
To:
|
To:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
handlers = WorkflowApi(WfMcpWorkflowApiBackend(service))
|
handlers = WorkflowApi(WfMcpWorkflowApiBackend(service))
|
||||||
```
|
```
|
||||||
@@ -1531,6 +1540,7 @@ Expected: all pass.
|
|||||||
## Task 6: Add import-direction test
|
## Task 6: Add import-direction test
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `tests/wf_api/test_import_direction.py`
|
- Create: `tests/wf_api/test_import_direction.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Create `tests/wf_api/__init__.py`**
|
- [ ] **Step 1: Create `tests/wf_api/__init__.py`**
|
||||||
@@ -1592,6 +1602,7 @@ Expected: `PASSED`.
|
|||||||
## Task 7: Add `CliContext.handlers` type test
|
## Task 7: Add `CliContext.handlers` type test
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `tests/wf_api/test_cli_context_uses_api.py`
|
- Create: `tests/wf_api/test_cli_context_uses_api.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Write `tests/wf_api/test_cli_context_uses_api.py`**
|
- [ ] **Step 1: Write `tests/wf_api/test_cli_context_uses_api.py`**
|
||||||
|
|||||||
@@ -66,6 +66,7 @@
|
|||||||
## Task 1: Add Canonical `wf_api.constants`
|
## Task 1: Add Canonical `wf_api.constants`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/constants.py`
|
- Create: `src/wf_api/constants.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Create `src/wf_api/constants.py`**
|
- [ ] **Step 1: Create `src/wf_api/constants.py`**
|
||||||
@@ -109,6 +110,7 @@ call wf.std.runtime_error
|
|||||||
## Task 2: Add Canonical `wf_api.refs`
|
## Task 2: Add Canonical `wf_api.refs`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/refs.py`
|
- Create: `src/wf_api/refs.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Create `src/wf_api/refs.py`**
|
- [ ] **Step 1: Create `src/wf_api/refs.py`**
|
||||||
@@ -165,6 +167,7 @@ workflow.echo_wrapper.v2
|
|||||||
## Task 3: Re-export Helpers From `wf_api`
|
## Task 3: Re-export Helpers From `wf_api`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/__init__.py`
|
- Modify: `src/wf_api/__init__.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Update imports and `__all__`**
|
- [ ] **Step 1: Update imports and `__all__`**
|
||||||
@@ -218,6 +221,7 @@ ok demo.personal.echo_tool
|
|||||||
## Task 4: Convert Old Workflow-Surface Modules To Shims
|
## Task 4: Convert Old Workflow-Surface Modules To Shims
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/constants.py`
|
- Modify: `src/wf_mcp/workflow_surface/constants.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/refs.py`
|
- Modify: `src/wf_mcp/workflow_surface/refs.py`
|
||||||
|
|
||||||
@@ -290,6 +294,7 @@ call workflow.echo_wrapper.v2
|
|||||||
## Task 5: Update Canonical Imports In `WorkflowSurfaceHandlers`
|
## Task 5: Update Canonical Imports In `WorkflowSurfaceHandlers`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Change constants import**
|
- [ ] **Step 1: Change constants import**
|
||||||
@@ -351,6 +356,7 @@ WorkflowSurfaceHandlers
|
|||||||
## Task 6: Update Ref Tests For Canonical And Shim Imports
|
## Task 6: Update Ref Tests For Canonical And Shim Imports
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/wf_mcp/test_workflow_surface_refs.py`
|
- Modify: `tests/wf_mcp/test_workflow_surface_refs.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Update imports**
|
- [ ] **Step 1: Update imports**
|
||||||
@@ -404,6 +410,7 @@ Expected: all tests pass.
|
|||||||
## Task 7: Search For Remaining Canonical Import Opportunities
|
## Task 7: Search For Remaining Canonical Import Opportunities
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Inspect only unless the search finds new low-risk direct consumers.
|
- Inspect only unless the search finds new low-risk direct consumers.
|
||||||
|
|
||||||
- [ ] **Step 1: Search old imports**
|
- [ ] **Step 1: Search old imports**
|
||||||
|
|||||||
@@ -68,6 +68,7 @@
|
|||||||
## Task 1: Create Canonical `wf_api.wrapper_hints`
|
## Task 1: Create Canonical `wf_api.wrapper_hints`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/wrapper_hints.py`
|
- Create: `src/wf_api/wrapper_hints.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Copy existing implementation**
|
- [ ] **Step 1: Copy existing implementation**
|
||||||
@@ -117,6 +118,7 @@ WrapperAuthoringHints wrapper_hints_for_capability
|
|||||||
## Task 2: Create Canonical `wf_api.next_actions`
|
## Task 2: Create Canonical `wf_api.next_actions`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/next_actions.py`
|
- Create: `src/wf_api/next_actions.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Copy existing implementation**
|
- [ ] **Step 1: Copy existing implementation**
|
||||||
@@ -168,6 +170,7 @@ wf.workflow.run_deployment NextActions
|
|||||||
## Task 3: Re-export Guidance Helpers From `wf_api`
|
## Task 3: Re-export Guidance Helpers From `wf_api`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/__init__.py`
|
- Modify: `src/wf_api/__init__.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add imports**
|
- [ ] **Step 1: Add imports**
|
||||||
@@ -227,6 +230,7 @@ NextActions WrapperAuthoringHints
|
|||||||
## Task 4: Convert Old Workflow-Surface Guidance Modules To Shims
|
## Task 4: Convert Old Workflow-Surface Guidance Modules To Shims
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/wrapper_hints.py`
|
- Modify: `src/wf_mcp/workflow_surface/wrapper_hints.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/next_actions.py`
|
- Modify: `src/wf_mcp/workflow_surface/next_actions.py`
|
||||||
|
|
||||||
@@ -305,6 +309,7 @@ WrapperAuthoringHints NextActions
|
|||||||
## Task 5: Update Production Imports To Canonical Paths
|
## Task 5: Update Production Imports To Canonical Paths
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/models.py`
|
- Modify: `src/wf_mcp/workflow_surface/models.py`
|
||||||
|
|
||||||
@@ -375,6 +380,7 @@ WorkflowSurfaceHandlers NextActions
|
|||||||
## Task 6: Update Direct Tests And Add Shim Compatibility Tests
|
## Task 6: Update Direct Tests And Add Shim Compatibility Tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/wf_mcp/test_workflow_wrapper_hints.py`
|
- Modify: `tests/wf_mcp/test_workflow_wrapper_hints.py`
|
||||||
- Modify: `tests/wf_mcp/workflow_surface/test_next_actions.py`
|
- Modify: `tests/wf_mcp/workflow_surface/test_next_actions.py`
|
||||||
|
|
||||||
@@ -447,6 +453,7 @@ Expected: all pass.
|
|||||||
## Task 7: Search For Remaining Canonical Import Opportunities
|
## Task 7: Search For Remaining Canonical Import Opportunities
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Inspect only unless the search finds new low-risk direct consumers.
|
- Inspect only unless the search finds new low-risk direct consumers.
|
||||||
|
|
||||||
- [ ] **Step 1: Search old imports**
|
- [ ] **Step 1: Search old imports**
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ This adapter may import `wf_mcp`; `wf_api` must not.
|
|||||||
## Task 1: Add `wf_api.operation_context`
|
## Task 1: Add `wf_api.operation_context`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/operation_context.py`
|
- Create: `src/wf_api/operation_context.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Create `src/wf_api/operation_context.py`**
|
- [ ] **Step 1: Create `src/wf_api/operation_context.py`**
|
||||||
@@ -224,6 +225,7 @@ WorkflowOperationContext
|
|||||||
## Task 2: Re-export Operation Context Types
|
## Task 2: Re-export Operation Context Types
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/__init__.py`
|
- Modify: `src/wf_api/__init__.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add imports**
|
- [ ] **Step 1: Add imports**
|
||||||
@@ -271,6 +273,7 @@ WorkflowOperationContext WorkflowRuntimeRunner
|
|||||||
## Task 3: Add MCP Adapter For Operation Context
|
## Task 3: Add MCP Adapter For Operation Context
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_mcp/broker/service/workflow_operation_context.py`
|
- Create: `src/wf_mcp/broker/service/workflow_operation_context.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Create adapter file**
|
- [ ] **Step 1: Create adapter file**
|
||||||
@@ -397,6 +400,7 @@ context_from_service
|
|||||||
## Task 4: Add Focused Tests
|
## Task 4: Add Focused Tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `tests/wf_api/test_operation_context.py`
|
- Create: `tests/wf_api/test_operation_context.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Write tests**
|
- [ ] **Step 1: Write tests**
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ draft preview and artifact creation. If a helper still has live callers in
|
|||||||
## Task 1: Create `wf_api.drafts`
|
## Task 1: Create `wf_api.drafts`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/drafts.py`
|
- Create: `src/wf_api/drafts.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Create `WorkflowDraftApi` skeleton**
|
- [ ] **Step 1: Create `WorkflowDraftApi` skeleton**
|
||||||
@@ -179,6 +180,7 @@ Add:
|
|||||||
## Task 2: Move Stateless Draft Methods
|
## Task 2: Move Stateless Draft Methods
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/drafts.py`
|
- Modify: `src/wf_api/drafts.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add `validate_draft`**
|
- [ ] **Step 1: Add `validate_draft`**
|
||||||
@@ -225,6 +227,7 @@ Add:
|
|||||||
## Task 3: Move Draft Workspace Methods
|
## Task 3: Move Draft Workspace Methods
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/drafts.py`
|
- Modify: `src/wf_api/drafts.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add workspace CRUD and validation methods**
|
- [ ] **Step 1: Add workspace CRUD and validation methods**
|
||||||
@@ -261,6 +264,7 @@ They should call `self.patch_draft_workspace(...)` inside `WorkflowDraftApi`.
|
|||||||
## Task 4: Move Minimal Draft Bootstrap
|
## Task 4: Move Minimal Draft Bootstrap
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/drafts.py`
|
- Modify: `src/wf_api/drafts.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add `create_minimal_draft_workspace`**
|
- [ ] **Step 1: Add `create_minimal_draft_workspace`**
|
||||||
@@ -294,6 +298,7 @@ Do not change their behavior.
|
|||||||
## Task 5: Move Required-Capability Draft Helpers
|
## Task 5: Move Required-Capability Draft Helpers
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/drafts.py`
|
- Modify: `src/wf_api/drafts.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Move `_required_capabilities_for_plan`**
|
- [ ] **Step 1: Move `_required_capabilities_for_plan`**
|
||||||
@@ -350,6 +355,7 @@ Move it unchanged.
|
|||||||
## Task 6: Wire `WorkflowSurfaceHandlers` To Delegate Draft Methods
|
## Task 6: Wire `WorkflowSurfaceHandlers` To Delegate Draft Methods
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add imports**
|
- [ ] **Step 1: Add imports**
|
||||||
@@ -419,6 +425,7 @@ but not required for this slice.
|
|||||||
## Task 7: Add Focused Tests
|
## Task 7: Add Focused Tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `tests/wf_api/test_drafts_service.py`
|
- Create: `tests/wf_api/test_drafts_service.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Write direct service tests**
|
- [ ] **Step 1: Write direct service tests**
|
||||||
|
|||||||
@@ -309,6 +309,7 @@ wf explain --input-file validation-output.json
|
|||||||
test `NodeSpec` functions.
|
test `NodeSpec` functions.
|
||||||
- Targeted draft editing helpers such as `wf draft step add` are not in v1.
|
- Targeted draft editing helpers such as `wf draft step add` are not in v1.
|
||||||
- `wf` does not replace MCP resources/prompts or interactive MCP clients.
|
- `wf` does not replace MCP resources/prompts or interactive MCP clients.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- [ ] **Step 2: Add CLI doc to docs index**
|
- [ ] **Step 2: Add CLI doc to docs index**
|
||||||
@@ -393,6 +394,7 @@ wf run trace <run_id> --from 0 --limit 25
|
|||||||
- Do not treat wrapper hints as semantic guarantees.
|
- Do not treat wrapper hints as semantic guarantees.
|
||||||
- If validation fails, run `wf explain <code>` or `wf explain --input-file <validation-output.json>`.
|
- If validation fails, run `wf explain <code>` or `wf explain --input-file <validation-output.json>`.
|
||||||
- Do not use docs under `docs/superpowers/` as user-facing runtime guidance.
|
- Do not use docs under `docs/superpowers/` as user-facing runtime guidance.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- [ ] **Step 2: Do not wire skill installation**
|
- [ ] **Step 2: Do not wire skill installation**
|
||||||
|
|||||||
@@ -64,6 +64,7 @@
|
|||||||
### Task 1: Add Typer Dependency And Script
|
### Task 1: Add Typer Dependency And Script
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `pyproject.toml`
|
- Modify: `pyproject.toml`
|
||||||
|
|
||||||
- [ ] **Step 1: Add dependency and entrypoint**
|
- [ ] **Step 1: Add dependency and entrypoint**
|
||||||
@@ -108,6 +109,7 @@ If `uv lock` cannot access the network, stop and report the dependency-lock bloc
|
|||||||
### Task 2: Add App Skeleton Tests
|
### Task 2: Add App Skeleton Tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `tests/wf_cli/test_app.py`
|
- Create: `tests/wf_cli/test_app.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Write failing Typer app tests**
|
- [ ] **Step 1: Write failing Typer app tests**
|
||||||
@@ -160,6 +162,7 @@ Expected: FAIL because `wf_cli` does not exist.
|
|||||||
### Task 3: Create Typer App And Command Groups
|
### Task 3: Create Typer App And Command Groups
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_cli/__init__.py`
|
- Create: `src/wf_cli/__init__.py`
|
||||||
- Create: `src/wf_cli/app.py`
|
- Create: `src/wf_cli/app.py`
|
||||||
- Create: `src/wf_cli/commands/__init__.py`
|
- Create: `src/wf_cli/commands/__init__.py`
|
||||||
@@ -381,6 +384,7 @@ Expected: PASS.
|
|||||||
### Task 4: Add JSON IO Tests
|
### Task 4: Add JSON IO Tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `tests/wf_cli/test_io.py`
|
- Create: `tests/wf_cli/test_io.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Write failing IO tests**
|
- [ ] **Step 1: Write failing IO tests**
|
||||||
@@ -449,6 +453,7 @@ Expected: FAIL because `wf_cli.io` does not exist.
|
|||||||
### Task 5: Implement JSON IO Helpers
|
### Task 5: Implement JSON IO Helpers
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_cli/io.py`
|
- Create: `src/wf_cli/io.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Create IO helpers**
|
- [ ] **Step 1: Create IO helpers**
|
||||||
@@ -517,6 +522,7 @@ Expected: PASS.
|
|||||||
### Task 6: Add CLI Context Tests
|
### Task 6: Add CLI Context Tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `tests/wf_cli/test_context.py`
|
- Create: `tests/wf_cli/test_context.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Write failing context tests**
|
- [ ] **Step 1: Write failing context tests**
|
||||||
@@ -575,6 +581,7 @@ Expected: FAIL because `wf_cli.context` does not exist.
|
|||||||
### Task 7: Implement CLI Context Loader
|
### Task 7: Implement CLI Context Loader
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_cli/context.py`
|
- Create: `src/wf_cli/context.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Create context loader**
|
- [ ] **Step 1: Create context loader**
|
||||||
@@ -634,6 +641,7 @@ Expected: PASS.
|
|||||||
### Task 8: Run Foundation Verification
|
### Task 8: Run Foundation Verification
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- All touched files.
|
- All touched files.
|
||||||
|
|
||||||
- [ ] **Step 1: Run focused CLI tests**
|
- [ ] **Step 1: Run focused CLI tests**
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
### Task 1: Make Global `--config` Available To Commands
|
### Task 1: Make Global `--config` Available To Commands
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_cli/app.py`
|
- Modify: `src/wf_cli/app.py`
|
||||||
- Modify: `src/wf_cli/context.py`
|
- Modify: `src/wf_cli/context.py`
|
||||||
- Modify: `tests/wf_cli/test_app.py`
|
- Modify: `tests/wf_cli/test_app.py`
|
||||||
@@ -115,6 +116,7 @@ Expected: PASS.
|
|||||||
### Task 2: Add CLI Run/Deploy Test Fixture Helpers
|
### Task 2: Add CLI Run/Deploy Test Fixture Helpers
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `tests/wf_cli/test_run_deploy.py`
|
- Create: `tests/wf_cli/test_run_deploy.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Create fixture helpers**
|
- [ ] **Step 1: Create fixture helpers**
|
||||||
@@ -217,6 +219,7 @@ Expected: FAIL because `deploy validate` does not exist.
|
|||||||
### Task 3: Implement `wf deploy validate`
|
### Task 3: Implement `wf deploy validate`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_cli/commands/deployments.py`
|
- Modify: `src/wf_cli/commands/deployments.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add imports and command**
|
- [ ] **Step 1: Add imports and command**
|
||||||
@@ -279,6 +282,7 @@ Expected: PASS.
|
|||||||
### Task 4: Add Run Command Tests
|
### Task 4: Add Run Command Tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/wf_cli/test_run_deploy.py`
|
- Modify: `tests/wf_cli/test_run_deploy.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add run start test**
|
- [ ] **Step 1: Add run start test**
|
||||||
@@ -414,6 +418,7 @@ Expected: deploy test passes, run tests fail because run commands do not exist.
|
|||||||
### Task 5: Implement Run Commands
|
### Task 5: Implement Run Commands
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_cli/commands/runs.py`
|
- Modify: `src/wf_cli/commands/runs.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Replace run command module**
|
- [ ] **Step 1: Replace run command module**
|
||||||
@@ -534,6 +539,7 @@ Expected: PASS.
|
|||||||
### Task 6: Verify Help And Input Error Behavior
|
### Task 6: Verify Help And Input Error Behavior
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/wf_cli/test_app.py`
|
- Modify: `tests/wf_cli/test_app.py`
|
||||||
- Modify: `tests/wf_cli/test_run_deploy.py`
|
- Modify: `tests/wf_cli/test_run_deploy.py`
|
||||||
|
|
||||||
@@ -598,6 +604,7 @@ Expected: PASS.
|
|||||||
### Task 7: Verification
|
### Task 7: Verification
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- All touched files.
|
- All touched files.
|
||||||
|
|
||||||
- [ ] **Step 1: Run all CLI tests**
|
- [ ] **Step 1: Run all CLI tests**
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ Legacy imports of `WorkflowSurfaceHandlers` may still work, but only as a thin w
|
|||||||
### Task 1: Move TraceRange Out of `backend.py`
|
### Task 1: Move TraceRange Out of `backend.py`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/models.py`
|
- Modify: `src/wf_api/models.py`
|
||||||
- Modify: `src/wf_api/__init__.py`
|
- Modify: `src/wf_api/__init__.py`
|
||||||
- Modify: `src/wf_cli/commands/runs.py`
|
- Modify: `src/wf_cli/commands/runs.py`
|
||||||
@@ -159,6 +160,7 @@ Expected: tests pass, lint pass, format pass.
|
|||||||
### Task 2: Make `WorkflowApi` Compose Domain Services Directly
|
### Task 2: Make `WorkflowApi` Compose Domain Services Directly
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/service.py`
|
- Modify: `src/wf_api/service.py`
|
||||||
- Add: `tests/wf_api/test_direct_service.py`
|
- Add: `tests/wf_api/test_direct_service.py`
|
||||||
|
|
||||||
@@ -357,6 +359,7 @@ Expected: direct service tests and domain API tests pass.
|
|||||||
### Task 3: Update CLI and MCP Tool Construction
|
### Task 3: Update CLI and MCP Tool Construction
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_cli/context.py`
|
- Modify: `src/wf_cli/context.py`
|
||||||
- Modify: `tests/wf_cli/test_context.py`
|
- Modify: `tests/wf_cli/test_context.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/tools.py`
|
- Modify: `src/wf_mcp/workflow_surface/tools.py`
|
||||||
@@ -490,6 +493,7 @@ Expected: CLI and MCP workflow tool tests pass.
|
|||||||
### Task 4: Shrink `WorkflowSurfaceHandlers` to Compatibility Shim
|
### Task 4: Shrink `WorkflowSurfaceHandlers` to Compatibility Shim
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
- Modify: `tests/wf_api/test_direct_service.py` or add a small handler shim test
|
- Modify: `tests/wf_api/test_direct_service.py` or add a small handler shim test
|
||||||
|
|
||||||
@@ -577,6 +581,7 @@ Expected: old handler tests pass through the shim.
|
|||||||
### Task 5: Delete Backend Protocol and Adapter
|
### Task 5: Delete Backend Protocol and Adapter
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Delete: `src/wf_api/backend.py`
|
- Delete: `src/wf_api/backend.py`
|
||||||
- Delete: `src/wf_mcp/broker/service/workflow_api_backend.py`
|
- Delete: `src/wf_mcp/broker/service/workflow_api_backend.py`
|
||||||
- Modify: `src/wf_api/__init__.py`
|
- Modify: `src/wf_api/__init__.py`
|
||||||
@@ -624,6 +629,7 @@ Expected: tests pass, lint pass, format pass.
|
|||||||
### Task 6: Update Active Docs
|
### Task 6: Update Active Docs
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `docs/current_roadmap.md`
|
- Modify: `docs/current_roadmap.md`
|
||||||
- Modify: `docs/wf_mcp_architecture.md`
|
- Modify: `docs/wf_mcp_architecture.md`
|
||||||
- Modify: `docs/superpowers/plans/2026-06-01-wf-api-extraction-roadmap.md`
|
- Modify: `docs/superpowers/plans/2026-06-01-wf-api-extraction-roadmap.md`
|
||||||
@@ -691,6 +697,7 @@ Expected: no whitespace errors.
|
|||||||
### Task 7: Final Verification
|
### Task 7: Final Verification
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- All touched files.
|
- All touched files.
|
||||||
|
|
||||||
- [ ] **Step 1: Run focused workflow API/MCP/CLI tests**
|
- [ ] **Step 1: Run focused workflow API/MCP/CLI tests**
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ Reasons:
|
|||||||
## Task 1: Extend Operation Context For Events And Live Checks
|
## Task 1: Extend Operation Context For Events And Live Checks
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/operation_context.py`
|
- Modify: `src/wf_api/operation_context.py`
|
||||||
- Create: `src/wf_mcp/broker/service/workflow_live_checks.py`
|
- Create: `src/wf_mcp/broker/service/workflow_live_checks.py`
|
||||||
- Modify: `src/wf_mcp/broker/service/workflow_operation_context.py`
|
- Modify: `src/wf_mcp/broker/service/workflow_operation_context.py`
|
||||||
@@ -252,6 +253,7 @@ Expected: pass.
|
|||||||
## Task 2: Create `wf_api.artifacts`
|
## Task 2: Create `wf_api.artifacts`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/artifacts.py`
|
- Create: `src/wf_api/artifacts.py`
|
||||||
- Modify: `src/wf_api/__init__.py`
|
- Modify: `src/wf_api/__init__.py`
|
||||||
- Test: `tests/wf_api/test_artifact_api.py`
|
- Test: `tests/wf_api/test_artifact_api.py`
|
||||||
@@ -386,6 +388,7 @@ Expected: pass.
|
|||||||
## Task 3: Create `wf_api.deployments`
|
## Task 3: Create `wf_api.deployments`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/deployments.py`
|
- Create: `src/wf_api/deployments.py`
|
||||||
- Modify: `src/wf_api/__init__.py`
|
- Modify: `src/wf_api/__init__.py`
|
||||||
- Test: `tests/wf_api/test_deployment_api.py`
|
- Test: `tests/wf_api/test_deployment_api.py`
|
||||||
@@ -523,6 +526,7 @@ Expected: pass.
|
|||||||
## Task 4: Wire `WorkflowSurfaceHandlers`
|
## Task 4: Wire `WorkflowSurfaceHandlers`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add imports**
|
- [ ] **Step 1: Add imports**
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ Reasons:
|
|||||||
## Task 1: Align Runtime Protocol With Actual Runtime Calls
|
## Task 1: Align Runtime Protocol With Actual Runtime Calls
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/operation_context.py`
|
- Modify: `src/wf_api/operation_context.py`
|
||||||
- Modify: `src/wf_mcp/broker/service/workflow_operation_context.py`
|
- Modify: `src/wf_mcp/broker/service/workflow_operation_context.py`
|
||||||
- Test: `tests/wf_api/test_operation_context.py`
|
- Test: `tests/wf_api/test_operation_context.py`
|
||||||
@@ -151,6 +152,7 @@ Expected: pass.
|
|||||||
## Task 2: Create `wf_api.runs`
|
## Task 2: Create `wf_api.runs`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/runs.py`
|
- Create: `src/wf_api/runs.py`
|
||||||
- Modify: `src/wf_api/__init__.py`
|
- Modify: `src/wf_api/__init__.py`
|
||||||
- Test: `tests/wf_api/test_run_api.py`
|
- Test: `tests/wf_api/test_run_api.py`
|
||||||
@@ -231,6 +233,7 @@ Add `"WorkflowRunApi"` to `__all__`.
|
|||||||
## Task 3: Move Run Methods
|
## Task 3: Move Run Methods
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/runs.py`
|
- Modify: `src/wf_api/runs.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Move `run_deployment`**
|
- [ ] **Step 1: Move `run_deployment`**
|
||||||
@@ -311,6 +314,7 @@ Preserve current payload shape:
|
|||||||
## Task 4: Move Run Helpers
|
## Task 4: Move Run Helpers
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/runs.py`
|
- Modify: `src/wf_api/runs.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
|
|
||||||
@@ -355,6 +359,7 @@ Remove only helpers with no remaining handler callers.
|
|||||||
## Task 5: Wire `WorkflowSurfaceHandlers`
|
## Task 5: Wire `WorkflowSurfaceHandlers`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add import**
|
- [ ] **Step 1: Add import**
|
||||||
@@ -429,6 +434,7 @@ methods still need them.
|
|||||||
## Task 6: Add Focused Run API Tests
|
## Task 6: Add Focused Run API Tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `tests/wf_api/test_run_api.py`
|
- Create: `tests/wf_api/test_run_api.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Cover unrunnable deployment path**
|
- [ ] **Step 1: Cover unrunnable deployment path**
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ Temporary private helper duplication is allowed. A later cleanup can promote com
|
|||||||
## Task 1: Create `wf_api.capabilities`
|
## Task 1: Create `wf_api.capabilities`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/capabilities.py`
|
- Create: `src/wf_api/capabilities.py`
|
||||||
- Modify: `src/wf_api/__init__.py`
|
- Modify: `src/wf_api/__init__.py`
|
||||||
- Test: `tests/wf_api/test_capability_api.py`
|
- Test: `tests/wf_api/test_capability_api.py`
|
||||||
@@ -171,6 +172,7 @@ Add `"WorkflowCapabilityApi"` to `__all__`.
|
|||||||
## Task 2: Move Discovery And Inspection
|
## Task 2: Move Discovery And Inspection
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/capabilities.py`
|
- Modify: `src/wf_api/capabilities.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Move `list_capabilities`**
|
- [ ] **Step 1: Move `list_capabilities`**
|
||||||
@@ -240,6 +242,7 @@ Do not import private helpers from `wf_api.artifacts` or `wf_api.runs` in this s
|
|||||||
## Task 3: Move Wrapper Capability Projection
|
## Task 3: Move Wrapper Capability Projection
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/capabilities.py`
|
- Modify: `src/wf_api/capabilities.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add artifact store helper**
|
- [ ] **Step 1: Add artifact store helper**
|
||||||
@@ -295,6 +298,7 @@ Preserve:
|
|||||||
## Task 4: Move Direct Capability Calls
|
## Task 4: Move Direct Capability Calls
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/capabilities.py`
|
- Modify: `src/wf_api/capabilities.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Move `call_capability`**
|
- [ ] **Step 1: Move `call_capability`**
|
||||||
@@ -374,6 +378,7 @@ first make it public. Keeping a local copy is acceptable for this slice.
|
|||||||
## Task 5: Move Capability-Backed Draft Bootstrap
|
## Task 5: Move Capability-Backed Draft Bootstrap
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/capabilities.py`
|
- Modify: `src/wf_api/capabilities.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Move `create_draft_workspace_from_capability`**
|
- [ ] **Step 1: Move `create_draft_workspace_from_capability`**
|
||||||
@@ -410,6 +415,7 @@ def _draft_name_from_capability(capability_name: str) -> str:
|
|||||||
## Task 6: Wire `WorkflowSurfaceHandlers`
|
## Task 6: Wire `WorkflowSurfaceHandlers`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Add import and instance**
|
- [ ] **Step 1: Add import and instance**
|
||||||
@@ -498,6 +504,7 @@ Do not remove imports still needed by method signatures such as `InputBinding`,
|
|||||||
## Task 7: Add Focused Capability API Tests
|
## Task 7: Add Focused Capability API Tests
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `tests/wf_api/test_capability_api.py`
|
- Create: `tests/wf_api/test_capability_api.py`
|
||||||
|
|
||||||
- [ ] **Step 1: Cover live source capability listing and inspection**
|
- [ ] **Step 1: Cover live source capability listing and inspection**
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
## Task 1: Add `wf_api.listing`
|
## Task 1: Add `wf_api.listing`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/listing.py`
|
- Create: `src/wf_api/listing.py`
|
||||||
- Test: `tests/wf_api/test_listing.py`
|
- Test: `tests/wf_api/test_listing.py`
|
||||||
- Modify: `src/wf_api/__init__.py`
|
- Modify: `src/wf_api/__init__.py`
|
||||||
@@ -172,6 +173,7 @@ Expected: pass.
|
|||||||
## Task 2: Route Current Workflow API Listing Calls Through `wf_api.listing`
|
## Task 2: Route Current Workflow API Listing Calls Through `wf_api.listing`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/capabilities.py`
|
- Modify: `src/wf_api/capabilities.py`
|
||||||
- Modify: `src/wf_api/artifacts.py`
|
- Modify: `src/wf_api/artifacts.py`
|
||||||
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
- Modify: `src/wf_mcp/workflow_surface/handlers.py`
|
||||||
@@ -258,6 +260,7 @@ Expected: pass.
|
|||||||
## Task 3: Add Artifact Plan And Artifact Ref Helpers
|
## Task 3: Add Artifact Plan And Artifact Ref Helpers
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/artifact_plans.py`
|
- Create: `src/wf_api/artifact_plans.py`
|
||||||
- Create: `src/wf_api/artifact_refs.py`
|
- Create: `src/wf_api/artifact_refs.py`
|
||||||
- Test: `tests/wf_api/test_artifact_helpers.py`
|
- Test: `tests/wf_api/test_artifact_helpers.py`
|
||||||
@@ -401,6 +404,7 @@ Expected: pass.
|
|||||||
## Task 4: Replace Duplicate Artifact Plan/Ref Helpers In Domain APIs
|
## Task 4: Replace Duplicate Artifact Plan/Ref Helpers In Domain APIs
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/capabilities.py`
|
- Modify: `src/wf_api/capabilities.py`
|
||||||
- Modify: `src/wf_api/artifacts.py`
|
- Modify: `src/wf_api/artifacts.py`
|
||||||
- Modify: `src/wf_api/runs.py`
|
- Modify: `src/wf_api/runs.py`
|
||||||
@@ -471,6 +475,7 @@ Expected: pass.
|
|||||||
## Task 5: Add Shared Capability Requirement Helpers
|
## Task 5: Add Shared Capability Requirement Helpers
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/capability_requirements.py`
|
- Create: `src/wf_api/capability_requirements.py`
|
||||||
- Modify: `src/wf_api/drafts.py`
|
- Modify: `src/wf_api/drafts.py`
|
||||||
- Modify: `src/wf_api/artifacts.py`
|
- Modify: `src/wf_api/artifacts.py`
|
||||||
@@ -647,6 +652,7 @@ Expected: pass.
|
|||||||
## Task 6: Add Source Snapshot Helper If Duplicated
|
## Task 6: Add Source Snapshot Helper If Duplicated
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/source_snapshots.py`
|
- Create: `src/wf_api/source_snapshots.py`
|
||||||
- Modify: `src/wf_api/deployments.py`
|
- Modify: `src/wf_api/deployments.py`
|
||||||
- Modify: `src/wf_api/runs.py`
|
- Modify: `src/wf_api/runs.py`
|
||||||
@@ -718,6 +724,7 @@ Expected: pass.
|
|||||||
## Task 7: Remove Duplicate Private Helpers And Guard Imports
|
## Task 7: Remove Duplicate Private Helpers And Guard Imports
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_api/capabilities.py`
|
- Modify: `src/wf_api/capabilities.py`
|
||||||
- Modify: `src/wf_api/artifacts.py`
|
- Modify: `src/wf_api/artifacts.py`
|
||||||
- Modify: `src/wf_api/drafts.py`
|
- Modify: `src/wf_api/drafts.py`
|
||||||
@@ -764,6 +771,7 @@ Expected: pass.
|
|||||||
## Task 8: Final Verification
|
## Task 8: Final Verification
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- All touched files.
|
- All touched files.
|
||||||
|
|
||||||
- [ ] **Step 1: Run focused wf_api workflow tests**
|
- [ ] **Step 1: Run focused wf_api workflow tests**
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ That makes a protocol-specific service decide protocol-neutral workflow persiste
|
|||||||
### Task 1: Add Protocol-Neutral Store Bundle
|
### Task 1: Add Protocol-Neutral Store Bundle
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `src/wf_api/stores.py`
|
- Create: `src/wf_api/stores.py`
|
||||||
- Modify: `src/wf_api/__init__.py`
|
- Modify: `src/wf_api/__init__.py`
|
||||||
- Test: `tests/wf_api/test_stores.py`
|
- Test: `tests/wf_api/test_stores.py`
|
||||||
@@ -173,6 +174,7 @@ Expected: tests pass, lint pass, format pass.
|
|||||||
### Task 2: Move Config Store Construction Through the Bundle
|
### Task 2: Move Config Store Construction Through the Bundle
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/broker/config.py`
|
- Modify: `src/wf_mcp/broker/config.py`
|
||||||
- Test: `tests/wf_mcp/test_broker_server.py`
|
- Test: `tests/wf_mcp/test_broker_server.py`
|
||||||
|
|
||||||
@@ -267,6 +269,7 @@ Expected: tests pass, lint pass, format pass.
|
|||||||
### Task 3: Remove Implicit Workflow Store Creation from WfMcpService
|
### Task 3: Remove Implicit Workflow Store Creation from WfMcpService
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `src/wf_mcp/broker/service/core.py`
|
- Modify: `src/wf_mcp/broker/service/core.py`
|
||||||
- Modify: `tests/wf_mcp/service/test_catalog.py`
|
- Modify: `tests/wf_mcp/service/test_catalog.py`
|
||||||
|
|
||||||
@@ -350,6 +353,7 @@ Expected: tests pass, lint pass, format pass.
|
|||||||
### Task 4: Fix Direct Service Tests That Need Workflow Stores
|
### Task 4: Fix Direct Service Tests That Need Workflow Stores
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify only tests that fail after Task 3.
|
- Modify only tests that fail after Task 3.
|
||||||
|
|
||||||
- [ ] **Step 1: Run targeted workflow API/service tests**
|
- [ ] **Step 1: Run targeted workflow API/service tests**
|
||||||
@@ -410,6 +414,7 @@ Expected: targeted tests pass and no broad fixture churn.
|
|||||||
### Task 5: Document the Store Ownership Rule
|
### Task 5: Document the Store Ownership Rule
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `docs/superpowers/research/2026-06-01-wf-api-extraction-map.md`
|
- Modify: `docs/superpowers/research/2026-06-01-wf-api-extraction-map.md`
|
||||||
- Modify: `docs/current_roadmap.md` if it already has a `wf_api` section
|
- Modify: `docs/current_roadmap.md` if it already has a `wf_api` section
|
||||||
|
|
||||||
@@ -452,6 +457,7 @@ Expected: no current docs/tests claim `WfMcpService` installs default workflow s
|
|||||||
### Task 6: Final Verification
|
### Task 6: Final Verification
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- All touched files.
|
- All touched files.
|
||||||
|
|
||||||
- [ ] **Step 1: Run focused suite**
|
- [ ] **Step 1: Run focused suite**
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ Thin tests that only repeat:
|
|||||||
## Task 1: Build A Deletion Ledger Before Editing
|
## Task 1: Build A Deletion Ledger Before Editing
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Create: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
- Create: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
||||||
|
|
||||||
- [ ] **Step 1: Create the ledger file**
|
- [ ] **Step 1: Create the ledger file**
|
||||||
@@ -125,6 +126,7 @@ integration seams.
|
|||||||
## Task 2: Thin Artifact Listing Duplicates
|
## Task 2: Thin Artifact Listing Duplicates
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/wf_mcp/workflow_surface/test_artifacts.py`
|
- Modify: `tests/wf_mcp/workflow_surface/test_artifacts.py`
|
||||||
- Modify: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
- Modify: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
||||||
- Test: `tests/wf_api/test_artifact_api.py`, `tests/wf_mcp/workflow_surface/test_artifacts.py`
|
- Test: `tests/wf_api/test_artifact_api.py`, `tests/wf_mcp/workflow_surface/test_artifacts.py`
|
||||||
@@ -192,6 +194,7 @@ Expected: pass.
|
|||||||
## Task 3: Thin Capability List/Inspect Duplicates Conservatively
|
## Task 3: Thin Capability List/Inspect Duplicates Conservatively
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/wf_mcp/workflow_surface/test_capabilities.py`
|
- Modify: `tests/wf_mcp/workflow_surface/test_capabilities.py`
|
||||||
- Modify: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
- Modify: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
||||||
- Test: `tests/wf_api/test_capability_api.py`, `tests/wf_mcp/workflow_surface/test_capabilities.py`
|
- Test: `tests/wf_api/test_capability_api.py`, `tests/wf_mcp/workflow_surface/test_capabilities.py`
|
||||||
@@ -290,6 +293,7 @@ Expected: pass.
|
|||||||
## Task 4: Thin Deployment Tests Only Where Purely Duplicated
|
## Task 4: Thin Deployment Tests Only Where Purely Duplicated
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/wf_mcp/workflow_surface/test_deployments.py`
|
- Modify: `tests/wf_mcp/workflow_surface/test_deployments.py`
|
||||||
- Modify: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
- Modify: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
||||||
- Test: `tests/wf_api/test_deployment_api.py`, `tests/wf_mcp/workflow_surface/test_deployments.py`
|
- Test: `tests/wf_api/test_deployment_api.py`, `tests/wf_mcp/workflow_surface/test_deployments.py`
|
||||||
@@ -348,6 +352,7 @@ Expected: pass.
|
|||||||
## Task 5: Thin Draft Tests With High Caution
|
## Task 5: Thin Draft Tests With High Caution
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/wf_mcp/workflow_surface/test_drafts.py`
|
- Modify: `tests/wf_mcp/workflow_surface/test_drafts.py`
|
||||||
- Modify: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
- Modify: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
||||||
- Test: `tests/wf_api/test_drafts_service.py`, `tests/wf_mcp/workflow_surface/test_drafts.py`
|
- Test: `tests/wf_api/test_drafts_service.py`, `tests/wf_mcp/workflow_surface/test_drafts.py`
|
||||||
@@ -417,6 +422,7 @@ Expected: pass.
|
|||||||
## Task 6: Keep Run And Wrapper Tests Mostly Intact
|
## Task 6: Keep Run And Wrapper Tests Mostly Intact
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `tests/wf_mcp/workflow_surface/test_runs.py`
|
- Modify: `tests/wf_mcp/workflow_surface/test_runs.py`
|
||||||
- Modify: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
- Modify: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
||||||
- Test: `tests/wf_api/test_run_api.py`, `tests/wf_mcp/workflow_surface/test_runs.py`, `tests/wf_mcp/workflow_surface/test_wrappers.py`
|
- Test: `tests/wf_api/test_run_api.py`, `tests/wf_mcp/workflow_surface/test_runs.py`, `tests/wf_mcp/workflow_surface/test_wrappers.py`
|
||||||
@@ -468,6 +474,7 @@ Expected: pass.
|
|||||||
## Task 7: Final Review And Verification
|
## Task 7: Final Review And Verification
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
|
|
||||||
- Modify: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
- Modify: `docs/superpowers/plans/2026-06-02-wf-mcp-workflow-surface-test-thinning-ledger.md`
|
||||||
- Test: all workflow-surface and wf_api tests
|
- Test: all workflow-surface and wf_api tests
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -200,6 +200,7 @@ These members of `WfMcpService` (`src/wf_mcp/broker/service/core.py`) are NOT ac
|
|||||||
### Summary Classification
|
### Summary Classification
|
||||||
|
|
||||||
**Protocol-neutral (should move to `wf_api`):**
|
**Protocol-neutral (should move to `wf_api`):**
|
||||||
|
|
||||||
- All `wf_artifacts` types and functions
|
- All `wf_artifacts` types and functions
|
||||||
- All `wf_platform` types
|
- All `wf_platform` types
|
||||||
- All `wf_authoring` types
|
- All `wf_authoring` types
|
||||||
@@ -210,6 +211,7 @@ These members of `WfMcpService` (`src/wf_mcp/broker/service/core.py`) are NOT ac
|
|||||||
- `TraceRange`, `NextActions`, `SavedSubgraphTree`, `resolve_runtime_dependencies`, `wrapper_hints`, `refs`, `run_lifecycle`, `constants`
|
- `TraceRange`, `NextActions`, `SavedSubgraphTree`, `resolve_runtime_dependencies`, `wrapper_hints`, `refs`, `run_lifecycle`, `constants`
|
||||||
|
|
||||||
**MCP-specific (stays in `wf_mcp`):**
|
**MCP-specific (stays in `wf_mcp`):**
|
||||||
|
|
||||||
- `ConnectionRegistry`, `ConnectionConfig`
|
- `ConnectionRegistry`, `ConnectionConfig`
|
||||||
- `BackendAdapter`, `require_adapter`
|
- `BackendAdapter`, `require_adapter`
|
||||||
- `AuthRecord`
|
- `AuthRecord`
|
||||||
@@ -225,11 +227,13 @@ These members of `WfMcpService` (`src/wf_mcp/broker/service/core.py`) are NOT ac
|
|||||||
Move `WorkflowSurfaceHandlers` to `wf_api.service.WorkflowApi`, keep same constructor accepting `WfMcpService`.
|
Move `WorkflowSurfaceHandlers` to `wf_api.service.WorkflowApi`, keep same constructor accepting `WfMcpService`.
|
||||||
|
|
||||||
**Pros:**
|
**Pros:**
|
||||||
|
|
||||||
- Minimal code changes — just move the file, update imports
|
- Minimal code changes — just move the file, update imports
|
||||||
- Tests keep passing with import-only changes
|
- Tests keep passing with import-only changes
|
||||||
- No new abstractions
|
- No new abstractions
|
||||||
|
|
||||||
**Cons:**
|
**Cons:**
|
||||||
|
|
||||||
- `wf_api` would still depend on `WfMcpService` (a `wf_mcp` type)
|
- `wf_api` would still depend on `WfMcpService` (a `wf_mcp` type)
|
||||||
- Circular dependency risk: `wf_api` → `wf_mcp` → `wf_api` (if `wf_mcp` tools import from `wf_api`)
|
- Circular dependency risk: `wf_api` → `wf_mcp` → `wf_api` (if `wf_mcp` tools import from `wf_api`)
|
||||||
- Doesn't actually decouple from MCP — just relocates the code
|
- Doesn't actually decouple from MCP — just relocates the code
|
||||||
@@ -240,6 +244,7 @@ Move `WorkflowSurfaceHandlers` to `wf_api.service.WorkflowApi`, keep same constr
|
|||||||
Create `WorkflowApi` that depends on a smaller `WorkflowApiBackend`/ports object instead of all `WfMcpService`, then adapt `WfMcpService` into that backend.
|
Create `WorkflowApi` that depends on a smaller `WorkflowApiBackend`/ports object instead of all `WfMcpService`, then adapt `WfMcpService` into that backend.
|
||||||
|
|
||||||
**Pros:**
|
**Pros:**
|
||||||
|
|
||||||
- Clean dependency direction: `wf_api` → ports/interfaces, `wf_mcp` → adapts `WfMcpService` into ports
|
- Clean dependency direction: `wf_api` → ports/interfaces, `wf_mcp` → adapts `WfMcpService` into ports
|
||||||
- `wf_cli` can also adapt its own backend (or reuse the `wf_mcp` adapter)
|
- `wf_cli` can also adapt its own backend (or reuse the `wf_mcp` adapter)
|
||||||
- FastAPI later becomes just another adapter over the same ports
|
- FastAPI later becomes just another adapter over the same ports
|
||||||
@@ -247,6 +252,7 @@ Create `WorkflowApi` that depends on a smaller `WorkflowApiBackend`/ports object
|
|||||||
- Incremental: can introduce ports one domain at a time
|
- Incremental: can introduce ports one domain at a time
|
||||||
|
|
||||||
**Cons:**
|
**Cons:**
|
||||||
|
|
||||||
- More upfront work — need to define the port interface
|
- More upfront work — need to define the port interface
|
||||||
- Risk of over-abstracting if ports are too fine-grained
|
- Risk of over-abstracting if ports are too fine-grained
|
||||||
- Need to decide what `WorkflowApiBackend` actually exposes
|
- Need to decide what `WorkflowApiBackend` actually exposes
|
||||||
@@ -256,11 +262,13 @@ Create `WorkflowApi` that depends on a smaller `WorkflowApiBackend`/ports object
|
|||||||
Split capabilities/drafts/artifacts/deployments/runs into separate classes before moving packages.
|
Split capabilities/drafts/artifacts/deployments/runs into separate classes before moving packages.
|
||||||
|
|
||||||
**Pros:**
|
**Pros:**
|
||||||
|
|
||||||
- Each domain class is smaller and easier to reason about
|
- Each domain class is smaller and easier to reason about
|
||||||
- Could enable partial extraction (move artifacts first, then drafts, etc.)
|
- Could enable partial extraction (move artifacts first, then drafts, etc.)
|
||||||
- Better separation of concerns regardless of extraction
|
- Better separation of concerns regardless of extraction
|
||||||
|
|
||||||
**Cons:**
|
**Cons:**
|
||||||
|
|
||||||
- Large refactor with many test changes
|
- Large refactor with many test changes
|
||||||
- Still coupled to `WfMcpService` until ports are introduced
|
- Still coupled to `WfMcpService` until ports are introduced
|
||||||
- May create artificial boundaries — some operations span domains (e.g., `create_artifact_from_workspace` touches both drafts and artifacts)
|
- May create artificial boundaries — some operations span domains (e.g., `create_artifact_from_workspace` touches both drafts and artifacts)
|
||||||
|
|||||||
@@ -54,9 +54,7 @@ class WorkflowRuntimeService:
|
|||||||
spec: NodeSpec[Any, Any] = self.source_catalog.get_qualified_spec(
|
spec: NodeSpec[Any, Any] = self.source_catalog.get_qualified_spec(
|
||||||
qualified_name
|
qualified_name
|
||||||
)
|
)
|
||||||
node_defs[qualified_name] = spec.to_node_def().model_copy(
|
node_defs[qualified_name] = spec.to_node_def()
|
||||||
update={"name": qualified_name}
|
|
||||||
)
|
|
||||||
|
|
||||||
nodes = []
|
nodes = []
|
||||||
for node in plan.nodes:
|
for node in plan.nodes:
|
||||||
|
|||||||
Reference in New Issue
Block a user