From d5be3bd62cd75186e18cf0eec753c3fcec38319f Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 14 May 2026 20:41:08 +0000 Subject: [PATCH 1/2] docs: sync architecture docs with current code Phase 3 audition samples, URL ingestion, CSV export, publicStatus, and the shared DSP primitives shipped after the last doc refresh (#38) but weren't reflected in the canonical docs. Update CLAUDE.md, the backend ARCHITECTURE.md / AGENTS.md / README.md, the frontend AGENTS.md / README.md, BACKLOG.md, and the docs/ index so the file maps, route lists, and module inventories match the tree. https://claude.ai/code/session_01MajhpbrcKaAoZiuCqwFDH8 --- BACKLOG.md | 6 +++--- CLAUDE.md | 12 ++++++++++-- apps/backend/AGENTS.md | 8 +++++++- apps/backend/ARCHITECTURE.md | 9 ++++++++- apps/backend/README.md | 13 +++++++++++-- apps/ui/AGENTS.md | 9 +++++---- apps/ui/README.md | 6 +++++- docs/SAMPLE_GENERATION.md | 2 +- docs/history/README.md | 1 + 9 files changed, 51 insertions(+), 15 deletions(-) diff --git a/BACKLOG.md b/BACKLOG.md index 4ae1389a..92a993da 100644 --- a/BACKLOG.md +++ b/BACKLOG.md @@ -28,8 +28,8 @@ All eight detectors emit fields visible in [`apps/backend/tests/test_analyze.py` - ✅ `timeSignatureSource` / `timeSignatureConfidence` — surfaced through HTTP `phase1` via `server.py`. - ✅ Vibrato display follow-up — `melodyDetail.vibratoExtent` is labeled in cents and present-branch sub-1% confidence renders as `< 1%` rather than `VIBRATO: PRESENT … 0%`. +## Shipped — Phase 3 Audition +- ✅ **Audition samples.** Heuristic WAV/MIDI clips derived from Phase 1 measurements (and Phase 2 context when available) so producers can ear-check the measurement chain. PyTheory generates the musical plan, FluidSynth (with sine-additive fallback) renders audio, NumPy synthesizes drum one-shots, manifest carries citations. **Landed:** [`apps/backend/sample_generation.py`](apps/backend/sample_generation.py), [`sample_theory.py`](apps/backend/sample_theory.py), [`sample_synthesis.py`](apps/backend/sample_synthesis.py), [`sample_drums.py`](apps/backend/sample_drums.py), [`server_samples.py`](apps/backend/server_samples.py); UI [`SamplePlayback.tsx`](apps/ui/src/components/SamplePlayback.tsx) + [`sampleGenerationClient.ts`](apps/ui/src/services/sampleGenerationClient.ts). On-demand endpoints `POST/GET /api/analysis-runs/{run_id}/samples` (not part of the staged-execution queue). Design doc: [`docs/SAMPLE_GENERATION.md`](docs/SAMPLE_GENERATION.md). Adjacent to `patchSmith.ts` but solves a different problem — audition validates the measurements rather than producing a saveable preset. + ## Open - 🔲 `services/patchSmith.ts` — generates Vital/Operator patch parameters from detected features. Slot: Phase 3 (not yet built); unique differentiator (download-ready preset output). Evaluate against `PURPOSE.md` decision framework before scheduling. - -## In Progress -- 🟡 **Audition samples (Phase 3 — branch `claude/gemini-sample-generation-U753E`).** Heuristic WAV/MIDI clips derived from Phase 1 measurements (and Phase 2 context when available) so producers can ear-check the measurement chain. PyTheory generates the musical plan, FluidSynth (with sine-additive fallback) renders audio, NumPy synthesizes drum one-shots, manifest carries citations. Design doc: [`docs/SAMPLE_GENERATION.md`](docs/SAMPLE_GENERATION.md). Endpoints: `POST/GET /api/analysis-runs/{run_id}/samples`. Adjacent to `patchSmith.ts` but solves a different problem — audition validates the measurements rather than producing a saveable preset. diff --git a/CLAUDE.md b/CLAUDE.md index f4062d8c..e1d958d8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -112,6 +112,8 @@ The backend supports staged execution via `analysis_runtime.py`, which persists Run-oriented endpoints (`/api/analysis-runs*`) are the canonical interface for staged execution. Legacy `POST /api/analyze`, `POST /api/analyze/estimate`, and `POST /api/phase2` remain only as temporary compatibility wrappers — do not build new functionality on them. +Phase 3 audition-sample generation (`POST/GET /api/analysis-runs/{run_id}/samples`) is **on-demand**, not a queue stage — the UI explicitly requests it after interpretation completes. See `server_samples.py` and the `sample_*.py` modules. + Frontend polling: `src/services/analysisRunsClient.ts` creates runs and polls stage snapshots. `src/services/analyzer.ts` orchestrates the create-run + poll loop and projects display payloads. ### Runtime Profiles @@ -129,7 +131,7 @@ Artifact access goes through `artifact_storage.py` rather than direct disk paths 1. **`analyze.py`**: Pure DSP pipeline entry point. Runs as a subprocess invoked by `server.py`. Coordinates the split feature modules below. **Writes JSON to stdout, diagnostics to stderr** — this contract is load-bearing. 2. **`analyze_core.py`, `analyze_audio_io.py`, `analyze_detection.py`, `analyze_estimate.py`, `analyze_rhythm.py`, `analyze_segments.py`, `analyze_structure.py`, `analyze_transcription.py`, `analyze_fast.py`**: Feature modules. Loadouts: BPM/key/LUFS/stereo/spectral balance, rhythm/melody detail, segment boundaries, transcription. `analyze_fast.py` is the streamlined pipeline used by `--fast`. -3. **`server.py`**: FastAPI app and router composition. Routes are organized into `server_phase1.py`, `server_phase2.py`, `server_upload.py`. Handles multipart uploads, invokes `analyze.py` (or worker), normalizes raw output into the `phase1` HTTP contract. +3. **`server.py`**: FastAPI app and router composition. Routes are organized into `server_phase1.py`, `server_phase2.py`, `server_upload.py`, `server_samples.py`. Handles multipart uploads, invokes `analyze.py` (or worker), normalizes raw output into the `phase1` HTTP contract. 4. **`analysis_runtime.py`**: SQLite-backed run state and stage queue management. Run state in `.runtime/analysis_runs.sqlite3`; artifacts in `.runtime/artifacts/`. 5. **`worker.py`**: Dedicated worker-process entry point for hosted-style background stage execution. In `local` profile, work runs in-process; in `hosted` profile, this is the worker role. 6. **`runtime_profile.py`**: Switchboard for `local` vs `hosted` profile and `all` vs `api` vs `worker` process roles (env: `SONIC_ANALYZER_RUNTIME_PROFILE`, `SONIC_ANALYZER_PROCESS_ROLE`). @@ -137,6 +139,12 @@ Artifact access goes through `artifact_storage.py` rather than direct disk paths 8. **`auth_context.py`**: Hosted-mode user-context resolution and ownership checks on canonical run routes. 9. **`upload_limits.py`**: Canonical 100 MiB raw-audio / 101 MiB request-envelope limits. Regenerate the operator contract via `scripts/render_upload_limit_contract.py` if numbers change. 10. **`spectral_viz.py`**: Librosa-based spectrogram/time-series artifacts. Called after measurement; failures are non-critical. +11. **`url_ingest.py`**: SSRF-guarded URL-mode ingestion for `POST /api/analysis-runs` — fetches a public `http`/`https` audio URL and feeds it through the same downstream pipeline as a multipart upload. +12. **`csv_export.py`**: CSV exporters for Phase 1 time-series fields, backing `GET /api/analysis-runs/{run_id}/export/csv/{field_path}`. Keeps the route handler a thin lookup-and-serve. +13. **`stage_status.py`**: Collapses the eight internal stage statuses into the additive client-facing `publicStatus` field on every stage snapshot. +14. **`server_samples.py` + `sample_generation.py`, `sample_theory.py`, `sample_synthesis.py`, `sample_drums.py`**: Phase 3 audition-sample generation. `sample_theory.py` builds the PyTheory musical plan, `sample_synthesis.py` renders audio (FluidSynth with sine-additive fallback), `sample_drums.py` synthesizes drum one-shots, `sample_generation.py` orchestrates and emits the citation manifest. On-demand only. +15. **`dsp_bandbank.py` + `dsp_utils.py`**: Shared DSP primitives — `BatchedBandpass` (4th-order Butterworth bandpass bank) and cross-module utility functions. +16. **`phase1_evaluation.py` + `phase1_report_html.py`, `polyphonic_evaluation.py`**: Offline evaluation harnesses (deterministic-metric / detector-stability reporting and research-only polyphonic transcription). Not on the product path; driven by `scripts/evaluate_*.py`. The subprocess isolation means `analyze.py` works as a standalone CLI. Check `apps/backend/JSON_SCHEMA.md` before adding new analyzer output fields. Check `apps/backend/ARCHITECTURE.md` for the full HTTP flow and contract details. @@ -236,7 +244,7 @@ A quick map from intent to the right place to start: ## Backport Candidates -Most of the original `sonic-architect-app` port (genre profiles, Ableton device mappings, mix doctor, eight detectors) is **shipped**. The remaining open item in [`BACKLOG.md`](BACKLOG.md) is `patchSmith.ts` (Phase 3 synth-patch generation). Consult `BACKLOG.md` before re-implementing genre detection, mix analysis, acid/reverb/vocal/supersaw/bass/kick detection — they're already in [`apps/backend/analyze_detection.py`](apps/backend/analyze_detection.py) and emit fields visible in `EXPECTED_TOP_LEVEL_KEYS`. +Most of the original `sonic-architect-app` port (genre profiles, Ableton device mappings, mix doctor, eight detectors) is **shipped**, as is Phase 3 audition-sample generation. The remaining open item in [`BACKLOG.md`](BACKLOG.md) is `patchSmith.ts` (Phase 3 synth-patch generation — distinct from audition samples, which validate measurements rather than producing a saveable preset). Consult `BACKLOG.md` before re-implementing genre detection, mix analysis, acid/reverb/vocal/supersaw/bass/kick detection — they're already in [`apps/backend/analyze_detection.py`](apps/backend/analyze_detection.py) and emit fields visible in `EXPECTED_TOP_LEVEL_KEYS`. ## Companion Agent Docs diff --git a/apps/backend/AGENTS.md b/apps/backend/AGENTS.md index 4ae460d4..871fcbd9 100644 --- a/apps/backend/AGENTS.md +++ b/apps/backend/AGENTS.md @@ -108,11 +108,17 @@ python3.11 -m venv venv - `analyze.py`: CLI entry point. Coordinates the split `analyze_*.py` feature modules and emits the raw JSON. - `analyze_core.py`, `analyze_audio_io.py`, `analyze_detection.py`, `analyze_estimate.py`, `analyze_rhythm.py`, `analyze_segments.py`, `analyze_structure.py`, `analyze_transcription.py`, `analyze_fast.py`: Feature modules (BPM/key/LUFS/stereo, rhythm/melody/groove, segments, structure, transcription, the `--fast` pipeline). Split from the original monolith in commit `5c40dd44` — keep the split when adding features. -- `server.py` + `server_phase1.py`, `server_phase2.py`, `server_upload.py`: FastAPI app + route modules. Multipart upload handling, subprocess execution, envelope normalization. +- `server.py` + `server_phase1.py`, `server_phase2.py`, `server_upload.py`, `server_samples.py`: FastAPI app + route modules. Multipart/URL upload handling, subprocess execution, envelope normalization, and the on-demand Phase 3 audition-sample routes. - `analysis_runtime.py`: SQLite-backed run state, stage queue, artifact metadata. - `worker.py`, `runtime_profile.py`, `auth_context.py`, `artifact_storage.py`: Hosted-mode foundation. Local mode shouldn't branch through these unless it has to. - `upload_limits.py`: Canonical 100 MiB raw-audio / 101 MiB request-envelope limits. Operator contract is generated, not hand-edited. +- `url_ingest.py`: SSRF-guarded URL-mode ingestion for `POST /api/analysis-runs`. +- `csv_export.py`: CSV exporters for Phase 1 time-series fields; backs `GET /api/analysis-runs/{run_id}/export/csv/{field_path}`. +- `stage_status.py`: Collapses the eight internal stage statuses into the additive client-facing `publicStatus` field. +- `sample_generation.py`, `sample_theory.py`, `sample_synthesis.py`, `sample_drums.py`: Phase 3 audition-sample generation — PyTheory plan, FluidSynth/sine-additive render, NumPy drum one-shots, citation manifest. On-demand only. +- `dsp_bandbank.py`, `dsp_utils.py`: Shared DSP primitives — `BatchedBandpass` Butterworth bank and cross-module utilities. - `spectral_viz.py`: Librosa spectrogram and spectral time-series artifacts. Non-critical — failures don't break a run. +- `phase1_evaluation.py` + `phase1_report_html.py`: Offline Phase 1 evaluation harness and HTML render. Not on the product path; driven by `scripts/evaluate_phase1.py`. - `polyphonic_evaluation.py` + `scripts/evaluate_polyphonic.py`: **Research-only.** Offline polyphonic-transcription evaluation harness, not part of the shipped product path. - `tests/test_server.py`: OpenAPI and envelope contract tests. - `tests/test_analyze.py`: generated WAV fixture, `EXPECTED_TOP_LEVEL_KEYS` snapshot, raw payload assertions. diff --git a/apps/backend/ARCHITECTURE.md b/apps/backend/ARCHITECTURE.md index 8c1c06c4..b0028d87 100644 --- a/apps/backend/ARCHITECTURE.md +++ b/apps/backend/ARCHITECTURE.md @@ -5,7 +5,7 @@ | Component | Role | | --- | --- | | `analyze.py` | Raw CLI analyzer entry point. Loads audio, coordinates the `analyze_*.py` feature modules (see [Analyzer Submodules](#analyzer-submodules) below), optionally separates stems and transcribes notes through torchcrepe, then prints JSON to `stdout`. | -| `server.py` + `server_phase1.py` / `server_phase2.py` / `server_upload.py` | FastAPI app and router composition. Accepts uploads, computes estimates, manages the canonical staged run API, normalizes measurement results, and serves artifact access. | +| `server.py` + `server_phase1.py` / `server_phase2.py` / `server_upload.py` / `server_samples.py` | FastAPI app and router composition. Accepts uploads, computes estimates, manages the canonical staged run API, normalizes measurement results, serves artifact access, and exposes the on-demand Phase 3 audition-sample routes. | | `analysis_runtime.py` | Run-state persistence and staged-analysis orchestration. Owns run snapshots, stage status, artifact metadata, and ownership checks. | | `artifact_storage.py` | Artifact storage boundary. The current implementation uses the local filesystem, but the runtime now talks to a storage service interface instead of assuming every artifact is a local disk path forever. | | `runtime_profile.py` | Runtime/profile switchboard for `local` vs `hosted` behavior and `all` vs `api` vs `worker` process roles. | @@ -13,6 +13,12 @@ | `worker.py` | Dedicated worker-process entry point for hosted-style background stage execution. | | `upload_limits.py` | Canonical raw-audio (100 MiB) and request-envelope (101 MiB) limits, plus the protected-route list. Operator contract is generated, not hand-edited — see `scripts/render_upload_limit_contract.py`. | | `spectral_viz.py` | Librosa-based spectrogram generation and spectral time-series extraction. Produces mel/chroma PNG spectrograms and per-frame spectral evolution JSON. Called after successful measurement; failures are non-critical. | +| `url_ingest.py` | SSRF-guarded URL-mode ingestion for `POST /api/analysis-runs`. Fetches a public `http`/`https` audio file and feeds the bytes through the same downstream pipeline as a multipart upload. | +| `csv_export.py` | CSV exporters for Phase 1 time-series fields, keyed by dotted JSON path. Backs `GET /api/analysis-runs/{run_id}/export/csv/{field_path}` and keeps the route handler a thin lookup-and-serve. | +| `stage_status.py` | Collapses the eight internal stage statuses into the additive client-facing `publicStatus` field carried on every stage in the run snapshot. | +| `server_samples.py` + `sample_generation.py` / `sample_theory.py` / `sample_synthesis.py` / `sample_drums.py` | Phase 3 audition-sample generation. PyTheory musical plan, FluidSynth (sine-additive fallback) audio render, NumPy drum one-shots, and a citation manifest tying every clip back to a Phase 1 field. On-demand only — not part of the staged-execution queue. See [`docs/SAMPLE_GENERATION.md`](../../docs/SAMPLE_GENERATION.md). | +| `dsp_bandbank.py` + `dsp_utils.py` | Shared DSP primitives: `BatchedBandpass` (4th-order Butterworth bandpass bank with zero-phase `filtfilt`) and cross-module utility functions. | +| `phase1_evaluation.py` + `phase1_report_html.py` | Offline Phase 1 evaluation harness — deterministic-metric and detector-stability reporting, with a standalone HTML render. Not on the product path; driven by `scripts/evaluate_phase1.py`. | | `polyphonic_evaluation.py` + `scripts/evaluate_polyphonic.py` | Research-only offline polyphonic-transcription evaluation harness. Not on the product path. | | `tests/test_server.py` | Contract tests for estimate, timeout, and success envelopes. | | `tests/test_analyze.py` | Structural snapshot tests for the raw analyzer JSON output. Owns `EXPECTED_TOP_LEVEL_KEYS` — update it whenever you add a root field. | @@ -77,6 +83,7 @@ Custom routes: - `POST /api/analysis-runs/{run_id}/spectral-enhancements/{kind}` — on-demand spectral artifacts. `kind` is one of `cqt`, `hpss`, `onset`, `chroma_interactive`, or `reassigned` (sharper transient/frequency localization via `librosa.reassigned_spectrogram`). - `POST /api/analysis-runs/{run_id}/pitch-note-translations` - `POST /api/analysis-runs/{run_id}/interpretations` +- `POST /api/analysis-runs/{run_id}/samples` and `GET /api/analysis-runs/{run_id}/samples` — on-demand Phase 3 audition-sample generation and retrieval. Nothing in the staged-execution loop runs these automatically; the UI POSTs after interpretation completes. See [`server_samples.py`](server_samples.py) and [`docs/SAMPLE_GENERATION.md`](../../docs/SAMPLE_GENERATION.md). - `POST /api/analyze` (legacy compatibility) - `POST /api/analyze/estimate` (legacy compatibility) - `POST /api/phase2` (legacy compatibility) diff --git a/apps/backend/README.md b/apps/backend/README.md index 34b77433..016bb6eb 100644 --- a/apps/backend/README.md +++ b/apps/backend/README.md @@ -16,9 +16,16 @@ This repo contains two entry points: Canonical live-analysis routes: - `POST /api/analysis-runs/estimate` -- `POST /api/analysis-runs` +- `POST /api/analysis-runs` — multipart upload or SSRF-guarded URL ingestion - `GET /api/analysis-runs/{run_id}` +- `DELETE /api/analysis-runs/{run_id}` — owner delete; operator `X-Admin-Key` bypass when `SONIC_ANALYZER_ADMIN_KEY` is set - `GET /api/analysis-runs/{run_id}/artifacts...` +- `GET /api/analysis-runs/{run_id}/source-audio` +- `GET /api/analysis-runs/{run_id}/export/csv/{field_path}` +- `POST /api/analysis-runs/{run_id}/spectral-enhancements/{kind}` +- `POST /api/analysis-runs/{run_id}/pitch-note-translations` +- `POST /api/analysis-runs/{run_id}/interpretations` +- `POST /api/analysis-runs/{run_id}/samples` and `GET /api/analysis-runs/{run_id}/samples` — on-demand Phase 3 audition samples Legacy compatibility routes: @@ -34,7 +41,9 @@ FastAPI also serves the usual generated endpoints at `/openapi.json`, `/docs`, a - NumPy - Demucs - torchcrepe (pitch/note translation) -- mido +- librosa (spectrogram / spectral time-series artifacts) +- mido / pretty_midi +- pytheory + pyfluidsynth (Phase 3 audition-sample generation) - FastAPI - Uvicorn diff --git a/apps/ui/AGENTS.md b/apps/ui/AGENTS.md index 31a1c17f..d9eb5533 100644 --- a/apps/ui/AGENTS.md +++ b/apps/ui/AGENTS.md @@ -10,7 +10,7 @@ ## Working Style For Agents - Prefer small, reviewable edits over broad UI rewrites. -- Preserve the backend contract enforced by `src/services/backendPhase1Client.ts` and `src/types.ts`. +- Preserve the backend contract enforced by `src/services/analysisRunsClient.ts` (canonical), `src/services/backendPhase1Client.ts` (legacy wrappers), and `src/types.ts`. - Read `README.md` before changing scripts, env handling, smoke tests, or backend integration behavior. - Read `../../docs/ARCHITECTURE_STRATEGY.md` before proposing changes to the Session Musician panel, transcription display, or the Layer 1/2/3 UI structure. The strategy doc explains the two-path transcription design (local MIDI vs Gemini description) and what each layer is responsible for. - Keep bundle-size-sensitive patterns in place unless there is a clear reason to change them. @@ -88,9 +88,10 @@ RUN_GEMINI_LIVE_SMOKE=true VITE_ENABLE_PHASE2_GEMINI=true GEMINI_API_KEY=your_ke ## File Map - `src/App.tsx`: upload flow, estimate flow, phase orchestration, diagnostic log state. -- `src/services/backendPhase1Client.ts`: backend transport, parsing, timeout handling, error mapping. -- `src/services/analyzer.ts`: phase orchestration and Gemini entry. -- `src/types.ts`: shared frontend contract types. +- `src/services/analysisRunsClient.ts`: canonical transport — creates runs against `/api/analysis-runs`, polls stage snapshots, fetches pitch/note translations and interpretations. +- `src/services/backendPhase1Client.ts`: legacy multipart transport (typed errors, `AbortController` timeouts). Kept only for the compatibility wrappers; new flows go through `analysisRunsClient.ts`. +- `src/services/analyzer.ts`: phase orchestration — sequences run creation, polling, and display payload projection. +- `src/types.ts` + `src/types/`: shared frontend contract types. `types.ts` is a barrel re-export of `./types/{measurement,interpretation,backend,samples}.ts`. - `src/index.css`: Tailwind theme tokens and visual language. - `tests/services/*`: unit and service tests. - `tests/smoke/*`: smoke and live smoke coverage. diff --git a/apps/ui/README.md b/apps/ui/README.md index 1f74a927..fc851cd1 100644 --- a/apps/ui/README.md +++ b/apps/ui/README.md @@ -24,6 +24,7 @@ The app uploads a track to the local DSP backend, shows the estimate and executi - quantize grid and swing controls - browser preview and `.mid` download - JSON export and markdown report export +- Phase 3 audition-sample playback panel — on-demand heuristic WAV/MIDI clips with citation metadata, requested after interpretation completes - collapsible diagnostic log with request IDs, durations, estimate ranges, and backend or Gemini status - semantic theme token system for status colors and surface backgrounds - mobile-responsive layouts across header, results grid, and upload flow @@ -139,7 +140,10 @@ Legacy note: ## Backend Contract Used by the UI -The app talks to two backend routes. +The two routes below drive the core upload-and-analyze flow. The app also calls +the canonical run sub-resources — artifacts, source audio, CSV export, spectral +enhancements, pitch/note translations, interpretations, and on-demand audition +samples — through `src/services/analysisRunsClient.ts` and its sibling clients. ### `POST /api/analysis-runs/estimate` diff --git a/docs/SAMPLE_GENERATION.md b/docs/SAMPLE_GENERATION.md index 4bdfb4dc..2331f93a 100644 --- a/docs/SAMPLE_GENERATION.md +++ b/docs/SAMPLE_GENERATION.md @@ -1,6 +1,6 @@ # Sample Generation (Phase 3 — Audition) -> **Status:** Prototype on `claude/gemini-sample-generation-U753E`. Not yet promoted to a mandatory pipeline stage. +> **Status:** Shipped on `main` as an on-demand feature (`POST/GET /api/analysis-runs/{run_id}/samples`). Not part of the staged-execution queue — the UI requests it explicitly after interpretation completes. > **Mission fit:** Improves the user's ability to *act on* Phase 2 results by producing audible reference clips they can A/B against the source track. ## Why This Exists diff --git a/docs/history/README.md b/docs/history/README.md index d18167fd..6e91375c 100644 --- a/docs/history/README.md +++ b/docs/history/README.md @@ -14,5 +14,6 @@ Everything in this directory is past-tense. Treat it as a paper trail, not a sou - `optimization-plan.md` — completed optimization workstream. - `phase1-hardening-plan.md` — completed Phase 1 hardening plan. +- `library-review-torchfx-2026-05-13.md` — one-shot library evaluation of torchfx against ASA's DSP path. - `phase1-audit/` — one-shot advisory deliverable: audit, decks, evidence index, visual story pack. - `archive/` — older archived plans and result stubs. From 22b26ada1e21d3060acab81234736ab438c1659c Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 14 May 2026 20:43:09 +0000 Subject: [PATCH 2/2] docs: correct types barrel re-export list in apps/ui/AGENTS.md src/types.ts re-exports only measurement, interpretation, and backend. samples.ts is imported directly, not through the barrel. https://claude.ai/code/session_01MajhpbrcKaAoZiuCqwFDH8 --- apps/ui/AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/ui/AGENTS.md b/apps/ui/AGENTS.md index d9eb5533..1dbce3c9 100644 --- a/apps/ui/AGENTS.md +++ b/apps/ui/AGENTS.md @@ -91,7 +91,7 @@ RUN_GEMINI_LIVE_SMOKE=true VITE_ENABLE_PHASE2_GEMINI=true GEMINI_API_KEY=your_ke - `src/services/analysisRunsClient.ts`: canonical transport — creates runs against `/api/analysis-runs`, polls stage snapshots, fetches pitch/note translations and interpretations. - `src/services/backendPhase1Client.ts`: legacy multipart transport (typed errors, `AbortController` timeouts). Kept only for the compatibility wrappers; new flows go through `analysisRunsClient.ts`. - `src/services/analyzer.ts`: phase orchestration — sequences run creation, polling, and display payload projection. -- `src/types.ts` + `src/types/`: shared frontend contract types. `types.ts` is a barrel re-export of `./types/{measurement,interpretation,backend,samples}.ts`. +- `src/types.ts` + `src/types/`: shared frontend contract types. `types.ts` is a barrel re-export of `./types/{measurement,interpretation,backend}.ts`; `./types/samples.ts` exists but is imported directly, not through the barrel. - `src/index.css`: Tailwind theme tokens and visual language. - `tests/services/*`: unit and service tests. - `tests/smoke/*`: smoke and live smoke coverage.