Motivation
Diffo.Provider.Feature is a generic Ash Resource whose characteristics are stored via the generic Characteristic resource (using Ash.Type.Dynamic). Once #128 (BaseCharacteristic) lands, Feature is the natural next step: features become typed resources with real Ash attributes and properly typed characteristic relationships.
Proposed change
Introduce Diffo.Provider.BaseFeature as an Ash Resource Fragment. Feature type modules become Ash Resources that use BaseFeature. BaseFeature itself uses BaseCharacteristic for its characteristics, so feature characteristics inherit the same typing benefits.
DSL impact
feature :name, MyFeatureResource do ... end references a BaseFeature-derived resource. The inline characteristic declarations inside the feature block map to BaseCharacteristic-derived resources on that feature type. The verifier (VerifyFeatures) is updated to check BaseFeature extension.
Instance behaviour simplification
With features as proper resources, set_features_argument and the feature-related wiring in Extension.Feature / TransformBehaviour reduce to standard manage_relationship. The feature/1 and feature_characteristic/2 helper functions generated by TransformBehaviour may simplify or be removed.
Neo4j model
Each BaseFeature-derived resource becomes a distinct Neo4j node label, with its characteristics as typed nodes extending BaseCharacteristic.
Acceptance criteria
Dependencies
Motivation
Diffo.Provider.Featureis a generic Ash Resource whose characteristics are stored via the genericCharacteristicresource (usingAsh.Type.Dynamic). Once #128 (BaseCharacteristic) lands, Feature is the natural next step: features become typed resources with real Ash attributes and properly typed characteristic relationships.Proposed change
Introduce
Diffo.Provider.BaseFeatureas an Ash Resource Fragment. Feature type modules become Ash Resources thatuseBaseFeature.BaseFeatureitself usesBaseCharacteristicfor its characteristics, so feature characteristics inherit the same typing benefits.DSL impact
feature :name, MyFeatureResource do ... endreferences aBaseFeature-derived resource. The inlinecharacteristicdeclarations inside the feature block map toBaseCharacteristic-derived resources on that feature type. The verifier (VerifyFeatures) is updated to checkBaseFeatureextension.Instance behaviour simplification
With features as proper resources,
set_features_argumentand the feature-related wiring inExtension.Feature/TransformBehaviourreduce to standardmanage_relationship. Thefeature/1andfeature_characteristic/2helper functions generated byTransformBehaviourmay simplify or be removed.Neo4j model
Each
BaseFeature-derived resource becomes a distinct Neo4j node label, with its characteristics as typed nodes extendingBaseCharacteristic.Acceptance criteria
Diffo.Provider.BaseFeaturefragment defined, usingBaseCharacteristicBaseFeatureVerifyFeaturesupdated to checkBaseFeatureextensionExtension.Featurewiring removed; replaced by standard relationship managementTransformBehaviour/ActionCreate/ActionUpdatefurther simplifiedDependencies