Skip to content

docs(guides): keep intent and gotchas, point at code for the rest - #323

Merged
Ardnived merged 5 commits into
mainfrom
claude/docs-intent
Nov 20, 2026
Merged

Ardnived merged 5 commits into
mainfrom
claude/docs-intent

Conversation

@Ardnived

@Ardnived Ardnived commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Change outline

The rule (claude-workflow/docs/documentation.md)

  1. A behaviour-preserving refactor would change it → mechanism. Delete it.
  2. A bug fix or new edge case would change it → a list of conditions. Point at the code or test.
  3. Only a change of purpose would change it → keep (intent, invariants, contracts, gotchas, commands).

AGENTS.md (−8 net)

Passage Did Failed test
Edge cache "for 600s" Dropped the value; server/CACHING.md owns the figures 1 — a copied value
The head bullet's three template names "the content templates" 1 — symbol inventory
URL gates: which isSafe* takes which destination, what each admits One line pointing at each gate's own header in lib/urls.ts 2 — a list of conditions the code holds
The render-nothing exception's call sites (Splash, AtlasContent, ErrorFallback) and isSafeHttpUrl's cases Kept the rule and its why; dropped the list 2
sitePathFromUrl internals, "atlasHref is its only caller" One sentence; #124 kept with the statement that stays 1 — inventory
Rules table's Scope column Dropped; it restated each rule's paths: frontmatter, now named as the scope 1
Nested-guide bullet for server/ Restated server/AGENTS.md's rules → now a pointer one home per fact
Symlink note listing the nested guides Shortened 1 — listing

server/AGENTS.md (−9 net)

Passage Did Failed test
Refusal codes list "the codes are SahajCloud's" 2 — upstream's list
submissionData base keys list Dropped; SahajCloud's allow-list. The 400-on-unknown/repeat gotcha stays 2
relationId() Kept the consequence, dropped the upstream function name 1
⚠ narrow-type pairs (NavPage, EmbeddedForm) Warning kept; examples → "the pairs in sahajcloud-types.ts" 1
⚠ warning volume: reportedConfigGaps, per-source memo Rule first, then both memos named apart (review round) 1, partly reverted
⚠ Sentry data: httpBodies: [], PII_KEY_SNIPPETS reach Warning kept with the beforeSendTransaction gotcha and the credential-header check 1
sahajCloudFetch duty list Shortened to what the rest of the section relies on 1
⚠ raw fetch: "15 s" / "30 s" Warning and both reasons kept; values left to sahajcloud-fetch.ts (its test pins them) 1 — copied values
"Four of the six reads…" "A read where a 404 is a data gap takes sahajCloudFetch" 2 — a count that drifts
50[0-9] message fallback Restored as the reason, without the pattern (review round) 1, reverted
maxAttempts: 1, "3-attempt" Dropped the values; the no-retry rule and its why stay 1

Merged main (658df03)

main's new SEO head architecture (#282) rewrote the two bullets this branch had condensed, so AGENTS.md conflicted. Resolved by taking main's text and re-applying the same two condensations to it — the three template names become "the content templates", and the isSafe* condition list becomes a pointer at each gate's own header. main's two new bullets, site-wide document routes and embed-player geometry, are kept verbatim.

Review round

Finding Fix
warnOnce named as the bound where getWebConfig holds its own reportedConfigGaps 4641f2a — per-isolate rule first, then warnOnce for a new warning and getWebConfig's own memo, kept apart
"the base keys" left with no antecedent in the guide ede188c — "the base context set that lib/submissions.ts names"
the dropped 50[0-9] clause was the whole reason the 52x gotcha exists 24b9800 — "its message fallback recognises only 50x phrasing", no pattern copied

components/AGENTS.md and pages/AGENTS.md are unchanged. The no-JavaScript table is read by docs/accessibility-walkthrough.md as its source, and the rest is gotchas.

Preview

No preview surface — guides only.

