Skip to content

feat(ai): expose Prisma changelog to AI tools with machine-readable endpoint#7889

Closed
aidankmcalister wants to merge 1 commit into
mainfrom
dr-8494-expose-prisma-changelog-to-ai-tools-and-test-crawl-output
Closed

feat(ai): expose Prisma changelog to AI tools with machine-readable endpoint#7889
aidankmcalister wants to merge 1 commit into
mainfrom
dr-8494-expose-prisma-changelog-to-ai-tools-and-test-crawl-output

Conversation

@aidankmcalister
Copy link
Copy Markdown
Member

@aidankmcalister aidankmcalister commented May 11, 2026

Summary

  • Adds /changelog.md — a new machine-readable markdown endpoint in the site app that lists all Prisma changelog entries (version, date, tags, summary, URL) in reverse chronological order, with AI-guidance at the top directing tools to check it before implementing Prisma features
  • Updates site llms.txt and llms-full.txt to include the changelog in key pages and add a note about checking it for breaking changes
  • Updates docs llms.txt to include the changelog guidance note as a blockquote at the top, and adds "Check the Prisma changelog" as the first entry in common queries pointing to the machine-readable endpoint

Why

The Prisma changelog at /changelog is a stylized React page — not ideal for AI crawlers. This adds changelog.md as a clean, crawlable markdown index that AI tools can fetch to check for recent breaking changes before implementing any Prisma feature.

Test plan

  • curl https://www.prisma.io/changelog.md returns a clean markdown index of all entries with correct dates, tags, summaries
  • https://www.prisma.io/llms.txt includes the changelog entry and the machine-readable link
  • https://www.prisma.io/llms-full.txt includes the Changelog section with IMPORTANT guidance
  • https://www.prisma.io/docs/llms.txt shows changelog guidance at the top and in common queries

Closes DR-8494

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added machine-readable Prisma changelog endpoint for LLM access.
    • Integrated changelog guidance and references into the LLM index.
  • Documentation

    • Added disclaimer prompting users to verify information against the official Prisma changelog.
    • Added "Check the Prisma changelog for recent changes" reference link.

Review Change Stack

Adds /changelog.md — a clean markdown index of all Prisma changelog entries
that AI tools can fetch to check for recent breaking changes before implementing
Prisma features.

Updates site llms.txt and llms-full.txt to reference the changelog and include
guidance to verify against it. Updates docs llms.txt with the same guidance
and adds the changelog as the first entry in common queries.

Closes DR-8494

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment May 11, 2026 0:46am
docs Ready Ready Preview, Comment May 11, 2026 0:46am
eclipse Ready Ready Preview, Comment May 11, 2026 0:46am
site Ready Ready Preview, Comment May 11, 2026 0:46am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

Walkthrough

This pull request adds a machine-readable Prisma changelog endpoint at /changelog.md that dynamically generates Markdown-formatted release notes, integrates it into the LLMS indexing system with dedicated sections and links, and adds safety warnings to LLM-facing content directing models to verify changes against the actual changelog rather than relying on training data.

Changes

Changelog Machine-Readable Endpoint and LLMS Integration

