Repository navigation
Generate default AGENTS.md in new projects - #17122
Conversation
🦋 Changeset detectedLatest commit: 152cff7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
I wonder if we could have this opt-in instead? I mean a CLI option in Not everyone use AI, and not everyone use Claude. I think some people might complain about these files and an opt-in option would be more useful to everyone. To be clear, I don't think this is a bad idea! But, I'm more in favor of letting people choose. As a Linux user, I hate tools that clutters my |
|
Myself and Matthew discussed this (I was the opt-in faction), and agreed that adding this document doesn't make any harm. This is an additive document that doesn't make any harm to people that don't use AI or something else. Also, asking that to the user might cause friction during the installation process (we've been removing questions instead of adding them). Plus, the file is small on purpose. |
ArmandPhilippot
left a comment
There was a problem hiding this comment.
Oh, the file size wasn't an issue for me! I wouldn't mind if it contained more instructions (e.g. astro add, check for new features / what we recommend in https://docs.astro.build/en/guides/build-with-ai/#tips-for-ai-powered-astro-development).
I preferred to be cautious as I know some people are already wondering why there is a .astro folder in their project (probably something we should mention in "Project structure"), or "why I have a session log when I haven't enabled it", etc.
But, yeah, more questions during installation can be an issue too... So, no problem!
|
|
||
| Full documentation: https://docs.astro.build | ||
|
|
||
| Commonly needed references: |
There was a problem hiding this comment.
Honest question: why those references and not others? Is it based on most popular pages on the docs website? Things AI struggle the most?
I mean https://docs.astro.build/en/guides/styling/ (especially for Tailwind users...) or https://docs.astro.build/en/guides/framework-components/ (a lot of users use them) sounds like common needed references too. I know we can't be exhaustive. I was just wondering if it was random or if there was a reason behind it. 😄
There was a problem hiding this comment.
Yeah i was trying to balance between providing some useful links for common and non-obvious things (Content collections being the big one I thought was needed) and not just literally linking to every guide on the site. We can definitely curate this more but think it should stay at <10 at least.
This prompt can use some improvement to more strongly suggest referencing those pages for certain task. I agree that styling would be good, I'll add it.
There was a problem hiding this comment.
Ok, I've updated them to be more task-oriented so the agent knows to read them for those tasks, and added styling as well.
|
@ArmandPhilippot The reason for submitting this PR now is because in Astro 7 we have a new So setting up new projects to know to do this was the main motivation for this change. As far as making it an option, I don't think that's the right call for a few reasons:
|
Yeah, I was thinking more about people who are not software engineers and who create a website for their association or family members. I mean, I think this is also one of our target (that's why we explain in the tutorial they need a code editor, they can use a GitHub repository, etc.). I wasn't aware that this had already been discussed with Ema, and I appreciate you taking the time to provide the context. Everything is fine here! |
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
64d1987 to
74215c1
Compare
ArmandPhilippot
left a comment
There was a problem hiding this comment.
Seems good to me, thanks for the update!
|
@ArmandPhilippot Appreciate the conversation and review! |
We have a regular 1:1 :) |
Changes
create-astronow generates anAGENTS.mdin new projects with dev server background mode instructions and links to commonly needed Astro docs.CLAUDE.mdsymlink pointing toAGENTS.md, with a hard link fallback for Windows environments without Developer Mode.Testing
generateAgentsMdtests verifying the background dev command and documentation links are present.Docs