vigiles 14.6.0 → 14.6.2

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.
@@ -27,7 +27,17 @@ export interface DetectResult {
27
27
  */
28
28
  readonly ambiguousWith: readonly string[];
29
29
  }
30
- /** Auto-detect the harness for a repo at `root` by highest detect() specificity. */
30
+ /**
31
+ * Auto-detect the harness for a repo at `root` by highest detect() specificity.
32
+ *
33
+ * SCOPE (2026-07-21): `vigiles audit` is CLAUDE-CODE-FOCUSED for now. This is
34
+ * file-marker detection (a specificity score); it picks ONE harness (or the CC
35
+ * default) and reports `ambiguousWith` when several genuinely match. Mirror-collapse
36
+ * (below) is done; the rest — treating a LONE `AGENTS.md` (an AAIF cross-tool
37
+ * standard, not a Codex signal) as harness-agnostic, and auditing ALL detected
38
+ * harnesses (shared-once + per-harness slice) — is DEFERRED. Full design + research:
39
+ * `research/audit-harness-dx.md`.
40
+ */
31
41
  export declare function detectAdapterResult(root: string): DetectResult;
32
42
  /** The detected adapter (highest specificity), else the default (Claude Code). */
33
43
  export declare function detectAdapter(root: string): HarnessAdapter;
@@ -10,6 +10,7 @@ exports.resolveAdapter = resolveAdapter;
10
10
  exports.normalizeHarnessList = normalizeHarnessList;
11
11
  exports.resolveHarnessSelection = resolveHarnessSelection;
12
12
  exports.resolveHarnessAdapters = resolveHarnessAdapters;
13
+ const compose_js_1 = require("./core/compose.js");
13
14
  const adapter_js_1 = require("./adapters/claude-code/adapter.js");
14
15
  const adapter_js_2 = require("./adapters/codex/adapter.js");
15
16
  /** The default adapter when detection finds no harness markers. */
@@ -19,14 +20,40 @@ exports.ADAPTERS = [
19
20
  adapter_js_1.claudeCodeAdapter,
20
21
  adapter_js_2.codexAdapter,
21
22
  ];
22
- /** Auto-detect the harness for a repo at `root` by highest detect() specificity. */
23
+ /**
24
+ * Auto-detect the harness for a repo at `root` by highest detect() specificity.
25
+ *
26
+ * SCOPE (2026-07-21): `vigiles audit` is CLAUDE-CODE-FOCUSED for now. This is
27
+ * file-marker detection (a specificity score); it picks ONE harness (or the CC
28
+ * default) and reports `ambiguousWith` when several genuinely match. Mirror-collapse
29
+ * (below) is done; the rest — treating a LONE `AGENTS.md` (an AAIF cross-tool
30
+ * standard, not a Codex signal) as harness-agnostic, and auditing ALL detected
31
+ * harnesses (shared-once + per-harness slice) — is DEFERRED. Full design + research:
32
+ * `research/audit-harness-dx.md`.
33
+ */
23
34
  function detectAdapterResult(root) {
24
35
  const scored = exports.ADAPTERS.map((a) => ({ a, score: a.detect(root) })).filter((s) => s.score > 0);
25
36
  if (scored.length === 0) {
26
37
  return { adapter: exports.defaultAdapter, fallback: true, ambiguousWith: [] };
27
38
  }
28
39
  const top = Math.max(...scored.map((s) => s.score));
29
- const winners = scored.filter((s) => s.score === top).map((s) => s.a);
40
+ let winners = scored.filter((s) => s.score === top).map((s) => s.a);
41
+ // Mirror-collapse: the only false-"both" tie is at the weak instruction-file level
42
+ // (top === 1 — Claude Code via CLAUDE.md, Codex via AGENTS.md). When those two files
43
+ // are a MIRROR (symlink or byte-identical, per detectInstructionMirror), that's ONE
44
+ // logical config, not two harnesses — `AGENTS.md` is a cross-tool standard bridged to
45
+ // CLAUDE.md, not an independent Codex target (research/audit-harness-dx.md). Drop codex
46
+ // so it resolves to Claude Code without a spurious "matches claude-code, codex" notice.
47
+ // A genuine dual instruction file (different content, or a real .codex/config.toml at
48
+ // score 3) is NOT a mirror at top 1 → stays ambiguous, exactly as it should.
49
+ if (winners.length > 1 &&
50
+ top === 1 &&
51
+ winners.some((w) => w.name === "codex") &&
52
+ (0, compose_js_1.detectInstructionMirror)(root) !== null) {
53
+ // At top === 1 with a mirror, both files exist so Claude Code (CLAUDE.md) is
54
+ // always a co-winner — dropping codex leaves a non-empty set.
55
+ winners = winners.filter((w) => w.name !== "codex");
56
+ }
30
57
  return {
31
58
  adapter: winners[0],
32
59
  fallback: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vigiles",
3
- "version": "14.6.0",
3
+ "version": "14.6.2",
4
4
  "description": "Lint & test the harness your AI agent runs on — verify the references in your CLAUDE.md / AGENTS.md and test that your hooks and skills actually work.",
5
5
  "keywords": [
6
6
  "claude-code",