Skip to content

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

Merged
sydevs-bot merged 1 commit into
mainfrom
claude/docs-contract-code-comments
Nov 10, 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/ — nothing deploys and neither Cloudflare preview shows anything this PR did.

Contract impact

docs/rules/code-comments.md is a copy of a cross-repo contract, not a document this repo owns — this file's own carve-out header says it is "Synced from claude-workflow: edit the canonical block there". workflow/lib/comment-rule-sync.mjs is what compares them. The three sibling PRs carry the byte-identical block:

  • sydevs/SahajCloud
  • sydevs/SahajAtlasWeb
  • 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.

Test results

  • Lean gate: ✓ .claude/skills/pr-prep/check.sh — lint, typecheck, test:run, 41s
  • Targeted specs: node workflow/lib/comment-rule-sync.mjs in the five-repo workspace — 4 ok, exits 0 (it reported SOURCE DRIFT before)
  • 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

This tree carries no shortcut: marker today, so the drift has cost nothing here yet. It is the rule arriving before the markers do: 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.


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. This tree carries no marker yet, so the rule arrives before
the first one does.

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
@sydevs-bot

sydevs-bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

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

@cloudflare-workers-and-pages

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 fe35774 Commit Preview URL

Branch Preview URL
Nov 09 2026, 08:22 AM

@sydevs-bot
sydevs-bot marked this pull request as ready for review November 9, 2026 08:23
@sydevs-bot
sydevs-bot requested a review from Ardnived November 9, 2026 08:23
@sydevs-bot
sydevs-bot enabled auto-merge November 9, 2026 08:23
@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 Awaiting to Pending in SYDevelopers Technical Roadmap Nov 10, 2026
@sydevs-bot
sydevs-bot added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 981b610 Nov 10, 2026
23 checks passed
@sydevs-bot
sydevs-bot deleted the claude/docs-contract-code-comments branch November 10, 2026 16:08
@sydevs-bot sydevs-bot moved this from Pending to Done in SYDevelopers Technical Roadmap Nov 10, 2026
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