Skip to content

Conversation

@keugenek
Copy link
Contributor

@keugenek keugenek commented Dec 1, 2025

Establishes CLAUDE.md as single source of truth for operational commands (npm run dev, validate, deploy). Updates validation to dynamically discover package.json scripts instead of hardcoding. Apps.tmpl now references CLAUDE.md for complete guidance.

Establishes CLAUDE.md as single source of truth for operational commands (npm run dev, validate, deploy). Updates validation to dynamically discover package.json scripts instead of hardcoding. Apps.tmpl now references CLAUDE.md for complete guidance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@keugenek keugenek requested review from a team, lennartkats-db and pietern as code owners December 1, 2025 14:43

**⚠️ CRITICAL**: Use ONLY these commands. Do not improvise alternatives.

### Local Development
Copy link
Contributor

Choose a reason for hiding this comment

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

are you sure it is agent's concern? imo it should not know anything but validate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

template must set the way it should be executed, dont you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is certainly the agent's concern. I regularly tell the agent to run the app locally and open it in the browser so I can inspect the progress of the app.

The agent needs to know how to build and run the app locally.

What do you want to do?
├─ "Test/run locally" → npm run dev
├─ "Check ready to deploy" → databricks experimental apps-mcp tools validate .
Copy link
Contributor

Choose a reason for hiding this comment

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

i'd hint invoke_databricks_cli reference here

@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Dec 1, 2025

Commit: e5ed0b2

Run: 19857779826

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 2 371 631 17:28
🟨​ aws windows 7 4 2 369 629 21:18
🔄​ aws-ucws linux 3 4 2 514 516 29:15
💚​ aws-ucws windows 7 2 516 514 28:42
🔄​ azure linux 2 1 4 369 630 24:11
💚​ azure windows 1 4 373 628 21:36
💚​ azure-ucws linux 1 4 510 515 38:25
🔄​ azure-ucws windows 3 4 510 513 56:52
💚​ gcp linux 1 4 364 634 20:25
💚​ gcp windows 1 4 366 632 17:56
17 failing tests:
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 🔄​f 💚​R 💚​R 💚​R 💚​R 🔄​f 💚​R 💚​R
🔄​ TestAccept/bundle/resources/clusters/deploy/update-after-create ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 🔄​f 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 🔄​f 💚​R
🔄​ TestAccept/bundle/resources/pipelines/auto-approve ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/pipelines/auto-approve/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/pipelines/update ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/pipelines/update/DATABRICKS_BUNDLE_ENGINE=direct ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🙈​ TestAccept/bundle/run/app-with-job 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=direct/DLT=yes/NBOOK=no/PY=yes ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=direct/DLT=yes/NBOOK=yes/PY=no ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
Top 31 slowest tests (at least 2 minutes):
duration env testname
10:56 azure-ucws linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
6:05 gcp windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
5:53 aws windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
5:49 aws windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
5:47 gcp windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
5:44 gcp linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
5:39 gcp linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
4:41 azure windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
3:17 azure-ucws linux TestAccept/bundle/resources/synced_database_tables/basic
3:13 azure-ucws windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
2:55 azure-ucws windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
2:55 azure-ucws linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
2:51 azure-ucws linux TestAccept/bundle/resources/registered_models/basic/DATABRICKS_BUNDLE_ENGINE=direct
2:47 azure-ucws windows TestAccept/bundle/resources/synced_database_tables/basic
2:45 azure-ucws windows TestAccept/bundle/templates/default-python/combinations/serverless/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=yes/NBOOK=yes/PY=yes
2:37 aws-ucws linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
2:34 aws linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
2:32 aws-ucws windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
2:28 azure-ucws linux TestAccept/bundle/resources/registered_models/basic/DATABRICKS_BUNDLE_ENGINE=terraform
2:28 azure-ucws linux TestAccept
2:24 aws-ucws windows TestAccept/bundle/templates/default-python/combinations/serverless/DATABRICKS_BUNDLE_ENGINE=direct/DLT=yes/NBOOK=no/PY=no
2:23 azure windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
2:18 azure-ucws linux TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=no/NBOOK=yes/PY=yes
2:16 azure-ucws windows TestAccept/bundle/resources/registered_models/basic/DATABRICKS_BUNDLE_ENGINE=terraform
2:15 azure-ucws linux TestAccept/bundle/templates/default-python/combinations/serverless/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=yes/NBOOK=yes/PY=yes
2:10 aws-ucws linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
2:10 gcp linux TestAccept
2:09 aws-ucws windows TestAccept/bundle/templates/default-python/combinations/serverless/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=no/NBOOK=yes/PY=yes
2:03 azure-ucws linux TestAccept/bundle/resources/model_serving_endpoints/basic/DATABRICKS_BUNDLE_ENGINE=direct
2:01 aws-ucws windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
2:01 azure linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform

