quality-kit
Copy-in quality gates that coding agents must pass before calling a task done, across JS/TS, Python, Dart/Flutter, and Kotlin/Android.
- Status
- Developer tool
- Form
- CLI + agent skill
- Built with
- TypeScript on Node 24
- Language packs
- js-ts · python · dart · kotlin-android
- Kit tests
- 234 (node:test)
- Gate
- shellcheck · actionlint · smoke adoptions
- Harness
- Claude hooks · AGENTS.md for Cursor & Antigravity
- Started
- Oct 2026
pnpm run audit -- --target ~/mycode/lenses
# quality-kit audit: ~/mycode/lenses
Packs: js-ts (host), python (fragment)
## Lock file
.quality-kit.lock.json missing: owned drift cannot be split into
stale (kit moved on) vs customized; re-run apply to record what
the kit wrote.
## Files (56)
### owned (42) — kit-owned; content must match the template
- drift: 5, missing: 32, current: 5
drift [js-ts] biome.json (no hash in lock file)
missing [js-ts] tools/quality/js-ts/gate.sh
missing [shared] .github/actions/check-baseline-growth/action.yml
missing [shared] tools/quality/run-secret-scan.sh
missing [shared] tools/quality/ratchets/compare.py
…
### seed (10) — copied once, then Target-owned
- present: 6, missing: 4
missing [shared] baselines/coverage.json
…
### merge-into (4) — kit content must appear in the destination
- merged: 4
## Wiring (2)
wired [js-ts] git hooks installed (husky)
wired [js-ts] package.json has a test script
## package.json scripts
match typecheck
missing lint:secrets
drift gate: pnpm gate:fast && pnpm test
…Overview
quality-kit wires one strict gate into git hooks, CI, and coding agents so "done" always means linted, typed, secret-free code.
Instead of a runtime dependency, it copies readable templates into each repo and provides audit and upgrade commands that only touch unedited files. Used across most of my repos.
Stack
Kit
- TypeScript + tsx
- Runs directly on Node 24 with no build step.
- node:test
- 234 tests covering wiring probes, lock-file upgrades, and templates.
- pins.json
- Single source of tool versions and checksums, verified by tests.
Shared layer
- Betterleaks + osv-scanner
- Checksum-verified secret and vulnerability scans.
- Ratchet compare
- Language-neutral baseline checks for coverage, complexity, and lint.
- lefthook / husky + CI
- Fast pre-commit checks; full gate on pre-push and GitHub Actions.
Language packs
- js-ts
- Biome, tsc -b, rev-dep, complexity ratchet, and c8 coverage.
- python
- ruff, basedpyright, tach, vulture, and coverage.py (standalone or fragment).
- dart
- dart format, strict analyze, dependency_validator, and pinned Flutter CI.
- kotlin-android
- ktfmt, detekt, Lint, Robolectric/Roborazzi, Kover, and convention plugins.
Kit CI
- shellcheck + actionlint
- Lints all bash and workflow templates before adoption.
- Smoke adoptions
- Weekly fresh-app scaffolds per pack to catch upstream tool breakage.
Engineering highlights
A Definition of Done agents can't skip
Claude Code hooks format/lint edited files on
PostToolUseand block completion onStopifgate fastfails. For Cursor and Antigravity CLI, the same rules merge intoAGENTS.mdand are verified by audit.Read the code:compose-agent-hooks.ts
Ratchets instead of disabling rules
Existing debt is baselined once; checks fail on any new or worsened finding, stale baseline row, or coverage drop.
--updateis blocked in CI, and PRs can't grow baselines without an explicitallow-baseline-growthlabel.Read the code:Ratchet contract (REFERENCE.md)
One desired-state model with lock-file upgrades
Audit, apply, and upgrade share one Desired State of owned, seed, and merge-into placements.
.quality-kit.lock.jsonhashes kit writes so upgrades safely replace stale files without overwriting local customizations.Read the code:desired-state.tslock-file.ts
Domain language built for agents
GLOSSARY.mdstandardizes Pack, Host, Fragment, and Placement terms. The skill runs only on invocation, defaults to a read-only audit, and lazy-loads each pack'sMODULE.md.Read the code:GLOSSARY.mdSKILL.md
Architecture
How apply, audit, and upgrade share one model
- Detect packsInfer stacks from repo files or override with --packs.
- ContributionsCombine Host packs, Fragments, and the Shared layer.
- Desired stateBuild the full inventory of files, CI, hooks, and scripts.
- audit · apply · upgradeDiff, seed missing files, or update only stale owned files.
- Lock fileRecord hashes to separate stale files from local edits.