|
| 1 | +# Transfer TUI Wizard Implementation Plan |
| 2 | + |
| 3 | +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. |
| 4 | +
|
| 5 | +**Goal:** Build `agentic-stack transfer` as an onboarding-style TUI wizard that exports/imports portable `.agent` memory bundles and wires Codex, Cursor, Windsurf, or terminal adapters. |
| 6 | + |
| 7 | +**Architecture:** Add pure transfer planning and bundle modules under `harness_manager/`, then wrap them with an onboarding-style wizard that reuses `onboard_ui.py` and `onboard_widgets.py`. Route the new `transfer` verb through `harness_manager.cli`, use existing adapter manifests for installation, and add shell/PowerShell import bootstrap scripts. |
| 8 | + |
| 9 | +**Tech Stack:** Python stdlib, existing `harness_manager`, existing onboarding TUI primitives, unittest, bash, PowerShell. |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +### Task 1: Transfer Planning |
| 14 | + |
| 15 | +**Files:** |
| 16 | +- Create: `harness_manager/transfer_plan.py` |
| 17 | +- Create: `test_transfer_plan.py` |
| 18 | + |
| 19 | +- [x] **Step 1: Write failing tests for target, operation, and scope parsing** |
| 20 | + |
| 21 | +Cover Codex/Cursor/Windsurf/terminal aliases, `all`, curl/export/apply intent, default scopes, sensitive scope opt-in, and adapter preview paths from manifests. |
| 22 | + |
| 23 | +- [x] **Step 2: Run `python3 -m unittest test_transfer_plan.py -v` and verify it fails because `harness_manager.transfer_plan` is missing** |
| 24 | + |
| 25 | +- [x] **Step 3: Implement `transfer_plan.py` with dataclasses, deterministic keyword parsing, target normalization, default scope selection, and manifest-backed adapter preview** |
| 26 | + |
| 27 | +- [x] **Step 4: Run `python3 -m unittest test_transfer_plan.py -v` and verify it passes** |
| 28 | + |
| 29 | +### Task 2: Bundle Export/Import |
| 30 | + |
| 31 | +**Files:** |
| 32 | +- Create: `harness_manager/transfer_bundle.py` |
| 33 | +- Create: `test_transfer_bundle.py` |
| 34 | + |
| 35 | +- [x] **Step 1: Write failing tests for bundle round-trip, digest verification, preferences merge, accepted lesson idempotency, and secret scan blocking** |
| 36 | + |
| 37 | +- [x] **Step 2: Run `python3 -m unittest test_transfer_bundle.py -v` and verify it fails because `harness_manager.transfer_bundle` is missing** |
| 38 | + |
| 39 | +- [x] **Step 3: Implement canonical JSON, gzip/base64 payloads, SHA-256 digests, safe file allowlisting, export from `.agent`, and import into temp projects** |
| 40 | + |
| 41 | +- [x] **Step 4: Run `python3 -m unittest test_transfer_bundle.py -v` and verify it passes** |
| 42 | + |
| 43 | +### Task 3: CLI and Wizard |
| 44 | + |
| 45 | +**Files:** |
| 46 | +- Create: `harness_manager/transfer_tui.py` |
| 47 | +- Modify: `harness_manager/cli.py` |
| 48 | +- Create: `test_transfer_cli.py` |
| 49 | + |
| 50 | +- [x] **Step 1: Write failing tests for non-interactive `transfer --help`, `transfer export`, `transfer import`, and non-TTY wizard refusal** |
| 51 | + |
| 52 | +- [x] **Step 2: Run `python3 -m unittest test_transfer_cli.py -v` and verify it fails because the verb is absent** |
| 53 | + |
| 54 | +- [x] **Step 3: Add the `transfer` verb, argparse routing, non-interactive export/import helpers, and onboarding-style wizard flow** |
| 55 | + |
| 56 | +- [x] **Step 4: Run `python3 -m unittest test_transfer_cli.py -v` and verify it passes** |
| 57 | + |
| 58 | +### Task 4: Bootstrap Scripts and Windsurf Modernization |
| 59 | + |
| 60 | +**Files:** |
| 61 | +- Create: `scripts/import-transfer.sh` |
| 62 | +- Create: `scripts/import-transfer.ps1` |
| 63 | +- Create: `adapters/windsurf/.windsurf/rules/agentic-stack.md` |
| 64 | +- Modify: `adapters/windsurf/adapter.json` |
| 65 | +- Modify: `adapters/windsurf/README.md` |
| 66 | +- Modify: `docs/per-harness/windsurf.md` |
| 67 | +- Modify: `Formula/agentic-stack.rb` |
| 68 | +- Create: `test_transfer_scripts.py` |
| 69 | + |
| 70 | +- [x] **Step 1: Write failing tests that assert scripts exist, Windsurf manifest installs both modern and legacy rule files, and Formula packages scripts** |
| 71 | + |
| 72 | +- [x] **Step 2: Run `python3 -m unittest test_transfer_scripts.py -v` and verify expected failures** |
| 73 | + |
| 74 | +- [x] **Step 3: Add import bootstrap scripts, add modern Windsurf rule file, update manifest/docs, and ensure Formula packages `scripts`** |
| 75 | + |
| 76 | +- [x] **Step 4: Run `python3 -m unittest test_transfer_scripts.py -v` and verify it passes** |
| 77 | + |
| 78 | +### Task 5: Full Verification |
| 79 | + |
| 80 | +**Files:** |
| 81 | +- All touched code and docs |
| 82 | + |
| 83 | +- [x] **Step 1: Run focused transfer tests** |
| 84 | + |
| 85 | +Command: |
| 86 | + |
| 87 | +```bash |
| 88 | +python3 -m unittest test_transfer_plan.py test_transfer_bundle.py test_transfer_cli.py test_transfer_scripts.py -v |
| 89 | +``` |
| 90 | + |
| 91 | +- [x] **Step 2: Run existing relevant regression tests** |
| 92 | + |
| 93 | +Command: |
| 94 | + |
| 95 | +```bash |
| 96 | +python3 -m unittest test_memory_search.py test_data_layer_export.py test_data_flywheel_export.py -v |
| 97 | +``` |
| 98 | + |
| 99 | +- [x] **Step 3: Run repository smoke checks** |
| 100 | + |
| 101 | +Command: |
| 102 | + |
| 103 | +```bash |
| 104 | +python3 -m harness_manager.cli transfer --help |
| 105 | +python3 -m harness_manager.cli transfer export --target codex --print-curl --yes |
| 106 | +git diff --check |
| 107 | +``` |
| 108 | + |
| 109 | +- [x] **Step 4: Commit implementation** |
| 110 | + |
| 111 | +Command: |
| 112 | + |
| 113 | +```bash |
| 114 | +git add docs/superpowers/plans/2026-05-02-transfer-tui-wizard.md harness_manager/transfer_plan.py harness_manager/transfer_bundle.py harness_manager/transfer_tui.py harness_manager/cli.py scripts/import-transfer.sh scripts/import-transfer.ps1 adapters/windsurf/.windsurf/rules/agentic-stack.md adapters/windsurf/adapter.json adapters/windsurf/README.md docs/per-harness/windsurf.md Formula/agentic-stack.rb test_transfer_plan.py test_transfer_bundle.py test_transfer_cli.py test_transfer_scripts.py |
| 115 | +git commit -m "feat: add transfer tui wizard" |
| 116 | +``` |
0 commit comments