Tasks · 001-portfolio-analytics
Real-time portfolio analytics
Platform-level, cross-cutting work: the scaffold, the shared model, the ledger, the wiring, and the reconcile harness the child slices build on.
001-portfolio-analytics
Created
Read time
Twelve platform tasks across five phases. Setup → Foundational → US1·US2·US3 → Polish. Tasks marked
[P] can run in parallel. These are the shared seams every child slice (002–005) depends on;
each child's own analytic tasks live in its tasks.html. Tests for a story MUST be written
and failing before its implementation starts.
1 · Execution strategy
Land US1 — one trade producing three coherent, reconcilable analytics — end to end, then iterate to snapshot/restore (US2) and the extensibility proof (US3).
Setup → Foundational → US1 → US2 → US3 → Polish, closing each story's conformance before the next opens.
After Foundational, the child slices (002–005) proceed in parallel against the shared model + ledger; coordinate only at the AnalyticsPlatform seam via the spec.
2 · Phase 1 — Setup
pom.xml with the Quarkus 3.37.3 BOM and the rest, rest-jackson, arc, micrometer-registry-prometheus, and smallrye-openapi extensions pom.xml3 · Phase 2 — Foundational
The shared seams no analytic slice can ship without. Sequential where order matters.
Side, TradeEvent, PriceTick, and the fixed-point money scale (D-002) src/main/java/io/spectastic/portfolio/model/TradeLedger interface the projections fold (implementation detailed in spec 002) src/main/java/io/spectastic/portfolio/ledger/AnalyticsPlatform (@ApplicationScoped) fans each appended event into the three projections src/main/java/io/spectastic/portfolio/AnalyticsPlatform.javaEstablishes FR-001 (single source of truth) and FR-002 (incremental fold) at the platform level.
4 · Phase 3a — US1 · One trade, three coherent analytics
Tests (write & fail first)
Implementation
AnalyticsResource serving trades/ticks in and positions/weights/realized out, behind the dark toggle src/main/java/io/spectastic/portfolio/api/5 · Phase 3b — US2 · Resume from a checkpoint
6 · Phase 3c — US3 · Add an analytic without touching the ledger
Tests (write & fail first)
Implementation
7 · Phase 4 — Polish
/q/metrics (P-15, the SLO instrument) src/main/java/io/spectastic/portfolio/AnalyticsPlatform.java/q/openapi and a README quickstart (P-11) src/main/resources · README.mdmvn verify (P-10) pom.xml8 · Dependencies
Setup → Foundational
Foundational → US1, US2, US3 (and unblocks child slices 002–005)
US1, US2, US3 → Polish
9 · Change log
- Initial platform task breakdown: scaffold + build floor (Setup), shared model + ledger seam + wiring bean (Foundational), reconcile-to-replay / snapshot / extensibility stories (US1–US3), and observability + contract + coverage (Polish). Child slices 002–005 carry their own analytic tasks.