retail-kpi-knowledge
Skill2 starsChanged 4 months agoApache-2.0View on GitHub
Retail KPI / metric-contract reasoning layer for BI agents in the Seshat BI project. Use when an agent must reason about the BUSINESS MEANING of a retail KPI before any implementation — defining a KPI in business terms, classifying additivity (fully/semi/non-additive), identifying grain, listing required source fields, resolving ambiguity (gross vs net, VAT, returns, cost method, same-store), choosing an MVP KPI pack, reviewing a metric contract for completeness, or preparing a clean handoff to an implementation layer. Also use it to classify KPI sufficiency or prepare an owner policy decision packet. This is a meaning/definition + review layer, not an executor: it does not write DAX/SQL/Python, grant readiness, approve policy, or design dashboards. See INDEX.md for live/planned routes; registry.yaml is the authoritative machine-readable inventory.
In this repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- approval-consoleSkill
- approval-evidence-packSkill
- business-knowledge-interviewSkill
- capabilitiesSkill
- consumer-data-dictionarySkill
- cross-table-lineageSkill
- dagster-orchestration-adapterSkill
- dashboard-designSkill
- dashboard-intelligenceSkill
- dbt-transformation-adapterSkill
- evidence-pack-generatorSkill
- first-hour-compassSkill
- friendly-pr-reviewerSkill
- grain-confidence-reviewerSkill
- kpi-contract-builderSkill
- pbi-mcp-write-adapterSkill
- pbip-workflowSkill
- pbip-xraySkill
- pbir-authoring-adapterSkill
- portfolio-watchSkill
- powerbi-dashboard-designSkill
- pr-readiness-reviewerSkill
- readiness-viewerSkill
- release-notes-generatorSkill
- report-intent-interviewSkill
- retail-build-warehouseSkill
- retail-control-roomSkill
- retail-discover-portfolioSkill
- retail-governSkill
- retail-initSkill
- retail-onboard-tableSkill
- retail-orchestrateSkill
- retail-scaffoldSkill
- retail-semantic-checkSkill
- retail-validateSkill
- run-next-readinessSkill
- seshat-studioSkill
- showcase-buildSkill
- source-mappingSkill
- speckit-analyzeSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-git-commitSkill
- speckit-git-featureSkill
- speckit-git-initializeSkill
- speckit-git-remoteSkill
- speckit-git-validateSkill
- speckit-implementSkill
- speckit-planSkill
- speckit-specifySkill
- speckit-tasksSkill
- speckit-taskstoissuesSkill
- bi-analyst-knowledgeSkill
- bi-bigdata-knowledgeSkill
- bi-dax-knowledgeSkill
- bi-python-knowledgeSkill
- bi-sql-knowledgeSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 60
Always route, never scan. Open the fewest files needed.
- Very specific: line 66
Start here (SKILL.md) to confirm scope and boundaries.
- Distinctive: line 83
Stop and hand off (do not continue) when any of these is true:
≈ “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.
Files
Retail KPI Knowledge Skill
A Retail KPI and metric-contract reasoning layer for BI agents. It helps an agent define, classify, review, and validate retail KPIs before any DAX measure, SQL transformation, or dashboard page is built.
Purpose
This layer owns the business meaning of retail KPIs and the metric contract that must exist before implementation. It produces definitions, additivity and grain calls, required-field lists, ambiguity flags, validation checks, and a clean handoff to the DAX / semantic-model layer.
It does not produce runtime artifacts. It governs meaning; other layers govern code.
Use when
The agent needs to:
- define a retail KPI in business terms
- review a metric contract for completeness
- classify a KPI's additivity (fully / semi / non-additive)
- identify a KPI's grain
- identify the required source fields for a KPI
- decide whether a KPI is safe for dashboard use
- choose an MVP KPI pack for a first dashboard
- detect ambiguous or dangerous KPI meaning (gross vs net, VAT, returns, cost method)
- prepare a handoff to an implementation layer (SQL for fields/grain/transform, DAX for the measure, Python for single-node source-prep, Big-data for distributed/at-scale aggregation & reconciliation)
- classify a candidate as answerable, source-blocked, policy-blocked, or not applicable
- prepare a neutral decision packet for a named policy authority
Do not use when
- writing DAX measures (→ DAX knowledge layer)
- building or transforming SQL tables (→ SQL knowledge layer)
- executing Python / dataframe prep (→ Python knowledge layer)
- approving readiness or granting pass/block (→ Readiness layer)
- designing dashboard visuals or page layout (→ Dashboard design layer)
- publishing Power BI
Mandatory workflow
Always route, never scan. Open the fewest files needed.
SKILL.md -> INDEX.md -> relevant knowledge / contract / pack file(s) -> metric contract / checklist / verdict- Start here (
SKILL.md) to confirm scope and boundaries. - Go to
INDEX.mdand pick the matching task / symptom / domain / pack route. - Open only the file(s) that route names.
- End on a deliverable: a completed metric contract, a checklist result, a verdict, an owner decision packet, or an implementation handoff note. Never end inside raw knowledge.
Boundaries
- Readiness owns gates and pass/block status.
- SQL knowledge owns SQL transformation and reconciliation logic.
- DAX knowledge owns measures, filter context, and semantic-model implementation.
- Python knowledge owns dataframe / source-prep reasoning.
- Dashboard design owns visual and page design.
- Retail KPI knowledge (this layer) owns business KPI meaning and metric contracts.
Stop rules
Stop and hand off (do not continue) when any of these is true:
- The task asks for DAX, SQL, or Python code → hand off to that layer; provide only a business-terms formula and a handoff note.
- The task asks whether a dataset/model is ready to ship → hand off to Readiness.
- The task asks for a dashboard page or visual design → hand off to Dashboard design.
- A KPI's policy is undefined (VAT, returns, cost method, same-store, snapshot date) →
mark
blocked_by_policy, prepare the decision packet, and stop; do not invent the policy. - A required source field cannot be confirmed to exist → mark it as an assumption or dependency; do not pretend the field exists.
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
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.

