T3-to-Vox Wave 2 Master Implementation & Legacy Retirement Plan: Milestone v4.5 (2026)
This document is the master implementation blueprint and legacy code retirement ledger for Milestone v4.5 (Phases 242–252, 44 requirements). It translates the 9-repository T3 ecosystem audit (pingdotgg/t3code, vibheksoni/t3router, vibheksoni/pi-t3chat, TGlide/thom-chat, helioschat/app, lulkebit/t3-cloneathon, guitaripod/omnichat, shaltielshmid/NotT3Chat, TomDoesTech/t3-chat) into concrete Rust and TypeScript code migrations across vox-orchestrator, vox-llm-egress, vox-orchestrator-mcp, vox-search, vox-vcs, vox-gui, and vox-code-audit, explicitly specifying every legacy struct, stub, and unsafe code path to replace or delete.
1. Executive Objective: Full End-to-End Wiring & Prudent Code Replacement
Section titled “1. Executive Objective: Full End-to-End Wiring & Prudent Code Replacement”Whereas Milestone v3.9 (Phases 203–209) established the foundational T3 research corpus and landed initial additive primitives (ModelOperationalStatus, ReasoningEffort, CostProvenanceTier, ResumableTurnStreamRegistry, LazyMcpGroupRegistry, SessionPrivacyPosture, EnhancedPromptReceipt), several legacy Vox code paths still bypass these primitives or rely on pre-audit implementations:
crates/vox-orchestrator-mcp/src/chat_tools/chat/agent_loop/salvage_and_stream.rsstill setscost_usd: None(L187), lacks an O(1) streaming token/n-gram loop breaker (RepetitionGuard), lacks false tool-refusal auto-recovery (ToolRefusalDetector), and does not synchronize mid-stream multi-tab joins under an atomic stream buffer lock.crates/vox-orchestrator/src/budget/tracker.rs(UsageTracker) only increments rawAtomicU64counters with zero pre-flight balance gating (402Battery Unit gate), external multi-benchmark priors (SnitchBench,SkateBench,SweBench,LiveBench), or 3-tier post-turn cost reconciliation.crates/vox-orchestrator-mcp/src/agy_worktree.rs(DelegationWorktree::cleanupatL60–66) runsgit worktree remove --force, which is unsafe on Windows NTFS directory junctions in Git< 2.54and lacks per-worktreeWorkspaceLeaseserialization and.env*worktree provisioning.crates/vox-orchestrator/src/agentos/checkpoint_engine.rsis a 12-line stub (should_sparse_checkpoint) rather than a real Git plumbing checkpoint engine (refs/vox/checkpoints/viagit write-tree+git commit-tree).crates/vox-orchestrator-mcp/src/dei_tools/orchestrator_snapshot.rsserializes full uncompressed snapshots without response-level ID-table interning (orchestrationV2IdTable), body deduplication (orchestrationV2DedupedBodies), or cold-connect idle subagent omission (threadFamilies).crates/vox-orchestrator-mcp/src/chat_tools/chat/mentions.rs,preamble_and_retrieval.rs, andserver_state/webhook_intake.rslack@rule:<name>user rules, dynamic$variableprompt interpolation, signed/filtered webhook ingress (retaining a deprecated GitLab token stub atL27–32), and external CLI session import (~/.claude,~/.codex,~/.cursor).
2. Legacy Code Replacement & Deletion Ledger
Section titled “2. Legacy Code Replacement & Deletion Ledger”Every phase in Milestone v4.1 follows a strict Replace-and-Delete discipline: no parallel dead code or legacy shims remain after migration.
| Target Vox File & Lines | Current Legacy / Deficient Code | Replacement Implementation | Action on Old Code |
|---|---|---|---|
crates/vox-orchestrator-mcp/src/agy_worktree.rs:27-67 | DelegationWorktree::create (bare git worktree add) and DelegationWorktree::cleanup (unsafe git worktree remove --force that traverses NTFS junctions on Windows) | ManagedWorktreeDriver (create_managed_worktree with 2-segment path check + .env* copy; remove_linked_worktree verifying .git admin dir, unlinking directory without traversing junctions, and running git worktree prune under WorkspaceLeaseMap) | Replace in-place & delete raw worktree remove --force call |
crates/vox-orchestrator/src/agentos/checkpoint_engine.rs:1-26 | 12-line should_sparse_checkpoint(tool: &str) stub with no Git object creation or rollback | GitPlumbingCheckpointStore (capture_checkpoint, restore_checkpoint, diff_checkpoints, create_restore_point writing hidden refs under refs/vox/checkpoints/<thread_id>/<ordinal> via isolated GIT_INDEX_FILE) | Replace stub with full plumbing store while retaining should_sparse_checkpoint as the pre-tool trigger predicate |
crates/vox-orchestrator/src/budget/tracker.rs:1-27 | Bare UsageTracker (AtomicU64 counters only; no pre-flight budget check, no transaction ledger, no 3-tier provenance) | BatteryAndCostLedger (1 BU = $0.001, check_preflight_balance, 4-step transactional usage write, and reconcile_turn_cost_delta integration) | Replace UsageTracker internals and migrate all call sites |
crates/vox-orchestrator/src/models/bench_evidence.rs & discovery_pipeline.rs:91 | Single-axis intelligence_index check and flat cold-start prior | ExternalBenchmarkPrior (swe_bench_verified, live_bench_coding, artificial_analysis_index, skate_bench_score, snitch_bench_safety_penalty), /1e6 cost expression evaluator, and 24h LiteLLM rate table cache | Replace single-index check with weighted multi-benchmark Bayesian prior |
crates/vox-orchestrator/src/compaction.rs:210-340 | Whole-buffer-only compaction dropping provider-specific thought_signature | Partial history compaction (CompactionDirection::UpToMessageId / FromMessageId), compact_message_index divider pointer, and Gemini thoughtSignature preservation | Replace whole-buffer-only compaction path |
crates/vox-orchestrator-mcp/src/chat_tools/chat/agent_loop/salvage_and_stream.rs:1-34, 70-194, 219-248 | Stale ponytail: doc comment (L1–34), cost_usd: None (L187), no RepetitionGuard, no ToolRefusalDetector, no atomic ResumableTurnStreamRegistry lock, missing ```tool:<name> prefix in looks_like_streamed_tool_call_envelope | Wire RepetitionGuard (1024-slot ring buffer using vox_crypto::fast_hash), ToolRefusalDetector (REFUSAL_RE + CAPABILITY_RE 1-retry), ResumableTurnStreamRegistry::append_and_broadcast (mutex-locked mid-stream join), ```tool: recognition, and BatteryAndCostLedger cost computation | Delete stale L1–34 comment and cost_usd: None placeholder; replace stream loop |
crates/vox-orchestrator-mcp/src/dei_tools/orchestrator_snapshot.rs:15-120 | Uncompressed snapshot JSON emitting all idle subagents and repeating long IDs and duplicate message bodies | Wire WireIdTableInterner (compact_ids), LiveBodyDeduper (dedupe_bodies), and omit_idle_subagents filter | Replace raw snapshot serializer |
crates/vox-orchestrator-mcp/src/mcp_context.rs & tool handlers | Ad-hoc read/write permission checks across MCP tools and uncompressed DOM snapshots | McpToolAccess capability-ranked combinators (reads, writes, writes_with_capability, starts_threads), RFC 9449 DPoP validator, stateless BLAKE3 keyed_hash client_id, McpAppModelContext (16 KiB), and 20 KB bound_snapshot_metadata DOM shedding | Replace scattered ad-hoc permission checks |
crates/vox-orchestrator-mcp/src/chat_tools/chat/mentions.rs:14-68 & mod.rs:88-90 | File-path-only MENTION_RE (treating @rule:foo as a missing file) and static system prompt strings | @rule:<name> (Manual + Always UserRuleEntry deduplication) and 8-variable interpolate_system_prompt_variables ($current_datetime, $user_timezone, $workspace_root, $git_branch, etc.) | Replace file-only mention parser and static system prompt builder |
crates/vox-orchestrator-mcp/src/server_state/webhook_intake.rs:1-64 | Minimal webhook channel intake and deprecated VOX_WEBHOOK_GITLAB_TOKEN warning stub at L27–32 | Signed (vox_crypto::keyed_hash), header/JSONPath-filtered, idempotency-deduplicated (webhook_dedupe) webhook & cron/interval ScheduledTasksService (60/min rate cap, 20 max queued runs) | Replace webhook_intake.rs and delete deprecated GitLab token stub at L27–32 |
crates/vox-gui/ui/src/components/surfaces/Chat/ | Eager full-thread loading, unthrottled state writes during streaming, linear-only message history, and single-endpoint connection | CHUNK_SIZE = 16 chunked lazy loading, streaming persistence write-suppression (!temporary && !isStreaming), tree-branch divergencePoint comparison modal, Regenerate-with-posture vs. In-Place Assistant Edit, 100-entry promptHistory, and 6-tier 150ms staggered route racing | Replace eager loader, linear-only branch rendering, and single-route dialer |
3. Milestone v4.5 Phase & Requirement Matrix (Phases 242–252)
Section titled “3. Milestone v4.5 Phase & Requirement Matrix (Phases 242–252)”| Phase | Title | Requirements | Primary Target Crates | Specification Document |
|---|---|---|---|---|
| 242 | Deterministic Entity IDs (VoxIdAllocatorV2), ForwardCompatibleEnvelope & Wire ID/Body Deduplication | T3-WIRE-ID-01..04 | vox-orchestrator, vox-orchestrator-mcp | t3-vox-orchestration-wire-and-id-migration-spec-2026.md |
| 243 | Atomic Mid-Stream Multi-Tab Resumption (SemaphoreSlim Pattern), CommandOutputHub \r Normalization, Live Guest Share & ThreadRunQueue (promote_to_steer / limit_recovery) | T3-STREAM-GUEST-01..04 | vox-orchestrator, vox-orchestrator-mcp, vox-gui | t3-vox-orchestration-wire-and-id-migration-spec-2026.md |
| 244 | O(1) 1024-Slot Ring-Buffer RepetitionGuard, ToolRefusalDetector Auto-Retry & MCP Tool-Search Cache-Write Guard | T3-GUARD-REFUSAL-01..04 | vox-llm-egress, vox-orchestrator-mcp | t3-vox-router-consensus-battery-and-stream-guards-spec-2026.md |
| 245 | Battery Unit (1 BU = $0.001) Pre-Flight Gate, 3-Tier Cost Ledger, Multi-Benchmark Priors (SnitchBench/SkateBench/SweBench), up_to Compaction & Context Sanitization | T3-BATTERY-LEDGER-01..04 | vox-orchestrator, vox-orchestrator-mcp | t3-vox-router-consensus-battery-and-stream-guards-spec-2026.md |
| 246 | Multi-Model Consensus SSE Fan-Out & Deterministic Flesch-Kincaid ResponseQualityAnalyzer | T3-CONSENSUS-QA-01..04 | vox-orchestrator, vox-orchestrator-mcp, vox-gui | t3-vox-router-consensus-battery-and-stream-guards-spec-2026.md |
| 247 | Windows NTFS Junction-Safe Worktrees, WorkspaceLease, Git Plumbing Checkpoints (refs/vox/checkpoints/), Muse Pool & PR Sync/Watch/Review-Guide Reactors | T3-WORKTREE-VCS-01..04 | vox-orchestrator, vox-orchestrator-mcp, vox-vcs | t3-vox-worktree-checkpoints-mcp-and-local-sync-spec-2026.md |
| 248 | Cross-Provider ContextHandoffService (16K Token / 64KB Budget), McpToolAccess Capability Gates, DPoP, McpAppModelContext & 20KB DOM Shedding | T3-HANDOFF-MCP-01..04 | vox-orchestrator, vox-orchestrator-mcp | t3-vox-worktree-checkpoints-mcp-and-local-sync-spec-2026.md |
| 249 | Local-First Chunked Lazy Loading (CHUNK_SIZE = 16), Write Suppression & Tree Branch divergencePoint Comparison UI | T3-CLIENT-BRANCH-01..04 | vox-gui, vox-orchestrator-mcp | t3-vox-worktree-checkpoints-mcp-and-local-sync-spec-2026.md |
| 250 | @rule User Rules (Manual/Always), $variable Dynamic System Prompts, Regenerate-with-Posture vs. In-Place Edit, 100-Entry promptHistory & 3-Mode Fuzzy/Trigram Search | T3-RULES-SEARCH-01..04 | vox-orchestrator-mcp, vox-search, vox-gui | t3-vox-agentic-ux-rules-webhooks-and-session-interop-spec-2026.md |
| 251 | Signed/Filtered Webhook Ingress, Cron Scheduled Tasks, External CLI Agent Session Importer (~/.claude/~/.codex/~/.cursor) & 6-Tier Staggered Route Racing | T3-WEBHOOK-IMPORT-01..04 | vox-orchestrator, vox-orchestrator-mcp, vox-gui | t3-vox-agentic-ux-rules-webhooks-and-session-interop-spec-2026.md |
| 252 | TOESTUB (vox-code-audit) Enforcement Detectors (unreasoned_suppression, test_clock_and_skip, mcp_access_and_error_safety, ui_perf_hazards), Wire/SQL Transfer Budget CI Gate & Operational Rules | T3-TOESTUB-RULES-01..04 | vox-code-audit, vox-orchestrator-mcp, vox-gui | t3-vox-toestub-rules-and-enforcement-research-2026.md |
4. Implementation Specification Series Navigation
Section titled “4. Implementation Specification Series Navigation”- Master Plan & Legacy Retirement Ledger (this document): t3-vox-wave2-master-implementation-plan-2026.md
- Domain 1 Spec (
Phases 242–243— Wire Compression, Deterministic IDs, Atomic Stream Resumption, Guest Share &ThreadRunQueue): t3-vox-orchestration-wire-and-id-migration-spec-2026.md - Domain 2 Spec (
Phases 244–246—RepetitionGuard,ToolRefusalDetector, Battery Ledger, Multi-Benchmark Priors,up_toCompaction & Consensus): t3-vox-router-consensus-battery-and-stream-guards-spec-2026.md - Domain 3 & 4 Spec (
Phases 247–249— Junction-Safe Worktrees, Git Plumbing Checkpoints, PR Reactors, Cross-Provider Handoff,McpToolAccess/DPoP & Branch Divergence UI): t3-vox-worktree-checkpoints-mcp-and-local-sync-spec-2026.md - Domain 5 Spec (
Phases 250–251—@ruleMentions, Dynamic$variablePrompts, Weighted Fuzzy/Trigram Search, Signed Webhooks, CLI Session Importer & 6-Tier Route Racing): t3-vox-agentic-ux-rules-webhooks-and-session-interop-spec-2026.md - Domain 6 Spec (
Phase 252— TOESTUB Static Analysis Detectors, Wire/SQL Transfer Budget CI Harness, V8 Memory/CSS Rules & Critical T3 Evaluation): t3-vox-toestub-rules-and-enforcement-research-2026.md