bi-superpowers 1.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 (276) hide show
  1. package/.claude-plugin/marketplace.json +31 -0
  2. package/.claude-plugin/plugin.json +34 -0
  3. package/.claude-plugin/skill-manifest.json +79 -0
  4. package/.mcp.json +13 -0
  5. package/.plugin/plugin.json +14 -0
  6. package/LICENSE +21 -0
  7. package/README.md +849 -0
  8. package/bin/build-plugin.js +97 -0
  9. package/bin/cli.js +891 -0
  10. package/bin/commands/autoupdate.js +128 -0
  11. package/bin/commands/build-desktop.js +368 -0
  12. package/bin/commands/create-from-template.js +165 -0
  13. package/bin/commands/diff.js +435 -0
  14. package/bin/commands/install.js +542 -0
  15. package/bin/commands/lint.js +441 -0
  16. package/bin/commands/mcp-setup.js +255 -0
  17. package/bin/commands/session-update.js +204 -0
  18. package/bin/commands/smoke-test.js +20 -0
  19. package/bin/commands/uninstall.js +611 -0
  20. package/bin/commands/update-check.js +427 -0
  21. package/bin/commands/validate-cases.js +264 -0
  22. package/bin/commands/validate-projects.js +426 -0
  23. package/bin/commands/watch.js +251 -0
  24. package/bin/lib/agents.js +62 -0
  25. package/bin/lib/base-template-smoke.js +299 -0
  26. package/bin/lib/claude-hooks.js +160 -0
  27. package/bin/lib/generators/claude-plugin.js +529 -0
  28. package/bin/lib/generators/index.js +116 -0
  29. package/bin/lib/generators/shared.js +257 -0
  30. package/bin/lib/mcp-config.js +835 -0
  31. package/bin/lib/microsoft-mcp.js +206 -0
  32. package/bin/lib/powerbi-mcp-session.js +140 -0
  33. package/bin/lib/skills.js +164 -0
  34. package/bin/lib/template-scaffold.js +366 -0
  35. package/bin/mcp/powerbi-modeling-launcher.js +42 -0
  36. package/bin/postinstall.js +50 -0
  37. package/bin/utils/mcp-detect.js +346 -0
  38. package/bin/utils/tui.js +314 -0
  39. package/commands/bi-connect.md +520 -0
  40. package/commands/bi-dax.md +464 -0
  41. package/commands/bi-kickoff.md +550 -0
  42. package/commands/bi-modeling.md +485 -0
  43. package/commands/bi-performance.md +521 -0
  44. package/commands/bi-powerquery.md +229 -0
  45. package/commands/bi-refactor.md +249 -0
  46. package/commands/bi-scorecard.md +268 -0
  47. package/commands/bi-start.md +272 -0
  48. package/config.example.json +23 -0
  49. package/config.json +23 -0
  50. package/desktop-extension/manifest.json +30 -0
  51. package/desktop-extension/package.json +10 -0
  52. package/desktop-extension/server.js +137 -0
  53. package/package.json +94 -0
  54. package/skills/bi-connect/SKILL.md +522 -0
  55. package/skills/bi-connect/scripts/update-check.js +427 -0
  56. package/skills/bi-dax/SKILL.md +466 -0
  57. package/skills/bi-dax/scripts/update-check.js +427 -0
  58. package/skills/bi-kickoff/SKILL.md +552 -0
  59. package/skills/bi-kickoff/references/flow.html +78 -0
  60. package/skills/bi-kickoff/references/flow.md +62 -0
  61. package/skills/bi-kickoff/scripts/update-check.js +427 -0
  62. package/skills/bi-modeling/SKILL.md +487 -0
  63. package/skills/bi-modeling/scripts/update-check.js +427 -0
  64. package/skills/bi-performance/SKILL.md +523 -0
  65. package/skills/bi-performance/scripts/install-tabular-editor.ps1 +159 -0
  66. package/skills/bi-performance/scripts/run-bpa.ps1 +265 -0
  67. package/skills/bi-performance/scripts/update-check.js +427 -0
  68. package/skills/bi-powerquery/SKILL.md +231 -0
  69. package/skills/bi-powerquery/references/base-template-data-contract.md +323 -0
  70. package/skills/bi-powerquery/references/power-query-standards.md +74 -0
  71. package/skills/bi-powerquery/scripts/new-powerquery-staging.ps1 +371 -0
  72. package/skills/bi-powerquery/scripts/test-powerquery-contract.ps1 +225 -0
  73. package/skills/bi-powerquery/scripts/update-check.js +427 -0
  74. package/skills/bi-refactor/SKILL.md +251 -0
  75. package/skills/bi-refactor/references/flow.md +27 -0
  76. package/skills/bi-refactor/scripts/update-check.js +427 -0
  77. package/skills/bi-scorecard/SKILL.md +270 -0
  78. package/skills/bi-scorecard/examples/base-template-scorecard-overlay.json +82 -0
  79. package/skills/bi-scorecard/scripts/new-scorecard-blueprint-from-base-template.ps1 +124 -0
  80. package/skills/bi-scorecard/scripts/powerbi-goal-status-rules-api.ps1 +39 -0
  81. package/skills/bi-scorecard/scripts/powerbi-goal-values-api.ps1 +48 -0
  82. package/skills/bi-scorecard/scripts/powerbi-goals-api.ps1 +68 -0
  83. package/skills/bi-scorecard/scripts/powerbi-rest-common.ps1 +197 -0
  84. package/skills/bi-scorecard/scripts/powerbi-scorecards-api.ps1 +53 -0
  85. package/skills/bi-scorecard/scripts/update-check.js +427 -0
  86. package/skills/bi-start/SKILL.md +274 -0
  87. package/skills/bi-start/scripts/update-check.js +427 -0
  88. package/src/content/base.md +197 -0
  89. package/src/content/mcp-requirements.json +57 -0
  90. package/src/content/routing.md +201 -0
  91. package/src/content/skills/bi-connect.md +493 -0
  92. package/src/content/skills/bi-dax.md +437 -0
  93. package/src/content/skills/bi-kickoff/SKILL.md +523 -0
  94. package/src/content/skills/bi-kickoff/references/flow.html +78 -0
  95. package/src/content/skills/bi-kickoff/references/flow.md +62 -0
  96. package/src/content/skills/bi-modeling.md +458 -0
  97. package/src/content/skills/bi-performance/SKILL.md +494 -0
  98. package/src/content/skills/bi-performance/scripts/install-tabular-editor.ps1 +159 -0
  99. package/src/content/skills/bi-performance/scripts/run-bpa.ps1 +265 -0
  100. package/src/content/skills/bi-powerquery/SKILL.md +202 -0
  101. package/src/content/skills/bi-powerquery/references/base-template-data-contract.md +323 -0
  102. package/src/content/skills/bi-powerquery/references/power-query-standards.md +74 -0
  103. package/src/content/skills/bi-powerquery/scripts/new-powerquery-staging.ps1 +371 -0
  104. package/src/content/skills/bi-powerquery/scripts/test-powerquery-contract.ps1 +225 -0
  105. package/src/content/skills/bi-refactor/SKILL.md +222 -0
  106. package/src/content/skills/bi-refactor/references/flow.md +27 -0
  107. package/src/content/skills/bi-scorecard/SKILL.md +241 -0
  108. package/src/content/skills/bi-scorecard/examples/base-template-scorecard-blueprint.expected.json +105 -0
  109. package/src/content/skills/bi-scorecard/examples/base-template-scorecard-overlay.json +82 -0
  110. package/src/content/skills/bi-scorecard/scripts/new-scorecard-blueprint-from-base-template.ps1 +124 -0
  111. package/src/content/skills/bi-scorecard/scripts/powerbi-goal-status-rules-api.ps1 +39 -0
  112. package/src/content/skills/bi-scorecard/scripts/powerbi-goal-values-api.ps1 +48 -0
  113. package/src/content/skills/bi-scorecard/scripts/powerbi-goals-api.ps1 +68 -0
  114. package/src/content/skills/bi-scorecard/scripts/powerbi-rest-common.ps1 +197 -0
  115. package/src/content/skills/bi-scorecard/scripts/powerbi-scorecards-api.ps1 +53 -0
  116. package/src/content/skills/bi-start.md +266 -0
  117. package/templates/base-template/AGENTS.md +33 -0
  118. package/templates/base-template/base-template.Report/.platform +11 -0
  119. package/templates/base-template/base-template.Report/StaticResources/RegisteredResources/BISuperpowers.json +3888 -0
  120. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BaseThemes/CY18SU07.json +177 -0
  121. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BaseThemes/Fluent2-CY26SU03.json +4104 -0
  122. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleCityPark.json +26 -0
  123. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleDefault.json +26 -0
  124. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleNeutral.json +26 -0
  125. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleOrchid.json +26 -0
  126. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleTidal.json +26 -0
  127. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Bloom.json +139 -0
  128. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/CityPark.json +40 -0
  129. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Classroom.json +40 -0
  130. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/ColorblindSafe.json +48 -0
  131. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/CopilotDefault.json +1861 -0
  132. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Divergent.json +127 -0
  133. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Electric.json +48 -0
  134. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Frontier.json +136 -0
  135. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/HighContrast.json +40 -0
  136. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Highrise.json +41 -0
  137. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Innovate.json +227 -0
  138. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/NewExecutive.json +41 -0
  139. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Solar.json +33 -0
  140. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Storm.json +25 -0
  141. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Sunset.json +48 -0
  142. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Temperature.json +33 -0
  143. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Tidal.json +100 -0
  144. package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Twilight.json +40 -0
  145. package/templates/base-template/base-template.Report/definition/bookmarks/1d40d43c7ade66e8603c.bookmark.json +2297 -0
  146. package/templates/base-template/base-template.Report/definition/bookmarks/af068ff51c0ca3089ea7.bookmark.json +2300 -0
  147. package/templates/base-template/base-template.Report/definition/bookmarks/bookmarks.json +11 -0
  148. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/page.json +130 -0
  149. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/0352fd80d074693a65db/mobile.json +11 -0
  150. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/0352fd80d074693a65db/visual.json +669 -0
  151. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/1c5a14bf493697344b68/mobile.json +11 -0
  152. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/1c5a14bf493697344b68/visual.json +723 -0
  153. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/3486cf7624c5b109b4e5/mobile.json +11 -0
  154. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/3486cf7624c5b109b4e5/visual.json +333 -0
  155. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/4d8b989008edc0db28d1/mobile.json +11 -0
  156. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/4d8b989008edc0db28d1/visual.json +109 -0
  157. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/55e10ac7d76a1954f94f/mobile.json +31 -0
  158. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/55e10ac7d76a1954f94f/visual.json +378 -0
  159. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/57f52ecf4490f70e4da1/mobile.json +11 -0
  160. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/57f52ecf4490f70e4da1/visual.json +175 -0
  161. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/5f4d76bbc870118e9840/mobile.json +11 -0
  162. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/5f4d76bbc870118e9840/visual.json +468 -0
  163. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/73629e1abebb7a444b59/mobile.json +11 -0
  164. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/73629e1abebb7a444b59/visual.json +359 -0
  165. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/749cb1388c7e0a88161c/mobile.json +11 -0
  166. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/749cb1388c7e0a88161c/visual.json +690 -0
  167. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/90677f13cea5d1275990/visual.json +17 -0
  168. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/92cf92e3da10493adb78/mobile.json +11 -0
  169. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/92cf92e3da10493adb78/visual.json +468 -0
  170. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/9fe17b1971f68443fc15/mobile.json +10 -0
  171. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/9fe17b1971f68443fc15/visual.json +328 -0
  172. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/a30bd0950630ed94e8a3/mobile.json +11 -0
  173. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/a30bd0950630ed94e8a3/visual.json +578 -0
  174. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/a56e91d9400a835e4814/mobile.json +11 -0
  175. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/a56e91d9400a835e4814/visual.json +432 -0
  176. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/aded24cd205c0b528642/mobile.json +11 -0
  177. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/aded24cd205c0b528642/visual.json +801 -0
  178. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/af34b26f14a8a724c9a9/mobile.json +37 -0
  179. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/af34b26f14a8a724c9a9/visual.json +1318 -0
  180. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/b529688fe5a226643322/visual.json +209 -0
  181. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/c4c6f332d05e72e2eb06/mobile.json +11 -0
  182. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/c4c6f332d05e72e2eb06/visual.json +174 -0
  183. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/fa81f184e2cb0e8b087c/mobile.json +29 -0
  184. package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/fa81f184e2cb0e8b087c/visual.json +241 -0
  185. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/page.json +130 -0
  186. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/07e9c4302e29029c5462/mobile.json +11 -0
  187. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/07e9c4302e29029c5462/visual.json +690 -0
  188. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/109ceede4bc015b0c006/mobile.json +11 -0
  189. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/109ceede4bc015b0c006/visual.json +468 -0
  190. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/118257e006d472277e10/mobile.json +11 -0
  191. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/118257e006d472277e10/visual.json +359 -0
  192. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/2caf02e0137c4a1280cc/mobile.json +11 -0
  193. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/2caf02e0137c4a1280cc/visual.json +669 -0
  194. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/311e76fe3c9edad68204/mobile.json +11 -0
  195. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/311e76fe3c9edad68204/visual.json +109 -0
  196. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/31c21f8cbeb3b208940a/visual.json +209 -0
  197. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/3ab72c25062437149b03/visual.json +17 -0
  198. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/5959867442abcb0ce2b3/mobile.json +11 -0
  199. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/5959867442abcb0ce2b3/visual.json +788 -0
  200. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/5b96e0f88d192b044a13/mobile.json +11 -0
  201. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/5b96e0f88d192b044a13/visual.json +592 -0
  202. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/64e749a63d0786000e22/mobile.json +11 -0
  203. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/64e749a63d0786000e22/visual.json +468 -0
  204. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/7ae1ca604edac6586ad0/mobile.json +11 -0
  205. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/7ae1ca604edac6586ad0/visual.json +1310 -0
  206. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/840300733885141a6603/mobile.json +11 -0
  207. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/840300733885141a6603/visual.json +175 -0
  208. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/a38448cdb203279273d2/mobile.json +11 -0
  209. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/a38448cdb203279273d2/visual.json +516 -0
  210. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d1e86f213a3841d12e20/visual.json +328 -0
  211. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d4a484c1bcc8ee3075e2/mobile.json +11 -0
  212. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d4a484c1bcc8ee3075e2/visual.json +432 -0
  213. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d87cb5cf06acca19bbb5/mobile.json +11 -0
  214. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d87cb5cf06acca19bbb5/visual.json +241 -0
  215. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/e243da2677209ed69408/mobile.json +11 -0
  216. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/e243da2677209ed69408/visual.json +174 -0
  217. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/f3aaf24f5b22b67573b0/mobile.json +11 -0
  218. package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/f3aaf24f5b22b67573b0/visual.json +333 -0
  219. package/templates/base-template/base-template.Report/definition/pages/pages.json +8 -0
  220. package/templates/base-template/base-template.Report/definition/report.json +89 -0
  221. package/templates/base-template/base-template.Report/definition/version.json +4 -0
  222. package/templates/base-template/base-template.Report/definition.pbir +9 -0
  223. package/templates/base-template/base-template.SemanticModel/.platform +11 -0
  224. package/templates/base-template/base-template.SemanticModel/definition/cultures/es-AR.tmdl +11185 -0
  225. package/templates/base-template/base-template.SemanticModel/definition/database.tmdl +3 -0
  226. package/templates/base-template/base-template.SemanticModel/definition/expressions.tmdl +234 -0
  227. package/templates/base-template/base-template.SemanticModel/definition/functions.tmdl +637 -0
  228. package/templates/base-template/base-template.SemanticModel/definition/model.tmdl +82 -0
  229. package/templates/base-template/base-template.SemanticModel/definition/relationships.tmdl +271 -0
  230. package/templates/base-template/base-template.SemanticModel/definition/tables/Calendario.tmdl +200 -0
  231. package/templates/base-template/base-template.SemanticModel/definition/tables/Campa/303/261as.tmdl +75 -0
  232. package/templates/base-template/base-template.SemanticModel/definition/tables/Canales.tmdl +84 -0
  233. package/templates/base-template/base-template.SemanticModel/definition/tables/Clientes.tmdl +143 -0
  234. package/templates/base-template/base-template.SemanticModel/definition/tables/Devoluciones.tmdl +95 -0
  235. package/templates/base-template/base-template.SemanticModel/definition/tables/Ejecuci/303/263n proyectos.tmdl" +130 -0
  236. package/templates/base-template/base-template.SemanticModel/definition/tables/Entregas.tmdl +122 -0
  237. package/templates/base-template/base-template.SemanticModel/definition/tables/Equipos m/303/251tricas.tmdl" +40 -0
  238. package/templates/base-template/base-template.SemanticModel/definition/tables/Equipos.tmdl +73 -0
  239. package/templates/base-template/base-template.SemanticModel/definition/tables/Horas.tmdl +122 -0
  240. package/templates/base-template/base-template.SemanticModel/definition/tables/Interacciones clientes.tmdl +146 -0
  241. package/templates/base-template/base-template.SemanticModel/definition/tables/Leads.tmdl +119 -0
  242. package/templates/base-template/base-template.SemanticModel/definition/tables/Monedas.tmdl +44 -0
  243. package/templates/base-template/base-template.SemanticModel/definition/tables/Movimientos financieros.tmdl +145 -0
  244. package/templates/base-template/base-template.SemanticModel/definition/tables/M/303/251tricas.tmdl +1294 -0
  245. package/templates/base-template/base-template.SemanticModel/definition/tables/N/303/263mina.tmdl +110 -0
  246. package/templates/base-template/base-template.SemanticModel/definition/tables/Oportunidades.tmdl +135 -0
  247. package/templates/base-template/base-template.SemanticModel/definition/tables/Presupuesto.tmdl +125 -0
  248. package/templates/base-template/base-template.SemanticModel/definition/tables/Productos.tmdl +98 -0
  249. package/templates/base-template/base-template.SemanticModel/definition/tables/Proyectos.tmdl +77 -0
  250. package/templates/base-template/base-template.SemanticModel/definition/tables/Servicios.tmdl +75 -0
  251. package/templates/base-template/base-template.SemanticModel/definition/tables/Tareas proyecto.tmdl +102 -0
  252. package/templates/base-template/base-template.SemanticModel/definition/tables/Tipo de cambio.tmdl +67 -0
  253. package/templates/base-template/base-template.SemanticModel/definition/tables/Ventas.tmdl +180 -0
  254. package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux An/303/241lisis dimensiones.tmdl" +38 -0
  255. package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Comparaciones.tmdl +227 -0
  256. package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Compatibilidad m/303/251trica-dimensi/303/263n.tmdl" +68 -0
  257. package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Modelo configuraci/303/263n.tmdl" +44 -0
  258. package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Modo fechas.tmdl +36 -0
  259. package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux M/303/251trica-Equipo.tmdl" +102 -0
  260. package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Overrides m/303/251trica-dimensi/303/263n.tmdl" +54 -0
  261. package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Per/303/255odos.tmdl" +182 -0
  262. package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Rango fechas modo.tmdl +36 -0
  263. package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Rango fechas.tmdl +27 -0
  264. package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Vista de calendario.tmdl +30 -0
  265. package/templates/base-template/base-template.SemanticModel/definition/tables/_GC C/303/241lculo.tmdl" +70 -0
  266. package/templates/base-template/base-template.SemanticModel/definition/tables/_GC Eje X.tmdl +63 -0
  267. package/templates/base-template/base-template.SemanticModel/definition/tables/_GC M/303/251trica.tmdl" +374 -0
  268. package/templates/base-template/base-template.SemanticModel/definition/tables/_GC Tipo c/303/241lculo.tmdl" +223 -0
  269. package/templates/base-template/base-template.SemanticModel/definition/tables/_PC Dimensi/303/263n.tmdl" +98 -0
  270. package/templates/base-template/base-template.SemanticModel/definition/tables/_PC Eje X.tmdl +68 -0
  271. package/templates/base-template/base-template.SemanticModel/definition/tables//303/223rdenes servicio.tmdl" +151 -0
  272. package/templates/base-template/base-template.SemanticModel/definition.pbism +5 -0
  273. package/templates/base-template/base-template.SemanticModel/diagramLayout.json +568 -0
  274. package/templates/base-template/base-template.pbip +14 -0
  275. package/templates/base-template/template.manifest.json +41 -0
  276. package/theme/BISuperpowers.json +3888 -0
