Coding Standards
Coding standards define the engineering rules your code must follow and why. Linked validators check those rules against the codebase and report violations.
Standard definitions
Section titled “Standard definitions”A standard brings the rule, its reasoning and supporting examples together.
| Part | What it defines |
|---|---|
| Code and title | The standard’s identity. |
| Rule | The required engineering practice or constraint. |
| Reasoning | Why the rule exists, with optional context and consequences. |
| Examples | Correct and incorrect code, with explanations. |
| Related standards | Links to related rules and the standard this one supersedes. |
Lifecycle and versioning
Section titled “Lifecycle and versioning”| State | Meaning |
|---|---|
| Draft | Available for authoring; not enforced. |
| Active | Published and available for enforcement through its enabled validators. |
| Deprecated | Retained for reference; no longer binding. |
Edits preserve earlier versions. Standards and validators have separate version histories, so a rule’s explanation and its checks can evolve independently. Owners and administrators can edit, publish and deprecate standards; members can read them.
Validators
Section titled “Validators”Each validator performs one check. A standard can have several validators, each with its own scope and configuration.
| Setting | What it controls |
|---|---|
| Check | The condition the code must satisfy. |
| File scope | Which file paths to include or exclude. |
| Severity | Whether a violation is an error, warning or informational result. |
| Message | The explanation reported when the check fails. |
| Fix guidance | Instructions and examples for correcting a violation. |
| Enabled | Whether the validator participates in validation. |
Check types
Section titled “Check types”| Area | Checks |
|---|---|
| Files and structure | Required or prohibited files, directory layout and naming conventions. |
| Code content | Required or prohibited patterns and file length limits. |
| Dependencies | Import restrictions, module boundaries and circular dependencies. |
| Contracts | Schema fields, indexes, function return types and exports. |
| Tests | Test placement and assertion patterns. |
Validation results
Section titled “Validation results”Validation reports identify the violated rule, severity and affected code, with locations where available. The checks configured for a workflow determine how those results affect progression.
Repository-authored rules include proof cases that demonstrate both a violation and compliant code. This establishes that a check can detect the problem it describes.