{"modulePath":"github.com/codefit-cli/codefit","version":"v0.2.9","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package dbrules\n\nPackage dbrules holds codefit's deterministic database-structure rules. Each rule reasons over the neutral core/db.Schema and emits deterministic Findings (affirmations, Confidence 1.0) and/or SurfaceItems (questions for the agent) — it never sees a concrete ORM. Because a rule is language-neutral, every future ORM provider (JPA, Drizzle, EF Core) inherits it for free once it can produce a db.Schema (ADR 0015).\n\ndbrules lives BESIDE core/db, not inside it: a rule imports core/findings and core/surface, so it cannot live in the pure leaf core/db (ADR 0014). The dependency arrow is dbrules -\u003e {core/db, core/findings, core/surface}; core/db still imports nothing.\n\n## Functions\n\n```go\nfunc Run(s *db.Schema) ([]findings.Finding, []findings.SurfaceItem)\n```\nRun executes every rule over the schema and returns the union of their findings and surface. A nil schema yields nothing.\n\n## Types\n\n```go\ntype Rule interface {\n\tID() string\n\tCheck(*db.Schema) ([]findings.Finding, []findings.SurfaceItem)\n}\n```\nRule is one deterministic DB-structure check over the neutral schema. It emits affirmations (Findings, Confidence 1.0) and/or surface (SurfaceItems, questions the agent reasons). A rule never sees a concrete ORM — only db.Schema — so it is inherited by every future provider that can produce one (ADR 0015).\n\n```go\nfunc All() []Rule\n```\nAll is the enumerated rule set of this slice (schema-only OLTP). Instantiated by hand, like the sensors — no registry (YAGNI until there are many rules).\n\n","path":"github.com/codefit-cli/codefit/internal/core/dbrules","name":"dbrules","synopsis":"Package dbrules holds codefit's deterministic database-structure rules.","isRedistributable":true}
