F4 design: graphdb_rules data model (Phase A) + L7 prerequisite#26
Merged
Conversation
Architectural contract for the graphdb_rules worker -- six-phase
decomposition of the F4 (E1) feature, with Phase A specified
end-to-end and Phases B-F outlined.
Phase A scope (Scope alpha):
- Meta-ontology: Rule class root + leaf meta-classes
(CompositionRule, ConnectionRule) seeded at runtime under nref 3
- A2 + B3: rules are kind=instance whose class is a rule meta-class;
parameters live in AVPs
- Attachment B: applies_to / applied_by arc pair from owning class
- Unified 3-state mode (mandatory | auto | propose) -- mandatory is
an enforcement level, not a separate rule kind
- Scope-aware API (environment | {project, AnchorNref}); Phase A
accepts environment only, project returns
project_rules_not_yet_supported (L6 placeholder)
- 11-error validation catalog at create time
- ~30 CT cases including a complex_scenarios group
L7 prerequisite:
- Literals subtree (nref 7) partitioned by owning subsystem:
Attribute Literals (graphdb_attr), Language Literals
(graphdb_language), Rule Literals (graphdb_rules)
- create_literal_attribute/3 arity introduced so workers can seed
into their own sub-group
- No runtime migration -- clean-slate seeding only
Decision log (D1-D11) captures rationale for each commitment.
Open issues (OI-1 through OI-9) flag everything Phase A
deliberately leaves for later phases.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Architectural design for F4 (E1) —
graphdb_rulesRule Engine, the last remaining gen_server stub. F4 is decomposed into six phases; this PR ships only the design document — no code changes.Attribute Literals,Language Literals,Rule Literals). Clean-slate seeding; no runtime migration code.Key architectural commitments
kind=instancewhose class is a rule meta-classConnectionRulewith 3-state mode (mandatory | auto | propose)applies_to/applied_byarc pair from owning classgraphdb_rulesdirect entry point, not routed throughgraphdb_mgrattribute_type => term(union types are future M8 work)graphdb_ruleslast child ofgraphdb_supWhat ships in Phase A (Scope α) once it lands
Surfaced follow-up tasks
Test plan
This PR is design-only. CI runs `rebar3 compile` which passes (no code changes). Test plan for the implementation PR (separate, future):
🤖 Generated with Claude Code