-
Notifications
You must be signed in to change notification settings - Fork 432
Added rules file to help Ai coding agents to write better code #1217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Thanks for putting this together, quite impressive that we have that many checks in Credo. I don't think this makes sense in Credo, the package, unfortunately. Have you considered pushing this as its own project? We could link it in Credo's README 👍 |
Sure thing, I could do that and thanks for takiing the time to answer and
for Credo itself.
…On Sat, Aug 30, 2025, 4:12 p.m. René Föhring ***@***.***> wrote:
*rrrene* left a comment (rrrene/credo#1217)
<#1217 (comment)>
Thanks for putting this together, quite impressive that we have that many
checks in Credo.
I don't think this makes sense in Credo, the package, unfortunately.
Have you considered pushing this as its own project? We could link it in
Credo's README 👍
—
Reply to this email directly, view it on GitHub
<#1217 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE55VEI24H3CDDM7BKB7A5L3QIAUNAVCNFSM6AAAAACFGKKWV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMZZGUYTQOJZGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I agree and disagree. I think most of this file should be removed, and instead the usage-rules.md file should just explain broadly how to use credo, i.e the mix task and its basic interface, how to skip rules if necessary, basic stuff that an agent should know. This file isn't a place to actually describe the conventions. That is what credo is for 😆 |
The idea with the file living in this project is so that it can change as the library changes etc. |
I understand that the file is quite extensive compared to some written for
other libraries but in this case the idea behind it was to prevent the
coding agent from making the mistakes before Credo needed to fix it. There
are some recurring mistakes that agents make. Maybe this could be trimmed
down to those specific mistakes and eventually reduced even more as the
models become better at Elixir coding.
…On Tue, Sep 2, 2025 at 9:46 AM Zach Daniel ***@***.***> wrote:
*zachdaniel* left a comment (rrrene/credo#1217)
<#1217 (comment)>
The idea with the file living in this project is so that it can change as
the library changes etc.
—
Reply to this email directly, view it on GitHub
<#1217 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE55VEKEJNDYOAAD245C6I33QWNUZAVCNFSM6AAAAACFGKKWV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENBVGQZDKMJTGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Two things
The only tenable usage-rules.md file would be one that explains how to run credo, configure it, etc. IMO. |
Of course it would be worth finding out from @rrrene if a trimmed down doc like the one I'm suggesting would even be welcome, but I do personally think something lightweight would be good 😄 |
The Usage-rules tool is a library that help ai coding agents write better Elixir code by synchronizing the coding agent rules file with the different rules for the libraries and frameworks used in a project.
Since the goal of this library is to statiscally analyze the code of a project for some coding-style that has become the de-facto standard for the Elixir community it makes sense to help coding assistant to not make those mistakes in the first place.
The usage-rules.md file contains a condensed version of Credo's rules and will be synced to the coding agent rules of those adopting the usage-rules tool. They will still be able to edit those rules to ignore the ones that they prefer not to include.
For those adopting an Ai work-flow it will hopefully help prevent the tango between the agent code generation and having to fix the code generated after the credo checks fails.