Kurvball
Kurvball is where a team agrees on what to build. Its repository holds a Tauri
desktop app (apps/desktop), a Fastify API (apps/api), a worker (apps/worker) and shared packages. It
has its own architecture gate, so here Ashlar runs beside it, as a proof that it fits a repository it wasn't
built in.
The config, two reach scripts and the script live in
examples/kurvball/. Kurvball's
repository is private, so the script runs only with access to it. What it shows is what it
printed.
Run it
Section titled “Run it”examples/kurvball/prove.shIts config
Section titled “Its config”import { defineConfig } from '@kurvball/ashlar';
export default defineConfig({ include: ['apps', 'packages'], ignore: ['node_modules', 'dist', 'out', 'target', 'coverage', 'storybook-static', '.turbo', 'generated'], onboard: { owner: '@daguenette', areas: ['packages/*', 'packages/modules/*'], }, apps: [ { root: 'apps/desktop', stack: 'tauri', main: ['src-tauri'], renderer: ['src'], shared: [], features: ['src/features/*'], client: ['src/platform'], primitives: ['src/ui'], areas: [], }, { root: 'apps/api', stack: 'web', main: ['src'], renderer: [], shared: [], areas: ['src/*'] }, { root: 'apps/worker', stack: 'web', main: ['src'], renderer: [], shared: [], areas: [] }, ],});- The desktop is a
tauriapp. Its main process is Rust, which Ashlar doesn't read, so its rules watch the TypeScript renderer: features insrc/features/*, the client insrc/platform, primitives insrc/ui.client-onlyandshared-is-pureknow Tauri's packages,@tauri-apps/apiand its plugins. - The API and the worker are
webapps with no renderer (renderer: []), so they have areas but no features. - Kurvball's domain modules become onboarding areas through
onboard.areas.
The API and the worker
Section titled “The API and the worker”They are web apps with renderer: []: one process, no features, no client and no primitives.
ashlar maplists no feature of theirs; the map is the desktop's.- The rules about two processes or about features don't apply to them. A brief for an API file carries
public-api-only,no-comment,no-disableandmax-lines, neverno-cross-process-import. ashlar onboardtakes each folder underapps/api/srcas an area. The worker names no areas (areas: []), so it has none. The domain modules inpackages/modules/*are areas throughonboard.areas.
Beside Kurvball's own gate
Section titled “Beside Kurvball's own gate”Kurvball's gate allows what Ashlar counts, so Ashlar takes a baseline first and holds every file to it. Its
first check fails, as it should; after check --shrink it passes, and from then on no file may get worse.
Here Ashlar's findings are a second opinion, not a gate Kurvball runs.
What it shows
Section titled “What it shows”At Kurvball's commit b4a57d57:
| Command | On Kurvball |
|---|---|
ashlar check, first run |
fails, as it should: Kurvball has no baseline yet |
ashlar check --shrink, then check |
3,316 files in about 2.3 s; the baseline holds about 439,000 counts, mostly max-lines and no-comment, and the check passes |
ashlar affected on a desktop feature's file and an API route |
179 tests |
ashlar map |
18 features, 2 with the reach scripts the example adds, 274 proofs |
ashlar onboard |
53 areas and 71 questions: what to know before changing each area, how to reach 16 features, who owns what, and whether the README is current |
The baseline is large. That is the point of the ratchet: nothing is cleaned up in a sweep, and no file may get worse.
The two reach scripts, for the Ideas and Settings features, are written from the labels in Kurvball's code. Kurvball has no drive command, so the map shows them as data; nothing walks them.