@hiro-c/agent-gate 1.4.0 → 1.5.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.
package/README.md CHANGED
@@ -74,7 +74,7 @@ Full options: see [docs/config.md](docs/config.md) (TODO) or `AgentGatePluginCon
74
74
  |---|---|
75
75
  | `agent-gate` | Run as hook (reads stdin, used internally) |
76
76
  | `agent-gate install` / `uninstall` | Register or remove the Claude Code hook |
77
- | `agent-gate lint` | Audit instruction files for ambiguity, emptiness, missing rules |
77
+ | `agent-gate lint [--ai]` | Audit instruction files for ambiguity, emptiness, missing rules. `--ai` adds AI-driven contradiction / ambiguity / missing-imperative checks |
78
78
  | `agent-gate stats` | Summarize the decision log (after `AGENT_GATE_LOG=1`) |
79
79
  | `agent-gate daemon` | Long-lived server on a Unix socket (opt-in speedup, set `AGENT_GATE_DAEMON=1`) |
80
80
 
@@ -7,6 +7,7 @@ interface ParsedArgs {
7
7
  agentId: string;
8
8
  showHelp: boolean;
9
9
  showVersion: boolean;
10
+ ai: boolean;
10
11
  }
11
12
  export declare function parseArgs(args: string[]): ParsedArgs;
12
13
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"agent-gate.d.ts","sourceRoot":"","sources":["../../src/cli/agent-gate.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAYtE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAuC7C,wBAAsB,GAAG,CACvB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,gBAAgB,CAAC,CAE3B;AAuHD,UAAU,UAAU;IAClB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAgCpD"}
1
+ {"version":3,"file":"agent-gate.d.ts","sourceRoot":"","sources":["../../src/cli/agent-gate.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAYtE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AA4C7C,wBAAsB,GAAG,CACvB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,gBAAgB,CAAC,CAE3B;AAuHD,UAAU,UAAU;IAClB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,EAAE,EAAE,OAAO,CAAA;CACZ;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAqCpD"}
@@ -11,7 +11,11 @@ const stats_1 = require("../observability/stats");
11
11
  const decisionLogger_1 = require("../observability/decisionLogger");
12
12
  const collectRuleSources_1 = require("../collector/collectRuleSources");
13
13
  const lintRuleSources_1 = require("../doctor/lintRuleSources");
14
+ const lintRuleSourcesWithAi_1 = require("../doctor/lintRuleSourcesWithAi");
14
15
  const formatFindings_1 = require("../doctor/formatFindings");
16
+ const Config_1 = require("../config/Config");
17
+ const AnthropicApi_1 = require("../validation/models/AnthropicApi");
18
+ const ClaudeCli_1 = require("../validation/models/ClaudeCli");
15
19
  const server_1 = require("../daemon/server");
16
20
  const client_1 = require("../daemon/client");
17
21
  const protocol_1 = require("../daemon/protocol");
@@ -24,7 +28,8 @@ Usage:
24
28
  agent-gate install Register the hook in ~/.claude/settings.json
25
29
  agent-gate uninstall Remove the hook from ~/.claude/settings.json
26
30
  agent-gate stats Summarize decisions from the log file
27
- agent-gate lint Audit CLAUDE.md / AGENTS.md / etc. for AI-friendliness
31
+ agent-gate lint [--ai] Audit CLAUDE.md / AGENTS.md / etc. for AI-friendliness
32
+ (--ai adds AI-driven contradiction / ambiguity / missing-imperative checks)
28
33
  agent-gate daemon Start the long-lived daemon (Unix socket)
29
34
  agent-gate --help Show this help
30
35
  agent-gate --version Show version
@@ -146,6 +151,7 @@ function parseArgs(args) {
146
151
  let agentId = adapters_1.DEFAULT_ADAPTER_ID;
147
152
  let showHelp = false;
148
153
  let showVersion = false;
154
+ let ai = false;
149
155
  const positional = [];
150
156
  for (let i = 0; i < args.length; i++) {
151
157
  const a = args[i];
@@ -161,6 +167,10 @@ function parseArgs(args) {
161
167
  agentId = a.slice('--agent='.length);
162
168
  continue;
163
169
  }
170
+ if (a === '--ai') {
171
+ ai = true;
172
+ continue;
173
+ }
164
174
  if (a === '--help' || a === '-h' || a === 'help') {
165
175
  showHelp = true;
166
176
  continue;
@@ -171,7 +181,7 @@ function parseArgs(args) {
171
181
  }
172
182
  positional.push(a);
173
183
  }
174
- return { positional, agentId, showHelp, showVersion };
184
+ return { positional, agentId, showHelp, showVersion, ai };
175
185
  }
176
186
  function main() {
177
187
  const parsedArgs = parseArgs(process.argv.slice(2));
@@ -203,7 +213,7 @@ function main() {
203
213
  runStats();
204
214
  return;
205
215
  case 'lint':
206
- runLint();
216
+ void runLint(parsedArgs.ai);
207
217
  return;
208
218
  case 'daemon':
209
219
  void runDaemon();
@@ -218,13 +228,22 @@ function runStats() {
218
228
  const stats = (0, stats_1.readStats)((0, decisionLogger_1.defaultLogPath)());
219
229
  console.log((0, stats_1.formatStats)(stats));
220
230
  }
221
- function runLint() {
222
- const sources = (0, collectRuleSources_1.collectRuleSources)(process.cwd());
231
+ async function runLint(useAi) {
232
+ const cwd = process.cwd();
233
+ const sources = (0, collectRuleSources_1.collectRuleSources)(cwd);
223
234
  if (sources.length === 0) {
224
235
  console.log('No instruction files found (looked for CLAUDE.md, AGENTS.md, .cursorrules, .cursor/rules/*.mdc, .clinerules/*.md, .windsurf/rules/*.md, .github/copilot-instructions.md, CONVENTIONS.md).');
225
236
  return;
226
237
  }
227
238
  const findings = (0, lintRuleSources_1.lintRuleSources)(sources);
239
+ if (useAi) {
240
+ const config = new Config_1.Config();
241
+ const client = config.useApi
242
+ ? new AnthropicApi_1.AnthropicApi(config)
243
+ : new ClaudeCli_1.ClaudeCli(config, cwd);
244
+ const aiFindings = await (0, lintRuleSourcesWithAi_1.lintRuleSourcesWithAi)(sources, client);
245
+ findings.push(...aiFindings);
246
+ }
228
247
  console.log((0, formatFindings_1.formatFindings)(findings));
229
248
  const hasError = findings.some((f) => f.severity === 'error');
230
249
  if (hasError) {
@@ -1,6 +1,6 @@
1
1
  import { RuleSourceKind } from '../contracts/types/RuleSource';
2
2
  export type Severity = 'info' | 'warning' | 'error';
3
- export type FindingCode = 'empty-file' | 'ambiguous-modifier' | 'no-concrete-rules';
3
+ export type FindingCode = 'empty-file' | 'ambiguous-modifier' | 'no-concrete-rules' | 'ambiguity' | 'contradiction' | 'missing-imperative';
4
4
  export interface Finding {
5
5
  ruleSourcePath: string;
6
6
  ruleSourceKind: RuleSourceKind;
@@ -1 +1 @@
1
- {"version":3,"file":"findings.d.ts","sourceRoot":"","sources":["../../src/doctor/findings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAE9D,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAEnD,MAAM,MAAM,WAAW,GACnB,YAAY,GACZ,oBAAoB,GACpB,mBAAmB,CAAA;AAEvB,MAAM,WAAW,OAAO;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,cAAc,CAAA;IAC9B,QAAQ,EAAE,QAAQ,CAAA;IAClB,IAAI,EAAE,WAAW,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"}
1
+ {"version":3,"file":"findings.d.ts","sourceRoot":"","sources":["../../src/doctor/findings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAE9D,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAEnD,MAAM,MAAM,WAAW,GACnB,YAAY,GACZ,oBAAoB,GACpB,mBAAmB,GACnB,WAAW,GACX,eAAe,GACf,oBAAoB,CAAA;AAExB,MAAM,WAAW,OAAO;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,cAAc,CAAA;IAC9B,QAAQ,EAAE,QAAQ,CAAA;IAClB,IAAI,EAAE,WAAW,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"}
@@ -0,0 +1,5 @@
1
+ import { RuleSource } from '../contracts/types/RuleSource';
2
+ import { IModelClient } from '../contracts/types/ModelClient';
3
+ import { Finding } from './findings';
4
+ export declare function lintRuleSourcesWithAi(sources: RuleSource[], client: IModelClient): Promise<Finding[]>;
5
+ //# sourceMappingURL=lintRuleSourcesWithAi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lintRuleSourcesWithAi.d.ts","sourceRoot":"","sources":["../../src/doctor/lintRuleSourcesWithAi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,+BAA+B,CAAA;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAC7D,OAAO,EAAE,OAAO,EAAyB,MAAM,YAAY,CAAA;AA8E3D,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,UAAU,EAAE,EACrB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,OAAO,EAAE,CAAC,CA4CpB"}
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.lintRuleSourcesWithAi = lintRuleSourcesWithAi;
4
+ const PROMPT_HEADER = `You are auditing AI agent instruction files for issues that
5
+ make rules hard for an AI to enforce reliably. Look at the sources below
6
+ and report any of the following:
7
+
8
+ - "contradiction": two or more rules across one or more files that
9
+ conflict. Cite both/all sides in the excerpt.
10
+ - "ambiguity": a rule that uses vague language (e.g. "where possible",
11
+ "as needed", "appropriately") with no concrete threshold or condition.
12
+ - "missing-imperative": a rule expressed as a wish or description rather
13
+ than an imperative the AI can act on.
14
+
15
+ Respond as a JSON array of objects with this shape:
16
+ [
17
+ {
18
+ "code": "contradiction" | "ambiguity" | "missing-imperative",
19
+ "ruleSourcePath": "<one of the paths shown>",
20
+ "line": <1-indexed line number in that file, or null>,
21
+ "message": "<concise explanation>",
22
+ "excerpt": "<short literal text from the file>"
23
+ }
24
+ ]
25
+
26
+ If there are no issues, respond with []. Output ONLY the JSON array. No
27
+ markdown, no prose, no commentary.`;
28
+ const ALLOWED_CODES = [
29
+ 'ambiguity',
30
+ 'contradiction',
31
+ 'missing-imperative',
32
+ ];
33
+ const CODE_SEVERITY = {
34
+ 'empty-file': 'warning',
35
+ 'ambiguous-modifier': 'info',
36
+ 'no-concrete-rules': 'warning',
37
+ ambiguity: 'info',
38
+ contradiction: 'warning',
39
+ 'missing-imperative': 'info',
40
+ };
41
+ function buildPrompt(sources) {
42
+ const blocks = sources.map((s) => `--- path: ${s.path} (kind: ${s.kind}) ---\n${s.content}`);
43
+ return `${PROMPT_HEADER}\n\n${blocks.join('\n\n')}`;
44
+ }
45
+ function extractJsonArray(raw) {
46
+ const trimmed = raw.trim();
47
+ if (trimmed.startsWith('['))
48
+ return trimmed;
49
+ // Code fence variants
50
+ const fenced = trimmed.match(/```(?:json)?\s*\n([\s\S]*?)\n```/);
51
+ if (fenced)
52
+ return fenced[1].trim();
53
+ // Plain extraction: first [ to last ]
54
+ const start = trimmed.indexOf('[');
55
+ const end = trimmed.lastIndexOf(']');
56
+ if (start !== -1 && end > start)
57
+ return trimmed.slice(start, end + 1);
58
+ return null;
59
+ }
60
+ function pathToKind(path, sources) {
61
+ const match = sources.find((s) => s.path === path);
62
+ return match ? match.kind : null;
63
+ }
64
+ async function lintRuleSourcesWithAi(sources, client) {
65
+ if (sources.length === 0)
66
+ return [];
67
+ let response;
68
+ try {
69
+ response = await client.ask(buildPrompt(sources));
70
+ }
71
+ catch {
72
+ return [];
73
+ }
74
+ const jsonStr = extractJsonArray(response);
75
+ if (!jsonStr)
76
+ return [];
77
+ let parsed;
78
+ try {
79
+ parsed = JSON.parse(jsonStr);
80
+ }
81
+ catch {
82
+ return [];
83
+ }
84
+ if (!Array.isArray(parsed))
85
+ return [];
86
+ const findings = [];
87
+ for (const raw of parsed) {
88
+ if (!raw || typeof raw !== 'object')
89
+ continue;
90
+ const code = raw.code;
91
+ if (!code || !ALLOWED_CODES.includes(code))
92
+ continue;
93
+ if (typeof raw.ruleSourcePath !== 'string')
94
+ continue;
95
+ const kind = pathToKind(raw.ruleSourcePath, sources);
96
+ if (!kind)
97
+ continue;
98
+ findings.push({
99
+ ruleSourcePath: raw.ruleSourcePath,
100
+ ruleSourceKind: kind,
101
+ severity: CODE_SEVERITY[code],
102
+ code,
103
+ message: typeof raw.message === 'string' ? raw.message : '',
104
+ line: typeof raw.line === 'number' && Number.isFinite(raw.line)
105
+ ? raw.line
106
+ : undefined,
107
+ excerpt: typeof raw.excerpt === 'string' ? raw.excerpt : undefined,
108
+ });
109
+ }
110
+ return findings;
111
+ }
package/dist/index.d.ts CHANGED
@@ -23,6 +23,7 @@ export type { CompositeModelClientOptions } from './validation/models/CompositeM
23
23
  export { AgentSdkClient } from './validation/models/AgentSdkClient';
24
24
  export type { AgentSdkClientOptions, AgentSdkQueryFn, } from './validation/models/AgentSdkClient';
25
25
  export { lintRuleSources } from './doctor/lintRuleSources';
26
+ export { lintRuleSourcesWithAi } from './doctor/lintRuleSourcesWithAi';
26
27
  export { formatFindings } from './doctor/formatFindings';
27
28
  export type { Finding, FindingCode, Severity, } from './doctor/findings';
28
29
  export { DecisionCache } from './cache/DecisionCache';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAClE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAG9D,YAAY,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAC1E,YAAY,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAC1D,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC9E,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAClE,YAAY,EACV,cAAc,EACd,YAAY,GACb,MAAM,kCAAkC,CAAA;AAGzC,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAGnE,YAAY,EACV,iBAAiB,EACjB,WAAW,GACZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,8BAA8B,CAAA;AAGrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,YAAY,EAAE,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O,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.processHookData = exports.validator = exports.collectRuleSources = exports.JsonlFileSink = exports.EventBus = exports.defaultDaemonSocketPath = exports.sendToDaemon = exports.DaemonServer = exports.DecisionCache = exports.formatFindings = exports.lintRuleSources = exports.AgentSdkClient = exports.CompositeModelClient = exports.cursorAdapter = exports.claudeCodeAdapter = exports.buildDefaultDeterministicRules = exports.defaultDeterministicRules = exports.forbidFilePathPattern = exports.forbidContentPattern = exports.forbidCommandPattern = exports.HookDataSchema = exports.loadPluginConfig = exports.loadAgentGateConfig = exports.defineConfig = exports.Config = void 0;
3
+ exports.processHookData = exports.validator = exports.collectRuleSources = exports.JsonlFileSink = exports.EventBus = exports.defaultDaemonSocketPath = exports.sendToDaemon = exports.DaemonServer = exports.DecisionCache = exports.formatFindings = exports.lintRuleSourcesWithAi = exports.lintRuleSources = exports.AgentSdkClient = exports.CompositeModelClient = exports.cursorAdapter = exports.claudeCodeAdapter = exports.buildDefaultDeterministicRules = exports.defaultDeterministicRules = exports.forbidFilePathPattern = exports.forbidContentPattern = exports.forbidCommandPattern = exports.HookDataSchema = exports.loadPluginConfig = exports.loadAgentGateConfig = exports.defineConfig = exports.Config = void 0;
4
4
  // Config
5
5
  var Config_1 = require("./config/Config");
6
6
  Object.defineProperty(exports, "Config", { enumerable: true, get: function () { return Config_1.Config; } });
@@ -33,6 +33,8 @@ Object.defineProperty(exports, "AgentSdkClient", { enumerable: true, get: functi
33
33
  // Doctor (CLAUDE.md linter)
34
34
  var lintRuleSources_1 = require("./doctor/lintRuleSources");
35
35
  Object.defineProperty(exports, "lintRuleSources", { enumerable: true, get: function () { return lintRuleSources_1.lintRuleSources; } });
36
+ var lintRuleSourcesWithAi_1 = require("./doctor/lintRuleSourcesWithAi");
37
+ Object.defineProperty(exports, "lintRuleSourcesWithAi", { enumerable: true, get: function () { return lintRuleSourcesWithAi_1.lintRuleSourcesWithAi; } });
36
38
  var formatFindings_1 = require("./doctor/formatFindings");
37
39
  Object.defineProperty(exports, "formatFindings", { enumerable: true, get: function () { return formatFindings_1.formatFindings; } });
38
40
  // Cache
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiro-c/agent-gate",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Runtime rule enforcer for AI coding agents. Reads CLAUDE.md / AGENTS.md / .cursorrules and enforces them via Claude Code and Cursor hooks, with a deterministic safety baseline.",
5
5
  "author": "Hiro-Chiba",
6
6
  "license": "MIT",