Grain
Automatically discovers and documents the unwritten coding conventions and architectural patterns within a codebase by analyzing its syntax trees and Git history.
Grain addresses the common problem where coding agents or new developers struggle to adhere to a project's implicit conventions, as these rules are rarely fully documented. It solves this by mining these "unwritten rules" directly from the codebase's syntax trees and its entire Git history. Unlike tools that *enforce* declared intent, Grain *surfaces* the practiced norms, acting as an instrument to read and understand the actual architecture and coding style of a repository. It provides insights into placement, style, and structure, offering a factual basis for understanding how a repository "does things."