@luquimbo/bi-superpowers 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/.claude-plugin/marketplace.json +2 -24
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.claude-plugin/skill-manifest.json +2 -178
  4. package/.mcp.json +0 -16
  5. package/.plugin/plugin.json +1 -1
  6. package/AGENTS.md +37 -55
  7. package/CHANGELOG.md +69 -0
  8. package/README.md +74 -191
  9. package/bin/cli.js +45 -60
  10. package/bin/commands/install.js +37 -7
  11. package/bin/lib/generators/claude-plugin.js +6 -31
  12. package/bin/lib/generators/claude-plugin.test.js +12 -11
  13. package/bin/lib/generators/shared.js +0 -31
  14. package/bin/lib/mcp-config.js +242 -0
  15. package/bin/lib/mcp-config.test.js +184 -0
  16. package/bin/lib/microsoft-mcp.js +6 -20
  17. package/bin/lib/microsoft-mcp.test.js +25 -21
  18. package/bin/lib/skills.js +1 -2
  19. package/bin/postinstall.js +18 -23
  20. package/bin/utils/mcp-detect.js +4 -20
  21. package/bin/utils/mcp-detect.test.js +9 -33
  22. package/package.json +1 -1
  23. package/skills/pbi-connect/SKILL.md +1 -1
  24. package/skills/project-kickoff/SKILL.md +1 -1
  25. package/commands/contributions.md +0 -265
  26. package/commands/data-model-design.md +0 -468
  27. package/commands/dax-doctor.md +0 -248
  28. package/commands/fabric-scripts.md +0 -452
  29. package/commands/migration-assistant.md +0 -290
  30. package/commands/model-documenter.md +0 -242
  31. package/commands/report-layout.md +0 -296
  32. package/commands/rls-design.md +0 -533
  33. package/commands/theme-tweaker.md +0 -624
  34. package/skills/contributions/SKILL.md +0 -267
  35. package/skills/data-model-design/SKILL.md +0 -470
  36. package/skills/data-modeling/SKILL.md +0 -280
  37. package/skills/data-quality/SKILL.md +0 -664
  38. package/skills/dax/SKILL.md +0 -746
  39. package/skills/dax-doctor/SKILL.md +0 -250
  40. package/skills/dax-udf/SKILL.md +0 -489
  41. package/skills/deployment/SKILL.md +0 -320
  42. package/skills/excel-formulas/SKILL.md +0 -463
  43. package/skills/fabric-scripts/SKILL.md +0 -454
  44. package/skills/fast-standard/SKILL.md +0 -509
  45. package/skills/governance/SKILL.md +0 -258
  46. package/skills/migration-assistant/SKILL.md +0 -292
  47. package/skills/model-documenter/SKILL.md +0 -244
  48. package/skills/power-query/SKILL.md +0 -406
  49. package/skills/query-performance/SKILL.md +0 -480
  50. package/skills/report-design/SKILL.md +0 -207
  51. package/skills/report-layout/SKILL.md +0 -298
  52. package/skills/rls-design/SKILL.md +0 -535
  53. package/skills/semantic-model/SKILL.md +0 -237
  54. package/skills/testing-validation/SKILL.md +0 -643
  55. package/skills/theme-tweaker/SKILL.md +0 -626
  56. package/src/content/skills/contributions.md +0 -259
  57. package/src/content/skills/data-model-design.md +0 -462
  58. package/src/content/skills/data-modeling.md +0 -272
  59. package/src/content/skills/data-quality.md +0 -656
  60. package/src/content/skills/dax-doctor.md +0 -242
  61. package/src/content/skills/dax-udf.md +0 -481
  62. package/src/content/skills/dax.md +0 -738
  63. package/src/content/skills/deployment.md +0 -312
  64. package/src/content/skills/excel-formulas.md +0 -455
  65. package/src/content/skills/fabric-scripts.md +0 -446
  66. package/src/content/skills/fast-standard.md +0 -501
  67. package/src/content/skills/governance.md +0 -250
  68. package/src/content/skills/migration-assistant.md +0 -284
  69. package/src/content/skills/model-documenter.md +0 -236
  70. package/src/content/skills/power-query.md +0 -398
  71. package/src/content/skills/query-performance.md +0 -472
  72. package/src/content/skills/report-design.md +0 -199
  73. package/src/content/skills/report-layout.md +0 -290
  74. package/src/content/skills/rls-design.md +0 -527
  75. package/src/content/skills/semantic-model.md +0 -229
  76. package/src/content/skills/testing-validation.md +0 -635
  77. package/src/content/skills/theme-tweaker.md +0 -618
