aif-rules

Appends project conventions and area-specific rules to RULES.md artifacts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams lose track of coding conventions when they live only in chat history or tribal knowledge. This Skill captures project rules as persistent, versioned artifacts that are automatically loaded before task execution, so conventions are enforced consistently across every implementation run. ## Core Features & Use Cases - Direct Rule Addition: Append a rule to RULES.md in one command, with duplicate detection and flat-list formatting. - Interactive Mode: Prompt for a rule when no argument is given, with examples to guide phrasing. - Area-Specific Rules: Create and register scoped rule files (e.g., rules.api, rules.frontend) in config.yaml for domain-specific conventions. - Use Case: A developer notices inconsistent API naming and runs the skill with "Routes must use kebab-case"; the rule is saved to RULES.md and automatically loaded by /aif-implement on every future task. ## Quick Start Ask the AI to add the rule "Always use DTO classes instead of arrays for data transfer" to the project rules.

Frequently Asked Questions about aif-rules

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

FAQPage Schema
How do I add a project rule that persists across AI sessions?

Invoke the skill with the rule text as an argument, such as "/aif-rules Always use DTO classes instead of arrays". The rule is appended to RULES.md and automatically loaded by /aif-implement before every task execution.

How do I create area-specific coding conventions?

Use the area prefix, for example "/aif-rules area:api", to create or update a dedicated rules file like rules/api.md. The skill registers it in config.yaml as rules.api so it loads alongside base conventions.

What is the difference between RULES.md and area rules files?

RULES.md holds universal project axioms as a flat list, while area files like rules/api.md hold domain-specific conventions. More specific rules win: area rules override base rules, which override RULES.md.

Does the skill prevent duplicate rules?

Yes. Before appending, the skill checks RULES.md for an existing rule with the same meaning. If a duplicate is found, it notifies the user and skips the addition instead of writing a redundant entry.

Can rules be written in a language other than English?

Yes. The skill reads language.artifacts from .ai-factory/config.yaml and writes rule artifacts in that language, while preserving code identifiers, paths, and config keys unchanged according to the technical terms policy.