On this page

On this page

Change Discipline

Apply this checklist to every non-trivial change before handing it over for review, in addition to the operating protocol.

Completion Checklist

Before considering a change complete:

  • Confirm that the requested behavior is actually implemented.
  • Run relevant formatting checks.
  • Run linting.
  • Run type checking where applicable.
  • Run relevant tests.
  • Run the appropriate prek checks.
  • Validate Conventional Commits when working with commits.
  • Review the diff.
  • Check for unintended changes.
  • Check for unnecessary new dependencies.
  • Check for unnecessary new files.
  • Check architecture compatibility.
  • Check code-language compliance (Language Policy).
  • Check product-language compliance (Language Policy).
  • Check for sensitive information (Security).

Worked Example: Fixed a Flaky Login Test

The change under review: tests/e2e/login.spec.ts fails intermittently in CI, and the fix replaces a fixed three-second sleep with a wait for the session cookie.

Confirm the behavior first. A flaky test must pass repeatedly, not once:

mise run test e2e/login.spec.ts   # 20 consecutive runs, 20/20 green

Run the static checks:

$ mise run check
oxfmt   ok
oxlint  ERROR tests/e2e/login.spec.ts:4:3  no-unused-vars  `expect` is never used
tsc     not reached

Remove the leftover import and re-run. Passing looks like this:

$ mise run check
oxfmt   ok
oxlint  ok
tsc     ok

Review the diff:

$ git diff --stat
 tests/e2e/login.spec.ts | 8 +++++---
 1 file changed

Only one file changed: no new dependencies, no new files, and no architecture changes. The new test comment is in English (Language Policy), no UI text changed, and test credentials stay in the fixture rather than the diff (Security).

Commit. prek runs the same checks over the staged tree, and the message follows Conventional Commits:

$ git commit -m "test(e2e): wait for session cookie instead of fixed sleep"
prek  ok  format check, lint, secret scanning

Before committing, every check must pass, you must review the diff line by line, and you must be able to explain every change.

Green CI Is Not Proof

Passing CI is necessary but does not by itself prove that the implementation is correct.

Do not treat a green pipeline as a substitute for reviewing the diff and understanding whether the change is correct.