code-auditor-mcp 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +31 -0
  3. package/dist/analyzers/applicability.d.ts +6 -5
  4. package/dist/analyzers/applicability.d.ts.map +1 -1
  5. package/dist/analyzers/applicability.js +1 -26
  6. package/dist/analyzers/applicability.js.map +1 -1
  7. package/dist/analyzers/ruleRegistry.d.ts +14 -12
  8. package/dist/analyzers/ruleRegistry.d.ts.map +1 -1
  9. package/dist/analyzers/ruleRegistry.js +5 -96
  10. package/dist/analyzers/ruleRegistry.js.map +1 -1
  11. package/dist/analyzers/ruleTiming.d.ts +2 -2
  12. package/dist/analyzers/ruleTiming.js +2 -2
  13. package/dist/analyzers/universal/UniversalSchemaAnalyzer.d.ts.map +1 -1
  14. package/dist/analyzers/universal/UniversalSchemaAnalyzer.js +5 -2
  15. package/dist/analyzers/universal/UniversalSchemaAnalyzer.js.map +1 -1
  16. package/dist/analyzers/universal/schema/discovery.d.ts +29 -1
  17. package/dist/analyzers/universal/schema/discovery.d.ts.map +1 -1
  18. package/dist/analyzers/universal/schema/discovery.js +76 -21
  19. package/dist/analyzers/universal/schema/discovery.js.map +1 -1
  20. package/dist/auditRunner.d.ts.map +1 -1
  21. package/dist/auditRunner.js +0 -27
  22. package/dist/auditRunner.js.map +1 -1
  23. package/dist/cli.js +69 -79
  24. package/dist/cli.js.map +1 -1
  25. package/dist/codeIndexDB.js +6 -6
  26. package/dist/codeIndexDB.js.map +1 -1
  27. package/dist/config/configLoader.d.ts.map +1 -1
  28. package/dist/config/configLoader.js +15 -0
  29. package/dist/config/configLoader.js.map +1 -1
  30. package/dist/config/defaults.d.ts +8 -1
  31. package/dist/config/defaults.d.ts.map +1 -1
  32. package/dist/config/defaults.js +10 -1
  33. package/dist/config/defaults.js.map +1 -1
  34. package/dist/dataPaths.js +18 -1
  35. package/dist/dataPaths.js.map +1 -1
  36. package/dist/enforcement/gate.d.ts +14 -19
  37. package/dist/enforcement/gate.d.ts.map +1 -1
  38. package/dist/enforcement/gate.js +27 -45
  39. package/dist/enforcement/gate.js.map +1 -1
  40. package/dist/pipeline.d.ts.map +1 -1
  41. package/dist/pipeline.js +21 -3
  42. package/dist/pipeline.js.map +1 -1
  43. package/dist/styles/styleExtractor.js +2 -2
  44. package/dist/styles/styleExtractor.js.map +1 -1
  45. package/dist/styles/styleIndexer.js +7 -6
  46. package/dist/styles/styleIndexer.js.map +1 -1
  47. package/dist/styles/types.d.ts +3 -2
  48. package/dist/styles/types.d.ts.map +1 -1
  49. package/dist/types.d.ts +16 -30
  50. package/dist/types.d.ts.map +1 -1
  51. package/dist/types.js.map +1 -1
  52. package/package.json +12 -4
  53. package/plugin/.claude-plugin/plugin.json +1 -1
  54. package/plugin/README.md +5 -3
  55. package/plugin/scripts/hook-audit.sh +20 -30
  56. package/plugin/scripts/hook-common.sh +63 -0
  57. package/plugin/scripts/hook-self-audit.sh +23 -31
  58. package/plugin/skills/code-auditor/SKILL.md +2 -2
@@ -10,7 +10,7 @@
10
10
  "name": "code-auditor",
11
11
  "source": "./plugin",
12
12
  "description": "Diff-scoped code quality auditing on every edit. Indexes your codebase, enforces invariants, and feeds violations back to the agent so fixes happen inline.",
