# S01: Browser Agent Site Audit

**Goal:** Produce a comprehensive Site Audit Report documenting every route, component, API endpoint, and CSS architecture pattern in the live Chrysopedia site, with integration recommendations for Phase 2.
**Demo:** After this: Site Audit Report with route map, component inventory, API surface map, and integration recommendations

## Tasks
- [x] **T01: Audited all 12 frontend routes and 22 API endpoints on live Chrysopedia site, documenting 7 discrepancies from research** — Visit all 12 frontend routes on the live Chrysopedia site (http://ub01:8096) using browser tools. For each route: confirm it renders, note any errors or visual issues, and capture key observations. Probe all public and browse API endpoints with curl to verify response shapes match the research findings. Document any discrepancies between research doc and live reality.

Steps:
1. Read S01-RESEARCH.md to load the expected route map, API surface, and component inventory
2. Navigate to each of the 12 frontend routes in the browser, confirming render and noting visual state
3. Probe all 10 public API endpoints and 5 browse endpoints with curl, checking status codes and response shape
4. Spot-check 3-5 admin/pipeline endpoints to verify they exist (may require auth — note if so)
5. Write audit findings to `.gsd/milestones/M018/slices/S01/AUDIT-FINDINGS.md` with per-route and per-endpoint observations

Key constraint: The site is at http://ub01:8096. API base is /api/v1. Admin endpoints may not be auth-gated (single-admin tool).
  - Estimate: 45m
  - Files: .gsd/milestones/M018/slices/S01/AUDIT-FINDINGS.md, .gsd/milestones/M018/slices/S01/S01-RESEARCH.md
  - Verify: test -f .gsd/milestones/M018/slices/S01/AUDIT-FINDINGS.md && grep -c '##' .gsd/milestones/M018/slices/S01/AUDIT-FINDINGS.md | grep -q '[3-9]'
- [x] **T02: Compiled 467-line Site Audit Report merging source code research with live audit findings, documenting all 12 routes, 41 API endpoints, 13 data models, CSS architecture, and 8 Phase 2 integration risks** — Compile the final Site Audit Report by merging the S01-RESEARCH.md source code analysis with the T01 AUDIT-FINDINGS.md live verification results. The report is the primary deliverable of this slice — a single markdown document that Phase 2 planning references for all implementation decisions.

Steps:
1. Read S01-RESEARCH.md and AUDIT-FINDINGS.md
2. Write SITE-AUDIT-REPORT.md with these sections:
   - Executive Summary (site overview, tech stack, scale)
   - Route Map (all 12 routes with components, render status from audit)
   - Component Inventory (shared components, hooks, utils with dependency notes)
   - API Surface Map (all endpoints grouped by domain, with methods, paths, verified response shapes)
   - Data Model (13 models with key relationships)
   - CSS Architecture (custom properties, breakpoints, naming, dead CSS risk)
   - Infrastructure Stack (Docker services, ports, volumes)
   - Phase 2 Integration Recommendations (how to add routes, endpoints, models, CSS; key risks)
   - Appendix: Audit Evidence (route screenshots summary, endpoint probe results)
3. Ensure every section is substantive — no placeholder text, no TBDs
4. Cross-reference integration recommendations with existing DECISIONS.md entries where relevant
  - Estimate: 30m
  - Files: .gsd/milestones/M018/slices/S01/SITE-AUDIT-REPORT.md
  - Verify: test -f .gsd/milestones/M018/slices/S01/SITE-AUDIT-REPORT.md && test $(wc -l < .gsd/milestones/M018/slices/S01/SITE-AUDIT-REPORT.md) -ge 300 && grep -c '^## ' .gsd/milestones/M018/slices/S01/SITE-AUDIT-REPORT.md | grep -q '[5-9]'
