vigiles 38.2.0 → 39.1.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 (129) hide show
  1. package/action.yml +18 -0
  2. package/dist/adapters/claude-code/event-capability.js +24 -8
  3. package/dist/adapters/claude-code/hook-protocol.js +2 -1
  4. package/dist/adapters/codex/hook-protocol.js +2 -1
  5. package/dist/audit-report.d.ts +14 -1
  6. package/dist/audit-report.js +21 -5
  7. package/dist/audit-report.template.html +33 -28
  8. package/dist/audit-score.d.ts +4 -1
  9. package/dist/audit-score.js +3 -1
  10. package/dist/audit-verdict.d.ts +3 -1
  11. package/dist/cli-flag-check.d.ts +36 -0
  12. package/dist/cli-flag-check.js +76 -1
  13. package/dist/cli-flags.d.ts +1 -1
  14. package/dist/cli-main.d.ts +2 -2
  15. package/dist/cli-main.js +684 -434
  16. package/dist/core/CLAUDE.md.spec.js +2 -2
  17. package/dist/core/apply-rules.d.ts +71 -0
  18. package/dist/core/apply-rules.js +48 -0
  19. package/dist/core/bash-effects.d.ts +0 -57
  20. package/dist/core/bash-effects.js +0 -147
  21. package/dist/core/compile-generator.d.ts +6 -6
  22. package/dist/core/compile-generator.js +4 -4
  23. package/dist/core/compile.d.ts +72 -8
  24. package/dist/core/compile.js +276 -133
  25. package/dist/core/config-migrations.d.ts +69 -0
  26. package/dist/core/config-migrations.js +145 -0
  27. package/dist/core/config-schema.d.ts +166 -160
  28. package/dist/core/config-schema.js +207 -244
  29. package/dist/core/coverage.d.ts +16 -0
  30. package/dist/core/coverage.js +22 -0
  31. package/dist/core/doc-refs.d.ts +3 -2
  32. package/dist/core/doc-refs.js +2 -2
  33. package/dist/core/enforce-marker.d.ts +28 -0
  34. package/dist/core/enforce-marker.js +34 -0
  35. package/dist/core/eslint-inventory.d.ts +96 -0
  36. package/dist/core/eslint-inventory.js +251 -0
  37. package/dist/core/event-capability.d.ts +5 -1
  38. package/dist/core/frame.d.ts +43 -2
  39. package/dist/core/frame.js +85 -2
  40. package/dist/core/generate-schema.d.ts +3 -2
  41. package/dist/core/generate-schema.js +2 -2
  42. package/dist/core/generate-types.d.ts +11 -2
  43. package/dist/core/generate-types.js +12 -5
  44. package/dist/core/hook-command.d.ts +172 -0
  45. package/dist/core/hook-command.js +277 -0
  46. package/dist/core/hook-delivery.d.ts +133 -0
  47. package/dist/core/hook-delivery.js +150 -0
  48. package/dist/core/hook-paths.d.ts +14 -0
  49. package/dist/core/hook-paths.js +22 -0
  50. package/dist/core/hook-program.d.ts +4 -4
  51. package/dist/core/hook-program.js +13 -25
  52. package/dist/core/hook-state.d.ts +1 -1
  53. package/dist/core/hook-state.js +1 -1
  54. package/dist/core/instruction-remedies.d.ts +35 -0
  55. package/dist/core/instruction-remedies.js +70 -1
  56. package/dist/core/integrity-header.d.ts +54 -0
  57. package/dist/core/integrity-header.js +90 -0
  58. package/dist/core/integrity.d.ts +1 -25
  59. package/dist/core/integrity.js +16 -74
  60. package/dist/core/linter-adapter.d.ts +28 -4
  61. package/dist/core/linters.d.ts +8 -1
  62. package/dist/core/linters.js +116 -81
  63. package/dist/core/orphans.d.ts +3 -5
  64. package/dist/core/orphans.js +9 -10
  65. package/dist/core/presets.d.ts +31 -34
  66. package/dist/core/presets.js +25 -38
  67. package/dist/core/rule-catalog.d.ts +11 -12
  68. package/dist/core/rule-catalog.js +25 -94
  69. package/dist/core/rule.d.ts +213 -0
  70. package/dist/core/rule.js +37 -0
  71. package/dist/core/skill-resources.d.ts +85 -15
  72. package/dist/core/skill-resources.js +63 -37
  73. package/dist/core/source-refs.d.ts +3 -23
  74. package/dist/core/source-refs.js +3 -27
  75. package/dist/core/test-utils.d.ts +13 -0
  76. package/dist/core/test-utils.js +40 -1
  77. package/dist/core/types.d.ts +19 -329
  78. package/dist/core/validate.d.ts +14 -14
  79. package/dist/core/validate.js +87 -73
  80. package/dist/coverage-evidence.js +2 -3
  81. package/dist/deprecated-key-files.d.ts +6 -0
  82. package/dist/deprecated-key-files.js +7 -6
  83. package/dist/exclude.d.ts +3 -1
  84. package/dist/exclude.js +9 -33
  85. package/dist/harness-assert.d.ts +18 -0
  86. package/dist/harness-assert.js +38 -0
  87. package/dist/hook-check-install.js +15 -6
  88. package/dist/hook-check.d.ts +1 -3
  89. package/dist/hook-check.js +3 -5
  90. package/dist/hook-install.d.ts +7 -41
  91. package/dist/hook-install.js +29 -96
  92. package/dist/hook-runtime.js +2 -1
  93. package/dist/load-hook.d.ts +3 -2
  94. package/dist/load-hook.js +28 -6
  95. package/dist/optimize.d.ts +2 -1
  96. package/dist/overrides.d.ts +29 -0
  97. package/dist/overrides.js +51 -0
  98. package/dist/plugin-loader.d.ts +23 -0
  99. package/dist/plugin-loader.js +42 -12
  100. package/dist/root-globs.d.ts +9 -0
  101. package/dist/root-globs.js +48 -0
  102. package/dist/rule-routing.js +6 -3
  103. package/dist/rules/CLAUDE.md.spec.d.ts +3 -0
  104. package/dist/rules/CLAUDE.md.spec.js +22 -0
  105. package/dist/rules/groups.d.ts +32 -0
  106. package/dist/rules/groups.js +27 -0
  107. package/dist/rules/index.d.ts +412 -0
  108. package/dist/{core/rule-meta.js → rules/index.js} +329 -200
  109. package/dist/rules/skill-resource-resolves.d.ts +36 -0
  110. package/dist/rules/skill-resource-resolves.js +51 -0
  111. package/dist/run-hook.d.ts +27 -3
  112. package/dist/run-hook.js +48 -12
  113. package/dist/scan-core.d.ts +103 -29
  114. package/dist/scan-core.js +178 -186
  115. package/dist/scan-files.d.ts +0 -8
  116. package/dist/scan-files.js +79 -24
  117. package/dist/scan.d.ts +23 -28
  118. package/dist/scan.js +64 -18
  119. package/dist/score-core.js +3 -9
  120. package/dist/setup-plan.d.ts +13 -27
  121. package/dist/setup-plan.js +46 -71
  122. package/dist/test-coverage.d.ts +3 -8
  123. package/dist/test-coverage.js +6 -6
  124. package/dist/test.d.ts +1 -1
  125. package/dist/vigilesrc.schema.json +1347 -121
  126. package/package.json +2 -2
  127. package/packages/eslint-config/index.mjs +61 -0
  128. package/skills/adopt-spec/SKILL.md +2 -1
  129. package/dist/core/rule-meta.d.ts +0 -82
