code-auditor-mcp 3.9.1 → 3.9.4

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 (170) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +105 -0
  3. package/dist/analyzers/analyzerUtils.js +2 -2
  4. package/dist/analyzers/analyzerUtils.js.map +1 -1
  5. package/dist/analyzers/cross-language/APIContractAnalyzer.js +5 -5
  6. package/dist/analyzers/cross-language/APIContractAnalyzer.js.map +1 -1
  7. package/dist/analyzers/cross-language/DependencyGraphBuilder.d.ts +18 -4
  8. package/dist/analyzers/cross-language/DependencyGraphBuilder.d.ts.map +1 -1
  9. package/dist/analyzers/cross-language/DependencyGraphBuilder.js +67 -16
  10. package/dist/analyzers/cross-language/DependencyGraphBuilder.js.map +1 -1
  11. package/dist/analyzers/cross-language/SchemaValidator.js +7 -7
  12. package/dist/analyzers/cross-language/SchemaValidator.js.map +1 -1
  13. package/dist/analyzers/crossDomain/CrossDomainAnalyzer.d.ts +2 -1
  14. package/dist/analyzers/crossDomain/CrossDomainAnalyzer.d.ts.map +1 -1
  15. package/dist/analyzers/crossDomain/CrossDomainAnalyzer.js +74 -7
  16. package/dist/analyzers/crossDomain/CrossDomainAnalyzer.js.map +1 -1
  17. package/dist/analyzers/documentationAnalyzer.js +5 -5
  18. package/dist/analyzers/documentationAnalyzer.js.map +1 -1
  19. package/dist/analyzers/invariantsAnalyzer.js +1 -1
  20. package/dist/analyzers/invariantsAnalyzer.js.map +1 -1
  21. package/dist/analyzers/reactAnalyzer.d.ts +12 -4
  22. package/dist/analyzers/reactAnalyzer.d.ts.map +1 -1
  23. package/dist/analyzers/reactAnalyzer.js +27 -41
  24. package/dist/analyzers/reactAnalyzer.js.map +1 -1
  25. package/dist/analyzers/ruleRegistry.d.ts +3 -4
  26. package/dist/analyzers/ruleRegistry.d.ts.map +1 -1
  27. package/dist/analyzers/ruleRegistry.js +6 -5
  28. package/dist/analyzers/ruleRegistry.js.map +1 -1
  29. package/dist/analyzers/universal/UniversalConventionsAnalyzer.d.ts +2 -2
  30. package/dist/analyzers/universal/UniversalConventionsAnalyzer.d.ts.map +1 -1
  31. package/dist/analyzers/universal/UniversalConventionsAnalyzer.js +7 -7
  32. package/dist/analyzers/universal/UniversalConventionsAnalyzer.js.map +1 -1
  33. package/dist/analyzers/universal/UniversalDRYAnalyzer.d.ts +6 -6
  34. package/dist/analyzers/universal/UniversalDRYAnalyzer.js +12 -12
  35. package/dist/analyzers/universal/UniversalDRYAnalyzer.js.map +1 -1
  36. package/dist/analyzers/universal/UniversalDataAccessAnalyzer.d.ts +4 -0
  37. package/dist/analyzers/universal/UniversalDataAccessAnalyzer.d.ts.map +1 -1
  38. package/dist/analyzers/universal/UniversalDataAccessAnalyzer.js +70 -77
  39. package/dist/analyzers/universal/UniversalDataAccessAnalyzer.js.map +1 -1
  40. package/dist/analyzers/universal/UniversalDocumentationAnalyzer.d.ts +2 -2
  41. package/dist/analyzers/universal/UniversalDocumentationAnalyzer.js +8 -8
  42. package/dist/analyzers/universal/UniversalDocumentationAnalyzer.js.map +1 -1
  43. package/dist/analyzers/universal/UniversalSOLIDAnalyzer.js +12 -12
  44. package/dist/analyzers/universal/UniversalSOLIDAnalyzer.js.map +1 -1
  45. package/dist/analyzers/universal/UniversalSchemaAnalyzer.d.ts +1 -1
  46. package/dist/analyzers/universal/UniversalSchemaAnalyzer.js +2 -2
  47. package/dist/analyzers/universal/UniversalSchemaAnalyzer.js.map +1 -1
  48. package/dist/analyzers/universal/UniversalStylesAnalyzer.d.ts +12 -5
  49. package/dist/analyzers/universal/UniversalStylesAnalyzer.d.ts.map +1 -1
  50. package/dist/analyzers/universal/UniversalStylesAnalyzer.js +110 -99
  51. package/dist/analyzers/universal/UniversalStylesAnalyzer.js.map +1 -1
  52. package/dist/analyzers/universal/schema/codeAnalysis.d.ts.map +1 -1
  53. package/dist/analyzers/universal/schema/codeAnalysis.js +11 -6
  54. package/dist/analyzers/universal/schema/codeAnalysis.js.map +1 -1
  55. package/dist/analyzers/universal/schema/config.d.ts.map +1 -1
  56. package/dist/analyzers/universal/schema/config.js +1 -0
  57. package/dist/analyzers/universal/schema/config.js.map +1 -1
  58. package/dist/analyzers/universal/schema/jsonSchema.js +19 -19
  59. package/dist/analyzers/universal/schema/jsonSchema.js.map +1 -1
  60. package/dist/analyzers/universal/schema/types.d.ts +3 -0
  61. package/dist/analyzers/universal/schema/types.d.ts.map +1 -1
  62. package/dist/analyzers/universal/schema/violations.d.ts +1 -1
  63. package/dist/analyzers/universal/schema/violations.d.ts.map +1 -1
  64. package/dist/auditRouter.js +4 -4
  65. package/dist/auditRouter.js.map +1 -1
  66. package/dist/auditRunner.d.ts.map +1 -1
  67. package/dist/auditRunner.js +11 -12
  68. package/dist/auditRunner.js.map +1 -1
  69. package/dist/cli.js +41 -56
  70. package/dist/cli.js.map +1 -1
  71. package/dist/config/configLoader.d.ts.map +1 -1
  72. package/dist/config/configLoader.js +1 -16
  73. package/dist/config/configLoader.js.map +1 -1
  74. package/dist/config/defaults.d.ts +1 -8
  75. package/dist/config/defaults.d.ts.map +1 -1
  76. package/dist/config/defaults.js +8 -31
  77. package/dist/config/defaults.js.map +1 -1
  78. package/dist/config/effectiveConfig.d.ts +4 -4
  79. package/dist/config/effectiveConfig.js +4 -4
  80. package/dist/daemon/lspServer.js +2 -2
  81. package/dist/daemon/lspServer.js.map +1 -1
  82. package/dist/enforcement/gate.d.ts +1 -1
  83. package/dist/enforcement/gate.d.ts.map +1 -1
  84. package/dist/enforcement/gate.js +10 -9
  85. package/dist/enforcement/gate.js.map +1 -1
  86. package/dist/hooks/codex.d.ts +2 -2
  87. package/dist/hooks/codex.d.ts.map +1 -1
  88. package/dist/hooks/codex.js +22 -37
  89. package/dist/hooks/codex.js.map +1 -1
  90. package/dist/hooks/core.d.ts +2 -2
  91. package/dist/hooks/core.d.ts.map +1 -1
  92. package/dist/hooks/core.js +6 -6
  93. package/dist/hooks/core.js.map +1 -1
  94. package/dist/hooks/cursor.d.ts +1 -1
  95. package/dist/hooks/cursor.d.ts.map +1 -1
  96. package/dist/hooks/cursor.js +18 -37
  97. package/dist/hooks/cursor.js.map +1 -1
  98. package/dist/invariants/invariant-rules.schema.json +1 -1
  99. package/dist/invariants/ruleValidator.js +1 -1
  100. package/dist/invariants/ruleValidator.js.map +1 -1
  101. package/dist/invariants/types.d.ts +1 -1
  102. package/dist/invariants/types.d.ts.map +1 -1
  103. package/dist/languages/LanguageOrchestrator.d.ts +2 -2
  104. package/dist/languages/LanguageOrchestrator.d.ts.map +1 -1
  105. package/dist/languages/RuntimeManager.js +2 -2
  106. package/dist/languages/RuntimeManager.js.map +1 -1
  107. package/dist/languages/UniversalAnalyzer.d.ts +2 -13
  108. package/dist/languages/UniversalAnalyzer.d.ts.map +1 -1
  109. package/dist/languages/UniversalAnalyzer.js +2 -23
  110. package/dist/languages/UniversalAnalyzer.js.map +1 -1
  111. package/dist/languages/go/analyzer +0 -0
  112. package/dist/languages/go/analyzer-src/analyzer.go +8 -8
  113. package/dist/languages/go/analyzer-src/solid.go +6 -6
  114. package/dist/languages/testConventions.d.ts +13 -0
  115. package/dist/languages/testConventions.d.ts.map +1 -1
  116. package/dist/languages/testConventions.js +18 -0
  117. package/dist/languages/testConventions.js.map +1 -1
  118. package/dist/ledger.js +1 -1
  119. package/dist/ledger.js.map +1 -1
  120. package/dist/mcp-tools/projectTasks.d.ts.map +1 -1
  121. package/dist/mcp-tools/projectTasks.js +4 -5
  122. package/dist/mcp-tools/projectTasks.js.map +1 -1
  123. package/dist/mcp-tools/workflowGuide.js +3 -3
  124. package/dist/mcp-tools/workflowGuide.js.map +1 -1
  125. package/dist/mcp-tools-shared.d.ts.map +1 -1
  126. package/dist/mcp-tools-shared.js +21 -20
  127. package/dist/mcp-tools-shared.js.map +1 -1
  128. package/dist/mcp-ui-simple.js +15 -15
  129. package/dist/mcp-ui-simple.js.map +1 -1
  130. package/dist/mcp.js +20 -19
  131. package/dist/mcp.js.map +1 -1
  132. package/dist/mcpAuditJobs.js +14 -14
  133. package/dist/mcpAuditJobs.js.map +1 -1
  134. package/dist/mcpAutoIndex.js +1 -1
  135. package/dist/mcpAutoIndex.js.map +1 -1
  136. package/dist/nextFile.d.ts +2 -2
  137. package/dist/nextFile.d.ts.map +1 -1
  138. package/dist/nextFile.js +4 -5
  139. package/dist/nextFile.js.map +1 -1
  140. package/dist/nextFileIncremental.d.ts +2 -2
  141. package/dist/nextFileIncremental.d.ts.map +1 -1
  142. package/dist/nextFileIncremental.js +7 -7
  143. package/dist/nextFileIncremental.js.map +1 -1
  144. package/dist/pipeline.d.ts.map +1 -1
  145. package/dist/pipeline.js +4 -8
  146. package/dist/pipeline.js.map +1 -1
  147. package/dist/pipelineAdapters.d.ts.map +1 -1
  148. package/dist/pipelineAdapters.js +73 -11
  149. package/dist/pipelineAdapters.js.map +1 -1
  150. package/dist/reporting/csvReportGenerator.js +7 -7
  151. package/dist/reporting/csvReportGenerator.js.map +1 -1
  152. package/dist/reporting/htmlReportGenerator.js +18 -18
  153. package/dist/reporting/htmlReportGenerator.js.map +1 -1
  154. package/dist/reporting/jsonReportGenerator.js +3 -3
  155. package/dist/reporting/jsonReportGenerator.js.map +1 -1
  156. package/dist/reporting/sarifReportGenerator.js +3 -3
  157. package/dist/reporting/sarifReportGenerator.js.map +1 -1
  158. package/dist/scripts/benchmarkWorkers.js +1 -1
  159. package/dist/scripts/benchmarkWorkers.js.map +1 -1
  160. package/dist/types/crossLanguage.d.ts +1 -1
  161. package/dist/types/crossLanguage.d.ts.map +1 -1
  162. package/dist/types.d.ts +26 -24
  163. package/dist/types.d.ts.map +1 -1
  164. package/dist/types.js +11 -0
  165. package/dist/types.js.map +1 -1
  166. package/package.json +1 -1
  167. package/plugin/.claude-plugin/plugin.json +1 -1
  168. package/plugin/skills/code-auditor/SKILL-RULE-KINDS.md +25 -23
  169. package/plugin/skills/code-auditor/SKILL.md +9 -9
  170. package/server.json +2 -2
