paul-gauthier / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
12.55k stars 1.2k forks source link

Feature: Option to add conventions file to every chat #743

Closed rsweetland closed 16 hours ago

rsweetland commented 2 days ago

Issue

It would be great if my conventions file could be added to every Aider sessions by default. For example:

AIDER_CODE_CONVENTIONS=./CONVENTIONS.md

Effectively, this is system prompt for every edit.

This file grows in value as knowledge and training accumulates over time. When applied in a team setting, the productivity gains are shared. It could be worthwhile giving this file (or some set of files) special treatment.

Version and model info

Aider v0.40.6 Models: claude-3-5-sonnet-20240620 with diff edit format, weak model claude-3-haiku-20240307

maledorak commented 1 day ago

This is already implemented.

Just run aider CONVENTIONS.md or, for many files, aider CONVENTIONS.md app.py

You can even create some sort of bash script, which will run different 'workflows' of aider with a preloaded different set of files, for example, conventions for Python or TypeScript, etc.

rsweetland commented 1 day ago

Yes, I am aware of that option. Very nice how Aider made itself scriptable / composable.

Philosophically, I still think foundational instructions should get special treatment. An ideal implementation would not only insert the context automatically each time, it would place it in a priority position in the final prompt, above other context.

A well crafted conventions file (ie a prompt) is a productivity multiplier. It would make Aider adoption easier across a team as well. New member edits would "just work" because of an existing, already "tuned" conventions file.

Lastly, a note on my current workflow: I leave an Aider session open (occasionally running drop and clear) and add / remove files as needed. It's dead simple. Which is why I love Aider.

paul-gauthier commented 16 hours ago

Thanks for trying aider and filing this issue.

This looks like a duplicate of #660, so I'm going to close it so discussion can happen there. Please let me know if you think it's actually a distinct issue.

rsweetland commented 14 hours ago

Indeed a duplicate. I will comment there. Thank you for your work on this! Aider is wonderfully simple and powerful tool.