The problem
We’re in a company that is trying to become AI-First.
Agents don’t yet know how to adhere to .editorconfig. Which is basically a linting tool that helps IDE’s and other formatters to make the code adhere to some formatting rules.
Here’s a two step solution to the problem.
Step 1 - Add a quality gate to the build pipeline.
Bottom line for the resulting code that gets merged. This is formatted properly.
It provides a bottom line for the end result in the code, but it doesn’t per se have a positive effect on the git history and the story that tells.
I don’t think we should prescribe how people should work. But I do believe that we can offer something that has some batteries included. So anyone can get a running start, without having to decide how to handle things themselves or use discipline.1 So in comes, step 2.
Step 2 - Provide a batteries included local development experience
Depending on the project the baseline developer experience should strive to be smooth. That means a low ceremony setup that allows for extension.
Depending on the project a setup could include:
- code styling.
- company specific tooling to improve quality of life.
- access to private shared resources such as a nuget feed.
- other things that are relatively hard to adopt across multiple teams without being to restrictive.
An option in our case could be a pre commit git hook such that un-formatted code is never committed, keeping the git history clean.
TODO: provide the git hook.
The goal is to make it easy to to the right thing.
Footnotes
-
Willpower is a limited resource ↩