agentleFS
analyticsengineeringanalyticsengineering/ae-toolkit/skills/bi-model/SKILL.md

bi-model

Skill3 starsChanged 31 days agoMITView on GitHub

Implements or reviews an existing repository's BI semantic model, including LookML or another detected vendor's measures, dimensions, joins, filters, and access rules. Use when BI-layer logic must align with canonical metrics and warehouse models; it detects the vendor and never assumes Looker or invents unsupported syntax.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not use for dbt/MetricFlow semantic artifacts.

    line 18
  2. Very specific:

    Default silently to Work mode.

    line 22
  3. Very specific:

    Read .ae/exercise.json and .ae/project.yml when present.

    line 32
  4. Distinctive:

    If vendor or syntax evidence is split or absent, report the candidates and stop before authoring vendor syntax.

    line 36
  5. Distinctive:

    Use formal Evidence, Risk, Recommendation, and Verification findings with severity and confidence for reviews and material BI risks.

    line 55
  6. Distinctive:

    Search BI, semantic, model, test, and exposure files for duplicate definitions and downstream references.

    line 78

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- Generated by scripts/build_targets.py from src/skills. Edit the source and rebuild; changes made here are overwritten. -->

Self-contained install. <skill-dir> is the directory holding this file: substitute its absolute path in the commands below and run them from the repository root. Read <skill-dir>/references/operating-rules.md before acting; it holds the toolkit's always-on rules, which this install cannot load on its own. This install has no safety hooks, so the approvals those rules describe rest on you and the agent rather than on an enforced gate.

BI Model

Implement or review the semantic logic already used by the repository's BI platform. Treat BI calculations and filters as part of metric lineage, not presentation-only details.

When to use

  • Review or author LookML when Looker evidence is present.
  • Review or author another BI semantic format only when its repository artifacts and conventions are detected.
  • Align BI measures, dimensions, joins, filters, time behavior, and access rules with canonical contracts and model grain.
  • Do not use for dbt/MetricFlow semantic artifacts; use the semantic-layer workflow for those.

Mode and prerequisites

Default silently to Work mode. Use Learn only when teaching is requested and Assessment only when evaluation without answers is requested or .ae/exercise.json requires it.

Require or mark missing:

  • Canonical metric contract and acceptance cases.
  • BI project root, local configuration, vendor evidence, version or dialect evidence, and existing examples.
  • Upstream model grains, keys, relationships, field types, ownership, and intended consumers.

Detection and convention procedure

  1. Read .ae/exercise.json and .ae/project.yml when present.
  2. Inventory local BI directories, project/configuration files, model/view/dataset definitions, generated metadata, and downstream references.
  3. Identify the vendor from explicit repository evidence. Detect LookML from Looker project artifacts, not from the request's generic use of “BI model.”
  4. Infer file placement, naming, includes/imports, refinement or inheritance patterns, formatting, join syntax, measure types, time groups, access controls, and validation conventions from local examples.
  5. If vendor or syntax evidence is split or absent, report the candidates and stop before authoring vendor syntax.
  6. Trace each requested field or metric from its canonical contract through upstream model expressions into the BI definition.
  7. Map all joins, relationship declarations, hidden filters, default filters, access filters, and aggregate-awareness behavior that can alter results.
  8. Author the smallest native change or review the submitted artifacts using the checks below.

BI semantic checks

  • Measures: formula, population, aggregation, units, nulls, distinctness, and non-additive behavior match the contract.
  • Dimensions: source expression, type, labels, groups, allowed values, time zone, and privacy exposure are intentional.
  • Joins: keys, relationship/cardinality declarations, required joins, and fanout controls match observed model grain.
  • Scope: explores/datasets and included fields support intended questions without exposing unsafe join paths.
  • Filters: hidden, default, always-on, row-level, and access filters are included in the business meaning.
  • Reuse: extensions, refinements, shared views, and aliases do not create divergent duplicate definitions.
  • Portability: syntax and features are supported by the detected vendor and repository version.

Evidence required

Cite the BI config, each definition file, upstream model expression, canonical contract clause, and consumer reference used. Labels and relationship declarations are intent, not proof of formulas, key uniqueness, or cardinality. Name unsupported or unreadable file formats and exclude them explicitly from consumer counts.

Use formal Evidence, Risk, Recommendation, and Verification findings with severity and confidence for reviews and material BI risks. For straightforward implementation, report Changed, Why, Verified, and Remaining uncertainty.

Failure modes

  • Assuming Looker, Tableau, Power BI, Cube, or another vendor without repository evidence.
  • Copying syntax from a different vendor or version.
  • Treating a display label as the metric definition.
  • Declaring a many-to-one relationship without grain or key evidence.
  • Ignoring filters, time zones, symmetric-aggregate behavior, access rules, or hidden fields.
  • Reimplementing a metric in BI when an authoritative reusable definition already exists.
  • Claiming validation, query results, or deployed behavior from static files.

Output contract

For implementation, return # BI Model with: Changed; Why, including platform convention, upstream grain, and canonical contract alignment; Verified; Remaining uncertainty. For a review, add evidence-backed findings about joins, fanout, duplicated definitions, access, and consumer risk.

For implementation, show intended paths and concise native definitions. For review, lead with findings ordered by severity. If no BI platform is detected, return NOT DETECTED with searched paths and do not produce speculative vendor code.

Verification

  • Walk one normal query path and one fanout or boundary scenario for each critical measure.
  • Compare formulas, filters, units, and time semantics with the canonical contract.
  • Confirm every construct against detected local examples and version evidence.
  • Search BI, semantic, model, test, and exposure files for duplicate definitions and downstream references.
  • Propose vendor validation steps as a user-run plan only; do not contact the platform or execute queries.

Safety and repository writes

  • Local Basic only: use local files and user-provided material. Never call MCP, access a warehouse, execute dbt, or contact a BI service.
  • Minimize field exposure and never print credentials, connection settings, raw personal data, or protected values.
  • Explicitly requested reversible BI artifact edits may proceed without a second approval. Preview and obtain approval before changing metric meaning, access controls, shared contracts, deleting files, or expanding scope.
  • Flag row-level security or access-filter changes as potentially broad disclosure risks.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.