house-style
Skill0 starsChanged 14 days agoMITView on GitHub
The estate's house style for TypeScript repos, written as numbered rules with the reason for each and the lint rule (or review) that enforces it, plus how a repo adopts the quality harness that checks them - the configs vendored from the library's house-style folder (Prettier at 120 columns, one tsconfig base, a thin ESLint config with six typed rules), one reformat commit, npm run check and check:fast, and this plugin's Stop and formatter hooks. Use when the user says "code style", "lint rules", "formatting", "house style", "set up the harness", "add Prettier", "why does lint flag this", or a repo brief says to adopt the house-style harness.
- Reads credentials
11 other projects use a version of this.
Adopted by
Most recently taken up by
- enstw/thesisbug2their own version, first seen Nov 23, 2026
- WGlynn/JARVIStheir own version, first seen Nov 16, 2026
- koaeraser/ARMStheir own version, first seen Nov 15, 2026
- RightBlogger/bloggingskillstheir own version, first seen Nov 1, 2026
- thescottking/b2b-pmm-skillstheir own version, first seen Oct 25, 2026
- CarriedWorldUniverse/nexustheir own version, first seen Oct 12, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- samuelgursky/davinci-resolve-mcp★ 4.5ksame name
- ajsahni/agents-office★ 601same name
- koaeraser/ARMS★ 40same name
- RightBlogger/bloggingskills★ 5same name
- KodingDev/skills★ 2same name
- WGlynn/JARVIS★ 2same name
- thisisdhika/skills★ 1same name
- CarriedWorldUniverse/nexus★ 0same name
- enstw/thesisbug2★ 0same name
- thescottking/b2b-pmm-skills★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- corpus/CLAUDE.mdCLAUDE.md
- architectSkill
- base-uiSkill
- bootstrap-vps-deploySkill
- codegraphSkill
- code-structureSkill
- corpus-docs-siteSkill
- corpus-flowSkill
- design-md-librarySkill
- design-pipelineSkill
- design-taste-frontendSkill
- diagnoseSkill
- diagram-designSkill
- grill-meSkill
- hallmarkSkill
- high-end-visual-designSkill
- impeccableSkill
- improveSkill
- industrial-brutalist-uiSkill
- minimalist-uiSkill
- no-commentsSkill
- orchestrateSkill
- plan-split-dispatchSkill
- poteto-modeSkill
- readme-docsSkill
- security-auditSkill
- stocktakeSkill
- thermo-nuclear-reviewSkill
- ui-test-plansSkill
- unslopSkill
- web-design-guidelinesSkill
- web-platformSkill
- whySkill
- writing-guidelinesSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 78
After any eslint --fix run tsc: no-unnecessary-type-assertion's autofix broke code in four ways, and vitest/valid-expect's can hang a …
- Distinctive: line 136
Measure: Run the house configs on a scratch copy and record the counts.
- Distinctive: line 139
Put the knip preset's config in before the first measurement.
- Very specific: line 148
Prettier: Add the config, .prettierignore, format and format:check, and commit that alone.
- Very specific: line 161
The gate: Add check, check:fast, check:conventions, house-style:sync, and test:clean or pretest where needed.
- Very specific: line 174
After
EditorWrite: if the repo has a Prettier config and an installed Prettier, the saved file is formatted with that Prettier, from …
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
House style
The house style is how the estate's TypeScript is already written. It was measured across 23 repos on 2026-11-09 and 2026-11-10 (the numbers are in the library's corpus/wiki/house-style.md): strict compilers, double quotes, semicolons, trailing commas, no enums, factories over classes, comments that explain why. The harness makes that style mechanical, so nobody hand-formats and nobody argues about it in review.
It has two layers:
- The repo's own gate.
npm run checkholds for a human, any agent and the deploy.npm run check:fastis its fast subset. - The Claude Code layer. This plugin's hooks format each saved file and run
check:fastbefore an agent can end its turn..claude/rules/web.mdandserver.mdcarry the area rules (the names are examples: a repo names its rules files after its own folders), and a short rootCLAUDE.mdnames the commands.
The configs live in the library's house-style/ folder, with its own version
(house-style/package.json) and tags house-style-v<version>. Each repo holds
a generated copy at vendor/house-style/, refreshed by
npm run house-style:sync -- <ref>. Nobody edits the copy by hand.
The rules
The base is @eslint/js and typescript-eslint recommended, untyped. The
compiler is the first gate, and the lint config adds only what a type checker
can't see: a rule that duplicates the compiler is worse than absent. Every
rule's entry in the shipped config carries its reason as a comment.
| # | Rule | Why | Enforced by |
| 1 | Every package extends one tsconfig.base.json: strict, noUncheckedIndexedAccess, noImplicitOverride, isolatedModules, noUnusedLocals, noFallthroughCasesInSwitch, NodeNext | The compiler catches the most for the least config | tsc, from vendor/house-style/tsconfig.base.json |
| 2 | Only erasable TypeScript: no enum (a string-literal union or an as const object), no namespace, no parameter properties (declare the field) | Every file can run under Node's type stripping; unions narrow | tsc (erasableSyntaxOnly), no-restricted-syntax (TSEnumDeclaration) |
| 3 | Type-only imports say type; relative imports carry their real suffix | Erased imports must be visible to the reader and the bundler | tsc (verbatimModuleSyntax), @typescript-eslint/consistent-type-imports, @typescript-eslint/no-import-type-side-effects (an all-inline import { type X } still leaves import {} behind) |
| 4 | Prettier at 120 columns, trailing commas everywhere, double quotes, semicolons. Markdown stays out | The house already writes this; a formatter makes it free | prettier --check (format:check), the formatter hook |
| 5 | _-prefixed names are deliberately unused; nothing else is | Says "unused on purpose" without a comment | @typescript-eslint/no-unused-vars |
| 6 | Every promise is awaited, returned or voided, and no async function goes where a void callback is expected | A handler that forgets await returns before its write lands | @typescript-eslint/no-floating-promises, @typescript-eslint/no-misused-promises |
| 7 | Await only what is awaitable | An await on a sync call (Drizzle on better-sqlite3) misleads the reader | @typescript-eslint/await-thenable |
| 8 | A switch over a union handles every member, or has a deliberate default | A new union member must not fall through silently | @typescript-eslint/switch-exhaustiveness-check |
| 9 | No type assertion the compiler already knows | A dead cast hides the next real type change | @typescript-eslint/no-unnecessary-type-assertion |
| 10 | No any: take unknown and narrow | any switches the compiler off for everything it touches | @typescript-eslint/no-explicit-any |
| 11 | No non-null ! in source: narrow with a guard. Tests may use it | ! is an unchecked claim; a guard is a checked one | @typescript-eslint/no-non-null-assertion (warning in tests) |
| 12 | No @ts-ignore; @ts-expect-error only, with its reason | A suppression must fail once the error is gone, and say why | @typescript-eslint/ban-ts-comment |
| 13 | No TODO or FIXME comments | Todos live in corpus/todos/, where someone reads them | no-warning-comments |
| 14 | No console outside scripts and CLIs. Tests stub and assert on it, so they may | Services log through their logger | no-console (off in tests, scripts and the console files) |
| 15 | App code reads process.env only in its env reader (config.ts, or the files the env option and conventions.json's env key name, kept the same). Tests, tool configs (*.config.*) and scripts aren't app code and may read it. A file allowed to print (a server entry, a seed CLI inside the app) still reads it through the reader | One place says what the app needs and fails early | n/no-process-env (off in tests, *.config.*, scripts and the env files; on in the console globs) |
| 16 | Named exports. A default export only where a framework or a runtime contract needs one (configs, route modules, scenes read as mod.default) | Names survive renames and search; imports agree | import-x/no-default-export |
| 17 | React follows the rules of hooks and the compiler rules | Mirrored state and impure renders are bugs the type checker can't see | react-hooks recommended (on web only) |
| 18 | Tailwind classes exist in the theme and aren't deprecated; class order is consistent once a repo has migrated | A typo'd class renders nothing and fails nowhere else | better-tailwindcss/no-unknown-classes, better-tailwindcss/no-deprecated-classes, better-tailwindcss/enforce-consistent-class-order (with tailwind.order) |
| 19 | Tests: no committed .only, every test asserts, expect(value, "why") is fine, and so is an expect inside a catch or a hook | A focused or empty test passes for nothing | @vitest/eslint-plugin recommended, vitest/valid-expect (maxArgs: 2), vitest/expect-expect (helpers named in assertFunctionNames), vitest/no-standalone-expect (hooks count as test blocks; an assertion helper is a plain function, not a class method), without vitest/no-conditional-expect |
| 20 | Stores and services are factory functions returning a documented interface; classes only for Error subclasses | The interface is the contract, and a fake is a plain object | review |
| 21 | interface for object shapes, type for unions and mapped types | One way to say each thing | review |
| 22 | PascalCase component files; lowercase or kebab-case modules | A file name says what it holds | review |
| 23 | Tests sit beside their source as *.test.ts, on vitest (atrium: test/ on node:test) | The test is found where the code is | review |
| 24 | Comments are prose that explains why, in full sentences; every exported member is documented; a decision carries its date; no commented-out code | The code says what; only the comment can say why | review |
| 25 | Exact pins: .npmrc with save-exact=true (and engine-strict=true) | An upgrade happens on purpose, and a too-old Node fails loudly | review |
Rules 20-25 have exceptions, so they stay out of lint and out of hooks.
references/review-checklist.md is the list a
reviewer works through; plan-split-dispatch's review gate points its finders
at it. A reviewer skips anything rules 1-19 already enforce.
Escapes are rare and say why: // eslint-disable-next-line <rule> -- <reason>,
or // @ts-expect-error <reason>. A tsconfig flag a repo can't take yet is
turned off in its own tsconfig with a dated comment that says what turns it
on (never a brief number: the estate's corpus rules keep those out of code).
A repo without noUncheckedIndexedAccess (the house base turns it on) also
turns @typescript-eslint/no-unnecessary-type-assertion off until the flag
lands: without the flag the rule flags every ! on an indexed read, and its
autofix strips them, so the flag's brief would have to put them back.
After any eslint --fix run tsc: no-unnecessary-type-assertion's autofix
broke code in four ways, and vitest/valid-expect's can hang a fake-timer test
(the adoption reference lists them).
imbatranimOS's NestJS backend keeps parameter properties and
emitDecoratorMetadata this way.
What an adopted repo has
vendor/house-style/: the generated copy, withREADME.mdas its header (version, source commit, and where the upgrade notes are). ESLint, Prettier and knip ignore it.- Root configs that extend the copy:
prettier.config.js(.mjsin a root without"type": "module"),tsconfig.base.json,eslint.config.js(calling the copy's named exporthouseStyle, a function of the repo's folders), aknip.config.jsthat spreads the knip preset (knip has noextends),.dependency-cruiser.cjsextending its preset, and a.prettierignorelisting*.mdandvendor/house-style/. A Tailwind stylesheet has@source notforvendor/. scripts/conventions.json: the source folders the two checkers walk, and any finding the repo accepts, each with its reason..git-blame-ignore-revswith the one reformat commit.- These scripts in the root
package.json:
| Script | What it runs |
check | node vendor/house-style/bin/check.mjs typecheck lint format:check check:conventions test: every step runs, the output is in node_modules/.cache/check/last.log. Run once, after the last code change |
check:fast | npm run typecheck, then ESLint on the changed and untracked files, from a small Node script in scripts/ (npm run typecheck && node scripts/check-fast.mjs: tsc -b alone misses web type errors when the web project sits outside its graph). Never tests. Target 15 s, up to about 30 s |
format, format:check | prettier --write ., prettier --check . --cache --cache-location node_modules/.cache/prettier-check/.prettier-cache (the formatter hook deletes the default cache) |
check:conventions | knip, depcruise <roots> --cache node_modules/.cache/dependency-cruiser, then node vendor/house-style/bin/check-base-ui.mjs and node vendor/house-style/bin/check-structure.mjs, each --warn-only until the repo's own Base UI or server brief drops it. Roots come from conventions.json |
house-style:sync | node vendor/house-style/bin/sync.mjs |
test:clean | Only where the tests would read a production .env: the tests, in a copy without .env*. check calls it instead of test |
- A short root
CLAUDE.md(under about 60 lines): what the repo is, "readcorpus/index.mdfirst", the commands, the places that mislead, the hard rules. .claude/rules/web.mdand.claude/rules/server.md, each with apaths:glob (web/src/**,server/src/**), under about 40 lines, carrying the base-ui and code-structure rules where they apply.web.mdalso carries the browser line (Chrome on Android decides what to build; Safari on iPhone, Firefox and desktop Safari must keep working; read theweb-platformskill before a feature newer than Baseline Widely available). A.gitignorethat ignores.claudeor.claude/*gets a!.claude/rules/line.- A repo with two npm projects keeps the tool pins in the
package.jsonof the folder that holdsvendor/house-style/(the vendored ESLint config resolves its plugins from where it sits), and a project inside that folder with its ownpackage.jsongives knipignoreBinariesforeslint,prettierandknip. The Stop hook finds each project'scheck:fastfrom the files saved in it.
Adopting it
One commit per step, on main, each with typecheck, tests, lint and build
green. references/adoption.md has the commands and
the traps each step hit in the repo briefs, and
references/recipes.md the recipes the house leaves to
a repo's own block: a folder's no-console or n/no-process-env, a NestJS
folder on recommendedTypeChecked, react-refresh, and an Astro repo.
- Measure. Run the house configs on a scratch copy and record the counts. A rule with more than about 20 real findings, or mostly false ones, goes to the owner with its counts before it is turned on. Don't loosen it quietly. Put the knip preset's config in before the first measurement.
- Vendor.
npm run house-style:sync -- house-style-v1.3.0copies the library'shouse-style/folder at that tag intovendor/house-style/(the first time, before the copy exists, run the library checkout'shouse-style/bin/sync.mjs house-style-v1.3.0from the repo root, or from the app's folder in a multi-project repo: the copy goes to the nearestpackage.json). Pin the devDependencies the house-style README lists; the sync reports any pin that differs. - Prettier. Add the config,
.prettierignore,formatandformat:check, and commit that alone. - The reformat.
npm run format, committed alone asstyle: format with Prettier. Its acceptance is the esbuild bundle compare: bundle every file before and after (CSS through esbuild'scssloader, JSON and YAML compared parsed), and list and explain each difference. The expected one is JSX text Prettier splits with{" "}, which renders the same. Then put the commit's full hash in.git-blame-ignore-revs, in its own commit.git config blame.ignoreRevsFile .git-blame-ignore-revsis an owner step. - tsconfig. Extend the vendored base and fix what the new flags find.
- ESLint. Extend the vendored config with the repo's roots, then fix each finding or list it in the outcome note with its reason.
- The gate. Add
check,check:fast,check:conventions,house-style:sync, andtest:cleanorpretestwhere needed. Timecheck:fastwarm with one changed file, andcheckin full. The dependency-cruiser preset andcheck:conventionsland in one commit: knip reports dependency-cruiser as unused until a script runs it. - The Claude Code layer. The root
CLAUDE.md, the two rules files, the.gitignoreline.
The hooks
This plugin ships them in hooks/hooks.json; a repo opts in by having the
files they look for, and nothing is committed to .claude/settings.json.
- After
EditorWrite: if the repo has a Prettier config and an installed Prettier, the saved file is formatted with that Prettier, from the config's folder (the nearest one up from the file, which may be the root's), so that folder's.prettierignoreapplies. A formatter error never fails the edit. - At
Stop: for each code file this session saved, the nearestpackage.jsonwith acheck:fastscript, from the file's folder up to the repo root, is run (each distinct one once), but only for a package where this session saved a code file since its last green run. Only when no saved file leads to one does it fall back to the session's folder, as it always did. On a failure the tail of the output goes back to Claude, which keeps working. It blocks again only while the failure changes, at most four times a turn; then the turn ends with a note to the user. It never runs acheck:fastwhose scripts run tests.
So check:fast must stay a typecheck and a lint: just-a-bot's tests read its
production .env. A repo with no check:fast and no Prettier config costs
nothing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