@@ -0,0 +1,69 @@
1
+ /**
2
+ * The configs that USED TO WORK — keys and rules whose shape changed, and the
3
+ * sentence each one gets instead of the schema's "unknown key".
4
+ *
5
+ * Read BEFORE the schema (`./validate.ts` `loadConfig`): the reader of these
6
+ * messages is someone whose config was valid in an earlier release, so
7
+ * `.strict()`'s "Unrecognized key" would be true and useless — they need the
8
+ * new spelling. Kept apart from `./config-schema.ts`, which describes the
9
+ * config as it is today; this file describes how it got here.
10
+ */
11
+ /**
12
+ * The two keys `harnesses` replaced, and the sentence each one gets (#240).
13
+ *
14
+ * They are listed here rather than left to `.strict()`'s "Unrecognized key"
15
+ * because the reader of that message is someone whose config USED to work: they
16
+ * need the new spelling, not the news that the old one is unknown. `.strict()`
17
+ * would tell them the truth in the least useful possible way.
18
+ */
19
+ export declare const REPLACED_KEYS: ReadonlyArray<{
20
+ readonly key: string;
21
+ readonly was: string;
22
+ readonly now: string;
23
+ }>;
24
+ /**
25
+ * The message a config written in the replaced shape gets.
26
+ *
27
+ * `names` are the harnesses the user's OWN config named under the removed
28
+ * `harness` key, so the worked example below shows THEIR migration.
29
+ *
30
+ * 🔴 IT USED TO BE A FIXED EXAMPLE — `{ "harnesses": { "claude-code": …,
31
+ * "codex": {} } }`, two names typed into the core. Its own comment called that
32
+ * debt and predicted the failure: "with a third adapter this sample goes
33
+ * stale". Reading the names from the config being migrated is better than
34
+ * reading them from the registry would have been, and it is available here:
35
+ * it shows the reader their own keys instead of somebody else's.
36
+ */
37
+ export declare function replacedKeyMessage(present: ReadonlyArray<(typeof REPLACED_KEYS)[number]>, names: readonly string[]): string;
38
+ /**
39
+ * The per-rule `exclude` options that became `overrides`, and the rules an
40
+ * equivalent override turns off. `untested-*` shared ONE merged option set, so
41
+ * an `exclude` on any of them skipped those paths for all four.
42
+ */
43
+ export declare const MOVED_TO_OVERRIDES: ReadonlyArray<{
44
+ /** Where the option sat: a rule name, or the `orphans` block. */
45
+ readonly owner: string;
46
+ /** The rules the equivalent override turns off. */
47
+ readonly rules: readonly string[];
48
+ }>;
49
+ /**
50
+ * The message an old config with a per-rule `exclude` gets — the user's OWN
51
+ * globs, written as the `overrides` entry that does what the option did.
52
+ *
53
+ * Read BEFORE the schema, like {@link REPLACED_KEYS}: the reader's config used
54
+ * to work, so "unknown key exclude" would be true and useless.
55
+ */
56
+ export declare function movedToOverridesMessages(raw: unknown): readonly string[];
57
+ /** Rules whose findings another rule now reports, and what changed. */
58
+ export declare const FOLDED_RULES: ReadonlyArray<{
59
+ readonly rule: string;
60
+ readonly into: string;
61
+ readonly what: string;
62
+ }>;
63
+ /**
64
+ * The message a config naming a folded rule gets — in `rules` or in an
65
+ * `overrides` entry. Read BEFORE the schema, like {@link REPLACED_KEYS}: the
66
+ * reader's config used to work, so "unknown key" would be true and useless.
67
+ */
68
+ export declare function foldedRuleMessages(raw: unknown): readonly string[];
69
+ //# sourceMappingURL=config-migrations.d.ts.map
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ /**
3
+ * The configs that USED TO WORK — keys and rules whose shape changed, and the
4
+ * sentence each one gets instead of the schema's "unknown key".
5
+ *
6
+ * Read BEFORE the schema (`./validate.ts` `loadConfig`): the reader of these
7
+ * messages is someone whose config was valid in an earlier release, so
8
+ * `.strict()`'s "Unrecognized key" would be true and useless — they need the
9
+ * new spelling. Kept apart from `./config-schema.ts`, which describes the
10
+ * config as it is today; this file describes how it got here.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.FOLDED_RULES = exports.MOVED_TO_OVERRIDES = exports.REPLACED_KEYS = void 0;
14
+ exports.replacedKeyMessage = replacedKeyMessage;
15
+ exports.movedToOverridesMessages = movedToOverridesMessages;
16
+ exports.foldedRuleMessages = foldedRuleMessages;
17
+ /**
18
+ * The two keys `harnesses` replaced, and the sentence each one gets (#240).
19
+ *
20
+ * They are listed here rather than left to `.strict()`'s "Unrecognized key"
21
+ * because the reader of that message is someone whose config USED to work: they
22
+ * need the new spelling, not the news that the old one is unknown. `.strict()`
23
+ * would tell them the truth in the least useful possible way.
24
+ */
25
+ exports.REPLACED_KEYS = [
26
+ {
27
+ key: "harness",
28
+ // The literal OLD config text this migration notice quotes back at the user:
29
+ // a historical artefact, not a fact about a harness, so there is no port to
30
+ // read it off. This is the one exemption here that is not debt.
31
+ // eslint-disable-next-line local/no-harness-names -- quoted legacy config
32
+ was: '"harness": ["claude-code", "codex"]',
33
+ now: "a KEY per harness",
34
+ },
35
+ {
36
+ key: "surfaceRoots",
37
+ was: '"surfaceRoots": [".ai"]',
38
+ now: '"roots" INSIDE the harness that reads them',
39
+ },
40
+ ];
41
+ /**
42
+ * The message a config written in the replaced shape gets.
43
+ *
44
+ * `names` are the harnesses the user's OWN config named under the removed
45
+ * `harness` key, so the worked example below shows THEIR migration.
46
+ *
47
+ * 🔴 IT USED TO BE A FIXED EXAMPLE — `{ "harnesses": { "claude-code": …,
48
+ * "codex": {} } }`, two names typed into the core. Its own comment called that
49
+ * debt and predicted the failure: "with a third adapter this sample goes
50
+ * stale". Reading the names from the config being migrated is better than
51
+ * reading them from the registry would have been, and it is available here:
52
+ * it shows the reader their own keys instead of somebody else's.
53
+ */
54
+ function replacedKeyMessage(present, names) {
55
+ // Empty when the config used only `surfaceRoots`, or named no harness — a
56
+ // placeholder the reader will obviously replace, never an invented name.
57
+ const example = (names.length > 0 ? names : ["<harness>"])
58
+ .map((n, i) => `"${n}": ${i === 0 ? '{ "roots": [".ai"] }' : "{}"}`)
59
+ .join(", ");
60
+ return (`.vigilesrc.json: ${present.map((k) => `"${k.key}"`).join(" and ")} ` +
61
+ `${present.length === 1 ? "was" : "were"} replaced by one nested key, "harnesses".\n` +
62
+ ` Write: { "harnesses": { ${example} } }\n` +
63
+ present.map((k) => ` - ${k.was} → ${k.now}`).join("\n") +
64
+ `\n The old harness ARRAY's order silently decided what got read: one order graded the ` +
65
+ `skills and read no instruction file, the other read the instruction file and found no ` +
66
+ `skills. Scoping each root under the harness that reads it removes the order.`);
67
+ }
68
+ /**
69
+ * The per-rule `exclude` options that became `overrides`, and the rules an
70
+ * equivalent override turns off. `untested-*` shared ONE merged option set, so
71
+ * an `exclude` on any of them skipped those paths for all four.
72
+ */
73
+ exports.MOVED_TO_OVERRIDES = [
74
+ ...[
75
+ "untested-skill",
76
+ "untested-subagent",
77
+ "untested-hook",
78
+ "untested-output-style",
79
+ ].map((owner, _i, all) => ({ owner, rules: all })),
80
+ { owner: "orphans", rules: ["orphan-docs"] },
81
+ ];
82
+ /** A plain JSON object, narrowed without a cast. */
83
+ function isRecord(v) {
84
+ return typeof v === "object" && v !== null && !Array.isArray(v);
85
+ }
86
+ /** The `exclude` an old config wrote under `owner`, as a glob list, if any. */
87
+ function movedExclude(raw, owner) {
88
+ if (!isRecord(raw))
89
+ return null;
90
+ const value = isRecord(raw.rules) ? raw.rules[owner] : undefined;
91
+ const tuple = Array.isArray(value) ? value : [];
92
+ const holder = owner === "orphans" ? raw.orphans : tuple[1];
93
+ if (!isRecord(holder) || holder.exclude === undefined)
94
+ return null;
95
+ const globs = [holder.exclude].flat();
96
+ return globs.filter((g) => typeof g === "string");
97
+ }
98
+ /**
99
+ * The message an old config with a per-rule `exclude` gets — the user's OWN
100
+ * globs, written as the `overrides` entry that does what the option did.
101
+ *
102
+ * Read BEFORE the schema, like {@link REPLACED_KEYS}: the reader's config used
103
+ * to work, so "unknown key exclude" would be true and useless.
104
+ */
105
+ function movedToOverridesMessages(raw) {
106
+ return exports.MOVED_TO_OVERRIDES.flatMap(({ owner, rules }) => {
107
+ const globs = movedExclude(raw, owner);
108
+ if (globs === null)
109
+ return [];
110
+ const files = globs.map((g) => JSON.stringify(g)).join(", ");
111
+ const off = rules.map((r) => `"${r}": "off"`).join(", ");
112
+ return [
113
+ `.vigilesrc.json: "exclude" inside "${owner}" moved to "overrides" — skipping paths is not a rule option any more; an override turns the rule off for them.\n` +
114
+ ` Write: "overrides": [{ "files": [${files}], "rules": { ${off} } }]\n` +
115
+ ` and remove "exclude" from "${owner}". Paths top-level "exclude" removes are not read at all; an override only changes what a rule reports.`,
116
+ ];
117
+ });
118
+ }
119
+ /** Rules whose findings another rule now reports, and what changed. */
120
+ exports.FOLDED_RULES = [
121
+ {
122
+ rule: "prefer-compiled-hooks",
123
+ into: "hand-written-hook",
124
+ what: "every hook line vigiles did not write is now one hand-written-hook finding that names it",
125
+ },
126
+ ];
127
+ /**
128
+ * The message a config naming a folded rule gets — in `rules` or in an
129
+ * `overrides` entry. Read BEFORE the schema, like {@link REPLACED_KEYS}: the
130
+ * reader's config used to work, so "unknown key" would be true and useless.
131
+ */
132
+ function foldedRuleMessages(raw) {
133
+ if (!isRecord(raw))
134
+ return [];
135
+ const overrides = Array.isArray(raw.overrides)
136
+ ? raw.overrides
137
+ : [];
138
+ const ruleBlocks = [
139
+ raw.rules,
140
+ ...overrides.map((o) => (isRecord(o) ? o.rules : undefined)),
141
+ ];
142
+ return exports.FOLDED_RULES.filter(({ rule }) => ruleBlocks.some((b) => isRecord(b) && rule in b)).map(({ rule, into, what }) => `.vigilesrc.json: rule "${rule}" was folded into "${into}": ${what}.\n` +
143
+ ` Remove "${rule}"; set "${into}" to change how those findings report.`);
144
+ }
145
+ //# sourceMappingURL=config-migrations.js.map
@@ -17,17 +17,19 @@
17
17
  * happening inside the tool, so the shape is now DECLARED and anything outside
