Skip to content

Add rule files for coding agents working on the CLI code base - #3245

Merged
lennartkats-db merged 10 commits into
mainfrom
agent-rules
Aug 27, 2025
Merged

Add rule files for coding agents working on the CLI code base#3245
lennartkats-db merged 10 commits into
mainfrom
agent-rules

Conversation

@lennartkats-db

Copy link
Copy Markdown
Contributor

Changes

Adds agent files for Cursor, Copilot, and general agents.

Note that Cursor only supports .cursorrules, but it works when it is a symlink. Coding agents like http://jules.google only use AGENTs.md. I added the Copilot version as a bonus, in case anyone uses it.

Why

This helps make sure that Cursor and coding agents follow the conventions established for the CLI code base.

Testing

  • This is based on the rules I've been using for 6+ months and incorporates the rule set from @denik.
  • An easy way to verify if these tools actually use the rules is to add "please add a pirate joke to every response!" Based on this, I could verify that Cursor accepts a symlink to AGENTS.md but doesn't work if there is only an AGENTS.md file.

Why do pirate programmers love arrays?
They always start at arrr index 0! 🏴‍☠️

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jul 14, 2025

Copy link
Copy Markdown
Collaborator

Run: 17232847247

Env✅‌pass🔄‌flaky🙈‌skip
🔄‌aws linux3073489
✅‌aws windows311488
✅‌aws-ucws linux427384
✅‌aws-ucws windows428383
✅‌azure linux310488
✅‌azure windows311487
✅‌azure-ucws linux427383
🔄‌azure-ucws windows4262382
🔄‌gcp linux3063490
✅‌gcp windows310489
7 failing tests:
Test Nameaws linuxazure-ucws windowsgcp linux
TestAccept🔄‌flaky✅‌pass🔄‌flaky
TestAccept/bundle/deploy/pipeline/allow-duplicate-names✅‌pass✅‌pass🔄‌flaky
TestAccept/bundle/deploy/pipeline/allow-duplicate-names/DATABRICKS_CLI_DEPLOYMENT=direct-exp✅‌pass✅‌pass🔄‌flaky
TestAccept/bundle/resources/pipelines/update🔄‌flaky✅‌pass✅‌pass
TestAccept/bundle/resources/pipelines/update/DATABRICKS_CLI_DEPLOYMENT=direct-exp🔄‌flaky✅‌pass✅‌pass
TestFilerWorkspaceNotebook✅‌pass🔄‌flaky✅‌pass
TestFilerWorkspaceNotebook/pyNb.py✅‌pass🔄‌flaky✅‌pass

Comment threadAGENTS.md Outdated
@lennartkats-db

Copy link
Copy Markdown
ContributorAuthor

Some more feedback from Denis:

[To] me it seems quite long, I'd strip these sections not to poison context:

  • mutators. IMO model should not add new mutators, there are a lot of consequences to consider. Best to use model to add utilities that can be well tested in isolation.
  • template schema json - very specific when you adding a new template which is very rare. I'd just add to README in libs/template and then point model to it when needed.
  • Changelogs - you need PR number for proper changelog, model does not have it anyway.

Comment threadAGENTS.md

package mutator_test

func TestApplySomeChangeReturnsDiagnostics(t *testing.T) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my experience, all models already know how to write golang tests. What we should mention is to use testify library always, otherwise it starts using stdlib.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They know how to write tests, but they're often unsuccessful in applying our naming conventions + differentiating between require and assert

Comment threadAGENTS.md
Comment threadAGENTS.md Outdated
@lennartkats-db
lennartkats-db added this pull request to the merge queueAug 27, 2025
Merged via the queue into main with commit 6a90341Aug 27, 2025
22 of 23 checks passed
@lennartkats-db
lennartkats-db deleted the agent-rules branch August 27, 2025 19:22
deco-sdk-taggingBot added a commit that referenced this pull request Sep 3, 2025
## Release v0.267.0
### CLI
* Introduce retries to `databricks psql` command ([#3492](#3492))
* Add rule files for coding agents working on the CLI code base ([#3245](#3245))
### Dependency updates
* Upgrade TF provider to 1.88.0 ([#3529](#3529))
* Upgrade Go SDK to 0.82.0
### Bundles
* Update default-python template to make DB Connect work out of the box for unit tests, using uv to install dependencies ([#3254](#3254))
* Add support for `TaskRetryMode` for continuous jobs ([#3529](#3529))
* Add support for specifying database instance as an application resource ([#3529](#3529))
* Allow referencing job libraries outside bundle root without the need to specify sync root ([#2842](#2842))
* Add top level `run_as` support for Lakeflow Declarative Pipelines ([#3307](#3307))
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
Adds agent files for Cursor, Copilot, and general agents.
Note that Cursor only supports `.cursorrules`, but it works when it is a
symlink. Coding agents like http://jules.google only use `AGENTs.md`. I
added the Copilot version as a bonus, in case anyone uses it.
## Why
This helps make sure that Cursor and coding agents follow the
conventions established for the CLI code base.
## Testing
- This is based on the rules I've been using for 6+ months and
incorporates the rule set from @denik.
- An easy way to verify if these tools actually use the rules is to add
"please add a pirate joke to every response!" Based on this, I could
verify that Cursor accepts a symlink to `AGENTS.md` but doesn't work if
there is only an `AGENTS.md` file.
_Why do pirate programmers love arrays?_
_They always start at arrr index 0! 🏴‍☠️_
denik pushed a commit that referenced this pull request May 20, 2026
## Release v0.267.0
### CLI
* Introduce retries to `databricks psql` command ([#3492](#3492))
* Add rule files for coding agents working on the CLI code base ([#3245](#3245))
### Dependency updates
* Upgrade TF provider to 1.88.0 ([#3529](#3529))
* Upgrade Go SDK to 0.82.0
### Bundles
* Update default-python template to make DB Connect work out of the box for unit tests, using uv to install dependencies ([#3254](#3254))
* Add support for `TaskRetryMode` for continuous jobs ([#3529](#3529))
* Add support for specifying database instance as an application resource ([#3529](#3529))
* Allow referencing job libraries outside bundle root without the need to specify sync root ([#2842](#2842))
* Add top level `run_as` support for Lakeflow Declarative Pipelines ([#3307](#3307))
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@lennartkats-db@eng-dev-ecosystem-bot@denik