flake.lock is the only pin source ( requirement 001 , decision 18). On a host with Nix, install packages.default , the runner wrapped with every tool by absolute store path, and call it by absolute path:
The kvb-quality-* analysis skills ( requirement 003 ) install from a checkout:
It mirrors skills/kvb-quality-* into ~/.claude/skills , ~/.agents/skills and, when ~/.codex exists, ~/.codex/skills ; installs the checkout into ~/.local/ /kvb-quality/venv ; and writes ~/.local/bin/kvb-quality-python , the interpreter every skill script starts with.
Hosts without Nix, CI and dev stacks use packages.image ( nix build .#image ), the OCI image of the same closure, published to ghcr by digest; the digest is in the release notes. A dev stack adds it as a compose service under the profile tools and a make target that runs it:
--staged needs no database. --base and --all add the deep tier, which reads the bundle of quality db update : mount it with - :/db:ro and pass --db /db . --rule , repeatable, runs only the named catalogue rules in any of the three modes, the checks the runner does itself and .qualityignore.yml staleness included; the database is then needed only when a named rule is of the deep tier, so quality check --base origin/main --rule test.text-presence runs without --db , and an id outside the catalogue stops the check with exit 2. quality db update --licenses , repeatable, also stores the registry licences of the exact pins at each named repository's HEAD and in its staging index for legal.dependency-license ; a pin without an SPDX licence there stays unchecked , and an update without --licenses keeps the stored licences. Run the service from a main checkout, because a linked worktree's .git file points outside /src .
Another repository calls the reusable workflows by the commit of a release tag. Each workflow builds its tools from the flake at the commit it is called at ( job.workflow_sha ), so that uses: line is the only pin, and Dependabot's github-actions ecosystem moves it to the release. quality.yml gates the range a pull request or push adds and scans every commit of it for secrets; tool.yml runs one tool of the flake, under its package name, over the whole tree:
A repository that holds .quality/architecture.yml gets the rules architecture.layer and architecture.cycle ( requirement 005 , decision 3); each new hit lowers the architecture score by 25. Python runs through lint-imports of import-linter, JavaScript through depcruise of dependency-cruiser, both bundled like every other tool. Each section is optional, every key inside it is required, and a malformed file stops the check with an error naming the key. source is the directory holding the code, . for the root, and for JavaScript also the scope of the cycle check; layers lists the highest layer first, and no layer may import one above it:
A on the finding's line waives it: nocheck: -- in any syntax, where a group such as coding names all its rules. A .nocheck file waives rules for its folder and every folder below it, one # nocheck: -- per line; a line naming nothing in the catalogue is left to the project's own lints, and a catalogue line without a reason stops the check with exit 2. Hard and changed_only rules are waived only in .qualityignore.yml , whose --base entries come from the base side, so a change cannot waive its own finding there: a .nocheck line naming a group waives only its other rules, and one naming nothing else exits 2. --all stops on a .nocheck or .qualityignore.yml entry that waives nothing.
A repository with its own waiver markers declares their spelling in .quality/ .yml ( requirement 007 ): directives lists groups in the schema of rules/ .yml ( tool , spellings , optional languages , marker , tight , position ), whose clean. then accepts, and pragmas_allowed lists the tool pragmas clean.tool-pragma lets through. A declared directive waives nothing; each side of a --base check reads its own file, and a malformed one stops the check with exit 2:
clean.em-dash refuses an added em dash in every text kind ( requirement 008 ); translation catalogues ( .po ) have no kind and stay out.
test.text-presence flags a test that reduces a source file to the presence of text, which core's docs/contributing/actions/testing/regression.md forbids: parse, render or run the file and assert on the result instead. It flags a test function (Python test* , a JavaScript or TypeScript test or it callback, PHP test* or #[Test] , Rust #[test] , Go Test*(t *testing.T) , Java @Test , Ruby test_* or an it block, a shunit2 test*() shell function) that reads a file, asserts at least once that the read text contains something, asserts nothing but containment, and neither parses, renders, writes nor runs anything. A test whose containment checks are all negative, such as a policy scan, stays clean, as does one on runtime output or on a fixture it writes itself. For Python the check is a builtin that follows the read text through assignments, slices, splits, regex extracts, comprehensions and line filters, through module constants, class attributes and setUp / setUpClass , and through helpers of the same file or of other modules of the repository it imports; a lint scan that collects the files missing a text and asserts the list empty counts as a positive check, one that collects the files holding a text as a negative one, also where it first narrows the scan to the files holding a scope text. What production code returns stays clean unless its name says it reads, and a lexer or address parse counts as running code, as does a test helper named for evaluating a condition or an order, such as holds or *_precedes_* . A YAML, JSON or TOML parse counts only where the condition that produces a finding uses the structure itself, a key, a type, a count bound or a leaf's equality with a value; a containment, regex, startswith or endswith on a string leaf of the parsed data is text presence, also where parsed structure merely selects or exempts files. A text read from one file and looked for in another is a cross-reference, and text the test plants into a read file, by + , replace , re.sub , a literal line beside it or a copy.deepcopy of parsed data, makes its check a different one, as does a comparison with a module of the code under test. The finding sits on the test's first line, so its nocheck goes there: def test_x(): # nocheck: test.text-presence -- .
The role web-app-cst-quality-check serves the scan as a web page ( requirement 002 ).
The speed criteria of requirement 001 and its recall bound on core run apart from test-unit and test-integration . The core checkout is only read.
Kevin Veen-Birkenbach kevin@veen.world
