Repository navigation
Add a top-level README, verified against the source files - #34
Conversation
There was no README.md at the repo root, so a newcomer landed on CLAUDE.md (written for agents) or skills/README.md (skills only). Neither answers "what is this and where do I start". Adam's three decisions shaped it, and the first two changed the task: - **Audience is him plus collaborators who may be remote and setting up while he is unavailable.** So it has to stand alone: a "when it goes wrong" section, and the traps documented rather than just the happy path. - **"Quick deploy on clone should be the standard."** Clone -> setup -> build -> flash -> verify is the spine, not an appendix. Flashing and confirming /json/info matches what you built are part of the main path. - **Reference only files in this repo.** That rule and the gitlink problem agree: submodule docs (BACKBONE_ROUTER.md, SENSOR_SYNC.md, the rs485_bridge readme) are named as plain-text paths, never linked — they are not this repo's files and they 404 on github.com because GitHub renders a submodule as a commit pointer. It deliberately does not send the reader to CLAUDE.md for any setup step. CLAUDE.md is written for agents, and it carries at least three claims that are no longer true — the default build env, the number of make targets, and the WLED version (it says 0.15.3; package.json says 16.0.1). Propagating those to the people least able to spot them would be the worst outcome. That is also why tools/check_readme.py exists, wired in as `make test-readme` and part of `make test`. It verifies the README against platformio.ini, the Makefile and .gitmodules rather than trusting anyone's memory: links resolve to tracked files, no link points into a submodule, every make target and [env:] named exists in the file it is attributed to, the submodule table matches .gitmodules, and setup.sh/upload_wled.py really support the flags shown. My own first draft inherited two of CLAUDE.md's stale claims, which is the failure this guards against. Scoped to what is on main today: scripts/ and tests/ arrive with #31/#32, so nothing references them yet and `make test` is described as four suites. A follow-up adds the scripts section once those land. make test green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
aphelps-claude-bot
left a comment
There was a problem hiding this comment.
Reviewed by checking every factual claim against the repo rather than against the prose. The good news first: the numbers are right (WLED/platformio.ini really has 37 [env:] blocks; default_envs really is 23 targets starting with nodemcuv2; package.json says 16.0.1; upload_port = 192.168.1.55 in [env:ampworks]), both relative links resolve to tracked files, all 8 make targets exist, all 6 named envs exist in the ini each is attributed to, the .gitmodules table is exact, and the Node claim is correct where CLAUDE.md is stale (/wled00/html_*.h is gitignored and untracked in the fork). make test-readme passes. Findings below are inline except these two.
1. The fleet-scripts pointer the task asked for is missing entirely. The task and the plan both name "where the fleet scripts live (scripts/README.md)" as required content, and the plan's layout table lists a scripts/ row ("fleet tools over the network"). Neither is in the README. The cause is understandable — scripts/ is currently untracked in this repo (git ls-files scripts is empty; promote-base-to-main.sh and wled-ap-hop.sh exist only on disk), and scripts/README.md arrives with PR #31, which has not landed — so linking it today would fail the link checker. But the effect on the reader is that the "Repo layout" table, which reads as exhaustive, silently asserts that scripts/ does not exist. The plan's own Post-Merge Verification ("the pointer table depends on scripts/README.md from PRs #31/#32, and a merge-order slip leaves a dead link") is now checking for a link that was quietly dropped instead. Either hold this PR until #31 lands and add the row + the Further-reading link, or add a follow-up task so the omission is tracked rather than forgotten — right now nothing in the repo records that it is missing.
2. Suggested test: pin the drift-prone numeric and version claims. check_readme.py's own docstring says it exists because the first draft inherited three false claims from CLAUDE.md — "the default build env, the number of make targets, the WLED version" — yet it checks none of the numbers. "a fork of WLED 16.0.1", "37 environments", "23 ESP8266 and ESP32 targets, starting with nodemcuv2", and the default 192.168.1.55 are all correct today (I verified each), and all four are exactly what an upstream bump or a platformio.ini edit falsifies — the class the tool was written to catch. They are cheap to assert: version from WLED/package.json, the two counts from len(re.findall(r'^\[env:', wled, re.M)) and the parsed default_envs list, the IP from upload_port in [env:ampworks]. Without them the checker's coverage stops just short of the claims most likely to rot.
The self-review found six issues; four were real and are fixed here. The embarrassing ones are in the checker I added to prevent exactly this. **Commands in the README did not run when pasted.** `make test-bridge# HMTL wire format (run twice: ...)` — `#` glued to the target is not a bash comment, so pasting it gave `No rule to make target 'test-libs#'` and a bash syntax error on the parentheses. Both reproduced. In a document whose whole purpose is being followable by someone who cannot ask a question, that is the worst defect in the PR. The columns are now aligned so every `#` is a real comment, and two checks guard it: `bash -n` per line, plus an assertion that `#` is preceded by whitespace — because `bash -n` only catches syntax errors, and `make test-libs# note` parses fine while invoking a target that does not exist. **Two assertions could never fail.** - The submodule check used a substring test, and `aphelps/WLED` is a substring of the clone URL `aphelps/WLED_dev.git`, so it passed with the entire WLED row deleted. Strengthened to require the path and its upstream URL on the same line — which also fixes a second weakness found while mutation-testing: `| \`WLED/\`` appears in the Repo layout table too, so "does this path appear anywhere" was still satisfiable. - The env and .gitmodules sections announced they were checking the README while testing hardcoded literals. They now parse the README's own tables, so a typo or a rename fails. **`make test` broke unhelpfully on an uninitialised clone** — `test-readme` was the only suite with no `require_submodule` guard, so it died on a FileNotFoundError traceback instead of the deliberate "run ./setup.sh" message. Guarded, and the script now resolves paths from its own location rather than the cwd. Also added the drift-prone numbers the docstring claimed to protect but did not check: WLED version, env count, default_envs count, default device IP. Writing that check found my own error — the first regex ran past the blank line terminating `default_envs` and reported 36 where the answer is 23. The README was right; the check was wrong. Every check is now mutation-tested: 10 deliberate defects introduced, 10 caught. One apparent miss was a mis-specified mutation that changed a link label while leaving the URL correct — passing was the right answer, and mutating the URL itself is caught. Not fixed, deliberately: the fleet-scripts pointer. `scripts/` is untracked on main until #31/#32 land, so linking it would fail the link checker. A follow-up adds it. make test green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
aphelps-claude-bot
left a comment
There was a problem hiding this comment.
Re-review of 23f9c05..83809ba. I did not re-check the facts I verified last round; I checked the one thing the increment claims.
The headline claim holds: every check can now fail. I broke the artifact each assertion guards, one at a time, and confirmed a non-zero exit. 15/15 mutations were caught, and the tree restored to ALL CHECKS PASSED afterwards:
| Mutation | Caught by |
|---|---|
| link retargeted to an untracked path | link -> skills/NOPE.md |
link retargeted into WLED/ |
link not into a submodule (+ untracked) |
| unbalanced quote in a bash block | pastes cleanly |
make test-libs # → make test-libs# |
'#' is separated from the command |
| "see CLAUDE.md" added on the setup path | README stands alone for setup |
make test-libs → make test-nope |
make test-nope |
display_only → display_onlyx in the env table |
has [env:display_onlyx] |
| HMTL row deleted from the submodule table | submodule table row for HMTL |
| README says WLED 16.0.2 | WLED version 16.0.1 as stated |
| README says 38 / 24 / .77 | each numeric check |
chmod -x setup.sh |
setup.sh is executable |
upstream package.json bumped to 16.0.2 |
WLED version 16.0.2 as stated |
upstream ini gains a 38th [env:] |
38 environments as stated |
The last two matter most: they are drift originating outside this repo, which is the failure mode the tool's docstring was written about, and both are now caught. Prior finding 2 is fully addressed, and the docstring's "prove it fails by breaking the thing it guards" is the right norm to have written down.
The README bash block is also fixed — all 16 command lines parse under bash -n, all 7 make test-* targets they name exist in the Makefile, and make/make test resolve to the real test: target (which does include test-readme). The require_submodule guard on test-readme is correct and consistent with its five siblings.
Prior finding 1 is still unresolved and still untracked. scripts/ has no row in the Repo layout table and no Further-reading pointer, and the increment does not add a follow-up task recording that. The table still reads as exhaustive while silently asserting scripts/ does not exist. The reason remains sound (scripts/ is untracked until #31 lands, so a link would fail the checker today) — but the plan's own Post-Merge Verification is now watching for a link that was dropped rather than deferred. Either hold for #31 or file the follow-up; right now nothing in the repo remembers.
Suggested test: the Makefile → README direction is unchecked. check_readme.py verifies that every target the README names exists, so a renamed target is caught. A new test-* target added to the Makefile and never added to the README is not — the list silently goes stale, which is the same drift class the numeric checks were just added for. All 8 test targets are listed today (only clean is absent, correctly), so this is cheap to lock in now: assert set(re.findall(r'^(test-[a-z]+):', makefile, re.M)) <= named_targets.
Inline: four false-positive risks in the new checks and one crash path. None of them is wrong today; all are things a legitimate future edit trips.
…nd guarded ini lookups Co-Authored-By: Claude Fable 5 <[email protected]>
aphelps-claude-bot
left a comment
There was a problem hiding this comment.
Re-review of 83809ba..7716c7d — one file, tools/check_readme.py, addressing the five inline findings from last round. I verified each fix by mutation (10 mutations run, tree restored to ALL CHECKS PASSED after; make test-readme green at HEAD):
- Block-level
bash -n— addressed. A syntheticfor ... do ... doneblock now passes; an unbalanced quote and an unterminatedforeach still failpastes cleanly. - Narrowed glued-
#— addressed, with one new gap the narrowing opens, noted inline.curl -s http://192.168.1.55/#/settingsno longer false-positives;make test-libs#is still caught. - Count checks match number-near-keyword — addressed. Rewording to "37 build environments" passes; a 38th upstream
[env:]still fails. .group(1)crash paths — addressed. RenamingversioninWLED/package.jsonand disablingdefault_envseach produce a FAIL line, exit 1, and zero bytes on stderr — no traceback.upload_portscoped to[env:ampworks]— addressed and hardened beyond the finding: a decoyupload_portplanted in an earlier env is ignored, and deleting ampworks' own key failsupload_port set in [env:ampworks].- Makefile SKIP-asymmetry thread — resolved as agreed: documented in the docstring (run via
make test-readme; bare invocation is not a safe CI entry point), matching the inline discussion rather than adding code.
Still open, unchanged by this increment:
- Prior finding 1 (
scripts/row) — still unresolved and still untracked. #31 and #32 remain open, so the hold rationale still applies, buttodo.mdon this branch records nothing and this is the third review noting it. One follow-up line is all it needs so the dropped row is remembered somewhere. - Suggested test (repeat): the Makefile → README direction is still unchecked. All 7
test-*targets are named in the README today, soset(re.findall(r'^(test-[a-z]+):', makefile, re.M)) <= set(named_targets)would pass as-is and lock the list against silently going stale.
Co-Authored-By: Claude Fable 5 <[email protected]>
aphelps-claude-bot
left a comment
There was a problem hiding this comment.
Re-review of 7716c7d..08c690b — a single commit closing the inline gap noted last round (env names glued to # escaped the narrowed check). Verified by mutation, tree restored to ALL CHECKS PASSED at HEAD:
- Inline gap from last round — addressed.
pio run -e ampworks# builds our firmwareplanted in a bash block now FAILs;make test-libs# just the libs(the original catch) still FAILs;curl -s http://192.168.1.55/#/settings(the URL-fragment false-positive the narrowing existed to avoid) still passes. The length-descending sort andre.escapecarry over to the merged token set, so no prefix-shadowing regression. - One cosmetic note inline on the new comment — the sweep catches slightly more than "env names", benignly.
Still open, unchanged by this increment (same two as last round):
- Prior finding 1 (
scripts/row) — still unresolved and still untracked. #31/#32 remain open so the hold rationale stands, but the README task entry intodo.mdon this branch (lines 70-86) still records nothing about the dropped pointer-table row. This is the fourth review noting it; one follow-up line closes the thread. - Suggested test (repeat): the Makefile → README direction is still unchecked.
set(re.findall(r'^(test-[a-z]+):', makefile, re.M)) <= set(named_targets)would pass as-is today (all 7test-*targets are named in the README) and lock the list against silently going stale.
Same conflict as on the apjoin branch: this branch added test-readme to .PHONY and test's prerequisites while main added test-hmtl. Neither removes the other, so the resolution is the union. Both targets exist after the merge (test-hmtl:152, test-readme:191) and `make -n` reaches each. tools/check_readme.py SKIPs here because the submodules are not checked out in this worktree, which is its documented behaviour, not a failure. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01F4oTr1YW3z7ozksMUT1z5j
|
Rebased onto main and resolved the Makefile conflict as the union of both sides — this branch's Heads-up for whoever merges this and #32: both branches were merged against a Filed as a P4: that list is a single line every new test target has to edit, so any two such branches |
aphelps
left a comment
There was a problem hiding this comment.
Verify this is still accurate and then merge.
The re-conflict predicted when #34 merged first. Three hunks this round, not one: the help comment, the .PHONY/test lists, and — new — the target recipes themselves, since test-apjoin and test-readme now sit at the same place in the file. All three resolve as the union; neither side replaces the other. Verified rather than assumed: both recipes dry-run, `make -n test` reaches them, and the branch suite is 54/54. This is the third time this line has conflicted in one session (test-hmtl, test-readme, test-apjoin). Filed as a P4 in WLED_dev's todo: accumulating into a TEST_TARGETS variable beside each target's own definition would make it mergeable instead of a serialisation point every branch has to queue through. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01F4oTr1YW3z7ozksMUT1z5j
There was no
README.mdat the repo root, so a newcomer landed onCLAUDE.md(written for agents) orskills/README.md(skills only). Neither answers "what is this and where do I start".Your three decisions, and how two of them changed the task
WLED_IP=override, and checking/json/infomatches what you just built are on the main path.WLED/oresp-now-router/404s on github.com even though the file is on disk. Both rules point the same way, so submodule docs (BACKBONE_ROUTER.md,SENSOR_SYNC.md, the rs485_bridge readme) are named as plain-text paths, never links.It deliberately does not lean on CLAUDE.md
You said you were unsure references belonged there, and the evidence backs that. CLAUDE.md carries at least three claims that are no longer true:
pio run"defaults to esp32dev" —default_envsis actually a 23-target ESP8266/ESP32 release list starting withnodemcuv2.maketargets; the Makefile defines 8.WLED/package.jsonsays 16.0.1.Sending a remote collaborator there for setup instructions would propagate those to exactly the people least able to spot them. So CLAUDE.md gets one mention — "this is what AI assistants read, parts have drifted, prefer this README" — and is never an instruction source. Fixing CLAUDE.md itself is out of scope here and worth its own task.
tools/check_readme.py— because I made this mistake myselfMy first draft inherited two of those stale claims straight from CLAUDE.md. Plan review caught them. That is exactly the failure mode a setup document cannot afford, so the checks are now a script, wired in as
make test-readmeand part ofmake test:maketarget and every[env:...]named exists in the file the README attributes it to.gitmodulesexactlysetup.sh --no-verify,WLED_IP, andset_build_info.pyreally exist and work as describedSo the README is verified against
platformio.ini, theMakefileand.gitmodulesrather than against anyone's memory, and it fails CI if it drifts.Scope
Written for main as it is today:
scripts/andtests/arrive with #31/#32, so nothing references them andmake testis described as the four suites that exist. A short follow-up adds the fleet-scripts section once those land — I would rather ship a correct README now than one that links to files that are not there.make testgreen, including the new checks.Testing Required
One item, and it is the whole point: read it cold and say whether it answers "what is this and where do I start". I am a poor judge of that from inside the repo — particularly whether the Quick start is genuinely followable by someone who has never seen this project and cannot ask you a question.