# Untracked Allocation Specification

## Overview

This capability supports external/unassigned effort by allowing allocations without a team member association.

## ADDED Requirements

### Requirement: Support null team member in allocation APIs

The system SHALL allow allocation records with `team_member_id = null`.

#### Scenario: Create untracked allocation
- **GIVEN** user has allocation create permission
- **WHEN** POST /api/allocations with `team_member_id = null`
- **THEN** allocation is created successfully

#### Scenario: Bulk create with mixed tracked/untracked
- **GIVEN** a bulk payload contains tracked and untracked entries
- **WHEN** POST /api/allocations/bulk is executed
- **THEN** untracked entries with valid data are processed successfully

### Requirement: Include untracked in project totals

Untracked hours SHALL contribute to project-level and grand totals.

#### Scenario: Project total includes untracked
- **GIVEN** project has tracked 80h and untracked 20h in selected month
- **WHEN** project row total is computed
- **THEN** row total is 100h

### Requirement: Exclude untracked from member capacity metrics

Untracked allocations SHALL NOT contribute to any team member utilization/capacity variance.

#### Scenario: Member utilization ignores untracked
- **GIVEN** selected month has untracked allocations
- **WHEN** member column totals and capacity variance are computed
- **THEN** untracked rows are excluded from member computations

### Requirement: Present untracked in execution grid

The allocation grid SHALL expose untracked as a first-class execution bucket.

#### Scenario: Untracked column visible
- **WHEN** manager opens allocation execution grid
- **THEN** untracked column/bucket is visible and editable

## MODIFIED Requirements

### Requirement: Capacity validation

**Original behavior:** all allocations were assumed team-member-bound for capacity checks.

**Updated behavior:** capacity validation is skipped for untracked allocations (`team_member_id = null`).
