Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nextchanges/bundles/agents-md-only.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* No longer include `CLAUDE.md` in the bundle templates, now that Claude supports `AGENTS.md`. ([#7000](https://github.com/databricks/cli/pull/7000))
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Building python_artifact...
Uploading .databricks/bundle/dev/patched_wheels/python_artifact_my_default_python/my_default_python-0.0.1+[UNIX_TIME_NANOS][3]-py3-none-any.whl...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/my_default_python/dev/files...
Updated jobs.sample_job
Files: 21 uploaded, 0 deleted
Files: 20 uploaded, 0 deleted
Resources: 0 created, 1 changed, 0 deleted, 1 unchanged

>>> print_state.py
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ To get started, refer to the project README.md file and the documentation at htt
"my_default_minimal/.vscode/extensions.json",
"my_default_minimal/.vscode/settings.json",
"my_default_minimal/AGENTS.md",
"my_default_minimal/CLAUDE.md",
"my_default_minimal/README.md",
"my_default_minimal/databricks.yml",
"my_default_minimal/fixtures/.gitkeep",
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Building python_artifact...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/my_default_python/dev/files...
Created jobs.sample_job
Created pipelines.my_default_python_etl
Files: 21 uploaded, 0 deleted
Files: 20 uploaded, 0 deleted
Resources: 2 created, 0 changed, 0 deleted, 0 unchanged

>>> [CLI] bundle plan -t dev
Expand All @@ -68,7 +68,7 @@ Created jobs.sample_job
Created jobs.sample_job.permissions
Created pipelines.my_default_python_etl
Created pipelines.my_default_python_etl.permissions
Files: 21 uploaded, 0 deleted
Files: 20 uploaded, 0 deleted
Resources: 4 created, 0 changed, 0 deleted, 0 unchanged

>>> [CLI] bundle plan -t prod
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Validation OK!
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/X[UNIQUE_NAME]/dev/files...
Created jobs.sample_job
Created pipelines.X[UNIQUE_NAME]_etl
Files: 23 uploaded, 0 deleted
Files: 22 uploaded, 0 deleted
Resources: 2 created, 0 changed, 0 deleted, 0 unchanged

Destroy: 2 deleted
Expand All @@ -45,7 +45,7 @@ Created jobs.sample_job
Created jobs.sample_job.permissions
Created pipelines.X[UNIQUE_NAME]_etl
Created pipelines.X[UNIQUE_NAME]_etl.permissions
Files: 25 uploaded, 0 deleted
Files: 24 uploaded, 0 deleted
Resources: 4 created, 0 changed, 0 deleted, 0 unchanged

Destroy: 2 deleted
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Validation OK!
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/X[UNIQUE_NAME]/dev/files...
Created jobs.sample_job
Created pipelines.X[UNIQUE_NAME]_etl
Files: 23 uploaded, 0 deleted
Files: 22 uploaded, 0 deleted
Resources: 2 created, 0 changed, 0 deleted, 0 unchanged

Destroy: 2 deleted
Expand All @@ -45,7 +45,7 @@ Created jobs.sample_job
Created jobs.sample_job.permissions
Created pipelines.X[UNIQUE_NAME]_etl
Created pipelines.X[UNIQUE_NAME]_etl.permissions
Files: 25 uploaded, 0 deleted
Files: 24 uploaded, 0 deleted
Resources: 4 created, 0 changed, 0 deleted, 0 unchanged

Destroy: 2 deleted
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Uploading .databricks/bundle/dev/patched_wheels/python_artifact_project_name_[UN
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/files...
Created jobs.sample_job
Created pipelines.project_name_[UNIQUE_NAME]_etl
Files: 21 uploaded, 0 deleted
Files: 20 uploaded, 0 deleted
Resources: 2 created, 0 changed, 0 deleted, 0 unchanged

>>> [CLI] bundle summary -t dev
Expand Down Expand Up @@ -294,7 +294,7 @@ Created jobs.sample_job
Created jobs.sample_job.permissions
Created pipelines.project_name_[UNIQUE_NAME]_etl
Created pipelines.project_name_[UNIQUE_NAME]_etl.permissions
Files: 21 uploaded, 0 deleted
Files: 20 uploaded, 0 deleted
Resources: 4 created, 0 changed, 0 deleted, 0 unchanged

>>> [CLI] bundle summary -t prod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Uploading dist/my_default_python-0.0.1-py3-none-any.whl...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/my_default_python/dev/files...
Created jobs.sample_job
Created pipelines.my_default_python_etl
Files: 21 uploaded, 0 deleted
Files: 20 uploaded, 0 deleted
Resources: 2 created, 0 changed, 0 deleted, 0 unchanged

>>> [CLI] bundle plan -t dev
Expand All @@ -74,7 +74,7 @@ Created jobs.sample_job
Created jobs.sample_job.permissions
Created pipelines.my_default_python_etl
Created pipelines.my_default_python_etl.permissions
Files: 21 uploaded, 0 deleted
Files: 20 uploaded, 0 deleted
Resources: 4 created, 0 changed, 0 deleted, 0 unchanged

>>> [CLI] bundle plan -t prod
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ Uploading .databricks/bundle/dev/patched_wheels/python_artifact_my_pydabs/my_pyd
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/my_pydabs/dev/files...
Created jobs.sample_job
Created pipelines.my_pydabs_etl
Files: 22 uploaded, 0 deleted
Files: 21 uploaded, 0 deleted
Resources: 2 created, 0 changed, 0 deleted, 0 unchanged
2 changes: 1 addition & 1 deletion acceptance/pipelines/e2e/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Please refer to the README.md file for "getting started" instructions.
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/lakeflow_project/dev/files...
Created jobs.sample_job
Created pipelines.lakeflow_project_etl
Files: 14 uploaded, 0 deleted
Files: 13 uploaded, 0 deleted
Resources: 2 created, 0 changed, 0 deleted, 0 unchanged
View your job sample_job here: [DATABRICKS_URL]/jobs/[SAMPLE_JOB_ID]?w=[WORKSPACE_ID]
View your pipeline lakeflow_project_etl here: [DATABRICKS_URL]/pipelines/[UUID]?w=[WORKSPACE_ID]
Expand Down
6 changes: 0 additions & 6 deletions acceptance/pipelines/e2e/output/lakeflow_project/CLAUDE.md

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 7 additions & 4 deletions libs/template/renderer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,15 @@ func TestRendererSharedLibraryAndOverride(t *testing.T) {
require.NoError(t, err)
got := string(b)

// agents_md is defined only in the shared library, so rendering it (a heading)
// without error proves the shared library is parsed into the template's namespace.
assert.Contains(t, got, "shared: #")
// claude_md is defined in both the shared library and this template's own
// agents_md is defined in both the shared library and this template's own
// library; the template's own definition must take precedence.
assert.Contains(t, got, "own: OWN WINS")

r, err = newRenderer(ctx, nil, helpers, os.DirFS("."), "./testdata/library-override/template", "./testdata/library-override/no-library")
require.NoError(t, err)
got, err = r.executeTemplate(`{{template "agents_md" .}}`)
require.NoError(t, err)
assert.Contains(t, got, "# Declarative Automation Bundles Project")
}

func TestRendererExecuteTemplate(t *testing.T) {
Expand Down
11 changes: 1 addition & 10 deletions libs/template/templates/common/library/agents.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- /*
* Template for the AGENTS.md / CLAUDE.md files created in new projects.
* Template for the AGENTS.md file created in new projects.
*
* Goal for this file is to point agents to Databricks AI Tools for guidance.
* A secondary goal is to offer a placeholder to users to extend with their own instructions.
Expand Down Expand Up @@ -34,12 +34,3 @@ If the CLI is not installed, see: https://docs.databricks.com/dev-tools/cli/inst

<!-- Add your project-specific instructions, coding conventions, or notes here -->
{{- end -}}

{{- define "claude_md" -}}
# CLAUDE.md

Project guidance for AI agents lives in AGENTS.md.
Claude Code loads it via the import below.

@AGENTS.md
{{- end -}}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{define "claude_md"}}OWN WINS{{end}}
{{define "agents_md"}}OWN WINS{{end}}
3 changes: 1 addition & 2 deletions libs/template/testdata/library-override/template/out.tmpl
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
own: {{template "claude_md" .}}
shared: {{template "agents_md" .}}
own: {{template "agents_md" .}}
Loading