@@ -5,7 +5,7 @@ description: Audit code quality, search the codebase semantically, enforce invar
5
5
 
6
6
  # Code Auditor Skill
7
7
 
8
- > **Version 3.9.1** • Run `code-audit --version` to check your installed version.
8
+ > **Version 3.9.4** • Run `code-audit --version` to check your installed version.
9
9
  > If versions differ, the CLI is authoritative — use `code-audit <command> --help` to see what your install actually supports.
10
10
 
11
11
  You have the `code-audit` CLI available. It indexes every function, component, and struct in the codebase for semantic search and invariant enforcement. Use these commands instead of raw grep/find whenever possible.
@@ -16,7 +16,7 @@ You have the `code-audit` CLI available. It indexes every function, component, a
16
16
 
17
17
  - **Reading** — the human-facing name for one rule observation. The machine contract calls the same thing a **violation** (a "finding" in the JSON). The audit *takes* readings; it does not issue verdicts.
18
18
  - **Coverage panel** — the report leads with what was measured (which rules fired, which were clean, which were not applicable), so a zero-reading run is not mistaken for a clean tree.
19
- - **Triage** — severity is the order to act (`critical` `warning` `suggestion`), not a truth score. A suggestion reading is as real as a critical one; it is just lower in the queue.
19
+ - **Triage** — severity is urgency, not permission. Three levels, all defects, none optional: **critical** (exploitable or broken now), **severe** (wrong, and it will surface), **high** (wrong, and it has not bitten yet). The axis is how fast a reading bites you, not whether it matters — every reading blocks the edit gate. Queue order (`critical` `severe` → `high`) is the order to act, not a license to skip.
20
20
 
