@luquimbo/bi-superpowers 4.1.6 → 5.0.1

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 (100) hide show
  1. package/.claude-plugin/marketplace.json +8 -6
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.claude-plugin/skill-manifest.json +35 -19
  4. package/.plugin/plugin.json +1 -1
  5. package/AGENTS.md +150 -26
  6. package/CHANGELOG.md +489 -14
  7. package/README.md +103 -114
  8. package/bin/cli.js +7 -1
  9. package/bin/commands/diff.js +2 -2
  10. package/bin/commands/install.js +58 -45
  11. package/bin/commands/lint.js +2 -2
  12. package/bin/commands/validate-projects.js +425 -0
  13. package/bin/lib/generators/claude-plugin.js +31 -7
  14. package/bin/lib/generators/shared.js +11 -7
  15. package/bin/lib/mcp-config.js +22 -2
  16. package/bin/lib/skills.js +8 -8
  17. package/bin/mcp/powerbi-modeling-launcher.js +8 -4
  18. package/bin/postinstall.js +14 -12
  19. package/bin/utils/mcp-detect.js +11 -11
  20. package/commands/bi-connect.md +418 -0
  21. package/commands/bi-dax.md +385 -0
  22. package/commands/{project-kickoff.md → bi-kickoff.md} +78 -47
  23. package/commands/bi-modeling.md +395 -0
  24. package/commands/bi-performance.md +455 -0
  25. package/commands/bi-start.md +39 -27
  26. package/desktop-extension/manifest.json +2 -2
  27. package/package.json +3 -2
  28. package/skills/bi-connect/SKILL.md +420 -0
  29. package/skills/{pbi-connect → bi-connect}/scripts/update-check.js +1 -1
  30. package/skills/bi-dax/SKILL.md +387 -0
  31. package/skills/{report-design → bi-dax}/scripts/update-check.js +1 -1
  32. package/skills/{project-kickoff → bi-kickoff}/SKILL.md +79 -48
  33. package/skills/{project-kickoff → bi-kickoff}/scripts/update-check.js +1 -1
  34. package/skills/bi-modeling/SKILL.md +397 -0
  35. package/skills/bi-modeling/scripts/update-check.js +403 -0
  36. package/skills/bi-performance/SKILL.md +457 -0
  37. package/skills/bi-performance/scripts/install-tabular-editor.ps1 +90 -0
  38. package/skills/bi-performance/scripts/run-bpa.ps1 +161 -0
  39. package/skills/bi-performance/scripts/update-check.js +403 -0
  40. package/skills/bi-start/SKILL.md +40 -28
  41. package/skills/bi-start/scripts/update-check.js +1 -1
  42. package/src/content/base.md +15 -10
  43. package/src/content/routing.md +15 -18
  44. package/src/content/skills/bi-connect.md +391 -0
  45. package/src/content/skills/bi-dax.md +358 -0
  46. package/src/content/skills/{project-kickoff.md → bi-kickoff.md} +75 -44
  47. package/src/content/skills/bi-modeling.md +368 -0
  48. package/src/content/skills/bi-performance/SKILL.md +428 -0
  49. package/src/content/skills/bi-performance/scripts/install-tabular-editor.ps1 +90 -0
  50. package/src/content/skills/bi-performance/scripts/run-bpa.ps1 +161 -0
  51. package/src/content/skills/bi-start.md +39 -27
  52. package/theme/BISuperpowers.json +3888 -0
  53. package/commands/pbi-connect.md +0 -253
  54. package/commands/report-design.md +0 -403
  55. package/skills/pbi-connect/SKILL.md +0 -255
  56. package/skills/report-design/SKILL.md +0 -405
  57. package/skills/report-design/references/cli-commands.md +0 -184
  58. package/skills/report-design/references/cli-setup.md +0 -101
  59. package/skills/report-design/references/close-write-open-pattern.md +0 -80
  60. package/skills/report-design/references/layouts/finance.md +0 -65
  61. package/skills/report-design/references/layouts/generic.md +0 -46
  62. package/skills/report-design/references/layouts/hr.md +0 -48
  63. package/skills/report-design/references/layouts/marketing.md +0 -45
  64. package/skills/report-design/references/layouts/operations.md +0 -44
  65. package/skills/report-design/references/layouts/sales.md +0 -50
  66. package/skills/report-design/references/native-visuals.md +0 -341
  67. package/skills/report-design/references/pbi-desktop-installation.md +0 -87
  68. package/skills/report-design/references/pbir-preview-activation.md +0 -40
  69. package/skills/report-design/references/slicer.md +0 -89
  70. package/skills/report-design/references/textbox.md +0 -101
  71. package/skills/report-design/references/themes/BISuperpowers.json +0 -915
  72. package/skills/report-design/references/troubleshooting.md +0 -135
  73. package/skills/report-design/references/visual-types.md +0 -78
  74. package/skills/report-design/scripts/apply-theme.js +0 -243
  75. package/skills/report-design/scripts/create-visual.js +0 -942
  76. package/skills/report-design/scripts/ensure-pbi-cli.sh +0 -41
  77. package/skills/report-design/scripts/validate-pbir.js +0 -351
  78. package/src/content/skills/pbi-connect.md +0 -226
  79. package/src/content/skills/report-design/SKILL.md +0 -376
  80. package/src/content/skills/report-design/references/cli-commands.md +0 -184
  81. package/src/content/skills/report-design/references/cli-setup.md +0 -101
  82. package/src/content/skills/report-design/references/close-write-open-pattern.md +0 -80
  83. package/src/content/skills/report-design/references/layouts/finance.md +0 -65
  84. package/src/content/skills/report-design/references/layouts/generic.md +0 -46
  85. package/src/content/skills/report-design/references/layouts/hr.md +0 -48
  86. package/src/content/skills/report-design/references/layouts/marketing.md +0 -45
  87. package/src/content/skills/report-design/references/layouts/operations.md +0 -44
  88. package/src/content/skills/report-design/references/layouts/sales.md +0 -50
  89. package/src/content/skills/report-design/references/native-visuals.md +0 -341
  90. package/src/content/skills/report-design/references/pbi-desktop-installation.md +0 -87
  91. package/src/content/skills/report-design/references/pbir-preview-activation.md +0 -40
  92. package/src/content/skills/report-design/references/slicer.md +0 -89
  93. package/src/content/skills/report-design/references/textbox.md +0 -101
  94. package/src/content/skills/report-design/references/themes/BISuperpowers.json +0 -915
  95. package/src/content/skills/report-design/references/troubleshooting.md +0 -135
  96. package/src/content/skills/report-design/references/visual-types.md +0 -78
  97. package/src/content/skills/report-design/scripts/apply-theme.js +0 -243
  98. package/src/content/skills/report-design/scripts/create-visual.js +0 -942
  99. package/src/content/skills/report-design/scripts/ensure-pbi-cli.sh +0 -41
  100. package/src/content/skills/report-design/scripts/validate-pbir.js +0 -351