18
18
  * it is named out loud.
19
19
  *
20
- * THE TYPE IS DERIVED FROM THIS, not written beside it: `VigilesConfig` is
21
- * `z.infer<typeof vigilesConfigSchema>` (see `./types.ts`), so a field cannot
22
- * exist in the type and not in the validator, which is how `surfaceRoots` ended
23
- * up documented in `docs/cli.md` for a week after it stopped being read.
20
+ * THE TYPE IS DERIVED FROM THIS, not written beside it: `VigilesConfigOf` is
21
+ * the static keys' `z.output` plus the rule set's own entries (see `./types.ts`),
22
+ * so a field cannot exist in the type and not in the validator, which is how
23
+ * `surfaceRoots` ended up documented in `docs/cli.md` for a week after it
24
+ * stopped being read.
24
25
  *
25
- * DEFAULTS LIVE HERE TOO, and that is what makes the derivation exact. Every key
26
+ * THE RULES ARE A PARAMETER. The `rules` object, its defaults and the presets
27
+ * `extends` accepts are BUILT from the rule set a composition root hands to
28
+ * {@link configFor} — each rule declares its id, default and options schema in
29
+ * its own module (`src/rules/`), and this file names none of them. Every key
26
30
  * the loaded config is guaranteed to carry (`rules`, `files`, `ruleMarkers`)
