docs: sync architecture docs with current code - #48
Conversation
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
slittycode
left a comment
There was a problem hiding this comment.
Verdict: COMMENT
Summary
Docs-only sync audit bringing six shipped modules (url_ingest, csv_export, stage_status, dsp_bandbank/dsp_utils, phase1_evaluation, and the Phase 3 sample stack) into the file maps, and moving audition samples from "In Progress" to "Shipped". All referenced files exist on disk. Content is accurate with one exception noted below.
Findings
Worth considering
apps/ui/AGENTS.md:94 — the updated File Map entry reads:
types.tsis a barrel re-export of./types/{measurement,interpretation,backend,samples}.ts
But apps/ui/src/types/index.ts only exports from measurement, interpretation, and backend. samples.ts exists in that directory but is not included in the barrel. CLAUDE.md (untouched by this PR) gets this right — it lists only the three that are actually re-exported. The AGENTS.md line should drop samples from the list, or a sentence should be added noting that samples.ts is accessed directly rather than via the barrel.
The dead-code note about symbolic_extract.py in the PR description is accurate — file exists, imports non-existent symbols.
Test results
Docs-only; no tests to run.
Phase boundary check
Clean — no code changes.
Generated by Claude Code
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
slittycode
left a comment
There was a problem hiding this comment.
Verdict: APPROVE (posted as COMMENT — can't approve own PR)
Summary
Docs-only sync of CLAUDE.md, ARCHITECTURE.md, AGENTS.md, README files, BACKLOG.md, and SAMPLE_GENERATION.md to reflect six backend modules and one frontend feature that shipped since the last doc refresh. No code changes. Every factual claim verified against the actual codebase: all 13 newly-documented backend files and 3 frontend files exist, SSRF guard in url_ingest.py is real, types/samples.ts is correctly described as outside the barrel, route lists match server.py.
Findings
Worth considering (not blocking):
The docs say "Routes are organized into server_samples.py" (mirroring the pre-existing description of server_phase1.py etc.), but all @app.post/@app.get decorators actually live in server.py; the server_*.py modules are business-logic helpers. server_samples.py's own docstring confirms this: "The thin wrappers live in server.py to match the existing house style." This inaccuracy predates this PR and is being propagated consistently — not a new regression. Fix all server modules at once if it ever matters.
Dead code note in PR description is accurate. symbolic_extract.py imports BasicPitchBackend, separate_stems, and analyze_transcription from analyze — none of those symbols exist anymore — and nothing else in the backend references it. Sensible to leave deletion for a separate focused PR.
Test results
N/A — docs-only.
Phase boundary check
Clean.
Generated by Claude Code
Summary
Audited the repo's documentation against the current code architecture. Several features shipped after the last doc refresh (PR #38) but weren't reflected in the canonical docs:
sample_*.py,server_samples.py,SamplePlayback.tsx,POST/GET .../samples) — shipped in feat(samples): Phase 3 audition — heuristic WAV/MIDI from Phase 1 + PyTheory #45/test(samples): end-to-end audio-content assertions for audition output #46, still listed as "In Progress" on a feature branch.url_ingest.py), CSV export (csv_export.py),publicStatuscollapse (stage_status.py),BatchedBandpass(dsp_bandbank.py), shareddsp_utils.py, and the offlinephase1_evaluation.pyharness — none appeared in the backend file maps.Changes
CLAUDE.md— added the missing backend core-file entries (11–16); noted samples generation is on-demand, not a queue stage; updated the Backport Candidates note.BACKLOG.md— moved audition samples from "In Progress" (stale branch reference) to a "Shipped — Phase 3 Audition" section.apps/backend/ARCHITECTURE.md— added Components rows and the/samplesroute to the custom-routes list.apps/backend/AGENTS.md+README.md— extended the File Map / route list / tech stack.apps/ui/AGENTS.md+README.md— corrected the File Map to markanalysisRunsClient.tsas canonical transport andbackendPhase1Client.tsas legacy; noted the audition-sample panel.docs/SAMPLE_GENERATION.md— status line updated from "Prototype on branch" to "Shipped onmain".docs/history/README.md— added the torchfx library review to the contents index.Docs-only; no code changes.
Note for reviewer
apps/backend/symbolic_extract.pyis dead code — it importsBasicPitchBackend/separate_stems/analyze_transcriptionfromanalyze, none of which exist after the Basic Pitch removal, and nothing references the module. Left untouched here since this PR is docs-only, but it's a candidate for deletion.Test plan
server.pyhttps://claude.ai/code/session_01MajhpbrcKaAoZiuCqwFDH8
Generated by Claude Code