Skip to content

Commit bab5035

Browse files
authored
Fix eval regression from PR#76: soften State Storage Rule (#83)
## Summary PR #76 introduced an aggressive **State Storage Rule** in `skills/databricks-apps/SKILL.md` that caused **16 app regressions** in the May 19 nightly eval (8 high-impact with >0.3 score drop). Analytics apps like `property_search_app`, `host_onboarding_checklist`, and `cb_brickhouse_advanced` were incorrectly pushed toward Lakebase, dropping to 0.00. ### Root Cause The State Storage Rule auto-detected Lakebase need for any app mentioning state-like terms ("preferences", "bookmarks"), with forceful language ("Do not wait for the user to ask", "This is not optional") that removed user agency. ### Changes (4 targeted edits in `skills/databricks-apps/SKILL.md`) 1. **Revert description metadata** — remove "Auto-detects need for Lakebase when app stores state" 2. **Revert scaffolding phase reference** — remove State Storage Rule mention from Required Reading table 3. **Replace the State Storage Rule** with softer guidance: - Removed "preferences, bookmarks" from trigger list (too broad for analytics apps) - Changed "Do not wait for the user to ask" → "Ask the user" (restores user agency) - Removed "This is not optional" (was too forceful) - Added explicit exclusion for analytics/dashboard apps - **Still recommends Lakebase** for genuine CRUD/state storage needs - **Still routes to Decision Gate** for hybrid apps (analytics + state) 4. **Revert Decision Gate skip clause** — restore original simpler wording ### What's kept from PR#76 - All `databricks-lakebase/SKILL.md` improvements (new references, JSON path table, pgvector) - All `lakebase.md` reference updates (Chat Persistence Pattern, onPluginsReady, naming conventions) - All `model-serving.md` changes (Model Serving apps actually improved) - Post-Deploy Verification section ## Test plan - [x] `python3 scripts/skills.py validate` passes - [ ] May 20 nightly eval confirms regression is fixed Fixes: LKB-12991 This pull request and its description were written by Isaac.
1 parent 33641d9 commit bab5035

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

skills/databricks-apps/SKILL.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: databricks-apps
3-
description: "Build apps on Databricks Apps platform. Use when asked to create dashboards, data apps, analytics tools, or visualizations. Auto-detects need for Lakebase when app stores state; evaluates data access patterns (analytics vs Lakebase synced tables) before scaffolding. Invoke BEFORE starting implementation."
3+
description: "Build apps on Databricks Apps platform. Use when asked to create dashboards, data apps, analytics tools, or visualizations. Evaluates data access patterns (analytics vs Lakebase synced tables) before scaffolding. Invoke BEFORE starting implementation."
44
compatibility: Requires databricks CLI (>= v0.294.0)
55
metadata:
66
version: "0.1.2"
@@ -17,7 +17,7 @@ Build apps that deploy to Databricks Apps platform.
1717

1818
| Phase | READ BEFORE proceeding |
1919
|-------|------------------------|
20-
| Scaffolding | **⚠️ STOP — evaluate the State Storage Rule and Data Access Decision Gate below before scaffolding.** Parent `databricks-core` skill (auth, warehouse discovery); then run `databricks apps manifest` + `databricks apps init` with `--features` and `--set` (see AppKit section below) |
20+
| Scaffolding | **⚠️ STOP — review the State Storage Guidance and complete the Data Access Decision Gate below before scaffolding.** Parent `databricks-core` skill (auth, warehouse discovery); then run `databricks apps manifest` + `databricks apps init` with `--features` and `--set` (see AppKit section below) |
2121
| Writing SQL queries | [SQL Queries Guide](references/appkit/sql-queries.md) |
2222
| Writing UI components | [Frontend Guide](references/appkit/frontend.md) |
2323
| Using `useAnalyticsQuery` | [AppKit SDK](references/appkit/appkit-sdk.md) |
@@ -61,15 +61,16 @@ Build apps that deploy to Databricks Apps platform.
6161

6262
Before writing any SQL, use the parent `databricks-core` skill for data exploration — search `information_schema` by keyword, then batch `discover-schema` for the tables you need. Do NOT skip this step.
6363

64-
**State Storage Rule (evaluate BEFORE the Decision Gate):**
64+
**State Storage Guidance (evaluate BEFORE the Decision Gate):**
6565

