5.5 KiB
5.5 KiB
Task Breakdown for 32k Context Window
Overview
All tasks are designed to fit within a single 32k context window (~50-80 lines of SPEC + ~200 lines of code).
Dependency Graph
Phase 1: Alert Refactor (6 tasks)
┌─────────────────────────┐
│ fix-alert-test-get-all │ ← Fix 1 failing test first
└─────────┬───────────────┘
│
┌─────────▼───────────────┐
│ alert-service-create │ ← Create service class
└─────────┬───────────────┘
│
┌─────────▼───────────────┐
│ alert-service-migrate-get│ ← Migrate GET endpoints
└─────────┬───────────────┘
│
┌─────────▼───────────────┐
│ alert-service-migrate-w │ ← Migrate POST/PUT/DELETE
└─────────┬───────────────┘
│
┌─────────▼───────────────┐
│ alert-service-cleanup │ ← Remove direct DB calls
└─────────┬───────────────┘
│
┌─────────▼───────────────┐
│ alert-service-verify │ ← Full test suite pass
└─────────────────────────┘
Phase 1b: Fix Test Fixture (parallel to Phase 1)
┌─────────────────────────┐
│ fix-test-watchlist-fixt │ ← Fix user_id mismatch
└─────────┬───────────────┘
│
├───────────────┐
▼ │
┌─────────────────────┐ │
│ complete-rotation- │ │
│ ranking │───┘
└─────────┬───────────┘
│
┌─────────▼───────────┐
│ complete-rotation- │
│ signals │
└─────────┬───────────┘
│
┌─────────▼───────────┐
│ complete-rotation- │
│ macro │
└─────────────────────┘
Phase 2: Pipeline (2 tasks, sequential)
┌─────────────────────┐
│ pipeline-orchestrator│
│ -tasks │ ← Define tasks
└─────────┬───────────┘
│
┌─────────▼───────────┐
│ pipeline-orchestrator│
│ -api │ ← API endpoints
└─────────────────────┘
Phase 2: Backtest (1 task, independent)
┌─────────────────────┐
│ phase2-backtest- │
│ integration │ ← Wire backtest to pipeline
└─────────────────────┘
Phase 2: News Ingestion (1 task, independent)
┌─────────────────────┐
│ phase2-wire-news- │
│ ingestion │ ← Already in progress
└─────────────────────┘
Phase 2: Financials (1 task, COMPLETE)
┌─────────────────────┐
│ phase2-wire-financials│
│ -ingestion │ ✅ COMPLETE
└─────────────────────┘
Task Sizes (SPEC lines)
| Task | SPEC Lines | Expected Code Lines |
|---|---|---|
| fix-alert-test-get-all | ~35 | 1 file, ~10 changes |
| alert-service-create | ~40 | ~150 lines (new file) |
| alert-service-migrate-get | ~35 | ~10 lines changed |
| alert-service-migrate-write | ~35 | ~20 lines changed |
| alert-service-cleanup | ~30 | ~20 lines changed |
| alert-service-verify | ~25 | 0 lines (tests only) |
| fix-test-watchlist-fixture | ~35 | ~5 lines changed |
| complete-rotation-ranking | ~35 | ~80 lines |
| complete-rotation-signals | ~35 | ~40 lines |
| complete-rotation-macro | ~30 | ~30 lines |
| pipeline-orchestrator-tasks | ~45 | ~120 lines |
| pipeline-orchestrator-api | ~50 | ~100 lines |
| phase2-backtest-integration | ~40 | ~50 lines |
| phase2-wire-news-ingestion | ~40 | ~50 lines |
All SPEC files are under 50 lines (well within 200 token limit for prompts).
Execution Order
- fix-alert-test-get-all — Fix the one failing test (prerequisite for all alert work)
- alert-service-create — Create the service class
- alert-service-migrate-get — Migrate GET endpoints
- alert-service-migrate-write — Migrate write endpoints
- alert-service-cleanup — Remove direct DB calls
- alert-service-verify — Verify everything passes
- fix-test-watchlist-fixture — Fix fixture (can be done anytime before rotation tasks)
- complete-rotation-ranking → signals → macro (sequential)
- pipeline-orchestrator-tasks → pipeline-orchestrator-api (sequential)
- phase2-backtest-integration (independent, can be done anytime)
- phase2-wire-news-ingestion (independent, can be done anytime)