Skip to main content

Activatus Code Standards

This site documents the shared code standards used across all Activatus projects. Every project applies the same linting, formatting, structure and naming rules, so moving between codebases never means relearning the basics.

What's included​

StandardConfigPurpose
Human-Readable NamesNaming ruleEvery name is whole, readable words — variables, props, form fields, files, folders, everything
Readable CodeReadability rulesFile length, naming, single-purpose functions and tests
DocumentationDocs standardHow project docs are written and shown at /docs
ESLinteslint.config.mjsLinting rules for JS/TS/React/Next.js
Fixing Lint ErrorsError guideWhat each lint error means and how to fix it
Prettierprettier.config.mjsCode formatting
Stylelintstylelint.config.mjsLinting rules for CSS/SCSS/CSS Modules
EditorConfig.editorconfigEditor-level whitespace rules
direnv + nvm.envrc / .nvmrcAutomatic Node version switching on cd
AGENTS.mdAGENTS.mdAI agent context and agent skills
Working with AgentsOptionalGitHub repo, Linear project, status circles and asking before commits: all optional
CSS StylingStyling guideTailwind CSS, flexbox-first layout and global colour variables
Tech StackTech stackThe frameworks, libraries and versions we build on

Project layout is covered under Structure: folder structure, component organization, naming conventions, import organization and API routes.

Ontology​

The Ontology is the shared vocabulary for code: what each code word means. Each project adds its own product words in docs/product/ontology.md. Read both first.

Version History​

The Version History lists what changed in each version, and what a project has to do about it. Updating a project? Read only the versions newer than the one in its AGENTS.md.

For AI agents: you were pointed here​

A person has told you to follow the Activatus Code Standards. Follow Setup first. It installs the standards as the @activatus/code-standards package, checks which version the project is on, agrees with the person which standards apply, and sets them up. It covers new projects, projects on an older version, and projects that have never followed the standards.

After setup, follow every agreed standard in every change. Read a page when the work reaches its topic: Styling before writing styles, Docs before writing docs, and so on. The ones to read first are the Ontology, Human-Readable Names, Readable Code, Folder Structure and Component Organization.

If anything here is unclear, ask the person. Do not guess, and do not invent a rule.