What problem does it solve?
The Rule Loader determines which rule files to load for a given user request by evaluating file extensions, directory references, and keywords against RULES_INDEX.md. It coordinates foundation loading, domain matching, activity matching, and dependency resolution while enforcing token budgets across phases.
Core Features & Use Cases
- Foundation loading: always load 000-global-core.md before any other rule.
- Domain and activity matching: map file extensions and keywords to domain rules and activity rules to form a loading plan.
- Dependency resolution: ensure prerequisites are loaded before dependents according to Depends metadata.
- Token budget management: track total tokens and defer low-priority rules when budgets are exceeded.
- Debugging and auditing: output a clear Rules Loaded log with reasons for each loaded or deferred rule.
Quick Start
Use the rule-loader skill in your agent conversation.