diff --git a/genie-code/create-genie-space/SKILL.md b/genie-code/create-genie-space/SKILL.md index 7344dbe..2261926 100644 --- a/genie-code/create-genie-space/SKILL.md +++ b/genie-code/create-genie-space/SKILL.md @@ -7,6 +7,10 @@ description: "Create or refine an initial Databricks Genie Space design from Uni Create a focused Genie Space using Databricks-native context. Rely on Genie Code Agent mode to inspect Unity Catalog metadata, open workspace assets, run approved notebook or SQL editor steps, and read returned output. +## Spec-Driven Intake + +When the user provides or references a completed `SPEC.md`, read that file before gathering requirements. When the user asks for a spec-driven workflow without a completed spec, use this skill folder's `SPEC.md` template as the intake checklist. Treat user-filled fields as requirements or hypotheses, fill Genie Code sections only with read-only workspace evidence, and keep unresolved `TBD` items visible as assumptions, limitations, or questions. Do not treat unconfirmed metric definitions, joins, fiscal rules, default filters, or benchmark answers in the spec as validated until workspace evidence or user confirmation supports them. + ## Hard Rules - Use only bounded read-only SQL to inspect data: `SELECT`, `WITH`, `SHOW`, `DESCRIBE`, `EXPLAIN`, and `information_schema`. diff --git a/genie-code/create-genie-space/SPEC.md b/genie-code/create-genie-space/SPEC.md new file mode 100644 index 0000000..1df97ad --- /dev/null +++ b/genie-code/create-genie-space/SPEC.md @@ -0,0 +1,97 @@ +# Genie Space SPEC.md Template + +Use this template before invoking the `create-genie-space` skill when the customer can provide data artifacts before a working session. Use one `SPEC.md` per Genie Space. + +This spec captures only customer decisions and business context. Genie Code should derive schema details, profiling, joins, prompt matching, hidden technical fields, readiness, and proposed Genie Space configuration from the artifacts and approved read-only inspection. + +Unknowns may be marked `TBD`. Use fully qualified Unity Catalog identifiers (`catalog.schema.object`) whenever known. Do not paste secrets, tokens, credentials, sensitive free text, or unnecessary raw sample data. + +## 1. Artifact Package + +Provide these before the workshop: + +- `DESCRIBE EXTENDED` output for every table, view, and Metric View. +- Metric View definition export or copy for every Metric View. +- Optional: sample rows for tables and standard views. +- Optional: existing dashboards, SQL, notebooks, known-good answers, data dictionaries, or business glossaries. + +Missing artifacts or limitations: + +- TBD + +## 2. Space Goal + +| Field | Customer input | +| --- | --- | +| Draft Space title | TBD | +| Owner/requester | TBD | +| SME for business questions | TBD | +| Intended audience | TBD | +| Primary purpose | TBD | +| Success criteria | TBD | +| In scope | TBD | +| Out of scope | TBD | +| Draft only or live creation after approval? | draft only / live creation after approval | + +## 3. Sources And Authority + +List the candidate sources and the business reason each belongs. Do not summarize columns, measures, or dimensions here; Genie Code derives those from the artifacts. + +| Source identifier | Type | Why include it? | Authoritative for | Owner/SME | Caveats | +| --- | --- | --- | --- | --- | --- | +| `catalog.schema.object` | table / view / Metric View | TBD | TBD | TBD | TBD | + +Source preference rules: + +- If sources overlap, which one should Genie prefer? +- Should raw/detail tables be exposed alongside Metric Views? If yes, for what questions? +- Are any sources staging, deprecated, incomplete, or included only for lookup/enrichment? + +## 4. Question And Benchmark Inputs + +Provide real analyst questions from customer users or SMEs. Genie Code uses 3-5 questions to understand what the Space is about and derive the initial Space design. + +For benchmark analysis, provide at least 15 questions; about 30 is ideal. If fewer than 15 questions are provided, Genie Code can still draft the Space, but benchmark analysis should be treated as incomplete. + +Do not require the customer to provide benchmark SQL unless they already have known-good SQL, dashboard logic, or expected results. + +| # | Benchmark question | Optional ground-truth SQL | Evaluation notes | +| --- | --- | --- | --- | +| 1 | TBD | TBD | TBD | +| 2 | TBD | TBD | TBD | +| 3 | TBD | TBD | TBD | + +Repeat rows as needed. + +## 5. Business Semantics + +Fill only definitions or conventions that are not already governed by a Metric View, or that require confirmation. + +- KPI definitions or formulas: +- Fiscal calendar and timezone: +- Default date range or comparison period: +- Default filters, exclusions, or active/inactive logic: +- Ambiguous terms, acronyms, statuses, or segments: +- Currency, units, rounding, or formatting expectations: + +## 6. Security And Caveats + +List business-sensitive or policy details the artifacts may not reveal. + +- PII or sensitive business fields: +- Fields technically available but inappropriate for the audience: +- Row-level security, masks, or dynamic view caveats: +- Known data quality or freshness issues: +- Required caveats Genie should surface to users: + +## 7. Validation And Approval + +- Final approver: +- Approval criteria: +- Target workspace/path, if live creation is approved: + +No live Genie Space creation or update should happen until the customer explicitly approves the proposed configuration in Databricks. + +## Genie Code Should Derive + +Do not ask the customer to pre-fill these unless they already have the answer: source profiling, row counts, grain, freshness, column descriptions, Metric View measure/dimension review, prompt/entity matching candidates, hidden technical fields, join evidence, SQL snippets, example SQL, text-instruction justification, benchmark SQL, and per-question readiness.