Context
PR #171 landed DECLARES.* dot-key traversal for neighbors. Composed keys are defined in three places today:
kuzu_queries._MEMBER_EDGE_COMPOSED_REL_MAP — Cypher rollup + traversal
mcp_v2.ComposedEdgeType — Pydantic Literal + _COMPOSED_EDGE_TYPES
java_ontology._COMPOSED_MEMBER_TYPE_TRAVERSAL — EDGE-NAVIGATION doc generator strings
Adding a fourth composed member path (or renaming a key) requires editing all three manually.
Proposal
Single source of truth: export composed dot-key strings from kuzu_queries._MEMBER_EDGE_COMPOSED_REL_MAP (or a small shared module both kuzu_queries and mcp_v2 import).
- Build
ComposedEdgeType / _COMPOSED_EDGE_TYPES from map keys at runtime (or generate the Literal via typing helpers / a single tuple re-export).
- Optionally derive
java_ontology._COMPOSED_MEMBER_TYPE_TRAVERSAL edge segment from the same keys (template already uses {edge} for the stored rel suffix).
Acceptance
- One tuple (or module constant) defines composed keys; no duplicated string literals across
kuzu_queries, mcp_v2, and doc tooling.
- Existing tests for dot-key neighbors + describe rollup parity still pass.
- No ontology version bump unless traversal semantics change.
Related
Context
PR #171 landed
DECLARES.*dot-key traversal forneighbors. Composed keys are defined in three places today:kuzu_queries._MEMBER_EDGE_COMPOSED_REL_MAP— Cypher rollup + traversalmcp_v2.ComposedEdgeType— PydanticLiteral+_COMPOSED_EDGE_TYPESjava_ontology._COMPOSED_MEMBER_TYPE_TRAVERSAL— EDGE-NAVIGATION doc generator stringsAdding a fourth composed member path (or renaming a key) requires editing all three manually.
Proposal
Single source of truth: export composed dot-key strings from
kuzu_queries._MEMBER_EDGE_COMPOSED_REL_MAP(or a small shared module bothkuzu_queriesandmcp_v2import).ComposedEdgeType/_COMPOSED_EDGE_TYPESfrom map keys at runtime (or generate theLiteralviatypinghelpers / a single tuple re-export).java_ontology._COMPOSED_MEMBER_TYPE_TRAVERSALedge segment from the same keys (template already uses{edge}for the stored rel suffix).Acceptance
kuzu_queries,mcp_v2, and doc tooling.Related