Skip to content

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:

  1. crates/vox-orchestrator-mcp/src/chat_tools/chat/agent_loop/salvage_and_stream.rs still sets cost_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.
  2. crates/vox-orchestrator/src/budget/tracker.rs (UsageTracker) only increments raw AtomicU64 counters with zero pre-flight balance gating (402 Battery Unit gate), external multi-benchmark priors (SnitchBench, SkateBench, SweBench, LiveBench), or 3-tier post-turn cost reconciliation.
  3. crates/vox-orchestrator-mcp/src/agy_worktree.rs (DelegationWorktree::cleanup at L60–66) runs git worktree remove --force, which is unsafe on Windows NTFS directory junctions in Git < 2.54 and lacks per-worktree WorkspaceLease serialization and .env* worktree provisioning.
  4. crates/vox-orchestrator/src/agentos/checkpoint_engine.rs is a 12-line stub (should_sparse_checkpoint) rather than a real Git plumbing checkpoint engine (refs/vox/checkpoints/ via git write-tree + git commit-tree).
  5. crates/vox-orchestrator-mcp/src/dei_tools/orchestrator_snapshot.rs serializes full uncompressed snapshots without response-level ID-table interning (orchestrationV2IdTable), body deduplication (orchestrationV2DedupedBodies), or cold-connect idle subagent omission (threadFamilies).
  6. crates/vox-orchestrator-mcp/src/chat_tools/chat/mentions.rs, preamble_and_retrieval.rs, and server_state/webhook_intake.rs lack @rule:<name> user rules, dynamic $variable prompt interpolation, signed/filtered webhook ingress (retaining a deprecated GitLab token stub at L27–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 & LinesCurrent Legacy / Deficient CodeReplacement ImplementationAction on Old Code
crates/vox-orchestrator-mcp/src/agy_worktree.rs:27-67DelegationWorktree::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-2612-line should_sparse_checkpoint(tool: &str) stub with no Git object creation or rollbackGitPlumbingCheckpointStore (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-27Bare 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:91Single-axis intelligence_index check and flat cold-start priorExternalBenchmarkPrior (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 cacheReplace single-index check with weighted multi-benchmark Bayesian prior
crates/vox-orchestrator/src/compaction.rs:210-340Whole-buffer-only compaction dropping provider-specific thought_signaturePartial history compaction (CompactionDirection::UpToMessageId / FromMessageId), compact_message_index divider pointer, and Gemini thoughtSignature preservationReplace whole-buffer-only compaction path
crates/vox-orchestrator-mcp/src/chat_tools/chat/agent_loop/salvage_and_stream.rs:1-34, 70-194, 219-248Stale 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_envelopeWire 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 computationDelete stale L1–34 comment and cost_usd: None placeholder; replace stream loop
crates/vox-orchestrator-mcp/src/dei_tools/orchestrator_snapshot.rs:15-120Uncompressed snapshot JSON emitting all idle subagents and repeating long IDs and duplicate message bodiesWire WireIdTableInterner (compact_ids), LiveBodyDeduper (dedupe_bodies), and omit_idle_subagents filterReplace raw snapshot serializer
crates/vox-orchestrator-mcp/src/mcp_context.rs & tool handlersAd-hoc read/write permission checks across MCP tools and uncompressed DOM snapshotsMcpToolAccess 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 sheddingReplace scattered ad-hoc permission checks
crates/vox-orchestrator-mcp/src/chat_tools/chat/mentions.rs:14-68 & mod.rs:88-90File-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-64Minimal webhook channel intake and deprecated VOX_WEBHOOK_GITLAB_TOKEN warning stub at L27–32Signed (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 connectionCHUNK_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 racingReplace 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)”
PhaseTitleRequirementsPrimary Target CratesSpecification Document
242Deterministic Entity IDs (VoxIdAllocatorV2), ForwardCompatibleEnvelope & Wire ID/Body DeduplicationT3-WIRE-ID-01..04vox-orchestrator, vox-orchestrator-mcpt3-vox-orchestration-wire-and-id-migration-spec-2026.md
243Atomic Mid-Stream Multi-Tab Resumption (SemaphoreSlim Pattern), CommandOutputHub \r Normalization, Live Guest Share & ThreadRunQueue (promote_to_steer / limit_recovery)T3-STREAM-GUEST-01..04vox-orchestrator, vox-orchestrator-mcp, vox-guit3-vox-orchestration-wire-and-id-migration-spec-2026.md
244O(1) 1024-Slot Ring-Buffer RepetitionGuard, ToolRefusalDetector Auto-Retry & MCP Tool-Search Cache-Write GuardT3-GUARD-REFUSAL-01..04vox-llm-egress, vox-orchestrator-mcpt3-vox-router-consensus-battery-and-stream-guards-spec-2026.md
245Battery Unit (1 BU = $0.001) Pre-Flight Gate, 3-Tier Cost Ledger, Multi-Benchmark Priors (SnitchBench/SkateBench/SweBench), up_to Compaction & Context SanitizationT3-BATTERY-LEDGER-01..04vox-orchestrator, vox-orchestrator-mcpt3-vox-router-consensus-battery-and-stream-guards-spec-2026.md
246Multi-Model Consensus SSE Fan-Out & Deterministic Flesch-Kincaid ResponseQualityAnalyzerT3-CONSENSUS-QA-01..04vox-orchestrator, vox-orchestrator-mcp, vox-guit3-vox-router-consensus-battery-and-stream-guards-spec-2026.md
247Windows NTFS Junction-Safe Worktrees, WorkspaceLease, Git Plumbing Checkpoints (refs/vox/checkpoints/), Muse Pool & PR Sync/Watch/Review-Guide ReactorsT3-WORKTREE-VCS-01..04vox-orchestrator, vox-orchestrator-mcp, vox-vcst3-vox-worktree-checkpoints-mcp-and-local-sync-spec-2026.md
248Cross-Provider ContextHandoffService (16K Token / 64KB Budget), McpToolAccess Capability Gates, DPoP, McpAppModelContext & 20KB DOM SheddingT3-HANDOFF-MCP-01..04vox-orchestrator, vox-orchestrator-mcpt3-vox-worktree-checkpoints-mcp-and-local-sync-spec-2026.md
249Local-First Chunked Lazy Loading (CHUNK_SIZE = 16), Write Suppression & Tree Branch divergencePoint Comparison UIT3-CLIENT-BRANCH-01..04vox-gui, vox-orchestrator-mcpt3-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 SearchT3-RULES-SEARCH-01..04vox-orchestrator-mcp, vox-search, vox-guit3-vox-agentic-ux-rules-webhooks-and-session-interop-spec-2026.md
251Signed/Filtered Webhook Ingress, Cron Scheduled Tasks, External CLI Agent Session Importer (~/.claude/~/.codex/~/.cursor) & 6-Tier Staggered Route RacingT3-WEBHOOK-IMPORT-01..04vox-orchestrator, vox-orchestrator-mcp, vox-guit3-vox-agentic-ux-rules-webhooks-and-session-interop-spec-2026.md
252TOESTUB (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 RulesT3-TOESTUB-RULES-01..04vox-code-audit, vox-orchestrator-mcp, vox-guit3-vox-toestub-rules-and-enforcement-research-2026.md

4. Implementation Specification Series Navigation

Section titled “4. Implementation Specification Series Navigation”
  1. Master Plan & Legacy Retirement Ledger (this document): t3-vox-wave2-master-implementation-plan-2026.md
  2. 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
  3. Domain 2 Spec (Phases 244–246 — RepetitionGuard, ToolRefusalDetector, Battery Ledger, Multi-Benchmark Priors, up_to Compaction & Consensus): t3-vox-router-consensus-battery-and-stream-guards-spec-2026.md
  4. 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
  5. Domain 5 Spec (Phases 250–251 — @rule Mentions, Dynamic $variable Prompts, 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
  6. 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