Skip to content

docs(rules): sync the code-comments copy with its canonical block - #1097

Merged
sydevs-bot merged 1 commit into
mainfrom
claude/docs-contract-code-comments
Nov 9, 2026
Merged

sydevs-bot merged 1 commit into
mainfrom
claude/docs-contract-code-comments

Conversation

@sydevs-bot

Copy link
Copy Markdown
Contributor

Summary

  • Copies the current canonical block from claude-workflow/docs/code-comments.md into this repo's copy, which had fallen behind it.
  • The missing rule that matters: the shortcut: convention — how to write one, and that one is never to be deleted.

One of four identical PRs, one per repo that carries a copy. Found by the audit-contracts sweep (2026-11-09).

Preview

Markdown only, in docs/rules/ — the Railway preview builds and serves exactly what main does, so there is no page that shows this change. Read the diff instead. No seeding was needed or done.

Contract impact

docs/rules/code-comments.md is a copy of a cross-repo contract, not a document this repo owns. claude-workflow/docs/code-comments.md is the source; workflow/lib/comment-rule-sync.mjs is what compares them. The three sibling PRs carry the byte-identical block:

  • sydevs/SahajAtlasWeb
  • sydevs/WeMeditateWeb
  • sydevs/SahajAtlasWordpress

They can merge in any order. The sync check passes only once all four are in, because it requires the four copies to agree with each other as well as with the source. This is not a contractSync copy, so no bot sync PR follows this one.

Test results

  • Lean gate: ✓ .claude/skills/pr-prep/check.sh — Tier 2: lint, typecheck, test-suite typecheck, 3136 unit tests in 241 files, 170s
  • Targeted specs: node workflow/lib/comment-rule-sync.mjs in the five-repo workspace — 4 ok, exits 0 (it reported SOURCE DRIFT before). No integration spec applies — no source file changed.
  • Build: N/A

Manual verification

  1. Read the four bullets the block gained or reworded and judge whether each earns its place in a file every session in this repo loads. The canonical file's own standing instruction is to keep the copies short, and this makes the copy five lines longer.

Notes for reviewer

  • What drifted, and in which direction. The copies did not rot; the source moved. claude-workflow#231 added the shortcut: rule to the canonical file and to comment-protect.json, and no copy was updated. So all four copies currently agree with each other and disagree with their source, which is why comment-rule-sync.mjs names it SOURCE DRIFT rather than DRIFTED.
  • Judgement call worth checking. The audit skill says to copy the canonical block in. I took the whole ## The rule section rather than only the shortcut: lines, so the marker's promise ("synced from … Edit there, not here") is true again and the next drift is one diff. That pulled in two wording refinements of rules already present. Taking only the shortcut: pair is a defensible smaller change.
  • One adaptation, deliberate. The canonical directive bullet ends "The next section says what each is and why", pointing at a section the copies do not carry. The copy keeps its own one-line gloss instead, as it already did.
  • The symlink .claude/rules/code-comments.md → ../../docs/rules/code-comments.md was checked this run and still resolves, so the rule still loads. Nothing under .claude/ is touched.
Detail

The live exposure in this repo is one marker, src/collections/UserSubmissions/orphanedUsers.ts:76. So the cost of the drift here is mostly forward-looking: an agent steering by this file has not been told the convention exists, and audit-code's comments angle reads this file as the rule.

comment-fingerprint.mjs counts protected comments before and after a sweep, so a marker deleted in a bulk comment pass would still be caught mechanically. That narrows the blast radius of the drift; it does not fix the rule.

The repo's own carve-outs below canonical:end are untouched — the // Icon: comments, the client-guard comment, the resolveManagedDocIds JSDoc, the src/types/ JSDoc rule, and the pass-by-reference comment that must never exist.


Generated by Claude Code

The block carries a marker saying it is synced from
claude-workflow/docs/code-comments.md, and it had stopped being. The canonical
file gained the `shortcut:` convention in sydevs/claude-workflow#231 and none of
the four copies followed, so this repo's always-loaded rule neither tells an
agent to write a `shortcut:` marker nor lists one among the comments never to
delete — while implement-ticket's ladder writes them and comment-protect.json's
K5 protects them. `src/collections/UserSubmissions/orphanedUsers.ts:76` already
carries one.

Two refinements of rules already here come from the same file: a comment must
stand on its own with its link cut, and the razor now names what to cut.

comment-rule-sync.mjs reported this as SOURCE DRIFT and exits 0 across all four
copies with this change. The carve-outs below the marker are untouched.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjW3DwBN3M1yYVD4M8T
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1097 November 9, 2026 08:25 Destroyed
@railway-app

railway-app Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the SahajCloud-pr-1097 environment in sahajcloud

Service Status Web Updated
SahajCloud ✅ Success (View Logs) Web Nov 9, 2026 at 8:30 am UTC
1 service not affected by this PR
  • mailpit

@sydevs-bot

sydevs-bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running
pending since 16:50Z

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

@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Adversarial review skipped: 1 file(s), 23 changed line(s), under review.skipWhen. Say @sydevs-bot review to force one.

🤖 sydevs dispatcher

@sydevs-bot sydevs-bot moved this from Pending to Awaiting in SYDevelopers Technical Roadmap Nov 9, 2026
@sydevs-bot sydevs-bot moved this from Awaiting to Pending in SYDevelopers Technical Roadmap Nov 9, 2026
@sydevs-bot
sydevs-bot added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 697edf5 Nov 9, 2026
21 checks passed
@sydevs-bot
sydevs-bot deleted the claude/docs-contract-code-comments branch November 9, 2026 17:04

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-1097 — 24b02214 Deployed Nov 9, 2026 by railway-app[bot]
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