You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: enforce parent-child hierarchy rules in validation #23
I have some opinions about the approach to this which has fairly wide-reaching implications. We already have the idea of rules that can be descriptive or executable and it probably makes sense that a validation rule like what parents are allowed is simply just another one of those kinds of rules rather than extending the hierarchy metadata
I think in practise this means embracing the rules construct that we have started to introduce to consider how we will express different types of rules. Some might be validation. Others may be quality related rules may need to be conditional, so you may require that a child entity exists when a node has a certain status, for example, and so there will need to be some way to express those sorts of rules
We can use the example of this issue of parentage to try and implement a working example where the strict OST that we've now introduced has a role about a solution only having a opportunity as a parent
If we can express that as a rule in the schema and then have it apply in the validate step, then I think we'd be in a good place.
@claude prototype this in a new branch. Be sure to look at other open issues (especially #5) for context of where schemas, entities, comoosability and rules may evolve to. It's fine to make some assumptions while prototyping this, but please document them in a new section in docs/schemas.md and/or a new docs/rules.md and any other open questions that you think would be useful to consider to thoughtfully design this.
Activity
mindsocket commentedon Feb 28, 2026
I have some opinions about the approach to this which has fairly wide-reaching implications. We already have the idea of rules that can be descriptive or executable and it probably makes sense that a validation rule like what parents are allowed is simply just another one of those kinds of rules rather than extending the hierarchy metadata
I think in practise this means embracing the rules construct that we have started to introduce to consider how we will express different types of rules. Some might be validation. Others may be quality related rules may need to be conditional, so you may require that a child entity exists when a node has a certain status, for example, and so there will need to be some way to express those sorts of rules
We can use the example of this issue of parentage to try and implement a working example where the strict OST that we've now introduced has a role about a solution only having a opportunity as a parent
If we can express that as a rule in the schema and then have it apply in the validate step, then I think we'd be in a good place.
@claude prototype this in a new branch. Be sure to look at other open issues (especially #5) for context of where schemas, entities, comoosability and rules may evolve to. It's fine to make some assumptions while prototyping this, but please document them in a new section in docs/schemas.md and/or a new docs/rules.md and any other open questions that you think would be useful to consider to thoughtfully design this.