Skip to content

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

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).

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

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 the contractSync copy this repo carries (tests/atlas-url-contract.json), which was checked this run and is current.

Test results

  • Lean gate: ✓ pnpm test:all — syntax lint, the measure lane, the behaviour suite on WordPress 6.7 / PHP 7.4, and the render lane. 440 assertions, 0 failures across the four lanes, run one at a time.
  • 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
  • The browser lane was not run: it needs the network and SAHAJ_ATLAS_TEST_KEY, and no PHP, JS or CSS changed.

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

  • This repo is where the omission costs most. Nothing here lints a comment — pnpm lint is a token_get_all syntax check — so the rule file is the whole guard, and this repo's own carve-out opens by saying its comments are its documentation. A rule that does not name a protected marker is the only thing standing between a sweep and that marker.
  • 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.

The carve-outs below canonical:end are untouched, and they are the load-bearing half for this repo: sahaj-atlas.php lines 1-20, the 31 @package SahajAtlas headers, the 21 translators: comments that feed the .pot, and assets/atlas-page.css line 4's cross-repo contract.


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.

That omission costs most here. Nothing in this repo lints a comment — pnpm lint
is a token_get_all syntax check — so the rule file is the whole guard, and this
repo's own carve-out says its comments are its documentation.

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
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 c02385f Nov 9, 2026
21 checks passed
@sydevs-bot
sydevs-bot deleted the claude/docs-contract-code-comments branch November 9, 2026 16:53
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