feat(team-creator v2): SUB-4 budget projection + drift detection (closes VastVale)#30
Merged
Conversation
Wave 4 SUB-4 (BACK-SwiftReef, gh#20). Final VastVale sub-WorkItem. Closes the epic. - inputs_snapshot.budget_projection block per design (currency, window, projected_total, projection_method, slot_projections[] with role/seniority/model_profile/expected_invocations_per_week/ avg_tokens_per_invocation/unit_cost_usd/projected_total_usd, drift_threshold_pct=20, notes). Added effective_window per slot for consultant-slot traceability (only deviation from design). - pk-team-create Step 7.5 (between entity write and DEC write): iterates RoleSlots, calls model-recommender.get_pricing per slot, computes per-slot and total projection, persists into DEC. New CLI flags: --budget-drift-threshold (default 20), --projection-method (default heuristic). - New helpers in team_creator_lib.py: intersect_windows, compute_slot_projection, build_budget_projection, compute_budget_drift. Pure functions (testable without MCP state). - team-manager: new query_budget_drift MCP tool. Scans Decision files for most-recent chartering DEC with budget_projection; sums actual costs from event-log; computes drift_pct; returns finding shape. Over-spend = warning; under-spend = info; no projection = skip. - pk-team-review Step 5c calls query_budget_drift. New BUDGET DRIFT report section + SUMMARY line. New CLI flags: --budget-scope, --budget-drift-threshold. - Consultant slots (type=consultant on filled_by TeamMember) use the engagement_window intersected with Scope window for the per-slot cost window. Hook from SUB-3. - 9 new tests; 97/97 team-manager tests pass on both trees. Open follow-up: - Actuals use snapshotted unit_cost_usd (volume-only drift). Live get_pricing for both volume + price drift is achievable today via the actual_slot_costs injection parameter when the caller pre-computes — cross-server team-manager -> model-recommender call was avoided to keep scope tight. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wave 4 SUB-4 of VastVale (gh#20). Final sub-WorkItem; closes the epic. Built on SUB-1 + SUB-2 + SUB-3 (all already merged).
Highlights
Test plan
Open follow-up (not in this PR)
actual_slot_costsinjection parameter when the caller pre-computes — cross-server team-manager → model-recommender call was avoided to keep scope tight.🤖 Generated with Claude Code