Skip to content

docs(plugins): point the shared libraries and their copies at docs/contracts - #11266

Merged
kyle-sexton merged 8 commits into
mainfrom
docs/7537-c-shared-libs
Oct 30, 2026
Merged

kyle-sexton merged 8 commits into
mainfrom
docs/7537-c-shared-libs

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #7537

Summary

Points the canonical shared libraries under lib/, their generated per-plugin copies, and the byte-identical cross-plugin clusters (context/recommendation-basis.md, reference/docs-lookup-procedure.md, test-helpers.sh, the session bridge) to the plugin-author contracts at docs/contracts/<name>/ instead of docs/conventions/<name>/. This is the last C-split PR, so it closes #7537.

Fix

  • One commit edits the canonical files and regenerates their copies with scripts/sync-shared-copies.sh. It rewrites 139 files across 55 plugins, with a changelog fragment per carrying plugin. Each cross-plugin cluster changes together, so scripts/check-cross-plugin-source-drift.sh holds.
  • The branch merges current main. Git's directory-rename detection moved 8 of this branch's changelog fragments into other plugins' .changes/ folders, because a release had emptied those folders; each fragment is moved back to its own plugin. Main added no old-path references inside this scope, so there is no extra rewrite commit; lib/prerequisites.* belongs to the shared-prerequisites PR.
  • Left unchanged on purpose: lib/hook-test-sink.sh and its test try docs/contracts/hook-telemetry/ first and fall back to the old path. The test's fixture builds the stub layout.

Verification

  • scripts/sync-shared-copies.sh --check: all 545 registered copies match their canonical sources.
  • Every changelog fragment on the branch is bump: patch and names a plugin the diff changes (55 fragments, 0 orphans).
  • scripts/check-affected.sh --tests --base origin/main: 15 passed, 4 skipped, 0 failed over 195 changed files.
  • lychee --offline with lychee.toml over the 80 changed Markdown files: 0 errors.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 8 commits October 28, 2026 21:43
Rewrites links and comment paths to the plugin-author contracts from
docs/conventions/<name>/ to docs/contracts/<name>/ (#7537) in 139 files
across 55 plugin(s). The old paths keep a stub with every section heading,
so installed plugin versions keep resolving.

Refs: #7537

Co-Authored-By: Claude Opus 5.5 <[email protected]>
These fragments said bump: none, so release-plugins.sh would drop them and
the corrected links in shipped skill text would never reach users.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main added the copy after this branch rewrote lib/resolve-convention-home.sh,
so the copy still named the old contract path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	.changes/architecture/docs-7537-c-shared-libs-a3cf9104.md
#	.changes/bash-format/docs-7537-c-shared-libs-2142f723.md
#	.changes/bash-format/docs-7537-c-shared-libs-4136e399.md
#	.changes/biome-format/docs-7537-contracts-split-7fb95bcb.md
#	.changes/context-budget/docs-7537-c-shared-libs-80c5246e.md
#	.changes/context-budget/docs-7537-contracts-split-5b1f0565.md
#	.changes/context-guard/docs-7537-c-shared-libs-6ffc87d5.md
#	.changes/debugging/docs-7537-c-shared-libs-28c052f5.md
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 30, 2026 13:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T13:37:10.298930Z f1dc398 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed f1dc3981f877a778aadb2f24c32a3cf8fb86a5d9: 0 finding(s), 0 as inline comments.

No security findings. I read the PR context and the whole diff, but not any files outside it.

Apart from the changelog fragments under .changes/, the diff only changes docs/conventions/<name> to docs/contracts/<name>. Every removed line in the code and doc files is a path swap in a comment, docstring or Markdown reference, plus two runtime strings:

  • the untrusted-data framing line in lib/docs-cache.sh (dc_block_open), and
  • DATA_NOTE in session_bridge.py.

In both strings only the cited path differs. The sentence still tells the model to treat the block as data, never instructions. The matching SPINE string in lib/docs-cache.test.sh changed in the same way, so the byte-for-byte check still holds.

No logic, hook, permission, token scope, trust-control script, workflow or manifest (plugin.json or marketplace.json) changed, so there are no manifest <field> lines. The diff touches none of the trusted-path globs. It removes no standing instruction; the untrusted-content framing sentence is repointed and not softened. I did not check whether docs/contracts/untrusted-content/README.md exists at head. If it did not, the framing pointer would dangle, which is a link problem and not a security one.

Spend: none; the PR changes no limits, models, schedules or billing settings.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed f1dc3981f877a778aadb2f24c32a3cf8fb86a5d9: 0 finding(s), 0 as inline comments.

No findings. I read the 195-file diff and the PR context. Closing issue #7537 and its decision comments set a destination (docs/contracts/), stubs at the old paths, and an attended build. The diff meets them as far as this PR's scope goes. This is the shared-libraries slice of the move, and the other folder moves and the ADR 0064 amendment are in sibling PRs.

What I checked:

  • Edits are comment/string-level only. The canonical lib/* files change a doc path in a comment, docstring or string literal. There is no logic change. The one runtime string is the untrusted-content "spine" in docs-cache.sh and session_bridge.py. lib/docs-cache.sh:759 and the SPINE assertion in lib/docs-cache.test.sh:772 change together, so the byte-for-byte test still holds.
  • Cited targets exist. Every docs/contracts/<name> I grepped in an added line has a README.md in the head tree. That covers retired-conventions, windows-path-emit, prerequisites, shell-test-helpers, recommendation-basis, routing-as-data, rendered-views, hook-config-delivery, config-cascade, commit-convention, plugin-data-report-keying, on-demand-dependencies, hook-precision and untrusted-content. The diff cites neither gather-block nor pr-pipeline, so nothing points at a folder that did not move.
  • Fragments. All 55 changelog fragments are bump: patch, and each names a plugin whose files change. Every plugin with a changed file in the diff has a fragment. I did not run a tool to count them.
  • Leftover old-path references. The only remaining docs/conventions/ references I found in test and script files are in four places:
    • plugins/plugin-quality/skills/audit/scripts/collect-standards.test.sh builds a fixture layout.
    • test_babysit_risk.py, test_merge_holds_sync.py and test_babysit_review_evidence.py reference docs/conventions/untrusted-content, as trusted-path globs and test inputs.
    • plugins/discovery/scripts/contract.test.sh:1158-1159 already tries the new path first and falls back to the old one.
      The trusted-path globs are a separate area from this PR's scope. They are not changed here, and the pre-merge .changes convention already covers them.
  • Trusted paths. The diff touches no file that matches the trusted-path globs, apart from the docs/contracts/untrusted-content string above. I found no security-relevant change, no userConfig or manifest change, and no embedded instructions in the PR context.

The PR's own verification claims (sync-shared-copies.sh --check, check-affected.sh, lychee) are author-claimed. I did not run them, because this lane has no shell.

Spend: none beyond this review run.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 5ca3125 Oct 30, 2026
84 checks passed
@kyle-sexton
kyle-sexton deleted the docs/7537-c-shared-libs branch October 30, 2026 13:53
kyle-sexton added a commit that referenced this pull request Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: separate plugin-author contracts from consumer conventions in docs/conventions

1 participant