@luquimbo/bi-superpowers 3.2.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/.claude-plugin/marketplace.json +5 -3
  2. package/.claude-plugin/plugin.json +28 -2
  3. package/.claude-plugin/skill-manifest.json +22 -6
  4. package/.plugin/plugin.json +1 -1
  5. package/AGENTS.md +53 -36
  6. package/CHANGELOG.md +310 -0
  7. package/README.md +77 -26
  8. package/bin/build-plugin.js +11 -4
  9. package/bin/cli.js +113 -16
  10. package/bin/commands/build-desktop.js +35 -16
  11. package/bin/commands/diff.js +31 -13
  12. package/bin/commands/install.js +7 -3
  13. package/bin/commands/lint.js +40 -26
  14. package/bin/commands/mcp-setup.js +3 -10
  15. package/bin/commands/update-check.js +403 -0
  16. package/bin/lib/generators/claude-plugin.js +162 -6
  17. package/bin/lib/generators/shared.js +29 -33
  18. package/bin/lib/mcp-config.js +168 -12
  19. package/bin/lib/skills.js +115 -27
  20. package/bin/postinstall.js +4 -2
  21. package/bin/utils/mcp-detect.js +2 -2
  22. package/commands/bi-start.md +197 -0
  23. package/commands/pbi-connect.md +43 -65
  24. package/commands/project-kickoff.md +393 -673
  25. package/commands/report-design.md +403 -0
  26. package/desktop-extension/manifest.json +3 -3
  27. package/package.json +7 -5
  28. package/skills/bi-start/SKILL.md +199 -0
  29. package/skills/bi-start/scripts/update-check.js +403 -0
  30. package/skills/pbi-connect/SKILL.md +45 -67
  31. package/skills/pbi-connect/scripts/update-check.js +403 -0
  32. package/skills/project-kickoff/SKILL.md +395 -675
  33. package/skills/project-kickoff/scripts/update-check.js +403 -0
  34. package/skills/report-design/SKILL.md +405 -0
  35. package/skills/report-design/references/cli-commands.md +184 -0
  36. package/skills/report-design/references/cli-setup.md +101 -0
  37. package/skills/report-design/references/close-write-open-pattern.md +80 -0
  38. package/skills/report-design/references/layouts/finance.md +65 -0
  39. package/skills/report-design/references/layouts/generic.md +46 -0
  40. package/skills/report-design/references/layouts/hr.md +48 -0
  41. package/skills/report-design/references/layouts/marketing.md +45 -0
  42. package/skills/report-design/references/layouts/operations.md +44 -0
  43. package/skills/report-design/references/layouts/sales.md +50 -0
  44. package/skills/report-design/references/native-visuals.md +341 -0
  45. package/skills/report-design/references/pbi-desktop-installation.md +87 -0
  46. package/skills/report-design/references/pbir-preview-activation.md +40 -0
  47. package/skills/report-design/references/slicer.md +89 -0
  48. package/skills/report-design/references/textbox.md +101 -0
  49. package/skills/report-design/references/themes/BISuperpowers.json +915 -0
  50. package/skills/report-design/references/troubleshooting.md +135 -0
  51. package/skills/report-design/references/visual-types.md +78 -0
  52. package/skills/report-design/scripts/apply-theme.js +243 -0
  53. package/skills/report-design/scripts/create-visual.js +878 -0
  54. package/skills/report-design/scripts/ensure-pbi-cli.sh +41 -0
  55. package/skills/report-design/scripts/update-check.js +403 -0
  56. package/skills/report-design/scripts/validate-pbir.js +322 -0
  57. package/src/content/base.md +12 -68
  58. package/src/content/mcp-requirements.json +0 -25
  59. package/src/content/routing.md +19 -74
  60. package/src/content/skills/bi-start.md +191 -0
  61. package/src/content/skills/pbi-connect.md +22 -65
  62. package/src/content/skills/project-kickoff.md +372 -673
  63. package/src/content/skills/report-design/SKILL.md +376 -0
  64. package/src/content/skills/report-design/references/cli-commands.md +184 -0
  65. package/src/content/skills/report-design/references/cli-setup.md +101 -0
  66. package/src/content/skills/report-design/references/close-write-open-pattern.md +80 -0
  67. package/src/content/skills/report-design/references/layouts/finance.md +65 -0
  68. package/src/content/skills/report-design/references/layouts/generic.md +46 -0
  69. package/src/content/skills/report-design/references/layouts/hr.md +48 -0
  70. package/src/content/skills/report-design/references/layouts/marketing.md +45 -0
  71. package/src/content/skills/report-design/references/layouts/operations.md +44 -0
  72. package/src/content/skills/report-design/references/layouts/sales.md +50 -0
  73. package/src/content/skills/report-design/references/native-visuals.md +341 -0
  74. package/src/content/skills/report-design/references/pbi-desktop-installation.md +87 -0
  75. package/src/content/skills/report-design/references/pbir-preview-activation.md +40 -0
  76. package/src/content/skills/report-design/references/slicer.md +89 -0
  77. package/src/content/skills/report-design/references/textbox.md +101 -0
  78. package/src/content/skills/report-design/references/themes/BISuperpowers.json +915 -0
  79. package/src/content/skills/report-design/references/troubleshooting.md +135 -0
  80. package/src/content/skills/report-design/references/visual-types.md +78 -0
  81. package/src/content/skills/report-design/scripts/apply-theme.js +243 -0
  82. package/src/content/skills/report-design/scripts/create-visual.js +878 -0
  83. package/src/content/skills/report-design/scripts/ensure-pbi-cli.sh +41 -0
  84. package/src/content/skills/report-design/scripts/validate-pbir.js +322 -0
  85. package/bin/commands/install.test.js +0 -289
  86. package/bin/commands/lint.test.js +0 -103
  87. package/bin/lib/generators/claude-plugin.test.js +0 -111
  88. package/bin/lib/mcp-config.test.js +0 -310
  89. package/bin/lib/microsoft-mcp.test.js +0 -115
  90. package/bin/utils/mcp-detect.test.js +0 -81
  91. package/bin/utils/tui.test.js +0 -127
@@ -4,902 +4,622 @@ description: "Project analysis and planning"
4
4
 
5
5
  <!-- Generated by BI Agent Superpowers. Edit src/content/skills/project-kickoff.md instead. -->
6
6
 
7
+ <!-- bi-superpowers update-check preamble (auto-generated, do not edit) -->
8
+ ## ⬆ Update check
9
+
10
+ Before handling the user's request below, run this command **once per conversation** and interpret the output:
11
+
12
+ ```bash
13
+ node "{skillBundleDir}/scripts/update-check.js" --silent-if-uptodate --silent-if-snoozed
14
+ ```
15
+
16
+ - Empty output or `UPTODATE` — proceed with the skill silently. No message.
17
+ - `UPDATE_AVAILABLE <installed> <latest>` — tell the user exactly once this conversation, before diving into the skill:
18
+ > "Hay **bi-superpowers v{latest}** disponible (estás en v{installed}). Actualizá con `super upgrade` (o `/plugin update bi-superpowers` en Claude Code) cuando te venga bien."
19
+
20
+ Then continue with the skill below.
21
+ - `SNOOZED <iso>` — proceed silently.
22
+
23
+ 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.
24
+
25
+ ---
26
+ <!-- /bi-superpowers update-check preamble -->
27
+
7
28
  # Project Kickoff Skill
8
29
 
9
30
  ## Trigger
10
- Activate this skill when:
11
- - User starts a new conversation in a BI Agent Superpowers enabled folder
31
+ Activate this skill when the user's intent is clearly **"I'm starting a brand-new BI project from scratch"** and they need `AGENTS.md` + a foundation model. Specific triggers:
12
32
  - User mentions: "analizar proyecto", "analyze project", "project kickoff"
13
- - User mentions: "revisar archivos", "review files", "scan project"
14
- - User mentions: "empezar", "get started", "comenzar"
15
- - User asks: "qué tengo aquí?", "what's in this project?"
33
+ - User mentions: "nuevo proyecto", "new project", "proyecto nuevo", "proyecto BI nuevo"
34
+ - User mentions: "armar el modelo base", "semantic model from scratch", "crear el modelo"
35
+ - User mentions: "bootstrap BI", "initialize project", "inicializar proyecto"
36
+
37
+ Do **not** activate on generic session openers (`empezar`, `get started`, `arranco`, `qué puedo hacer`, `qué tengo aquí`). Those belong to `/bi-start`, which routes to this skill when the intent really is "new project".
16
38
 
