Skip to content

docs: add AGENTS.md with mandatory rendering & performance rules - #55

Merged
mkdir700 merged 1 commit into
mainfrom
docs/agents-md
Jun 24, 2026
Merged

docs: add AGENTS.md with mandatory rendering & performance rules#55
mkdir700 merged 1 commit into
mainfrom
docs/agents-md

Conversation

@mkdir700

Copy link
Copy Markdown
Member

将最近一系列性能优化(#24 / #26 / #28 / #31 / #34 / #53,及进行中的 #54)中必须遵守的原则固化到根目录 AGENTS.md,避免后续改动重新引入公开页面的每请求 SSR / DB 查询。

内容(精简,<60 行)

  • 渲染与性能:公开 [locale] 页面保持静态(禁 force-dynamic/headers()/cookies()/searchParams);显式 ISR;DB 数据走 unstable_cache+tag,admin 改动 revalidateTag;OG 图 generateStaticParams 预构建;昂贵转换缓存
  • LCP/资源:首屏不包 AnimateIn、LCP 用 next/image priorityoptimizePackageImports
  • Middleware:公开 2xx 去 NEXT_LOCALE cookie + CDN 缓存头;仅匹配页面与 /api/admin/*
  • 验证:改动后 bun run build 确认路由为 Static/SSG/ISR 而非 Dynamic(ƒ)

同时软链 CLAUDE.md → AGENTS.md,让 Claude Code 自动加载同一份规则。

纯文档 PR,不含任何代码改动(sponsor 优化在 #54)。

Codify the must-follow principles from the recent perf work (#24, #26,
#28, #31, #34, #53) so future changes don't reintroduce per-request SSR
or DB reads on public pages:

- public [locale] pages stay static (no force-dynamic / headers / cookies)
- explicit ISR + unstable_cache + revalidateTag for DB-backed public data
- prebuilt OG images, cached markdown transforms
- LCP not gated behind client animation; CDN-cacheable middleware

Symlink CLAUDE.md -> AGENTS.md so Claude Code loads the same file.
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
uc-website Error Error Jun 24, 2026 10:05am

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@mkdir700, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 38 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d00897fb-3d54-40d3-a705-0f15715cacbd

📥 Commits

Reviewing files that changed from the base of the PR and between 6a271b2 and 8a80d9e.

📒 Files selected for processing (2)
  • AGENTS.md
  • CLAUDE.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/agents-md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@mkdir700
mkdir700 merged commit 988f702 into main Jun 24, 2026
4 of 5 checks passed
@mkdir700
mkdir700 deleted the docs/agents-md branch June 24, 2026 10:06
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