@@ -1,272 +0,0 @@
1
- # Data Modeling Skill
2
-
3
- ## Trigger
4
- Activate this skill when user mentions:
5
- - "data model", "semantic model", "data modeling"
6
- - "star schema", "snowflake schema"
7
- - "fact table", "dimension table", "bridge table"
8
- - "relationship", "cardinality", "filter direction"
9
- - "surrogate key", "business key"
10
- - "SCD", "slowly changing dimension"
11
- - "role-playing dimension"
12
-
13
- ## Identity
14
- You are a **Data Modeling Expert** specializing in dimensional modeling for Power BI and Analysis Services. You help users design efficient, scalable star schemas that follow Kimball methodology and Power BI best practices.
15
-
16
- ---
17
-
18
- ## Overview
19
- Best practices for designing semantic models in Power BI.
20
-
21
- ## Star Schema Design
22
-
23
- ### Fact Tables
24
- - Contain measurable events/transactions
25
- - **Plural names** (multiple events): `Sales`, `Orders`, `Transactions`
26
- - **No `Fact_` prefix** — that's developer jargon, users see this in the model
27
- - Granularity: one row per event/transaction
28
- - Include foreign keys to dimension tables (hidden from report view)
29
- - Hide raw numeric columns; expose them through explicit measures
30
-
31
- ```
32
- Sales ← plural, business name, no prefix
33
- ├── SalesKey (PK, hidden)
34
- ├── DateKey (FK, hidden)
35
- ├── ProductKey (FK, hidden)
36
- ├── CustomerKey (FK, hidden)
37
- ├── StoreKey (FK, hidden)
38
- ├── Quantity (hidden, exposed via [Quantity Sold] measure)
39
- ├── Unit Price (hidden, used in measures)
40
- └── Sales Amount (hidden, used in [Sales] measure)
41
- ```
42
-
43
- ### Dimension Tables
44
- - Contain descriptive attributes
45
- - **Singular names** (describes one entity): `Customer`, `Product`, `Date`
46
- - **No `Dim_` prefix** — users see this name
47
- - Include surrogate key (integer PK, hidden)
48
- - Denormalized for simplicity
49
- - Include business key for lookups
50
-
51
- ```
52
- Product ← singular, business name, no prefix
53
- ├── ProductKey (PK, surrogate, hidden)
54
- ├── Product ID (business key, visible)
55
- ├── Product Name
56
- ├── Category
57
- ├── Subcategory
58
- ├── Brand
59
- └── Unit Cost
60
- ```
61
-
62
- ### Date Dimension
63
- Essential for time intelligence. Mark as Date Table in Power BI. Singular: `Date`, never `Dates` or `Dim_Date`.
64
-
65
- ```
66
- Date ← singular, no prefix
67
- ├── DateKey (PK, YYYYMMDD integer, hidden)
68
- ├── Date (actual date)
69
- ├── Year
70
- ├── Quarter
71
- ├── Month
72
- ├── Month Name
73
- ├── Week
74
- ├── Day of Week
75
- ├── Day Name
76
- ├── Is Weekend
77
- ├── Is Holiday
78
- └── Fiscal Year (if different from calendar)
79
- ```
80
-
81
- ## Relationship Best Practices
82
-
83
- ### Cardinality
84
- | Type | Use Case |
85
- |------|----------|
86
- | One-to-Many (*:1) | Dimension to Fact (most common) |
87
- | One-to-One (1:1) | Rare; consider merging tables |
88
- | Many-to-Many (*:*) | Bridge tables, avoid if possible |
89
-
90
- ### Filter Direction
91
- ```
92
- Dimension ──(filters)──> Fact ✓ Single direction (default)
93
- Dimension <──(filters)──> Fact ⚠ Bi-directional (use sparingly)
94
- ```
95
-
96
- ### Active vs Inactive Relationships
97
- ```dax
98
- -- Only one active relationship between tables
99
- -- Use USERELATIONSHIP for inactive relationships
100
-
101
- Sales_ByShipDate =
102
- CALCULATE(
103
- [TotalSales],
104
- USERELATIONSHIP(Sales[ShipDate], 'Date'[Date])
105
- )
106
- ```
107
-
108
- ### Role-Playing Dimensions
109
- Same dimension used multiple times (e.g., Date for Order, Ship, Delivery):
110
-
111
- ```
112
- Option 1: Multiple relationships (one active, rest inactive)
113
- Date ──── Sales[OrderDate] (active)
114
- Date ─ ─ ─ Sales[ShipDate] (inactive)
115
- Date ─ ─ ─ Sales[DeliveryDate] (inactive)
116
-
117
- Option 2: Duplicate dimension tables (clearer but redundant)
118
- OrderDate ──── Sales[OrderDate]
119
- ShipDate ──── Sales[ShipDate]
120
- ```
121
-
122
- ## Naming Conventions
123
-
124
- **Core principle:** user-visible names speak business language, technical elements stay hidden. No `dim`, `fact`, `tbl` prefixes — those leak SQL jargon into the user experience.
125
-
126
- | Element | Convention | Example | Anti-Pattern |
127
- |---------|------------|---------|--------------|
128
- | Fact tables | Plural, business name | `Sales`, `Orders`, `Transactions` | `Fact_Sales`, `fct_sales` |
129
- | Dimension tables | Singular, business name | `Customer`, `Product`, `Date` | `Dim_Customer`, `dim_customers` |
130
- | Bridge tables | `Bridge` prefix | `Bridge Customer Region` | `BridgeCustomerRegion` |
131
- | Foreign keys | `[Entity]Key`, hidden | `ProductKey`, `CustomerKey` | `prod_id`, `FK_Product` |
132
- | Surrogate PK | `[Entity]Key`, hidden | `CustomerKey` | `ID`, `pk_customer` |
133
- | Business key | `[Entity] ID` or `Code` | `Customer ID`, `Product Code` | `BusinessKey` |
134
- | Attribute columns | Natural language | `First Name`, `Order Date` | `FrstNm`, `OrdDt` |
135
- | Measures | Auto-explicative, no prefix | `Sales`, `Margin %`, `Sales YTD` | `Total Sales`, `Sum of Sales` |
136
-
137
- See `/governance` for the complete naming guide.
138
-
139
- ## Common Patterns
140
-
141
- ### Many-to-Many with Bridge Table
142
- ```
143
- Customer ──(1:*)── Bridge Customer Product ──(*:1)── Product
144
- ```
145
-
146
- ### Slowly Changing Dimensions (SCD)
147
- ```
148
- Type 1: Overwrite (no history)
149
- Type 2: Add new row with version tracking
150
- - Start Date, End Date, Is Current flag
151
-
152
- Customer (SCD2)
153
- ├── CustomerKey (surrogate, unique per version, hidden)
154
- ├── Customer ID (business key)
155
- ├── Customer Name
156
- ├── Address
157
- ├── Start Date
158
- ├── End Date
159
- └── Is Current
160
- ```
161
-
162
- ### Junk Dimension (Low-Cardinality Flags)
163
- Combine multiple low-cardinality attributes:
164
- ```
165
- Order Flags
166
- ├── OrderFlagKey (hidden)
167
- ├── Is Rush
168
- ├── Is Gift
169
- ├── Is Online
170
- └── Payment Type
171
- ```
172
-
173
- ### Degenerate Dimension
174
- Attributes stored in fact table (no separate dimension):
175
- ```
176
- Sales
177
- ├── ...
178
- ├── Invoice Number (degenerate dimension)
179
- ├── Order Number (degenerate dimension)
180
- └── ...
181
- ```
182
-
183
- ## Performance Optimization
184
-
185
- ### Column Organization
186
- 1. Hide foreign keys from report view
187
- 2. Hide technical columns (keys, IDs)
188
- 3. Organize visible columns in display folders
189
- 4. Set appropriate data types
190
-
191
- ### Data Reduction
192
- 1. Remove unused columns
193
- 2. Aggregate historical data (archive detail)
194
- 3. Use incremental refresh for large fact tables
195
- 4. Consider aggregation tables for summaries
196
-
197
- ### Relationship Optimization
198
- 1. Use integer keys (not text) for relationships
199
- 2. Ensure proper indexing at source
200
- 3. Minimize bi-directional relationships
201
- 4. Avoid circular relationship paths
202
-
203
- ## Model Validation Checklist
204
-
205
- - [ ] No technical prefixes (`Dim_`, `Fact_`, `tbl_`)
206
- - [ ] Dimensions are singular (`Customer`), facts are plural (`Sales`)
207
- - [ ] Foreign keys hidden from report view
208
- - [ ] Sumable source columns hidden (only explicit measures visible)
209
- - [ ] All relationships are single-direction (except where required)
210
- - [ ] Date table marked as Date Table
211
- - [ ] No circular dependencies
212
- - [ ] Measures in dedicated folder or table
213
- - [ ] Appropriate data types assigned
214
- - [ ] Display folders organized
215
- - [ ] Key columns properly indexed
216
-
217
- ## Anti-patterns to Avoid
218
-
219
- ### Wide Tables (Flat Files)
220
- ```
221
- ❌ One big table with everything
222
- ✓ Separate into facts and dimensions
223
- ```
224
-
225
- ### Snowflake Complexity
226
- ```
227
- ❌ Product → Category → Department
228
- ✓ Denormalize: Product (includes Category, Department columns)
229
- ```
230
-
231
- ### Calculated Columns for Measures
232
- ```
233
- ❌ Calculated column: [Profit] = [Revenue] - [Cost]
234
- ✓ Measure: Profit = SUM(Sales[Revenue]) - SUM(Sales[Cost])
235
- ```
236
-
237
- ### Technical Prefixes on User-Visible Tables
238
- ```
239
- ❌ Fact_Sales, Dim_Customer (developer jargon leaks to users)
240
- ✓ Sales, Customer (business names)
241
- ```
242
-
243
- ### Visible Sumable Columns
244
- ```
245
- ❌ Quantity column visible — users drag it into visuals as Sum/Average
246
- ✓ Hide Quantity, expose explicit measure: Quantity Sold = SUM(Sales[Quantity])
247
- ```
248
-
249
- ### Missing Date Dimension
250
- ```
251
- ❌ Using date column directly from fact table
252
- ✓ Proper Date dimension with all time intelligence attributes
253
- ```
254
-
255
- ## Complexity Adaptation
256
-
257
- Adjust depth based on `config.json → experienceLevel`:
258
- - **beginner**: Step-by-step with explanations, reference library examples
259
- - **intermediate**: Standard depth, explain non-obvious decisions
260
- - **advanced**: Concise, skip basics, focus on edge cases and optimization
261
-
262
- ## Related Skills
263
-
264
- - `/data-model-design` — Interactive model builder
265
- - `/dax` — Write measures for the model
266
- - `/semantic-model` — Advanced semantic model patterns
267
- - `/governance` — Naming conventions for model objects
268
-
269
- ## Related Resources
270
-
271
- - [Snippets: Time Intelligence](../../snippets/dax/time-intelligence.md)
272
- - [Templates: Data Models](../../templates/data-models/)