27
- * carries a Zod `.default(...)`, and Zod's inferred OUTPUT type for a defaulted
28
- * field is non-optional — so `z.infer` reproduces the old
29
- * `rules: Required<RulesConfig>` exactly, rather than approximating it. Parsing
30
- * `{}` yields byte-for-byte the old `DEFAULT_CONFIG`.
31
+ * carries a Zod `.default(...)`, so parsing `{}` yields every rule at its
32
+ * shipped default (`src/rules/index.test.ts` pins that snapshot).
31
33
  *
32
34
  * ⚠️ ZOD COSTS ~45 ms TO IMPORT (measured, Zod 4.6.5), AND IT IS IMPORTED
33
35
  * NORMALLY — `src/core/validate.ts` has a top-level `import`, not a deferred
@@ -42,10 +44,23 @@
42
44
  * requires, against which 45 ms is ~13%.
43
45
  */
44
46
  import { z } from "zod";
45
- /** The rule names, for the "did you mean" on an unknown one. */
46
- export declare const RULE_NAMES: readonly string[];
47
+ import { type RuleGroups, type RuleSpec } from "./rule.js";
48
+ import type { RuleSeverity, RuleWithOptions } from "./types.js";
49
+ /** The config file; the directory holding it is a project root. */
50
+ export declare const PROJECT_CONFIG_FILE = ".vigilesrc.json";
47
51
  /**
48
- * ONE harness's entry in {@link vigilesConfigSchema}'s `harnesses`.
52
+ * A string, or a string ARRAY — coerced to an array.
53
+ *
54
+ * The bare-string case is the natural first-value mistake and it used to spread
55
+ * a string's CHARACTERS as globs: `"exclude": "bench"` became
56
+ * `["b","e","n","c","h"]`, which is a no-op at best and garbage `orphan` matches
57
+ * (`.`, `/`, `README.md`) at worst. Accepting it as a one-element array is what
58
+ * `asStringArray` did; the difference is that anything that is neither is now a
59
+ * schema error instead of a `console.warn` nobody reads.
60
+ */
61
+ export declare const stringList: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>;
62
+ /**
63
+ * ONE harness's entry in the config's `harnesses`.
49
64
  *
50
65
  * `.strict()` is load-bearing here specifically: the whole reason this key
51
66
  * exists is that a declaration which reaches nothing used to be silent, and
@@ -56,106 +71,21 @@ declare const harnessDeclarationSchema: z.ZodObject<{
56
71
  }, z.core.$strict>;
57
72
  /** The harness keys' value shape, exported so `types.ts` can derive the type. */
