Create AGENTS.md with /init
command
The /init
command is a powerful feature that helps the AI agent understand the specifics of your project. It automatically analyzes your codebase and generates a special AGENTS.md
file in your current project.
What It Does
When you run /init
, AiderDesk performs an analysis of your project's directory. It identifies key aspects like:
- The project's purpose and high-level architecture.
- Programming languages and frameworks used.
- Core dependencies and libraries.
- Existing coding conventions and patterns.
- Build and testing procedures.
Based on this analysis, it generates a detailed AGENTS.md
file that serves as a comprehensive guide for the AI agent.
Why It's Useful
Providing the AI with a well-defined project overview is crucial for receiving accurate and context-aware assistance. By using /init
, you ensure the agent has the best possible understanding of your project, which leads to:
- More relevant code suggestions.
- Better adherence to your project's established patterns.
- Faster and more efficient problem-solving.
How to Use It
- Switch to Agent Mode: The
/init
command is only available when you are in Agent mode. - Run the Command: Type
/init
into the prompt field and pressEnter
. - Analysis: The agent will begin analyzing your project. This may take a few moments depending on the size and complexity of your codebase. You will see log messages indicating its progress.
- File Generation: Once the analysis is complete, a new file will be created named
AGENTS.md
in your project's root directory. - Add to Context (Recommended): After the file is created, you will be asked if you want to add it to Aider's read-only context for all future sessions. Answering "Yes" will add the file path to your
.aider.conf.yml
, ensuring the agent always references it.
The AGENTS.md
File
The generated AGENTS.md
file is a markdown document created specifically for the AI to understand your project. It is stored at the root of your project.
This file is different from the AGENTS.md
located in the root of the AiderDesk application repository, which contains guidelines for AiderDesk's own development. The one generated by /init
is tailored to your project and is intended to be used by the agent during your work sessions.
You can review and even edit this file to provide more specific instructions or clarify details for the agent, further improving its performance on your project.
Example
You can find an example of the AGENTS.md
file generated for AiderDesk itself here.