Layer / File(s) Summary
Changelog Route Handler
apps/site/src/app/changelog.md/route.ts
New route handler exports revalidate = false and implements a GET handler that fetches and sorts release notes, derives per-entry summaries from metadata or async preview lookups, formats tags and publication dates, and returns the final Markdown document as text/markdown; charset=utf-8.
LLMS Site Index and Content Integration
apps/site/src/app/llms-content.ts
Changelog route is registered as a key page in the LLMS site index; both buildLlmsIndexContent and buildLlmsFullContent now include dedicated changelog sections with links to /changelog (human-readable) and /changelog.md (machine-readable) plus usage guidance.
LLM Safety Warnings and Changelog Links
apps/docs/src/app/llms.txt/route.ts, apps/docs/src/lib/llms.ts
Prepends a prominent warning notice to llms.txt instructing readers to verify Prisma changes against the changelog and not rely on training data; adds a "Check the Prisma changelog for recent changes" link to the common queries list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main objective: exposing the Prisma changelog to AI tools via a machine-readable endpoint, which aligns directly with all the changes made across multiple files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented May 11, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - May 11, 2026, 12:53 AM

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/site/src/app/changelog.md/route.ts`:
- Around line 15-23: The Promise.all mapping over entries makes a single
getReleaseNotePreview rejection fatal; update the entriesWithPreview creation
(the entries.map async callback that computes summary) to catch errors from
getReleaseNotePreview for each entry and handle them locally (e.g., return null
or a safe fallback summary) so one failing getReleaseNotePreview call won’t
reject the entire Promise.all; specifically wrap the await
getReleaseNotePreview(entry.slugs[0]) in a try/catch inside the async mapper and
use the caught error to set summary to null (and optionally log the error) while
still returning { entry, summary }.

In `@apps/site/src/app/llms-content.ts`:
- Line 240: The code in buildLlmsFullContent hardcodes a production URL for
fetching the changelog, bypassing the environment-aware baseUrl; update
buildLlmsFullContent to use the existing baseUrl (or a passed-in baseUrl
parameter) when constructing the fetch URL instead of the literal
"https://www.prisma.io/changelog.md" so preview/test runs use the same domain
logic as the rest of the function and avoid mixed-domain outputs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 15df2454-9ac0-46be-9e4c-ff6af68202b7

📥 Commits

Reviewing files that changed from the base of the PR and between d0a17f2 and 90c0d27.

📒 Files selected for processing (4)
  • apps/docs/src/app/llms.txt/route.ts
  • apps/docs/src/lib/llms.ts
  • apps/site/src/app/changelog.md/route.ts
  • apps/site/src/app/llms-content.ts

Comment on lines +15 to +23
const entriesWithPreview = await Promise.all(
entries.map(async (entry) => {
const summary =
entry.data.summary ??
entry.data.description ??
(entry.slugs[0] ? await getReleaseNotePreview(entry.slugs[0]) : null);
return { entry, summary };
}),
);
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Make per-entry preview failures non-fatal.

A rejection from one getReleaseNotePreview(...) call (Line 20) will reject the whole Promise.all and fail /changelog.md for all entries. Handle errors per entry so one bad note doesn’t take down the feed.

💡 Suggested fix
-  const entriesWithPreview = await Promise.all(
-    entries.map(async (entry) => {
-      const summary =
-        entry.data.summary ??
-        entry.data.description ??
-        (entry.slugs[0] ? await getReleaseNotePreview(entry.slugs[0]) : null);
-      return { entry, summary };
-    }),
-  );
+  const entriesWithPreview = await Promise.all(
+    entries.map(async (entry) => {
+      const preview =
+        entry.slugs[0]
+          ? await getReleaseNotePreview(entry.slugs[0]).catch(() => null)
+          : null;
+      const summary = entry.data.summary ?? entry.data.description ?? preview;
+      return { entry, summary };
+    }),
+  );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const entriesWithPreview = await Promise.all(
entries.map(async (entry) => {
const summary =
entry.data.summary ??
entry.data.description ??
(entry.slugs[0] ? await getReleaseNotePreview(entry.slugs[0]) : null);
return { entry, summary };
}),
);
const entriesWithPreview = await Promise.all(
entries.map(async (entry) => {
const preview =
entry.slugs[0]
? await getReleaseNotePreview(entry.slugs[0]).catch(() => null)
: null;
const summary = entry.data.summary ?? entry.data.description ?? preview;
return { entry, summary };
}),
);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/site/src/app/changelog.md/route.ts` around lines 15 - 23, The
Promise.all mapping over entries makes a single getReleaseNotePreview rejection
fatal; update the entriesWithPreview creation (the entries.map async callback
that computes summary) to catch errors from getReleaseNotePreview for each entry
and handle them locally (e.g., return null or a safe fallback summary) so one
failing getReleaseNotePreview call won’t reject the entire Promise.all;
specifically wrap the await getReleaseNotePreview(entry.slugs[0]) in a try/catch
inside the async mapper and use the caught error to set summary to null (and
optionally log the error) while still returning { entry, summary }.


IMPORTANT: Prisma changes frequently. Before implementing any Prisma feature, fetch the changelog to check for breaking changes or API updates. Do not rely solely on training data for Prisma APIs, configuration, or conventions — these can change between versions.

How to use: fetch https://www.prisma.io/changelog.md for a machine-readable index, then look up the relevant topic in the current documentation at https://www.prisma.io/docs.
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Avoid hardcoded production URLs in buildLlmsFullContent.

Line 240 bypasses baseUrl, so preview/test outputs become mixed-domain while the rest of this function stays environment-aware.

💡 Suggested fix
-How to use: fetch https://www.prisma.io/changelog.md for a machine-readable index, then look up the relevant topic in the current documentation at https://www.prisma.io/docs.
+How to use: fetch ${toAbsoluteUrl(baseUrl, "/changelog.md")} for a machine-readable index, then look up the relevant topic in the current documentation at ${toAbsoluteUrl(baseUrl, "/docs")}.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/site/src/app/llms-content.ts` at line 240, The code in
buildLlmsFullContent hardcodes a production URL for fetching the changelog,
bypassing the environment-aware baseUrl; update buildLlmsFullContent to use the
existing baseUrl (or a passed-in baseUrl parameter) when constructing the fetch
URL instead of the literal "https://www.prisma.io/changelog.md" so preview/test
runs use the same domain logic as the rest of the function and avoid
mixed-domain outputs.

@aidankmcalister
Copy link
Copy Markdown
Member Author

Superseded by cleaner branch.

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