Repository navigation
docs(guides): keep intent and gotchas, point at code for the rest - #1235
Conversation
Pilot of the intent-only documentation rule on SahajCloud's nested AGENTS.md guides. A sentence stays only if it would change when the system's purpose changes; mechanism (symbol inventories, constants, file listings, retold API surfaces) is deleted, and condition lists become a pointer to the code or spec that holds them. Every ⚠ line, #NNN breadcrumb on a kept statement, command and sync pointer is kept. The scripts/ inventory table was already missing five of the 34 scripts, which is the drift this removes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🚅 Deployed to the SahajCloud-pr-1235 environment in sahajcloud
1 service not affected by this PR
|
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
perf-figures-pinned.spec.ts asserts AGENTS.md quotes the whole-lane figure, so the copy cannot drift silently. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The session for fix-ci 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 rule is right and the cuts disciplined. All five ⚠ lines in src/AGENTS.md survive, the #633 / #770 / #760 barrel story stays whole, and the scripts/ production-boot section reads better than the table it replaces. Least-sure call 2 holds: both env/ module headers carry the deep-import why in full. Three things to settle, one a live defect this diff worsens.
Findings
- should-fix —
src/jobs/AGENTS.md:67removed the true half of a contradiction and left the false one.src/jobs/queues.ts:47-57drivesdefaultevery five minutes from :01, so the dropped "five-minute cron" clause was right and the⚠at line 7 is wrong, as istests/unit/job-schedules.spec.ts:316. Least-sure call 4 answered:importEventsdoes not rely onrunQueueSoonalone. Fix the warning here. - should-fix — the Result section describes the first commit, not the branch. 4343b94 restored the "78 s" aside in the root
AGENTS.md, becausetests/unit/perf-figures-pinned.spec.tsasserts that figure in four docs. Root is unchanged, so it is 11 guides, +343 / −799 lines, and the Root row and word totals are wrong. The rule's never-delete list also needs a value a check reads out of prose. - should-fix —
seeds/lib/AGENTS.md:41drops the hook name its condition pointed at. - consider —
seeds/AGENTS.md:152drops the one surviving record of which locales production holds.
What was checked
Diff read whole. ⚠ lines counted both sides: 5 → 5 in src/AGENTS.md, none lost. Grepped the branch for #633, #770, #760 and client-bundle-safety — present. The seeds/ env-var cut is a true duplicate: the sign-in flow and redeem-signin-link.ts survive at seeds/AGENTS.md:30-66. Read queues.ts, job-schedules.spec.ts, perf-figures-pinned.spec.ts and both env/ headers. No ticket: judged against the body.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`src/jobs/queues.ts` gives `default` an `autoRun` entry — `cron: '1-59/5 * * * *'`, the class import's safety net — so the ⚠ claiming nothing drives it was false, and `job-schedules.spec.ts` repeated the claim in its own comment. The cut clause was the true half of that contradiction, so it comes back with the queue named. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXNwNcni76oUbfdjWM
Rule 2 trades a list of conditions for a pointer at the code, and this cut took the pointer with the list: a reader had nothing to grep for. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXNwNcni76oUbfdjWM
#1213 took the `wm-web-locales` script and its data files, so no file here records which locales that global holds. Restoring the count would restate a number nothing checks; the note names the authoritative source instead, and warns off `LOCALES`, which is the supported set. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXNwNcni76oUbfdjWM
|
Three review threads addressed, one commit each, pushed to 9f5c0df.
Review body finding 2: the Result section described the first commit. It now reads 11 guides, 22,005 → 16,836 words, +349 / −801 lines. The never-delete list gains "a value a check reads out of prose", for the "78 s" Lean gate green. 🤖 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
One conflict, `scripts/AGENTS.md`. #1235 deleted the operator inventory table this branch edited one row of, replacing it with intent-only prose under "Warnings by script". Resolved to main's rewrite. Nothing of this branch's intent is lost. The row's false clause — a bare `Success` means base-environment misconfiguration — is gone because the sentence carrying it is gone, and main's replacement bullet asserts no cause at all, pointing at `railway-preview-status.ts` and #661 instead. Re-adding the runbook pointer would restore detail #1235 deliberately moved out of these guides. The two-cause statement still lives in the five surfaces this branch changes that main did not touch. The `<details>` note in the PR body about that row's 62-character padding is moot: the table it padded no longer exists. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXLbjYeXGCjv97dg9Q
Pilot of an intent-only rule for guides, tried on SahajCloud's nested
AGENTS.mdfiles. The shared rule is landing in claude-workflow in a sibling PR. This PR is the evidence for it.The rule
Each sentence in a guide gets three questions:
Nothing was deleted from any of these: a
⚠line, a command, a cross-repo sync pointer, a#NNNattached to a statement that stays, or a value a check reads out of prose —tests/unit/perf-figures-pinned.spec.tsasserts the "78 s" lane figure in four docs, which is why the root guide is unchanged here. The shared rule had no such entry; sydevs/claude-workflow#289 adds it.Result
The 11 changed guides drop from 22,005 words to 16,836 (−23%), or +349 / −801 lines (
wc -wagainstmain). The other 16 guides were read and left alone, because they are almost all gotchas.The table in
scripts/AGENTS.mdhad already drifted: it was missing 5 of the scripts inscripts/(generate-live-preview-keypair,generate-logo-pngs,generate-status-config,preview-manager-emails,standalone-postbuild). That kind of drift is what this rule removes.scripts/(2,048 → 724 words)⚠warning, grouped by scriptrailway-preview-status.ts)src/(27.6 KB → 13.8 KB)src/lib/. The plugin list. The list of atlas endpoints. Barrel name lists. Explanations already in each module's own header (env barrel,runQueueSoon, transcripts,url,stateMachineAPI)#633/#760barrel story that code points here for. Thelogin/,stateMachine/and Sentry⚠lines. The fivesrc/libnotes no single file can say:richEditor,antiSpam,atomicWrites,stateMachine,submissionssrc/jobs/defaultsafety net an⚠above turns on. A duplicate of theCleanupCollectionsparagraph fromsrc/AGENTS.md. Two overlapping submission entries merged into one⚠blocks, and every per-job⚠and its reason. ThedryRunreview thatschemaUtils.tspoints toseeds/lib/(279 → 58 lines)BaseImporterAPI walkthrough: overrides, lifecycle table, method lists, Logger / FileUtils / CLI snippets, upload format. That class carries 45 doc comments'all')seeds/pnpm seed --help, plus the checklist step that kept the table in sync. Locale lists. Batch-size constants. The fields of the pagination block. A second copy of the env-var / sign-in instructions. A sample summary output. The copied importer template, now a pointer to two real importers⚠warning and translation property. Sign-in flow (one copy). The new-script checklistsrc/plugins/sentry/handlertag valuessrc/components/admin/WorkflowButtons/stateMachineAPI, and its list of consumerssrc/collections/,Meditations/,FrameEditor/,src/fields/useLivePreviewAuto", "one consumer today"Inbound pointers were checked:
git grepforsrc/AGENTS.md,scripts/AGENTS.mdandsrc/jobs/AGENTS.mdfrom code, specs,docs/andDEPLOYMENT.md. Every section they name still exists. No guide was deleted, and everyCLAUDE.mdsymlink is untouched.Review round 1
origin/mainmerged in clean (329d3c6). Each finding from the adversarial review got its own commit:src/jobs/queues.tsdrivesdefaultevery five minutes from :01, as the class import's safety net, so the⚠claiming nothing drives it was false. The warning is corrected, the cron clause is back, and the stale comment intests/unit/job-schedules.spec.tsthat repeated the claim is fixed too.seeds/lib/AGENTS.mdnamesfilterMeditationsByLocaleagain. Rule 2 trades a list of conditions for a pointer at the code, and that cut had taken the pointer with the list.seeds/AGENTS.mdnow says where production'swm-web-translationslocale set lives, since feat(seeds): draft the website's wording in nine more languages #1213 took the only file that recorded it. The count is not restored: nine is a number nothing checks, and the database is the record.Least-sure calls
src/AGENTS.mdthe atlas endpoint list carried#650,#1072and#1055, andseeds/had "feat(translations): rewrite the Sahaj Atlas schema by widget view, seed all ten locales, and gate availableLocales on them #706 and feat(translations): rewrite the WeMeditate Web schema by page, seed and publish English, and gate availableLocales on it #707 replacedgenerateExampleData". The breadcrumb rule protects a pointer on a statement that stays. When the whole statement was inventory or history, I let its number go.src/lib/notes are cut to five folders. For each of the others I confirmed the module's own header already says the same thing (grepon its key phrase) before cutting it. Reviewers may still want a short "what's insrc/lib" index for orientation. The rule says no.src/fixture/id-block table is kept, though it reads like an inventory. Nothing in code assigns blocks, so the table is the only allocation record, not a copy of one.A possible contradiction in— settled in review round 1.src/jobs/importEventsdoes not rely onrunQueueSoonalone, so the⚠was the wrong half of the contradiction, not the cron clause.seeds/template code block became a pointer toseeds/translations/import.tsandseeds/file-transcripts/import.ts. Anyone who liked copy-paste scaffolding loses it.Docs, plus one stale comment in
tests/unit/job-schedules.spec.ts. No product code. The lean gate passes: lint, format, both typechecks, 3,841 unit tests.🤖 Generated with Claude Code