Skip to content

Add PR writing guidance for AI assistants to AGENTS.md - #401

Merged
rcantin-w merged 3 commits into
mainfrom
add-ai-pr-guidance
Sep 17, 2026
Merged

rcantin-w merged 3 commits into
mainfrom
add-ai-pr-guidance

Conversation

@rcantin-w

Copy link
Copy Markdown
Contributor

What does this change?

Ports the PR-writing guidance from wellcomecollection.org's AGENTS.md (wellcomecollection.org#13493) into this repo, adapted for content-api. Adds a "Writing style" and "AI-assisted PRs" subsection to the Pull Requests section: casual/terse tone, ticket-ref placement, no "no alarms needed" conclusions in the risk section, and a collapsed <details> block for genuinely non-obvious reasoning aimed at future AI-assisted debugging.

Also fixes the existing PR section to use the template's actual heading ("Have we considered potential risks?" instead of "Risks").

The writing-style guidance references British spelling via a .github/copilot-instructions.md file, which this repo didn't have. So this PR also adds a trimmed-down version of wellcomecollection.org's copilot-instructions.md - just the parts that apply to a backend API: British spelling, duplication/code reuse, Prismic API-ID naming conventions (relevant since content-api reads from the same Prismic repo), and PR review guidance for stale TODOs, dead code, and doc updates. Dropped the Next.js-specific bits (accessibility, component naming, workspace structure) since they don't apply here.

How to test

Docs-only change - read through the updated Pull Requests section and copilot-instructions.md and check the guidance reads clearly and matches how we actually want PRs written here.

Have we considered potential risks?

None - it's documentation that only affects how future PR descriptions and Copilot reviews get written, not any runtime behaviour.

For AI / future debugging

The "how to test" example originally pointed at a hosted domain (api-stage, then api-dev) by mistake - content-api's local dev server actually runs on port 3002 (api/package.json's dev script sets PORT=3002 explicitly, overriding the ?? 3000 fallback in server.ts), so the example links localhost:3002 instead.

Whether GitHub's AI-attribution footer is suppressed for this repo (the reason wc.org gives for its own _Written by Claude Code._ signature) couldn't be confirmed via the GitHub API - no such toggle showed up in repo or org settings. Kept the signature line anyway since it's cheap insurance and matches the sibling repo's convention.

Written by Claude Code.

rcantin-w and others added 2 commits September 17, 2026 13:29
Ports the PR writing conventions from wellcomecollection.org (PR #13493), adapted for this repo: verbatim template headings, ticket-ref placement, casual/terse tone, and a collapsed section for non-obvious reasoning aimed at future AI-assisted debugging. Adds copilot-instructions.md so the British-spelling reference resolves to something real, plus Prismic naming and dead-code/duplication review guidance relevant to this repo.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

馃煛 Changes recommended

The new risk-writing guidance conflicts with the existing template's request for mitigation and alarm details.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds guidance for PR writing and AI-assisted reviews, plus backend-specific coding standards for the Content API.

Changes:

  • Expands PR description style and AI-assisted authoring guidance.
  • Adds British English, reuse, Prismic naming, and review guidance.
  • Corrects the PR risk-section heading.
File summaries
File Description
AGENTS.md Adds PR writing and AI-assisted PR guidance.
.github/copilot-instructions.md Adds Content API coding and review standards.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread AGENTS.md Outdated
"State the risk and stop" read as license to drop the mitigation/alarm info the PR template actually asks for. Only the boilerplate "no alarms needed" conclusion should go, not the substance.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@rcantin-w
rcantin-w marked this pull request as ready for review September 17, 2026 12:49
@rcantin-w
rcantin-w requested a review from a team as a code owner September 17, 2026 12:49
@rcantin-w rcantin-w moved this from Backlog to Ready for review in Digital experience Sep 17, 2026
@rcantin-w
rcantin-w merged commit be58637 into main Sep 17, 2026
5 checks passed
@rcantin-w
rcantin-w deleted the add-ai-pr-guidance branch September 17, 2026 13:10
@rcantin-w rcantin-w moved this from Ready for review to Done in Digital experience Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Archive

Development

Successfully merging this pull request may close these issues.

4 participants