docs(openspec): add reporting API contract documentation
Add comprehensive API documentation for the reporting endpoint: - Request/response structure - View type inference (did/is/will) - Blank vs explicit zero semantics - Status values and error responses Related to enhanced-allocation change.
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# Resource Allocation - Delta Specification
|
||||
|
||||
This delta documents required updates to existing resource allocation behavior for fidelity with explicit month planning.
|
||||
|
||||
## MODIFIED Requirements
|
||||
|
||||
### Requirement: Month execution comparison target
|
||||
|
||||
**Original behavior:** month execution was compared against derived or lifecycle assumptions.
|
||||
|
||||
**Updated behavior:** selected month project allocation is compared against explicit project-month planned hours.
|
||||
|
||||
#### Scenario: Compare row total to month plan
|
||||
- **GIVEN** selected month plan for project is 1200h
|
||||
- **AND** project allocations total 1300h
|
||||
- **THEN** project row variance is +100h
|
||||
- **AND** row status is `OVER`
|
||||
|
||||
#### Scenario: Blank month plan comparison
|
||||
- **GIVEN** selected month has no plan value set
|
||||
- **AND** project allocations total 50h
|
||||
- **THEN** comparison target is 0h
|
||||
- **AND** row status is `OVER`
|
||||
- **AND** allocation remains allowed
|
||||
|
||||
### Requirement: Bulk allocation behavior
|
||||
|
||||
**Original behavior:** all-or-nothing transaction semantics.
|
||||
|
||||
**Updated behavior:** valid items SHALL be saved even if some items fail.
|
||||
|
||||
#### Scenario: Partial bulk success
|
||||
- **WHEN** 10 allocation items are submitted and 2 fail validation
|
||||
- **THEN** 8 valid items are persisted
|
||||
- **AND** failed items return per-index validation errors
|
||||
- **AND** response includes summary created/failed counts
|
||||
|
||||
### Requirement: Untracked execution semantics
|
||||
|
||||
**Original behavior:** untracked support was ambiguous/incomplete.
|
||||
|
||||
**Updated behavior:** `team_member_id = null` is valid and treated as untracked effort.
|
||||
|
||||
#### Scenario: Untracked counted in project, excluded from capacity
|
||||
- **WHEN** untracked allocation exists for selected month
|
||||
- **THEN** project totals include it
|
||||
- **AND** member capacity/utilization computations exclude it
|
||||
Reference in New Issue
Block a user