[create-cloudflare] Add best practices links to generated AGENTS.md#12563
[create-cloudflare] Add best practices links to generated AGENTS.md#12563irvinebroque wants to merge 4 commits intomainfrom
Conversation
Direct AI coding agents to fetch Workers best practices, Durable Objects rules, and Workflows rules before writing code in new projects.
🦋 Changeset detectedLatest 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 |
|
/bonk are you able to review in this repository? if so please review |
|
Claude finished @irvinebroque's task —— View job Changeset Review
✅ All changesets look good The changeset
|
| 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/ |
There was a problem hiding this comment.
I would probably just let the agent discover these two - otherwise you’ll probably end up with a little bit of context bloat?
There was a problem hiding this comment.
/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
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
…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.
No associated issue — this is a small content improvement to the generated AGENTS.md.
Summary
Updates the
AGENTS.mdcontent generated bycreate-cloudflarefor 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.
getAgentsMd()is written to disk without checking specific content