# Man-Day Agile Simplification Report

## 1. Why timers were removed from the UI

Mountain View teams plan and track work in **Man-Days (MD)** — one MD equals one working day, not 24 hours. Hourly timers, pause/resume, logged hours, and timesheets added complexity without matching the intended workflow.

Timer **backend** (`ticket_time_entries`, `TicketTimeTrackingService`, `/api/v1/projects/time/*`) remains for database compatibility but is **deprecated and hidden**. Time-exceeded notifications are disabled.

## 2. Why Man-Days match Mountain View workflow

- Planning: “2.5 MD for this story”
- Sprint capacity: “40 MD per sprint”
- Burndown / velocity / workload: same unit end-to-end
- No confusion between story points, hours, and timers

## 3. Data model changes

| Table | Column | Notes |
|-------|--------|-------|
| `tickets` | `estimate_md` decimal(5,2) | Primary estimate; optional backfill `estimate_hours / 8` |
| `project_sprints` | `capacity_md` decimal(6,2) | Sprint capacity; optional backfill `capacity_hours / 8` |

Legacy columns kept: `estimate_points`, `estimate_minutes`, `estimate_hours`, `capacity_points`, `capacity_hours`.

Migration: `2026_06_07_100000_man_day_agile_estimation.php`

## 4. API changes

**Requests accept:** `estimate_md`, `capacity_md` (decimals allowed).

**Responses use MD fields:**

- Burndown: `remaining_md`, `completed_md`, `total_md`
- Velocity: `completed_md`, `average_velocity_md`, `best_sprint_md`, `worst_sprint_md`
- Sprint capacity: `capacity_md`, `committed_md`, `completed_md`, `remaining_md`
- Workload: `assigned_md`, `capacity_md`, utilization %
- Work items / board: `estimate_md`
- My Work widgets: `estimated_md`

**Deprecated (unchanged routes, not used by UI):**

- `POST /api/v1/projects/time/stop|pause|resume`
- Per-ticket time entry endpoints

## 5. UI changes

**Removed / hidden:**

- `TicketTimeTrackingSection` on ticket detail
- Timer labels, hours, logged time on Agile pages

**Added components:**

- `ManDayBadge`, `EstimateField`, `CapacityBar`, `SprintLoadIndicator`

**Updated pages:** backlog, board, sprint, burndown, velocity, workload, My Work, portfolio (velocity average uses MD).

## 6. Burndown / velocity

- Burndown ideal/actual/remaining lines use **MD**
- Velocity = sum of `estimate_md` on **completed** sprint tickets per closed sprint

## 7. Workload

Per user in active sprint (or project):

- Assigned MD vs sprint capacity MD
- Utilization % with thresholds: &lt;60% underloaded, 60–100% balanced, &gt;100% overloaded

## 8. Notifications

**Disabled:** `TIME_ESTIMATE_EXCEEDED` (125/150/200% of hours) — `checkEstimateThresholds()` returns immediately.

**Kept:** sprint capacity exceeded, project/sprint/work item overdue, milestones, project health.

## 9. Backward compatibility

- Old hour/point columns remain in DB
- `ManDayResolver` falls back to `estimate_hours / 8` when `estimate_md` is null
- Timer APIs and tables not dropped

## 10. Tests

- `tests/Feature/Projects/ManDayAgileTest.php`
- `resources/js/src/__tests__/unit/features/projects/ManDayAgile.test.tsx`

## 11. Remaining gaps

- Ticket detail has no inline **Estimate (MD)** editor yet (API supports `estimate_md` on backlog/sprint create)
- Gantt tooltips do not yet show MD explicitly
- Portfolio dashboard “velocity” label may still say “Velocity” generically
- Timer backend still runnable via API for integrations

## 12. Readiness score

**82 / 100** — Core MD planning path is implemented and tested. Timer backend remains but is hidden/deprecated. Full ticket-detail estimate editing and migration of all historical hour data in production should be validated before go-live.
