Goal
Design a community rule-pack architecture.
Diskern should eventually make it easy for contributors to add rules for tools they know, without every rule needing to ship directly in the core database.
Why this is super advanced
Rules affect user trust and safety. Community rules need validation, provenance, protected-rule precedence, versioning, and a clear review path.
Existing safety invariant
External rules already cannot shadow embedded protected rules:
pub fn with_embedded_protected_rules(self) -> Self {
let mut rules = RulesDb::embedded()
.rules
.into_iter()
.filter(|rule| rule.verdict == Verdict::Protected)
.collect::<Vec<_>>();
rules.extend(self.rules);
Self::new(self.version, rules)
}
That invariant must stay true.
Suggested deliverable
Start with a design document before code:
- rule pack format
- pack metadata and versioning
- how packs are enabled/disabled
- how protected rules always win
- how CI validates packs
Acceptance criteria
- No code is required for the first PR if the design is strong.
- The design keeps protected rules authoritative.
- The design explains review and trust boundaries in simple language.
Goal
Design a community rule-pack architecture.
Diskern should eventually make it easy for contributors to add rules for tools they know, without every rule needing to ship directly in the core database.
Why this is super advanced
Rules affect user trust and safety. Community rules need validation, provenance, protected-rule precedence, versioning, and a clear review path.
Existing safety invariant
External rules already cannot shadow embedded protected rules:
That invariant must stay true.
Suggested deliverable
Start with a design document before code:
Acceptance criteria