aif-rules-check

Validates changed files against project rules and reports a pass, warn, or fail verdict.

31|2|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/letuhao/lore-weave --skill aif-rules-check-letuhao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aif-rules-check
Source: https://github.com/letuhao/lore-weave/tree/main/.cursor/skills/aif-rules-check
Command: npx skills add https://github.com/letuhao/lore-weave --skill aif-rules-check-letuhao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Teams accumulate project rules in files like RULES.md, but nothing enforces them during day-to-day edits. This Skill runs a standalone, read-only compliance gate against your changed files so rule violations are caught before review, without running a full code review or verification pass. ## Core Features & Use Cases - Scoped rule checking: Resolves the changed scope from a git ref, staged changes, working tree, or branch diff, then loads only the rule files relevant to that scope. - Three-level verdicts: Classifies results as PASS, WARN, or FAIL with evidence tied to specific rule text and file paths, plus a machine-readable aif-gate-result JSON block for CI or automation. - Config-aware and read-only: Reads .ai-factory/config.yaml for custom rule paths and plan formats, never edits rules or source code, and suggests /aif-rules when rules are missing or ambiguous. - Use Case: Before opening a pull request, run the gate against your feature branch to confirm your changes comply with the team's base and area-specific rules, and get concrete suggested fixes for any blocking violations. ## Quick Start Ask the AI to run the rules compliance check against your current staged changes or a specific git ref such as main.

Frequently Asked Questions about aif-rules-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check my code changes against project rules before committing?

Run the rules check with no arguments to evaluate staged changes first, falling back to the working tree or branch diff. It loads your configured rule files and returns a PASS, WARN, or FAIL verdict with evidence for each violation.

How do I run a rules compliance check against a specific git branch or ref?

Pass a git ref as the argument, such as main or a commit hash. The skill validates the ref with git rev-parse, then diffs it against HEAD to determine the changed scope before evaluating rules.

What is the difference between a rules check and a full code review?

A rules check only verifies compliance with explicit project rules and is read-only and fast. A full review covers broader code quality, design, and correctness concerns beyond what the rule files state.

Does the rules check modify my rule files or source code?

No, the gate is strictly read-only and never edits RULES.md, area rule files, plans, or source code. When rules are missing or unclear, it suggests capturing them through the separate rules management command.

Why does the rules check return WARN instead of FAIL?

WARN is returned when no applicable rules resolve, evidence is ambiguous, or there are no changed files to evaluate. FAIL is reserved for clear violations of explicit hard rules tied to specific diff content.