Skip to content

[create-cloudflare] Add best practices links to generated AGENTS.md#12563

Open
irvinebroque wants to merge 4 commits intomainfrom
c3-agents-md-best-practices
Open

[create-cloudflare] Add best practices links to generated AGENTS.md#12563
irvinebroque wants to merge 4 commits intomainfrom
c3-agents-md-best-practices

Conversation

@irvinebroque
Copy link
Contributor

@irvinebroque irvinebroque commented Feb 14, 2026

No associated issue — this is a small content improvement to the generated AGENTS.md.

Summary

Updates the AGENTS.md content generated by create-cloudflare for new Workers projects to direct AI coding agents to fetch and understand the latest best practices before writing any code. Adds links to:

These are placed in the preamble, immediately after the initial retrieval directive ("STOP. Your knowledge..."), so agents encounter them before any other guidance.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: existing tests pass — the test asserts the output of getAgentsMd() is written to disk without checking specific content
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: this change adds links to existing public documentation pages

Open with Devin

Direct AI coding agents to fetch Workers best practices, Durable Objects
rules, and Workflows rules before writing code in new projects.
@irvinebroque irvinebroque requested a review from a team as a code owner February 14, 2026 23:21
@changeset-bot
Copy link

changeset-bot bot commented Feb 14, 2026

🦋 Changeset detected

Latest commit: acbdb2d

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@irvinebroque
Copy link
Contributor Author

/bonk are you able to review in this repository? if so please review

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@claude
Copy link
Contributor

claude bot commented Feb 14, 2026

Claude finished @irvinebroque's task —— View job


Changeset Review

  • Read changeset guidelines
  • Review changeset file
  • Post review results

All changesets look good

The changeset .changeset/agents-md-best-practices.md passes all validation criteria:

  • ✅ Version type: patch is appropriate for documentation improvements
  • ✅ Changelog quality: Clear, descriptive explanation of what's being added
  • ✅ Markdown headers: No h1/h2/h3 headers present
  • ✅ No analytics changes
  • ✅ Not a dependency update
  • ✅ Not an experimental feature

Before writing any code, fetch and understand the latest best practices:
- https://developers.cloudflare.com/workers/best-practices/workers-best-practices/
- https://developers.cloudflare.com/durable-objects/best-practices/rules-of-durable-objects/
Copy link
Contributor

Choose a reason for hiding this comment

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

I would probably just let the agent discover these two - otherwise you’ll probably end up with a little bit of context bloat?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

/bonk please update this file to include the links to Workflows and Durable Objects, but do not instruct the agent as directly as you do for Workers. And move the Workflows and Durable Objects links to the bottom of the Agents.md. It should be made clear to the Agent that these are optional, and to be referenced if the app that the user is building uses Workflows or Durable Objects

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh no bonk 😭

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 14, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12563

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12563

miniflare

npm i https://pkg.pr.new/miniflare@12563

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12563

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12563

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12563

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12563

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12563

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@12563

wrangler

npm i https://pkg.pr.new/wrangler@12563

commit: acbdb2d

…l references

Move Durable Objects and Workflows best practices links out of the
preamble and into a conditional section at the bottom of AGENTS.md.
These are now clearly marked as optional, only to be referenced if
the user's app uses those features.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants

Comments