58
73
  export type HarnessDeclarationShape = z.infer<typeof harnessDeclarationSchema>;
74
+ /** What counts as a rule in markdown, by default: both constructs. */
75
+ export declare const DEFAULT_RULE_MARKERS: readonly ["headings", "checkboxes"];
59
76
  /**
60
- * The whole of `.vigilesrc.json`.
61
- *
62
- * `.strict()` at the top level is the check that did not exist: an unrecognized
63
- * key is now a named error with a suggestion, where it used to be spread into
64
- * the config object and never read.
77
+ * The keys of `.vigilesrc.json` that do not depend on the rule set, in the
78
+ * order the "Known: …" list prints them (it is capped, so the keys people
79
+ * misspell most come first). `rules`, `overrides` and `extends` are built from
80
+ * the rule set by {@link configFor} and slotted in around these.
65
81
  */
66
- export declare const vigilesConfigSchema: z.ZodObject<{
82
+ declare const configKeys: {
83
+ /** Which markdown constructs count as a rule — headings, checkboxes, or both. */
67
84
  ruleMarkers: z.ZodDefault<z.ZodArray<z.ZodEnum<{
68
85
  headings: "headings";
69
86
  checkboxes: "checkboxes";
70
87
  }>>>;
71
- rules: z.ZodPrefault<z.ZodObject<{
72
- "spec-refs": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
73
- "orphan-docs": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
74
- "duplicate-rules": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
75
- "require-instructions-spec": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
76
- "require-skill-spec": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
77
- integrity: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
78
- coverage: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>, z.ZodTuple<[z.ZodLiteral<"warn">, z.ZodObject<{
79
- linterRules: z.ZodOptional<z.ZodNumber>;
80
- scripts: z.ZodOptional<z.ZodNumber>;
81
- }, z.core.$strict>], null>, z.ZodTuple<[z.ZodLiteral<"error">, z.ZodObject<{
82
- linterRules: z.ZodOptional<z.ZodNumber>;
83
- scripts: z.ZodOptional<z.ZodNumber>;
84
- }, z.core.$strict>], null>]>>;
85
- "untested-skill": z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>, z.ZodTuple<[z.ZodLiteral<"warn">, z.ZodObject<{
86
- include: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
87
- exclude: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
88
- testExtension: z.ZodOptional<z.ZodString>;
89
- }, z.core.$strict>], null>, z.ZodTuple<[z.ZodLiteral<"error">, z.ZodObject<{
90
- include: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
91
- exclude: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
92
- testExtension: z.ZodOptional<z.ZodString>;
93
- }, z.core.$strict>], null>]>>;
94
- "untested-subagent": z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>, z.ZodTuple<[z.ZodLiteral<"warn">, z.ZodObject<{
95
- include: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
96
- exclude: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
97
- testExtension: z.ZodOptional<z.ZodString>;
98
- }, z.core.$strict>], null>, z.ZodTuple<[z.ZodLiteral<"error">, z.ZodObject<{
99
- include: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
100
- exclude: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
101
- testExtension: z.ZodOptional<z.ZodString>;
102
- }, z.core.$strict>], null>]>>;
103
- "untested-hook": z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>, z.ZodTuple<[z.ZodLiteral<"warn">, z.ZodObject<{
104
- include: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
105
- exclude: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
106
- testExtension: z.ZodOptional<z.ZodString>;
107
- }, z.core.$strict>], null>, z.ZodTuple<[z.ZodLiteral<"error">, z.ZodObject<{
108
- include: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
109
- exclude: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
110
- testExtension: z.ZodOptional<z.ZodString>;
111
- }, z.core.$strict>], null>]>>;
112
- "untested-output-style": z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>, z.ZodTuple<[z.ZodLiteral<"warn">, z.ZodObject<{
113
- include: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
114
- exclude: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
115
- testExtension: z.ZodOptional<z.ZodString>;
116
- }, z.core.$strict>], null>, z.ZodTuple<[z.ZodLiteral<"error">, z.ZodObject<{
117
- include: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
118
- exclude: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
119
- testExtension: z.ZodOptional<z.ZodString>;
120
- }, z.core.$strict>], null>]>>;
121
- "unmarked-refs": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
122
- "subagent-tool-contract": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
123
- "hook-events": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
124
- "subagent-frontmatter": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
125
- "mcp-config": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
126
- "skill-frontmatter": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
127
- "mcp-tool-resolves": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
128
- "hook-script-exists": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
129
- "prefer-compiled-hooks": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
130
- "disallowed-tools-contract": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
131
- "description-overlap": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
132
- "skill-description-budget": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
133
- "compile-budget": z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>, z.ZodTuple<[z.ZodLiteral<"warn">, z.ZodObject<{
134
- maxEntryChars: z.ZodOptional<z.ZodNumber>;
135
- maxSectionChars: z.ZodOptional<z.ZodNumber>;
136
- maxRulesChars: z.ZodOptional<z.ZodNumber>;
137
- }, z.core.$strict>], null>, z.ZodTuple<[z.ZodLiteral<"error">, z.ZodObject<{
138
- maxEntryChars: z.ZodOptional<z.ZodNumber>;
139
- maxSectionChars: z.ZodOptional<z.ZodNumber>;
140
- maxRulesChars: z.ZodOptional<z.ZodNumber>;
141
- }, z.core.$strict>], null>]>>;
142
- "frontmatter-valid": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
143
- "mcp-hook-target-resolves": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
144
- "lethal-trifecta": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
145
- "skill-resource-resolves": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
146
- "skill-missing-fence": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
147
- "plugin-dir-layout": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
148
- "delegation-trifecta": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
149
- "hook-block-ineffective": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
150
- "hook-matcher": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
151
- "doc-refs": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
152
- "instruction-weight": z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>, z.ZodTuple<[z.ZodLiteral<"warn">, z.ZodObject<{
153
- max: z.ZodOptional<z.ZodNumber>;
154
- }, z.core.$strict>], null>, z.ZodTuple<[z.ZodLiteral<"error">, z.ZodObject<{
155
- max: z.ZodOptional<z.ZodNumber>;
156
- }, z.core.$strict>], null>]>>;
157
- "deprecated-key-files": z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"error">, z.ZodLiteral<false>, z.ZodLiteral<"off">, z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<true>]>, z.ZodTransform<false | "error" | "warn", boolean | 0 | 1 | 2 | "error" | "warn" | "off">>>;
158
- }, z.core.$strict>>;
88
+ /** The instruction files to validate. */
159
89
  files: z.ZodDefault<z.ZodArray<z.ZodString>>;
