This project sets up one agreed set of code conventions for all our repositories and enforces it. It covers formatting, naming, structure, complexity, documentation, testing, security, accessibility and more. Conventions are enforced in AI-generated code via hooks, and again at a mandatory merge-request gate for both AI and human contributions. Conventions are rules, not suggestions, but rule exemption is allowed on an approval basis.
Design phase. The vision and architecture are drafted and ready for review. No enforcement tooling is built yet.
Implementation targets the managed GitLab instance planned for early 2027. The current self-hosted GitLab (CE 13.9.4) is not a target. The conventions, shared configs and agent hooks don’t depend on GitLab and can be built before the migration.
| Document | What it covers |
|---|---|
| docs/vision.md | The problem, goals and non-goals, principles, scope, mandatory merge requests, the group-by-group rollout, success measures, risks |
| docs/architecture.md | Components, enforcement layers, key flows, the exception model, rollout mechanics, Ultimate vs Premium, tool choices, guarantees and limits |
| docs/conventions-catalog.md | All 19 convention categories with draft rule IDs, enforcement classes, tools and a language coverage matrix |
.conventions/ folder and must be approved by a conventions owner. Inline “disable” comments are not accepted.The Markdown files can be served as a documentation website. README.md is the home page, and files under docs/ keep their paths and relative links. CI builds the site image on every push and deploys it from the default branch.
To preview locally:
docker build -t conventions-docs .
docker run --rm -p 127.0.0.1:3000:3000 conventions-docs
Open http://localhost:3000. Edit the Markdown files and rebuild the image to update the preview.
Fenced mermaid code blocks render as diagrams in the browser. Mermaid 11.12.2 and its diagram modules are bundled in the image and served locally, with no CDN dependency. The Docker build appends site/footer.html to the image’s copies of the Markdown files to load site/mermaid.js. The source documents stay unchanged. If a diagram is invalid, the page shows its source and a rendering error. To upgrade Mermaid, update the pinned version and archive filename in the Dockerfile, then check the diagrams in a local preview.