跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
开发与测试

authoring-meta-context

Authors and extracts dbt MetricFlow meta context — structured YAML `meta:` blocks that encode business knowledge (thresholds, investigation paths, SLAs, relationships) alongside metric definitions so AI agents answer analytical questions accurately. Use when user asks about context cards, meta context blocks, dbt metric meta blocks, semantic layer context, distilling runbooks into YAML, authoring meta context, validating meta context, or improving AI agent analytical accuracy on dbt metrics.

keithbinkly · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add keithbinkly/dbt-meta-context --skill authoring-meta-context

技能说明


name: authoring-meta-context description: > Authors and extracts dbt MetricFlow meta context — structured YAML meta: blocks that encode business knowledge (thresholds, investigation paths, SLAs, relationships) alongside metric definitions so AI agents answer analytical questions accurately. Use when user asks about context cards, meta context blocks, dbt metric meta blocks, semantic layer context, distilling runbooks into YAML, authoring meta context, validating meta context, or improving AI agent analytical accuracy on dbt metrics.

Authoring Meta Context

Quick start

  1. Gather source docs (runbooks, wikis, SLA contracts, post-mortems) for your target metric.
  2. Run the distillation prompt against them: see guides/distillation-prompt.md.
  3. Paste the draft meta: block into your semantic model YAML.
  4. Validate: dbt-mc validate path/to/semantic_model.yml
  5. Fill # NEEDS REVIEW and # NOT FOUND gaps from the output.

Start with Bronze tier (13 Core fields, ~45 min/metric) on your 5–10 most-questioned metrics.

Authoring workflow

  • Collect source docs (see guides/sourcing.md for field-by-field source map)
  • Run distillation prompt — fills 60–70% of schema from existing docs
  • Review output: verify # NEEDS REVIEW items; fill # NOT FOUND gaps with the metric owner (see guides/interview.md for the domain-expert interview questions)
  • Add business_rules (Layer 5) for any metric tied to a customer or regulatory SLA — absence creates false confidence
  • Validate with dbt-mc validate — check for type errors and false-confidence risk
  • Set last_validated to today's date

The 5 layers

LayerQuestionFailure it closes
1. ContextWho cares and why does this exist?Interpretation
2. ExpectationsWhat does good look like?Calibration
3. InvestigationWhen it breaks, where do I look?Framing
4. RelationshipsWhat else moves when this moves?Reasoning
5. DecisionsWhat do I do about it?Action + false confidence

Critical: Layers 2–4 without Layer 5 create false confidence. An agent that knows healthy ranges but not business rules will give confidently wrong answers on SLA and compliance questions.

Authoring principles

Follow the five principles in guides/authoring.md:

  1. Write for the worst-case consumer — no jargon, no assumed knowledge
  2. Encode reasoning, not just facts (include the why in seasonality, investigation paths)
  3. Use specific relationship types with direction, magnitude, and lag
  4. Include magnitude in thresholds and seasonality
  5. Write investigation paths as conditional logic (IF/THEN trees), not flat lists

Validator

pip install "git+https://github.com/keithbinkly/dbt-meta-context.git#subdirectory=validator"
dbt-mc validate models/semantic_models/         # tier report + false-confidence risk
dbt-mc validate models/ --format json           # CI integration

Exit code 2 = false-confidence risk (expectations populated without business_rules). See validator/README.md for CI and pre-commit setup.

Reference