@luquimbo/bi-superpowers 4.1.4 → 4.1.6

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.
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "AI-powered skills for Power BI Desktop development. Works with Claude Code, GitHub Copilot, Codex, Gemini CLI, and Kilo Code.",
9
- "version": "4.1.4",
9
+ "version": "4.1.6",
10
10
  "repository": "https://github.com/luquimbo/bi-superpowers"
11
11
  },
12
12
  "plugins": [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bi-superpowers",
3
3
  "description": "Claude Code plugin for Power BI, Microsoft Fabric, and semantic model workflows powered by the official Microsoft MCP servers.",
4
- "version": "4.1.4",
4
+ "version": "4.1.6",
5
5
  "author": {
6
6
  "name": "Lucas Sanchez"
7
7
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bi-superpowers",
3
- "version": "4.1.4",
3
+ "version": "4.1.6",
4
4
  "skillCount": 4,
5
5
  "skills": [
6
6
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "spec": "open-plugin-spec@1",
3
3
  "name": "bi-superpowers",
4
- "version": "4.1.4",
4
+ "version": "4.1.6",
5
5
  "description": "Claude Code plugin for Power BI, Microsoft Fabric, and semantic model workflows powered by the official Microsoft MCP servers.",
6
6
  "author": {
7
7
  "name": "Lucas Sanchez"
package/AGENTS.md CHANGED
@@ -12,41 +12,10 @@
12
12
 
13
13
  ## Project Entry Points
14
14
  - `AGENTS.md` (this file)
15
- - `library/`
15
+ - `src/content/`
16
+ - `bin/`
16
17
  - `config.json`
17
18
 
18
- ---
19
-
20
- ## QA Codex Shortcut
21
-
22
- When the user says `qa codex` in a new session for this repo, treat it as activating the external QA review workflow.
23
-
24
- Role split:
25
- - **Codex** — external QA / code reviewer
26
- - **Claude Code** — primary implementer
27
- - **Lucas** — bridge between both agents
28
-
29
- Default review protocol:
30
- 1. Read `coordination/ACTIVE_PLAN.md` first.
31
- 2. Read `coordination/TO_CODEX_REVIEW.md` second.
32
- 3. If `TO_CODEX_REVIEW.md` references an audit or follow-up review file, read that too.
33
- 4. Review commits or staged diffs with focus on:
34
- - functional bugs
35
- - regressions
36
- - reasonable missing tests
37
- - drift between `src/content/...` and generated artifacts
38
- - build/release risks
39
- - Windows + Power BI Desktop risks
40
- 5. Return prioritized findings first and a short summary second.
41
-
42
- Working rules:
43
- - Codex is a second opinion, not the implementation owner and not a release gate.
44
- - Do not assume you saw the whole previous session; rely on the coordination `.md` files.
45
- - If the user asks for a prompt for Claude, provide a copy-paste-ready prompt that explicitly references the coordination files above.
46
- - This shortcut is a repo convention for future sessions, not implicit model memory.
47
-
48
- ---
49
-
50
19
  ## Publishing to npm (for AI agents)
51
20
 
52
21
  When the user asks for things like **"publica una nueva versión"**, **"publish a patch"**, **"sube esto a npm"**, **"release v1.2.0"**, follow this flow.
@@ -72,14 +41,18 @@ The repo uses **GitHub Actions** to publish automatically. The `NPM_TOKEN` is st
72
41
  ```
73
42
  5. **Run the local validations** (these also run in CI, but fail fast locally):
74
43
  ```bash
44
+ npm test
75
45
  npm run build:plugin
76
46
  npm run lint
77
47
  npm run format:check
48
+ npm audit --omit=dev --audit-level=moderate
49
+ node bin/cli.js scan --verbose
50
+ npm pack --dry-run --ignore-scripts
78
51
  ```
79
52
  6. **Commit with conventional commit message:**
80
53
  ```bash
81
- git add package.json package-lock.json [+ any regenerated files]
82
- git commit -m "chore: bump version to X.Y.Z"
54
+ git add package.json package-lock.json [+ source, docs, tests, regenerated files]
55
+ git commit -m "fix: describe the release change"
83
56
  ```
84
57
  7. **Create the version tag:**
85
58
  ```bash
@@ -143,7 +116,7 @@ Agent-specific behavior:
143
116
  ### Claude Desktop
144
117
 
145
118
  ```bash
146
- super build-desktop
119
+ super build-desktop --output dist
147
120
  # Double-click bi-superpowers.mcpb para instalar en Claude Desktop
148
121
  ```
149
122
 
@@ -197,6 +170,8 @@ Los 4 skills quedan disponibles como MCP prompts.
197
170
 
198
171
  BI Agent Superpowers installs skills and MCP configuration at the user level for all supported agents. It can also generate a native Claude Code plugin from the same source of truth when a user explicitly wants repo-local Claude Code plugin files.
199
172
 
173
+ `super mcp-setup` is local-plugin maintenance only. It must run inside a repo already initialized by `super kickoff` (detected by `.bi-superpowers.json` or `.claude-plugin/plugin.json`). Do not use it for Codex, GitHub Copilot, Gemini CLI, Kilo Code, or normal Claude Code user-level setup; use `super install --all --yes` instead.
174
+
200
175
  ### Output Targets
201
176
 
202
177
  | Target | Format | Output |
@@ -213,8 +188,7 @@ project/
213
188
  ├── .mcp.json # Power BI Modeling + Microsoft Learn MCPs
214
189
  ├── commands/*.md # 4 slash commands (bi-start, pbi-connect, project-kickoff, report-design)
215
190
  ├── skills/*/SKILL.md # 4 skills (discoverable)
216
- ├── config.json # User preferences
217
- └── library/ → symlink # Snippets, templates, themes
191
+ └── config.json # User preferences
218
192
  ```
219
193
 
220
194
  ### Desktop Extension (generated by build-desktop)
@@ -227,51 +201,15 @@ desktop-extension/
227
201
  └── skills/ # Bundled at build time
228
202
  ```
229
203
 
230
- Run `bi-superpowers recharge` after modifying skills to regenerate the plugin.
231
-
232
- ---
233
-
234
- ## Library Resources
235
-
236
- The `library/` folder contains reusable assets:
237
-
238
- ```
239
- library/
240
- ├── snippets/ # Code patterns
241
- │ ├── dax/ # Time intelligence, rankings, CALCULATE
242
- │ ├── power-query/ # Transformations, error handling
243
- │ ├── excel-formulas/ # Dynamic arrays, lookups
244
- │ ├── report-design/ # Chart selection, accessibility, layouts
245
- │ └── governance/ # Naming conventions, review checklists
246
- ├── templates/ # Project templates
247
- │ ├── power-bi/
248
- │ ├── excel/
249
- │ └── data-models/
250
- ├── themes/ # Visual themes
251
- │ └── power-bi/ # JSON theme files
252
- └── examples/ # Reference implementations
253
- ├── finance-reporting/
254
- ├── hr-analytics/
255
- ├── retail-analytics/
256
- ├── supply-chain/
257
- └── marketing-analytics/
258
- ```
259
-
260
- Reference patterns in prompts:
261
- ```
262
- "Using patterns from library/snippets/dax/time-intelligence.md,
263
- create a rolling 12-month average measure"
264
- ```
265
-
266
- ---
204
+ Run `npm run build:plugin` after modifying source skills, or `super recharge` when refreshing an initialized local Claude Code plugin in a user project.
267
205
 
268
206
  ## Configuration
269
207
 
270
- Project-local user preferences live in `config.json`:
208
+ Optional project-local user preferences live in `config.json` when a local Claude Code plugin is initialized:
271
209
 
272
210
  - This file is meant to be read by your AI tool as **context** (experience level, language, domain terms).
273
- - `bi-superpowers kickoff` will create it automatically from the package template if it doesn't exist.
274
- - The CLI stores selected AI tools in `.bi-superpowers.json` (also project-local) so `bi-superpowers recharge` knows what to regenerate.
211
+ - `super kickoff` creates it automatically from the package template if it doesn't exist.
212
+ - The CLI stores local-plugin metadata in `.bi-superpowers.json` so `super recharge` and `super mcp-setup` can refresh the initialized plugin safely.
275
213
 
276
214
  ```json
277
215
  {
package/CHANGELOG.md CHANGED
@@ -5,6 +5,41 @@ All notable changes to BI Agent Superpowers will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [4.1.6] — 2026-04-24
9
+
10
+ ### Fixed
11
+
12
+ - `super mcp-setup` now rejects every repo-local target, including legacy
13
+ `--tool cursor`, `--tool vscode`, `--tool kilocode`, `--tool open-code`, and
14
+ `--tool claude-code`, unless the target repo already has a BI Superpowers
15
+ local plugin marker from `super kickoff`.
16
+ - `super mcp-setup` now refuses to overwrite corrupt existing JSON configs and
17
+ writes through the same atomic backup path used by the user-level MCP config
18
+ writer.
19
+ - `super install` copy-mode refreshes now mirror managed skill directories, so
20
+ runtime scripts and references removed in a newer package cannot remain
21
+ installed from an older package.
22
+ - `super build-desktop --output <path>` now honors the documented output path.
23
+
24
+ ### Changed
25
+
26
+ - README, AGENTS, CLAUDE, Getting Started, Architecture, Security, Contributing,
27
+ and Roadmap docs now consistently describe the user-level install contract and
28
+ the optional local Claude Code plugin path.
29
+
30
+ ## [4.1.5] — 2026-04-24
31
+
32
+ ### Fixed
33
+
34
+ - Removed the obsolete `coordination/` QA shortcut from `AGENTS.md`.
35
+ - `super mcp-setup --tool claude-plugin` no longer creates `.mcp.json` in an
36
+ arbitrary directory without an existing local plugin marker.
37
+ - User-level MCP config writes validate the final path, `.tmp`, and `.bak`
38
+ paths before writing, rejecting pre-existing symlinks.
39
+ - `super upgrade` now points users to the canonical
40
+ `super install --all --yes` refresh command.
41
+ - Kilo Code path documentation now consistently uses `~/.kilo/mcp_settings.json`.
42
+
8
43
  ## [4.1.4] — 2026-04-24
9
44
 
10
45
  ### Fixed
@@ -114,10 +149,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
114
149
  - **README rewrite**: dual install paths clearly segmented by audience
115
150
  (Claude Code users → marketplace, everyone else → npm + `super install`),
116
151
  mirrored update instructions, and OQ-1 resolution explained inline.
117
- - **Opus 4.7 1M code review report** at
118
- `coordination/CODE_REVIEW_OPUS_2026-04-21.md` 3 blockers + 5 high +
119
- 8 medium + 7 low findings across the whole repo (all resolved in this
120
- release, except 4 mediums/3 lows explicitly deferred as product calls).
152
+ - **Opus 4.7 1M code review pass** — 3 blockers + 5 high + 8 medium +
153
+ 7 low findings across the whole repo (all resolved in this release,
154
+ except 4 mediums/3 lows explicitly deferred as product calls).
121
155
 
122
156
  ### Changed
123
157
 
@@ -200,7 +234,7 @@ changes required. Recommended sequence:
200
234
 
201
235
  # Users on npm:
202
236
  super upgrade
203
- super install --yes # propagate the new skills to all agents
237
+ super install --all --yes # propagate the new skills to all agents
204
238
  ```
205
239
 
206
240
  Session-opener users: when you previously said "empezar" / "arranco" /
@@ -388,7 +422,7 @@ The plugin has been simplified to its core: **Power BI Desktop local development
388
422
  - GitHub Copilot → `~/.copilot/mcp-config.json` (`servers` JSON)
389
423
  - Codex → `~/.codex/config.toml` (TOML `[mcp_servers.*]`)
390
424
  - Gemini CLI → `~/.gemini/settings.json` (`mcpServers` with `httpUrl`)
391
- - Kilo Code → `~/.kilocode/mcp_settings.json` (`mcpServers` JSON)
425
+ - Kilo Code → `~/.kilo/mcp_settings.json` (`mcpServers` JSON)
392
426
 
393
427
  New module: `bin/lib/mcp-config.js` with per-agent writers and tests.
394
428
 
package/README.md CHANGED
@@ -394,11 +394,14 @@ super recharge # Regenerate optional local Claude Code plugin artifacts
394
394
  super powers # List available skills
395
395
  super scan # Compare source skills with generated artifacts
396
396
  super checkup # Validate skill content
397
- super build-desktop # Build the Claude Desktop .mcpb extension
397
+ super build-desktop # Build the Claude Desktop .mcpb extension in the current dir
398
+ super build-desktop --output dist
398
399
  super upgrade # Update the global CLI and print refresh steps
399
400
  super help # Show full CLI help
400
401
  ```
401
402
 
403
+ `super mcp-setup` is intentionally not part of normal setup. It only refreshes MCP config inside an existing local Claude Code plugin created by `super kickoff`; it refuses to write repo-local config in arbitrary projects. For Codex, GitHub Copilot, Gemini CLI, Kilo Code, and normal Claude Code user-level installs, use `super install --all --yes`.
404
+
402
405
  ---
403
406
 
404
407
  ## Plugin File Tree
@@ -539,6 +542,8 @@ super recharge
539
542
 
540
543
  `super upgrade` intentionally does not run `super install` or `super recharge` automatically. User-profile installs and project-local plugins are separate refresh targets.
541
544
 
545
+ On Windows, if symlink creation is not available and the installer falls back to copying skills, each re-run mirrors the managed skill directories. Removed or renamed bundled scripts are deleted from the copied install during refresh.
546
+
542
547
  ---
543
548
 
544
549
  ## What Ships To npm
@@ -567,7 +572,6 @@ The npm package does not include:
567
572
 
568
573
  ```text
569
574
  examples/smoke-test/
570
- coordination/
571
575
  node_modules/
572
576
  *.test.js
573
577
  ```
package/bin/cli.js CHANGED
@@ -185,6 +185,7 @@ Examples:
185
185
  super kickoff --dry-run # Preview local Claude Code plugin files
186
186
  super recharge # Regenerate existing local Claude Code plugin
187
187
  super build-desktop # Build .mcpb for Claude Desktop
188
+ super build-desktop --output dist
188
189
  super mcp-setup # Existing local Claude Code plugin only
189
190
 
190
191
  Open source — MIT licensed.
@@ -428,15 +429,12 @@ function ensurePluginTool(tools = []) {
428
429
 
429
430
  /**
430
431
  * Build the options object passed into individual generators.
431
- * If the target directory has its own local `library/` folder, skills
432
- * will reference that; otherwise they reference the library bundled
433
- * inside the installed npm package.
432
+ * `library/` is no longer shipped by this package. Keep local project
433
+ * library references unchanged only when the target repo provides them.
434
434
  */
435
435
  function getGenerationOptions(targetDir) {
436
436
  const usePluginRootLauncher = path.resolve(targetDir) === PACKAGE_DIR;
437
- const libraryPrefix = fs.existsSync(path.join(targetDir, 'library'))
438
- ? 'library'
439
- : path.join(PACKAGE_DIR, 'library');
437
+ const libraryPrefix = fs.existsSync(path.join(targetDir, 'library')) ? 'library' : null;
440
438
 
441
439
  return {
442
440
  packageDir: PACKAGE_DIR,
@@ -581,9 +579,9 @@ function showCompletionMessage(targetDir, tools, skillCount) {
581
579
 
582
580
  To build the Desktop extension:
583
581
 
584
- super build-desktop
582
+ super build-desktop --output dist
585
583
 
586
- Then double-click bi-superpowers.mcpb to install.
584
+ Then double-click dist/bi-superpowers.mcpb to install.
587
585
 
588
586
  ────────────────────────────────────────────────────────────
589
587
 
@@ -657,7 +655,7 @@ function getUpgradeRefreshSteps() {
657
655
  },
658
656
  {
659
657
  label: 'Skills installed in your user profile (npm + super install):',
660
- command: 'super install --yes',
658
+ command: 'super install --all --yes',
661
659
  },
662
660
  {
663
661
  label:
@@ -100,14 +100,48 @@ function shouldSkipRuntimeFile(filePath) {
100
100
  );
101
101
  }
102
102
 
103
+ /**
104
+ * Parse build-desktop CLI arguments.
105
+ *
106
+ * @param {string[]} args - CLI arguments after `build-desktop`
107
+ * @returns {{outputDir: string}} Build options
108
+ */
109
+ function parseArgs(args) {
110
+ const options = {
111
+ outputDir: process.cwd(),
112
+ };
113
+
114
+ for (let index = 0; index < args.length; index++) {
115
+ const arg = args[index];
116
+
117
+ if (arg === '--output' || arg === '-o') {
118
+ const value = args[++index];
119
+ if (!value || value.startsWith('-')) {
120
+ throw new Error(`${arg} requires a path`);
121
+ }
122
+ options.outputDir = path.resolve(value);
123
+ }
124
+ }
125
+
126
+ return options;
127
+ }
128
+
103
129
  /**
104
130
  * Build the .mcpb extension for Claude Desktop.
105
131
  *
106
132
  * @param {string[]} args - CLI arguments
107
133
  * @param {Object} config - Command config from CLI
108
134
  */
109
- function buildDesktop(_args, _config) {
110
- const outputDir = process.cwd();
135
+ function buildDesktop(args, _config) {
136
+ let options;
137
+ try {
138
+ options = parseArgs(args || []);
139
+ } catch (err) {
140
+ console.error(`Error: ${err.message}`);
141
+ process.exit(1);
142
+ }
143
+ const outputDir = options.outputDir;
144
+ fs.mkdirSync(outputDir, { recursive: true });
111
145
 
112
146
  console.log(`
113
147
  BI Agent Superpowers — Build Desktop Extension
@@ -239,3 +273,4 @@ module.exports = buildDesktop;
239
273
  module.exports.bundleSkills = bundleSkills;
240
274
  module.exports.copyRuntimeTree = copyRuntimeTree;
241
275
  module.exports.shouldSkipRuntimeFile = shouldSkipRuntimeFile;
276
+ module.exports.parseArgs = parseArgs;
@@ -13,7 +13,8 @@
13
13
  * Everything is installed at the user level (~/) so it applies across
14
14
  * all projects without polluting any specific repo. Skills land in
15
15
  * ~/.agents/skills/ (universal path) and each agent's own skill dir is
16
- * symlinked to that universal copy. MCPs are written to each agent's
16
+ * symlinked to that universal copy when possible. Copy fallback mirrors
17
+ * managed skill directories on every run. MCPs are written to each agent's
17
18
  * expected config file in the format that agent requires (JSON for
18
19
  * most, TOML for Codex) — see `lib/mcp-config.js` for details.
19
20
  *
@@ -116,10 +117,31 @@ async function selectMultiple(rl, items, preselected = []) {
116
117
  * @param {string} destDir - Destination directory
117
118
  */
118
119
  function copySkillDir(srcDir, destDir) {
119
- if (!fs.existsSync(destDir)) {
120
- fs.mkdirSync(destDir, { recursive: true });
120
+ const resolvedSrc = path.resolve(srcDir);
121
+ const resolvedDest = path.resolve(destDir);
122
+ const destRoot = path.parse(resolvedDest).root;
123
+
124
+ if (
125
+ resolvedSrc === resolvedDest ||
126
+ resolvedSrc.startsWith(`${resolvedDest}${path.sep}`) ||
127
+ resolvedDest === destRoot
128
+ ) {
129
+ throw new Error(`Refusing to mirror skill directory into unsafe target: ${destDir}`);
121
130
  }
122
131
 
132
+ // Skill directories are package-managed. Remove the old managed copy first
133
+ // so upgrades cannot leave deleted scripts or references behind.
134
+ const existingDest = fs.lstatSync(destDir, { throwIfNoEntry: false });
135
+ if (existingDest) {
136
+ if (existingDest.isSymbolicLink()) {
137
+ fs.unlinkSync(destDir);
138
+ } else {
139
+ fs.rmSync(destDir, { recursive: true, force: true });
140
+ }
141
+ }
142
+
143
+ fs.mkdirSync(destDir, { recursive: true });
144
+
123
145
  const entries = fs.readdirSync(srcDir, { withFileTypes: true });
124
146
  for (const entry of entries) {
125
147
  const srcPath = path.join(srcDir, entry.name);
@@ -435,7 +457,7 @@ async function installCommand(args, config) {
435
457
  chalk.yellow(
436
458
  `\n ⚠ ${copyFallbacks} agente(s) usaron copia en vez de symlink ` +
437
459
  '(probable Windows sin permisos de admin).\n' +
438
- " Re-ejecutá 'super install' tras cada upgrade para refrescar los archivos."
460
+ " Re-ejecutá 'super install' tras cada upgrade; la copia se espeja y elimina runtimes viejos."
439
461
  )
440
462
  );
441
463
  }
@@ -2,7 +2,8 @@
2
2
  * MCP Setup Command
3
3
  * =================
4
4
  * Configures the official Microsoft MCP servers for an existing project-local
5
- * Claude Code plugin and legacy adapter formats.
5
+ * BI Superpowers plugin. Normal multi-agent setup is user-level via
6
+ * `super install --all --yes`; this command refuses arbitrary repo-local writes.
6
7
  *
7
8
  * Usage:
8
9
  * super mcp-setup
@@ -20,6 +21,7 @@ const {
20
21
  createMcpConfigForFormat,
21
22
  mergeMcpConfig,
22
23
  } = require('../lib/microsoft-mcp');
24
+ const { readJsonStrict, writeJson } = require('../lib/mcp-config');
23
25
 
24
26
  const MCP_CONFIGS = {
25
27
  'claude-plugin': {
@@ -110,21 +112,7 @@ function hasLocalPluginMarker(targetDir) {
110
112
  );
111
113
  }
112
114
 
113
- function readJson(filePath) {
114
- if (!fs.existsSync(filePath)) {
115
- return {};
116
- }
117
-
118
- try {
119
- return JSON.parse(fs.readFileSync(filePath, 'utf8'));
120
- } catch (error) {
121
- return {};
122
- }
123
- }
124
-
125
115
  function writeConfig(filePath, config, dryRun) {
126
- const directory = path.dirname(filePath);
127
-
128
116
  if (dryRun) {
129
117
  tui.info(`Would write: ${tui.formatPath(filePath)}`);
130
118
  tui.muted(JSON.stringify(config, null, 2).slice(0, 220) + '...');
@@ -132,11 +120,7 @@ function writeConfig(filePath, config, dryRun) {
132
120
  }
133
121
 
134
122
  try {
135
- if (!fs.existsSync(directory)) {
136
- fs.mkdirSync(directory, { recursive: true });
137
- }
138
-
139
- fs.writeFileSync(filePath, JSON.stringify(config, null, 2) + '\n');
123
+ writeJson(filePath, config);
140
124
  return true;
141
125
  } catch (error) {
142
126
  tui.error(`Failed to write ${filePath}: ${error.message}`);
@@ -168,8 +152,14 @@ function mcpSetupCommand(args, config) {
168
152
  );
169
153
  }
170
154
 
171
- if (!options.tool && !hasLocalPluginMarker(targetDir)) {
172
- tui.warning('mcp-setup is only for project-local Claude Code plugin configs.');
155
+ if (options.tool && !MCP_CONFIGS[options.tool]) {
156
+ tui.error(`Unknown tool: ${options.tool}`);
157
+ tui.info(`Available tools: ${Object.keys(MCP_CONFIGS).join(', ')}`);
158
+ process.exit(1);
159
+ }
160
+
161
+ if (!hasLocalPluginMarker(targetDir)) {
162
+ tui.warning('mcp-setup is only for existing project-local BI Superpowers plugin configs.');
173
163
  tui.info(
174
164
  'For Codex, GitHub Copilot, Gemini CLI, Kilo Code, and Claude Code user-level installs, run:'
175
165
  );
@@ -178,7 +168,7 @@ function mcpSetupCommand(args, config) {
178
168
  'That writes user-level skills and MCP config under your home directory without creating files in this repo.'
179
169
  );
180
170
  tui.info(
181
- 'If you intentionally need a local Claude Code plugin, run `super kickoff` first or pass `--tool claude-plugin`.'
171
+ 'If you intentionally need local Claude Code plugin files, run `super kickoff` first, then rerun `super mcp-setup` inside that initialized repo.'
182
172
  );
183
173
  process.exitCode = 2;
184
174
  return;
@@ -187,12 +177,6 @@ function mcpSetupCommand(args, config) {
187
177
  let configuredTools = loadConfiguredTools(targetDir);
188
178
 
189
179
  if (options.tool) {
190
- if (!MCP_CONFIGS[options.tool]) {
191
- tui.error(`Unknown tool: ${options.tool}`);
192
- tui.info(`Available tools: ${Object.keys(MCP_CONFIGS).join(', ')}`);
193
- process.exit(1);
194
- }
195
-
196
180
  configuredTools = [options.tool];
197
181
  }
198
182
 
@@ -225,13 +209,19 @@ function mcpSetupCommand(args, config) {
225
209
  configuredTools.forEach((tool) => {
226
210
  const toolConfig = MCP_CONFIGS[tool];
227
211
  const filePath = path.join(targetDir, toolConfig.configPath);
228
- const existingConfig = readJson(filePath);
229
- const generatedConfig = createMcpConfigForFormat(toolConfig.format, {
230
- packageDir: config.packageDir,
231
- launcherMode: getLauncherMode(targetDir, config.packageDir, tool),
232
- });
233
- const mergedConfig = mergeMcpConfig(existingConfig, generatedConfig, toolConfig.format);
234
- const ok = writeConfig(filePath, mergedConfig, options.dryRun);
212
+ let ok = false;
213
+
214
+ try {
215
+ const existingConfig = readJsonStrict(filePath) || {};
216
+ const generatedConfig = createMcpConfigForFormat(toolConfig.format, {
217
+ packageDir: config.packageDir,
218
+ launcherMode: getLauncherMode(targetDir, config.packageDir, tool),
219
+ });
220
+ const mergedConfig = mergeMcpConfig(existingConfig, generatedConfig, toolConfig.format);
221
+ ok = writeConfig(filePath, mergedConfig, options.dryRun);
222
+ } catch (error) {
223
+ tui.error(`Failed to prepare ${filePath}: ${error.message}`);
224
+ }
235
225
 
236
226
  if (ok) {
237
227
  results.success.push(toolConfig.name);
@@ -238,7 +238,7 @@ async function regenerateConfigs(targetDir, specificTool, cliModule) {
238
238
  } else {
239
239
  // Fallback: just report what would be done
240
240
  spinner.succeed(`Would regenerate configs for: ${tools.join(', ')}`);
241
- tui.muted('Note: Run "bi-superpowers recharge" manually to apply changes');
241
+ tui.muted('Note: Run "super recharge" manually to apply changes');
242
242
  }
243
243
  } catch (error) {
244
244
  spinner.fail(`Regeneration failed: ${error.message}`);
@@ -204,9 +204,9 @@ function getFormatFooter() {
204
204
 
205
205
  ## Resources
206
206
 
207
- - Library: \`library/snippets/\` - DAX, Power Query, Excel patterns
208
- - Themes: \`library/themes/power-bi/\` - JSON theme files
209
- - Examples: \`library/examples/\` - Reference implementations
207
+ - Skills: \`skills/*/SKILL.md\` - BI workflow instructions
208
+ - Report design references: \`skills/report-design/references/\` - PBIR layouts, themes, native visuals, and troubleshooting
209
+ - Runtime scripts: \`skills/report-design/scripts/\` - PBIR visual, theme, and validation helpers
210
210
 
211
211
  ---
212
212
 
@@ -15,7 +15,7 @@
15
15
  * | GitHub Copilot | ~/.copilot/mcp-config.json | JSON servers |
16
16
  * | Codex | ~/.codex/config.toml | TOML mcp_servers |
17
17
  * | Gemini CLI | ~/.gemini/settings.json | JSON mcpServers |
18
- * | Kilo Code | ~/.kilocode/mcp_settings.json | JSON mcpServers |
18
+ * | Kilo Code | ~/.kilo/mcp_settings.json | JSON mcpServers |
19
19
  *
20
20
  * The launcher path for the Power BI Modeling MCP is resolved to an
21
21
  * absolute path at install time so it works in agents that don't
@@ -121,10 +121,9 @@ function assertNotSymlink(filePath) {
121
121
  *
122
122
  * Known Windows gap: this uses `lstatSync().isSymbolicLink()`. NTFS
123
123
  * junctions are NOT classified as symlinks by Node, so a junction at
124
- * `~/.copilot` would pass this check. Documented as a residual risk
125
- * in `coordination/TO_CODEX_REVIEW.md`; addressing it needs
126
- * `fs.readlinkSync` with reparse-point inspection and is out of scope
127
- * for this commit.
124
+ * `~/.copilot` would pass this check. Addressing that needs
125
+ * `fs.readlinkSync` with reparse-point inspection and is tracked as
126
+ * a separate hardening task.
128
127
  *
129
128
  * @throws {Error} if any ancestor of filePath (up to home) is a symlink
130
129
  */
@@ -194,6 +193,11 @@ function assertPathSafeForWrite(filePath) {
194
193
  */
195
194
  function writeFileAtomic(filePath, content) {
196
195
  assertPathSafeForWrite(filePath);
196
+ const tmpPath = `${filePath}.tmp`;
197
+ const backupPath = `${filePath}.bak`;
198
+ assertPathSafeForWrite(tmpPath);
199
+ assertPathSafeForWrite(backupPath);
200
+
197
201
  const dir = path.dirname(filePath);
198
202
  if (!fs.existsSync(dir)) {
199
203
  fs.mkdirSync(dir, { recursive: true });
@@ -201,7 +205,7 @@ function writeFileAtomic(filePath, content) {
201
205
 
202
206
  if (fs.existsSync(filePath)) {
203
207
  try {
204
- fs.copyFileSync(filePath, `${filePath}.bak`);
208
+ fs.copyFileSync(filePath, backupPath);
205
209
  } catch (err) {
206
210
  throw new Error(
207
211
  `Could not back up ${filePath} before writing: ${err.message}. ` +
@@ -210,7 +214,6 @@ function writeFileAtomic(filePath, content) {
210
214
  }
211
215
  }
212
216
 
213
- const tmpPath = `${filePath}.tmp`;
214
217
  try {
215
218
  fs.writeFileSync(tmpPath, content);
216
219
  fs.renameSync(tmpPath, filePath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luquimbo/bi-superpowers",
3
- "version": "4.1.4",
3
+ "version": "4.1.6",
4
4
  "description": "Open-source Power BI Desktop toolkit for Claude Code, GitHub Copilot, Codex, Gemini CLI, and Kilo Code. Ships 4 skills and 2 official Microsoft MCP servers.",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: "bi-start"
3
3
  description: "Use when the user asks about BI Start Skill, especially phrases like \"bi-start\", \"bi start\", \"/bi-start\", \"empezar\", \"comenzar\", \"arranco\"."
4
- version: "4.1.4"
4
+ version: "4.1.6"
5
5
  ---
6
6
 
7
7
  <!-- Generated by BI Agent Superpowers. Edit src/content/skills/bi-start.md instead. -->
@@ -47,7 +47,7 @@ const HTTPS_TIMEOUT_MS = 5000;
47
47
  // Rewritten at generation time when this helper is copied into
48
48
  // `skills/<name>/scripts/update-check.js`. In the canonical source under
49
49
  // `bin/commands/`, it stays null and we fall back to package.json.
50
- const BUNDLED_INSTALLED_VERSION = "4.1.4";
50
+ const BUNDLED_INSTALLED_VERSION = "4.1.6";
51
51
 
52
52
  // ---------------------------------------------------------------------------
53
53
  // Argument parsing
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: "pbi-connect"
3
3
  description: "Use when the user asks about Power BI MCP Connection Skill, especially phrases like \"connect Power BI\", \"PBI connection\", \"MCP connection\", \"Power BI MCP\", \"modeling mcp\", \"Power BI Modeling MCP\"."
4
- version: "4.1.4"
4
+ version: "4.1.6"
5
5
  ---
6
6
 
7
7
  <!-- Generated by BI Agent Superpowers. Edit src/content/skills/pbi-connect.md instead. -->
@@ -47,7 +47,7 @@ const HTTPS_TIMEOUT_MS = 5000;
47
47
  // Rewritten at generation time when this helper is copied into
48
48
  // `skills/<name>/scripts/update-check.js`. In the canonical source under
49
49
  // `bin/commands/`, it stays null and we fall back to package.json.
50
- const BUNDLED_INSTALLED_VERSION = "4.1.4";
50
+ const BUNDLED_INSTALLED_VERSION = "4.1.6";
51
51
 
52
52
  // ---------------------------------------------------------------------------
53
53
  // Argument parsing
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: "project-kickoff"
3
3
  description: "Use when the user asks about Project Kickoff Skill, especially phrases like \"I'm starting a brand-new BI project from scratch\", \"analizar proyecto\", \"analyze project\", \"project kickoff\", \"nuevo proyecto\", \"new project\"."
4
- version: "4.1.4"
4
+ version: "4.1.6"
5
5
  ---
6
6
 
7
7
  <!-- Generated by BI Agent Superpowers. Edit src/content/skills/project-kickoff.md instead. -->
@@ -47,7 +47,7 @@ const HTTPS_TIMEOUT_MS = 5000;
47
47
  // Rewritten at generation time when this helper is copied into
48
48
  // `skills/<name>/scripts/update-check.js`. In the canonical source under
49
49
  // `bin/commands/`, it stays null and we fall back to package.json.
50
- const BUNDLED_INSTALLED_VERSION = "4.1.4";
50
+ const BUNDLED_INSTALLED_VERSION = "4.1.6";
51
51
 
52
52
  // ---------------------------------------------------------------------------
53
53
  // Argument parsing
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: "report-design"
3
3
  description: "Use when the user asks about Report Design Skill, especially phrases like \"crear reportes\", \"armar el reporte\", \"diseñar reporte\", \"report design\", \"create reports\", \"build dashboard\"."
4
- version: "4.1.4"
4
+ version: "4.1.6"
5
5
  ---
6
6
 
7
7
  <!-- Generated by BI Agent Superpowers. Edit src/content/skills/report-design.md instead. -->
@@ -47,7 +47,7 @@ const HTTPS_TIMEOUT_MS = 5000;
47
47
  // Rewritten at generation time when this helper is copied into
48
48
  // `skills/<name>/scripts/update-check.js`. In the canonical source under
49
49
  // `bin/commands/`, it stays null and we fall back to package.json.
50
- const BUNDLED_INSTALLED_VERSION = "4.1.4";
50
+ const BUNDLED_INSTALLED_VERSION = "4.1.6";
51
51
 
52
52
  // ---------------------------------------------------------------------------
53
53
  // Argument parsing
@@ -34,7 +34,7 @@ You are a **Business Intelligence Expert** with deep knowledge of:
34
34
  2. **Show examples** - Include code samples when relevant
35
35
  3. **Explain context** - Why something works, not just how
36
36
  4. **Suggest improvements** - Proactively identify optimizations
37
- 5. **Reference patterns** - Point to relevant snippets in `library/`
37
+ 5. **Verify against shipped resources** - Use bundled skill references and scripts when available; do not invent paths that are not present in the repo
38
38
 
39
39
  ---
40
40
 
@@ -59,13 +59,14 @@ You are a **Business Intelligence Expert** with deep knowledge of:
59
59
 
60
60
  ---
61
61
 
62
- ## Available Skills (3)
62
+ ## Available Skills (4)
63
63
 
64
64
  | Skill | Purpose | Trigger |
65
65
  |-------|---------|---------|
66
- | `/project-kickoff` | Analyze a BI project, build the semantic model, and write AGENTS.md | "analyze project", "get started", "kickoff" |
66
+ | `/bi-start` | Open a BI session with update check, environment snapshot, and routing guidance | "bi-start", "start session", "empezar" |
67
+ | `/project-kickoff` | Analyze and plan a BI project before implementation | "analyze project", "new project", "kickoff" |
67
68
  | `/pbi-connect` | Connect to Power BI Desktop via the official Modeling MCP | "connect Power BI", "MCP" |
68
- | `/report-design` | Generate 3-page PBIR report via `pbi-cli-tool` (cards, charts, matrix, slicers) | "crear reportes", "report design", "dashboard" |
69
+ | `/report-design` | Generate PBIR report pages via bundled Node scripts and the current `pbi-cli-tool` runtime flow | "crear reportes", "report design", "dashboard" |
69
70
 
70
71
  ---
71
72
 
@@ -60,13 +60,14 @@ Match user message against skill triggers:
60
60
 
61
61
  | Keywords | Skill |
62
62
  |----------|-------|
63
- | "kickoff", "analyze project", "analizar proyecto", "empezar", "qué tengo aquí?" | `/project-kickoff` |
63
+ | "bi-start", "start session", "empezar", "what can you do here?" | `/bi-start` |
64
+ | "kickoff", "analyze project", "analizar proyecto", "qué tengo aquí?" | `/project-kickoff` |
64
65
  | "connect Power BI", "MCP connection", "Power BI Desktop", "conectar Power BI", "modeling mcp" | `/pbi-connect` |
65
66
  | "crear reportes", "armar reporte", "report design", "dashboard", "páginas del reporte", "visualizaciones" | `/report-design` |
66
67
 
67
68
  ### 5. DEFAULT BEHAVIOR
68
69
 
69
- No skill activated → respond as general BI assistant using AGENTS.md context, referencing `library/` snippets when available in the user's project.
70
+ No skill activated → respond as a general BI assistant using AGENTS.md context and the installed BI Superpowers skills. Do not reference `library/` snippets unless the user's project actually contains that folder.
70
71
 
71
72
  ---
72
73