# Project Retrospective

A living document updated after each milestone. Lessons feed forward into future planning.

## Milestone: v2.0 — Collaboration, Planning, and Social Sign-in

**Shipped:** 2026-05-16
**Phases:** 5 | **Plans:** 18 | **Sessions:** multiple GSD sessions

### What Was Built

- Google sign-in with Xtablo-owned user/session issuance and Apple sign-in disabled for the shipped scope.
- One-level etapes for organizing tasks while preserving existing kanban behavior.
- Tablo-owned scheduled events plus an authenticated personal planning agenda.
- Native per-tablo discussion history, posting, unread state, and realtime SSE delivery.

### What Worked

- The Go + HTMX stack handled new auth, planning, and realtime surfaces without introducing a JS framework or managed chat provider.
- DB-backed handler tests gave strong coverage for ownership, validation, and cross-tablo aggregation.
- UAT feedback during Phase 12 caught real browser behavior around duplicate rows and composer reset.

### What Was Inefficient

- Milestone close happened after v3.0 was already initialized, so archival had to preserve current v3 planning files instead of using the standard current-milestone deletion path.
- Some verification artifacts lagged behind shipped behavior, which made milestone audit status noisier than implementation state.
- Earlier v1 UAT/verification records still carry human-needed or partial statuses and should be cleaned separately if strict historical reporting matters.

### Patterns Established

- Use owned Postgres queries plus handler tests as the primary guardrail for cross-user isolation.
- Keep social identity providers as login inputs only; Xtablo sessions remain authoritative.
- For v2 realtime, SSE receive plus HTMX POST send is sufficient and keeps infrastructure local.
- Validation files should be closed immediately after phase execution to avoid stale milestone audits.

### Key Lessons

1. Archive a milestone before starting the next one, or make the close workflow explicitly support archival from a historical commit.
2. Treat `*-VERIFICATION.md` as a required phase exit artifact, not a later audit cleanup.
3. Browser UAT remains necessary for HTMX swap/reset behavior even when handler tests are green.

### Cost Observations

- Model mix: not tracked.
- Sessions: multiple interactive GSD sessions.
- Notable: most rework came from artifact hygiene and UAT-discovered browser behavior, not from core backend design.

---

## Cross-Milestone Trends

### Process Evolution

| Milestone | Sessions | Phases | Key Change |
|-----------|----------|--------|------------|
| v2.0 | multiple | 5 | Collaboration, scheduling, and realtime work stayed inside Go + HTMX; artifact hygiene needs tighter close discipline. |

### Cumulative Quality

| Milestone | Tests | Coverage | Zero-Dep Additions |
|-----------|-------|----------|-------------------|
| v2.0 | Go handler/DB suites plus browser UAT | Strong behavior coverage; some archive artifacts deferred | Native SSE chat, server-owned sessions, Postgres-backed planning |

### Top Lessons

1. Close phase validation and verification artifacts before running milestone audit.
2. Keep milestone archival before next-milestone initialization when possible.
3. Preserve browser UAT for HTMX interaction behavior.
