feat(dc_rulekit): v0.2 industry-standard rule documents - #2
Merged
Merged
Conversation
Align rule JSON with json-rules-engine conventions: nested conditions (all/any/not), events with type+params, schema_version 2. Add v0.1 ingest compat, optional plugin params JSON Schema at propose time, ADR 0002, schema/fixtures, and mirrored Rust/Dart updates. Co-authored-by: Uday Chauhan <chauhan.s.uday26@gmail.com>
ucguy4u
marked this pull request as ready for review
October 3, 2026 03:22
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
Ships dc_rulekit 0.2.0 with rule JSON aligned to json-rules-engine-style trees and event objects so LLMs can author rules without project-specific docs. Proposal → approve → active, dry-run, fail-closed plugins, and audit receipts are unchanged.
Rule document v2 (
schema_version: 2)conditions: nestedall/any/not(plugin leaves:{ id, plugin, params };factalias on ingest)events:{ id, type, params }(replaces flatwhen/then+plugin)when/thenstill parse and normalize to v2 in memory — crates.io/pub.dev 0.1.x unchanged for Cruftkit^0.1.0Other
params_schema()(Rust) /ParamsSchemaProvider(Dart); fail-closed validation atpropose(rule, registry)schema/rule.schema.json+ golden fixtures;schema_golden+ Dart fixture tests in CIMigration (hosts upgrading to 0.2)
when[]conditions: { "all": [...] }then[]+pluginevents[]+typepropose(rule)propose(rule, registry)Not publishing — per owner, Pub.dev/crates.io release after merge.
Test plan
cargo test --all(incl.schema_golden, v1 compat, nestedany, params schema at propose)dart analyze+dart testinpackages/dc_rulekit