160
90
  maxRules: z.ZodOptional<z.ZodNumber>;
161
91
  maxTokens: z.ZodOptional<z.ZodNumber>;
@@ -170,9 +100,11 @@ export declare const vigilesConfigSchema: z.ZodObject<{
170
100
  }>>;
171
101
  orphans: z.ZodOptional<z.ZodObject<{
172
102
  include: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
173
- exclude: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
174
103
  }, z.core.$strict>>;
175
104
  exclude: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
105
+ };
106
+ /** The keys after `overrides`; `extends` and `$schema` close the shape. */
107
+ declare const configTailKeys: {
176
108
  sharedDirs: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
177
109
  harnesses: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
178
110
  roots: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<readonly string[], string | string[]>>>;
@@ -184,27 +116,136 @@ export declare const vigilesConfigSchema: z.ZodObject<{
184
116
  apiVersion: z.ZodOptional<z.ZodNumber>;
185
117
  }, z.core.$strict>>;
186
118
  nudge: z.ZodOptional<z.ZodLiteral<"dismissed">>;
187
- extends: z.ZodOptional<z.ZodEnum<{
188
- "vigiles:recommended": "vigiles:recommended";
189
- }>>;
190
- $schema: z.ZodOptional<z.ZodString>;
191
- }, z.core.$strict>;
119
+ };
192
120
  /**
193
- * Parse a raw `.vigilesrc.json` value — THE one entry point every reader uses.
121
+ * The editor's pointer at the published JSON Schema. Accepted, never read.
122
+ *
123
+ * 🔴 IT IS DECLARED HERE RATHER THAN EXCUSED IN THE UNKNOWN-KEY WALKER, and
124
+ * the reason is that the walker is only half the surface. `dist/vigilesrc.
125
+ * schema.json` is generated FROM this schema by
126
+ * `scripts/build-config-schema.mjs`, with `additionalProperties: false`, so
127
+ * a key missing here is refused TWICE: once by the CLI, and once by the
128
+ * editor being pointed at the schema. Measured before this key existed, on
129
+ * `{"$schema": <the schema's own $id>, "harnesses": {"claude-code": {}}}`:
194
130
  *
195
- * 🔴 THE PRESET IS MERGED INTO THE RAW INPUT, BEFORE THE SCHEMA, for one reason:
196
- * after parsing, every rule carries a value (the schema fills each default), so
197
- * "the user wrote `hook-events: warn`" and "nobody wrote it" are the same
198
- * output, and an explicit downgrade could not win over the preset. Before
199
- * parsing, the user's own `rules` keys are exactly what they wrote. So the
200
- * preset's severities go UNDER them, and the schema then normalizes and
201
- * validates the result as if the user had typed both.
131
+ * ```
132
+ * $ vigiles audit . --no-interactive
133
+ * ✗ .vigilesrc.json: unknown key "$schema" in (top level). Known: …
134
+ * (exit 2)
135
+ * $ # and the same document against dist/vigilesrc.schema.json:
136
+ * additionalProperties: should NOT have additional properties ($schema)
137
+ * ```
138
+ *
139
+ * It is LAST in the shape on purpose: `knownKeysAt` reads the schema to build
140
+ * the "Known: …" candidate list, which is capped, so a key nobody misspells
141
+ * belongs past the cap rather than at the head of the suggestion.
142
+ */
143
+ declare const schemaPointer: z.ZodOptional<z.ZodString>;
144
+ /** The keys that do not depend on the rule set, as one object type. */
145
+ type StaticConfig = z.output<z.ZodObject<typeof configKeys & typeof configTailKeys & {
146
+ readonly $schema: typeof schemaPointer;
147
+ }>>;
148
+ /** One rule's entry in `rules`: a severity, or `[severity, options]`. */
149
+ export type RuleEntry = RuleWithOptions<unknown>;
150
+ /** The `rules` of a config, keyed by rule id. */
151
+ export type RulesConfig<Id extends string = string> = {
152
+ readonly [K in Id]: RuleEntry;
153
+ };
154
+ /** The config entry a rule takes: with its options' type when it has options. */
155
+ type EntryOf<S> = S extends {
156
+ readonly options: infer O extends z.ZodType;
157
+ } ? RuleWithOptions<z.output<O>> : RuleSeverity;
158
+ /**
159
+ * The PRECISE `rules` of a rule set — each id with its own options type. The
160
+ * composition root instantiates it over `RULES`; generic code takes
161
+ * {@link RulesConfig} and never names an id (the `local/no-rule-ids` fence).
162
+ */
163
+ export type RulesConfigOf<R extends readonly RuleSpec[]> = {
164
+ readonly [S in R[number] as S["id"]]: EntryOf<S>;
165
+ };
166
+ /**
167
+ * The whole parsed config: the static keys as the schema defines them, plus
168
+ * the rule set's `rules` and `overrides`. Exported from here and re-exported
169
+ * (type-only) by `./types.ts`; a key cannot be in the type and absent from the
170
+ * validator.
171
+ */
172
+ export type VigilesConfigOf<Rules> = StaticConfig & {
173
+ rules: Rules;
174
+ overrides?: readonly {
175
+ readonly files: readonly string[];
176
+ readonly rules: {
177
+ readonly [K in keyof Rules]?: RuleSeverity;
178
+ };
179
+ }[];
180
+ extends?: string | readonly string[];
181
+ };
182
+ /** A parse of a raw config: the config, or the issues that refused it. */
183
+ export type ConfigParse<C> = {
184
+ readonly success: true;
185
+ readonly data: C;
186
+ } | {
187
+ readonly success: false;
188
+ readonly error: {
189
+ readonly issues: readonly ConfigIssue[];
190
+ };
191
+ };
192
+ /**
193
+ * `.vigilesrc.json` for one rule set — the schema, its presets and its
194
+ * defaults, BUILT from the rules a composition root hands in. `C` is the parsed
195
+ * config's type: precise (`VigilesConfigOf<RulesConfigOf<typeof RULES>>`) at
196
+ * the root, string-keyed in generic code.
197
+ */
198
+ export interface ConfigSet<C> {
199
+ /** The whole schema — for the JSON Schema build and the error messages. */
200
+ readonly schema: z.ZodType;
201
+ /** Every rule id the schema accepts, in the set's order. */
202
+ readonly ruleNames: readonly string[];
203
+ /** The preset names `extends` and `--preset=` accept, from the groups. */
204
+ readonly presetNames: readonly string[];
205
+ /**
206
+ * Parse a raw `.vigilesrc.json` value — THE one entry point every reader uses.
207
+ *
208
+ * 🔴 THE PRESET IS MERGED INTO THE RAW INPUT, BEFORE THE SCHEMA: after
209
+ * parsing, every rule carries a value (the schema fills each default), so
210
+ * "the user wrote `hook-events: warn`" and "nobody wrote it" are the same
211
+ * output, and an explicit downgrade could not win over the preset. Before
212
+ * parsing, the user's own `rules` keys are exactly what they wrote, so the
213
+ * preset's severities go UNDER them. Only a recognized preset with an object
214
+ * (or absent) `rules` is expanded; anything else is passed through for the
215
+ * schema to refuse with its own message.
216
+ *
217
+ * `extraPresets` — `audit`/`lint --preset=<name>` for one run — go after the
218
+ * file's own presets (so they win over them) and never over its explicit
219
+ * `rules`. They are not written into the parsed `extends`: that key stays
220
+ * what the FILE says.
221
+ */
222
+ parse(raw: unknown, extraPresets?: readonly string[]): ConfigParse<C>;
223
+ }
224
+ /**
225
+ * Build `.vigilesrc.json` for a rule set: each rule's key with its default and,
226
+ * for a rule with `options`, the `[severity, options]` form; `overrides` over
227
+ * the same ids; `extends` over the groups' preset names.
202
228
  *
203
- * Only a recognized preset with an object (or absent) `rules` is expanded;
204
- * anything else is passed through untouched for the schema to refuse with its
205
- * own message, so a typo in `extends` is reported, never silently ignored.
229
+ * The one place Zod cannot carry the type: an object built from
230
+ * `Object.fromEntries` has string keys, so the parse result is narrowed to the
231
+ * set's precise type by `complete`, which checks at run time that every id is
232
+ * present — never by an assertion.
206
233
  */