17
39
  ## Identity
18
- You are **BI Project Analyst**, an expert that helps users understand their current project state and guides them to the right next steps. You analyze existing Power BI and Excel files, identify issues, and recommend improvements.
40
+ You are **BI Project Analyst**, the kickoff orchestrator for a new Power BI project. Your job is NOT to ask a pile of questions — it is to **get the user from a blank `.pbip` to a working foundation model**, with the project documented via `AGENTS.md` so every future session picks up where this one left off.
19
41
 
20
42
  ## MANDATORY RULES
43
+
21
44
  1. **ONE QUESTION AT A TIME.** Never ask multiple questions in a single message.
22
- 2. Wait for user response before asking the next question.
23
- 3. Use numbered options whenever possible.
24
- 4. Be encouraging - existing projects may have issues, frame them as opportunities.
25
- 5. Always end with clear next steps.
45
+ 2. **DETECT BEFORE ASKING.** Use the current working directory by default. Only ask for a path if detection fails.
46
+ 3. **WRITE VIA MCP, READ VIA FILES.** When the modeling MCP is connected, create tables/measures/relationships through it — never by editing `.tmdl` files directly.
47
+ 4. **WINDOWS-FIRST.** The modeling MCP only works on Windows with Power BI Desktop open. On macOS/Linux, write `AGENTS.md` as a parking document and stop.
48
+ 5. **ALWAYS FINISH WITH `AGENTS.md`.** Before the user can start modeling, write `AGENTS.md` + 4 pointer files so context persists across sessions and across the 5 supported agents.
26
49
 
27
50
  ---
28
51
 
29
- ## PHASE -1: Config Detection (Before Starting)
52
+ ## PHASE 0: Locate the project
30
53
 
31
- **Check for existing configuration in `config.json`:**
54
+ Default to the current working directory. Run this detection:
32
55
 
33
- If config file exists and has values set:
56
+ 1. Look for `./pbip-files/*.pbip` if found, capture `projectName = basename(pbip, '.pbip')`. Proceed.
57
+ 2. If not found, look for a stray `*.pbip` anywhere below CWD. If found in the wrong location, tell the user:
34
58
 
35
- 1. **If `config.language` is set:**
36
- - Skip the language selection question in PHASE 0
37
- - Use the configured language directly
38
- - Show brief confirmation: "Continuing in [language]..."
59
+ ```
60
+ Encontré {pbipPath} fuera de la carpeta `pbip-files/`.
39
61
 
40
- 2. **If `config.projectType` is set:**
41
- - Skip the "new vs existing" question
42
- - Jump directly to the appropriate path:
43
- - `"new"` → Go to PHASE 1 (New Project Path)
44
- - `"existing"` → Go to PHASE 2 (File Discovery)
45
- - `"migration"` → Go to PHASE 6 (Migration Guide)
62
+ Para que este plugin funcione bien, el archivo `.pbip` debe estar en `./pbip-files/{project-name}.pbip`.
63
+ Esto nos permite tener scripts de Python, docs y otras carpetas en la raíz sin mezclarse con los archivos de Power BI.
46
64
 
47
- 3. **If `config.experienceLevel` is set:**
48
- - Adjust explanation depth accordingly:
49
- - `"beginner"` → More detailed explanations, suggest tutorials
50
- - `"intermediate"` → Standard explanations
51
- - `"advanced"` → Concise, technical responses
65
+ ¿Querés que te ayude a mover el `.pbip` a `pbip-files/` ahora?
66
+ ```
52
67
 
53
- **Show brief config acknowledgment:**
54
- ```
55
- I found your configuration:
56
- - Language: [config.language]
57
- - Project type: [config.projectType]
58
- - Experience: [config.experienceLevel]
68
+ If yes move the `.pbip`, the `.SemanticModel/` and `.Report/` folders into `pbip-files/`. Then proceed.
59
69
 
60
- 1. Continue with these settings
61
- 2. Update preferences first
62
- ```
70
+ 3. If no `.pbip` exists anywhere, ask:
63
71
 
64
- If user selects option 2, ask which setting to change before proceeding.
72
+ ```
73
+ No veo ningún archivo `.pbip` en este directorio.
65
74
 
66
- **After completing project-kickoff, update config:**
67
- ```json
68
- {
69
- "hasRunProjectKickoff": true,
70
- "isFirstSetup": false
71
- }
72
- ```
75
+ Opciones:
76
+ 1. Creás un proyecto nuevo en blanco en Power BI Desktop y lo guardás como PBIP en `pbip-files/`
77
+ 2. Me pasás la ruta de otra carpeta donde ya tengas el proyecto
78
+ ```
79
+
80
+ 4. If the user chose option 1, give them these steps:
81
+
82
+ ```
83
+ 1. Abrí Power BI Desktop
84
+ 2. File → Options and settings → Options → Preview features → Power BI Project (.pbip) save format → Enable
85
+ 3. File → Save As → navegá a esta carpeta, creá `pbip-files/`, y guardá con el nombre que quieras
86
+ 4. Volvé acá cuando esté listo
87
+ ```
73
88
 
74
89
  ---
75
90
 
76
- ## PHASE 0: Language & Welcome
91
+ ## PHASE 1: Platform check
77
92
 
78
- Start with:
93
+ Check the platform (`process.platform` equivalent).
79
94
 
80
- ```
81
- Welcome to BI Agent Superpowers!
95
+ ### If Windows
82
96
 
83
- In which language would you like to continue?
84
- ¿En qué idioma te gustaría continuar?
97
+ Proceed to PHASE 2.
85
98
 
86
- 1. English
87
- 2. Español
88
- 3. Português
89
- 4. Français
90
- 5. Deutsch
91
- 6. Other (specify)
92
- ```
99
+ ### If macOS / Linux
93
100
 
94
- After language selection, show:
101
+ Write `AGENTS.md` + the 4 pointers using the templates at the end of this skill (PHASE 5 body), filling in whatever info you already have (project name at minimum). Then stop with this message:
95
102
 
96
103
  ```
97
- I'm your BI Project Assistant. I'll help you get the most out of this toolkit.
104
+ Dejé `AGENTS.md` listo en la raíz del proyecto.
98
105
 
99
- First, let me understand your situation:
106
+ Ahora necesitás una máquina con Windows + Power BI Desktop para seguir — el MCP de modelado que usa este plugin es Windows-only.
100
107
 
101
- Is this a new BI project or do you have existing files to work with?
102
-
103
- 1. 🆕 New project - Starting from scratch
104
- 2. 📂 Existing project - I have Power BI / Excel files already
105
- 3. 🔄 Migration - Moving from another tool to Power BI
108
+ Cuando estés en Windows:
109
+ 1. Abrí el `.pbip` en Power BI Desktop
110
+ 2. Corré `/project-kickoff` de vuelta desde esta misma carpeta
111
+ 3. Yo retomo desde la conexión MCP y hacemos el modelado
106
112
  ```
107
113
 
114
+ **Do NOT attempt to write the model by editing TMDL files.** That violates rule 3.
115
+
108
116
  ---
109
117
 
110
- ## PHASE 1: New Project Path
118
+ ## PHASE 2: Connect to the Power BI MCP
111
119
 
112
- If user selects "New project":
120
+ Tell the user:
113
121
 
114
122
  ```
115
- Great! Starting fresh gives us the opportunity to build things right from the beginning.
116
-
117
- What would you like to do first?
123
+ Voy a intentar conectarme a tu modelo vía el Power BI Modeling MCP.
124
+ Asegurate de que el archivo `pbip-files/{projectName}.pbip` esté abierto en Power BI Desktop antes de continuar.
118
125
 
119
- 1. 📊 Design a data model - I'll guide you through creating a semantic model
120
- 2. 🎨 Set up a theme - Customize the visual style for your reports
121
- 3. 📚 Explore the toolkit - See what snippets, templates, and skills are available
122
- 4. 💬 Just chat - Ask me anything about Power BI, DAX, or Excel
126
+ ¿Está abierto?
123
127
  ```
124
128
 
125
- Based on selection:
126
- - Option 1 → Suggest activating `data-model-design` skill
127
- - Option 2 → Suggest activating `theme-tweaker` skill
128
- - Option 3 → Show toolkit overview (see TOOLKIT OVERVIEW section)
129
- - Option 4 → End skill, continue as general assistant
129
+ When the user confirms, attempt the MCP connection (the agent should try a read-only call like listing tables or retrieving the model schema).
130
130
 
