From vigiles
Adds new enforce(), check(), or guidance() rules to CLAUDE.md.spec.ts for Vigiles specs, supporting linter-backed enforcement, filesystem checks, and non-mechanizable guidance.
npx claudepluginhub zernie/vigilesThis skill uses the workspace's default tool permissions.
Add a new rule to an existing `CLAUDE.md.spec.ts` (or create one if it doesn't exist).
Guides creation of .claude/rules/ files for path-scoped project conventions using TDD workflow: RED (test gaps), GREEN (write rule), REFACTOR (optimize). Triggers on 'add rule', 'create convention', 'scope guideline'.
Guides authoring .claude/rules/*.md files for auto-applied, file-pattern-scoped constraints on code conventions, quality standards, and project-specific guidance.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Share bugs, ideas, or general feedback.
Add a new rule to an existing CLAUDE.md.spec.ts (or create one if it doesn't exist).
$ARGUMENTS — A natural language description of what the rule should enforce. Examples:
Look for CLAUDE.md.spec.ts in the repo root. If it doesn't exist:
CLAUDE.md — if so, suggest running the migrate-to-spec skill firstnpx vigiles init to scaffold oneBased on the user's description, determine the rule type:
enforce() — if a linter rule can back it:
npx vigiles check will confirm during compilationcheck() — if it's a filesystem structural convention:
check(every("glob").has("pattern"), "why")guidance() — if it can't be mechanically enforced:
If uncertain whether a linter rule exists, ask the user rather than guessing.
Create a rule entry in the spec. Use kebab-case for the rule ID derived from the description.
Example outputs:
// enforce — backed by ESLint
"no-console": enforce("eslint/no-console", "Use structured logger for observability."),
// check — filesystem assertion
"controller-tests": check(
every("src/**/*.controller.ts").has("{name}.controller.test.ts"),
"Every controller must have a co-located test file.",
),
// guidance — cannot be mechanically enforced
"research-before-implementing": guidance(
"Google unfamiliar APIs before implementing. Check if a well-maintained library exists.",
),
Read the existing spec file and add the new rule to the rules object. Maintain alphabetical ordering if the existing rules are alphabetical, otherwise append at the end.
Import any new builders needed (e.g., check and every if this is the first check() rule).
npm run build
npx vigiles compile
If compilation fails (e.g., linter rule doesn't exist), report the error and suggest alternatives.
Show the user the updated spec and the compiled CLAUDE.md diff.