21
21
  ## When to use which command
22
22
 
@@ -51,9 +51,9 @@ code-audit changed --json # Diff-scoped audit (hook c
51
51
 
52
52
  Use `code-audit changed` after edits to confirm you haven't introduced violations. If the hook is active it already runs `code-audit changed` automatically on Write/Edit — pay attention to its output.
53
53
 
54
- **Every reading is a measurement, not a verdict.** The audit is a diagnostic instrument: it reports what it measured (the coverage panel) and takes one reading per rule violation. Work readings in triage order — critical first, then warning, then suggestion — and resolve them all. Severity is triage, the order to act, never a judgment on whether a reading is real; there is no "noise" tier. Documentation readings (missing JSDoc) are maintainability gaps, not stylistic niceties. If you choose not to resolve one, record why before moving on — never silently dismiss it.
54
+ **Every reading is a measurement, not a verdict.** The audit is a diagnostic instrument: it reports what it measured (the coverage panel) and takes one reading per rule violation. Work readings in urgency order — critical first, then severe, then high — and resolve them all. Severity is urgency, the order to act, never a judgment on whether a reading is real; there is no "noise" tier. Documentation readings (missing JSDoc) are maintainability gaps, not stylistic niceties. If you choose not to resolve one, record why before moving on — never silently dismiss it.
55
55
 
