coder / aicommit

become the world's laziest committer
Creative Commons Zero v1.0 Universal
93 stars 1 forks source link

Support for a ~/.commits.md #4

Closed madflojo closed 2 weeks ago

madflojo commented 2 weeks ago

aicommit will read the COMMITS.md file in the root of the repository to determine the style guide. It is optional, but if it exists, it will be followed even if the rules there diverge from the norm.

In addition to the repository-level rules, what do y'all think about user-global-level set of rules that enhances (or overrides with a flag) the repository-level rules?

I sometimes like to include a bit of humor or pop culture references in my commit messages. It's my little personal touch. But it's not for everyone.

ammario commented 2 weeks ago

It's interesting. I'm not sure how to handle precedence though. Should the user guide take priority over the repo style guide? Should we just say "here's a user style guide" and let the guide itself describe how it should reconcile with the repo? I'd like to avoid a flag that determines precedence as the goal is laziness and I want a magical low-config experience. I don't want users pondering flags as they type aicommit in their terminal.

In your particular case, I'm not sure the model would do a good job of adding pop culture references or "wit". In general LLMs are bad at humor and subtlety, great at dry technical writing. I wonder if you add the the -c "use occasional humor and pop culture references" to some commits if it will create acceptable messages.

madflojo commented 2 weeks ago

I think repository always takes precedence with individual preferences being in addition when not conflicting with repository rules.

I bet this can be done with a prompt but will likely get mixed results.

Also,

While I think individual preferences are nice, I'm super lazy and the thought of dropping a commits.md in every repository I ever touch sounds like too much if I'm the only person using it.

So I think looking in the users home directory if a repository one is not found is also a nice feature.