Skip to content

chore: tighten repo structure — clean README, consolidate docs, untrack runtime state - #32

Merged
slittycode merged 2 commits into
mainfrom
claude/cleanup-repo-structure-AtRP4
May 13, 2026
Merged

chore: tighten repo structure — clean README, consolidate docs, untrack runtime state#32
slittycode merged 2 commits into
mainfrom
claude/cleanup-repo-structure-AtRP4

Conversation

@slittycode

Copy link
Copy Markdown
Owner

Goal

Move the repo toward a tight, scannable shape — one canonical agent guide, one README, one place for past-tense plans. No code changes; only docs, layout, and .gitignore.

Inspired by how minimal tool repos like soundscope feel — README + src/ + LICENSE and not much else at the root. ASA is a two-app monorepo so the floor is higher, but the same hygiene principles apply.

Before / After at the root

Before After
README.md (222 lines, mostly setup) README.md (~80 lines, scannable intro + doc index)
CLAUDE.md (248) CLAUDE.md (precedence chain updated)
AGENTS.md (512) AGENTS.md (thin pointer to CLAUDE.md)
CODEX.md (84) removed
OPTIMIZATION_PLAN.md (484) docs/history/optimization-plan.md
PLAN-phase1-hardening.md (592) docs/history/phase1-hardening-plan.md
ASA_System_Design.docx (42 KB binary, tracked) untracked + gitignored
.runtime/analysis_runs.sqlite3 (live runtime state, tracked!) untracked + gitignored
advisory/phase1_audit/ (8 audit/deck files) docs/history/phase1-audit/
docs/archive/ docs/history/archive/
apps/{ui,backend}/LICENSE (identical to root) removed
apps/{ui,backend}/CODEX.md removed

What's in docs/history/

A single place for past-tense docs — completed plans, one-shot audits, archived results. New docs/history/README.md calls this out explicitly so future readers don't mistake it for living documentation.

New docs/SETUP.md

Absorbs everything that was crowding README.md: bootstrap, manual venv path, Phase 2 / Gemini wiring, env var gotchas, runtime profiles, upload limits, verification commands, release-position note. README links into it.

Stale-link cleanup

References to the old docs/archive/... path updated in:

  • CHANGELOG.md
  • tests/ground_truth/README.md
  • scripts/calibrate_confidence.py (comment referencing the moved plan)

Why these choices

User-confirmed picks before the cleanup:

  • Agent docs: Keep CLAUDE.md canonical; keep AGENTS.md as a stub so tools that look for AGENTS.md by name (Codex, OpenHands) still find it. Drop CODEX.md.
  • Plan docs: Move to docs/history/ with one index README rather than deleting outright — preserve as paper trail.
  • .docx files: Untrack but keep locally via .gitignore (source-of-truth presumably lives in Drive/Notion).

Diff summary

66 files changed, 276 insertions(+), 927 deletions(-)

Net ~650 fewer lines of root-level / stale doc surface, plus one untracked sqlite that had no business being in git.

What was deliberately not touched

Per CLAUDE.md's "Recent Refactors (don't undo)" section:

  • apps/backend/ module split (analyze_core/_detection/_rhythm/_segments/_structure/_transcription)
  • apps/ui/src/services/ split into focused service files
  • Hosted runtime seams (runtime_profile.py, worker.py, artifact_storage.py, auth_context.py)

Other deliberate non-changes:

  • Per-app CHANGELOG.md kept (root note explicitly says these are imported history, not monorepo release history).
  • Per-app AGENTS.md kept as substantive app overlays (only root-level agent-doc duplication was collapsed).
  • dsp_json_override legacy field path not removed — out of scope for a doc-cleanup PR.

Verification

Cleanup is doc/layout-only, no source code touched outside comments and links. The frontend npm run verify and backend unittest discover paths are unaffected; canonical paths (scripts/dev.sh, apps/backend/scripts/bootstrap.sh, the analyze.py contract) all still resolve.

https://claude.ai/code/session_01GvD1K33Jev3vrQXRsX9WAG


Generated by Claude Code

…ck runtime state

