Archive three completed changes to archive/: - api-resource-standard (70 tasks, 14 resource classes) - capacity-expert-mode (68 tasks, expert mode planning grid) - enhanced-allocation (62 tasks, planning fidelity + reporting) Sync all delta specs to main specs/: - api-resource-standard: API response standardization - capacity-expert-mode: Expert mode toggle, grid, KPIs, batch API - resource-allocation: Month execution comparison, bulk, untracked - untracked-allocation: Null team member support - allocation-indicators: Variance indicators (red/amber/neutral) - monthly-budget: Explicit project-month planning All changes verified and tested (157 tests passing).
2.4 KiB
2.4 KiB
Why
Capacity planning today requires switching between team members one at a time in a calendar card view — too slow for a daily standup. Managers need a spreadsheet-style grid where the entire team's availability for the month is visible and editable at a glance, in under a minute.
What Changes
- Add an Expert Mode toggle to the Capacity Planning page (right-aligned on the tabs row), persisted in
localStorage. - When Expert Mode is ON, replace the per-member calendar card view with a dense planning grid: team members as rows, days-of-month as columns.
- Each cell accepts exactly one of:
H,O,0,.5,0.5,1— any other value is invalid (red on blur, submit disabled globally). HandOare interchangeable display tokens that both normalize to0for math; the frontend always preserves and displays the typed token.- Typing
0on a weekend column auto-renders asO; typing0on a holiday column auto-renders asH. - Live KPI bar above the grid shows Capacity (person-days) and Projected Revenue updating as cells change.
- Batch save: a single Submit button commits all pending changes; disabled while any invalid cell exists.
- Backend gains a new batch availability endpoint to accept multiple
{team_member_id, date, availability}entries in one request.
Capabilities
New Capabilities
capacity-expert-mode: Spreadsheet-style planning grid for bulk team availability editing with token-based input, live KPI bar, and batch save.
Modified Capabilities
capacity-planning: Existing per-member calendar and summary remain unchanged; Expert Mode is purely additive. No requirement changes to existing scenarios.
Impact
- Frontend: New
CapacityExpertGridcomponent;capacity/+page.sveltegains mode toggle + localStorage persistence;capacity.tsAPI client gains batch update function; newexpertModeStoreor localStorage util. - Backend: New
POST /api/capacity/availability/batchendpoint inCapacityController;CapacityServicegainsbatchUpsertAvailability()with consolidated cache invalidation. - No schema changes:
team_member_daily_availabilitiestable is unchanged; values stored remain0,0.5,1. - No breaking changes: Existing calendar mode, summary, holidays, and PTO tabs are unaffected.
- Tests: New unit tests for token normalization/validation; new feature test for batch endpoint; new component tests for grid and toggle.