The Three-Tier Governance Architecture
Grabby's most powerful feature is its cascading rule system. Rules flow from top to bottom, with each tier able to add constraints but never remove protections from above.
Tier 1 System-Level Contracts
Scope: Apply to ALL projects across your organization. Stored in ~/.grabby/contracts/ on the developer's machine. These define non-negotiable standards that every project must follow.
Tier 2 Project-Level Rulesets
Scope: Apply to a specific repository. Stored in docs/RULESET_*.md files. These extend system rules with project-specific patterns, technology choices, and team conventions.
Tier 3 Feature-Level Contracts
Scope: Apply to a single feature or change. Stored in contracts/*.fc.md. These define the specific objective, allowed files, dependencies, and completion criteria for one unit of work.
How Rules Cascade
When AI generates code for a feature, Grabby merges all three tiers into a single enforcement context. System rules provide the floor (minimum security, quality). Project rulesets add technology-specific constraints. Feature contracts scope the exact files and changes allowed. The AI can only operate within the intersection of all three.