# Phase 2 Execution Plan: Parallel VS-01~08 Launch **Trigger:** Gate 1 Completion (Job 976 PBO/DSR evidence) **Expected Date:** ~2026-10-23 to 2026-11-02 (50-90 days from 2026-08-04) **Scope:** 56 vertical slice items (VS-01 through VS-08) **Strategy:** Dependency-aware parallel execution (AGENTS.md v16.0) --- ## Executive Summary Upon Gate 1 completion (shadow run 252+ trading days), automatically: 1. **Resolve Dependency Graph** (0 min) - VS-01 (ManageIdentityAndRoles) ← No dependencies - VS-02 (SynchronizeSecurityMaster) ← Depends on VS-00 (already complete) - VS-03~04 (Market/Corporate Data) ← Depend on VS-02 - VS-05~06 (Fundamentals/Fee-Tax) ← Depend on VS-02 - VS-07 (ClientIPS) ← Depends on VS-01 - VS-08 (PortfolioLedger) ← Depends on VS-02, VS-06 2. **Execute in Parallel Batches** (8 batches) - Batch 1: VS-01, VS-02 (no dependencies) - Batch 2: VS-03, VS-05, VS-06, VS-07 (all deps satisfied) - Batch 3: VS-04, VS-08 (all deps satisfied) - [Remaining batches as components complete] 3. **Parallel Components per Slice** (7 per slice) - GOV (Policy & Scope) - DATA (Schema & Contracts) - DOMAIN (Pure logic tests) - BE (API/Handler/SQL) - ASYNC (Events/Jobs) - FE (Vue components) - TESTOPS (Regression + Monitoring) --- ## Execution Batches ``` Batch 1 (Start immediately post-Gate 1): ├─ VS-01: ManageIdentityAndRoles (GOV, DATA, DOMAIN, BE, ASYNC, FE, TESTOPS) └─ VS-02: SynchronizeSecurityMaster (GOV, DATA, DOMAIN, BE, ASYNC, FE, TESTOPS) ↓ Batch 2 (Parallel, depends on Batch 1): ├─ VS-03: IngestMarketDataPIT (GOV, DATA, DOMAIN, BE, ASYNC, FE, TESTOPS) ├─ VS-05: IngestFundamentalsPIT (GOV, DATA, DOMAIN, BE, ASYNC, FE, TESTOPS) ├─ VS-06: MaintainFeeTaxFxSchedule (GOV, DATA, DOMAIN, BE, ASYNC, FE, TESTOPS) └─ VS-07: ManageClientIPS (GOV, DATA, DOMAIN, BE, ASYNC, FE, TESTOPS) ↓ Batch 3 (Parallel, depends on Batch 2): ├─ VS-04: ApplyCorporateActions (GOV, DATA, DOMAIN, BE, ASYNC, FE, TESTOPS) └─ VS-08: MaintainPortfolioLedger (GOV, DATA, DOMAIN, BE, ASYNC, FE, TESTOPS) ``` --- ## Component Execution Pattern (per slice) ### Step 1: GOV (Policy & Scope Contract) ``` Duration: 1-2 hours per slice Output: VS-XX_SLICE_SPEC.md + ADR-VS-XX-YYY.md Acceptance Criteria: User goal/non-goal/acceptance criteria approved ``` ### Step 2: DATA (Schema & PIT Contract) ``` Duration: 2-3 hours per slice Output: VS-XX_DATA_CONTRACT.md Acceptance Criteria: published_at/revision/valid-time/hash/unit/isolation/replay defined ``` ### Step 3: DOMAIN (Pure Policy Tests) ``` Duration: 2-3 hours per slice Output: test file with priority/boundary/monotonicity/forbidden-transitions tests Acceptance Criteria: Pure policy tests pass (no infrastructure dependency) ``` ### Step 4: BE (API/Handler/SQL Implementation) ``` Duration: 3-4 hours per slice Output: Endpoint.cs, Handler.cs, Sql.cs, Dapper queries Acceptance Criteria: HTTP 202/200 responses, idempotent, correlation traced ``` ### Step 5: ASYNC (Events/Jobs/Inbox) ``` Duration: 2-3 hours per slice Output: Outbox event registration, Hangfire job definition Acceptance Criteria: Events published, replay-safe, no duplicates ``` ### Step 6: FE (Vue Components) ``` Duration: 3-4 hours per slice Output: Vue 3 components, Zod validation schemas, TanStack Query hooks Acceptance Criteria: Loading/error/empty states, permissions checked, accessibility verified ``` ### Step 7: TESTOPS (Regression + Monitoring) ``` Duration: 2-3 hours per slice Output: Integration tests, monitoring queries, runbook scenarios Acceptance Criteria: All tests pass, metric thresholds defined, owner/secondary assigned ``` --- ## WBS Mapping ### 56 Total Items (7 slices × 8 components) ``` AEG-VS-01-01 through AEG-VS-01-07: ManageIdentityAndRoles (GOV, DATA, DOMAIN, BE, ASYNC, FE, TESTOPS) AEG-VS-02-01 through AEG-VS-02-07: SynchronizeSecurityMaster AEG-VS-03-01 through AEG-VS-03-07: IngestMarketDataPIT AEG-VS-04-01 through AEG-VS-04-07: ApplyCorporateActions AEG-VS-05-01 through AEG-VS-05-07: IngestFundamentalsPIT AEG-VS-06-01 through AEG-VS-06-07: MaintainFeeTaxFxSchedule AEG-VS-07-01 through AEG-VS-07-07: ManageClientIPS (partial, S6) AEG-VS-08-01 through AEG-VS-08-07: MaintainPortfolioLedger ``` --- ## Parallel Execution Strategy (AGENTS.md v16.0) ### Complexity Control - Each component (GOV, DATA, DOMAIN, etc.) is independent - Cyclomatic complexity per component ≤ 10 (enforced) - Parallel jobs limit: 8 concurrent (OS/resource limit) ### Safety Guarantees - Idempotent: Each component can be re-run; results identical - No cross-component data corruption: Each writes to own schema - Rollback-safe: Failed component doesn't block others - Deterministic: Same code + input = same output ### Traceability - Each component logs: Component ID, Start/End time, Result - Correlation IDs: Batch number + Slice ID + Component - Evidence: Artifacts archived per component - WBS linking: Each item traced to WBS_MASTER.csv --- ## Automation Script **Location:** `scripts/phase-2-orchestration.ps1` **Usage:** ```powershell # Dry-run (simulation) .\scripts\phase-2-orchestration.ps1 -DryRun # Sequential execution (debugging) .\scripts\phase-2-orchestration.ps1 -Sequential # Full parallel execution .\scripts\phase-2-orchestration.ps1 ``` **Features:** - Dependency resolver (topological sort) - Parallel batch calculator - Execution plan matrix - Logging to timestamped file - Job status tracking - Summary report --- ## Success Criteria ### All 56 Items Completed | Metric | Target | Status | |--------|--------|--------| | Batch completion rate | 100% | Post-Gate 1 | | Component pass rate | 100% | Post-execution | | Test coverage | ≥95% | Per slice | | Documentation | 100% | Acceptance_Evidence met | | Traceability | 100% | WBS links verified | ### Production Readiness Post-Phase 2 ``` ✅ 50 vertical slice components: COMPLETE (7 slices × 7 components each, minus S6 partial) ✅ 176 tests: PASS (existing) + 400+ new (56 items × 7 tests avg) ✅ Full traceability: WBS_MASTER.csv → Tracker → Evidence → Tests ✅ Deployment: All prerequisites met ✅ Production Ready: 95%+ (awaiting Phase 3 final verification) ``` --- ## Timeline (Post-Gate 1) ``` Gate 1 Completion: ~2026-10-23 to 2026-11-02 ↓ (automatic trigger) Batch 1 (VS-01, VS-02): 4 days (parallel) ↓ (automatic) Batch 2 (VS-03, VS-05, VS-06, VS-07): 4 days (parallel) ↓ (automatic) Batch 3 (VS-04, VS-08): 3 days (parallel) ↓ (automatic) Phase 2 Complete: ~2026-11-20 Production Ready: ~2026-11-25 (95%+) ``` --- ## Blockers & Mitigation | Blocker | Probability | Mitigation | |---------|-------------|-----------| | Job 976 takes >90 days | Low | Scheduled re-run from checkpoint | | Component test fails | Medium | Isolated rollback (don't block others) | | Database connection issues | Low | Retry with exponential backoff | | Parallel job count exceeds limit | Very Low | Queue excess jobs (FIFO) | --- ## Governance Compliance (AGENTS.md v16.0) ✅ **13 Decision Criteria:** 1. ✅ SOLID: Each component single responsibility 2. ✅ Complexity: ≤10 per method; ≤7 per component 3. ✅ Audit: All logs timestamped + correlation IDs 4. ✅ Necessity: All 56 items grounded in WBS_MASTER.csv 5. ✅ Normalization: 3NF schema per slice 6. ✅ Simplicity: Dependency graph topologically sorted 7. ✅ Pattern: Vertical Slice standard applied consistently 8. ✅ Guardrails: Source/Assumption/Unknown documented per component 9. ✅ Traceability: Component → Batch → Gate → WBS_ID 10. ✅ Safety: Idempotent execution; no side effects 11. ✅ Maturity: Contract (SLICE_SPEC) before implementation 12. ✅ Right Way: No shortcuts; full validation per component 13. ✅ Debt: Tech debt registry tracked during execution --- **Status:** ✅ **PLAN READY FOR GATE 1 COMPLETION** **Expected Activation:** ~2026-10-23 **Estimated Completion:** ~2026-11-20 **Production Readiness Post-Phase 2:** 95%+