Skip to content

Coding agents guidelines#2298

Open
yoavcloud wants to merge 3 commits intoapache:mainfrom
yoavcloud:coding_agents_guidelines
Open

Coding agents guidelines#2298
yoavcloud wants to merge 3 commits intoapache:mainfrom
yoavcloud:coding_agents_guidelines

Conversation

@yoavcloud
Copy link
Copy Markdown
Contributor

I have noticed many recent PRs use coding agents, as well as some of my own.

With coding agents, folks contribute changes faster than before. However, code review may become a bottleneck. And with many PRs containing more changes than actually required, code reviews are getting harder.

I suggest adding an AGENTS.md file to the repo to provide guidelines for coding agents to ensure the project's progress really accelerates in this new age of software development.

This is a first version, and improvements are welcome.

@yoavcloud yoavcloud requested review from alamb and iffyio April 9, 2026 07:14
Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @yoavcloud

@iffyio and I were just discussing this the other week

I left some thoughts -- the repo specific isntructions (coding guidelines, testing) look great to me. The specific workflow stuff seems pretty generic and I think maybe just burns tokens unecessairly

AGENTS.md Outdated
Comment on lines +3 to +8
## General Agent Workflow
1. You will receive a coding task from your operator.
2. You will analyze the task and come up with a code change to complete it.
3. You will write unit tests to ensure your code change is working as expected.
4. You will run the commands in the Pre Commit Checks section below to ensure your change is ready for a pull request.
5. When instructed to open a PR, you will follow the instructions in the Pull Request Guidelines section below.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Points 1-2 seem unecessary for coding agents (isn't that what they do in general?)

AGENTS.md Outdated
2. You will add a unit test to check that the SQL statement is indeed unparsed. Follow the instructions in the "Unit Tests" section below.
3. You will analyze why the SQL statement is not parsed correctly, pointing to the code section that you think is faulty. See more info in the Analyzing Parsing Issues and General Coding Guidelines below.
4. You will fix the parsing issue and ensure that the new unit test passes successfully by running `cargo test --all-features`.
5. You will remove the first unit test that you added in step 2 and instead create "synthetic" unit tests to cover the code sections that you modified, to ensure that similar parsing issues are caught in the future.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we tell it to remove the unit test 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SQL statements I use are typically representative of what we encounter “in the wild.” They tend to be large and complex, with most of the SQL being irrelevant to the specific issue the change addresses. As a result, they are not ideal candidates for unit tests. To improve maintainability, I convert them into canonical forms.

However, this is my own workflow, so I removed it from the repo and will keep it local for now.

6. Run the commands in the Pre Commit Checks section below to ensure that all unit tests are passing and that the code is ready for a pull request.
7. You will create a PR in the with the changes you made, follow the instructions on Pull Request Guidelines below.

## General Coding Guidelines
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is good

@yoavcloud yoavcloud force-pushed the coding_agents_guidelines branch from ed861bb to a2141fc Compare April 10, 2026 13:12
@yoavcloud yoavcloud requested a review from alamb April 10, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants