coding.sgit.ai · the sgit.ai network · release v0.2.0

The style guide
that measured itself

Five languages — Python, JavaScript, HTML, CSS, Bash — as they are actually written across 217,266 lines of code. Every convention here was derived by counting, not from documentation, and where a documented rule and the code disagree, both are published with the numbers.

The rules, and the compliance → The house style → Why it looks like this →

31 documented rules. 0 linters. 4 guards, and 1 of them never worked.

This estate has a written style guide, which is more than most projects have. It lives in .claude/CLAUDE.md — an agent instruction file, not a published standard — and until the survey behind this site, nobody had ever measured whether the code obeys it.

# measured against 992 class-defining files

rule  7  ═══ banner on every file          100%   992 / 992
rule  8  no docstrings, ever              99.7%  3 violations
rule 22  __init__.py stays empty            99%   299 / 302
rule 21  one class per file                 90%   187 / 208 sampled
rule  9  no _ prefix on private methods     91%   97 violations
         import alignment                   39%   321 / 817  # not a rule at all

# enforcement surface, entire:
tests/ci/  4 structural guards  +  1 that has never matched anything

The last line is the one worth reading twice. A guard that passes because it cannot match what it guards against →

The four decisions everything else follows from

These are not style preferences with a rationale bolted on afterwards. They are four choices that produce each other, in a codebase where 61% of commits were written by an agent and a human still has to review the result.

decision 1

Runtime validation, not static analysis

There is no type-checker anywhere. Type_Safe from osbot-utils validates at construction instead, so a value that exists is a value that is valid — and a generated mistake fails at the point of the mistake rather than in a checking pass nobody runs.

How it works →
decision 2

The type is the validation

Zero raw primitives. Safe_Str__SSM__Path, Safe_Int__Port, Safe_Str__Node__Name27 constrained types in one directory. Naming a type is how a domain concept gets recorded.

The pattern →
decision 3

One idea per file, and the filename says which

The filename is the class name. __init__.py stays empty, so nothing is re-exported and there is exactly one import path to anything. A symbol is locatable by constructing a path — no index, no grep.

Across all five languages →
decision 4

A model is a primary reader

Runtime validation, constrained primitives, no re-exports, banners instead of docstrings, single-owner boundaries and the markdown twin all read as one design once you accept that. The most original page here, and the least verifiable.

The argument →

The five languages

One is documented. Four are not, and reconstructing them by counting is most of what the survey behind this site did.

3,999 files · 217,266 lines

Python

Double-underscore naming families — Schema__ 614, Safe_Str__ 290, Enum__ 185 — one class per file, ═══ banners, and column-aligned assignments. Nine conventions in eleven lines.

The deepest one →
50 files · no build step

JavaScript

Native web components, no framework and no bundler. A three-file triplet per component, a self-locating base class, and a versioned CDN path instead of a lockfile. Written down nowhere until now.

The component system →
38 CSS · 37 HTML

CSS and HTML

Alignment carried into property values, every colour a token, and plain class names because shadow DOM removes the problem BEM exists to solve. In the markup: 2-space indent, ARIA everywhere, and data-* as the behaviour hook.

CSS → ·
HTML →
5 .sh files

Bash

Five shell scripts in 217,266 lines. Shell is not written here, it is generated from 15 typed Python classes that each render a fragment — a real trade, argued rather than reported.

The generated-shell pattern →

What this site does not claim

Nothing here is enforced by tooling. Compliance of 100%, 99.7% and 99% is achieved entirely by discipline, which is impressive and exactly as fragile as it sounds. Four of the five languages have no documented rules at all. Import alignment is 39%. Two CI guards are claimed and are not in the guard table. And the most interesting page on this site is a position with the evidence attached, not a finding.

There is also one thing this site was commissioned to do and does not: extract its counts from the repository at build time. This repository holds the website, not the code it describes, so every number here is written in from a dated survey instead — 2026-08-24 — by a generator, with CI failing the release if a published number has drifted from it. That closes the drift-within-the-site problem and leaves the freshness problem open. The full account →

Where this sits

One site in a network of them, each documenting a piece of the same project, each published the same way: a brief, a site written from it, a gate, a tag, a deploy.

the brief

The source documents

All 13 of them, 12,983 words, published in full — because a site that argues from a document should let you read the document. Including the two published with their own redaction lists redacted.

Read them →
the other half

open-source.sgit.ai

That site carries the argument — that someone still needs to understand what is underneath. This one carries the artefact: what that position produces when you write 217,000 lines under it.

↗ open-source.sgit.ai
the network

The sibling sites

What each one owns and where the boundaries fall — including the broken CI guard, which belongs to two sites at once and is told as a different story by each.

The network →
disclosure

Who publishes this

The sgit project publishes this site and wrote the code it measures. That is a conflict worth stating on the way in rather than in a footnote.

The disclosure →