Files
suaveplan/openspec/archive/2026-05-12-network-transport-family/tasks.md
2026-05-27 23:29:53 +01:00

57 lines
4.0 KiB
Markdown

# Tasks — network-transport-family
## Phase 1: Rename shipped plugins
- [ ] 1.1 Move `packages/network/network-plugin-webrtc/` → `packages/network/network-transport-webrtc/`.
- [ ] 1.2 Update `package.json` `"name"` → `@suaveplan/network-transport-webrtc`.
- [ ] 1.3 Update every internal `workspace:^` consumer (audit: `network-plugin-transport-manager`, any test fixture).
- [ ] 1.4 Rename `openspec/specs/network-webrtc/` if the spec subject is package-bound; otherwise fold a `## MODIFIED` delta noting the rename.
- [ ] 1.5 Verify: `bunx turbo lint typecheck test --filter=@suaveplan/network-transport-webrtc` green.
## Phase 2: Promote pre-OpenSpec bare transport
- [ ] 2.1 Move `packages/network/network-websockets/` → `packages/network/network-transport-websockets/`.
- [ ] 2.2 Update `package.json` `"name"` → `@suaveplan/network-transport-websockets`.
- [x] 2.3 Audit `NetworkPlugin` wrapper. **Finding (2026-05-11)**: `network-transport-websockets` predates the `Transport` contract and exposes a client-server `WebSocketClient` rather than a peer transport. Wiring it as a `NetworkPlugin` requires a non-trivial refactor (per-peer connections, `getConnectedPeers()` aggregation, `transport:connected`/`disconnected` bus emission). Deferred to a dedicated child proposal `network-transport-websockets-plugin-adapter`.
- [ ] 2.4 Update every internal `workspace:^` consumer.
- [ ] 2.5 Fold `openspec/specs/network-websockets/` (if present) or write a fresh spec capturing the transport contract.
- [ ] 2.6 Verify: `bunx turbo lint typecheck test --filter=@suaveplan/network-transport-websockets` green.
## Phase 3: Reserve new transport namespaces (proposals only — no implementation)
For each transport, scaffold `openspec/changes/network-transport-<name>/` with `proposal.md` + `tasks.md` populated against `../suaveplan/enterprise/network-<name>.md` and the standard migration parity checklist. **No code authored in this phase.**
- [ ] 3.1 `network-transport-hyperswarm` proposal.
- [ ] 3.2 `network-transport-libp2p` proposal.
- [ ] 3.3 `network-transport-trystero` proposal.
- [ ] 3.4 `network-transport-gundb` proposal.
- [ ] 3.5 `network-transport-peerjs` proposal (skip if no upstream audit exists; record gap).
- [ ] 3.6 `network-transport-webtorrent` proposal (skip if no upstream audit exists; record gap).
- [ ] 3.7 `network-transport-standby` proposal.
## Phase 4: Docs + manifest regen
- [ ] 4.1 Run `bun scripts/folder-reorg/generate-manifest.ts`; confirm `MANIFEST.md` reflects new names.
- [ ] 4.2 Update `STATUS.md` rows for the two renamed packages (drop bare rows; add transport rows).
- [ ] 4.3 Update `SUMMARY.md` rows.
- [ ] 4.4 Update `CLAUDE.md` package listing (search for `network-plugin-webrtc` + `network-websockets`).
- [ ] 4.5 Update `docs/network/*` references.
## Phase 5: Conformance
- [ ] 5.1 `bunx turbo lint typecheck test --filter='@suaveplan/network*'` green.
- [ ] 5.2 `bunx turbo test:coverage --filter='@suaveplan/network*'` at or above pre-rename baseline.
- [ ] 5.3 `bun scripts/openspec-conformance.ts` (or repo-equivalent) green for every renamed package.
- [ ] 5.4 Root `bun run gate` green.
## Pre-archive checklist
- [ ] Row 1 — Verified by: Both renamed packages compile and test green.
- [ ] Row 2 — Verified by: No remaining `workspace:^` reference to `@suaveplan/network-plugin-webrtc` or `@suaveplan/network-websockets` anywhere in `packages/`.
- [ ] Row 3 — Verified by: `MANIFEST.md`, `STATUS.md`, `SUMMARY.md`, `CLAUDE.md` all reflect the new names.
- [ ] Row 4 — Verified by: All seven Phase 3 child proposals exist with parity checklists.
- [ ] Row 5 — Verified by: `openspec/specs/network-webrtc/` spec subject reflects the rename.
- [ ] Row 6 — Verified by: Root `bun run gate` is green.
- [ ] Row 7 — Verified by: This proposal folded into `openspec/specs/network/spec.md` (or sibling) under `## MODIFIED Requirements` recording the naming convention as load-bearing.
- [ ] Row 8 — Verified by: Folder moved to `openspec/archive/<yyyy-mm-dd>-network-transport-family/`.