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.
- package/.claude-plugin/marketplace.json +31 -0
- package/.claude-plugin/plugin.json +34 -0
- package/.claude-plugin/skill-manifest.json +79 -0
- package/.mcp.json +13 -0
- package/.plugin/plugin.json +14 -0
- package/LICENSE +21 -0
- package/README.md +849 -0
- package/bin/build-plugin.js +97 -0
- package/bin/cli.js +891 -0
- package/bin/commands/autoupdate.js +128 -0
- package/bin/commands/build-desktop.js +368 -0
- package/bin/commands/create-from-template.js +165 -0
- package/bin/commands/diff.js +435 -0
- package/bin/commands/install.js +542 -0
- package/bin/commands/lint.js +441 -0
- package/bin/commands/mcp-setup.js +255 -0
- package/bin/commands/session-update.js +204 -0
- package/bin/commands/smoke-test.js +20 -0
- package/bin/commands/uninstall.js +611 -0
- package/bin/commands/update-check.js +427 -0
- package/bin/commands/validate-cases.js +264 -0
- package/bin/commands/validate-projects.js +426 -0
- package/bin/commands/watch.js +251 -0
- package/bin/lib/agents.js +62 -0
- package/bin/lib/base-template-smoke.js +299 -0
- package/bin/lib/claude-hooks.js +160 -0
- package/bin/lib/generators/claude-plugin.js +529 -0
- package/bin/lib/generators/index.js +116 -0
- package/bin/lib/generators/shared.js +257 -0
- package/bin/lib/mcp-config.js +835 -0
- package/bin/lib/microsoft-mcp.js +206 -0
- package/bin/lib/powerbi-mcp-session.js +140 -0
- package/bin/lib/skills.js +164 -0
- package/bin/lib/template-scaffold.js +366 -0
- package/bin/mcp/powerbi-modeling-launcher.js +42 -0
- package/bin/postinstall.js +50 -0
- package/bin/utils/mcp-detect.js +346 -0
- package/bin/utils/tui.js +314 -0
- package/commands/bi-connect.md +520 -0
- package/commands/bi-dax.md +464 -0
- package/commands/bi-kickoff.md +550 -0
- package/commands/bi-modeling.md +485 -0
- package/commands/bi-performance.md +521 -0
- package/commands/bi-powerquery.md +229 -0
- package/commands/bi-refactor.md +249 -0
- package/commands/bi-scorecard.md +268 -0
- package/commands/bi-start.md +272 -0
- package/config.example.json +23 -0
- package/config.json +23 -0
- package/desktop-extension/manifest.json +30 -0
- package/desktop-extension/package.json +10 -0
- package/desktop-extension/server.js +137 -0
- package/package.json +94 -0
- package/skills/bi-connect/SKILL.md +522 -0
- package/skills/bi-connect/scripts/update-check.js +427 -0
- package/skills/bi-dax/SKILL.md +466 -0
- package/skills/bi-dax/scripts/update-check.js +427 -0
- package/skills/bi-kickoff/SKILL.md +552 -0
- package/skills/bi-kickoff/references/flow.html +78 -0
- package/skills/bi-kickoff/references/flow.md +62 -0
- package/skills/bi-kickoff/scripts/update-check.js +427 -0
- package/skills/bi-modeling/SKILL.md +487 -0
- package/skills/bi-modeling/scripts/update-check.js +427 -0
- package/skills/bi-performance/SKILL.md +523 -0
- package/skills/bi-performance/scripts/install-tabular-editor.ps1 +159 -0
- package/skills/bi-performance/scripts/run-bpa.ps1 +265 -0
- package/skills/bi-performance/scripts/update-check.js +427 -0
- package/skills/bi-powerquery/SKILL.md +231 -0
- package/skills/bi-powerquery/references/base-template-data-contract.md +323 -0
- package/skills/bi-powerquery/references/power-query-standards.md +74 -0
- package/skills/bi-powerquery/scripts/new-powerquery-staging.ps1 +371 -0
- package/skills/bi-powerquery/scripts/test-powerquery-contract.ps1 +225 -0
- package/skills/bi-powerquery/scripts/update-check.js +427 -0
- package/skills/bi-refactor/SKILL.md +251 -0
- package/skills/bi-refactor/references/flow.md +27 -0
- package/skills/bi-refactor/scripts/update-check.js +427 -0
- package/skills/bi-scorecard/SKILL.md +270 -0
- package/skills/bi-scorecard/examples/base-template-scorecard-overlay.json +82 -0
- package/skills/bi-scorecard/scripts/new-scorecard-blueprint-from-base-template.ps1 +124 -0
- package/skills/bi-scorecard/scripts/powerbi-goal-status-rules-api.ps1 +39 -0
- package/skills/bi-scorecard/scripts/powerbi-goal-values-api.ps1 +48 -0
- package/skills/bi-scorecard/scripts/powerbi-goals-api.ps1 +68 -0
- package/skills/bi-scorecard/scripts/powerbi-rest-common.ps1 +197 -0
- package/skills/bi-scorecard/scripts/powerbi-scorecards-api.ps1 +53 -0
- package/skills/bi-scorecard/scripts/update-check.js +427 -0
- package/skills/bi-start/SKILL.md +274 -0
- package/skills/bi-start/scripts/update-check.js +427 -0
- package/src/content/base.md +197 -0
- package/src/content/mcp-requirements.json +57 -0
- package/src/content/routing.md +201 -0
- package/src/content/skills/bi-connect.md +493 -0
- package/src/content/skills/bi-dax.md +437 -0
- package/src/content/skills/bi-kickoff/SKILL.md +523 -0
- package/src/content/skills/bi-kickoff/references/flow.html +78 -0
- package/src/content/skills/bi-kickoff/references/flow.md +62 -0
- package/src/content/skills/bi-modeling.md +458 -0
- package/src/content/skills/bi-performance/SKILL.md +494 -0
- package/src/content/skills/bi-performance/scripts/install-tabular-editor.ps1 +159 -0
- package/src/content/skills/bi-performance/scripts/run-bpa.ps1 +265 -0
- package/src/content/skills/bi-powerquery/SKILL.md +202 -0
- package/src/content/skills/bi-powerquery/references/base-template-data-contract.md +323 -0
- package/src/content/skills/bi-powerquery/references/power-query-standards.md +74 -0
- package/src/content/skills/bi-powerquery/scripts/new-powerquery-staging.ps1 +371 -0
- package/src/content/skills/bi-powerquery/scripts/test-powerquery-contract.ps1 +225 -0
- package/src/content/skills/bi-refactor/SKILL.md +222 -0
- package/src/content/skills/bi-refactor/references/flow.md +27 -0
- package/src/content/skills/bi-scorecard/SKILL.md +241 -0
- package/src/content/skills/bi-scorecard/examples/base-template-scorecard-blueprint.expected.json +105 -0
- package/src/content/skills/bi-scorecard/examples/base-template-scorecard-overlay.json +82 -0
- package/src/content/skills/bi-scorecard/scripts/new-scorecard-blueprint-from-base-template.ps1 +124 -0
- package/src/content/skills/bi-scorecard/scripts/powerbi-goal-status-rules-api.ps1 +39 -0
- package/src/content/skills/bi-scorecard/scripts/powerbi-goal-values-api.ps1 +48 -0
- package/src/content/skills/bi-scorecard/scripts/powerbi-goals-api.ps1 +68 -0
- package/src/content/skills/bi-scorecard/scripts/powerbi-rest-common.ps1 +197 -0
- package/src/content/skills/bi-scorecard/scripts/powerbi-scorecards-api.ps1 +53 -0
- package/src/content/skills/bi-start.md +266 -0
- package/templates/base-template/AGENTS.md +33 -0
- package/templates/base-template/base-template.Report/.platform +11 -0
- package/templates/base-template/base-template.Report/StaticResources/RegisteredResources/BISuperpowers.json +3888 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BaseThemes/CY18SU07.json +177 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BaseThemes/Fluent2-CY26SU03.json +4104 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleCityPark.json +26 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleDefault.json +26 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleNeutral.json +26 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleOrchid.json +26 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/AccessibleTidal.json +26 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Bloom.json +139 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/CityPark.json +40 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Classroom.json +40 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/ColorblindSafe.json +48 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/CopilotDefault.json +1861 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Divergent.json +127 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Electric.json +48 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Frontier.json +136 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/HighContrast.json +40 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Highrise.json +41 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Innovate.json +227 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/NewExecutive.json +41 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Solar.json +33 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Storm.json +25 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Sunset.json +48 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Temperature.json +33 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Tidal.json +100 -0
- package/templates/base-template/base-template.Report/StaticResources/SharedResources/BuiltInThemes/Twilight.json +40 -0
- package/templates/base-template/base-template.Report/definition/bookmarks/1d40d43c7ade66e8603c.bookmark.json +2297 -0
- package/templates/base-template/base-template.Report/definition/bookmarks/af068ff51c0ca3089ea7.bookmark.json +2300 -0
- package/templates/base-template/base-template.Report/definition/bookmarks/bookmarks.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/page.json +130 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/0352fd80d074693a65db/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/0352fd80d074693a65db/visual.json +669 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/1c5a14bf493697344b68/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/1c5a14bf493697344b68/visual.json +723 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/3486cf7624c5b109b4e5/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/3486cf7624c5b109b4e5/visual.json +333 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/4d8b989008edc0db28d1/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/4d8b989008edc0db28d1/visual.json +109 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/55e10ac7d76a1954f94f/mobile.json +31 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/55e10ac7d76a1954f94f/visual.json +378 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/57f52ecf4490f70e4da1/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/57f52ecf4490f70e4da1/visual.json +175 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/5f4d76bbc870118e9840/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/5f4d76bbc870118e9840/visual.json +468 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/73629e1abebb7a444b59/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/73629e1abebb7a444b59/visual.json +359 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/749cb1388c7e0a88161c/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/749cb1388c7e0a88161c/visual.json +690 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/90677f13cea5d1275990/visual.json +17 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/92cf92e3da10493adb78/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/92cf92e3da10493adb78/visual.json +468 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/9fe17b1971f68443fc15/mobile.json +10 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/9fe17b1971f68443fc15/visual.json +328 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/a30bd0950630ed94e8a3/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/a30bd0950630ed94e8a3/visual.json +578 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/a56e91d9400a835e4814/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/a56e91d9400a835e4814/visual.json +432 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/aded24cd205c0b528642/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/aded24cd205c0b528642/visual.json +801 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/af34b26f14a8a724c9a9/mobile.json +37 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/af34b26f14a8a724c9a9/visual.json +1318 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/b529688fe5a226643322/visual.json +209 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/c4c6f332d05e72e2eb06/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/c4c6f332d05e72e2eb06/visual.json +174 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/fa81f184e2cb0e8b087c/mobile.json +29 -0
- package/templates/base-template/base-template.Report/definition/pages/6a4808bb8bb9166f49ff/visuals/fa81f184e2cb0e8b087c/visual.json +241 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/page.json +130 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/07e9c4302e29029c5462/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/07e9c4302e29029c5462/visual.json +690 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/109ceede4bc015b0c006/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/109ceede4bc015b0c006/visual.json +468 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/118257e006d472277e10/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/118257e006d472277e10/visual.json +359 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/2caf02e0137c4a1280cc/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/2caf02e0137c4a1280cc/visual.json +669 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/311e76fe3c9edad68204/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/311e76fe3c9edad68204/visual.json +109 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/31c21f8cbeb3b208940a/visual.json +209 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/3ab72c25062437149b03/visual.json +17 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/5959867442abcb0ce2b3/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/5959867442abcb0ce2b3/visual.json +788 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/5b96e0f88d192b044a13/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/5b96e0f88d192b044a13/visual.json +592 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/64e749a63d0786000e22/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/64e749a63d0786000e22/visual.json +468 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/7ae1ca604edac6586ad0/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/7ae1ca604edac6586ad0/visual.json +1310 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/840300733885141a6603/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/840300733885141a6603/visual.json +175 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/a38448cdb203279273d2/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/a38448cdb203279273d2/visual.json +516 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d1e86f213a3841d12e20/visual.json +328 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d4a484c1bcc8ee3075e2/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d4a484c1bcc8ee3075e2/visual.json +432 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d87cb5cf06acca19bbb5/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/d87cb5cf06acca19bbb5/visual.json +241 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/e243da2677209ed69408/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/e243da2677209ed69408/visual.json +174 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/f3aaf24f5b22b67573b0/mobile.json +11 -0
- package/templates/base-template/base-template.Report/definition/pages/9a5b670b015cab882629/visuals/f3aaf24f5b22b67573b0/visual.json +333 -0
- package/templates/base-template/base-template.Report/definition/pages/pages.json +8 -0
- package/templates/base-template/base-template.Report/definition/report.json +89 -0
- package/templates/base-template/base-template.Report/definition/version.json +4 -0
- package/templates/base-template/base-template.Report/definition.pbir +9 -0
- package/templates/base-template/base-template.SemanticModel/.platform +11 -0
- package/templates/base-template/base-template.SemanticModel/definition/cultures/es-AR.tmdl +11185 -0
- package/templates/base-template/base-template.SemanticModel/definition/database.tmdl +3 -0
- package/templates/base-template/base-template.SemanticModel/definition/expressions.tmdl +234 -0
- package/templates/base-template/base-template.SemanticModel/definition/functions.tmdl +637 -0
- package/templates/base-template/base-template.SemanticModel/definition/model.tmdl +82 -0
- package/templates/base-template/base-template.SemanticModel/definition/relationships.tmdl +271 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Calendario.tmdl +200 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Campa/303/261as.tmdl +75 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Canales.tmdl +84 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Clientes.tmdl +143 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Devoluciones.tmdl +95 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Ejecuci/303/263n proyectos.tmdl" +130 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Entregas.tmdl +122 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Equipos m/303/251tricas.tmdl" +40 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Equipos.tmdl +73 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Horas.tmdl +122 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Interacciones clientes.tmdl +146 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Leads.tmdl +119 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Monedas.tmdl +44 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Movimientos financieros.tmdl +145 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/M/303/251tricas.tmdl +1294 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/N/303/263mina.tmdl +110 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Oportunidades.tmdl +135 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Presupuesto.tmdl +125 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Productos.tmdl +98 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Proyectos.tmdl +77 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Servicios.tmdl +75 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Tareas proyecto.tmdl +102 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Tipo de cambio.tmdl +67 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/Ventas.tmdl +180 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux An/303/241lisis dimensiones.tmdl" +38 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Comparaciones.tmdl +227 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Compatibilidad m/303/251trica-dimensi/303/263n.tmdl" +68 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Modelo configuraci/303/263n.tmdl" +44 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Modo fechas.tmdl +36 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux M/303/251trica-Equipo.tmdl" +102 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Overrides m/303/251trica-dimensi/303/263n.tmdl" +54 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Per/303/255odos.tmdl" +182 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Rango fechas modo.tmdl +36 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Rango fechas.tmdl +27 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_Aux Vista de calendario.tmdl +30 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_GC C/303/241lculo.tmdl" +70 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_GC Eje X.tmdl +63 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_GC M/303/251trica.tmdl" +374 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_GC Tipo c/303/241lculo.tmdl" +223 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_PC Dimensi/303/263n.tmdl" +98 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables/_PC Eje X.tmdl +68 -0
- package/templates/base-template/base-template.SemanticModel/definition/tables//303/223rdenes servicio.tmdl" +151 -0
- package/templates/base-template/base-template.SemanticModel/definition.pbism +5 -0
- package/templates/base-template/base-template.SemanticModel/diagramLayout.json +568 -0
- package/templates/base-template/base-template.pbip +14 -0
- package/templates/base-template/template.manifest.json +41 -0
- package/theme/BISuperpowers.json +3888 -0
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code Plugin Generator
|
|
3
|
+
* ============================
|
|
4
|
+
*
|
|
5
|
+
* Generates a native Claude Code plugin structure at the target root:
|
|
6
|
+
* - .claude-plugin/plugin.json
|
|
7
|
+
* - .mcp.json
|
|
8
|
+
* - command markdown files
|
|
9
|
+
* - plugin skill directories with SKILL.md files
|
|
10
|
+
*
|
|
11
|
+
* @module lib/generators/claude-plugin
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const fs = require('fs');
|
|
15
|
+
const path = require('path');
|
|
16
|
+
const {
|
|
17
|
+
PLUGIN_ROOT_LAUNCHER_MODE,
|
|
18
|
+
ABSOLUTE_LAUNCHER_MODE,
|
|
19
|
+
createPluginMcpConfig,
|
|
20
|
+
} = require('../microsoft-mcp');
|
|
21
|
+
const { parseSkillMetadata, getSkillPurpose } = require('./shared');
|
|
22
|
+
|
|
23
|
+
// Currently the plugin ships 9 command skills:
|
|
24
|
+
// - bi-start: session-opener that routes to the BI specialists.
|
|
25
|
+
// - bi-kickoff: new-project bootstrap with AGENTS.md scaffolding.
|
|
26
|
+
// - bi-modeling / bi-dax / bi-performance: model design, DAX, profiling.
|
|
27
|
+
// - bi-connect: MCP connection + DAX UDFs.
|
|
28
|
+
// - bi-powerquery: Power Query staging for Demo/Real appends.
|
|
29
|
+
// - bi-scorecard: Power BI Service scorecards and goals automation.
|
|
30
|
+
// - bi-refactor: existing-project cleanup without report rebuilds.
|
|
31
|
+
// The old reference-skills split is kept as an empty set so that any
|
|
32
|
+
// downstream code that checks `REFERENCE_SKILLS.has(x)` still works.
|
|
33
|
+
const COMMAND_SKILLS = new Set([
|
|
34
|
+
'bi-start',
|
|
35
|
+
'bi-kickoff',
|
|
36
|
+
'bi-modeling',
|
|
37
|
+
'bi-dax',
|
|
38
|
+
'bi-performance',
|
|
39
|
+
'bi-connect',
|
|
40
|
+
'bi-powerquery',
|
|
41
|
+
'bi-scorecard',
|
|
42
|
+
'bi-refactor',
|
|
43
|
+
]);
|
|
44
|
+
|
|
45
|
+
const REFERENCE_SKILLS = new Set();
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Ensure a directory exists.
|
|
49
|
+
*
|
|
50
|
+
* @param {string} directory - Directory path
|
|
51
|
+
*/
|
|
52
|
+
function ensureDirectory(directory) {
|
|
53
|
+
if (!fs.existsSync(directory)) {
|
|
54
|
+
fs.mkdirSync(directory, { recursive: true });
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Recursively copy a directory tree from `source` to `target`.
|
|
60
|
+
* Follows the Node built-in cp() semantics: overwrites existing files,
|
|
61
|
+
* preserves directory structure. No-op if source does not exist.
|
|
62
|
+
*
|
|
63
|
+
* Used to propagate `references/` and `scripts/` subfolders from
|
|
64
|
+
* folder-based source skills into the generated plugin so the agent can
|
|
65
|
+
* load on-demand material and run bundled helper scripts.
|
|
66
|
+
*
|
|
67
|
+
* @param {string} source - Source directory (must exist to do anything)
|
|
68
|
+
* @param {string} target - Target directory (created if missing)
|
|
69
|
+
*/
|
|
70
|
+
function copyDirectory(source, target) {
|
|
71
|
+
if (!fs.existsSync(source)) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
ensureDirectory(target);
|
|
75
|
+
for (const entry of fs.readdirSync(source, { withFileTypes: true })) {
|
|
76
|
+
const sourcePath = path.join(source, entry.name);
|
|
77
|
+
const targetPath = path.join(target, entry.name);
|
|
78
|
+
if (entry.isDirectory()) {
|
|
79
|
+
copyDirectory(sourcePath, targetPath);
|
|
80
|
+
} else if (entry.isFile()) {
|
|
81
|
+
// Don't ship test/build artifacts (e.g. *.expected.json oracles) bundled
|
|
82
|
+
// beside references/scripts/examples — mirror copyRuntimeTree's filter so
|
|
83
|
+
// both distribution paths exclude the same files.
|
|
84
|
+
if (/\.(test|spec)\.js$|\.expected\.json$|\.bak$|\.tmp$/.test(entry.name)) {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
fs.copyFileSync(sourcePath, targetPath);
|
|
88
|
+
}
|
|
89
|
+
// Ignore symlinks / other entry types to match the conservative
|
|
90
|
+
// behaviour of readSkillDirectory().
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Rewrite library references for generated plugin targets.
|
|
96
|
+
*
|
|
97
|
+
* @param {string} content - Original markdown content
|
|
98
|
+
* @param {string} libraryPrefix - Prefix to use for library references
|
|
99
|
+
* @returns {string} Rewritten content
|
|
100
|
+
*/
|
|
101
|
+
function rewriteLibraryReferences(content, libraryPrefix) {
|
|
102
|
+
if (!libraryPrefix || libraryPrefix === 'library') {
|
|
103
|
+
return content;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return content.replace(/(^|[^.`])library\//g, `$1${libraryPrefix}/`);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Build a concise frontmatter description for plugin skills.
|
|
111
|
+
*
|
|
112
|
+
* @param {Object} skill - Skill definition object with at least { name, content }
|
|
113
|
+
* @returns {string} Description string
|
|
114
|
+
* @throws {Error} If skill is missing required fields
|
|
115
|
+
*/
|
|
116
|
+
function getPluginDescription(skill) {
|
|
117
|
+
if (!skill || typeof skill !== 'object' || !skill.name || typeof skill.content !== 'string') {
|
|
118
|
+
const hint = skill && skill.path ? ` (path: ${skill.path})` : '';
|
|
119
|
+
throw new Error(
|
|
120
|
+
`Invalid skill object: missing name or content${hint}. ` +
|
|
121
|
+
'Check the source file in src/content/skills/.'
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const metadata = parseSkillMetadata(skill.content);
|
|
126
|
+
|
|
127
|
+
if (metadata.triggers.length > 0) {
|
|
128
|
+
const triggerList = metadata.triggers
|
|
129
|
+
.slice(0, 6)
|
|
130
|
+
.map((trigger) => `"${trigger}"`)
|
|
131
|
+
.join(', ');
|
|
132
|
+
return `Use when the user asks about ${metadata.title || skill.name}, especially phrases like ${triggerList}.`;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return `${metadata.title || skill.name}: ${getSkillPurpose(skill.name)}.`;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Serialize values safely for YAML frontmatter.
|
|
140
|
+
*
|
|
141
|
+
* @param {string} value - Raw value
|
|
142
|
+
* @returns {string} JSON-escaped string valid in YAML
|
|
143
|
+
*/
|
|
144
|
+
function toFrontmatterValue(value) {
|
|
145
|
+
return JSON.stringify(value);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Return the canonical source path that maintainers should edit.
|
|
150
|
+
*
|
|
151
|
+
* @param {Object} skill - Skill definition object
|
|
152
|
+
* @returns {string} Source path relative to the repository root
|
|
153
|
+
*/
|
|
154
|
+
function getSourceEditPath(skill) {
|
|
155
|
+
if (skill.bundleDir) {
|
|
156
|
+
return `src/content/skills/${skill.name}/SKILL.md`;
|
|
157
|
+
}
|
|
158
|
+
return `src/content/skills/${skill.name}.md`;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// ---------------------------------------------------------------------------
|
|
162
|
+
// Update-check preamble
|
|
163
|
+
// ---------------------------------------------------------------------------
|
|
164
|
+
// Cross-agent "auto-update" mechanism (see ROADMAP item 4 / gstack pattern).
|
|
165
|
+
// The preamble is prepended to every generated SKILL.md and command Markdown
|
|
166
|
+
// so the agent reading the skill content runs the version check at the top
|
|
167
|
+
// of each conversation, surfaces an update notice if available, and then
|
|
168
|
+
// proceeds with the skill. The check caches for 24h on disk and degrades to
|
|
169
|
+
// no-output on network failure — it must never block the skill invocation.
|
|
170
|
+
//
|
|
171
|
+
// The update-check.js script is shipped alongside each skill's `scripts/`
|
|
172
|
+
// folder at generation time (see copyUpdateCheckScript) so `{skillBundleDir}`
|
|
173
|
+
// resolves correctly regardless of the install path (npm-based `super
|
|
174
|
+
// install` OR Claude Code plugin marketplace).
|
|
175
|
+
|
|
176
|
+
const UPDATE_CHECK_PREAMBLE = `<!-- bi-superpowers update-check preamble (auto-generated, do not edit) -->
|
|
177
|
+
## ⬆ Update check
|
|
178
|
+
|
|
179
|
+
Before handling the user's request below, run this command **once per conversation** and interpret the output:
|
|
180
|
+
|
|
181
|
+
\`\`\`bash
|
|
182
|
+
node "{skillBundleDir}/scripts/update-check.js" --silent-if-uptodate --silent-if-snoozed
|
|
183
|
+
\`\`\`
|
|
184
|
+
|
|
185
|
+
- Empty output or \`UPTODATE\` — proceed with the skill silently. No message.
|
|
186
|
+
- \`UPDATE_AVAILABLE <installed> <latest>\` — tell the user exactly once this conversation, before diving into the skill:
|
|
187
|
+
> "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."
|
|
188
|
+
|
|
189
|
+
Then continue with the skill below.
|
|
190
|
+
- \`SNOOZED <iso>\` — proceed silently.
|
|
191
|
+
|
|
192
|
+
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.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
<!-- /bi-superpowers update-check preamble -->
|
|
196
|
+
|
|
197
|
+
`;
|
|
198
|
+
|
|
199
|
+
function shouldIncludeUpdateCheckPreamble(skill, options = {}) {
|
|
200
|
+
if (options.skipPreamble) {
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
// bi-start owns the interactive update flow itself in PHASE 0. If we also
|
|
204
|
+
// prepend the generic passive preamble, the session-opener gets two
|
|
205
|
+
// competing update contracts in the same skill.
|
|
206
|
+
return skill.name !== 'bi-start';
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Build command markdown with Claude Code frontmatter.
|
|
211
|
+
*
|
|
212
|
+
* @param {Object} skill - Skill definition object
|
|
213
|
+
* @param {string} libraryPrefix - Library prefix used in generated target
|
|
214
|
+
* @param {Object} [options] - Options
|
|
215
|
+
* @param {boolean} [options.skipPreamble] - Omit the update-check preamble (tests)
|
|
216
|
+
* @returns {string} Command markdown
|
|
217
|
+
*/
|
|
218
|
+
function buildCommandMarkdown(skill, libraryPrefix, options = {}) {
|
|
219
|
+
const description = getSkillPurpose(skill.name);
|
|
220
|
+
const content = rewriteLibraryReferences(skill.content, libraryPrefix);
|
|
221
|
+
const preamble = shouldIncludeUpdateCheckPreamble(skill, options) ? UPDATE_CHECK_PREAMBLE : '';
|
|
222
|
+
const sourceEditPath = getSourceEditPath(skill);
|
|
223
|
+
|
|
224
|
+
return `---
|
|
225
|
+
description: ${toFrontmatterValue(description)}
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
<!-- Generated by BI Agent Superpowers. Edit ${sourceEditPath} instead. -->
|
|
229
|
+
|
|
230
|
+
${preamble}${content}`;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Build plugin skill markdown with required frontmatter.
|
|
235
|
+
*
|
|
236
|
+
* @param {Object} skill - Skill definition object
|
|
237
|
+
* @param {string} version - Package version
|
|
238
|
+
* @param {string} libraryPrefix - Library prefix used in generated target
|
|
239
|
+
* @param {Object} [options] - Options
|
|
240
|
+
* @param {boolean} [options.skipPreamble] - Omit the update-check preamble (tests)
|
|
241
|
+
* @returns {string} Skill markdown
|
|
242
|
+
*/
|
|
243
|
+
function buildSkillMarkdown(skill, version, libraryPrefix, options = {}) {
|
|
244
|
+
const content = rewriteLibraryReferences(skill.content, libraryPrefix);
|
|
245
|
+
const preamble = shouldIncludeUpdateCheckPreamble(skill, options) ? UPDATE_CHECK_PREAMBLE : '';
|
|
246
|
+
const sourceEditPath = getSourceEditPath(skill);
|
|
247
|
+
|
|
248
|
+
return `---
|
|
249
|
+
name: ${toFrontmatterValue(skill.name)}
|
|
250
|
+
description: ${toFrontmatterValue(getPluginDescription(skill))}
|
|
251
|
+
version: ${toFrontmatterValue(version)}
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
<!-- Generated by BI Agent Superpowers. Edit ${sourceEditPath} instead. -->
|
|
255
|
+
|
|
256
|
+
${preamble}${content}`;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Copy bin/commands/update-check.js into each generated skill's scripts/
|
|
261
|
+
* directory so the preamble's `{skillBundleDir}/scripts/update-check.js`
|
|
262
|
+
* invocation works under both install paths (npm-based `super install` and
|
|
263
|
+
* Claude Code plugin marketplace). The file is bundled with the npm tarball
|
|
264
|
+
* via bin/, so this is purely a generation-time copy into skills/.
|
|
265
|
+
*
|
|
266
|
+
* @param {string} packageDir - npm package root (source of the canonical script)
|
|
267
|
+
* @param {string} targetDir - plugin target root (contains skills/<name>/)
|
|
268
|
+
* @param {Object[]} skills - Skills to wire the script into
|
|
269
|
+
*/
|
|
270
|
+
function copyUpdateCheckScript(packageDir, targetDir, skills, version = null) {
|
|
271
|
+
if (!packageDir) return;
|
|
272
|
+
const src = path.join(packageDir, 'bin', 'commands', 'update-check.js');
|
|
273
|
+
if (!fs.existsSync(src)) return;
|
|
274
|
+
const sourceContent = fs.readFileSync(src, 'utf8');
|
|
275
|
+
let bundledContent = sourceContent;
|
|
276
|
+
if (version) {
|
|
277
|
+
bundledContent = sourceContent.replace(
|
|
278
|
+
'const BUNDLED_INSTALLED_VERSION = null;',
|
|
279
|
+
`const BUNDLED_INSTALLED_VERSION = ${JSON.stringify(version)};`
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
for (const skill of skills) {
|
|
283
|
+
const scriptsDir = path.join(targetDir, 'skills', skill.name, 'scripts');
|
|
284
|
+
ensureDirectory(scriptsDir);
|
|
285
|
+
fs.writeFileSync(path.join(scriptsDir, 'update-check.js'), bundledContent);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Remove stale generated files from a managed directory.
|
|
291
|
+
*
|
|
292
|
+
* @param {string} directory - Directory path
|
|
293
|
+
* @param {string[]} expectedEntries - Expected file or directory names
|
|
294
|
+
*/
|
|
295
|
+
function removeStaleEntries(directory, expectedEntries) {
|
|
296
|
+
if (!fs.existsSync(directory)) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const expected = new Set(expectedEntries);
|
|
301
|
+
for (const entry of fs.readdirSync(directory)) {
|
|
302
|
+
if (!expected.has(entry)) {
|
|
303
|
+
fs.rmSync(path.join(directory, entry), { recursive: true, force: true });
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Generate a native Claude Code plugin.
|
|
310
|
+
*
|
|
311
|
+
* @param {string} targetDir - Target directory
|
|
312
|
+
* @param {Object[]} skills - Source skill objects
|
|
313
|
+
* @param {Object} [options] - Generator options
|
|
314
|
+
* @param {string} [options.packageDir] - Package installation directory
|
|
315
|
+
* @param {string} [options.version] - Package version
|
|
316
|
+
* @param {boolean} [options.usePluginRootLauncher] - Whether to use ${CLAUDE_PLUGIN_ROOT}
|
|
317
|
+
* @param {string} [options.libraryPrefix] - Library reference prefix
|
|
318
|
+
*/
|
|
319
|
+
async function generate(targetDir, skills, options = {}) {
|
|
320
|
+
const version = options.version || '0.0.0';
|
|
321
|
+
const usePluginRootLauncher = options.usePluginRootLauncher === true;
|
|
322
|
+
const libraryPrefix = options.libraryPrefix || 'library';
|
|
323
|
+
const launcherMode = usePluginRootLauncher ? PLUGIN_ROOT_LAUNCHER_MODE : ABSOLUTE_LAUNCHER_MODE;
|
|
324
|
+
|
|
325
|
+
const pluginDir = path.join(targetDir, '.claude-plugin');
|
|
326
|
+
const commandsDir = path.join(targetDir, 'commands');
|
|
327
|
+
const skillsDir = path.join(targetDir, 'skills');
|
|
328
|
+
|
|
329
|
+
ensureDirectory(pluginDir);
|
|
330
|
+
ensureDirectory(commandsDir);
|
|
331
|
+
ensureDirectory(skillsDir);
|
|
332
|
+
|
|
333
|
+
// Pull discoverable metadata from the installed package.json when available
|
|
334
|
+
// so the generated plugin.json has the same repo/license/keywords/homepage
|
|
335
|
+
// fields as the published npm package. Falls back to bare identity fields
|
|
336
|
+
// if options.packageDir is missing (unit tests, detached generation).
|
|
337
|
+
let pkgMetadata = {};
|
|
338
|
+
if (options.packageDir) {
|
|
339
|
+
try {
|
|
340
|
+
const pkg = require(path.join(options.packageDir, 'package.json'));
|
|
341
|
+
pkgMetadata = {
|
|
342
|
+
repository: pkg.repository,
|
|
343
|
+
homepage: pkg.homepage,
|
|
344
|
+
license: pkg.license,
|
|
345
|
+
keywords: Array.isArray(pkg.keywords) ? pkg.keywords : undefined,
|
|
346
|
+
};
|
|
347
|
+
} catch (_) {
|
|
348
|
+
// Package.json unreadable — generate a minimal manifest and move on.
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
const pluginManifest = {
|
|
353
|
+
name: 'bi-superpowers',
|
|
354
|
+
description:
|
|
355
|
+
'Claude Code plugin for Power BI, Microsoft Fabric, and semantic model workflows powered by the official Microsoft MCP servers.',
|
|
356
|
+
version,
|
|
357
|
+
author: {
|
|
358
|
+
name: 'Lucas Sanchez',
|
|
359
|
+
},
|
|
360
|
+
...(pkgMetadata.repository !== undefined ? { repository: pkgMetadata.repository } : {}),
|
|
361
|
+
...(pkgMetadata.homepage !== undefined ? { homepage: pkgMetadata.homepage } : {}),
|
|
362
|
+
...(pkgMetadata.license !== undefined ? { license: pkgMetadata.license } : {}),
|
|
363
|
+
...(pkgMetadata.keywords !== undefined ? { keywords: pkgMetadata.keywords } : {}),
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
fs.writeFileSync(
|
|
367
|
+
path.join(pluginDir, 'plugin.json'),
|
|
368
|
+
JSON.stringify(pluginManifest, null, 2) + '\n'
|
|
369
|
+
);
|
|
370
|
+
|
|
371
|
+
// Generate marketplace.json with all skills listed and synced version.
|
|
372
|
+
// The descriptions are derived from the actual skill count so they never
|
|
373
|
+
// drift out of sync with the real plugin contents.
|
|
374
|
+
const skillCount = skills.length;
|
|
375
|
+
const skillsPlural = skillCount === 1 ? 'skill' : 'skills';
|
|
376
|
+
const metadataDescription = `AI-powered ${skillsPlural} for Power BI Desktop development. Works with Claude Code, GitHub Copilot, Codex, Gemini CLI, and Kilo Code.`;
|
|
377
|
+
const pluginDescription = `${skillCount} AI ${skillsPlural} + Power BI Modeling and Microsoft Learn MCP servers for local Power BI Desktop workflows across 5 AI agents.`;
|
|
378
|
+
|
|
379
|
+
const marketplaceManifest = {
|
|
380
|
+
name: 'bi-superpowers',
|
|
381
|
+
owner: {
|
|
382
|
+
name: 'Lucas Sanchez',
|
|
383
|
+
url: 'https://github.com/luquimbo',
|
|
384
|
+
},
|
|
385
|
+
metadata: {
|
|
386
|
+
description: metadataDescription,
|
|
387
|
+
version,
|
|
388
|
+
repository: 'https://github.com/luquimbo/bi-superpowers',
|
|
389
|
+
},
|
|
390
|
+
plugins: [
|
|
391
|
+
{
|
|
392
|
+
name: 'bi-superpowers',
|
|
393
|
+
description: pluginDescription,
|
|
394
|
+
source: './',
|
|
395
|
+
strict: false,
|
|
396
|
+
skills: skills.map((skill) => `./skills/${skill.name}`).sort(),
|
|
397
|
+
},
|
|
398
|
+
],
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
fs.writeFileSync(
|
|
402
|
+
path.join(pluginDir, 'marketplace.json'),
|
|
403
|
+
JSON.stringify(marketplaceManifest, null, 2) + '\n'
|
|
404
|
+
);
|
|
405
|
+
|
|
406
|
+
// Generate skill-manifest.json — a compact summary of all skills with
|
|
407
|
+
// frontmatter metadata (name, title, description, category). Used by
|
|
408
|
+
// internal tooling (xray, powers, checkup) and as a CI consistency check.
|
|
409
|
+
// Intentionally omits timestamps so the file is deterministic and doesn't
|
|
410
|
+
// show as dirty in git on every build.
|
|
411
|
+
const skillManifest = {
|
|
412
|
+
name: 'bi-superpowers',
|
|
413
|
+
version,
|
|
414
|
+
skillCount: skills.length,
|
|
415
|
+
skills: skills.map((skill) => {
|
|
416
|
+
const metadata = parseSkillMetadata(skill.content);
|
|
417
|
+
return {
|
|
418
|
+
name: skill.name,
|
|
419
|
+
title: metadata.title || skill.name,
|
|
420
|
+
description: getPluginDescription(skill),
|
|
421
|
+
category: COMMAND_SKILLS.has(skill.name) ? 'command' : 'reference',
|
|
422
|
+
triggerCount: metadata.triggers.length,
|
|
423
|
+
path: `skills/${skill.name}/SKILL.md`,
|
|
424
|
+
};
|
|
425
|
+
}),
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
fs.writeFileSync(
|
|
429
|
+
path.join(pluginDir, 'skill-manifest.json'),
|
|
430
|
+
JSON.stringify(skillManifest, null, 2) + '\n'
|
|
431
|
+
);
|
|
432
|
+
|
|
433
|
+
// Open Plugin Spec — vendor-neutral manifest
|
|
434
|
+
// https://github.com/vercel-labs/open-plugin-spec
|
|
435
|
+
// Lives alongside the Claude-specific .claude-plugin/plugin.json so that
|
|
436
|
+
// non-Claude agents (future Cursor/Windsurf plugins, etc.) can discover
|
|
437
|
+
// bi-superpowers without depending on Claude-specific paths.
|
|
438
|
+
const openPluginDir = path.join(targetDir, '.plugin');
|
|
439
|
+
ensureDirectory(openPluginDir);
|
|
440
|
+
const openPluginManifest = {
|
|
441
|
+
spec: 'open-plugin-spec@1',
|
|
442
|
+
name: 'bi-superpowers',
|
|
443
|
+
version,
|
|
444
|
+
description: pluginManifest.description,
|
|
445
|
+
author: pluginManifest.author,
|
|
446
|
+
repository: 'https://github.com/luquimbo/bi-superpowers',
|
|
447
|
+
license: 'MIT',
|
|
448
|
+
skills: './skills/',
|
|
449
|
+
commands: './commands/',
|
|
450
|
+
mcpServers: './.mcp.json',
|
|
451
|
+
};
|
|
452
|
+
fs.writeFileSync(
|
|
453
|
+
path.join(openPluginDir, 'plugin.json'),
|
|
454
|
+
JSON.stringify(openPluginManifest, null, 2) + '\n'
|
|
455
|
+
);
|
|
456
|
+
|
|
457
|
+
fs.writeFileSync(
|
|
458
|
+
path.join(targetDir, '.mcp.json'),
|
|
459
|
+
JSON.stringify(
|
|
460
|
+
createPluginMcpConfig({
|
|
461
|
+
packageDir: options.packageDir,
|
|
462
|
+
launcherMode,
|
|
463
|
+
}),
|
|
464
|
+
null,
|
|
465
|
+
2
|
|
466
|
+
) + '\n'
|
|
467
|
+
);
|
|
468
|
+
|
|
469
|
+
const commandSkills = skills.filter((skill) => COMMAND_SKILLS.has(skill.name));
|
|
470
|
+
|
|
471
|
+
// Clean up stale entries — commands only have command skills, but ALL skills get SKILL.md
|
|
472
|
+
removeStaleEntries(
|
|
473
|
+
commandsDir,
|
|
474
|
+
commandSkills.map((skill) => `${skill.name}.md`)
|
|
475
|
+
);
|
|
476
|
+
removeStaleEntries(
|
|
477
|
+
skillsDir,
|
|
478
|
+
skills.map((skill) => skill.name)
|
|
479
|
+
);
|
|
480
|
+
|
|
481
|
+
// Command skills → commands/*.md (slash commands, Claude Code only)
|
|
482
|
+
for (const skill of commandSkills) {
|
|
483
|
+
fs.writeFileSync(
|
|
484
|
+
path.join(commandsDir, `${skill.name}.md`),
|
|
485
|
+
buildCommandMarkdown(skill, libraryPrefix)
|
|
486
|
+
);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
// ALL skills → skills/*/SKILL.md (universal, discoverable by all Claude tools)
|
|
490
|
+
// Folder-based skills additionally get their `references/` and `scripts/`
|
|
491
|
+
// subfolders copied verbatim so the agent can load on-demand material and
|
|
492
|
+
// invoke helper scripts bundled with the skill.
|
|
493
|
+
for (const skill of skills) {
|
|
494
|
+
const skillDir = path.join(skillsDir, skill.name);
|
|
495
|
+
ensureDirectory(skillDir);
|
|
496
|
+
fs.writeFileSync(
|
|
497
|
+
path.join(skillDir, 'SKILL.md'),
|
|
498
|
+
buildSkillMarkdown(skill, version, libraryPrefix)
|
|
499
|
+
);
|
|
500
|
+
|
|
501
|
+
if (skill.bundleDir) {
|
|
502
|
+
copyDirectory(path.join(skill.bundleDir, 'references'), path.join(skillDir, 'references'));
|
|
503
|
+
copyDirectory(path.join(skill.bundleDir, 'scripts'), path.join(skillDir, 'scripts'));
|
|
504
|
+
copyDirectory(path.join(skill.bundleDir, 'examples'), path.join(skillDir, 'examples'));
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// Ship the update-check helper alongside every skill so the SKILL.md
|
|
509
|
+
// preamble can invoke it via `{skillBundleDir}/scripts/update-check.js`
|
|
510
|
+
// regardless of install path.
|
|
511
|
+
copyUpdateCheckScript(options.packageDir, targetDir, skills, version);
|
|
512
|
+
|
|
513
|
+
console.log(' ✓ Created Claude Code plugin manifest');
|
|
514
|
+
console.log(' ✓ Created .mcp.json with official Microsoft MCP servers');
|
|
515
|
+
console.log(` ✓ Created ${commandSkills.length} plugin commands`);
|
|
516
|
+
console.log(` ✓ Created ${skills.length} plugin skills (SKILL.md)`);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
module.exports = {
|
|
520
|
+
name: 'Claude Code Plugin',
|
|
521
|
+
description: 'Native Claude Code plugin (recommended)',
|
|
522
|
+
generate,
|
|
523
|
+
buildCommandMarkdown,
|
|
524
|
+
buildSkillMarkdown,
|
|
525
|
+
copyUpdateCheckScript,
|
|
526
|
+
UPDATE_CHECK_PREAMBLE,
|
|
527
|
+
COMMAND_SKILLS,
|
|
528
|
+
REFERENCE_SKILLS,
|
|
529
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generators Module
|
|
3
|
+
* ==================
|
|
4
|
+
*
|
|
5
|
+
* Factory and registry for the Claude ecosystem generator.
|
|
6
|
+
* Supports: Claude Code, 1code.dev, Claude Desktop (via MCPB).
|
|
7
|
+
*
|
|
8
|
+
* @module lib/generators
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const claudePlugin = require('./claude-plugin');
|
|
12
|
+
const shared = require('./shared');
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* AI Tools Configuration Registry
|
|
16
|
+
*
|
|
17
|
+
* Only claude-plugin is needed — it covers Claude Code + 1code.dev.
|
|
18
|
+
* Claude Desktop is handled separately via `super build-desktop` (MCPB).
|
|
19
|
+
*/
|
|
20
|
+
const AI_TOOLS = {
|
|
21
|
+
'claude-plugin': claudePlugin,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get a generator by tool ID
|
|
26
|
+
* @param {string} toolId - Tool identifier
|
|
27
|
+
* @returns {Object|null} Generator object or null if not found
|
|
28
|
+
*/
|
|
29
|
+
function getGenerator(toolId) {
|
|
30
|
+
return AI_TOOLS[toolId] || null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get all available tool IDs
|
|
35
|
+
* @returns {string[]} Array of tool IDs
|
|
36
|
+
*/
|
|
37
|
+
function getAvailableTools() {
|
|
38
|
+
return Object.keys(AI_TOOLS);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Get tool display info for all tools
|
|
43
|
+
* @returns {Object[]} Array of {id, name, description}
|
|
44
|
+
*/
|
|
45
|
+
function getToolsInfo() {
|
|
46
|
+
return Object.entries(AI_TOOLS).map(([id, tool]) => ({
|
|
47
|
+
id,
|
|
48
|
+
name: tool.name,
|
|
49
|
+
description: tool.description,
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Generate config for a specific AI tool
|
|
55
|
+
*
|
|
56
|
+
* @param {string} toolId - Tool ID (e.g., 'claude-plugin')
|
|
57
|
+
* @param {string} targetDir - Target project directory
|
|
58
|
+
* @param {Object[]} skills - Array of skill objects
|
|
59
|
+
* @param {Object} options - Additional options passed to generator
|
|
60
|
+
*/
|
|
61
|
+
async function generateForTool(toolId, targetDir, skills, options = {}) {
|
|
62
|
+
const generator = AI_TOOLS[toolId];
|
|
63
|
+
if (generator && generator.generate) {
|
|
64
|
+
console.log(`Generating for ${generator.name}...`);
|
|
65
|
+
await generator.generate(targetDir, skills, options);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Preview what files would be generated (for dry-run mode)
|
|
71
|
+
*
|
|
72
|
+
* @param {string} targetDir - Target project directory
|
|
73
|
+
* @param {string[]} tools - Array of tool IDs to generate for
|
|
74
|
+
* @param {Object[]} skills - Array of skill objects
|
|
75
|
+
* @param {string} configFile - Name of config file
|
|
76
|
+
*/
|
|
77
|
+
function previewGeneration(targetDir, tools, skills, configFile) {
|
|
78
|
+
const path = require('path');
|
|
79
|
+
|
|
80
|
+
for (const tool of tools) {
|
|
81
|
+
const toolConfig = AI_TOOLS[tool];
|
|
82
|
+
if (!toolConfig) continue;
|
|
83
|
+
|
|
84
|
+
console.log(`${toolConfig.name}:`);
|
|
85
|
+
|
|
86
|
+
if (tool === 'claude-plugin') {
|
|
87
|
+
console.log(` \u{1F4C1} ${path.join(targetDir, '.claude-plugin')}/`);
|
|
88
|
+
console.log(' \u2514\u2500 plugin.json');
|
|
89
|
+
console.log(` \u{1F4C4} ${path.join(targetDir, '.mcp.json')}`);
|
|
90
|
+
console.log(` \u{1F4C1} ${path.join(targetDir, 'commands')}/`);
|
|
91
|
+
console.log(` \u{1F4C1} ${path.join(targetDir, 'skills')}/`);
|
|
92
|
+
}
|
|
93
|
+
console.log('');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
console.log('Config file:');
|
|
97
|
+
console.log(` \u{1F4C4} ${path.join(targetDir, configFile)}`);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
module.exports = {
|
|
101
|
+
// Registry
|
|
102
|
+
AI_TOOLS,
|
|
103
|
+
|
|
104
|
+
// Factory functions
|
|
105
|
+
getGenerator,
|
|
106
|
+
getAvailableTools,
|
|
107
|
+
getToolsInfo,
|
|
108
|
+
generateForTool,
|
|
109
|
+
previewGeneration,
|
|
110
|
+
|
|
111
|
+
// Individual generators
|
|
112
|
+
claudePlugin,
|
|
113
|
+
|
|
114
|
+
// Shared utilities
|
|
115
|
+
...shared,
|
|
116
|
+
};
|