Skip to content

docs: split architecture.md by topic + fix stray-tilde strikethrough - #141

Merged
kfox merged 1 commit into
mainfrom
docs/split-architecture-reference
Jul 20, 2026
Merged

docs: split architecture.md by topic + fix stray-tilde strikethrough#141
kfox merged 1 commit into
mainfrom
docs/split-architecture-reference

Conversation

@kfox

@kfox kfox commented Jul 20, 2026

Copy link
Copy Markdown
Owner

architecture.md had grown to 250 KB in a single file, with 15 paragraphs over 2,500 characters — the worst a single 14,228-character bullet cataloguing every generator. This splits it into eight topic files under docs/architecture/ and restructures the prose, preserving all content.

The routing index

docs/architecture.md becomes an index: a topic list plus an alphabetical module table.

That shape is deliberate. Roughly 30 source docstrings refer to "the <module>.py section of docs/architecture.md" as prose, so the index keeps every one of those landing correctly with no code changes.

Topic file Modules
hardware-io.md api.py, teensyrom_dma.py, BASIC startup
audio.md audio.py, sampler.py, dsp.py
video-color.md video.py, modes.py, rolling_palette.py, palette.py
scenes.md scenes.py, composable scenes, overlays/, interstitial.py
sid.md voice_scope.py, SID player PRG, waveform.py, midi_scene.py, asid.py
control.md keyboard.py, vision.py, control_plane.py, midi_control.py, transport.py, midi_setup.py, camera.py
wled.md wled_sync.py, wled_device.py, wled_sink.py
config.md paths.py, config.py, cli.py, recording_metadata.py, ensemble.py, orchestrator.py

How content preservation was verified

Two mechanical checks rather than eyeballing:

  1. The split was verified lossless before any prose was touched, by asserting each of the 35 original section bodies appears verbatim in exactly one topic file.
  2. The rewrite was checked by diffing every backticked identifier per file. The only ones absent are deliberate rephrasings — status words moved to bold, formulas into code fences, values into tables.

Prose changes are structural only: giant paragraphs became subsections with lead sentences, nested parentheticals became their own statements, measurement runs became tables, and bold was cut back to genuine emphasis. Every measurement, rationale, and dead end is kept — including superseded designs and the "an earlier revision did X and it was a user-visible bug" passages — per the working rule that those are the reference's main value.

audio.md actually got slightly longer (39.6 KB → 42 KB), which is what content-preserving restructuring looks like: the added length is headings and sentence breaks, not new claims.

Bugs found along the way

Bare tildes were rendering as strikethrough. GFM treats a single ~ as a strikethrough delimiter, not just ~~. Tildes meaning "approximately" pair up across a line and strike everything between — one line carried 12 of them, producing 6 struck spans of real technical content. Converted 96 occurrences to across architecture.md, caveats.md, usage.md, troubleshooting.md, and README.md. Only genuine ~/ home paths remain.

14 dead cross-references removed. Pointers to notes that do not exist in this repo, in both [[slug]] and `slug` form; the useful content is folded into the surrounding sentence. Every [[scenes]] / [[scenes.overlays]] / [[midi_control.cc_map]] was left alone — those are TOML array-of-tables syntax, not links.

6 broken links repaired. Five were written repo-root-relative but live inside docs/, so they 404 when rendered; plus one pre-existing broken anchor in troubleshooting.md.

Verification

  • make lint clean, 2,633 tests pass.
  • Every link and anchor across docs/, README.md, and CLAUDE.md resolves (checked programmatically, including fragments).
  • No paragraph over 2,000 characters remains in any topic file.
  • CLAUDE.md's subsystem table now links directly into the topic files.

Docs only — no code changes.

architecture.md had grown to 250 KB in one file, with 15 paragraphs over
2,500 characters (the worst a single 14,228-char bullet cataloguing every
generator). Split it into eight topic files under docs/architecture/ and
restructured the prose, preserving all content.

docs/architecture.md is now a routing index: a topic list plus an
alphabetical module table. Roughly 30 source docstrings refer to "the
<module>.py section of docs/architecture.md" as prose, so the index keeps
every one of those landing correctly without touching the code.

The split was verified lossless before any prose was touched, by asserting
each of the 35 original section bodies appears verbatim in exactly one
topic file. The rewrite was then checked by diffing every backticked
identifier per file; the only ones absent are deliberate rephrasings
(status words moved to bold, formulas into code fences, values into
tables).

Prose changes are structural only. Giant paragraphs became subsections
with lead sentences, nested parentheticals became their own statements,
measurement runs became tables, and bold was cut back to genuine emphasis.
Every measurement, rationale, and dead end is kept, including superseded
designs and the "an earlier revision did X and it was a user-visible bug"
passages, per the working rule that those are the reference's main value.

Also fixed, found along the way:

* Bare tildes meaning "approximately" render as strikethrough in GFM,
  which treats a single ~ as a strikethrough delimiter. They pair across a
  line and strike everything between; one line carried 12. Converted 96
  occurrences to U+2248 across architecture.md, caveats.md, usage.md,
  troubleshooting.md and README.md. Only genuine ~/ home paths remain.

* Removed 14 dead [[slug]] and `slug` cross-references to notes that do
  not exist in this repo, folding the useful content into the surrounding
  sentence. Left every [[scenes]] / [[scenes.overlays]] /
  [[midi_control.cc_map]] alone, which are TOML array-of-tables syntax.

* Repaired 5 relative links written repo-root-relative but living inside
  docs/ (so they 404 when rendered), plus a pre-existing broken anchor in
  troubleshooting.md.

CLAUDE.md's subsystem table now links directly into the topic files.
@kfox
kfox merged commit 06d6eb7 into main Jul 20, 2026
8 checks passed
@kfox
kfox deleted the docs/split-architecture-reference branch July 20, 2026 11:40
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