Tasks: SaaS-Mediated CLI Tracker Reflow

Feature: 059-saas-mediated-cli-tracker-reflow Branch: main → main Date: 2026-03-30 Spec: spec.md | Plan: plan.md

Subtask Index

IDDescriptionWPParallel
T001Create SaaSTrackerClient class skeleton with CredentialStore/SyncConfig integrationWP01
T002Implement _request() base method: auth injection, X-Team-Slug, server URL, error parsingWP01
T003Implement retry behaviors: 401 refresh+retry, 429 retry_after, network fail-fastWP01
T004Implement synchronous endpoints: pull(), status(), mappings()WP01
T005Implement _poll_operation() with exponential backoffWP01
T006Implement async-capable endpoints: push(), run() with Idempotency-Key + 200/202WP01
T007Write test_saas_client.py for all endpoints and error pathsWP01
T008Add project_slug to TrackerProjectConfig + update serializationWP02[P]
T009Update is_configured for provider-aware checkWP02[P]
T010Define SAAS_PROVIDERS, LOCAL_PROVIDERS, REMOVED_PROVIDERS constantsWP02[P]
T011Write config tests for project_slug roundtrip + provider classificationWP02[P]
T012Create SaaSTrackerService class with SaaS client integrationWP03
T013Implement bind/unbind for SaaS-backed providersWP03
T014Implement pull/push/run/status/map_list via SaaS client delegationWP03
T015Implement map_add + sync_publish hard-fails with guidanceWP03
T016Write test_saas_service.py with mocked clientWP03
T017Create LocalTrackerService class skeletonWP04[P]
T018Extract bind/unbind from current TrackerServiceWP04[P]
T019Extract status + sync_pull/push/run (direct connector)WP04[P]
T020Extract map_add/map_list (SQLite mappings)WP04[P]
T021Write test_local_service.py for beads/fp behaviorWP04[P]
T022Refactor service.py into thin façade with _resolve_backend()WP05
T023Remove all old direct-provider code from service.pyWP05
T024Remove SaaS-backed + Azure entries from factory.pyWP05
T025Update SUPPORTED_PROVIDERS, normalize_provider(), __init__.pyWP05
T026Delete test_service_publish.py (10,526 lines)WP05
T027Write test_service.py for façade dispatchWP05
T028Update bind command (--project-slug, hard-fail --credential for SaaS)WP06
T029Update unbind/status commands (façade dispatch, SaaS display)WP06
T030Update sync pull/push/run commands (façade dispatch, SaaS envelope display)WP06
T031Update sync publish (hard-fail) + map add/list (hard-fail add for SaaS)WP06
T032Update providers list + help text (SaaS vs local distinction)WP06
T033Update JSON output for SaaS envelope structuresWP06
T034Update test_tracker.py CLI integration testsWP06

Work Packages

Phase 1: Foundation (parallel)

WP01 — SaaS Tracker Client

Priority: P1 (critical path) Prompt: tasks/WP01-saas-tracker-client.md Subtasks: T001–T007 (7 subtasks, ~500 lines) Dependencies: None Goal: Create the HTTP transport layer for all SaaS tracker API communication. Covers auth injection, error envelope parsing, retry behaviors, operation polling, and all 6 endpoint methods. Success: All SaaS tracker endpoints callable with proper auth, errors parsed, 202 polling works, tests pass.

WP02 — Config Model + Provider Classification

Priority: P1 (parallel with WP01) Prompt: tasks/WP02-config-provider-classification.md Subtasks: T008–T011 (4 subtasks, ~250 lines) Dependencies: None Goal: Add project_slug to tracker config for SaaS-backed bindings. Define provider classification constants (SAAS/LOCAL/REMOVED). Success: Config roundtrips project_slug correctly, provider constants defined, tests pass.

Phase 2: Service Implementations (parallel after Phase 1)

WP03 — SaaSTrackerService

Priority: P1 Prompt: tasks/WP03-saas-tracker-service.md Subtasks: T012–T016 (5 subtasks, ~400 lines) Dependencies: WP01, WP02 Goal: Create the SaaS-backed tracker service that delegates all operations to SaaSTrackerClient. Hard-fails map_add and sync_publish. Success: All SaaS-backed operations delegate to client, hard-fails work with guidance, tests pass.

WP04 — LocalTrackerService

Priority: P1 (parallel with WP03) Prompt: tasks/WP04-local-tracker-service.md Subtasks: T017–T021 (5 subtasks, ~350 lines) Dependencies: WP02 Goal: Extract beads/fp direct-connector logic from current TrackerService into a dedicated class. Mechanical move, not rewrite. Success: beads/fp behavior identical to before, existing credential + store tests still pass.

Phase 3: Integration

WP05 — Façade, Factory + Dead Code Removal

Priority: P1 Prompt: tasks/WP05-facade-factory-dead-code.md Subtasks: T022–T027 (6 subtasks, ~450 lines) Dependencies: WP03, WP04 Goal: Refactor TrackerService into thin façade dispatching to SaaS/local backends. Remove SaaS-backed + Azure entries from factory. Delete 10,526 lines of obsolete snapshot publish tests. Success: Façade dispatches correctly, factory only has beads/fp, dead code gone, tests pass.

Phase 4: CLI Surface (parallel)

WP06 — CLI Command Updates

Priority: P1 Prompt: tasks/WP06-cli-command-updates.md Subtasks: T028–T034 (7 subtasks, ~500 lines) Dependencies: WP05 Goal: Update all tracker CLI commands to dispatch through the new façade. Hard-break guidance for SaaS-backed legacy operations. Updated help text and JSON output. Success: All commands work for both SaaS and local providers, hard-breaks display correct guidance, JSON output coherent, tests pass.

Dependency Graph

WP01 (SaaS Client) ──────────┐
                               ├──▶ WP03 (SaaS Service) ──┐
WP02 (Config + Constants) ──┬─┘                            ├──▶ WP05 (Façade) ──▶ WP06 (CLI)
                            └──▶ WP04 (Local Service) ─────┘

Parallelization Waves

WaveWPsAgents
1WP01, WP022 parallel
2WP03, WP042 parallel
3WP051 (integration)
4WP061 (CLI surface)

Critical path: WP01 → WP03 → WP05 → WP06 (4 sequential steps) Total with parallelization: 4 waves instead of 6 sequential

Requirement Coverage

WPRequirements
WP01FR-002, FR-003, FR-004, FR-005, FR-015, FR-016, FR-017, FR-018, FR-019, FR-020
WP02FR-001, FR-012, FR-013
WP03FR-001, FR-002, FR-003, FR-004, FR-006, FR-007, FR-008, FR-009, FR-011
WP04FR-014
WP05FR-012, FR-013, FR-021, FR-022, FR-023
WP06FR-001, FR-006, FR-007, FR-008, FR-009, FR-010, FR-011, FR-013, FR-024, FR-025, FR-026