Build an initial analytics ontology or expand an existing Git-synced one. Evidence-backed definitions, user-defined domains, reviewable refactors and validation.
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Extend the context the team already maintains so its agents can answer more useful questions. The deliverable is a reviewable change to the existing ontology, with evidence and tests. Existing definitions are the baseline; reconstructing them from upstream sources would lose the team's curation. The existing structure is a starting point, not a boundary on what the user can model. Keep the bootstrap approach: assemble meaning from evidence, leave unknowns as questions, and let the user decide business scope and definitions. The local workflow also serves teams using bootstrap's output without Cassis. Connected Cassis checks and publication are available when the project has them; they are not prerequisites for preparing a local change.
Use the user's repository, project and requested scope. Read its instructions
and modeling guide, including the ontology's AGENTS.md when present. In a
Cassis checkout that file is the managed modeling guide: cassis context fmt
brings it to the installed CLI's version, and an older copy predates rules
such as stored values in enum_values and leaving warehouse comments uncopied.
When the warehouse is connected, cassis schema pull writes its current schema
into the context directory (.schema.json, gitignored, with keys, foreign keys
and view definitions): the physical layer to extend from. Discover
the actual ontology path and format from the checkout rather than assuming a
new layout. Use the modeling guidance already available; missing credentials
for refreshing it do not prevent a local draft.
Before editing, establish:
An expansion request authorizes preparing the changes, not automatically merging or publishing them. Follow any explicit authorization already given. In a synced project, a merge to the publication branch can affect all users.
For substantial additions from schema, dbt, dashboards or other source assets, use the shared preparation and checking tools by default. An established project workflow that already extracts the evidence and compares changes can serve the same purpose. Read local tooling when using the shared commands; discover or set up their checkout and Python environment yourself, and reuse them across runs.
For a focused change supported by existing project evidence, work directly in the ontology with the project's checks. Clarifying an evidenced definition or moving existing objects need not trigger extraction or require a fresh schema export. Record the Git base and save starting versions of affected files outside the ontology, including uncommitted and untracked content. Compare against that baseline as well as Git so existing work is not attributed to the expansion.
Both approaches require evidence for new claims, explicit review of changed meaning, reference checks and a reviewable diff. A small edit to a formula or shared rule can still affect many answers. New physical identifiers still need schema or equivalent authoritative evidence. If tooling or evidence is missing, continue supported work and report the gap; do not fabricate inputs or claim that an unavailable check passed.
Read the root rules, relevant domain documents, tables, metrics and joins before consulting upstream material. Include existing caveats, exclusions, synonyms, units, time windows and known unsupported concepts.
Compare this context with the supplied schema and source assets. Distinguish:
Start from the business area the user wants to model: its purpose, audience, questions and boundaries. The domain need not match a current folder, schema or list of unmodeled tables. If it is not yet specified, propose a few useful candidate domains from the available context and ask the user to choose or reframe them. Do not silently select one based on table counts or usage alone. If the user has already defined it, treat that as the starting decision. If the user cannot be reached, work the best-evidenced candidate and name the ones you set aside, with what each would have unlocked, at the top of the review.
Map the chosen domain to existing concepts, missing coverage, required joins and supporting reference tables. Include what is already represented, what is being added and where definitions or ownership overlap in the review. Do not treat every unmodeled table as required work or impose a fixed table quota.
Propose a domain tree for the expanded ontology. Reuse what fits, and consider refactors when they improve the chosen domain: extracting shared concepts, splitting a mixed domain, consolidating duplicates, moving misplaced tables or clarifying names that conflate different metrics. A new business domain can legitimately span existing technical schemas.
For each proposed refactor, explain the problem it solves, show the current and proposed structure, and identify affected references, consumers and tests. Separate structural changes from changes in business meaning. Moving or renaming a metric must not silently change its formula, filters or unit. Offer a smaller additive option when the migration cost is disproportionate.
For changes that keep the existing domain structure and object assignments, state that and proceed. Do not ask the user to approve an unchanged tree.
Get a new or changed structure approved before authoring its content. Present the proposed tree — new domains, splits, moves, and the table that lands in each — and wait. Every table and metric names a domain, so content filled into a hierarchy the user then changes all has to move. This is the one approval the expansion asks for: once the tree is agreed, draft everything the evidence supports without stopping for further scope or structure approval, and come back with the first version plus what is ambiguous or needs their input.
If the user cannot be reached, draft against the tree you would have proposed, say so, and put the tree first in the review note so the reviewer reads the structure before the content it determines. If a refactor remains undecided, continue the additions that do not depend on it.
Collect ambiguities in the draft or PR review note: the affected concept, competing interpretations, supporting evidence and clarification needed. Leave the uncertain definition unchanged or omit the unsupported addition while drafting the rest. Ask during drafting only when the ambiguity prevents useful progress on the chosen scope; otherwise batch questions for review of the concrete draft. Do not invent a business default to move past an unanswered question. Changes to previously reviewed meaning return to the user with the consequence made explicit.
When using the shared tools, run expansion.py prepare before edits with the
existing context, supplied sources and questions, placing its run directory
outside both the context and the sources.
Use --table for the physical tables supporting the chosen scope, including
existing tables whose rules or joins may be affected. Omit it only for an initial
inventory; the script does not decide business scope. Read PREPARE.md,
inventory.json and METRICS-REVIEW.md. The baseline is immutable: after editing
the context, use check, not another preparation run to reset the comparison.
Source differences are candidates for review, not automatic corrections.
Use the supplied assets to support the additions:
Attach a source location to material additions in a review note: repository path and revision, document link/section, schema snapshot or dashboard/query reference. Distinguish explicit source statements from inferred descriptions. Use the ontology's supported provenance fields if they exist; otherwise keep the evidence outside the serialized ontology so validators can still read it.
Do not silently settle contradictions by replacing a curated definition. Describe the competing meanings and their effect on the answer. Where two definitions are valid, preserve them with clear names/scopes and ask for a default only if one is needed.
Changing something the team already approved: apply it when the evidence is strong, propose it when it is not, flag it either way. The evidence is strong when the expansion makes an existing statement false — a root convention that was true of the old coverage and is wrong for the new tables — or when the sources settle the disagreement outright. Then make the change, keep it in its own commit so it can be read and reverted on its own, and say in the review what it was, why, and what moves if the user disagrees. When the sources cannot settle it, or when the change is about where a term routes rather than about a statement now being false, leave it and propose it. Never let either kind reach the user only as a line in a diff, and never bundle it into a commit of additions. Defer the unsettled definition and continue independent additions. Keep unsupported metrics out of the governed set; record the missing fact and the affected question instead of inventing a formula or denominator.
Schema/dbt exports are sufficient for metadata work. If warehouse access is unavailable or excluded, do not try to connect. Separate SQL prepared for later validation from SQL actually executed. Agent interpretation still uses the user's configured model and its data-handling constraints; local files do not make that interpretation automatically offline.
Make the agreed additions and refactors in the working branch, using the current repository format and its authoring guidance. Preserve existing business rules unless their change has been requested or settled in review. Use existing deterministic extractors, formatters and validators where they apply; reserve agent reasoning for mapping evidence to meaning and identifying conflicts, rather than re-deriving facts a tool can extract.
cassis context fmt for a Cassis tree, which also
refreshes a domain README's nav region. Run it when available and authorized.
Otherwise preserve generated regions, check references you can inspect and
identify any navigation needing regeneration before publication. A local draft
can proceed, but stale navigation can fail cassis context check.Do not point a bootstrap generator at the maintained ontology. If separately generated candidates are supplied, treat them as evidence to reconcile, not a replacement tree to copy wholesale. The bootstrap kit's additive dbt export does not merge an existing Cassis ontology.
Do not write back to dbt, create tracker issues, change project settings or modify the live schema unless those actions are in the user's request.
If preparation recorded a shared-tool baseline, run expansion.py check against
it and read REVIEW.md and expansion-check.json. Exit 1 means structural/input
errors; exit 2 means changes to existing definitions, removals, refactors or a
changed checkout commit need review. Exit 0 only means those checks found no
such problem. Neither a clean
exit nor a reviewer note establishes answer accuracy or publication approval.
Review the generated claim/SQL pairs and metric evidence as well as the diff.
The checker cannot prove that every natural-language claim is grounded. For
direct edits or an established project workflow, compare with the saved starting
files and use the project's available validators and tests. Report additions,
removals, moves and changes to formulas, filters, joins or curated prose either
way. Do not run check without a prepared baseline or create one after editing.
Inspect the final Git diff. It should account for every added/changed object, preserve unrelated work, and contain no unexplained deletions or overwritten business definitions. Check against the recorded base; if the target branch advanced, reconcile before claiming the change is ready to merge. Resolve the relationship with pending UI edits before publishing, since Git sync may replace them.
Use the repository's established validation and the installed CLI's documented
commands. Discover supported flags through help rather than guessing them.
Where available, cassis context fmt and cassis context check provide
format/structural checks. These can require credentials; discover requirements
and use them only with the available access and authorization. Inspect their
changes and report unavailable checks. A Cassis account or API key is not
required to deliver the local diff.
cassis context test -q "<question>" runs one question through the answering
agent against the local files, cassis eval run scores the eval suite against
them, and cassis verify runs the formatter check, the structural check and the
suite in that order. The last three spend model calls on the user's project.
Structural validity does not establish business correctness.
Reuse the existing evaluation suite, within the limits you established at the outset. Add cases for the new questions and for existing concepts touched by shared rules, joins or metrics. Where feasible, compare the baseline and expanded ontology with the same reference cases, model/settings and data snapshot. Do not rewrite a reference merely to make a failure pass; establish which definition is authoritative first.
For cases that affect numbers, verify the population, date window, grain, join multiplication, unit and expected result. Clearly separate:
If no data access is authorized, deliver the metadata expansion with its validation limits and the queries needed for local verification. Do not turn a SQL-judge pass rate into a claim of result accuracy. Only run remote evaluations within the user's authorized project, model and data scope.
Existing review issues can supply reproduction cases. Map relevant corrections
to them in the handoff. In a Git-synced Cassis project, a pull request that
fixes one says so with Resolves <issue id> in its description (cassis issues show <id> prints the line); Cassis resolves it when the PR merges and the
context publishes. A resolved status does not prove the error cannot recur.
Resolve an issue by hand only when requested and supported by the applicable
workflow and evidence.
Return the diff or PR as authorized, plus a concise review note containing:
Keep review material in the repository's customary location outside the ontology's serialized objects. A successful expansion grows useful coverage without erasing the knowledge the team already approved.
.claude-plugin
.cursor-plugin
.tessl-plugin
adapters
skills
ontology-expansion
references
templates
tests
fixtures
dbt-roundtrip
models
expansion