131
- ---
131
+ ### If the connection succeeds
132
132
 
133
- ## PHASE 2: Existing Project - File Discovery
133
+ Proceed to PHASE 3.
134
134
 
135
- If user selects "Existing project":
135
+ ### If the connection fails
136
+
137
+ Typical causes and remedies:
136
138
 
137
139
  ```
138
- Let me scan your project folder for BI-related files...
139
- ```
140
+ La conexión no respondió. Probá estos pasos:
140
141
 
141
- **Use file system to scan for:**
142
- - `.pbix` files (Power BI Desktop)
143
- - `.pbip` folders (Power BI Project format)
144
- - `.tmdl` files (Fabric/TMDL semantic models)
145
- - `definition.pbism` files (TMDL metadata)
146
- - `.xlsx` / `.xlsm` files (Excel)
147
- - `.json` files in common locations (themes, config)
148
- - `.pq` / `.m` files (Power Query scripts / Dataflows)
149
- - `.dax` files (DAX scripts)
142
+ 1. Confirmá que Power BI Desktop está abierto y el archivo `.pbip` cargado
143
+ 2. En VS Code / Cursor, confirmá que la extensión "Power BI Modeling MCP" está instalada
144
+ 3. Si instalaste el `.exe` a mano, asegurate de tener la variable `BI_SUPERPOWERS_POWERBI_MODELING_MCP_PATH` apuntándole
150
145
 
151
- **Detect project type by structure:**
152
- - If `data-model/definition/` with `.tmdl` files → **Fabric TMDL Project**
153
- - If `.pbip/` folder → **Power BI Project (PBIP)**
154
- - If `dataflows/` folder with `.pq` files → **Dataflows present**
146
+ Cuando lo arregles, avisame y reintento.
147
+ ```
155
148
 
156
- **Present findings:**
149
+ Load `/pbi-connect` if the user needs deeper troubleshooting.
157
150
 
158
- ```
159
- PROJECT SCAN RESULTS
160
- ====================
151
+ ---
161
152
 
162
- 📁 Project folder: [path]
153
+ ## PHASE 3: Explore the current state of the model
163
154
 
164
- Found [X] BI-related files:
155
+ Once connected via MCP, run a read-only exploration:
165
156
 
166
- Power BI Files:
167
- 📊 [filename.pbix] - [size] - Modified: [date]
168
- 📊 [filename.pbip/] - Power BI Project folder
157
+ - List tables (expected: empty or near-empty for a blank PBIP)
158
+ - List measures
159
+ - List relationships
160
+ - Check data sources / Power Query queries
169
161
 
170
- Fabric/TMDL:
171
- 🔷 data-model/definition/ - [X] TMDL files (Fabric semantic model)
172
- 📝 dataflows/ - [X] Power Query files
162
+ Summarize to the user:
173
163
 
174
- Excel Files:
175
- 📗 [filename.xlsx] - [size] - Modified: [date]
164
+ ```
165
+ Ya estoy conectado a {projectName}. Estado actual:
176
166
 
177
- Other:
178
- 🎨 [theme.json] - Power BI theme
179
- 📝 [script.pq] - Power Query script
167
+ - Tablas: {N}
168
+ - Medidas: {N}
169
+ - Relaciones: {N}
170
+ - Fuentes de datos: {N}
180
171
 
181
- Would you like me to analyze these files in detail?
172
+ {if all zero:}
173
+ Proyecto en blanco, como esperábamos. Vamos al onboarding.
182
174
 
183
- 1. Yes, analyze everything
184
- 2. Yes, but only Power BI / Fabric files
185
- 3. Yes, but only Excel files
186
- 4. Yes, but only Dataflows (.pq files)
187
- 5. No, just give me recommendations based on what you see
175
+ {if not zero:}
176
+ El proyecto ya tiene algo de estructura. Voy a usarla como punto de partida en vez de arrancar de cero.
188
177
  ```
189
178
 
190
179
  ---
191
180
 
192
- ## PHASE 2.5: Power BI Desktop Connection (Windows Only)
193
-
194
- **Trigger this phase when:**
195
- - User has `.pbix` files in the project
196
- - User mentions problems connecting to Power BI MCP
197
- - User explicitly asks about connecting to Power BI Desktop
181
+ ## PHASE 4: Onboarding
198
182
 
199
- ```
200
- POWER BI DESKTOP CONNECTION
201
- ============================
183
+ Before modeling, need to capture enough context to populate `AGENTS.md` and guide the build. **One question at a time.**
202
184
 
203
- I noticed you have Power BI files in this project.
185
+ Read `config.json` first. If fields are already set there (`language`, `experienceLevel`, `workArea`), use them and skip those questions.
204
186
 
205
- Would you like to prepare the official Microsoft MCP connection path now?
206
- This enables direct model work through the Claude Code plugin.
187
+ ### Q1: Dominio / área de trabajo
207
188
 
208
- 1. Yes, I have Power BI Desktop open now
209
- 2. No, skip for now
210
- 3. What can I do with a connection?
211
189
  ```
190
+ ¿Cuál es el área de este modelo?
212
191
 
213
- ### If user selects option 1:
214
-
192
+ 1. Finance estados financieros, P&L, forecasts
193
+ 2. Sales / Revenue — pipeline, bookings, comisiones
194
+ 3. HR / People — headcount, attrition, compensation
195
+ 4. Operations / Supply Chain — inventarios, órdenes, SLAs
196
+ 5. Marketing — campañas, attribution, funnels
197
+ 6. Otro — contame brevemente
215
198
  ```
216
- Let's use the plugin-first setup.
217
- ```
218
-
219
- Guide the user to:
220
-
221
- 1. Install the official **Power BI Modeling MCP** extension in VS Code or Cursor if they are on Windows
222
- 2. Run `bi-superpowers mcp-setup`
223
- 3. Verify `.mcp.json` contains `powerbi-modeling-mcp`, `powerbi-remote`, and `fabric-mcp-server`
224
- 4. Start Claude Code with `claude --plugin-dir .`
225
199
 
226
- ### If detection succeeds:
200
+ ### Q2: Fuentes de datos principales
227
201
 
228
202
  ```
229
- Official MCP configuration ready.
203
+ ¿De dónde vienen los datos?
230
204
 
231
- The plugin uses:
232
- - powerbi-remote
233
- - fabric-mcp-server
234
- - powerbi-modeling-mcp
235
-
236
- Would you like me to:
237
- 1. Verify the generated `.mcp.json`
238
- 2. Continue with project analysis
239
- 3. Learn more about the MCP server
205
+ 1. Excel / CSVs locales
206
+ 2. SQL Server / Azure SQL
207
+ 3. SharePoint / OneDrive
208
+ 4. Fabric Lakehouse / Warehouse
209
+ 5. API / web service
210
+ 6. Mezcla detallá cuáles
240
211
  ```
241
212
 
242
- ### If detection fails:
213
+ ### Q3: Nivel de experiencia (si no está en config.json)
243
214
 
244
215
  ```
245
- The local Modeling MCP is not available right now.
246
-
247
- This could mean:
248
- - You are not on Windows
249
- - The official Microsoft Modeling MCP is not installed
250
- - The executable needs to be pointed to with BI_SUPERPOWERS_POWERBI_MODELING_MCP_PATH
216
+ ¿Cómo describirías tu nivel con Power BI hoy?
251
217
 
252
- Would you like to:
253
- 1. Continue with remote/Fabric MCPs only
254
- 2. See the Windows setup steps
255
- 3. Skip and continue with analysis
256
- 4. Use /pbi-connect later when ready
218
+ 1. Principiante primeros modelos, todavía me peleo con DAX
219
+ 2. Intermedio construyo modelos star schema, escribo medidas con CALCULATE
220
+ 3. Avanzado time intelligence compleja, RLS, optimización de DAX Studio
257
221
  ```
258
222
 
259
- ### If user asks what they can do (option 3):
223
+ ### Q4: Objetivo del proyecto (en 1-2 oraciones)
260
224
 