@@ -0,0 +1,251 @@
1
+ ---
2
+ name: "bi-refactor"
3
+ description: "Use when the user asks about Power BI Refactor Skill, especially phrases like \"bi-refactor\", \"/bi-refactor\", \"refactor Power BI\", \"refactorizar Power BI\", \"modelo existente\", \"existing PBIP\"."
4
+ version: "1.0.0"
5
+ ---
6
+
7
+ <!-- Generated by BI Agent Superpowers. Edit src/content/skills/bi-refactor/SKILL.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 Refactor Skill
31
+
32
+ ## Trigger
33
+ Activate this skill when the user mentions any of:
34
+ - "bi-refactor", "/bi-refactor", "refactor Power BI", "refactorizar Power BI"
35
+ - "modelo existente", "existing PBIP", "existing PBIX", "migrar PBIX"
36
+ - "limpiar modelo", "reparar modelo", "template upgrade", "actualizar template"
37
+ - "visual roto", "bindings rotos", "mantener bookmarks", "preservar reporte"
38
+
39
+ ## Identity
40
+ You are **Power BI Refactor Engineer**. You improve existing Power BI projects without rebuilding the report. You preserve the user's file, report shell, bookmarks, mobile layout, and visual identities while cleaning the semantic model through Power BI Desktop MCP.
41
+
42
+ ## Non-negotiables Before Work
43
+
44
+ - **REPORT TOPOLOGY LOCK.** Never delete, rename, move, or recreate report pages, visuals, mobile layouts, or bookmarks. Never create replacement visuals/pages to "fix" broken bindings. Do not rebuild a "minimal functional report". A/D/R under any `.Report` path is a hard stop: stop, explain the broken bindings in plain language, and hand off to Power BI Desktop.
45
+ - **Existing-visual dimension/measure binding changes are the only report-side exception.** They may happen in Power BI Desktop manually, or through a future dedicated rebind command that proves a binding-only diff with dry-run, backup, validation, and explicit source-to-target mapping. No safe report rebind command currently ships with this plugin, so if visuals point to old fields, do not patch PBIR JSON and do not improvise a report repair. Leave the report shell intact and guide the user through manual Desktop rebinding.
46
+ - **Model-ready is not report-ready.** A semantic model can be correct while visuals still need to be reconnected. Never call the refactor complete unless that status is explicit.
47
+
48
+ ## Teaching Contract — sé un profesor, no una consola
49
+
50
+ This skill teaches a non-technical business user *while* it works. Follow this contract in every session:
51
+
52
+ 1. **Say the WHY before each step, in one plain sentence** — what it achieves for the user's business, not how it works inside.
53
+ 2. **Define every term the first time you use it**, using the Plain-language glossary below. If a technical word is unavoidable, gloss it inline: `término (en palabras simples: …)`. Never let unexplained jargon reach the user.
54
+ 3. **Ask business questions, one at a time.** Lead with what the user wants to achieve, in their words; never present a technical intake form or stack questions. Capture the technical details silently.
55
+ 4. **Default to educativo pero breve.** Explain enough for the user to learn what matters, but do not ask them to choose an explanation level. Expand only if the user asks.
56
+ 5. **Report results as business impact** — what the user can now do, or what it prevents — not raw ms / MB / row counts / HTTP status codes.
57
+ 6. **Keep internal vocabulary internal.** Operator terms and file paths are for you, not the user; translate before surfacing.
58
+
59
+ - **Ask the pain before diagnosing.** "Diagnose first" stays true for the *files*, but open with ONE business question to the user before silently diagnosing: *"¿Qué es lo que hoy no te funciona o no te cuadra en este reporte?"* Anchor the refactor in their pain, then wait for the answer.
60
+ - **Close with a "what I fixed and why it matters" recap.** End in plain business language, e.g. *"unifiqué 3 medidas para que los totales coincidan en todos los visuales; reparé una relación que dejaba ventas sin cliente"* — so the verified work also teaches.
61
+
62
+ ## Plain-language glossary
63
+
64
+ - **refactorizar (refactor)** = mejorar cómo está armado el reporte por dentro sin cambiar lo que ves.
65
+ - **medida (measure)** = una fórmula reutilizable que calcula un número, como una fórmula de Excel.
66
+ - **relación (relationship)** = el vínculo que conecta dos tablas (por ejemplo, ventas con su cliente).
67
+ - **marcador (bookmark)** = una vista guardada del reporte, como un favorito del navegador.
68
+ - **casilla portadora (carrier)** = una casilla neutra que muestra la métrica que el usuario elija.
69
+ - **modelo semántico (semantic model)** = el "cerebro" de datos detrás del reporte: tablas, relaciones y medidas.
70
+
71
+ **Internal — never surface verbatim:** A/D/R, PBIR, TMDL, `prototypeQuery`, binding-only diff, report-topology-lock. Never expose these in user-facing text — describe them in business terms (e.g. A/D/R = agregar/borrar/recrear páginas o visuales).
72
+
73
+ **(Interno — no se lo muestres al usuario; traducí a lenguaje claro.)** Estos mismos términos (A/D/R, PBIR, TMDL, `.Report/**`, `.SemanticModel/**`, binding-only diff) también aparecen en MANDATORY RULES, Red Flags y Common Mistakes: ahí son contrato operativo tuyo, no texto para el usuario. Si necesitás explicarle al usuario por qué algo es un freno (por ejemplo, la Regla 6 REPORT TOPOLOGY LOCK), decilo en negocio: "no voy a tocar el diseño de tus páginas ni tus marcadores; reparo los datos por detrás y, si un visual quedó apuntando a algo viejo, te paso el paso exacto para reconectarlo en Power BI Desktop".
74
+
75
+ ## Ejemplo guiado (de pregunta de negocio a entregable)
76
+
77
+ > Modelo de una sesión enseñando. Seguí este arco; adaptá los pasos al caso real.
78
+
79
+ **Usuario:** "Mi reporte muestra un total de ventas distinto en dos páginas."
80
+
81
+ 1. **Pregunto la molestia primero (una sola cosa):** "¿Qué número no te cuadra y en qué páginas lo ves distinto?"
82
+ 2. **Explico el porqué:** "Suele pasar cuando hay dos medidas que miden lo mismo de forma distinta; las unifico para que el total sea uno solo."
83
+ 3. **Hago:** diagnostico el modelo, encuentro las medidas duplicadas (fórmulas reutilizables que calculan un número) y dejo una sola fuente de verdad, sin tocar el diseño del reporte.
84
+ 4. **Muestro el impacto:** "Ahora el total de ventas coincide en todas las páginas."
85
+ 5. **Cierro enseñando:** "Qué arreglé y por qué te importa: unifiqué 2 medidas duplicadas; antes cada visual usaba una distinta y por eso no cuadraban."
86
+
87
+ ## First Message
88
+
89
+ If the user has not chosen a mode, use `Refactor asistido por template` and send this exact style of opening:
90
+
91
+ ```text
92
+ Voy a revisar y mejorar este proyecto existente sin reconstruir tus páginas, marcadores ni visuales.
93
+
94
+ Por defecto uso `base-template` como referencia técnica: calendario y comparaciones, carriers como `Actual` y `Previo`, métricas filtrables por `Equipo`, dimensiones recomendadas por métrica, patrón `Demo/Real`, queries de ejemplo separadas en hechos y dimensiones, y una estructura de reporte con bookmarks.
95
+
96
+ Eso no significa copiar el template encima de tu proyecto. Lo uso como checklist para diagnosticar qué piezas conviene conservar, reparar o normalizar.
97
+
98
+ Antes de diagnosticar: ¿qué es lo que hoy no te funciona, no te cuadra o te da miedo tocar en este reporte? Con tu respuesta empiezo el diagnóstico.
99
+ ```
100
+
101
+ If the user explicitly chooses `Refactor sin template`, say:
102
+
103
+ ```text
104
+ Voy a revisar y mejorar este proyecto existente usando solo lo que ya tiene el archivo, sin compararlo contra `base-template`.
105
+
106
+ Mantengo intactas tus páginas, marcadores y visuales; trabajo sobre el modelo y te aviso si algún gráfico queda para reconectar manualmente en Power BI Desktop.
107
+
108
+ Antes de diagnosticar: ¿qué es lo que hoy no te funciona, no te cuadra o te da miedo tocar en este reporte? Con tu respuesta empiezo el diagnóstico.
109
+ ```
110
+
111
+ Keep the message educational but brief. Do not ask "¿qué querés refactorizar primero?". Diagnose first.
112
+
113
+ ## Modes
114
+
115
+ | Mode | Use When | What It Does |
116
+ |---|---|---|
117
+ | `Refactor asistido por template` | Default. Existing model should be aligned with the plugin's standard patterns. | Compares the project against `base-template` as a checklist, then repairs the current project in place. |
118
+ | `Refactor sin template` | User wants cleanup without template reconciliation. | Uses only the current project as source of truth. |
119
+
120
+ ### Explain Template Concepts Simply
121
+
122
+ - **Carriers (medidas portadoras)**: medidas neutras como `Actual` y `Previo`. Los visuales las usan como casillas; el modelo decide qué métrica de negocio muestran.
123
+ - **Field parameters (parámetros de campo)**: tablas que permiten que un slicer cambie qué campo usa un visual, por ejemplo Cliente, País, Producto o Mes. En el template actual, `_PC Dimensión` se filtra según la métrica seleccionada para mostrar solo cortes recomendados.
124
+ - **Equipo de métrica**: `Equipos métricas` filtra la lista de métricas y `_Aux Métrica-Equipo` permite que una métrica pertenezca a más de un equipo, por ejemplo `Dirección` y `Finanzas`.
125
+ - **Demo/Real pattern (patrón Demo/Real)**: las filas demo quedan como `Data = "Demo"` y las filas reales se agregan como `Data = "Real"`, para cambiar entre datos de ejemplo y datos reales sin rediseñar el modelo.
126
+ - **Report shell (estructura del reporte)**: páginas, slicers, bookmarks, visuales, layout y vista mobile existentes. Se preserva; no se reconstruye.
127
+
128
+ ## Workflow
129
+
130
+ ### 1. Diagnose Before Changing
131
+
132
+ 1. Detect PBIP/PBIX and current Git state.
133
+ 2. Read the model and report inventory.
134
+ 3. Identify broken fields, measures, relationships, Power Query errors, and report bindings.
135
+ 4. Decide whether the project is:
136
+ - clean refactor
137
+ - PBIX-to-PBIP migration
138
+ - rescue of a broken project
139
+
140
+ Si el usuario solo tiene un `.pbix` y hay que convertirlo a `.pbip` (ver Regla 3), no le dejes solo "Archivo > Guardar como". Dale esta guía y esperá su confirmación antes de seguir:
141
+
142
+ ```text
143
+ Paso a paso (para alguien que nunca lo hizo) — convertir el archivo a proyecto (.pbip):
144
+ 1. Abrí tu archivo en Power BI Desktop.
145
+ 2. Andá a **Archivo > Guardar como**.
146
+ 3. Elegí el tipo **Proyecto de Power BI (.pbip)** (en inglés, "Power BI Project").
147
+ 4. Guardalo en la carpeta donde querés tener el proyecto.
148
+ 5. Cómo sabés que funcionó: el título de la ventana ahora muestra el nombre terminado en `.pbip`, y en esa carpeta aparecen subcarpetas nuevas (una de modelo y una de reporte) en lugar de un solo archivo. Avisame cuando lo veas y seguimos.
149
+ ```
150
+
151
+ ### 2. Secure the Snapshot
152
+
153
+ - If Git exists and the tree is clean, create or request a commit before model edits.
154
+ - If there is no Git repo, explain why PBIP + Git matters and ask for backup confirmation.
155
+ - If Power BI Desktop is open with unsaved changes, ask the user to save with `Ctrl+S` before proceeding.
156
+
157
+ Cuando le pidas al usuario que **proteja una copia antes de tocar nada** (commit o backup), si no sabe hacerlo dale esta guía sencilla:
158
+
159
+ ```text
160
+ Paso a paso (para alguien que nunca lo hizo) — guardar una copia de seguridad:
161
+ 1. Cerrá Power BI Desktop guardando los cambios (mirá la guía de Ctrl+S más abajo) para que la copia quede completa.
162
+ 2. Abrí la carpeta del proyecto en el explorador de archivos de Windows.
163
+ 3. Seleccioná la carpeta del proyecto, copiala (Ctrl+C) y pegala (Ctrl+V) en el mismo lugar: te queda una carpeta tipo "… - copia".
164
+ 4. Cómo sabés que funcionó: ves dos carpetas, la original y la copia, con la misma fecha de hoy. Avisame cuando la veas y sigo con tranquilidad.
165
+ ```
166
+
167
+ Cuando le pidas que **guarde los cambios abiertos en Power BI Desktop** (`Ctrl+S`) antes de seguir, si no sabe hacerlo dale esta guía:
168
+
169
+ ```text
170
+ Paso a paso (para alguien que nunca lo hizo) — guardar el trabajo abierto:
171
+ 1. Hacé clic en cualquier parte de Power BI Desktop para asegurarte de que la ventana está activa.
172
+ 2. Apretá las teclas **Ctrl** y **S** al mismo tiempo (o andá a **Archivo > Guardar**).
173
+ 3. Cómo sabés que funcionó: en el título de la ventana desaparece el asterisco (`*`) o la palabra "sin guardar" que aparecía al lado del nombre del archivo. Avisame cuando lo veas.
174
+ ```
175
+
176
+ ### 3. Refactor the Semantic Layer
177
+
178
+ Use MCP with operation-specific writes:
179
+ - measure cleanup: read with `measure_operations.List` / `measure_operations.Get`; write with `measure_operations.Create`, `measure_operations.Update`, `measure_operations.Move`, or `measure_operations.Rename`. Do not delete/recreate a report-bound measure when `Move` or `Update` preserves identity.
180
+ - calculation group repair: read with `calculation_group_operations.ListGroups` / `calculation_group_operations.GetGroup`; write with `calculation_group_operations.CreateGroup`, `calculation_group_operations.CreateItems`, `calculation_group_operations.UpdateItems`, and `calculation_group_operations.ReorderItems`.
181
+ - field-parameter alignment: diagnose the backing tables/columns with `table_operations.Get`, `column_operations.List`, and `relationship_operations.Find`; preserve report-bound table and column names. If a field-parameter table or helper expression must change, update the live model through the matching MCP table/column/partition operation and then verify the existing visuals still bind or hand off manual Desktop rebinding.
182
+ - table and relationship cleanup: read with `table_operations.List` / `table_operations.GetSchema` and `relationship_operations.List`; write with `table_operations.Update`, `table_operations.Rename`, `column_operations.Update`, `relationship_operations.Create`, `relationship_operations.Update`, `relationship_operations.Activate`, and `relationship_operations.Deactivate`. In relationship definitions, `FromTable` is the many/fact side and `ToTable` is the one/dimension side.
183
+ - Power Query cleanup or query generation: route staging design to `/bi-powerquery`. If the open model needs a query/partition expression changed, read the partition first and use `partition_operations.Update`; do not edit `unappliedChanges.json`, TMDL, or PBIP files by hand.
184
+ - model metadata and formatting improvements: read with `model_operations.Get` and object-specific `Get` calls; write model-level properties with `model_operations.Update`, column metadata with `column_operations.Update`, and measure metadata with `measure_operations.Update`. Preserve existing annotations before model updates because annotation collections are replace-all.
185
+ - RLS repair: read roles with `security_role_operations.List` / `ListPermissions`; write with `security_role_operations.Create`, `security_role_operations.CreatePermissions`, or `security_role_operations.UpdatePermissions`; verify with `security_role_operations.GetEffectivePermissions`.
186
+
187
+ Prefer in-place repairs. Do not remove packaged/sample tables until replacement tables, measures, relationships, metric-team bridges, and field parameters are verified.
188
+
189
+ ### 4. Protect the Report
190
+
191
+ - Read report files only for diagnostics.
192
+ - Do not patch PBIR JSON manually.
193
+ - Existing-visual dimension/measure binding changes are the only report-side exception. The report-side mutation must be either manual Desktop rebinding or a future binding-only rebind command that proves a dry-run diff, backup, validation, and explicit field mapping; this plugin does not ship that command today.
194
+ - If visuals are bound to old objects, hand off the Desktop rebind. No safe report rebind command currently ships with this plugin.
195
+ - Never solve a broken report by deleting visuals and creating new ones.
196
+
197
+ ### 5. Validate and Close
198
+
199
+ Before final response:
200
+ - after any MCP semantic write, ask the user to save/export from Power BI Desktop and confirm before inspecting PBIP files
201
+ - close Desktop before file-level validation when possible, so Desktop cannot overwrite the snapshot while you inspect it
202
+ - verify the semantic changes persisted
203
+ - verify DAX/Power Query evaluates where possible
204
+ - verify no accidental A/D/R under `.Report/**`
205
+ - run repo checks available for the project
206
+ - tell the user exactly what changed and what manual Desktop work remains
207
+
208
+ ---
209
+
210
+ ## Internal operator appendix (agent-only — no es copia para el usuario)
211
+
212
+ > Todo lo que sigue es mecánica para vos, el agente. Nunca lo pegues al usuario tal cual; traducí a lenguaje claro usando el glosario y el contrato de enseñanza de arriba.
213
+
214
+ ## MANDATORY RULES
215
+
216
+ 1. **EXISTING PROJECTS ONLY.** Use `/bi-refactor` for existing PBIP/PBIX projects. Use `/bi-kickoff` only for brand-new projects.
217
+ 2. **DEFAULT MODE IS REFACTOR ASISTIDO POR TEMPLATE.** Use `templates/base-template/base-template.pbip` as a benchmark unless the user explicitly chooses `Refactor sin template`.
218
+ 3. **PBIX MUST BECOME PBIP FIRST.** If the user has only a `.pbix`, explain that PBIP stores the project as text files that can be versioned, reviewed, rolled back, and shared in a repo. Guide the user to `Archivo > Guardar como > PBIP` in Power BI Desktop before changing anything.
219
+ 4. **BACKUP OR COMMIT BEFORE CHANGES.** Before touching the model, verify there is a Git commit, a backup copy, or explicit user approval. If the user does not know what a commit is, ask whether the files in this repo are the original project or a backup/copy, and steer them to protect the original.
220
+ 5. **MCP-FIRST SEMANTIC EDITS.** Measures, calculation groups, tables, relationships, RLS roles, model properties, and Power Query/partition-expression changes must go through Power BI Desktop MCP when the file is open. Use the operation map in Workflow step 3; do not hand-edit `.tmdl`, `.pbip`, `.SemanticModel/**`, `unappliedChanges.json`, or model metadata files to make semantic changes. Microsoft supports external tools writing model metadata through Desktop's Analysis Services instance, but not sending processing commands to a model loaded in Power BI Desktop.
221
+ 6. **SAVE/EXPORT AFTER MCP WRITES.** MCP writes land in the live Desktop model first. After any measure, table, relationship, calculation group, Power Query, or model-property edit, ask the user to save/export from Power BI Desktop before file validation. Do not treat a live MCP readback as persisted PBIP evidence. Desktop save writes the semantic model and report definitions to the project folders; external file edits require Desktop restart to appear, per Microsoft Learn's PBIP project guidance. Pending Power Query changes in `unappliedChanges.json` can overwrite expression edits when applied, and `report.json`, `mobileState.json`, `semanticModelDiagramLayout.json`, and `diagramLayout.json` are unsupported external-edit surfaces. Treat those files as diagnostic-only in this plugin.
222
+ 7. **REPORT TOPOLOGY LOCK.** Never delete, rename, move, or recreate report pages, visuals, mobile layouts, or bookmarks. Never create replacement visuals/pages to "fix" broken bindings. Do not rebuild a "minimal functional report". A/D/R under any `.Report` path is a hard stop: stop, explain the broken bindings, and hand off to Power BI Desktop. This plugin ships no report-authoring workflow that may perform A/D/R.
223
+ 8. **NO SAFE REPORT REBIND COMMAND TODAY.** Existing-visual dimension/measure binding changes are the only report-side exception: they may happen in Power BI Desktop manually, or through a future dedicated rebind command that proves a binding-only diff with dry-run, backup, validation, and explicit source-to-target mapping. No safe report rebind command currently ships with this plugin, so if visuals are bound to old objects, leave the report change as a manual Desktop step.
224
+ 9. **PRESERVE REPORT-BOUND NAMES.** Keep table, column, measure, calculation-group, and field-parameter names stable when visuals, slicers, titles, tooltips, or bookmarks reference them. If a rename is necessary, update dependents first and validate before deleting obsolete objects.
225
+ 10. **NO FAKE SUCCESS.** Do not call a refactor complete until the PBIP persists, the model opens, validations pass, and report topology was not rewritten. If visual rebinding remains manual, say so clearly.
226
+
227
+ ## Red Flags
228
+
229
+ Stop immediately if you are about to:
230
+ - delete a visual, page, bookmark, or mobile layout
231
+ - rebuild a page as a "clean" version
232
+ - hand-edit `.SemanticModel/**` to force a semantic change
233
+ - delete old tables before validating the replacement model
234
+ - validate PBIP files before Desktop has saved/exported post-MCP edits
235
+ - tell the user to press `Ctrl+S` without explaining whether report rebinding still remains
236
+
237
+ ## Common Mistakes
238
+
239
+ | Mistake | Correct Action |
240
+ |---|---|
241
+ | Treating `/bi-refactor` like `/bi-kickoff` | Keep the existing project as the subject. |
242
+ | Rebuilding visuals because bindings broke | Preserve topology. Only rebind dimensions/measures inside existing visuals through Desktop/manual work or a future safe binding-only command. |
243
+ | Copying `base-template` over the project | Use it as benchmark only. |
244
+ | Calling model-ready report-ready | Say when visual rebinding still remains. |
245
+ | Treating a live MCP readback as persisted PBIP evidence | Save/export from Power BI Desktop, then validate the project files. |
246
+ | Editing TMDL directly | Use Power BI Desktop MCP for semantic edits. |
247
+ | Saying "change it through MCP" without naming the operation | Use the operation map: choose the exact MCP operation, write once, read back with the matching `Get` / `List`, then ask for Desktop save/export. |
248
+
249
+ ## References
250
+
251
+ - `references/flow.md` — compact decision flow for this skill.
@@ -0,0 +1,27 @@
1
+ # BI Refactor Flow
2
+
3
+ ```mermaid
4
+ flowchart TD
5
+ A["User invokes /bi-refactor"] --> B{"Existing PBIP or PBIX?"}
6
+ B -->|"Loose PBIX"| C["Explain PBIP and guide Save as -> PBIP in Desktop"]
7
+ B -->|"PBIP"| D["Default to Refactor asistido por template"]
8
+ C --> D
9
+ D --> E{"User explicitly chose sin template?"}
10
+ E -->|"No"| F["Use base-template as benchmark only"]
11
+ E -->|"Yes"| G["Use current project only"]
12
+ F --> H["Verify backup or commit"]
13
+ G --> H
14
+ H --> I["Diagnose model and report bindings"]
15
+ I --> J["Apply semantic changes with exact MCP operations"]
16
+ J --> K["Preserve report topology lock"]
17
+ K --> L["No safe report rebind command ships today"]
18
+ L --> N["Hand off manual Desktop rebind"]
19
+ N --> O["Validate persistence and no .Report A/D/R"]
20
+ O --> P["Close with changed/remaining work"]
21
+ ```
22
+
23
+ ## Notes
24
+
25
+ - `base-template` is a benchmark, not a file to paste over the project.
26
+ - PBIP + Git gives text diffs, rollback, reviews, and team workflow.
27
+ - The report topology lock is stricter than convenience: never rebuild the user's report as a shortcut.