databricks-sdk-go
AGENTS.md84 starsChanged 8 months agoApache-2.0View on GitHub
Go SDK for the Databricks platform. Auto-generated API clients from OpenAPI specs, with hand-written authentication, configuration, and transport infrastructure. For scoped coding rules, skills, and prompt templates, see the .agent/ directory. Prerequisites: Go 1.25+ (see go.mod), goimports, staticcheck, gotestsum. CI runs make test across Go 1.25 and 1.26; lint and fmt run on Go 1.26. Code must compile on all CI versions — do not use stdlib APIs newer than Go 1.25 (the module's minimum version in go.mod) without a…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/00-claude-context.mdcCursor rule
- write-pr-descriptionSkill
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 0 are common, 2 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 62
Every file starts with // Code generated from OpenAPI specs by Databricks SDK Generator.
- Very specific: line 67
After regenerating, run make fmt and make lint.
- Very specific: line 74
Do NOT edit files in service/ or experimental/mocks/ — they are auto-generated and will be overwritten
- Very specific: line 75
Do NOT use context.Background() in production code (only in tests)
- Very specific: line 76
Do NOT add new files to service/ manually — update OpenAPI specs and run make codegen
- Distinctive: line 77
Do NOT add dependencies without checking license compatibility (Apache 2.0 required)
- Distinctive: line 78
Do NOT break backwards compatibility of exported APIs without discussion
- Very specific: line 79
Do NOT use os.Exit() outside of main.go entry points
- Very specific: line 96
All PRs must have the DCO sign-off (git commit -s).
- Very specific: line 97
Run make fmt test lint before submitting.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Databricks SDK for Go
Go SDK for the Databricks platform. Auto-generated API clients from OpenAPI specs, with hand-written authentication, configuration, and transport infrastructure.
For scoped coding rules, skills, and prompt templates, see the .agent/ directory.
Rules (.agent/rules/)
- api-design.md — API design principles for the Databricks SDK.
- error-handling.md — Error handling conventions for the Databricks SDK.
- style-guide.md — Go code style and naming conventions for the Databricks SDK.
- testing.md — Testing standards and anti-patterns for the Databricks SDK.
Skills (.agent/skills/)
- write-pr-description — Write or improve a GitHub pull request description.
Prompts (.agent/prompts/)
- code-review.md — Review PR or code changes for backward compatibility, correctness, and style.
Development
Prerequisites: Go 1.25+ (see go.mod), goimports, staticcheck, gotestsum.
make build # go build ./...
make test # Unit tests with coverage
make fmt # goimports + gofmt
make lint # staticcheck ./...
make vendor # Vendor dependencies
make coverage # View HTML coverage report
make codegen # Regenerate service/ from OpenAPI specsCI runs make test across Go 1.25 and 1.26; lint and fmt run on Go 1.26.
Code must compile on all CI versions — do not use stdlib APIs newer than Go 1.25
(the module's minimum version in go.mod) without a local shim.
Architecture
├── apierr/ # API error types and handling
├── client/ # High-level DatabricksClient (wraps workspace + account APIs)
├── config/ # Authentication and client configuration (core, hand-written)
├── credentials/ # Credential providers (OAuth, PAT, Azure, GCP, etc.)
├── experimental/ # Experimental features and generated mocks
├── httpclient/ # HTTP transport layer, request/response handling
├── internal/ # Internal utilities
├── listing/ # Iterator patterns for paginated API responses
├── logger/ # Logging infrastructure
├── marshal/ # JSON marshalling utilities
├── openapi/ # Code generator (reads OpenAPI specs, generates service/)
├── retries/ # Retry logic and policies
├── service/ # Auto-generated API service clients (DO NOT EDIT)
├── useragent/ # User-agent string construction
├── .codegen/ # Code generation templates (.tmpl files)
└── qa/ # Test helpers: HTTP fixtures, polling, lockingGenerated Code — DO NOT EDIT
service/— API service clients, generated from OpenAPI specs. Every file starts with// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.experimental/mocks/— Mock implementations, generated by mockery. Every file starts with// Code generated by mockery. DO NOT EDIT.
To regenerate: make codegen (requires OpenAPI specs).
After regenerating, run make fmt and make lint.
Hand-written code lives in: config/, credentials/, httpclient/, apierr/,
listing/, retries/, marshal/, logger/, useragent/, client/, internal/, openapi/.
Common Mistakes
- Do NOT edit files in
service/orexperimental/mocks/— they are auto-generated and will be overwritten - Do NOT use
context.Background()in production code (only in tests) - Do NOT add new files to
service/manually — update OpenAPI specs and runmake codegen - Do NOT add dependencies without checking license compatibility (Apache 2.0 required)
- Do NOT break backwards compatibility of exported APIs without discussion
- Do NOT use
os.Exit()outside ofmain.goentry points
Where to Put New Code
- New API service client? → Update OpenAPI spec, run
make codegen - New auth method? →
credentials/(implementCredentialsProviderinterface) - Auth config change? →
config/ - HTTP transport change? →
httpclient/ - New error type? →
apierr/ - New pagination pattern? →
listing/ - Retry logic change? →
retries/ - Code generation change? →
openapi/and.codegen/templates - Experimental/unstable API? →
experimental/orconfig/experimental/
Pull Requests
PR template requires: Changes (linked issues + functionality) and Tests sections.
All PRs must have the DCO sign-off (git commit -s).
Run make fmt test lint before submitting.
Changelog
For changes that need a release note, add a uniquely named
.nextchanges/<timestamp>.md fragment in the Universe source checkout, using the
format in .nextchanges/README.md. Genkit consumes these fragments into
CHANGELOG.md during release preparation. Pending fragments are not published
to the public mirror. Changes that do not need a release note do not require a
fragment.
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.

