docs: refresh agent/architecture docs against current code - #121
Conversation
CLAUDE.md, ARCHITECTURE.md, READMEs, and AGENTS.md files had drifted past several recent shipped changes. This commit refreshes them so an agent reading the docs sees what the code actually contains: - Document `live12_catalogue.py` and `phase2_catalogue_gates.py` (the warn-and-keep Live 12 source-catalogue gate added in #119) across CLAUDE.md, apps/backend/ARCHITECTURE.md, apps/backend/AGENTS.md, and apps/backend/README.md. Clarify how the new `data/live12_catalogue.json` differs from the prompt-injected `prompts/live12_device_catalog.json`. - Add the `data/` directory to the CLAUDE.md repo-layout map and root README; surface the recommendation-proof campaign docs (GOAL.md, NEEDS.md, RECOMMENDATION_VERDICT.md) in the doc tables and precedence order. - Document the missing operator scripts: top-level `scripts/build_live12_catalogue.py` and `apps/backend/scripts/parity_probe_synth_backends.py`. Add `evaluate_recommendations.py` and `emit_deterministic_recs.ts` to the backend AGENTS.md script list. - UI: document `RecommendationVerificationBadge`, `Phase2ConsistencyReport`, and the transcription pianoroll client/components in `apps/ui/README.md` and `apps/ui/AGENTS.md`. https://claude.ai/code/session_01KKfCTxJ3Bbadbd2naTagSb
slittycode
left a comment
There was a problem hiding this comment.
Verdict: APPROVE (posted as COMMENT — can't self-approve)
Summary
Pure documentation refresh catching 8 markdown files up to modules shipped in #117/#119/#120 and the ongoing recommendation-proof campaign. No code changes, no contract changes. The descriptions of live12_catalogue.py, phase2_catalogue_gates.py, the pianoroll client, and the verification badge are all consistent with how those modules behave and with the warn-and-keep / Phase 1 ground-truth invariants. The AGENTS.md precedence rewrite (this file → explicit CLAUDE.md) is an accuracy fix, not fluff — the old this file was ambiguous for any agent not reading AGENTS.md as the root entry point.
Findings
None.
Test results
N/A — no code changed.
Phase boundary check
Clean — docs only, no code paths introduced.
Generated by Claude Code
slittycode
left a comment
There was a problem hiding this comment.
Verdict: COMMENT
Summary
Pure documentation refresh with no code changes. All 19 file paths cited in the updated docs exist on disk. Behavioral descriptions of live12_catalogue.py (case-insensitive has_device, fuzzy_resolve), phase2_catalogue_gates.py (warn-and-keep, NEVER drops/rewrites), and their wiring order in server.py are accurate against the source. The decision to record the fuzzy-rewrite failure history inline — "an earlier path landed on the wrong EQ band and wrong A/B curve" — is useful context for anyone tempted to reintroduce it. No test coverage needed or expected.
Findings
Should fix:
CLAUDE.md — data/ is declared on the product path in the first sentence of the Repo Layout section and appears as item #1 in the numbered list that opens with "The remaining top-level directories are off-path and safe to skip." That's a contradiction: if data/ is product path, it shouldn't be in the off-path inventory. Either remove it from the numbered list and let the product-path sentence do the work, or reword the intro from "The remaining top-level directories are off-path" to something like "Top-level directories not on the request path." (This contradictory structure already existed in CLAUDE.md before this PR; the PR is propagating it correctly from the source — but since CLAUDE.md is in the diff, this is the right moment to fix it.)
Worth considering:
AGENTS.md — the precedence list now reads PURPOSE.md > CLAUDE.md > GOAL.md > per-app AGENTS.md. GOAL.md is a campaign-status doc, not an architecture or invariant doc. Placing it above per-app AGENTS.md means a campaign goal could in theory override a local app constraint. Probably fine in practice since PURPOSE.md already locks the invariants, but worth a conscious decision rather than a side-effect of making it discoverable.
Test results
N/A — pure documentation, no code touched.
Phase boundary check
N/A — no code changes.
Generated by Claude Code
The Repo Layout intro declared `data/` on the product path but then opened the numbered inventory with "The remaining top-level directories are off-path and safe to skip" — contradicting itself for `data/` (and arguably `packages/`). Reword the intro to frame the list as the full top-level layout (with product-path entries called out per item) instead of an off-path inventory. No content moves; only the framing sentence changes. Surfaced by PR #121 review. https://claude.ai/code/session_01KKfCTxJ3Bbadbd2naTagSb
Summary
CLAUDE.md,apps/backend/ARCHITECTURE.md, bothAGENTS.mdfiles, and both appREADME.mdfiles had drifted past several recent shipped changes (the Live 12 source-catalogue gate from #119, the transcription pianoroll work from #117/#120, and the recommendation-proof campaign UI badge / status docs from the GOAL.md track). An agent reading the docs would not have seen these modules, scripts, or new top-level directories.This commit catches the docs up to the code:
live12_catalogue.pyandphase2_catalogue_gates.py(the warn-and-keep Live 12 source-catalogue gate added in Live 12 catalogue + Phase 2 output validator (warn-and-keep), symusic MIDI migration #119) now appear inCLAUDE.md's Core Files list,apps/backend/ARCHITECTURE.md's component table, the Phase 2 verification section, the backendAGENTS.mdFile Map, and the backendREADME.mdtech stack / companion data section. The note clarifies how the newdata/live12_catalogue.jsondiffers from the prompt-injectedprompts/live12_device_catalog.json(runtime output validation vs. Gemini system-prompt injection).data/directory documented. Added to theCLAUDE.mdrepo-layout map (product path, not off-path) and cross-referenced from the backend README.AGENTS.mdprecedence order, andCLAUDE.md's Companion Agent Docs all now linkGOAL.md,apps/backend/NEEDS.md, andapps/backend/RECOMMENDATION_VERDICT.mdso the live north-star campaign is discoverable from the entry-point docs.scripts/build_live12_catalogue.pyandapps/backend/scripts/parity_probe_synth_backends.pyare now inCLAUDE.md's Scripts-at-a-glance. The backendAGENTS.mdscript list also gainsevaluate_recommendations.pyandemit_deterministic_recs.ts.RecommendationVerificationBadge(sub-goal 4 badge),Phase2ConsistencyReport(chain-of-custody report), and the transcription-pianoroll client + components are now inapps/ui/README.md's feature list andapps/ui/AGENTS.md's File Map.All referenced files were verified to exist at the paths cited. No code changes — pure documentation refresh.
Test plan
lssweep across all newly cited files).live12_catalogue.py,phase2_catalogue_gates.py,data/live12_catalogue.json,data/live12_catalogue.schema.json,scripts/build_live12_catalogue.py,scripts/parity_probe_synth_backends.py,RECOMMENDATION_VERDICT.md,NEEDS.md,RecommendationVerificationBadge.tsx,Phase2ConsistencyReport.tsx,TranscriptionPianoroll*.tsx,recommendationVerification.ts/.tsx,transcriptionPianorollClient.ts).https://claude.ai/code/session_01KKfCTxJ3Bbadbd2naTagSb
Generated by Claude Code