enrich-context

Augment Wren projects with business context extracted from raw documents and database probes.

17.7k|2.0k|Updated Mar 13, 2024
One-click install
npx skills add https://github.com/Canner/WrenAI --skill enrich-context-canner
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: enrich-context
Source: https://github.com/Canner/WrenAI/tree/main/core/wren/src/wren/skills_content/enrich-context
Command: npx skills add https://github.com/Canner/WrenAI --skill enrich-context-canner

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Database schemas alone cannot carry business semantics like enum meanings, units, NULL semantics, or metric definitions, so AI agents generate wrong SQL. This Skill reads raw artifacts (PDFs, glossaries, handbooks, data dictionaries) and fills those gaps into a Wren project's MDL, cubes, and knowledge files. ## Core Features & Use Cases - Two operating modes: Grill mode interviews the user one question at a time with recommended answers; auto-pilot mode applies inferences directly and escalates only conflicts and high-blast-radius additions like new cubes or relationships. - Ten-category gap catalog: Detects missing enum semantics, units, NULL meanings, magic sentinels, soft-delete filters, synonyms, time conventions, external identifiers, currency rules, and canonical-table preferences, routing each to the correct sink. - Cube proposals: Converts named aggregation metrics (ARR, DAU, churn, NRR) found in raw documents into validated cube YAML with duplication guards against existing cubes and legacy MDL metrics. - Use Case: After generating an MDL, point the Skill at a folder containing your finance handbook and data dictionary; it extracts atomic claims, diffs them against current context, and writes confirmed findings to MDL descriptions, knowledge/rules/, and knowledge/sql/ pairs. ## Quick Start Ask the agent to enrich my Wren project context using the documents in the raw folder, choosing grill mode to review each proposed addition.

Frequently Asked Questions about enrich-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add business context to a Wren AI project?▼

Place raw documents like glossaries, handbooks, or data dictionaries into the project's raw/ folder, then run the enrich-context skill. It extracts atomic claims, diffs them against your MDL and knowledge files, and writes confirmed findings to the appropriate sinks.

What is the difference between grill mode and auto-pilot mode?▼

Grill mode asks one question at a time with a recommended answer, letting you accept, edit, or skip each gap. Auto-pilot applies inferences directly and only interrupts for raw-versus-MDL conflicts, ambiguous routing, or high-blast-radius additions like new cubes and relationships.

Can the skill modify existing MDL descriptions or rules?▼

No, the skill only appends new content and never edits existing MDL fields, rules, or SQL pairs. Contradictions between raw documents and existing context are surfaced on a manual-fix list for you to resolve.

Does enrich-context query the live database?▼

Only in grill mode, and only after asking permission once per session. It samples up to 30 distinct values per candidate column to detect enums, sentinels, and time grains; auto-pilot mode never queries the live database.

When should metrics become cubes instead of MDL descriptions?▼

Named aggregation metrics like ARR, DAU, or churn should become cubes under cubes/<name>/metadata.yml. The skill checks existing cubes and legacy metrics first to avoid duplicates, then validates with wren context validate and a sql-only cube query.