Goal: move the repo toward a tight, scannable shape (one canonical agent
guide, one README, one place for past-tense plans). No code changes; only
docs, layout, and .gitignore.

Root-level changes:
- README.md: rewritten as a tight intro (~80 lines) — what ASA is, layout,
  quickstart, doc index. Setup detail moved to docs/SETUP.md.
- AGENTS.md: reduced to a pointer that defers to CLAUDE.md, so tools that
  look for AGENTS.md by convention (Codex, OpenHands) still find it.
- CODEX.md (root + apps/*/CODEX.md): removed; content is covered by
  CLAUDE.md + per-app AGENTS.md overlays.
- CLAUDE.md: "Companion Agent Docs" section updated to reflect the new
  precedence chain (PURPOSE.md > CLAUDE.md > per-app AGENTS.md).

Doc consolidation:
- OPTIMIZATION_PLAN.md         -> docs/history/optimization-plan.md
- PLAN-phase1-hardening.md     -> docs/history/phase1-hardening-plan.md
- advisory/phase1_audit/       -> docs/history/phase1-audit/
- docs/archive/                -> docs/history/archive/
- New docs/history/README.md explains the dir as past-tense reference only.
- New docs/SETUP.md absorbs the prior README's environment, Phase 2, and
  upload-limit detail.

Untracked binaries / runtime state:
- .runtime/analysis_runs.sqlite3 — live runtime state, accidentally committed.
- ASA_System_Design.docx        — kept locally, gitignored.
- docs/PHASE2_TRUTHFULNESS_PHASES_A_B_C.docx — kept locally, gitignored.
- .gitignore: add /.runtime/ and the two .docx paths.

Deduplication:
- apps/backend/LICENSE and apps/ui/LICENSE removed (identical to root LICENSE).

Fixed stale internal links (docs/archive → docs/history/archive) in:
- CHANGELOG.md
- tests/ground_truth/README.md
- scripts/calibrate_confidence.py

https://claude.ai/code/session_01GvD1K33Jev3vrQXRsX9WAG

@slittycode slittycode left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

Docs-only cleanup: README rewritten to ~80 lines, setup detail moved to new docs/SETUP.md, AGENTS.md reduced to a convention pointer, three CODEX.md files removed (content absorbed into CLAUDE.md + per-app AGENTS.md), historical plan/audit docs consolidated under docs/history/, and two .docx binaries and a live SQLite database untracked from git. The one non-doc change is a single comment line in scripts/calibrate_confidence.py updating a path reference. No source logic was touched.

Findings

Worth considering:
The CLAUDE.md precedence chain was corrected from PURPOSE.md > AGENTS.md chain > this file to PURPOSE.md > this file > per-app AGENTS.md. The old ordering was wrong — CLAUDE.md was listed as lower-precedence than a thin pointer doc — so this is a fix, not a regression. Just worth knowing the chain changed if any agent has it cached.

Nothing else.

Test results

Not run — no executable logic changed. The only .py file touched is a comment-only edit in a script that isn't part of the backend test suite.

Phase boundary check

Clean. No source files in apps/ modified.


Generated by Claude Code

…ot README

The previous commit moved operator-facing upload-limit details from the
root README into the new docs/SETUP.md (the canonical setup doc that the
slimmed README links to). test_docs_reference_generator_and_current_contract_values
in test_upload_limits.py asserted those strings still live in the root
README, so backend CI failed.

The contract the test is actually guarding — "the upload limit values
and the generator command are documented somewhere visible and operator-
facing" — is preserved; only the file containing them moved. Updated the
test to read docs/SETUP.md for the two strings that were relocated:

- "./venv/bin/python scripts/render_upload_limit_contract.py"
- f"{MAX_UPLOAD_SIZE_BYTES // (1024 * 1024)} MiB"  (i.e. "100 MiB")

Backend README and apps/backend/ARCHITECTURE.md assertions unchanged
(those docs were not touched in the cleanup).

https://claude.ai/code/session_01GvD1K33Jev3vrQXRsX9WAG
@slittycode
slittycode merged commit f520f92 into main May 13, 2026
2 checks passed
@slittycode
slittycode deleted the claude/cleanup-repo-structure-AtRP4 branch May 13, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants