Repository navigation
20260929 - Move the design notes out of the code and into docs/ - #105
Merged
Merged
Conversation
Most of what retina-gui knows about itself lived in docstrings and block comments, a third of the lines under src/ and half of calibrator.py. It was hard to find unless you already knew which file to open, and it buried the code it described. It now lives in docs/: an architecture overview, one document per feature, the node files and environment variables the GUI depends on, and the original .plans design notes, kept as history. The code keeps a one-line summary, the invariants the next editor has to see in place (safety limits, lock ordering, values shared with other repos) and a pointer to the heading that explains the rest. src/ shrinks from 10,193 lines to about 8,350. No code changes outside the tests. Every source file was checked against main with its comments and docstrings stripped: the Python syntax trees, the JavaScript token streams and the template markup are identical. Where the old prose disagreed with the code, the docs follow the code and the stale comment was corrected. The one comment two tests use as a slicing marker in setup.js is unchanged. The tests and test data carried values copied from real nodes and accounts. They are replaced with invented ones, consistently, and all 1018 tests still pass. A new CLAUDE.md makes updating the docs part of every change, and records the branch, commit and pull request conventions, and that tests must never carry real data. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Most of what retina-gui knows about itself lived in docstrings and block comments: 37% of the lines under
src/, and half ofcalibrator.py. It now lives indocs/, written for developers:docs/README.mddocs/architecture.mddocs/features/*.mddocs/operations/node-files.mddocs/history/.plans/design notes andtoggle.md, kept as an archive with an indexThe code keeps a one-line summary, the invariants the next editor has to see in place (safety limits, lock ordering, values shared with other repos) and a
See docs/...#anchorpointer for the rest.src/src/calibrator.pyNo code changes outside the tests
Every changed file under
src/,static/andtemplates/was checked againstmainwith its comments and docstrings stripped:Two tests in
test_towers.pyuse asetup.jscomment as a slicing marker. That comment is unchanged. A small block of comments intracker.htmlwas left as it was because the check could not verify that region.Where the old prose disagreed with the code, the docs describe the code, and about a dozen stale comments were corrected (for example a lock timeout quoted as 30 minutes where the constant is 40).
Test data
The tests and
test-data/carried values copied from real nodes and accounts. They are replaced with invented ones, applied consistently, so the tests are unchanged in what they check.Repo rules
A new
CLAUDE.md:docs/README.md.Found along the way, not fixed here
?demo=1in the wizard still calls the real node for the contact, claim, tower search and calibrate steps, so a demo can write real records or start a real calibration./configdrops any key in the five form sections ofuser.ymlthat the form does not post.login.html's hint points at a password control on the Configuration page that does not exist.Verification
node --checkpasses on the edited JS.docs/...#anchorpointer and Markdown link resolves: 519 checked.🤖 Generated with Claude Code