Test results

  • Lean gate: not run. After the main merge, git diff --numstat origin/main is two .md files and nothing else, so every file the gate reads is byte-identical to main. No spec reads guide text (grep of .ts/.tsx/.js/.json/.sh/.yml finds only comments citing them).
  • Security review: the ^server/ trigger matched server/AGENTS.md. Run, no findings — the diff carries no code.
  • Formatter: markdown is not prettier-gated here (main's guides fail prettier --check too). Edited paragraphs are wrapped at 100.

Notes for reviewer

  • Breadcrumbs removed: none. #124, #123, #128, #108, #222/#248 and SahajCloud#808/#718 all stay.
  • Inbound references checked: every code comment citing a guide (useT(), the [PayloadCMS] log, the Chrome rule, the warning bound, select, #808) still finds its statement.
  • Least sure: dropping the Scope column; the URL-gate condensation (the old text was the only place the three gates sat side by side); and the merge resolution in AGENTS.md, which re-condenses prose main wrote an hour ago.

🤖 Generated with Claude Code

Applies claude-workflow's docs rule (docs/documentation.md) to the root and
server guides: constant values, call-site lists and symbol inventories go;
every warning, breadcrumb kept with its statement, and inbound reference stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sydevs-bot

sydevs-bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running

recent dispatches
  • 22:26Z address-review · attempt 1 · session · done
  • 22:26Z address-review · attempt 1 · session
  • 22:20Z review-pr · attempt 2 · session · done
  • 22:20Z review-pr · attempt 2 · session
  • 21:27Z review-pr · attempt 1 · session · timed out

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 20, 2026
@sydevs-bot sydevs-bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 20, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
wemeditate-web 24b9800 Commit Preview URL

Branch Preview URL
Nov 20 2026, 10:33 PM

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 20, 2026
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 20, 2026
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 20, 2026
@sydevs-bot

Copy link
Copy Markdown
Contributor

The session for review-pr did not finish after 3 attempts. I have stopped retrying. A mention (@sydevs-bot) or a push from you starts me again.

🤖 sydevs dispatcher

@sydevs-bot sydevs-bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 20, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 20, 2026
@sydevs-bot sydevs-bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 20, 2026
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 20, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 Adversarial review

The shape is right: docs-only, two files, net −20, applying a rule that lives in one place. The "never delete" list holds — every ⚠ survives, #124/#222/#248 survive, commands untouched — and both condensations the body calls least sure check out. server/CACHING.md:12 already owns "The 600s TTL is the guarantee", and each isSafe* gate's JSDoc (lib/urls.ts:71-139) does name which destination it takes, so the dropped gate table has a real home. server/AGENTS.md:50 still holds the select/populate/locale rule the root guide's bullet used to restate.

Three condensations lost a fact, not a mechanism: two leave the pointer the rule asks for wrong or missing, and the third leaves a "because" with nothing behind it. Each is a one-line fix where it sits.

The pass generalises: what is left untouched in both guides is contracts and gotchas — the 400 on a missing select, the atlas 403 role gate, port 9222 — not inventories.

Findings

  • should-fix — server/AGENTS.md:86: names warnOnce as the per-isolate bound, where getWebConfig uses its own reportedConfigGaps.
  • should-fix — server/AGENTS.md:27: drops the base context set while line 36 still refers to "the base keys".
  • consider — server/AGENTS.md:138: the 50[0-9] fallback was the reason the 52x gotcha exists.

What was checked

Read whole on the branch: both guides, lib/urls.ts, server/error-utils.ts, server/CACHING.md. Grepped reportedConfigGaps (sahajcloud-client.ts:667,732-736), warnOnce callers and error-utils.test.ts:348-389, base context (lib/submissions.ts:8,112), SERVER_PHRASE_PATTERN (error-utils.ts:92). .claude/workflow.json on main has no fixture and no previewUrl, so "No preview surface" needed no data check and no link was opened. No contract surface in the diff.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread server/AGENTS.md Resolved
Comment thread server/AGENTS.md Resolved
Comment thread server/AGENTS.md Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 20, 2026
@sydevs-bot

Copy link
Copy Markdown
Contributor

Merged main, built all three findings, pushed 24b9800.

Merge 658df03 resolved one conflict: main's SEO head rewrite (#282) had rewritten both bullets this branch condensed. Kept main's text, re-applied the two condensations, kept its two new bullets verbatim.

Lean gate not run — after the merge the diff against main is two .md files, so every file the gate reads is byte-identical to main.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 20, 2026
@sydevs-bot sydevs-bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 20, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@sydevs-bot sydevs-bot moved this from Pending to Awaiting in SYDevelopers Technical Roadmap Nov 20, 2026
@Ardnived
Ardnived merged commit e59d96c into main Nov 20, 2026
65 of 69 checks passed
@Ardnived
Ardnived deleted the claude/docs-intent branch November 20, 2026 22:38
@sydevs-bot sydevs-bot moved this from Awaiting to Done in SYDevelopers Technical Roadmap Nov 20, 2026
sydevs-bot pushed a commit that referenced this pull request Nov 20, 2026
AGENTS.md conflicted on the URL-spelling rule. main (#323) condensed the
gate prose to point at each gate's own header; this branch had added the
`Location` header as a third destination. Took main's condensed wording
and kept the new destination as one line, because `isSitePath` is not an
`isSafe*` gate and its header says nothing about a redirect target.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXN8FfQA4e1MdjMn3K
sydevs-bot pushed a commit that referenced this pull request Nov 20, 2026
Two prose conflicts with the guide rewrite in #323, both resolved to main's
generalized wording plus this branch's new rules:

- AGENTS.md: main stopped naming the three content templates. Keeps that, and
  keeps this branch's code-route exception for `/meditations`, which advertises
  `availableLocales` whole because nothing publishes it per locale.
- server/AGENTS.md: main dropped the enumerated read counts and tightened the
  status-classification sentence. Keeps both, and keeps this branch's rule that
  a warning on one of these reads reports through the Worker SDK. The duplicate
  status sentence inside that block goes, since main's now states it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYYzt9mPo4hrADUkDz
sydevs-bot pushed a commit that referenced this pull request Nov 20, 2026
This branch replaced `getWebConfig`'s inline memo with `createWarnOnce`, so two
references now name a symbol that no longer exists. The merge of #323 kept
main's wording for both, which is where they surfaced.

- The hot-path bullet named `warnOnce` in error-utils.ts as the bound for a new
  warning. A server read takes `createWarnOnce` instead, because error-utils is
  browser-reachable and reports through `@sentry/react`.
- `api-routes.ts` cited `reportedConfigGaps` in sahajcloud-client.ts, which this
  branch removed.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYYzt9mPo4hrADUkDz
sydevs-bot pushed a commit that referenced this pull request Nov 20, 2026
Both conflicts are prose in AGENTS.md and server/AGENTS.md, against #323,
which trimmed both guides to intent and gotchas and pointed at code for the
rest.

AGENTS.md takes main. This branch's only edit there added `LiveSession` to
the call-site register and the `isSafeHttpUrl` list, and #323 deleted both
lists in favour of "the destination picks the gate; each one's header says
which". Re-adding either would undo #323; the gate at the join action is
unchanged.

server/AGENTS.md keeps this branch's facts in main's register. #323's
"`getWebConfig` holds its own memo" is false here: this branch moves it onto
`reportOnce`. The two memos and the rule for picking between them stay; the
per-caller enumeration goes, which is what #323 asked for.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVyk5XQSGi98NR33qt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants