Problem/Motivation
Skills are super capable of writing the Agents.md file in a way that makes it platform agnostic/flexible.
We have a nice default template here: https://github.com/amazeeio/drupal-agents-md
Proposed resolution
I have used that template, and split it up in sections.
You can see the Skill herehere.
I've split the template up in sections https://git.drupalcode.org/project/surge/-/tree/1.0.x/surge/skills/drupal-agents-generator/references/sections?ref_type=heads and environment specific parts:
Using the detection script at https://git.drupalcode.org/project/surge/-/tree/1.0.x/surge/skills/drupal-agents-generator/scripts?ref_type=heads
We can make sure that the Skill can detect the local environment setup, and implement (and fill in) placeholders for the right sections.
In a new issue we will make sure we finalise and tune it so that it gets the right level of information.
The concept is clear.

Comments
Comment #2
ronaldtebrake commentedComment #4
ronaldtebrake commentedAgents
composer surge agents-generate- GenerateAGENTS.mdfile for AI coding agentsThe
agents-generatecommand creates a customizedAGENTS.mdfile tailored to your Drupal project by:composer.jsonsurge.yamlHow It Works
Environment Detection: The command scans your project for indicators (
.ddev/,.lando.yml,compose.yaml, etc.) to determine your development setup.Template Composition: It assembles
AGENTS.mdfrom modular markdown templates:src/Agents/templates/sections/) - Drupal patterns, code style, security guidelinessrc/Agents/templates/environments/{env}/) - Setup, commands, debugging specific to your environmentPlaceholder Replacement: Environment-specific values are automatically filled in:
Customization: You can customize the output by:
surge.yaml:.surge/agents/:surge.yaml:The generated
AGENTS.mdfile provides comprehensive guidance for AI coding agents working on your Drupal project, ensuring consistent code quality and adherence to your project's conventions.