Skip to main content
rule CX Codex

caliber-conventions — Claude Code rule for TypeScript projects

The caliber-conventions rule sets conventions for Caliber TypeScript CLI development. Use it to guide an agent working on project code, tests, and commits.

MIT ★ 1,319 updated 2026-09-24

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/caliber-conventions.mdc
Open on GitHub

What caliber-conventions does

The rule sets import and typing practices: ESM imports use .js extensions, including in TypeScript sources, and unknown is preferred to any because ESLint warns about explicit any. Tests belong in __tests__/ directories beside their source files; shared test setup lives at src/test/setup.ts.

Commit messages use the Conventional Commits prefixes feat:, fix:, refactor:, and chore:. The rule also locates constants and specifies resolveCaliber() for resolving the CLI binary path. File-language detection is driven by an LLM through src/ai/detect.ts; collectFingerprint() runs asynchronously and includes LLM enrichment. The project requires Node.js 20 or later.

What it helps with

  • use .js extensions in ESM imports
  • replace explicit any types with unknown
  • put tests in adjacent __tests__/ directories
  • format commit messages with Conventional Commits prefixes
  • check the Node.js requirement and CLI binary path resolution

Example prompts for the agent

  • Review this Caliber TypeScript code and align its imports and types with the project conventions.
  • Add tests for this module in a nearby __tests__/ directory and account for src/test/setup.ts.
  • Write a Conventional Commits message for this change with the appropriate prefix.

How to install caliber-conventions

Manually: put the files in place

.cursor/rules/caliber-conventions.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about caliber-conventions

How do I install caliber-conventions in Claude Code?

Save the rule as .claude/rules/caliber-conventions.md in your project.

What does caliber-conventions do?

It defines conventions for Caliber TypeScript CLI work, including ESM imports, tests, commit prefixes, and file-language detection.

Which Node.js version does caliber-conventions require?

The project requires Node.js 20 or later.

Source text

caliber-conventions.mdc · MIT
---
description: Caliber project conventions for TypeScript CLI development
alwaysApply: true
---

- ESM imports with `.js` extensions (even for `.ts` sources)
- `unknown` over `any` — ESLint warns on explicit any
- Tests in `__tests__/` dirs next to source, global setup in `src/test/setup.ts`
- Conventional commits: `feat:`, `fix:`, `refactor:`, `chore:`
- No hardcoded file→language mappings — detection is LLM-driven via `src/ai/detect.ts`
- `collectFingerprint()` in `src/fingerprint/index.ts` is async with internal LLM enrichment
- Constants in `src/constants.ts` and `src/scoring/constants.ts`
- `resolveCaliber()` from `src/lib/resolve-caliber.ts` for CLI binary path resolution
- Dev branch: `next` · Stable: `master` · Node >= 20

© caliber-ai-org · MIT · caliber-ai-org/ai-setup

Similar IDE rules

All IDE rules for Programming languages →

From the same set17

The whole set →
caliber-onboarding caliber-onboarding — a rule for Claude Code and Codex that checks whether Caliber configs are synced before the agent responds to your first message. If sync is not set up, it offers to run /setup-caliber in about 30 seconds. CX Codex +1 ★ 1,319repo stars llm-layer llm-layer pins the conventions for model-provider code: the LLMProvider interface, config lookup, seat-based handling and usage tracking. Scoped to src/llm/**. CX Codex +1 ★ 1,319repo stars testing Defines Vitest testing patterns for Caliber, enforcing colocated test suites, environment isolation, and global LLM mocks. CX Codex +1 ★ 1,319repo stars testing-patterns testing-patterns is a Claude Code rule for Vitest conventions: test locations, LLM mocks, and running a single spec. CX Codex +1 ★ 1,319repo stars scoring-patterns scoring-patterns defines coding rules for the src/scoring/** directory. It keeps scoring checks deterministic without external network calls or random values. CX Codex +1 ★ 1,319repo stars llm-patterns The llm-patterns rule sets patterns for LLM providers in a project. Use it when provider interfaces, model settings, CLI errors, or streamed responses need consistent handling. CX Codex +1 ★ 1,319repo stars caliber-pre-commit caliber-pre-commit — a commit-time rule: it checks for the Caliber git hook and, when the hook is absent, syncs and stages your agent config files. CX Codex +1 ★ 1,319repo stars find-skills find-skills discovers community skills from the Caliber registry and installs them directly into your coding session. CX Codex +1 ★ 1,319repo stars

Project sponsors

Companies that keep this analytics open