errorPrefix: "Failed to run tests",
displayName: "Tests",
},
{name: "install", command: "npm install", errorPrefix: "Failed to install dependencies", displayName: "Install"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to parse package.json?

AFAIK, this is functionally equivalent to the old implementation. The old implementation will always work even if thescrips are missing since we are running with --if-present

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wanted to have a single source of truth, but I agree the code looks less clean , so will roll this back until I have cleaner idea of implementing this

Resolved conflicts in:
- experimental/apps-mcp/lib/prompts/apps.tmpl
- experimental/apps-mcp/templates/appkit/template/{{.project_name}}/CLAUDE.md

Kept main branch versions for consistency with updated documentation style.

>>> [CLI] bundle deploy
Building python_artifact...
Error: build failed python_artifact, error: exit status 127, output: bash: uv: command not found
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be specific output to your local run and will cause tests to fail on CI, could you revert?


>>> find my_pydabs -mindepth 1 ! -name pyproject.toml ! -regex .*/resources.* -delete

>>> ruff format --quiet --diff --check my_pydabs
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above, but you can just install ruff and it should succeed

@keugenek
Copy link
Contributor Author

keugenek commented Dec 2, 2025

closing due to feedback

@keugenek keugenek closed this Dec 2, 2025
keugenek added a commit that referenced this pull request Dec 2, 2025
…irmation

Two key issues addressed:

1. Agent was opening deployed URLs instead of localhost when user asked to
   "open a dev copy" or see the app during development.

2. Agent was deploying too early without user confirmation.

Changes:
- apps.tmpl: Add localhost guidance and deployment confirmation requirement
- CLAUDE.md: Add "Deployment Procedures" section with pre-deployment checklist
- CLAUDE.md: Add "Local Development vs Deployed Apps" section with decision tree

The agent will now:
- Prefer localhost:8000 during active development
- Ask "Ready to deploy to [environment]?" before deploying
- Only use deployed URLs after deployment with user approval

Addresses feedback from PR #4045 discussion.
keugenek added a commit that referenced this pull request Dec 2, 2025
…rmation

Three key issues addressed:

1. Agent was opening deployed URLs instead of localhost when user asked to
   "open a dev copy" or see the app during development.

2. Agent was deploying too early without user confirmation.

3. Need to clarify npm run dev (development) vs npm start (production).

Changes:
- apps.tmpl: Add localhost guidance and deployment confirmation requirement
- apps.tmpl: Clarify "npm run dev" ALWAYS for development, NEVER "npm start"
- CLAUDE.md: Add "Deployment Procedures" section with pre-deployment checklist
- CLAUDE.md: Add "Local Development vs Deployed Apps" section with decision tree
- CLAUDE.md: Add visual box explaining "npm run dev vs npm start"

The agent will now:
- ALWAYS use "npm run dev" during development (NEVER npm start)
- Prefer localhost:8000 during active development
- Ask "Ready to deploy to [environment]?" before deploying
- Only use deployed URLs after deployment with user approval

Addresses feedback from PR #4045 discussion.
pietern pushed a commit that referenced this pull request Dec 2, 2025
#4056)

Fix apps-mcp agent behavior: localhost preference and deployment
confirmation

Two key issues addressed:

1. Agent was opening deployed URLs instead of localhost when user asked
to "open a dev copy" or see the app during development.

2. Agent was deploying too early without user confirmation.

Changes:
- apps.tmpl: Add localhost guidance and deployment confirmation
requirement
- CLAUDE.md: Add "Deployment Procedures" section with pre-deployment
checklist
- CLAUDE.md: Add "Local Development vs Deployed Apps" section with
decision tree

The agent will now:
- Prefer localhost:8000 during active development
- Ask "Ready to deploy to [environment]?" before deploying
- Only use deployed URLs after deployment with user approval

Addresses feedback from PR #4045 discussion.

## Changes
Prompt updates with checklist how to deploy when and how to run app.

## Why
issue 21 | Victor | The deployment was really early, maybe a
confirmation step first.
issue 30 | Lennart | Agent is opening deployed apps rather than “dev
copy” (unless I ask about localhost very explicitly)

## Tests
make test
Sign up for free to 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.

6 participants