Skip to content

feat(review): dereference cross-repo REVIEW.md citations - #213

Merged
kyle-sexton merged 2 commits into
mainfrom
feat/review-plugin-cross-repo-citations
Jul 16, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
feat/review-plugin-cross-repo-citations

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Summary

Part of the org-wide standards-sync initiative (melodic-software/standards' REVIEW.md + distribution/REVIEW-CREDENTIAL.md). Today none of code-reviewer, security-reviewer, or architecture-guardian dereference a citation inside a consuming repo's REVIEW.md — only code-reviewer even mentions the file, and none follow a citation into a mounted external path.

  • Teaches all three agents to recognize a REVIEW.md code-span citation shaped like <relative-path>.md#<heading> and Read that path — which may live outside the current repository, mounted via --add-dir (e.g. melodic-software/ci-workflows' claude-review.yml@<sha>, PR in flight) — for the full criterion behind a thin REVIEW.md line before finalizing an overlapping finding.
  • Repo-agnostic per this repo's own CLAUDE.md rule: no consuming repo, path, or criteria file is named anywhere in the instruction text.
  • Read is already granted to all three agents (confirmed from each file's frontmatter) — this is an instruction-only change, no tool-grant change.
  • An unresolved citation (mount absent, wrong path) is noted in the agent's report rather than dropped silently or treated as a hard review failure.
  • Bumps plugin.json to 0.9.0 and adds a CHANGELOG.md entry per this repo's Keep a Changelog format.

Verified before writing (per this repo's CLAUDE.md)

  • code.claude.com/docs/en/memory — confirmed --add-dir semantics.
  • code.claude.com/docs/en/code-review — confirmed the REVIEW.md citation shape this session authored in standards/REVIEW.md, and confirmed this plugin's headless-CI consumption path is a separate, still-open question from this change (out of scope here — see the ci-workflows PR's own scope note).

Explicitly unverified

Whether a --add-dir-mounted path is visible to a plugin subagent's Read tool the same way it is to the main session is not empirically confirmed against a live cross-repo mount (no such mount exists yet — the credential it depends on isn't provisioned). Tracked as an empirical-test follow-up, not asserted here.

Test plan

  • CI green.
  • Cannot be functionally end-to-end tested yet — depends on the ci-workflows mount PR and the not-yet-provisioned credential.

🤖 Generated with Claude Code

Teaches code-reviewer, security-reviewer, and architecture-guardian
to recognize a REVIEW.md code-span citation shaped like
<relative-path>.md#<heading> and Read that path (possibly mounted
outside the current repository via --add-dir) for the full criterion
behind a thin REVIEW.md line, before finalizing an overlapping
finding. Repo-agnostic per this repo's own design rule - no
consuming repo or path is named. Read is already granted to all
three agents; this is instruction-only.

Verified against code.claude.com/docs/en/memory (--add-dir semantics)
and code.claude.com/docs/en/code-review (REVIEW.md citation shape,
confirmed unrelated to this plugin's own consumption path) before
writing this change, per this repo's CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01V1x1KNkkjSe2CjbuTb4Gis

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fa41832269

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/review/agents/code-reviewer.md Resolved
code-reviewer, security-reviewer, and architecture-guardian were told
to "Read that path" for a citation shaped like
<relative-path>.md#<heading> without splitting off the #<heading>
fragment first. The Read tool takes filesystem paths, so the literal
citation (fragment included) is not a valid filename and the agent
could report an existing file as an unresolved citation.

Each agent now splits the citation at the fragment separator, Reads
only the .md file, then locates the heading section within it. Applied
to all three duplicated copies of the instruction plus the CHANGELOG
entry describing the same (buggy) behavior.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@kyle-sexton
kyle-sexton enabled auto-merge (squash) July 16, 2026 05:53
@kyle-sexton
kyle-sexton disabled auto-merge July 16, 2026 05:56
@kyle-sexton
kyle-sexton merged commit 444c3a0 into main Jul 16, 2026
1 check passed
@kyle-sexton
kyle-sexton deleted the feat/review-plugin-cross-repo-citations branch July 16, 2026 12:18
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.

1 participant