Enforce Rules Format

zernie/vigiles/.claude/skills/enforce-rules-format

by zernie1d562c69566fNo license15 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated today

Validate that all rules have proper enforcement classification (enforce/check/guidance)

Instructions onlyAI & Agents
AI-generated overview

Validates that project instruction-file rules carry proper enforcement classifications and fixes missing ones.

What it does
This skill inspects a project's instruction files to determine whether they use a spec-based (v2) or hand-written (v1) rule format. It then checks that each rule is classified as enforced, checked, or guidance-only, reports missing annotations in a summary table, and proposes fixes such as mapping rules to linter rules or marking them as guidance. It also suggests migrating v1 files to typed specs and runs validation commands to report results.
When to use it
Use it when auditing or cleaning up rule definitions in CLAUDE.md, AGENTS.md, .cursorrules, or spec files, especially when rules may lack enforcement annotations. It fits projects that want rules tied to linter enforcement or explicitly marked as guidance-only.
Requirements
Requires project instruction files to inspect and, for v2 projects, the vigiles CLI available via npx for compile, discover, and check commands. It ships no scripts and asks the user before making changes.

Validate that every rule in the project's instruction files has a proper enforcement classification, and fix any that are missing.

Instructions

Step 1: Detect Format

Check which format the project uses:

v2 (spec-based): Look for CLAUDE.md.spec.ts or any *.spec.ts files. If found, this is a v2 project — rules must use enforce(), check(), or guidance().

v1 (hand-written): Look for CLAUDE.md, AGENTS.md, .cursorrules. If found without a spec file, this is a v1 project — rules need **Enforced by:** or **Guidance only** annotations.

Step 2: Validate

For v2 specs:

The TypeScript type system already prevents unannotated rules — you can't create a rule without calling enforce(), check(), or guidance(). So focus on:

  1. Do enforce() rules reference real linter rules? Run npx vigiles compile to check.
  2. Are there guidance rules that COULD be enforce()? Check linter configs for matching rules.
  3. Are there check() assertions that could be delegated to a linter? Suggest enforce() instead.
bash
npx vigiles compilenpx vigiles discover

For v1 hand-written files:

Scan for ### headings. Each must have one of:

  • **Enforced by:** \linter/rule-name``
  • **Guidance only** — reason
  • <!-- vigiles-disable -->

Report missing annotations with a summary table.

Step 3: Fix Issues

For each issue found:

  1. Check the project's linter configuration for matching rules
  2. Suggest enforce("linter/rule") (v2) or **Enforced by:** \linter/rule`` (v1)
  3. If no linter rule exists, suggest guidance() (v2) or **Guidance only** (v1)
  4. Ask the user before making changes

Step 4: Suggest Migration

If the project uses v1 format, suggest migrating to v2 specs for type safety:

Your rules could benefit from type-safe specs. Run the adopt-spec skill to convert your CLAUDE.md to a typed .spec.ts file.

Step 5: Verify

Run the appropriate command:

bash
# v2npx vigiles compile && npx vigiles check
# validatenpx vigiles check

Report the validation result.

Source and attribution

Source:zernie/vigilesin.claude/skills/enforce-rules-formatat commit1d562c6

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal

More from zernie/vigiles

Linter Docs

zernie

Deep 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.)

Awaiting classification15updated today

Debug My Harness

zernie

Diagnoses agent harness misbehavior by reading the local .vigiles/runs.jsonl flight-recorder ledger.

AI & Agents15updated today

Review Docs

zernie

Review the README or a documentation page from several real reader points of view at once. Fans out one parallel reviewer per audience — Claude Code newcomer, power user, plugin/skill author, skeptical senior engineer, non-running decision-maker — each scoring it x/5 and naming concrete, line-level fixes. Use when asked to review, critique, grade, or "get to N/5" the README or any front-door doc, or to check how a doc reads for real users. Not for code review (use /code-review for that).

Awaiting classification15updated today

Adopt Spec

zernie

Converts an existing hand-written CLAUDE.md into a typed CLAUDE.md.spec.ts using the vigiles spec library.

AI & Agents15updated today

Pr To Lint Rule

zernie

Turns a recurring prose code-review rule into a custom lint rule, gated by an independent soundness test that abstains if it leaks.

Software Development15updated today

Deep Research

zernie

Use when the user asks to research a topic in depth, map a competitive/market landscape, run a multi-source investigation, or "fan out" parallel research agents — anything where many findings must be gathered and then NOT lost. Enforces durable, detail-preserving research (write full findings to disk; keep a full appendix beside the synthesis).

Awaiting classification15updated today