Skip to content

Conversation

@lennartkats-db
Copy link
Contributor

@lennartkats-db lennartkats-db commented Jan 6, 2026

Changes

This adds a skills system to apps-mcp that provides domain-specific implementation guides to AI agents. It follows up on #4183. Skills are organized by resource type and delivered through the discover tool. They work for any agent that supports MCP.

Detailed overview:

  • Skills live in lib/skills/{apps,jobs,pipelines,...} and include a standard SKILL.md file with a skill front matter.
  • The list of skills is shared via the databricks_discover tool.
  • Skills can be read using the read_skill_file tool (which has a precedent in many other MCPs an in our first-party agent).
  • Adding useful skills is considered followup work. The present PR includes one sample skill for doing auto-CDC with pipelines.

Why

  • Supporting skills enables us to extend the set of domain-specific capabilities of agents
  • We want skills to be the universal format for these capabilities across different agent implementations.
  • Not all agents natively support skills (Codex, Cursor); the read_skill_file tool helps these agents use skills.

Tests

  • Extended detector tests to validate resource type detection
  • Updated acceptance tests for all init-template commands
  • Manual validation with agents using the skills system

lennartkats-db and others added 10 commits December 24, 2025 15:15
Refactors init-template into dedicated subcommands with comprehensive
L2 guidance for each resource type:

- Add job subcommand using default-python template
- Add pipeline subcommand using lakeflow-pipelines template
- Add empty subcommand using default-minimal template
- Create L2 templates: target_jobs, target_pipelines, target_mixed
- Add AGENTS.tmpl for scaffolded projects
- Parameterize default catalog in discover flow
- Update detector to show "mixed" guidance for non-app-only projects
- Move implementation to cmd/init_template/ subpackage
- Make databricks_discover description more forceful (MANDATORY)

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

Co-Authored-By: Claude <noreply@anthropic.com>
…y configMap conditionals

- Add acceptance tests for job, pipeline, empty, and app init-template subcommands
- Remove unnecessary 'if catalog != ""' checks (templates handle empty values)
- Fix logdiag double-initialization in bundle detector
- Simplify FormatProjectScaffoldSuccess output formatting
- Remove undefined listAllSkills parameter from generateDiscoverGuidance call
- Fix test expectation: jobs-only projects now include "mixed" target type

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

Co-Authored-By: Claude <noreply@anthropic.com>
This makes the terminology more accurate for empty and single-resource
bundles, and makes resource detection more maintainable.

Changes:
- Rename target_mixed.tmpl to target_bundle.tmpl
- Use AllResources() iterator instead of manually checking each type
- Simplify isAppOnly logic to: hasApps && len(TargetTypes) == 1
- Add default catalog logic to empty.go for consistency
- Add test coverage for empty bundles

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove IsAppOnly field assignment (field was removed in base branch)
- Remove verbose TestDetectorRegistry_AppsWithOtherResources test
- Coverage is already provided by existing tests

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@lennartkats-db lennartkats-db requested a review from a team as a code owner January 6, 2026 09:02
@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Jan 6, 2026

Commit: 54c0a0e

Run: 20775071300

