Boxuan Li 11d8253215
Add new CommitWriterAgent to auto-generate commit messages from staged diffs (#1484)
* Add new CommitWriterAgent to auto-generate commit messages from staged diffs

This commit introduces the CommitWriterAgent along with its configuration and detailed task description. The agent is designed to analyze git diffs staged for commit and automatically generate succinct and relevant commit messages.

* Remove devnote section from yaml and add README
2024-05-02 09:42:55 -04:00
..

Introduction

CommitWriterAgent can help write git commit message. Example:

WORKSPACE_MOUNT_PATH="`PWD`" SANDBOX_TYPE="exec" \
  poetry run python opendevin/main.py -t "dummy task" -c CommitWriterAgent -d ./

This agent is special in the sense that it doesn't need a task. Once called, it attempts to read all diff in the git staging area and write a good commit message.

Future work

Feedback loop

The commit message could be (optionally) shown to the customer or other agents, so that CommitWriterAgent could gather feedback to further improve the commit message.

Task rejection

When the agent cannot compile a commit message (e.g. not git repository), it should reject the task with an explanation.