Universal entry point for AI agents working on this codebase.
Before making any code change, agents must read and follow the relevant
rules in .agent/rules/. The rules are authoritative — if a rule contradicts
your training data, the rule wins.
| Item | Value |
|---|---|
| Language | TypeScript (strict mode) |
| Runtime | Node.js >= 22, Browser |
| Package manager | npm workspaces |
| Build target | ES2024, ESNext modules |
| Linter | ESLint (strict-type-checked) |
| Formatter | Prettier |
| Test framework | Vitest |
| Module system | ESM only |
sdk-js/
├── packages/ # npm workspace packages
│ ├── auth/ # @databricks/sdk-auth
│ │ ├── src/ # TypeScript source
│ │ └── tests/ # Vitest test files
│ └── databricks/ # @databricks/sdk-databricks (core library)
│ ├── src/
│ │ └── apierror/ # API error types (mirrors Go SDK apierr/)
│ │ └── codes/ # Canonical error codes
│ └── tests/
├── .agent/ # Agent configuration
│ ├── rules/ # Coding, linting, and logic rules
│ ├── skills/ # Reusable executable capabilities
│ └── prompts/ # Reusable complex prompt templates
├── .eslintrc.cjs # ESLint configuration
├── .prettierrc.json # Prettier configuration
├── tsconfig.base.json # Shared TypeScript compiler options
└── tsconfig.json # Root TypeScript project config
Rules live in .agent/rules/ as .mdc files. Each rule file is
self-contained and includes its scope, enforcement level, and examples.
| Rule file | Scope |
|---|---|
typescript.mdc |
TypeScript language and style rules |
packages.mdc |
Package scaffolding and conventions |
testing.mdc |
Testing conventions |
porting.mdc |
Porting code from the Go reference SDK |
libraries.mdc |
Library selection over hand-rolling |
# Install dependencies
npm install
# Build all packages
npm run build
# Run all tests
npm test
# Lint (check only)
npm run lint
# Lint (auto-fix)
npm run lint:fix
# Format (check only)
npm run format:check
# Format (auto-fix)
npm run format
# Type-check without emitting
npm run typecheck
# Clean build artifacts
npm run clean- Read the rules. Start with
.agent/rules/typescript.mdc. - Understand existing code. Read neighbouring files before editing.
- Run checks. After every change run
npm run format && npm run lint && npm run typecheck && npm run test && npm run test:browser. - Run tests. Confirm nothing is broken with
npm test. - Comments are sentences. Every comment must be a proper sentence ending with a period.
- Back up claims. When proposing a design decision or asserting a convention, provide concrete references (documentation, API links). Do not state something is "idiomatic" or "standard" without evidence. Use authoritative primary sources (language specs, official documentation) — not blog posts, archived repositories, or npm packages.
- Stay in scope. Only change what was asked. Each change should be reviewable in isolation.
- Never silently remove code. If a change requires deleting existing code or tests, explain what is being removed and why before proceeding. Get explicit confirmation from the user.
- Match existing patterns. Before writing new code, check existing code for established patterns. Do not invent new conventions when the codebase already has one.
- PR descriptions follow the template. Use the structure in
.github/PULL_REQUEST_TEMPLATE.md. When writing or improving a PR description, follow the workflow in.agent/skills/write-pr-description.mdc.