# ADR-016: Naming convention for Module entries ## Status Accepted ## Context Module entries need a way to distinguish their role (config, node type, edge type, constraint) so that `moduleToDbSchema()` can map them to the correct DB tables. Two approaches: explicit metadata/decorators on entries, or naming convention with role-distinguishing suffixes. ## Decision Module entries use role-distinguishing suffixes: `*Node` for node types, `*Edge` for edge types, `Config` for graph configuration, `*EdgeConstraints` for edge endpoint constraints, and bare names or `*Enum` for shared types. `moduleToDbSchema()` uses this convention to map entries to DB tables. Explicit metadata/decorators (e.g., `{ kind: "nodeType", name: "call", schema: ... }`) were considered but rejected — they add boilerplate without adding information. The suffix convention is simpler and sufficient for the expected Module size (5–20 entries). ## Consequences - `moduleToDbSchema()` throws on entries that don't match any recognized suffix - Bare names without a suffix are treated as shared types (embedded in other entries' schemas), not as independent DB rows - `*EdgeConstraints` entries must have an `edgeType` field matching an `*Edge` entry name ## References - [metagraph-module.md](../metagraph-module.md)