56
- Expected output: JSON violation list (with `--json`) or colored terminal summary. The full `audit` command exits non-zero when violations at or above `--fail-on` severity exist; the `changed` hook blocks on any violation at a blocking severity — `critical` and `warning` by default, configurable via `gateSeverities` in `.codeauditor.json` from any rule, and enforcement is not diff-scoped (a pre-existing violation in the audited file blocks exactly like a new one).
56
+ Expected output: JSON violation list (with `--json`) or colored terminal summary. The full `audit` command exits non-zero when violations at or above `--fail-on` severity exist. Every severity blocks: `critical`, `severe`, and `high` are all gating. The `changed` hook blocks on any violation from any rule — there is no non-blocking tier — and enforcement is not diff-scoped (a pre-existing violation in the audited file blocks exactly like a new one).
57
57
 
58
58
  ### `code-audit next-file` — fix violations one file at a time
59
59
 
@@ -62,7 +62,7 @@ code-audit next-file --path . # Highest-priority file + all its readings
62
62
  code-audit next-file --path . --json # Machine-readable
63
63
  ```
64
64
 
65
- This is the refactoring loop. `next-file` audits the project and returns the single highest-priority file — ranked by highest-severity reading, then total reading count — with every reading on it, ordered critical → warningsuggestion. Fix that file, then run it again: a still-broken file comes back, otherwise the next-worst file surfaces. `{done:true}` means the tree is clean.
65
+ This is the refactoring loop. `next-file` audits the project and returns the single highest-priority file — ranked by highest-severity reading, then total reading count — with every reading on it, ordered critical → severehigh. Fix that file, then run it again: a still-broken file comes back, otherwise the next-worst file surfaces. `{done:true}` means the tree is clean.
66
66
 
67
67
  There is **no skip or decline affordance**. A reading leaves the queue only by being fixed, or by editing the rule that produces it in `.codeauditor.json` (your rules editor). If a rule keeps firing on something you judge correct, change the rule — never work around it.
68
68
 
@@ -96,7 +96,7 @@ Path profiles are an ordered array — files matching multiple profiles merge ov
96
96
 
97
97
  A **built-in** `scripts-and-tests` profile ships with every install — it excludes `scripts/**`, `tests/**`, `__tests__/**`, `fixtures/**`, and `*.test.*`/`*.spec.*` files from the gate. Disable it with `"builtin": false` in `.codeauditor.json`.
98
98
 
99
- Invariant violations are **immune** to path profile gate exclusion — invariants enforce declared laws and block on the same severity gate as every other rule (`critical` and `warning` by default).
99
+ Invariant violations are **immune** to path profile gate exclusion — invariants enforce declared laws and block on the same gate as every other rule (all of `critical`, `severe`, and `high`).
100
100
 
101
101
  ### `code-audit index` — refresh the index after structural changes
102
102
 
@@ -124,7 +124,7 @@ Creates a `.codeauditor.json` configuration file with invariant rules for your p
124
124
 
125
125
  ### `code-audit conventions` — mine and propose rules
126
126
 
127
- Code Auditor learns your codebase's unwritten conventions from the function index and flags deviations at suggestion severity. Use these to discover norms an unfamiliar agent would otherwise break:
127
+ Code Auditor learns your codebase's unwritten conventions from the function index and flags deviations at high severity. Use these to discover norms an unfamiliar agent would otherwise break:
128
128
 
129
129
  ```bash
130
130
  code-audit conventions list # See what conventions were mined
@@ -146,7 +146,7 @@ code-audit conventions propose --json # JSON proposal array
146
146
 
147
147
  **Usage:** Run a full audit or `code-audit index sync` to mine conventions from the codebase index. Then `code-audit conventions list` to see what was found, and `code-audit conventions propose` to get the rules. Paste the proposals into the `rules` array in `.codeauditor.json`.
148
148
 
149
- Convention readings ship at `suggestion` severity by default. Severity is triage — how a violation blocks the edit gate, not whether it matters. Resolve suggestions the same way you resolve warnings, and promote them with `severityOverrides` if your team wants them to block edits too.
149
+ Convention readings ship at `high` severity by default. Severity is urgency — how fast a violation bites, not whether it matters. Every severity blocks the edit gate, so a `high` convention reading is a real defect to resolve, not a hint to ignore.
150
150
 
151
151
  ### `code-audit hotspots` — identify churn-prone code
152
152
 
@@ -188,7 +188,7 @@ When an edit hook blocks your edit with a violation message:
188
188
  1. **Read the violation** — it includes the invariant rule's `message` field explaining *why* the edit was blocked
189
189
  2. **Fix the violation** — change your approach to comply with the invariant
190
190
  3. **Do NOT retry the same edit** — the hook will block it again
191
- 4. The hook runs `code-audit changed`, and its gate is severity-scoped: any violation at a blocking severity (`critical` and `warning` by default, configurable via `gateSeverities` in `.codeauditor.json`) blocks the edit, from any rule. Suggestions are still violations and must be resolved they report but do not block by default.
191
+ 4. The hook runs `code-audit changed`, and its gate blocks on every violation from any rule `critical`, `severe`, and `high` all block; there is no non-blocking severity tier. A `high` reading blocks the edit exactly like a `critical` one; urgency only sets the order you fix things, never whether they gate.
192
192
 
193
193
  The hook auto-installs the package via npx on first use — no manual npm step needed. If the hook reports `[code-auditor] code-audit could not run`, the npx auto-install failed (network, unsupported platform). The agent should try again; if it persists, `npm install code-auditor-mcp` is the manual fix.
194
194
 
package/server.json CHANGED
@@ -6,13 +6,13 @@
6
6
  "url": "https://github.com/BenAHammond/code-auditor-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "3.9.1",
9
+ "version": "3.9.4",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "registryBaseUrl": "https://registry.npmjs.org",
14
14
  "identifier": "code-auditor-mcp",
15
- "version": "3.9.1",
15
+ "version": "3.9.4",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  }