Motivation or discipline? Software quality cannot depend on mood
- |
- November 2026 |
- 5 min read
Every software project goes through a phase in which everything seems to work on its own, the phase of the first few weeks, when the repository is clean, tests are written before anyone asks for them and every pull request receives a careful and timely review. Then come the first tight deadline, the first unhappy customer, the first colleague who moves to another project, and the same people who used to care about every detail start postponing, skipping a check, approving a change with a hasty comment of assent. Nobody has stopped caring about quality, the initial drive has simply run out, and the team learns the hard way that it has built quality on a resource that by its very nature gets used up.
From motivation to discipline
Motivation is a valuable but inherently variable energy, which depends on sleep, workload, team climate and a thousand factors that no technical lead can really govern. Entrusting it with the stability of a process is like designing a service that only works when traffic is low, because in moments of pressure, which is exactly when mistakes cost the most, it is the first thing to fail. Retrospectives that end with a commitment to pay more attention to tests almost always produce the same result, namely a couple of weeks of zeal followed by a return to the starting point, because the commitment is left to the memory and good will of individual people.
There is also a less obvious aspect, which concerns fairness within the group. When quality depends on motivation, the weight always falls on the same two or three most scrupulous people, who end up reviewing everything, fixing other people’s commits and reminding everyone at every release of the rules that nobody ever wrote down. It is a model that does not scale and that, over time, wears out exactly the people the team should be most interested in protecting.
The turning point lies in no longer considering discipline an individual virtue and starting to treat it as a property of the process architecture. A disciplined team is not made of people who never make mistakes, but of people who work inside a system in which the most common error is caught before it reaches production, regardless of who makes it and of the mood in which it is made. From this perspective a rule is no longer a reminder to be respected, but a constraint that the system enforces on its own, with the same impartiality with which a compiler rejects a wrong type.
It is the same principle that guides the design of a robust architecture, where nobody relies on the good manners of modules to respect boundaries but defines interfaces that make violating them impossible. Applied to the development process, it means identifying every behaviour that today depends on someone’s memory and asking at which point in the flow it can be made automatic, verifiable or at least visible.
Where to write the rules
The first natural place is the continuous integration pipeline, which must become the only road to the main branch. A branch protection that requires green tests, a passing static analysis and at least one approved review turns three good intentions into three non negotiable conditions, and it does so without anyone having to remind people out loud. In the same way a pre commit hook that runs formatting and linting removes at the root a whole category of sterile discussions in review, freeing attention for the questions that really deserve human judgement.
The same reasoning applies to conventions that seem purely stylistic. Conventional Commits verified by an automated check make the history readable and the changelog effortless to generate, while an explicit Dependabot configuration, with groups and cooldown windows, turns dependency updates from a chore nobody wants to do into a policy the system executes on a regular basis. Even the definition of done, if it remains a document on the wiki, is bound to be forgotten, whereas once it becomes a pull request template with boxes to tick and linked checks it starts to really exist.
Finally there is the configuration of assisted development tools, which today represents a further layer. Project instructions read by an AI assistant, shared commands and hooks triggered on every change are themselves encoded discipline, because they apply the same rules to anyone working on the repository, person or agent alike, without depending on their willingness to remember them.
The risk of poorly designed discipline
Encoding rules does not mean multiplying them indiscriminately. A pipeline that takes forty minutes for every commit, a linter that reports hundreds of irrelevant warnings or a checklist of twenty items produce the opposite of the desired effect, because the team quickly learns to look for the shortcut, to disable the check locally or to force the merge with administrative privileges. A rule that is routinely bypassed is worse than no rule at all, since it teaches that constraints are negotiable and conveys a false sense of security.
Sustainable discipline is therefore the kind that costs little to those who respect it and a lot to those who try to ignore it. Every check should be fast, understandable in its error message and tied to a concrete risk that the team recognises as real. When a rule no longer protects anything important it should be removed with the same seriousness with which it was introduced, because a lean process that is respected is worth more than a complete one that is ignored.
What is left for motivation
Moving discipline into the system does not make motivation superfluous, on the contrary it frees it from the wrong job. People no longer have to spend energy remembering to run the tests or to respect the commit format, and can invest it in the choices no pipeline knows how to make, such as designing a complex domain, simplifying a module that grew badly or caring for a user experience. Motivation goes back to being what it should be, a multiplier of value rather than a survival requirement.
The question to ask, at the next retrospective in which someone proposes to be more careful, is therefore very simple: at which point in the flow can this attention become a check. A team that answers this question consistently builds a process that holds even in the worst weeks, the ones in which motivation is missing, and it is precisely in those weeks that the real quality of a technical organisation is measured.