pbiplint 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pbiplint",
3
- "version": "0.2.3",
4
- "description": "Lint Power BI projects, the semantic model (TMDL) and the report (PBIR), for best-practice violations, with text, JSON, SARIF, and Markdown output. Nothing is uploaded.",
3
+ "version": "0.2.5",
4
+ "description": "Lint Power BI projects, the semantic model (TMDL) and the report (PBIR), for best-practice violations, with text, JSON, SARIF, and Markdown output. Nothing is uploaded: the pbiplint Privacy Promise, https://pbiplint.com/privacy/",
5
5
  "keywords": [
6
6
  "power-bi",
7
7
  "tmdl",
@@ -32,6 +32,7 @@
32
32
  "files": [
33
33
  "dist",
34
34
  "sample",
35
+ "skill",
35
36
  "README.md",
36
37
  "NOTICE",
37
38
  "LICENSE"
@@ -42,9 +43,13 @@
42
43
  "scripts": {
43
44
  "build": "node build.mjs",
44
45
  "prepack": "npm run build",
45
- "test:bundle": "node dist/pbiplint.mjs --sample --format json > /dev/null; test $? -eq 1"
46
+ "test:bundle": "node dist/pbiplint.mjs --sample --format json > /dev/null; test $? -eq 1 && node scripts/smoke-mcp.mjs"
46
47
  },
47
48
  "engines": {
48
49
  "node": "^20.19.0 || >=22.12.0"
50
+ },
51
+ "devDependencies": {
52
+ "@modelcontextprotocol/server": "^2.3.0",
53
+ "zod": "^4.6.5"
49
54
  }
50
55
  }
package/skill/SKILL.md ADDED
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: pbiplint
3
+ description: Lint a Power BI project (PBIP), its semantic model in TMDL and its report in PBIR, for best-practice problems, offline, with the pbiplint CLI. Use after creating or changing any TMDL or PBIR file, however the change was made (a script, an editor, an MCP server, or Power BI Desktop); when asked to check, review, or lint a Power BI project, model, or report, or whether one is right or ready; and before a commit or pull request that touches one. pbiplint 0.2.5.
4
+ license: MIT
5
+ metadata:
6
+ version: "0.2.5"
7
+ ---
8
+
9
+ # pbiplint
10
+
11
+ pbiplint checks a Power BI project's files against best-practice rules: the semantic model (TMDL) and the report (PBIR). This file says how to run it, how to read what it prints, and what to leave to the user. Each rule's own guidance comes from `pbiplint explain`, at the version installed.
12
+
13
+ ## When to run it
14
+
15
+ - After any change to a project's `.tmdl` files or its report's JSON files, however the change was made: a script you wrote and ran, an edit to one file, a modeling MCP server, or the user in Power BI Desktop. When a script writes the project, lint after the script runs.
16
+ - When the user asks to check, review, or lint a project, a model, or a report.
17
+ - Before a commit or a pull request that touches one.
18
+
19
+ ## What it reads
20
+
21
+ A PBIP folder, a `.pbip` file, a `.SemanticModel` folder, a `.Report` folder, a `definition` folder, or one `.tmdl` file. Either part alone is fine.
22
+
23
+ It cannot read a `.pbix` file (the user saves it as a Power BI project first, with File > Save as in Desktop), a report in the older format (one `report.json` with no `definition` folder), or a model stored as `model.bim`. It lints one project per run: given a folder that holds several, it lists them and exits 2, so lint each one it names.
24
+
25
+ It runs on this machine. It reads the project's files and prints to the terminal, it never uses the network, and nothing has to be uploaded to lint a project.
26
+
27
+ ## How to run it
28
+
29
+ Use `npx pbiplint` (or `pbiplint` where it is installed). If pbiplint's MCP tools are available (`lint`, `explain_rule`, and `list_rules`), use them in place of the commands: `lint` takes the project's path with the same `quiet` and `rules` options, and `explain_rule` takes a rule id.
30
+
31
+ 1. `pbiplint <path> --quiet` prints the summary and one line per rule with findings: `<severity> <RULE_ID> <count>`.
32
+ 2. Work on errors first, then warnings. Info findings are suggestions: mention them, do not work through them unless asked.
33
+ 3. `pbiplint <path> --rule <RULE_ID>` prints one rule's findings, each with its file and line. Give `--rule` more than once for several rules.
34
+ 4. Before you fix a rule's findings, run `pbiplint explain <RULE_ID>`. It prints what the rule checks, an example, why it matters, how to fix it, and when to ignore it, at the version that produced the finding. Read it there rather than fetching the rule's web page.
35
+ 5. Make the change, then lint the whole project again, not only the file you changed.
36
+ 6. Stop when the run is clean of what you were asked to fix, or when what is left needs the user.
37
+
38
+ ## Judgment
39
+
40
+ <!-- judgment -->
41
+ - Keep the tabs TMDL uses for indentation, and keep the formatting and key order Power BI Desktop writes, so a change shows as a small diff.
42
+ - Leave each report file's `$schema` as it is.
43
+ - Power BI Desktop can overwrite files that change while it has the project open. If the user may have it open, ask before changing files.
44
+ - Never clear a finding by ignoring it, changing the lint configuration, or deleting the object it names, without the user's say-so.
45
+ - When a finding matches its rule's "When to ignore it" case, ask the user rather than fixing it.
46
+ - Renaming a table, column, or measure reaches the report's files too. After a rename, check the whole project, not only the model.
47
+ - When a fix needs a choice the files don't settle, such as which table's column a visual should use or which page a button should open, ask first, or say plainly when you report back that it was your choice, rather than presenting it as the only answer.
48
+ - After fixing, look for findings your own change introduced, not only the ones you set out to fix. A format string that clears one rule can trip another.
49
+ - Info findings are suggestions, not a to-do list.
50
+ <!-- /judgment -->
51
+
52
+ ## Reading the results
53
+
54
+ - Exit code 0: nothing at or above the gate (errors, by default). 1: something is. 2: nothing was linted: a usage error, an input it cannot read, a folder with several projects, or nothing it can lint. Read stderr for why. The full contract is at https://pbiplint.com/cli/#contract.
55
+ - A rule skipped because it needs a live model has not passed. It was not run.
56
+ - A summary that names a part it did not read (a report file it could not read, a model with no report) has not checked that part.
57
+ - Notices (on stderr, and in the text report) say what the run did with the input, such as linting the one project found below the folder given. Pass them on to the user.
58
+ - `--format json` prints the whole run as one document, for when you need every field.
59
+ - Ignoring a finding means a `pbiplint.ignore` annotation on the object or a change to `pbiplint.config.json`. Both are the user's call.
60
+
61
+ ## Reporting back
62
+
63
+ Tell the user what you fixed, what is left and why, and what needs their decision, naming each rule by its id.
64
+
65
+ <!--
66
+ This skill file is licensed under the MIT License, so it can be committed to any repository.
67
+ The rest of pbiplint is licensed under the GNU Affero General Public License, version 3 or later.
68
+
69
+ MIT License
70
+
71
+ Copyright (c) 2026 McKinley Consulting
72
+
73
+ Permission is hereby granted, free of charge, to any person obtaining a copy
74
+ of this software and associated documentation files (the "Software"), to deal
75
+ in the Software without restriction, including without limitation the rights
76
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
77
+ copies of the Software, and to permit persons to whom the Software is
78
+ furnished to do so, subject to the following conditions:
79
+
80
+ The above copyright notice and this permission notice shall be included in all
81
+ copies or substantial portions of the Software.
82
+
83
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
84
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
85
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
86
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
87
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
88
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
89
+ SOFTWARE.
90
+ -->