/vigiles:strengthenfrom vigiles
Upgrades vigiles spec guidance() rules to enforce() by matching them to existing linter rules (ESLint, Ruff, Clippy, etc.). Use when asked to harden or make vigiles rules enforceable.
Ships in vigiles. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Scan spec files for guidance() rules and suggest enforce() replacements backed by real linter rules.
The dividing line is cost, not strictness. A guidance() → enforce() swap where the linter rule already exists and is enabled is a pure win — free, reversible, no false-positive risk — so apply it (Tier 1 below). Anything that costs something — editing linter config, installing a plugin, or a change that could fail a clean CI — is the user's call: present it with the tradeoff spelled out and let them choose (Tiers 2–4). Never silently edit config, install a dependency, or escalate the repo into strict gating. This is the init enforcement model (structural = on by default, workflow/strict = opt-in) applied at edit time.
Ask the user:
Auto or interactive?
- Auto — I'll apply all safe changes (direct replacements where the rule is already enabled), commit, and show you the diff. Risky changes (require config edits or plugin installs) go in a summary for you to review.
- Interactive — I'll present each suggestion and you pick which ones to apply.
Default to interactive if the user doesn't specify.
Run npx vigiles generate types to get the full list of enabled linter rules in the project. Read .vigiles/generated.d.ts to see every rule available across all detected linters.
Note which linter prefixes appear in the generated types (e.g., EslintRule, RuffRule). You'll only need reference docs for detected linters.
Find all .spec.ts files in the project (**/*.md.spec.ts). For each file, identify every guidance() rule.
For each guidance rule, check if an enabled rule in .vigiles/generated.d.ts directly matches. This is the fast, deterministic path — no doc reading needed.
Look for:
no-console is in EslintRuleno-console is availableno-unused-vars or @typescript-eslint/no-unused-vars is availableIf a match is found and the rule is in the generated types (meaning it's already enabled), this is a direct replacement — no config changes needed.
For guidance rules that didn't match in Step 3, read the linter reference docs for the project's detected linters:
../linter-docs/eslint.md../linter-docs/stylelint.md../linter-docs/ruff.md../linter-docs/pylint.md../linter-docs/rubocop.md../linter-docs/clippy.mdOnly read docs for linters the project actually uses. Skip docs for linters with no rules in generated types.
Check the plugin tables and decision matrices. The guidance text may describe a pattern covered by:
no-restricted-* config pattern (see Step 4b)no-restricted-* PatternsMany guidance rules can be enforced via built-in linter config without a custom rule. This is the most common strengthen pattern — "don't do X" maps to a restriction config.
ESLint:
// "Don't import from internal modules"
"no-restricted-imports": ["error", {
patterns: [{ group: ["src/internal/*"], message: "Use the public API." }]
}],
// "Don't call console.log"
"no-restricted-syntax": ["error", {
selector: 'CallExpression[callee.object.name="console"]',
message: "Use the project logger."
}],
// "Don't use moment.js"
"no-restricted-imports": ["error", {
paths: [{ name: "moment", message: "Use dayjs instead." }]
}],
Ruff:
# "Don't use os.system"
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"os.system".msg = "Use subprocess.run instead."
RuboCop:
# "Don't use puts in production" — if Rails/Output doesn't fit
Custom/NoPuts:
Enabled: true
When suggesting a no-restricted-* change:
enforce() rule that references itGroup the output into tiers:
Tier 1: Direct replacements (rule already enabled — zero risk)
// Before
"no-console": guidance("Use structured logger instead of console.log"),
// After
"no-console": enforce("eslint/no-console", "Use structured logger instead of console.log"),
Tier 2: Config-backed (rule exists but needs config options)
// Spec change:
"no-moment": enforce("eslint/no-restricted-imports", "Use dayjs instead of moment."),
// Config change needed (eslint.config.mjs):
"no-restricted-imports": ["error", {
paths: [{ name: "moment", message: "Use dayjs instead." }]
}],
Tier 3: Plugin install needed
"cognitive-complexity": guidance("Keep functions simple")
→ Install eslint-plugin-sonarjs, enable sonarjs/cognitive-complexity
→ enforce("eslint/sonarjs/cognitive-complexity", "Keep functions simple")
Tier 4: No match (stays as guidance — candidate for a future rule-synthesis skill)
"research-first": guidance("Google unfamiliar APIs first.")
→ No linter rule can enforce this. Stays as guidance for now.
→ (Custom-rule synthesis is planned but not yet shipped.)
In auto mode:
guidance() with enforce())npm run build && npx vigiles compile to verify each change compilesIn interactive mode:
npm run build && npx vigiles compile to verifyFor Tier 4 (no match): Tell the user these rules stay as guidance — custom-rule synthesis is a planned skill, not yet available.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub zernie/vigiles --plugin vigiles6 skills in this plugin
/adopt-specAdopt a typed .spec.ts for an existing hand-written CLAUDE.md — start from the file you already have, non-destructively/debug-my-harnessDiagnose why an agent harness misbehaved by reading the local flight-recorder ledger (.vigiles/runs.jsonl) — which skills fired or got hijacked, which hooks blocked or wrongly allowed, which subagent tool-contract violations happened, and how a skill's trigger rate moved. Use when asked why a skill stopped firing, why a hook didn't block, why the wrong skill ran, or to debug/investigate what the harness actually did. NOT for writing new rules (use strengthen) or editing the spec (use edit-spec)./edit-specEdit a vigiles .spec.ts to change a compiled instruction file (CLAUDE.md / AGENTS.md) — add, modify, or remove a rule, section, command, or file pointer (including a request to add a "key file" — the keyFiles field is deprecated). Use whenever you need to change a CLAUDE.md/AGENTS.md that carries a vigiles hash (edit the spec, never the artifact), including adding a new enforce()/check()/guidance() rule./linter-docsDeep linter reference for authoring or debugging a vigiles enforce() rule — plugin tables, AST selectors, type-aware rules, auto-fix, and edge cases for ESLint, Ruff, Pylint, RuboCop, Stylelint, and Clippy. Use when you need the exact rule name or config for a specific linter, not for running a linter. (JVM/Go linters — detekt, ktlint, Checkstyle, golangci-lint — and Cedar have no deep-dive file yet; their reference lives in docs/linter-support.md.)/test-harnessInstall vigiles and test a Claude Code harness — hooks, skills, agents, settings, CLAUDE.md — by picking the right tier (unit / deterministic / eval) and writing a test that passes. Use to check that a hook fires or blocks, that a skill triggers, that injected context lands; or to observe a run — which tools it called, whether it stayed inside its declared allowed-tools, what files and side effects it produced, how to intercept a call without executing it.Other plugins' skills for the same job