Repository navigation
docs(guides): name the function a trap's ⚠ sits in, never its line - #94
Conversation
The root AGENTS.md changed in 30 of the last 55 commits on main. 98 of the 372 lines those commits touched carried a file:line pointer, which moves whenever code above it does — and at least 6 of them already pointed at the wrong line. A function name survives the edit. Also drops history and copied values: the narrated before/after in trap 3, the shard count, a timeout, the version floor in two table rows, a copy of the bare-view segment list in trap 18, and a status line about SahajCloud#1058, which has merged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
|
The session for review-pr did not finish after 3 attempts. I have stopped retrying. A mention ( 🤖 sydevs dispatcher |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The mechanism is right and the PR is the size of its own claim: a function name survives an edit above it, a line number does not. I checked all 30 new pointers against the source on this branch. 28 resolve to a ⚠ in or directly above the named function. Two do not, and both are the defect this PR exists to remove, so the body's "I checked the ⚠ sits in or directly above it" needs correcting with them. Nothing is smuggled in — two guides, no code, no new section.
The untouched prose holds, and I would keep it. Principles' survey counts and Decisions' owner-dated values have no home in the code, and Testing's three failed-assertion incidents are what make an agent do that step.
Findings
should-fix— trap 15 namessahaj_atlas_is_local_url(), which carries no⚠(line 130).should-fix— trap 21 namesschedule(); trap 21's⚠is instart()(line 156).should-fix—README.md:171calls the browser lane "local only" and sends the reader toAGENTS.md, which this PR leaves saying it runs in CI. A stale doc on a docs PR belongs here, not out of scope.consider— the PHP and WordPress floor is now pointed at and copied (line 240).consider— the "Who uses it" bullet restates principle 4 (line 29).
What was checked
- Every function the guides name exists exactly once (
git grep "function <name>"on the branch). - Each named function read for its
⚠:includes/{embed,seo,sitemap,routing,page,diagnostics,shortcode}.php,sahaj-atlas.php,assets/atlas-page.js,modules/sahaj-atlas/sahaj-atlas.php,tests/{run.php,render.mjs}. - Where the old pointer sat above the function, no intervening function in any file.
InstallGuide/steps.tsexists in SahajCloud and names the permanent zip link. SahajAtlasWeb is outside this session's scope, so its pointers are unchecked.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`sahaj_atlas_is_local_url()` carries only a docblock. The `⚠` for trap 15's sitemap half sits in `sahaj_atlas_sitemap_rows()`, above the guard call it explains, and `includes/seo.php`'s own `⚠` already names that function as the holder. The preamble promises the named function's `⚠` carries the story. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVmKiRPKJAyG9UKNye
`schedule()` is a rAF queue with no `⚠` of its own, and the `⚠` above it carries trap 22's story. Trap 21's `⚠` is on `start()`: an optimiser plugin that hoists the file into `<head>` runs it before `document.body` exists, and the missed observer attach is silent. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVmKiRPKJAyG9UKNye
The Testing section both named the header fields and restated their values, so a raise had two places to miss. `tests/AGENTS.md` kept a third. The `--php 7.4` flag stays: it quotes what those two commands pass, and the trap is about that flag diverging from the CLI's own 8.3 default. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVmKiRPKJAyG9UKNye
"Who uses it" said a setting costs and deferred to principle 4 for the count. Principle 4 sits eight lines below, says the same, and names the three. A cross-reference inside one file is the copy it was meant to remove. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVmKiRPKJAyG9UKNye
It runs in CI on a pull request that touches a file shaping the embed, which is what AGENTS.md says two clicks away. What actually gates it locally is the `SAHAJ_ATLAS_TEST_KEY` secret. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVmKiRPKJAyG9UKNye
|
All five review points adopted. Five commits,
The body's claim that every pointer's Lean gate not run — three Markdown files, and nothing reads their text. Branch was level with 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
sydevs-bot
left a comment
There was a problem hiding this comment.
Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. Enable auto-merge when you want it merged: the queue tests it against its base. 🤖 Written by the sydevs autonomous loop — see what this is
Summary
⚠sits in, never its line. Line numbers madeAGENTS.mdthe most-edited guide in the org.README.md, which called the browser lane "local only" whileAGENTS.md, one click away, says it runs in CI.Change outline
The rule (
claude-workflow/docs/documentation.md), per sentenceWhy this guide, measured
AGENTS.mdchanged in 30 of the last 55 commits onmain(10 weeks). 98 of the 372 lines those commits touched carried afile:linepointer, which moves whenever code above it does. At least 6 already pointed at the wrong line:tests/run.php:143(blank; the⚠is at 145),:387and:409(at 389 and 411),tests/render.mjs:401(at 405),tests/bootstrap.php:42(at 63),includes/diagnostics.php:296(the end of the previous check; the⚠is at 302).Root
AGENTS.md⚠there carries the story", plus why there are no line numbersfile:linepointers⚠carries the story, by full path⚠statement⚠on the hook list and the two print functionswp_trim_excerpt()trapsahaj_atlas_check_sitemap_discovery()Requires at leastandRequires PHPin the plugin header,browser.yml,tests/zip.mjssteps.tsPrinciples, Decisions, Where the truth lives: untouched.
tests/AGENTS.mdfile:linepointers (4 of them stale)tests/run.php/check()intests/render.mjsbrowser.yml--php 7.4flag stays: it quotes what those two commands passREADME.mdOne line. The quickstart block called
pnpm test:browser"local only" and sent the reader toAGENTS.md, which says it runs in CI on a PR touching a file that shapes the embed. What actually gates it locally is theSAHAJ_ATLAS_TEST_KEYsecret, so the comment now says that.Net
+82 / −73 lines across three files. Words by
wc -w: root 3,381 → 3,357, tests 637 → 616. This PR does not shrink the guide. It removes what made every code edit also touch it: a function name survives an edit above it, and a line number does not.Preview
No preview surface — guides only.
Test results
grepoftests/,.github/andpackage.json: onlypackage.shand.distignorename the files, to exclude them from the zip).git grep "function <name>"), and every one carries a⚠in its body or in the docblock above it. Two did not on the first push, and both were the defect this PR exists to remove: trap 15 namedsahaj_atlas_is_local_url(), a docblock-only guard, and trap 21 namedschedule(), whose nearest⚠is trap 22's. They now namesahaj_atlas_sitemap_rows()andstart(). Every function-and-file pair in both guides was re-checked by script after the fix, each suspect read by hand.CLAUDE.mdsymlinks untouched. Inbound section references (embed.php"Traps already paid for",i18n.shprinciple 2,docs/implementation-plan.md's section names) still resolve; trap numbering is unchanged.Notes for reviewer
#170in trap 4, removed with the history clause it closed.SahajAtlasWeb#170stays in the same trap.⚠s the reader scans it rather than landing on a line.sahaj-atlas.php;readme.txtrepeats them because wordpress.org requires those fields.⚠s inincludes/diagnostics.phpstill say "check 7". That number is not a fragile pointer there — every check's docblock opensCheck N — …, so the file defines its own numbering. The guide could not, which is why "check 6" had to go.🤖 Generated with Claude Code