66-
If the user's app description implies storing or persisting data — forms, CRUD operations, user input, preferences, bookmarks, orders, todos, comments, votes, or any user-generated content — the app needs a Lakebase database. Do not wait for the user to ask for one.
66+
If the user's app description involves storing or persisting data — forms, CRUD operations, user submissions, orders, todos, or other user-generated content — the app likely needs a Lakebase database.
6767

68-
1. Use the **`databricks-lakebase`** skill to create a Lakebase project (if one doesn't already exist) and obtain the branch and database resource names.
69-
2. Scaffold with `--features lakebase` and pass `--set lakebase.postgres.branch=<BRANCH_NAME> --set lakebase.postgres.database=<DATABASE_NAME>`.
70-
3. If the app **also** reads from Unity Catalog tables, proceed to the Data Access Decision Gate below to determine whether to add `--features analytics` or use Lakebase synced tables.
68+
1. **Ask the user** whether the app needs persistent storage (Lakebase) before scaffolding. Do not silently add Lakebase.
69+
2. If confirmed, use the **`databricks-lakebase`** skill to create a Lakebase project and obtain the branch and database resource names.
70+
3. Scaffold with `--features lakebase` and pass `--set lakebase.postgres.branch=<BRANCH_NAME> --set lakebase.postgres.database=<DATABASE_NAME>`.
71+
4. If the app **also** reads from Unity Catalog tables, proceed to the Data Access Decision Gate below to determine whether to add `--features analytics` or use Lakebase synced tables.
7172

72-
This rule governs **state storage** only. For how the app reads existing lakehouse data, proceed to the Decision Gate below. This is not optional — any app that writes user-generated data needs Lakebase.
73+
Do NOT add Lakebase to analytics, dashboard, or visualization apps unless the user explicitly requests persistent write-back storage. Read-only data display, filters, and preferences do not require a database.
7374

7475
## Development Workflow (FOLLOW THIS ORDER)
7576

@@ -80,16 +81,16 @@ If the app reads from Unity Catalog / lakehouse tables, you MUST show the compar
8081
| | **(A) Lakebase synced tables** | **(B) Analytics** |
8182
|--|---|---|
8283
| Speed | Sub-second responses | Takes a few seconds |
83-
| Best for | Search, lookups, catalogs, real-time data, operational apps | Dashboards, charts, aggregations, KPIs |
84+
| Best for | Full-text search, typeahead, autocomplete, real-time lookups, operational apps | Dashboards, charts, aggregations, KPIs, filtered queries, browsing |
8485
| How it works | Data synced from Delta into Lakebase Postgres | Queries run on SQL warehouse at read time |
8586

86-
After showing the table, add a brief recommendation. Default to recommending Lakebase synced tables (A) unless the use case is clearly about aggregations, charts, or dashboards where seconds of latency is acceptable. For lookups, searches, serving data to users, or any interactive use case, recommend Lakebase synced tables. Always let the user make the final call.
87+
After showing the table, add a brief recommendation. Default to recommending Analytics (B) for most read-only apps — dashboards, charts, filtered queries, browsing, and aggregations. Recommend Lakebase synced tables (A) only when the app needs sub-second latency for full-text search, typeahead/autocomplete, real-time lookups by ID, or operational data serving. Note: "search" or "filter" in a prompt usually means SQL WHERE clauses (Analytics), not full-text search (Lakebase). Always let the user make the final call.
8788

8889
After the user chooses:
8990
- (A) Lakebase synced tables → scaffold with `--features lakebase`. See [Lakebase Guide](references/appkit/lakebase.md) for full workflow.
9091
- (B) Analytics → scaffold with `--features analytics`.
9192
- Both → scaffold with `--features analytics,lakebase` if the app needs both patterns.
92-
- If the app does NOT read UC data (pure CRUD, Genie, Model Serving), skip this gate. For pure CRUD/state apps, the State Storage Rule above already applies — scaffold with `--features lakebase`. For Genie or Model Serving, scaffold with the corresponding `--features` flag.
93+
- If the app does NOT read Unity Catalog data (pure CRUD, Genie, Model Serving), skip this gate and scaffold with the appropriate `--features` flag.
9394

9495
**Analytics apps** (`--features analytics`):
9596

0 commit comments

Comments
 (0)