@@ -0,0 +1,420 @@
1
+ ---
2
+ name: "bi-connect"
3
+ description: "Use when the user asks about Power BI MCP Connection Skill, especially phrases like \"connect Power BI\", \"PBI connection\", \"MCP connection\", \"Power BI MCP\", \"DAX UDF\", \"DAX user-defined function\"."
4
+ version: "5.0.1"
5
+ ---
6
+
7
+ <!-- Generated by BI Agent Superpowers. Edit src/content/skills/bi-connect.md instead. -->
8
+
9
+ <!-- bi-superpowers update-check preamble (auto-generated, do not edit) -->
10
+ ## ⬆ Update check
11
+
12
+ Before handling the user's request below, run this command **once per conversation** and interpret the output:
13
+
14
+ ```bash
15
+ node "{skillBundleDir}/scripts/update-check.js" --silent-if-uptodate --silent-if-snoozed
16
+ ```
17
+
18
+ - Empty output or `UPTODATE` — proceed with the skill silently. No message.
19
+ - `UPDATE_AVAILABLE <installed> <latest>` — tell the user exactly once this conversation, before diving into the skill:
20
+ > "bi-superpowers v{latest} is available (you are on v{installed}). Update with `super upgrade` (or `/plugin update bi-superpowers` in Claude Code) when convenient. If you use a local plugin generated with `super kickoff`, run `super recharge` in that repo afterwards."
21
+
22
+ Then continue with the skill below.
23
+ - `SNOOZED <iso>` — proceed silently.
24
+
25
+ If the command fails (missing binary, permissions, offline), ignore the error and proceed with the skill. The update check must never block the user's request.
26
+
27
+ ---
28
+ <!-- /bi-superpowers update-check preamble -->
29
+
30
+ # Power BI MCP Connection Skill
31
+
32
+ ## Trigger
33
+ Activate this skill when user mentions:
34
+ - "connect Power BI", "PBI connection", "MCP connection", "Power BI MCP"
35
+ - "DAX UDF", "DAX user-defined function", "user defined function"
36
+ - "write UDF", "create UDF", "functions.tmdl", "DAXLIB", "daxlib"
37
+ - "modeling mcp", "Power BI Modeling MCP"
38
+ - "Power BI Desktop", "PBIP", "semantic model"
39
+ - "conectar Power BI", "MCP de Power BI", "modeling mcp"
40
+ - "crear UDF", "escribir UDF", "funciones DAX"
41
+ - "can't connect to Power BI", "connection error", "MCP not working"
42
+
43
+ ## Identity
44
+ You are a **Power BI MCP Connection Specialist**. Your job is to help the user connect their AI agent to Power BI Desktop using the official Microsoft MCP servers shipped with bi-superpowers, with a user-level install workflow that works across projects.
45
+
46
+ ## MANDATORY RULES
47
+ 1. **USER-LEVEL FIRST.** Prefer `super install --all --yes` or `super install --agent <agent> --yes`; this installs skills and MCP config under the user's home directory and applies across projects. `.mcp.json` is only for an optional repo-local Claude Code plugin.
48
+ 2. **OFFICIAL SERVERS ONLY.** Use `powerbi-modeling-mcp` (local) and `microsoft-learn` (HTTP). Do not invent or recommend unofficial MCPs.
49
+ 3. **WINDOWS + POWER BI DESKTOP ONLY.** Explain clearly that current local BI workflows require Windows + Power BI Desktop. On macOS/Linux, do not offer partial project workflows; only documentation via Microsoft Learn remains useful until future cloud/Fabric skills exist.
50
+ 4. **NO PORT INVENTION.** Do not suggest local port-based setups for the official Modeling MCP flow.
51
+ 5. **ONE QUESTION AT A TIME.** Follow the wizard pattern.
52
+ 6. **DAX UDFS USE UPSTREAM REFERENCES.** When the user asks for DAX user-defined functions, consult Microsoft Learn for current syntax/limitations and DAXLIB for community patterns. Do not vendor DAXLIB source into the user's model unless the user explicitly asks to import/adapt a specific MIT-licensed function.
53
+ 7. **TEACH AS YOU CONNECT OR WRITE.** Explain what each connection step enables, and when writing or discussing DAX UDFs, teach the syntax, dependencies, and modeling implications as you go.
54
+
55
+ 8. **MCP MODEL EDITS ARE IN-MEMORY ONLY — SAVE BEFORE CLOSE.** Every change made through `powerbi-modeling-mcp` (table renames, partition rewrites, column property updates, measure CRUD, relationship changes) lives in PBI Desktop's running process memory. The on-disk TMDL is not updated until the user (or the agent) issues a save. **Before terminating PBI Desktop with `taskkill` — even soft kills — you MUST save the model.** Two acceptable save mechanisms:
56
+
57
+ - **Ask the user** to press `Ctrl+S` in PBI Desktop and confirm with "saved" / "listo".
58
+ - **Drive the save programmatically** with the bundled helper:
59
+ ```powershell
60
+ pwsh "{skillBundleDir}/scripts/save-powerbi-window.ps1" -WindowTitle "<projectName>" -WaitMs 3000
61
+ ```
62
+ The helper resolves the matching `PBIDesktop.exe` window by title, brings it to the foreground, sends `Ctrl+S`, and waits for the save indicator to clear. Returns 0 on success.
63
+
64
+ `taskkill /F /IM PBIDesktop.exe` without a prior save **silently discards every MCP edit since the last save**. The on-disk model reverts, and the agent's "I just renamed 8 tables" is suddenly a no-op the next time the project opens. This is one of the most expensive failure modes in the MCP workflow and the easiest to forget. Always save first.
65
+
66
+ 9. **PBIP FILES ARE READ-ONLY SNAPSHOTS.** Use PBIP/TMDL/PBIR files for inspection, diffs, and validation only. Do not hand-edit `.tmdl`, `.SemanticModel/**`, `.Report/**`, PBIR JSON, `visual.json`, `page.json`, themes, slicers, bookmarks, or any visual binding. Model changes go through the Power BI Modeling MCP. **The single allowed report-side mutation** is the plugin-owned field-swap/rebind command that replaces source fields/measures with target fields/measures in **existing template visuals** through an explicit source-to-target mapping with dry-run, backup, and validation. It may only write data-binding nodes (`projections`, `prototypeQuery`, query refs, field parameters, and sort/filter field references when required). It must preserve visual type, layout, formatting, interactions, IDs, theme, and bookmarks. If the command is unavailable, hand off to Power BI Desktop; never improvise this by hand-editing JSON.
67
+
68
+ 10. **TEMPLATE IS THE REFERENCE.** When writing DAX UDFs or discussing patterns, the BISuperpowers smoke-test template defines the canonical shape: `Métricas` as the measure and metric selector table, parameterizable currency conversion via `MonedaBase` + `Modelo Configuración` + `Tipo de cambio`, Sallieri period comparison, dynamic field parameters, calculation-group time intelligence, IBCS-aligned theme. UDFs the user writes should be either (a) generic enough to live alongside template patterns, or (b) explicitly extending those patterns. Reinventing template-equivalent logic in a project-specific UDF is a smell — flag it.
69
+
70
+ ---
71
+
72
+ ## PHASE 0: Initial Triage
73
+
74
+ Start with:
75
+
76
+ ```text
77
+ POWER BI MCP CONNECTION
78
+ =======================
79
+
80
+ I'll help you connect your AI agent using the official Microsoft MCP servers.
81
+
82
+ What do you need?
83
+
84
+ 1. Connect to Power BI Desktop on this machine (Windows)
85
+ 2. Verify that my agent MCP config is installed correctly
86
+ 3. Verify an optional local Claude Code plugin `.mcp.json`
87
+ ```
88
+
89
+ ---
90
+
91
+ ## PHASE 1: Local Modeling MCP (Windows)
92
+
93
+ If the user chooses option 1:
94
+
95
+ ```text
96
+ LOCAL MODELING MCP
97
+ ==================
98
+
99
+ This path uses Microsoft's official `powerbi-modeling-mcp` executable.
100
+
101
+ Before we continue:
102
+
103
+ 1. Are you on Windows?
104
+ 2. Did you install the "Power BI Modeling MCP" extension in VS Code or Cursor?
105
+ ```
106
+
107
+ ### If the user is on Windows and installed the extension
108
+
109
+ Guide them to the user-level install:
110
+
111
+ 1. Run `super install --all --yes`, or for one agent run `super install --agent codex --yes` / `super install --agent claude-code --yes` / etc.
112
+ 2. Confirm the agent config contains `powerbi-modeling-mcp` and `microsoft-learn`.
113
+ 3. Restart or refresh the AI agent so it reloads skills and MCP servers.
114
+
115
+ Use these config locations:
116
+
117
+ | Agent | Skill path | MCP config |
118
+ | --- | --- | --- |
119
+ | Claude Code | `~/.claude/skills` or `~/.agents/skills` | `~/.claude.json` |
120
+ | GitHub Copilot | `~/.copilot/skills` | `~/.copilot/mcp-config.json` |
121
+ | Codex | `~/.agents/skills` | `~/.codex/config.toml` |
122
+ | Gemini CLI | `~/.gemini/skills` | `~/.gemini/settings.json` |
123
+ | Kilo Code | `~/.kilo/skills` | `~/.kilo/mcp_settings.json` |
124
+
125
+ Use this explanation:
126
+
127
+ ```text
128
+ BI Agent Superpowers does not launch the Modeling MCP with `uvx`.
129
+ Instead, it uses a local wrapper that finds the official Microsoft executable
130
+ and starts it with `--start`.
131
+ ```
132
+
133
+ If the user wants a config example, show:
134
+
135
+ ```toml
136
+ [mcp_servers.powerbi-modeling-mcp]
137
+ command = "node"
138
+ args = ["<package-dir>/bin/mcp/powerbi-modeling-launcher.js"]
139
+
140
+ [mcp_servers.microsoft-learn]
141
+ url = "https://learn.microsoft.com/api/mcp"
142
+ ```
143
+
144
+ ### If the user installed the executable manually
145
+
146
+ Tell them to set:
147
+
148
+ ```text
149
+ BI_SUPERPOWERS_POWERBI_MODELING_MCP_PATH
150
+ ```
151
+
152
+ Then re-run:
153
+
154
+ ```bash
155
+ super install --all --yes
156
+ ```
157
+
158
+ If they are intentionally maintaining a repo-local Claude Code plugin, they can run `super mcp-setup` inside that plugin project instead.
159
+
160
+ ### If the user is on macOS or Linux
161
+
162
+ Say:
163
+
164
+ ```text
165
+ The current BI Agent Superpowers local project workflows require Windows + Power BI Desktop.
166
+
167
+ On macOS/Linux, do not run partial local Desktop workflows
168
+ flows for local Power BI projects. You still have `microsoft-learn` (HTTP)
169
+ available for docs. Future cloud/Fabric skills may work cross-platform when
170
+ they do not depend on Desktop.
171
+ ```
172
+
173
+ ---
174
+
175
+ ## PHASE 2: Verify Agent MCP Config
176
+
177
+ If the user chooses option 2:
178
+
179
+ Check the config for the agent they use:
180
+
181
+ - Claude Code: `~/.claude.json`
182
+ - GitHub Copilot: `~/.copilot/mcp-config.json`
183
+ - Codex: `~/.codex/config.toml`
184
+ - Gemini CLI: `~/.gemini/settings.json`
185
+ - Kilo Code: `~/.kilo/mcp_settings.json`
186
+
187
+ Confirm:
188
+
189
+ - skills are installed under the agent's user-level skill directory
190
+ - config includes `powerbi-modeling-mcp`
191
+ - config includes `microsoft-learn`
192
+
193
+ If anything is missing, recommend:
194
+
195
+ ```bash
196
+ super install --agent <agent-id> --yes
197
+ ```
198
+
199
+ Then restart or refresh the agent.
200
+
201
+ ## PHASE 3: Verify Optional Local Claude Code Plugin Config
202
+
203
+ If the user chooses option 3, or explicitly says they use `super kickoff` / `claude --plugin-dir`:
204
+
205
+ Check these files in order:
206
+
207
+ 1. `.claude-plugin/plugin.json`
208
+ 2. `.mcp.json`
209
+ 3. `.bi-superpowers.json`
210
+
211
+ Confirm:
212
+
213
+ - plugin name is `bi-superpowers`
214
+ - `.mcp.json` includes `powerbi-modeling-mcp`
215
+ - `.mcp.json` includes `microsoft-learn`
216
+
217
+ If anything is missing, recommend:
218
+
219
+ ```bash
220
+ super recharge
221
+ super mcp-setup
222
+ ```
223
+
224
+ Then:
225
+
226
+ ```bash
227
+ claude --plugin-dir .
228
+ ```
229
+
230
+ ---
231
+
232
+ ## DAX UDF WIKI: DAXLIB-AWARE AUTHORING
233
+
234
+ Use this section when the user asks to write, review, import, or refactor DAX
235
+ user-defined functions (UDFs).
236
+
237
+ ### Upstream references to consult
238
+
239
+ Always check current upstream material before writing non-trivial UDFs:
240
+
241
+ | Source | Use it for |
242
+ | --- | --- |
243
+ | Microsoft Learn DAX UDF docs | Current syntax, preview limitations, supported parameter types, and management flow |
244
+ | DAXLIB source repo | Real-world `functions.tmdl` packages, naming conventions, parameter docs, package manifests |
245
+ | DAXLIB docs | Human-facing package docs and examples |
246
+ | DAXLIB GitHub organization | Development repos for individual libraries and patterns |
247
+
248
+ Canonical links:
249
+
250
+ - https://learn.microsoft.com/en-us/dax/best-practices/dax-user-defined-functions
251
+ - https://github.com/daxlib/daxlib
252
+ - https://docs.daxlib.org/
253
+ - https://github.com/daxlib
254
+
255
+ ### What DAXLIB is for in this plugin
256
+
257
+ DAXLIB is a reference library, not a bundled runtime dependency.
258
+
259
+ Use it to learn:
260
+
261
+ - how library packages organize reusable functions in `lib/functions.tmdl`;
262
+ - how functions are namespaced with dotted names;
263
+ - how function comments document purpose, params, and return shape;
264
+ - how helper functions compose with public functions;
265
+ - how manifests describe package identity, version, authors, tags, and dependencies.
266
+
267
+ Do not:
268
+
269
+ - copy an entire DAXLIB package into a customer model without explicit user
270
+ approval;
271
+ - keep DAXLIB package annotations when creating a user-owned function;
272
+ - claim a DAXLIB pattern is current without checking upstream;
273
+ - ignore the fact that DAX UDFs are still preview in Microsoft documentation.
274
+
275
+ ### Authoring workflow
276
+
277
+ When writing a UDF:
278
+
279
+ 1. Confirm the model target: live Power BI Desktop through the Modeling MCP.
280
+ PBIP/TMDL file edits are not allowed; those files are export snapshots.
281
+ 2. Confirm that DAX UDF preview is enabled in Power BI Desktop when live Desktop
282
+ authoring is required.
283
+ 3. Inspect existing functions first:
284
+ ```dax
285
+ EVALUATE INFO.USERDEFINEDFUNCTIONS()
286
+ ```
287
+ 4. Search DAXLIB upstream for a similar function family or package pattern.
288
+ 5. Decide whether you are:
289
+ - writing a new original UDF;
290
+ - adapting one DAXLIB function with attribution;
291
+ - installing/importing a DAXLIB package by user request.
292
+ 6. Use a namespaced function name for reusable business logic, for example
293
+ `Company.Finance.GrossMarginPct`.
294
+ 7. Prefer explicit parameter hints. Use reference/expression parameters when the
295
+ function must preserve or change filter context.
296
+ 8. Test the function with a small `DEFINE FUNCTION ... EVALUATE ...` query before
297
+ applying it to the model.
298
+ 9. Apply the function through MCP or guide the user through Power BI Desktop
299
+ authoring if the current MCP surface cannot perform the write.
300
+ 10. After saving/exporting, re-query `INFO.USERDEFINEDFUNCTIONS()` or equivalent
301
+ model metadata to verify the function exists.
302
+
303
+ ### UDF design checklist
304
+
305
+ Before returning a UDF to the user, verify:
306
+
307
+ - The function name is unique, well-formed, and not a built-in DAX function or
308
+ reserved word.
309
+ - The name does not start/end with a dot and does not contain consecutive dots.
310
+ - The comment explains why the function exists, not just what the formula says.
311
+ - Every parameter has a meaningful name and type hint.
312
+ - `VAL` vs `EXPR` behavior is intentional.
313
+ - The return shape is clear: scalar, table, filter table, or format string.
314
+ - The function does not expose secured measure/table names in its public name or
315
+ description.
316
+ - The function body is deterministic unless randomness is explicitly required.
317
+ - Helper functions are private-by-convention through naming, not assumed hidden;
318
+ current Power BI limitations do not support hiding/unhiding UDFs.
319
+
320
+ ### Templates for a new original UDF
321
+
322
+ Use DAX Query View first when you need to test the function before saving it:
323
+
324
+ ```dax
325
+ DEFINE
326
+ /// Returns gross margin percentage from gross margin and revenue.
327
+ /// @param {NUMERIC} grossMargin - Gross margin amount.
328
+ /// @param {NUMERIC} revenue - Revenue amount.
329
+ /// @returns Gross margin percentage, blank when revenue is blank or zero.
330
+ FUNCTION Company.Finance.GrossMarginPct =
331
+ (
332
+ grossMargin : NUMERIC,
333
+ revenue : NUMERIC
334
+ ) =>
335
+ DIVIDE ( grossMargin, revenue )
336
+
337
+ EVALUATE
338
+ { Company.Finance.GrossMarginPct ( 120, 300 ) }
339
+ ```
340
+
341
+ Use this TMDL shape only as a review reference for what Desktop/MCP should
342
+ persist. Do not write it into `definition/functions.tmdl` by file patch:
343
+
344
+ ```tmdl
345
+ createOrReplace
346
+ /// Returns gross margin percentage from gross margin and revenue.
347
+ /// @param {NUMERIC} grossMargin - Gross margin amount.
348
+ /// @param {NUMERIC} revenue - Revenue amount.
349
+ /// @returns Gross margin percentage, blank when revenue is blank or zero.
350
+ function Company.Finance.GrossMarginPct =
351
+ (
352
+ grossMargin : NUMERIC,
353
+ revenue : NUMERIC
354
+ ) =>
355
+ DIVIDE ( grossMargin, revenue )
356
+ ```
357
+
358
+ ### DAXLIB adaptation rules
359
+
360
+ If the user asks to adapt a function from DAXLIB:
361
+
362
+ 1. Link to the source package/function you used.
363
+ 2. Explain whether you changed naming, dependencies, parameter types, or return
364
+ behavior.
365
+ 3. Preserve attribution when meaningful.
366
+ 4. Replace `DAXLIB_PackageId` and `DAXLIB_PackageVersion` annotations with
367
+ user/project-owned metadata only if the target model uses such annotations.
368
+ 5. Validate dependencies: DAXLIB functions often call helper functions from the
369
+ same package or a declared dependency.
370
+
371
+ If the user did not ask to import DAXLIB code, use DAXLIB only as a design
372
+ reference and produce an original function.
373
+
374
+ ---
375
+
376
+ ## TROUBLESHOOTING
377
+
378
+ | Problem | What to do |
379
+ | --- | --- |
380
+ | Modeling MCP missing on Windows | Install the Microsoft extension in VS Code or Cursor |
381
+ | Modeling MCP installed manually | Set `BI_SUPERPOWERS_POWERBI_MODELING_MCP_PATH` |
382
+ | Agent not loading MCPs | Re-run `super install --agent <agent-id> --yes` and restart the agent |
383
+ | Local Claude Code plugin not loading MCPs | Re-run `super mcp-setup` inside the plugin project and restart Claude Code |
384
+ | macOS/Linux local project request | Explain that current local BI workflows require Windows + Power BI Desktop; use `microsoft-learn` only for docs |
385
+ | User asks about Excel MCP | Explain Excel remains supported through skills and library content, not a default MCP |
386
+
387
+ ---
388
+
389
+ ## ANTI-PATTERNS
390
+
391
+ | Don't Do This | Why | Do This Instead |
392
+ | --- | --- | --- |
393
+ | Recommend `uvx` for Modeling MCP | Not the official Microsoft installation path | Use the official executable via the local launcher |
394
+ | Ask the user to find a localhost port | Not required in the new flow | Use the official Modeling MCP launcher |
395
+ | Run `super kickoff` for Codex/GitHub Copilot/Gemini/Kilo setup | `kickoff` creates repo-local Claude Code plugin files | Use `super install --agent <agent-id> --yes` |
396
+ | Treat `.mcp.json` as the default install target | It is only for optional local Claude Code plugins | Use the agent's user-level MCP config |
397
+ | Invent unofficial MCPs (remote, fabric, etc.) | This plugin only ships 2 official MCPs | Only use the 2 official MCPs we ship (`powerbi-modeling-mcp` and `microsoft-learn`) |
398
+
399
+ ---
400
+
401
+ ## Complexity Adaptation
402
+
403
+ Adjust depth based on `config.json → experienceLevel`:
404
+ - **beginner**: Step-by-step with explanations, reference library examples
405
+ - **intermediate**: Standard depth, explain non-obvious decisions
406
+ - **advanced**: Concise, skip basics, but still teach edge cases, performance, and design criteria
407
+
408
+ ---
409
+
410
+ ## Related Skills
411
+
412
+ - `/bi-kickoff` — Analyze a BI project and plan next steps
413
+
414
+ ---
415
+
416
+ ## RELATED RESOURCES
417
+
418
+ - [Power BI MCP overview](https://learn.microsoft.com/en-us/power-bi/developer/mcp/mcp-servers-overview)
419
+ - [Power BI Modeling MCP on GitHub](https://github.com/microsoft/powerbi-modeling-mcp)
420
+ - [Microsoft Learn MCP](https://learn.microsoft.com/en-us/training/support/mcp)
@@ -47,7 +47,7 @@ const HTTPS_TIMEOUT_MS = 5000;
47
47
  // Rewritten at generation time when this helper is copied into
48
48
  // `skills/<name>/scripts/update-check.js`. In the canonical source under
49
49
  // `bin/commands/`, it stays null and we fall back to package.json.
50
- const BUNDLED_INSTALLED_VERSION = "4.1.6";
50
+ const BUNDLED_INSTALLED_VERSION = "5.0.1";
51
51
 
52
52
  // ---------------------------------------------------------------------------
53
53
  // Argument parsing