13
- "version": "3.5.0",
13
+ "version": "3.6.0",
14
14
  "author": {
15
15
  "name": "Ben Hammond"
16
16
  },
package/CHANGELOG.md CHANGED
@@ -2,6 +2,37 @@
2
2
 
3
3
  All notable changes to the Code Auditor MCP project.
4
4
 
5
+ ## [3.6.0] — 2026-09-05
6
+
7
+ ### Enforcement — Spec 45 reverts the unauthorized narrowings
8
+ The R6 survey found ten enforcement/gating/reporting narrowings written into
9
+ specs 36–42 without agreement. Spec 45 reverts them all. Corpus baselines are
10
+ unchanged — the finding set is identical across all six corpora.
11
+
12
+ - **Every rule gates (R1)** — the per-rule `gating` opt-in is removed; a finding
13
+ gates regardless of which rule produced it, with no requirement that the rule
14
+ name a resolution first.
15
+ - **Severity-scoped gate (R2)** — severity returns to the gating decision; the
16
+ gate blocks `critical` and `warning`, recording a resolution gap rather than
17
+ dropping the finding to non-blocking.
18
+ - **No decaying suppressions (R3)** — the decaying-suppression mechanism is
19
+ removed (it was never built).
20
+ - **Enforcement is not diff-scoped (R4)** — the gate compares against the full
21
+ finding set, not only the lines the current edit touched.
22
+ - **`styles/undefined-class` reports on unread stylesheets (R5)** — a
23
+ `.sass`/`.less`/`.styl` stylesheet no longer silences the rule with
24
+ `notApplicable`; the finding still fires and carries the unread source as
25
+ `details.incompleteDefinitions`, so "undefined" reads as "not defined in any
26
+ *read* stylesheet".
27
+
28
+ ### Amendment A
29
+ - **A1** — a slow rule is optimized, never dropped from the gate (Spec 38 R3's
30
+ "removed from the gating set" is struck). The budget is reported, never
31
+ silently widened.
32
+ - **A2** — counts are emitted in agent-facing output: per analyzer, per rule,
33
+ per severity, and the before/after gating figure (Spec 36 R3's "no bare
34
+ counts" is struck).
35
+
5
36
  ## [3.5.0] — 2026-09-05
6
37
 
7
38
  ### Rule authenticity — the dishonest rules now do what they claim
@@ -27,9 +27,11 @@ export interface RuleApplicability {
27
27
  kind?: 'notApplicable' | 'cannot-fire';
28
28
  }
29
29
  /**
30
- * A stylesheet source the style indexer could not read (Spec 42 R2). When any
31
- * exist, styles/undefined-class must not assert a class is undefined because it
32
- * may be defined in one of these files.
30
+ * A stylesheet source the style indexer could not read (Spec 45 R5). When any
31
+ * exist, `styles/undefined-class` still fires the class has no matching
32
+ * definition in any *read* stylesheet but each finding carries this list as
33
+ * `details.incompleteDefinitions` so "undefined" reads as "not defined in any
34
+ * read stylesheet", not as a definitive assertion about the whole project.
33
35
  */
34
36
  export interface UnreadStyleSourceInfo {
35
37
  filePath: string;
@@ -46,9 +48,8 @@ export interface UnreadStyleSourceInfo {
46
48
  * @param ruleId The registry rule id.
47
49
  * @param dataAccessConfig The namespaced data-access config (may be undefined).
48
50
  * @param ddlColumns Aggregated DDL-declared columns from the schema reducer.
49
- * @param unreadStyleSources Stylesheets the indexer could not read (Spec 42 R2).
50
51
  * @returns The rule's applicability verdict, or null when the rule declares no
51
52
  * applicability predicate and runs unconditionally.
52
53
  */
53
- export declare function evaluateRuleApplicability(ruleId: string, dataAccessConfig: Record<string, unknown> | undefined, ddlColumns: string[] | undefined, unreadStyleSources?: UnreadStyleSourceInfo[]): RuleApplicability | null;
54
+ export declare function evaluateRuleApplicability(ruleId: string, dataAccessConfig: Record<string, unknown> | undefined, ddlColumns: string[] | undefined): RuleApplicability | null;
54
55
  //# sourceMappingURL=applicability.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"applicability.d.ts","sourceRoot":"","sources":["../../src/analyzers/applicability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,eAAe,GAAG,aAAa,CAAC;CACxC;AAUD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACrD,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,EAChC,kBAAkB,CAAC,EAAE,qBAAqB,EAAE,GAC3C,iBAAiB,GAAG,IAAI,CAY1B"}
1
+ {"version":3,"file":"applicability.d.ts","sourceRoot":"","sources":["../../src/analyzers/applicability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,eAAe,GAAG,aAAa,CAAC;CACxC;AAUD;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACrD,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,GAC/B,iBAAiB,GAAG,IAAI,CAS1B"}
@@ -32,14 +32,10 @@ const DEFAULT_ORG_FILTER_COLUMNS = ['org_id', 'tenant_id', 'organization_id', 'w
32
32
  * @param ruleId The registry rule id.
33
33
  * @param dataAccessConfig The namespaced data-access config (may be undefined).
34
34
  * @param ddlColumns Aggregated DDL-declared columns from the schema reducer.
35
- * @param unreadStyleSources Stylesheets the indexer could not read (Spec 42 R2).
36
35
  * @returns The rule's applicability verdict, or null when the rule declares no
37
36
  * applicability predicate and runs unconditionally.
38
37
  */
39
- export function evaluateRuleApplicability(ruleId, dataAccessConfig, ddlColumns, unreadStyleSources) {
40
- if (ruleId === 'styles/undefined-class') {
41
- return evaluateUndefinedClassApplicability(unreadStyleSources);
42
- }
38
+ export function evaluateRuleApplicability(ruleId, dataAccessConfig, ddlColumns) {
43
39
  if (ruleId === 'missing-org-filter') {
44
40
  return evaluateMissingOrgFilterApplicability(dataAccessConfig, ddlColumns);
45
41
  }
@@ -77,27 +73,6 @@ const CANNOT_FIRE_RULES = new Map([
77
73
  ['constraint-mismatch', 'cannot fire — extractSchemas never assigns `constraints` on fields, the input this rule reads'],
78
74
  ['version-mismatch', 'cannot fire — extractSchemas never assigns `version` on schemas, the input this rule reads'],
79
75
  ]);
80
- /**
81
- * Spec 42 R2 — whole-run scope: if any stylesheet went unread, a class this
82
- * detector would otherwise flag undefined may in fact be defined there. Report
83
- * notApplicable naming what was unread rather than assert undefined.
84
- */
85
- function evaluateUndefinedClassApplicability(unreadStyleSources) {
86
- if (unreadStyleSources && unreadStyleSources.length > 0) {
87
- // Surface the per-source reason (which encodes the offending extension for
88
- // the Spec 43 R5 fallthrough, or the unsupported dialect for Spec 42 R2)
89
- // rather than only the file path, so a "loud" fallthrough stays loud end to
90
- // end instead of being collapsed back to a bare path list.
91
- const names = unreadStyleSources
92
- .map((s) => (s.reason ? `${s.filePath} (${s.reason})` : s.filePath))
93
- .join(', ');
94
- return {
95
- applicable: false,
96
- reason: `stylesheets were not read: ${names}`,
97
- };
98
- }
99
- return null;
100
- }
101
76
  /**
102
77
  * Spec 39/42 R3 — `missing-org-filter` is applicable when the project declares a
103
78
  * tenant-scoping column in one of three places: configured tenant tables by name,
@@ -1 +1 @@
1
- {"version":3,"file":"applicability.js","sourceRoot":"","sources":["../../src/analyzers/applicability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAeH;;;;;GAKG;AACH,MAAM,0BAA0B,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,iBAAiB,EAAE,cAAc,CAAC,CAAC;AAY9F;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,yBAAyB,CACvC,MAAc,EACd,gBAAqD,EACrD,UAAgC,EAChC,kBAA4C;IAE5C,IAAI,MAAM,KAAK,wBAAwB,EAAE,CAAC;QACxC,OAAO,mCAAmC,CAAC,kBAAkB,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,MAAM,KAAK,oBAAoB,EAAE,CAAC;QACpC,OAAO,qCAAqC,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;IAC7E,CAAC;IACD,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvD,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACnC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,gBA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AAM,EAAE,iDAAiD;KAC1D,CAAC;AACJ,CAAC"}
@@ -22,9 +22,13 @@ import type { Resolution } from '../types.js';
22
22
  * NOTE: invariants analyzer rule IDs are user-defined and variable —
23
23
  * `config-error` and `engine-error` are the only fixed, internal ones.
24
24
  *
25
- * Spec 37 R2: every entry carries `gating`, `resolvable`, `message`, `docs`,
26
- * and `thresholds`. Missing any field is a build failure (the interface makes
25
+ * Spec 37 R2: every entry carries `resolvable`, `message`, `docs`, and
26
+ * `thresholds`. Missing any field is a build failure (the interface makes
27
27
  * them required; the registry test re-asserts the contract at runtime).
28
+ *
29
+ * Spec 45 R1: there is no per-rule `gating` opt-in. Every registered rule
30
+ * participates in the blocking gate; whether a finding blocks is decided by
31
+ * severity (R2) at the gate, not by a flag on the rule.
28
32
  */
29
33
  export interface RuleRegistryEntry {
30
34
  /** The analyzer that emits this rule ID. */
@@ -55,16 +59,12 @@ export interface RuleRegistryEntry {
55
59
  * dependency-graph), whose rules stay `unassessed`.
56
60
  */
57
61
  input?: string[];
58
- /**
59
- * Spec 36 R4 / Spec 37 R2 — whether this rule participates in the blocking
60
- * gate. The gate is binary: a rule either gates or it does not. A gating
61
- * rule MUST also be `resolvable` (Spec 36 R6); the registry test enforces it.
62
- */
63
- gating: boolean;
64
62
  /**
65
63
  * Spec 37 R1 — whether this rule can produce a `resolution` (a specific next
66
64
  * action naming concrete symbols/files/lines) for every occurrence it emits.
67
- * `gating: true` with `resolvable: false` is a contract violation.
65
+ * A `resolvable` rule that emits without a resolution still gates (Spec 45
66
+ * R1); the missing action is recorded as a gap, not grounds to skip
67
+ * enforcement.
68
68
  */
69
69
  resolvable: boolean;
70
70
  /**
@@ -165,11 +165,13 @@ interface ViolationLike {
165
165
  * The registry records which field on the Violation carries the rule ID
166
166
  * (`field` — `rule` for almost every analyzer, `type` for dependency-graph).
167
167
  * This helper reads that field off the violation and matches it against the
168
- * registry key, so gate decisions (Spec 36 R4/R6) never hard-code a field.
168
+ * registry key, so the gate's resolution-gap detection (Spec 45 R1) never
169
+ * hard-codes a field.
169
170
  *
170
171
  * Invariant violations (user-defined rule IDs) have no registry entry and
171
- * return `undefined` they are always "new" and never gating (their gate
172
- * decision is made by the invariant rule engine, not this map).
172
+ * return `undefined`. They still gate (Spec 45 R1) the gate blocks on every
173
+ * finding at a blocking severity; the registry only determines whether a
174
+ * missing resolution is a recorded gap.
173
175
  */
174
176
  export declare function getViolationRuleEntry(v: ViolationLike): Readonly<RuleRegistryEntry> | undefined;
175
177
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ruleRegistry.d.ts","sourceRoot":"","sources":["../../src/analyzers/ruleRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,MAAM,GAAG,cAAc,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC/F;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;;;OAKG;IACH,OAAO,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACzB,+FAA+F;IAC/F,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,QAAQ,CAAC,EA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