Skip to content

docs: close architecture.md coverage gaps + de-link CLAUDE.md from user docs - #138

Merged
kfox merged 1 commit into
mainfrom
docs/architecture-coverage-gaps
Jul 20, 2026
Merged

docs: close architecture.md coverage gaps + de-link CLAUDE.md from user docs#138
kfox merged 1 commit into
mainfrom
docs/architecture-coverage-gaps

Conversation

@kfox

@kfox kfox commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Audit of docs/architecture.md against the current tree, plus the follow-on fixes.

What the audit found

Symbol-level accuracy was already good: of the 1,185 backticked identifiers in the doc, exactly one didn't resolve against the codebase. The real drift was coverage — 30 ### sections for 72 modules, with several substantial subsystems documented nowhere.

Corrections

  • api.format_dma_latency() doesn't exist; the method is api.format_write_latency().
  • Two code comments pointed at CLAUDE.md sections that were never written — dsp.py's "see CLAUDE.md [dsp]" and config.py's "See CLAUDE.md ensemble coordination". Both now point somewhere real.

New sections

  • dsp.py — the 4-bit DAC's pre-emphasis → AGC → expander → compressor → limiter chain: why that order is load-bearing, the streaming-continuity invariant every processor must preserve (and why AGC smooths per-sample to keep it), and AGC's measured level-vs-VAD limitation.
  • orchestrator.py + orchestrators/ — the conductor/follower broadcast protocol behind orchestrate = true: registry resolution, why the events live on Ensemble rather than the orchestrator, the follower-role guards in Playlist._safe_setup/_safe_teardown, and BigTextSpan's publish-before-begin() ordering.

Tree completion

The CLAUDE.md module tree was missing 16 files, including the entire TeensyROM backend (teensyrom_api.py, teensyrom_dma.py), backend.py, and doctor.py — the largest module in the tree.

CLAUDE.md is no longer suggested to humans

CLAUDE.md is AI-facing project instructions. README.md, docs/*.md, the asset READMEs, code comments, and codecov.yml previously linked to it as a human reference; they now point at docs/architecture.md, docs/usage.md, or the source. docs/architecture.md no longer opens by describing itself as a companion to CLAUDE.md — it stands on its own.

Verification

  • make lint, make typecheck (mypy --strict + pyright), make test (2633 tests) all pass.
  • Re-ran the audit script: tree coverage complete, no CLAUDE.md references remain outside CLAUDE.md itself, all 1,237 doc identifiers resolve, and every relative link across the human-facing docs resolves.

Docs only — no behavior change, no hardware testing needed.

…er docs

Audited docs/architecture.md against the tree. Symbol-level accuracy was
good (1 of 1185 backticked identifiers was wrong); the drift was coverage.

Corrections:
* api.format_dma_latency() -> api.format_write_latency(), the real method.
* Two code comments pointed at CLAUDE.md sections that were never written
  (dsp.py's "[dsp]" and config.py's "ensemble coordination").

New architecture.md sections for two undocumented subsystems:
* dsp.py — the 4-bit DAC's pre-emphasis/AGC/expander/compressor/limiter
  chain: why the order is load-bearing, the streaming-continuity
  invariant, and AGC's measured level-vs-VAD limitation.
* orchestrator.py + orchestrators/ — the conductor/follower broadcast
  protocol behind `orchestrate = true`, incl. the follower-role guards in
  Playlist._safe_setup and BigTextSpan's publish-before-begin ordering.

Completed the CLAUDE.md module tree, which was missing 16 files
(backend.py, teensyrom_*.py, doctor.py, dsp.py, ensemble.py,
orchestrator.py + orchestrators/, dither.py, camera.py, profiler.py,
rolling_palette.py, audio_marker.py, overlays/menu.py, and helpers).

CLAUDE.md is AI-facing project instructions, so it is no longer offered
to humans as a reference: README.md, docs/*.md, the asset READMEs, code
comments, and codecov.yml now point at docs/architecture.md,
docs/usage.md, or the source, and architecture.md stands on its own.
@kfox
kfox merged commit 9dfc8f7 into main Jul 20, 2026
7 checks passed
@kfox
kfox deleted the docs/architecture-coverage-gaps branch July 20, 2026 00:52
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.

1 participant