207
- export declare function parseVigilesConfig(raw: unknown): Readonly<ReturnType<typeof vigilesConfigSchema.safeParse>>;
234
+ export declare function configFor<const R extends readonly RuleSpec[]>(rules: R, groups: RuleGroups): ConfigSet<VigilesConfigOf<RulesConfigOf<R>>>;
235
+ /**
236
+ * Parse the values of `--preset=` (each may be a comma list) into preset
237
+ * names, through the SAME enum `extends` validates with, so the config file
238
+ * and the command line refuse an unknown name with the same message. The
239
+ * `vigiles:` prefix is optional on the command line: `--preset=experimental`
240
+ * and `--preset=vigiles:experimental` are the same preset.
241
+ */
242
+ export declare function parsePresetFlags(known: readonly string[], values: readonly string[]): {
243
+ readonly ok: true;
244
+ readonly presets: readonly string[];
245
+ } | {
246
+ readonly ok: false;
247
+ readonly message: string;
248
+ };
208
249
  /**
209
250
  * A `.vigilesrc.json` that cannot be honoured as written.
210
251
  *
@@ -218,41 +259,6 @@ export declare function parseVigilesConfig(raw: unknown): Readonly<ReturnType<ty
218
259
  export declare class VigilesConfigError extends Error {
219
260
  readonly name = "VigilesConfigError";
220
261
  }
221
- /**
222
- * The whole config, AS THE SCHEMA DEFINES IT — `VigilesConfig` is this.
223
- *
224
- * Exported from here and re-exported (type-only, so no runtime cycle) by
225
- * `./types.ts`, which every consumer already imports. The derivation is the
226
- * point: a key cannot be in the type and absent from the validator.
227
- */
228
- export type VigilesConfigShape = z.infer<typeof vigilesConfigSchema>;
229
- /**
230
- * The two keys `harnesses` replaced, and the sentence each one gets (#240).
231
- *
232
- * They are listed here rather than left to `.strict()`'s "Unrecognized key"
233
- * because the reader of that message is someone whose config USED to work: they
234
- * need the new spelling, not the news that the old one is unknown. `.strict()`
235
- * would tell them the truth in the least useful possible way.
236
- */
237
- export declare const REPLACED_KEYS: ReadonlyArray<{
238
- readonly key: string;
239
- readonly was: string;
240
- readonly now: string;
241
- }>;
242
- /**
243
- * The message a config written in the replaced shape gets.
244
- *
245
- * `names` are the harnesses the user's OWN config named under the removed
246
- * `harness` key, so the worked example below shows THEIR migration.
247
- *
248
- * 🔴 IT USED TO BE A FIXED EXAMPLE — `{ "harnesses": { "claude-code": …,
249
- * "codex": {} } }`, two names typed into the core. Its own comment called that
250
- * debt and predicted the failure: "with a third adapter this sample goes
251
- * stale". Reading the names from the config being migrated is better than
252
- * reading them from the registry would have been, and it is available here:
253
- * it shows the reader their own keys instead of somebody else's.
254
- */
255
- export declare function replacedKeyMessage(present: ReadonlyArray<(typeof REPLACED_KEYS)[number]>, names: readonly string[]): string;
256
262
  /**
257
263
  * Turn a Zod failure into the lines a human acts on — ONE per real problem.
258
264
  *
@@ -277,7 +283,7 @@ export declare function replacedKeyMessage(present: ReadonlyArray<(typeof REPLAC
277
283
  * the key accepts, and an unknown key carries the candidate list plus a
278
284
  * distance-bounded "did you mean".
279
285
  */
280
- export declare function formatConfigIssues(issues: readonly ConfigIssue[]): string[];
286
+ export declare function formatConfigIssues(schema: Readonly<z.ZodType>, issues: readonly ConfigIssue[]): string[];
281
287
  /**
282
288
  * The shape of a Zod issue this formatter reads — structural, not imported.
283
289
  *