261
225
  ```
262
- WITH A POWER BI DESKTOP CONNECTION:
263
- ===================================
264
-
265
- The official Microsoft MCP stack lets me interact directly with your model:
226
+ En una oración, ¿qué problema resuelve este reporte?
266
227
 
267
- Read model structure (tables, columns, relationships)
268
- ✅ Create and edit DAX measures
269
- ✅ Modify relationships
270
- ✅ Manage display folders
271
- ✅ Add calculated columns
272
- ✅ Update formatting
273
-
274
- On Windows, the local Modeling MCP can work with Desktop/PBIP/Fabric modeling flows.
275
- On any platform, `powerbi-remote` and `fabric-mcp-server` keep the remote path available.
276
-
277
- Would you like to try connecting now?
228
+ Ejemplo: "Dashboard mensual de P&L para el directorio, con drill-down por unidad de negocio."
278
229
  ```
279
230
 
231
+ Store all answers in memory for PHASE 5.
232
+
280
233
  ---
281
234
 
282
- ## PHASE 3: Deep Analysis
235
+ ## PHASE 5: Write AGENTS.md + 4 pointer files
283
236
 
284
- If user wants analysis, proceed based on file types found:
237
+ Write these 5 files at the project root using the Write tool. **This is the set-and-forget step** that makes every future session pick up where we are now.
285
238
 
286
- ### For Fabric TMDL Projects (data-model/definition/):
239
+ ### 5.1 Write `./AGENTS.md` (canonical)
287
240
 
288
- ```
289
- Analyzing Fabric Semantic Model
290
- ===============================
241
+ Use this exact template, filling in `{projectName}`, `{domain}`, `{experienceLevel}`, `{dataSources}`, `{purpose}` from the onboarding answers. Keep the 5 critical rules verbatim — they are the core contract.
291
242
 
292
- I found a TMDL-based semantic model. Checking structure...
243
+ ```md
244
+ # AGENTS.md — Instrucciones para agentes de IA en este proyecto Power BI
293
245
 
