Context
PR #371 (cluster-21) parsed the --rules <path> flag but the configurable rule evaluation was never implemented.
ADR-034 §10 specifies:
rules.yaml validated against a JSON Schema before evaluation
- Malformed yaml → exit code 2 with structured error naming the offending field
- 6 built-in configurable rules:
orphan-entities, self-loops, min-edge-density, required-properties, naming-convention, max-count
- Pack-provided rule loader (§9)
Current state
kkernel kg validate --rules path/to/rules.yaml returns:
Error: configurable rule loading (--rules) is not yet implemented (ADR-034 §10 deferred to follow-up)...
--no-rules suppresses this error and runs only structural checks.
Required work
- Implement
rules.yaml JSON Schema validation with exit code 2 on malformed files
- Implement the 6 built-in configurable rules
- Implement pack-provided rule loader (ADR-034 §9)
- Tests: verify exit code 2 on malformed yaml, verify each built-in rule fires on fixture data
Labels
adr-alignment, follow-up, adr-034
Context
PR #371 (cluster-21) parsed the
--rules <path>flag but the configurable rule evaluation was never implemented.ADR-034 §10 specifies:
rules.yamlvalidated against a JSON Schema before evaluationorphan-entities,self-loops,min-edge-density,required-properties,naming-convention,max-countCurrent state
kkernel kg validate --rules path/to/rules.yamlreturns:--no-rulessuppresses this error and runs only structural checks.Required work
rules.yamlJSON Schema validation with exit code 2 on malformed filesLabels
adr-alignment, follow-up, adr-034