address each point.
**Changes Summary**
This specification updates the `headroom-foundation` change set to
include actuals tracking. The new feature adds a `TeamMember` model for
team members and a `ProjectStatus` model for project statuses.
**Summary of Changes**
1. **Add Team Members**
* Created the `TeamMember` model with attributes: `id`, `name`,
`role`, and `active`.
* Implemented data migration to add all existing users as
`team_member_ids` in the database.
2. **Add Project Statuses**
* Created the `ProjectStatus` model with attributes: `id`, `name`,
`order`, and `is_active`.
* Defined initial project statuses as "Initial" and updated
workflow states accordingly.
3. **Actuals Tracking**
* Introduced a new `Actual` model for tracking actual hours worked
by team members.
* Implemented data migration to add all existing allocations as
`actual_hours` in the database.
* Added methods for updating and deleting actual records.
**Open Issues**
1. **Authorization Policy**: The system does not have an authorization
policy yet, which may lead to unauthorized access or data
modifications.
2. **Project Type Distinguish**: Although project types are
differentiated, there is no distinction between "Billable" and
"Support" in the database.
3. **Cost Reporting**: Revenue forecasts do not include support
projects, and their reporting treatment needs clarification.
**Implementation Roadmap**
1. **Authorization Policy**: Implement an authorization policy to
restrict access to authorized users only.
2. **Distinguish Project Types**: Clarify project type distinction
between "Billable" and "Support".
3. **Cost Reporting**: Enhance revenue forecasting to include support
projects with different reporting treatment.
**Task Assignments**
1. **Authorization Policy**
* Task Owner: John (Automated)
* Description: Implement an authorization policy using Laravel's
built-in middleware.
* Deadline: 2026-03-25
2. **Distinguish Project Types**
* Task Owner: Maria (Automated)
* Description: Update the `ProjectType` model to include a
distinction between "Billable" and "Support".
* Deadline: 2026-04-01
3. **Cost Reporting**
* Task Owner: Alex (Automated)
* Description: Enhance revenue forecasting to include support
projects with different reporting treatment.
* Deadline: 2026-04-15
3.4 KiB
3.4 KiB
forecast-reporting Specification
Purpose
TBD - created by archiving change headroom-foundation. Update Purpose after archive.
Requirements
Requirement: Generate multi-period forecast report
The system SHALL generate forecast reports showing allocations and revenue projections across multiple months.
Scenario: View 3-month forecast
- WHEN a manager requests a forecast report for February-April 2026
- THEN the system displays all projects with allocations in that period
- AND for each project shows month-by-month allocation breakdown
- AND calculates revenue forecast based on allocations × hourly rates
Scenario: Forecast includes variance indicators
- WHEN viewing the forecast report
- THEN the system shows forecasted hours vs approved estimate for each project
- AND displays GREEN/YELLOW/RED indicators for over/under-allocation
Requirement: Filter forecast by project
The system SHALL allow filtering forecast reports by project, status, or type.
Scenario: Filter by project status
- WHEN filtering forecast report to show only "In-Progress" projects
- THEN the system displays only projects with that status
Scenario: Filter by project type
- WHEN filtering forecast report to show only "Project" type (billable)
- THEN the system excludes "Support" type projects from the report
Requirement: Filter forecast by team
The system SHALL allow filtering forecast reports by team or team member.
Scenario: Filter by team member
- WHEN filtering forecast report to show allocations for "John Doe"
- THEN the system displays only projects where John Doe has allocations
Scenario: Filter by role/team
- WHEN filtering forecast report to show allocations for "Backend Developer" role
- THEN the system displays allocations for all team members with that role
Requirement: Forecast revenue calculation
The system SHALL calculate revenue forecasts based on allocations multiplied by team member hourly rates.
Scenario: Calculate monthly revenue forecast
- WHEN a project has allocations: Developer A 40h @ $150/h, Developer B 30h @ $125/h
- THEN the system calculates monthly revenue forecast as $9,750 (40×$150 + 30×$125)
Scenario: Calculate total revenue forecast for period
- WHEN viewing forecast for Feb-Apr
- AND total allocations are: Feb $9,750, Mar $12,000, Apr $6,000
- THEN the system calculates total period revenue forecast as $27,750
Requirement: Forecast summary aggregations
The system SHALL provide summary aggregations across all projects in the forecast.
Scenario: Total approved hours vs allocated hours
- WHEN viewing forecast summary
- THEN the system displays total approved estimate across all projects
- AND displays total allocated hours across all projects
- AND shows overall variance percentage
Scenario: Revenue forecast summary
- WHEN viewing forecast summary
- THEN the system displays total possible revenue (if all projects delivered at 100% allocation)
- AND displays current forecasted revenue based on actual allocations
Requirement: Customizable date range
The system SHALL allow selecting custom date ranges for forecast reports.
Scenario: Select date range
- WHEN a manager selects "From: 2026-02" and "To: 2026-06"
- THEN the system generates forecast for those 5 months