Env ❌​FAIL 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
❌​ aws linux 2 15 5 2 379 671 66:31
🟨​ aws windows 20 2 383 669 60:36
🟨​ aws-ucws linux 11 9 2 532 548 278:37
🟨​ aws-ucws windows 17 3 2 534 546 78:07
🟨​ azure linux 4 4 7 3 381 670 290:33
🟨​ azure windows 15 3 383 668 62:50
🟨​ azure-ucws linux 10 5 3 528 547 307:08
🟨​ azure-ucws windows 15 3 530 545 62:26
🟨​ gcp linux 10 5 3 370 676 24:32
🟨​ gcp windows 15 3 372 674 18:32
24 interesting tests: 21 KNOWN, 2 FAIL, 1 SKIP
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 🟨​K 🟨​K 💚​R 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
🟨​ TestAccept/bundle/deployment/bind/alert 🙈​S 🙈​S 🙈​S 🙈​S 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
🟨​ TestAccept/bundle/resources/alerts/basic 🟨​K 🟨​K 🟨​K 🟨​K 💚​R 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
🟨​ TestAccept/bundle/resources/alerts/basic/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 🟨​K 🟨​K 🔄​f 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
🟨​ TestAccept/bundle/resources/alerts/basic/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 🟨​K 🟨​K 🔄​f 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
🟨​ TestAccept/bundle/resources/alerts/with_file 🟨​K 🟨​K 🟨​K 🟨​K 🔄​f 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
🟨​ TestAccept/bundle/resources/alerts/with_file/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 🟨​K 🟨​K 🔄​f 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
🟨​ TestAccept/bundle/resources/alerts/with_file/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
🙈​ 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 🟨​K 🟨​K 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 🟨​K 🟨​K
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 🟨​K
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​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 💚​R 💚​R
❌​ TestAccept/bundle/resources/secret_scopes/permissions ❌​F ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🙈​s 🙈​s
❌​ TestAccept/bundle/resources/secret_scopes/permissions/DATABRICKS_BUNDLE_ENGINE=terraform ❌​F ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🟨​ TestExport 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
🟨​ TestExportWithFileFlag 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
🟨​ TestImportDir 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K
🟨​ TestImportDirDoesNotOverwrite 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K
🟨​ TestImportDirWithOverwriteFlag 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K
🟨​ TestImportFileFormatAuto 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K
🟨​ TestImportFileFormatSource 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K 💚​R 🟨​K
Top 33 slowest tests (at least 2 minutes):
duration env testname
7:22 azure-ucws linux TestAccept/bundle/resources/synced_database_tables/basic
7:20 azure linux TestAccept/bundle/resources/alerts/with_file/DATABRICKS_BUNDLE_ENGINE=direct
6:47 aws-ucws linux TestAccept/bundle/resources/synced_database_tables/basic
6:28 aws-ucws windows TestAccept/bundle/resources/synced_database_tables/basic
6:12 gcp windows TestSecretsPutSecretStringValue
5:59 aws windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
5:59 aws-ucws linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
5:57 gcp windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
5:47 gcp linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
5:42 gcp windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
5:34 aws-ucws windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
5:32 aws-ucws windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
5:31 aws windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
5:21 aws-ucws linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
4:42 gcp linux TestSecretsPutSecretStringValue
4:37 azure windows TestSecretsPutSecretStringValue
4:32 azure linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
3:55 azure-ucws windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
3:52 azure-ucws linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
3:50 azure linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
3:49 azure-ucws windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
3:42 azure windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
3:36 azure-ucws linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
3:36 azure windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
3:01 azure-ucws windows TestAccept/bundle/resources/synced_database_tables/basic
2:36 azure linux TestSecretsPutSecretStringValue
2:28 aws linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
2:23 aws windows TestSecretsPutSecretStringValue
2:20 aws linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
2:11 azure-ucws linux TestAccept/ssh/connection
2:11 azure-ucws windows TestSecretsPutSecretStringValue
2:10 aws-ucws windows TestAccept/ssh/connection
2:08 gcp linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct

The previous pattern `*/*` only matched one directory level deep, causing
nested skill files like `pipelines/auto-cdc/SKILL.md` to be excluded from
the embedded filesystem on Windows builds.

Changed to `all:*` which:
- Recursively embeds all subdirectories
- Includes hidden files like .gitkeep
- Automatically supports new resource type directories without code changes

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
lennartkats-db and others added 2 commits January 6, 2026 10:42
The wildcard pattern `all:*` doesn't work reliably on Windows builds -
the embedded filesystem ends up empty, causing all skills to be missing
from the registry.

Changed to explicit directory listing: `all:apps all:bundle all:jobs all:pipelines`

This matches the pattern used in other parts of the codebase (e.g.,
libs/template/builtin.go uses `all:templates`). When adding new resource
type directories, this list will need to be updated.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds TestAllSkillDirectoriesAreEmbedded which compares filesystem
directories against the embedded FS and registry to ensure the
//go:embed directive is complete.

The test provides actionable error messages showing exactly which
directories are missing and the correct embed directive to use.

This prevents issues where new skill directories are added but not
included in the explicit embed list (required for Windows compatibility).

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Base automatically changed from lakeflow-mcp to main January 6, 2026 12:16
@lennartkats-db lennartkats-db changed the title [draft] apps-mcp: Add integrated skills system for domain-specific guidance apps-mcp: Add integrated skills system for domain-specific guidance Jan 6, 2026
lennartkats-db and others added 2 commits January 6, 2026 13:53
Changed from space-separated pattern:
  //go:embed all:apps all:bundle all:jobs all:pipelines

To separate directives (one per line):
  //go:embed all:apps
  //go:embed all:bundle
  //go:embed all:jobs
  //go:embed all:pipelines

This matches the pattern used in libs/template/builtin.go and may be
more robust on Windows. Also added panic messages with diagnostics to
help identify the exact failure point if embed doesn't work.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
# Conflicts:
#	acceptance/apps/init-template/app/output.txt
#	acceptance/apps/init-template/app/script
#	acceptance/apps/init-template/empty/output.txt
#	acceptance/apps/init-template/empty/script
#	acceptance/apps/init-template/job/output.txt
#	acceptance/apps/init-template/job/script
#	acceptance/apps/init-template/pipeline/output.txt
#	acceptance/apps/init-template/pipeline/script
#	experimental/apps-mcp/cmd/init_template/app.go
#	experimental/apps-mcp/cmd/init_template/common.go
#	experimental/apps-mcp/lib/detector/bundle_detector.go
#	experimental/apps-mcp/lib/providers/clitools/discover.go
Updated regex to handle both Unix (\n) and Windows (\r\n) line endings.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Tests would catch these issues anyway. Kept the actual error
panics for fs.ReadDir and loadSkill failures.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.

3 participants