/vigiles:edit-spec <what to change — e.g., "add a rule about error handling" or "update the testing section">from vigiles
Edit a vigiles .spec.ts to update compiled instruction files (CLAUDE.md / AGENTS.md) by adding, modifying, or removing rules, sections, commands, or file pointers. Use when a CLAUDE.md/AGENTS.md carries a vigiles hash.
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.
Edit a .spec.ts file to update the project's instruction files. The spec is the source of truth — CLAUDE.md and AGENTS.md are compiled build artifacts that must not be edited directly.
$ARGUMENTS — What the user wants to change. Examples:
Look for spec files in the repo root:
CLAUDE.md.spec.ts — source for CLAUDE.mdAGENTS.md.spec.ts — source for AGENTS.md*.spec.ts matching instruction filesIf no spec exists: if there's a hand-written CLAUDE.md, suggest the
adopt-spec skill; otherwise suggest npx vigiles init to scaffold one.
Read the spec file. It's a TypeScript file that exports an instructionFile() call with these fields:
import { instructionFile, enforce, guidance, check, every } from "vigiles/spec";
export default instructionFile({
// Optional: output target (defaults to "CLAUDE.md")
target: "CLAUDE.md",
// or multi-target:
// target: ["CLAUDE.md", "AGENTS.md"],
// Prose sections — become ## headings in compiled output
sections: {
positioning: "What this project does...",
architecture: "How the codebase is structured...",
},
// (No `keyFiles` — deprecated; see "A pointer to a file" in Step 3.)
// Commands verified against package.json
commands: {
"npm run build": "Compile the project",
"npm test": "Run all tests",
},
// Rules — three types
rules: {
// enforce() — backed by a linter rule, verified to exist AND be enabled
"no-any": enforce(
"@typescript-eslint/no-explicit-any",
"Use unknown and narrow with type guards.",
),
// check() — filesystem assertion run by vigiles
"test-pairing": check(
every("src/**/*.service.ts").has("{name}.test.ts"),
"Every service must have tests.",
),
// guidance() — prose only, no enforcement
"research-first": guidance("Google unfamiliar APIs before implementing."),
},
});
Based on what the user asked for:
Adding a rule (this absorbs the old generate-rule skill):
enforce() — a linter rule can back it. Check the project's linter configs
(ESLint, Ruff, Clippy, Pylint, RuboCop, Stylelint) for a matching rule; also
consider an architectural tool (ast-grep, Dependency Cruiser, Steiger). If
uncertain whether a rule exists, ask the user rather than guessing.check() — a filesystem structural convention ("every X needs a Y"). Only
for file-pairing; never for code content.guidance() — can't be mechanically enforced (subjective conventions,
process rules, migration context).enforce(): use the real linter rule name (e.g. eslint/no-console,
@typescript-eslint/no-explicit-any, ruff/T201).rules object with a kebab-case key derived from the intent,
preserving alphabetical order if the existing rules are alphabetical. Import
any new builders needed (e.g. check and every for the first check()).Updating a section:
sections. Sections are plain strings or tagged template literals with file(), cmd(), ref() for verified references# or ## headers inside sections — they break the document structureAdding a command:
commands. The compiler verifies it against package.json scripts.A pointer to a file (what used to be a "key file"):
keyFiles entry — not one, not even to a spec that already
has the field. It is deprecated (vigiles lint reports it as
deprecated-key-files) and removed in the next major: it compiles a file
map into the instruction file loaded on every request, and the agent finds
files itself.CLAUDE.md (its own <folder>/CLAUDE.md.spec.ts, compiled).
It is not free: it loads the first time a file in that folder is read and
stays for the rest of the session (until compaction), and past the
harness's per-file cut the rest is dropped (vigiles lint reports it).
So rules only — a list, an index or a dated record goes in a file that is
not auto-loaded, linked from there;${file("src/services/auth.ts")} inside a prose section where the
decision that needs it is written — compile verifies it exists, exactly
as it verified a keyFiles path. (guidance() takes a plain string, so a
path typed there is not verified.)keyFiles? Propose removing it, in the same
reply: go through the entries with the same four steps (the full recipe is
docs/rules/deprecated-key-files.md in the vigiles repository; a path that
no longer exists is deleted) and show, per entry, where it goes and why.
Where each entry goes is the user's call; apply it once they confirm.After editing the spec, run:
npx vigiles compile
This regenerates the compiled instruction file(s). Review the output for any errors:
stale-file — a file() (or deprecated keyFiles) path doesn't existstale-command — a command isn't in package.jsoninvalid-rule — a linter rule doesn't exist or is disabledsection-has-header — a section contains # headers (break into separate named sections)npx vigiles lint
If the vigiles plugin is installed (/plugin marketplace add zernie/vigiles then /plugin install vigiles@vigiles, or npx vigiles init), the PostToolUse hook recompiles automatically after you save the spec.
enforce() would need a linter-config edit or a plugin install (a cost), or if it could fail a clean CI, say so and let the user choose — don't change linter config or flip on strict / workflow gating on your own. A pure win (a rule that's already enabled) you can just apply. The strengthen skill owns guidance() → enforce() upgrades.enforce() rules are verified — the compiler checks the rule exists AND is enabled in your linter config# or ## headers — use separate named sections insteadWhat 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)./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.)/strengthenUpgrade a vigiles spec's guidance() rules to enforce() — scan the guidance rules in a CLAUDE.md/AGENTS.md spec and find existing linter rules (ESLint, Ruff, Clippy, Pylint, RuboCop, Stylelint) that back them. Use when asked to strengthen, harden, or make vigiles rules enforceable; NOT for general linting or fixing lint errors./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