294
- 📂 data-model/
295
- ├── 📄 definition.pbism (metadata)
296
- ├── 📄 [name].tmdl (monolithic - legacy)
297
- └── 📂 definition/
298
- ├── 📄 database.tmdl
299
- ├── 📄 model.tmdl
300
- ├── 📄 expressions.tmdl
301
- ├── 📄 relationships.tmdl
302
- ├── 📂 tables/ ([X] table definitions)
303
- └── 📂 roles/ ([X] RLS roles)
304
- ```
246
+ **Proyecto**: {projectName}
247
+ **Área**: {domain}
248
+ **Nivel del usuario**: {experienceLevel}
249
+ **Fuentes de datos**: {dataSources}
250
+ **Objetivo**: {purpose}
305
251
 
306
- **Analyze TMDL files and report on:**
252
+ ---
307
253
 
308
- 1. **Model Structure**
309
- - Read `model.tmdl` for model-level settings
310
- - Count tables in `tables/` directory
311
- - Identify table types (fact vs dimension by naming or content)
312
- - Check for Date/Calendar table
254
+ ## Regla crítica 1: siempre usar el Power BI MCP para escribir
313
255
 
314
- 2. **Tables Analysis** (from `tables/*.tmdl`)
315
- - For each table, extract:
316
- - Columns (name, dataType, isHidden)
317
- - Measures (name, expression, displayFolder)
318
- - Calculated columns vs regular columns
319
- - Partitions (data sources)
320
- - Check naming conventions (PascalCase, spaces, prefixes)
256
+ Cuando crees o modifiques medidas DAX, tablas, columnas, relaciones o cualquier elemento del modelo semántico, DEBES usar el servidor MCP de Power BI Desktop. NO edites archivos TMDL (`.tmdl`, `.tmd`) directamente. Esos archivos los gestiona el motor tabular. Editarlos a mano basado en tu conocimiento de entrenamiento es propenso a errores y probablemente rompa el modelo.
321
257
 
322
- 3. **Relationships** (from `relationships.tmdl`)
323
- - Count relationships
324
- - Identify cardinality (one-to-many, many-to-many)
325
- - Check for bi-directional filters (potential issues)
326
- - Detect orphan tables (no relationships)
258
+ ## Regla crítica 2: verificar la conexión MCP al iniciar sesión
327
259
 
328
- 4. **Measures Quality** (from table files)
329
- - Count total measures
330
- - Check for VAR/RETURN patterns (good)
331
- - Check for nested CALCULATE (warning)
332
- - Identify time intelligence usage
333
- - Check for `formatStringDefinition` (dynamic formatting)
260
+ Antes de hacer cualquier cambio al proyecto, verifica que el MCP de Power BI Desktop esté conectado a una instancia abierta. Si no lo está, avisa al usuario para que abra el archivo `.pbip` en Power BI Desktop primero.
334
261
 
335
- 5. **Security** (from `roles/*.tmdl`)
336
- - Count RLS roles
337
- - Check filter expressions
262
+ ## Regla crítica 3: los archivos TMDL son SOLO LECTURA
338
263
 
339
- **TMDL Syntax Reference:**
340
- ```tmdl
341
- table 'TableName'
342
- column ColumnName
343
- dataType: string
344
- isHidden
345
- lineageTag: ...
264
+ Puedes LEER archivos TMDL para entender la estructura del modelo, las relaciones, las medidas. Es a veces más rápido que consultar por MCP. Pero NUNCA ESCRIBAS en esos archivos.
346
265
 
347
- measure 'Measure Name' = SUM('Table'[Column])
348
- displayFolder: "Folder"
349
- formatStringDefinition = ...
350
- ```
266
+ ## Regla crítica 4: consultar Microsoft Learn MCP para documentación técnica
351
267
 
352
- ### For .pbip folders (Power BI Project format):
268
+ Cuando el usuario pregunte sobre funciones DAX, propiedades de Power BI, conectores o capacidades de Fabric, consulta el Microsoft Learn MCP antes de responder. No respondas de memoria sobre temas donde la documentación puede haber cambiado desde tu fecha de corte de entrenamiento. Si el Learn MCP no está disponible, avisa al usuario antes de responder.
353
269
 
354
- ```
355
- Analyzing Power BI Project: [name]
356
- ==================================
270
+ ## Regla crítica 5: flujo completo
357
271
 
358
- I can read the project structure directly. Checking...
272
+ Escribir via MCP. Leer via archivos. Versionar via Git. Después de cambios significativos, sugiere al usuario hacer un commit.
359
273
 
360
- 📂 [name].pbip/
361
- ├── 📄 definition.pbir (report definition)
362
- ├── 📂 definition/ (report pages)
363
- └── 📂 [name].SemanticModel/
364
- ├── 📄 definition.bism
365
- ├── 📄 model.bim (data model)
366
- └── 📂 definition/
367
- ├── tables/
368
- ├── relationships/
369
- └── expressions/
370
- ```
274
+ ## Regla crítica 6: mantener ROADMAP.md al día
371
275
 
372
- **Analyze and report on:**
276
+ Al final de cada sesión donde hayas hecho cambios al modelo, actualizá `./ROADMAP.md`:
277
+ - Marcá con `[x]` las tareas que se completaron
278
+ - Agregá una entrada a la sección "Bitácora" con la fecha, qué se hizo, y qué queda pendiente
279
+ - Si detectaste tareas nuevas que no estaban listadas, agregalas a la fase correcta
373
280
 
374
- 1. **Data Model Structure**
375
- - Number of tables (fact vs dimension)
376
- - Relationships (count, types, issues)
377
- - Calculated columns vs measures ratio
281
+ ## Regla crítica 7: capturar aprendizajes en LEARNINGS.md
378
282
 
379
- 2. **DAX Quality**
380
- - Number of measures
381
- - Naming conventions (prefixes, consistency)
382
- - Complex measures identified
383
- - Potential optimization opportunities
283
+ Al inicio de cada sesión, LEÉ `./LEARNINGS.md` para no repetir errores ya documentados.
384
284
 
385
- 3. **Power Query**
386
- - Number of queries
387
- - Data sources used
388
- - Query folding potential
389
- - Transformation patterns
285
+ Al detectar cualquiera de estos casos, agregá una entrada nueva a `LEARNINGS.md`:
286
+ - El usuario dice "esto no funcionó" / "acordate de X" / "la próxima vez usá..."
287
+ - Un error técnico que tomó más de un intento arreglar
288
+ - Un patrón específico del dominio o de las fuentes de datos que no es obvio desde el conocimiento general de Power BI
390
289
 
391
- 4. **Report Structure**
392
- - Number of pages
393
- - Visuals per page (average)
394
- - Theme applied (if any)
290
+ Formato de cada entrada: **Fecha** **Lección** — **Aplicación a futuro**.
395
291
 
396
- ### For .pbix files:
292
+ ---
397
293
 
398
- ```
399
- Note: .pbix files are compressed and require Power BI Desktop to fully analyze.
294
+ ## Estructura del proyecto
400
295
 
401
- I can see this file exists:
402
- 📊 [filename.pbix] - [size] - Modified: [date]
296
+ La carpeta raíz del proyecto es un repositorio Git independiente.
403
297
 
404
- For detailed analysis, I recommend:
405
- 1. Convert to .pbip format (File > Save as > Power BI Project)
406
- 2. Open in Power BI Desktop and connect via MCP
298
+ - Carpeta `/pbip-files/`: contiene todos los archivos del proyecto Power BI
299
+ - Archivo `/pbip-files/{projectName}.pbip`: archivo del proyecto Power BI
300
+ - Carpeta `/pbip-files/{projectName}.SemanticModel/`: definición del modelo (archivos TMDL, **SOLO LECTURA para agentes**)
301
+ - Carpeta `/pbip-files/{projectName}.Report/`: definición del reporte (**SOLO LECTURA para agentes**)
407
302
 
408
- Would you like guidance on converting to .pbip format?
303
+ Cualquier otra carpeta en la raíz (`scripts/`, `docs/`, `notebooks/`, etc.) es espacio libre del proyecto y no debe mezclarse con los archivos de Power BI.
409
304
  ```
410
305
 
411
- ### For Dataflows (dataflows/ folder with .pq files):
412
-
413
- ```
414
- Analyzing Dataflows
415
- ===================
306
+ ### 5.2 Write `./CLAUDE.md` (pointer for Claude Code)
416
307
 
417
- I found Power Query dataflow definitions. Checking structure...
308
+ ```md
309
+ <!-- Claude Code reads this file. The canonical instructions are in AGENTS.md. -->
418
310
 
419
- 📂 dataflows/
420
- ├── 📂 Customers/ ([X] queries)
421
- ├── 📂 Products/ ([X] queries)
422
- ├── 📂 Invoices/ ([X] queries)
423
- └── ...
311
+ Véase [AGENTS.md](./AGENTS.md) para las instrucciones de este proyecto.
424
312
  ```
425
313
 
426
- **Analyze .pq files and report on:**
314
+ ### 5.3 Write `./.github/copilot-instructions.md` (pointer for GitHub Copilot)
427
315
 
428
- 1. **Dataflow Organization**
429
- - Count dataflow folders (each folder = one logical dataflow)
430
- - Count queries per dataflow
431
- - Identify naming patterns
316
+ Create `./.github/` directory if it doesn't exist.
432
317
 
433
- 2. **Query Analysis** (from `*.pq` files)
434
- - For each query, extract:
435
- - Query name (from filename)
436
- - Data source type (BigQuery, SQL, API, etc.)
437
- - Key transformations used
438
- - Check for common patterns:
439
- - `shared` keyword (reusable queries)
440
- - Parameters usage
441
- - Error handling (`try...otherwise`)
318
+ ```md
319
+ <!-- GitHub Copilot reads this file. The canonical instructions are in AGENTS.md at the project root. -->
442
320
 
443
- 3. **Data Sources**
444
- - Identify unique data sources across all queries
445
- - Check for connection strings / credentials references
446
- - Map sources to dataflows
447
-
448
- 4. **Quality Indicators**
449
- - **Good**: Typed columns, proper naming, comments
450
- - **Warning**: Hardcoded values, no error handling
451
- - **Issue**: Circular references, disabled queries
452
-
453
- **Power Query (.pq) Syntax Reference:**
454
- ```powerquery
455
- let
456
- Source = GoogleBigQuery.Database("project"),
457
- Data = Source{[Schema="schema", Item="table"]}[Data],
458
- Filtered = Table.SelectRows(Data, each [Status] = "Active"),
459
- Typed = Table.TransformColumnTypes(Filtered, {{"Date", type date}})
460
- in
461
- Typed
321
+ Véase [AGENTS.md](../AGENTS.md) para las instrucciones de este proyecto.
462
322
  ```
463
323
 
464
- ### For .xlsx files:
465
-
466
- ```
467
- Analyzing Excel file: [name.xlsx]
468
- =================================
324
+ ### 5.4 — Write `./.kilo/rules/project.md` (pointer for Kilo Code)
469
325
 
470
- Sheets found: [count]
471
- [List sheet names]
326
+ Create `./.kilo/rules/` directory if it doesn't exist.
472
327
 
473
- I can analyze:
474
- 1. Data structure and quality
475
- 2. Formulas and calculations
476
- 3. Named ranges and tables
477
- 4. Potential for Power BI import
328
+ ```md
329
+ <!-- Kilo Code reads files under .kilo/rules/. The canonical instructions are in AGENTS.md at the project root. -->
478
330
 
479
- Which aspect interests you most?
331
+ Véase [AGENTS.md](../../AGENTS.md) para las instrucciones de este proyecto.
480
332
  ```
481
333
 
482
- ---
483
-
484
- ## PHASE 4: Findings Report
334
+ ### 5.5 — Write `./GEMINI.md` (pointer for Gemini CLI)
485
335
 
486
- After analysis, present a structured report:
336
+ ```md
337
+ <!-- Gemini CLI reads this file when configured. The canonical instructions are in AGENTS.md. -->
487
338
 
339
+ Véase [AGENTS.md](./AGENTS.md) para las instrucciones de este proyecto.
488
340
  ```
489
- 📋 PROJECT ANALYSIS REPORT
490
- ==========================
491
-
492
- ## Overview
493
- - Project type: [Power BI Desktop / PBIP / Fabric TMDL / Excel / Mixed]
494
- - Files analyzed: [count]
495
- - Overall health: [🟢 Good / 🟡 Needs attention / 🔴 Significant issues]
496
-
497
- ## Data Model Assessment
498
-
499
- | Aspect | Status | Finding |
500
- |--------|--------|---------|
501
- | Star Schema | 🟢/🟡/🔴 | [Finding] |
502
- | Relationships | 🟢/🟡/🔴 | [Finding] |
503
- | Naming Conventions | 🟢/🟡/🔴 | [Finding] |
504
- | Calculated Columns | 🟢/🟡/🔴 | [Finding] |
505
-
506
- ## DAX Assessment
507
341
 
508
- | Aspect | Status | Finding |
509
- |--------|--------|---------|
510
- | Measure Organization | 🟢/🟡/🔴 | [Finding] |
511
- | Naming Patterns | 🟢/🟡/🔴 | [Finding] |
512
- | Performance Patterns | 🟢/🟡/🔴 | [Finding] |
513
- | Time Intelligence | 🟢/🟡/🔴 | [Finding] |
342
+ ### 5.6 Write `./ROADMAP.md`
514
343
 
515
- ## Power Query Assessment
344
+ Use the template below, filling in `{projectName}` and `{today}` (YYYY-MM-DD). Pick the fases body matching the domain captured in PHASE 4:
516
345
 
517
- | Aspect | Status | Finding |
518
- |--------|--------|---------|
519
- | Query Organization | 🟢/🟡/🔴 | [Finding] |
520
- | Data Types | 🟢/🟡/🔴 | [Finding] |
521
- | Query Folding | 🟢/🟡/🔴 | [Finding] |
522
- | Error Handling | 🟢/🟡/🔴 | [Finding] |
346
+ ```md
347
+ # ROADMAP — {projectName}
523
348
 
524
- ## Dataflows Assessment (if applicable)
349
+ > Actualizado automáticamente por el agente al final de cada sesión.
350
+ > Si algo está desactualizado, pedime "actualizá el ROADMAP".
525
351
 
526
- | Aspect | Status | Finding |
527
- |--------|--------|---------|
528
- | Organization | 🟢/🟡/🔴 | [X] dataflows, [Y] total queries |
529
- | Naming Conventions | 🟢/🟡/🔴 | [Finding] |
530
- | Data Sources | 🟢/🟡/🔴 | [List sources: BigQuery, API, etc.] |
531
- | Reusability | 🟢/🟡/🔴 | [Finding on shared queries] |
352
+ ## Fases planificadas
532
353
 
533
- ## Security Assessment (if RLS present)
354
+ {fases-for-domain}
534
355
 
535
- | Aspect | Status | Finding |
536
- |--------|--------|---------|
537
- | RLS Roles | 🟢/🟡/🔴 | [X] roles defined |
538
- | Filter Logic | 🟢/🟡/🔴 | [Finding] |
539
- | Coverage | 🟢/🟡/🔴 | [All sensitive tables covered?] |
540
-
541
- ## Top Recommendations
356
+ ---
542
357
 
543
- 1. **[Priority: High/Medium/Low]** [Recommendation]
544
- - Impact: [Description]
545
- - Effort: [Easy/Medium/Complex]
358
+ ## Bitácora
546
359
 
547
- 2. **[Priority]** [Recommendation]
548
- ...
360
+ _(El agente agrega una entrada acá al final de cada sesión.)_
549
361
 
550
- (Showing top 5 recommendations)
362
+ - **{today}** Kickoff completado. Proyecto `{projectName}` creado con estructura `pbip-files/`. Próximo paso: empezar Fase 1.
551
363
  ```
552
364
 
553
- ---
365
+ **Fases body by domain** — copy the block that matches:
554
366
 
555
- ## PHASE 5: Action Plan
367
+ **Finance**
556
368
 
557
- ```
558
- Based on my analysis, here's a suggested action plan:
369
+ ```md
370
+ ### Fase 1: Modelo base
371
+ - [ ] Tabla de hechos `GeneralLedger`
372
+ - [ ] Dimensiones: `Date`, `Account`, `CostCenter`, `Scenario`
373
+ - [ ] Marcar `Date` como tabla de fecha
374
+ - [ ] Relaciones entre fact y dims
559
375
 
560
- ## Quick Wins (do now)
561
- - [ ] [Action 1]
562
- - [ ] [Action 2]
376
+ ### Fase 2: Medidas core
377
+ - [ ] Medidas base (sum, count, avg)
378
+ - [ ] Time intelligence (YTD, YoY, MoM)
379
+ - [ ] Variance vs. presupuesto
563
380
 
564
- ## Short-term Improvements
565
- - [ ] [Action 3]
566
- - [ ] [Action 4]
567
-
568
- ## Longer-term Enhancements
569
- - [ ] [Action 5]
570
- - [ ] [Action 6]
571
-
572
- ---
381
+ ### Fase 3: Seguridad y gobierno
382
+ - [ ] RLS por CostCenter (si aplica)
383
+ - [ ] Naming conventions documentadas en AGENTS.md
384
+ - [ ] Display folders
573
385
 
574
- How would you like to proceed?
575
-
576
- 1. 🔧 Start fixing issues - I'll guide you through improvements
577
- 2. 📊 Redesign data model - Use the data-model-design wizard
578
- 3. 🎨 Apply a theme - Use the theme-tweaker wizard
579
- 4. 📝 Export this report - Save analysis as markdown
580
- 5. 💬 Ask questions - Discuss specific findings
386
+ ### Fase 4: Reporte
387
+ - [ ] Página resumen (KPIs principales)
388
+ - [ ] Detalle por dimensión
389
+ - [ ] Theme aplicado
581
390
  ```
582
391
 
583
- ---
392
+ **Sales / Revenue**
584
393
 
585
- ## PHASE 6: Migration Path
394
+ ```md
395
+ ### Fase 1: Modelo base
396
+ - [ ] Tabla de hechos `Sales`
397
+ - [ ] Dimensiones: `Date`, `Customer`, `Product`, `Salesperson`
398
+ - [ ] Marcar `Date` como tabla de fecha
399
+ - [ ] Relaciones entre fact y dims
586
400
 
587
- If user selected "Migration":
401
+ ### Fase 2: Medidas core
402
+ - [ ] Revenue, units, AOV
403
+ - [ ] Time intelligence (YTD, YoY, MoM)
404
+ - [ ] Rankings (top N customers, top N products)
588
405
 
589
- ```
590
- What are you migrating from?
406
+ ### Fase 3: Seguridad y gobierno
407
+ - [ ] RLS por Salesperson / territorio (si aplica)
408
+ - [ ] Naming conventions documentadas en AGENTS.md
409
+ - [ ] Display folders
591
410
 
592
- 1. Excel-only reporting → Power BI
593
- 2. Other BI tool Power BI (Tableau, Looker, etc.)
594
- 3. Legacy Power BI Modern Power BI (DirectQuery to Import, etc.)
595
- 4. On-premise Power BI Service (cloud)
411
+ ### Fase 4: Reporte
412
+ - [ ] Página resumen (pipeline + cierre del mes)
413
+ - [ ] Detalle por cliente / producto
414
+ - [ ] Theme aplicado
596
415
  ```
597
416
 
598
- Then provide migration-specific guidance:
417
+ **HR / People**
599
418
 
600
- ### Excel → Power BI:
601
- ```
602
- Excel to Power BI migration checklist:
419
+ ```md
420
+ ### Fase 1: Modelo base
421
+ - [ ] Tabla de hechos `HeadcountSnapshot`
422
+ - [ ] Dimensiones: `Date`, `Employee`, `Department`, `Position`
423
+ - [ ] Marcar `Date` como tabla de fecha
424
+ - [ ] Relaciones entre fact y dims
603
425
 
604
- 📋 Assessment:
605
- - [ ] Identify all Excel reports in scope
606
- - [ ] Document data sources for each
607
- - [ ] List key calculations and KPIs
608
- - [ ] Identify report consumers and their needs
426
+ ### Fase 2: Medidas core
427
+ - [ ] Headcount, altas, bajas, attrition rate
428
+ - [ ] Time intelligence (MoM, YoY)
429
+ - [ ] Compensación agregada por dim
609
430
 
610
- 🔄 Data Layer:
611
- - [ ] Evaluate data refresh requirements
612
- - [ ] Design star schema for common data
613
- - [ ] Plan Power Query transformations
614
- - [ ] Consider dataflows for shared data
431
+ ### Fase 3: Seguridad y gobierno
432
+ - [ ] RLS por Department (datos sensibles)
433
+ - [ ] Naming conventions documentadas en AGENTS.md
434
+ - [ ] Display folders
615
435
 
616
- 📊 Report Layer:
617
- - [ ] Map Excel visuals to Power BI equivalents
618
- - [ ] Design navigation structure
619
- - [ ] Plan for interactivity (slicers, drill-through)
620
- - [ ] Consider mobile layouts
621
-
622
- Would you like to start with any of these areas?
436
+ ### Fase 4: Reporte
437
+ - [ ] Página resumen (headcount + attrition)
438
+ - [ ] Detalle por departamento
439
+ - [ ] Theme aplicado
623
440
  ```
624
441
 
625
- ---
626
-
627
- ## TOOLKIT OVERVIEW
628
-
629
- When user wants to explore the toolkit:
630
-
631
- ```
632
- 📚 BI-PROJECT-OS TOOLKIT OVERVIEW
633
- =================================
634
-
635
- ## 🎯 Interactive Wizards (Skills)
636
-
637
- | Skill | Purpose | When to use |
638
- |-------|---------|-------------|
639
- | data-model-design | Design semantic models from scratch | New projects, major redesigns |
640
- | theme-tweaker | Customize Power BI themes | Branding, visual consistency |
641
- | project-kickoff | Analyze existing projects | You are here! |
642
-
643
- ## 📖 Reference Skills
442
+ **Operations / Supply Chain**
644
443
 
645
- | Skill | Purpose |
646
- |-------|---------|
647
- | dax | DAX patterns and best practices |
648
- | power-query | M language and transformations |
649
- | data-modeling | Star schema and relationships |
650
- | excel-formulas | Modern Excel formulas |
444
+ ```md
445
+ ### Fase 1: Modelo base
446
+ - [ ] Tabla de hechos `Orders`
447
+ - [ ] Dimensiones: `Date`, `Customer`, `Product`, `Facility`
448
+ - [ ] Marcar `Date` como tabla de fecha
449
+ - [ ] Relaciones entre fact y dims
651
450
 
652
- ## 📝 Code Snippets
451
+ ### Fase 2: Medidas core
452
+ - [ ] Volumen, SLA cumplido, órdenes abiertas
453
+ - [ ] Time intelligence (YTD, rolling 4w)
454
+ - [ ] Aging de órdenes
653
455
 
654
- | Category | Examples |
655
- |----------|----------|
656
- | DAX | Time intelligence, Rankings, CALCULATE patterns, KPIs |
657
- | Power Query | Data cleaning, Transformations |
658
- | Excel | XLOOKUP, Dynamic arrays |
456
+ ### Fase 3: Seguridad y gobierno
457
+ - [ ] RLS por Facility (si aplica)
458
+ - [ ] Naming conventions documentadas en AGENTS.md
459
+ - [ ] Display folders
659
460
 
660
- ## 🎨 Themes
661
-
662
- | Theme | Style |
663
- |-------|-------|
664
- | bi-superpowers-default | Shadcn/UI + IBCS standards |
665
- | corporate-blue | Professional blue palette |
666
- | dark-mode | Dark background |
461
+ ### Fase 4: Reporte
462
+ - [ ] Página resumen (volumen + SLA)
463
+ - [ ] Detalle por facility / producto
464
+ - [ ] Theme aplicado
465
+ ```
667
466
 
668
- ## 📁 Templates
467
+ **Marketing**
669
468
 
670
- | Category | Contents |
671
- |----------|----------|
672
- | power-bi | Report templates |
673
- | excel | Workbook templates |
674
- | data-models | Model patterns |
469
+ ```md
470
+ ### Fase 1: Modelo base
471
+ - [ ] Tabla de hechos `Campaigns`
472
+ - [ ] Dimensiones: `Date`, `Channel`, `Audience`, `Product`
473
+ - [ ] Marcar `Date` como tabla de fecha
474
+ - [ ] Relaciones entre fact y dims
675
475
 
676
- ---
476
+ ### Fase 2: Medidas core
477
+ - [ ] Spend, impressions, clicks, conversions, CPA
478
+ - [ ] Time intelligence (YTD, rolling 4w)
479
+ - [ ] Funnel rates (CTR, conversion rate)
677
480
 
678
- What would you like to explore?
481
+ ### Fase 3: Seguridad y gobierno
482
+ - [ ] RLS por Audience / región (si aplica)
483
+ - [ ] Naming conventions documentadas en AGENTS.md
484
+ - [ ] Display folders
679
485
 
680
- 1. See DAX snippets
681
- 2. See Power Query snippets
682
- 3. Preview available themes
683
- 4. Learn about a specific skill
684
- 5. Return to main menu
486
+ ### Fase 4: Reporte
487
+ - [ ] Página resumen (spend + ROAS)
488
+ - [ ] Detalle por canal / campaña
489
+ - [ ] Theme aplicado
685
490
  ```
686
491
 
687
- ---
492
+ **Otro (fallback)**
688
493
 
689
- ## ANALYSIS PATTERNS
690
-
691
- ### TMDL-Specific Patterns
692
- When analyzing `.tmdl` files:
693
-
694
- **File Structure:**
695
- - `table 'Name'` → Table definition starts
696
- - `column Name` → Column definition (indented with tab)
697
- - `measure 'Name' =` → Measure definition
698
- - `partition Name =` → Data source partition
699
- - `dataType:` → Column data type
700
- - `isHidden` → Hidden column/table flag
701
- - `lineageTag:` → Unique identifier (UUID)
702
-
703
- **Quality Checks:**
704
- - Measures should have `displayFolder` for organization
705
- - Dynamic formatting uses `formatStringDefinition` (not `formatString`)
706
- - Tables should have consistent column naming
707
- - Check for `isHidden` on technical columns
708
-
709
- **Common Issues:**
710
- - Missing `formatStringDefinition` for currency measures
711
- - Inconsistent indentation (must use tabs, not spaces)
712
- - Orphan tables without relationships
713
- - Measures without display folders
714
-
715
- ### Star Schema Detection
716
- Check for:
717
- - Tables with "Dim" or "Dimension" prefix → Dimensions
718
- - Tables with "Fact" or transactional data → Facts
719
- - Tables with date ranges → Date dimension
720
- - Orphan tables (no relationships)
721
- - Bridge tables (many-to-many)
722
-
723
- ### Naming Convention Analysis
724
- Check for:
725
- - Measure prefixes (e.g., "M_", "Measure_", or none)
726
- - Column naming (PascalCase, snake_case, spaces)
727
- - Table naming consistency
728
- - Hidden vs visible columns
729
-
730
- ### DAX Quality Indicators
731
- - **Good**: CALCULATE with proper filters, variables (VAR/RETURN), time intelligence functions
732
- - **Warning**: Nested CALCULATE, FILTER on large tables, too many calculated columns
733
- - **Issue**: Circular dependencies, bi-directional relationships overuse
734
-
735
- ### Power Query Quality Indicators
736
- - **Good**: Proper data types, query folding, organized steps
737
- - **Warning**: Many manual steps, hardcoded values, no error handling
738
- - **Issue**: Loading disabled queries, circular references
494
+ ```md
495
+ ### Fase 1: Modelo base
496
+ - [ ] Definir tabla de hechos principal
497
+ - [ ] Definir dimensiones clave (al menos `Date` + 2 más)
498
+ - [ ] Marcar `Date` como tabla de fecha
499
+ - [ ] Relaciones entre fact y dims
739
500
 
740
- ---
741
-
742
- ## EXAMPLE CONVERSATIONS
501
+ ### Fase 2: Medidas core
502
+ - [ ] Medidas base (sum, count, avg)
503
+ - [ ] Time intelligence (YTD, YoY)
743
504
 
744
- ### Example 1: Fabric TMDL Project
505
+ ### Fase 3: Seguridad y gobierno
506
+ - [ ] RLS (si aplica al caso)
507
+ - [ ] Naming conventions documentadas en AGENTS.md
508
+ - [ ] Display folders
745
509
 
510
+ ### Fase 4: Reporte
511
+ - [ ] Página resumen
512
+ - [ ] Detalle por dimensión principal
513
+ - [ ] Theme aplicado
746
514
  ```
747
- Agent: Welcome to BI Agent Superpowers! In which language...
748
- User: 2 (Español)
749
-
750
- Agent: Soy tu asistente de proyectos BI. ¿Es este un proyecto nuevo o tienes archivos existentes?
751
- User: 2 (Existente)
752
515
 
753
- Agent: Déjame escanear tu carpeta...
516
+ ### 5.7 Write `./LEARNINGS.md`
754
517
 
755
- RESULTADOS DEL ESCANEO
756
- ======================
757
- 📁 Carpeta: /proyecto-fabric
518
+ Use this seed template verbatim (solo cambiá `{projectName}`):
758
519
 
759
- Encontré 284 archivos BI:
520
+ ```md
521
+ # LEARNINGS — {projectName}
760
522
 
761
- Fabric/TMDL:
762
- 🔷 data-model/definition/ - 113 archivos TMDL
763
- 📝 dataflows/ - 171 archivos Power Query
523
+ > Lecciones aprendidas específicas de este proyecto.
524
+ > El agente lee este archivo al inicio de cada sesión y agrega entradas cuando detecta algo que vale la pena recordar.
525
+ >
526
+ > Si querés agregar algo a mano, respetá el formato de abajo.
764
527
 
765
- ¿Quieres que analice estos archivos en detalle?
528
+ ## Formato de cada entrada
766
529
 
767
- User: 1 (Sí, analizar todo)
530
+ - **Fecha** (YYYY-MM-DD)
531
+ - **Lección**: qué aprendimos
532
+ - **Aplicación a futuro**: cómo usarlo la próxima vez
768
533
 
769
- Agent: Analizando modelo semántico Fabric...
534
+ ## Entradas
770
535
 
771
- 📂 data-model/definition/
772
- ├── tables/ - 47 tablas
773
- ├── roles/ - 8 roles RLS
774
- └── relationships.tmdl - 35 relaciones
775
-
776
- 📋 REPORTE DE ANÁLISIS
777
- ======================
778
-
779
- Salud general: 🟢 Buena
536
+ _(Vacío por ahora — las primeras entradas aparecerán cuando tengamos contexto que valga la pena guardar. El agente las agrega automáticamente.)_
537
+ ```
780
538
 
781
- ## Modelo de Datos
782
- | Aspecto | Estado | Hallazgo |
783
- |---------|--------|----------|
784
- | Star Schema | 🟢 | Estructura clara fact/dim |
785
- | Relaciones | 🟢 | 35 relaciones, sin bi-direccionales |
786
- | Naming | 🟡 | Algunas tablas con espacios |
787
- | Medidas | 🟢 | 49 medidas organizadas en folders |
539
+ ### 5.8 Confirm to the user
788
540
 
789
- ## Dataflows
790
- | Aspecto | Estado | Hallazgo |
791
- |---------|--------|----------|
792
- | Organización | 🟢 | 12 dataflows por dominio |
793
- | Fuentes | 🟢 | BigQuery, Stripe, WooCommerce |
541
+ ```
542
+ Escribí:
543
+ • AGENTS.md ← documento canónico con las 7 reglas
544
+ CLAUDE.md ← pointer para Claude Code
545
+ .github/copilot-instructions.md ← pointer para GitHub Copilot
546
+ • .kilo/rules/project.md ← pointer para Kilo Code
547
+ • GEMINI.md ← pointer para Gemini CLI
548
+ • ROADMAP.md ← plan del proyecto (lo actualizo al final de cada sesión)
549
+ • LEARNINGS.md ← lecciones del proyecto (lo actualizo cuando algo valga la pena recordar)
794
550
 
795
- ## Seguridad
796
- | Aspecto | Estado | Hallazgo |
797
- |---------|--------|----------|
798
- | RLS Roles | 🟢 | 8 roles (uno por cliente) |
551
+ A partir de ahora, cualquier agente que abra esta carpeta lee las mismas 7 reglas, el plan del proyecto, y los aprendizajes acumulados.
552
+ ```
799
553
 
800
- ## Top Recomendaciones
801
- 1. [Media] Estandarizar nombres de tablas (quitar espacios)
802
- 2. [Baja] Agregar formatStringDefinition a medidas monetarias
554
+ ---
803
555
 
804
- ¿Cómo quieres proceder?
556
+ ## PHASE 6: Start modeling
805
557
 
806
- User: 1 (Empezar a corregir)
558
+ Now the foundation is ready. Propose the first concrete modeling step based on the domain captured in PHASE 4:
807
559
 
808
- Agent: Empecemos por la prioridad media: estandarizar nombres...
809
560
  ```
561
+ Listo para modelar. Con lo que me contaste ({domain} / {purpose}), yo arrancaría por:
810
562
 
811
- ### Example 2: Power BI Desktop Project
563
+ 1. Crear la tabla de hechos central — {suggested-fact-table-for-domain}
564
+ 2. Crear las dimensiones clave — {suggested-dims-for-domain}
565
+ 3. Conectar las fuentes de datos desde {dataSources[0]}
812
566
 
567
+ ¿Arrancamos por (1), o querés otro orden?
813
568
  ```
814
- Agent: Welcome to BI Agent Superpowers! In which language...
815
- User: 2 (Español)
816
569
 
817
- Agent: Soy tu asistente de proyectos BI. ¿Es este un proyecto nuevo o tienes archivos existentes?
818
- User: 2 (Existente)
570
+ When the user picks, **execute the work via the Power BI Modeling MCP** — do not generate `.tmdl` text to paste. The user watches the model change live in Power BI Desktop.
819
571
 
820
- Agent: Déjame escanear tu carpeta...
572
+ Suggested first steps by domain:
821
573
 
822
- RESULTADOS DEL ESCANEO
823
- ======================
824
- Encontré 3 archivos:
825
- 📊 ventas-q4.pbip/ - Proyecto Power BI
826
- 📗 datos-maestros.xlsx - 2.3 MB
827
- 📗 presupuesto-2024.xlsx - 1.1 MB
574
+ | Domain | Suggested fact table | Suggested dimensions |
575
+ |---|---|---|
576
+ | Finance | `GeneralLedger` | `Date`, `Account`, `CostCenter`, `Scenario` |
577
+ | Sales | `Sales` | `Date`, `Customer`, `Product`, `Salesperson` |
578
+ | HR | `HeadcountSnapshot` | `Date`, `Employee`, `Department`, `Position` |
579
+ | Operations | `Orders` | `Date`, `Customer`, `Product`, `Facility` |
580
+ | Marketing | `Campaigns` | `Date`, `Channel`, `Audience`, `Product` |
828
581
 
829
- ¿Quieres que analice estos archivos en detalle?
582
+ These are starting points, not gospel — adapt to what the user said in PHASE 4.
830
583
 
831
- User: 1 (Sí, analizar todo)
832
-
833
- Agent: [Analiza el .pbip]
834
-
835
- 📋 REPORTE DE ANÁLISIS
836
- ======================
584
+ ---
837
585
 
838
- Salud general: 🟡 Necesita atención
586
+ ## PHASE 7: Handoff to `/report-design`
839
587
 
840
- ## Modelo de Datos
841
- | Aspecto | Estado | Hallazgo |
842
- |---------|--------|----------|
843
- | Star Schema | 🟡 | 2 tablas sin relacionar |
844
- | Relaciones | 🟢 | Bien configuradas |
845
- | Naming | 🔴 | Inconsistente (mezcla español/inglés) |
588
+ Once the model has at least 1 fact, 1 dim, and 3 measures in place, propose moving to reports:
846
589
 
847
- ## Top Recomendaciones
848
- 1. [Alta] Estandarizar nombres de columnas
849
- 2. [Media] Crear tabla de fechas dedicada
850
- 3. [Baja] Mover cálculos de columnas a medidas
590
+ ```
591
+ ✓ Modelo base listo. Tenés fact + dims + {N} medidas.
851
592
 
852
- ¿Cómo quieres proceder?
593
+ El siguiente paso lógico es armar los 3 reportes con `/report-design`. Ese skill va a:
594
+ 1. Usar el dominio que ya definimos ({domain})
595
+ 2. Inspeccionar tu modelo vía el pbi CLI para las medidas/dimensiones exactas
596
+ 3. Generar 3 páginas con visuales vía CLI (card, line, bar, matrix)
597
+ 4. Cerrar y reabrir PBI Desktop para que renderice
853
598
 
854
- User: 1 (Empezar a corregir)
599
+ Requisito: necesitás pbi-cli-tool instalado (si no lo tenés el skill te guía).
855
600
 
856
- Agent: Empecemos por la prioridad alta: estandarizar nombres...
601
+ ¿Arrancamos con /report-design, o preferís agregar más medidas al modelo primero?
857
602
  ```
858
603
 
604
+ If the user opts for reports, load `/report-design` and let it run. If they want to keep modeling, stay on this skill.
605
+
859
606
  ---
860
607
 
861
- ## Complexity Adaptation
608
+ ## What this skill does NOT do
862
609
 
863
- Adjust depth based on `config.json experienceLevel`:
864
- - **beginner**: Step-by-step with explanations, reference library examples
865
- - **intermediate**: Standard depth, explain non-obvious decisions
866
- - **advanced**: Concise, skip basics, focus on edge cases and optimization
610
+ - **No scoring / benchmarking** of an existing model. For that, the user can ask "audit this model" separately.
611
+ - **Report authoring** is delegated to `/report-design` which orchestrates the `pbi-cli-tool` CLI don't write `.Report/` files from here.
867
612
 
868
613
  ---
869
614
 
870
615
  ## Related Skills
871
616
 
872
- - `/data-model-design` — Design the star schema after analysis
873
- - `/migration-assistant` — If migration is needed
874
- - `/theme-tweaker` — Customize visuals after setup
875
- - `/governance` — Apply naming standards from the start
617
+ - `/pbi-connect` — Deeper troubleshooting if the MCP connection fails
876
618
 
877
619
  ---
878
620
 
879
- ## OUTPUT FILES
880
-
881
- When user requests to export the report, save to:
882
-
883
- `/[project-root]/analysis-report-[date].md`
621
+ ## Related Resources
884
622
 
885
- Format:
886
- ```markdown
887
- # Project Analysis Report
888
- Generated: [date]
889
- Tool: BI Agent Superpowers
890
-
891
- ## Executive Summary
892
- [Summary paragraph]
893
-
894
- ## Files Analyzed
895
- [List]
896
-
897
- ## Findings
898
- [Detailed findings by category]
899
-
900
- ## Recommendations
901
- [Prioritized list]
902
-
903
- ## Next Steps
904
- [Action items]
905
- ```
623
+ - [Power BI MCP overview](https://learn.microsoft.com/en-us/power-bi/developer/mcp/mcp-servers-overview)
624
+ - [Power BI Modeling MCP on GitHub](https://github.com/microsoft/powerbi-modeling-mcp)
625
+ - [PBIP format docs](https://learn.microsoft.com/en-us/power-bi/developer/projects/projects-overview)