Coding Standards

Coding Standards at a glance

gloria.dev Coding Standards helps you keep a project’s code aligned with the conventions the project actually wants. After standards sync into the web app, the library lives in two main browsing surfaces: Rules and Snippets. Rules collect the project’s guidance in dense expandable tables grouped by authority, while Snippets collect the reusable examples in a sortable table that can filter by language and open dedicated detail pages.

If the project has a lot of repeated shapes — DAOs, routes, migrations, tests, adapters, or other “another one of those” code — Coding Standards gives the team a shared place to see the intended pattern, reuse it, and check later work for drift. Shared colored tags help the same categories stay recognizable across Rules, Snippets, and Findings.

The loop: extract → use → check

Extract

The extracting-coding-standards skill reads the repo’s configs, docs, and repeated source patterns, then turns them into stable rules and canonical snippets with placeholders. Once a team approves the extracted set and syncs it, Rules becomes the place to browse the standards statements themselves, while Snippets becomes the place to browse the worked examples they point to. Rules stay grouped by authority, expand in place for detail, keep stable #rule-... anchors for direct links into the library, and keep the companion skill prompt visible at the top so the current standards stay easy to hand back to an agent.

Use

The using-coding-standards skill comes into play before your agent writes pattern-shaped code. It asks for the canonical snippet first, then lets the agent adopt a strong match, adapt a partial match, or move on when the change is genuinely one off. In the web app, the Snippets table helps a person sort the library, filter it by language, open a detail page for a specific example, use its copy actions, and follow links back to the related rules. Those detail pages show syntax highlighted code for supported languages, switch to safe plain text when the language marker does not work, and keep placeholder tags visible so the reusable parts stay obvious.

Check

The checking-coding-standards skill compares written code with the registered rules and snippets. It can check a single change or run a broader audit across the standards library, depending on how much confidence the moment calls for. In the web app, that drift shows up as Findings in a table that links each result back to the rule or snippet involved and lets a person dismiss an item directly from the row. The page shows one Last checked summary for the whole run instead of repeating check details on every finding, so it stays easier to scan while deciding what to fix first.

Why this exists

Coding Standards is the code-quality side of gloria.dev’s intent-versus-implementation model. The project’s intent lives in the registered rules and snippets; the implementation is the code being written today. The loop keeps both in view so drift shows up early, while the code is still easy to correct.

Go deeper