Skip to content

feat(dc_rulekit): v0.2 industry-standard rule documents - #2

Merged
ucguy4u merged 1 commit into
mainfrom
cursor/industry-standard-rules-1f87
Oct 3, 2026
Merged

ucguy4u merged 1 commit into
mainfrom
cursor/industry-standard-rules-1f87

Conversation

@ucguy4u

@ucguy4u ucguy4u commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

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: nested all / any / not (plugin leaves: { id, plugin, params }; fact alias on ingest)
  • events: { id, type, params } (replaces flat when / then + plugin)
  • v0.1 compat: when / then still parse and normalize to v2 in memory — crates.io/pub.dev 0.1.x unchanged for Cruftkit ^0.1.0

Other

  • Optional plugin params_schema() (Rust) / ParamsSchemaProvider (Dart); fail-closed validation at propose(rule, registry)
  • schema/rule.schema.json + golden fixtures; schema_golden + Dart fixture tests in CI
  • ADR 0002; README examples updated

Migration (hosts upgrading to 0.2)

v0.1 v0.2
when[] conditions: { "all": [...] }
then[] + plugin events[] + type
propose(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, nested any, params schema at propose)
  • dart analyze + dart test in packages/dc_rulekit
Open in Web Open in Cursor 

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
ucguy4u marked this pull request as ready for review October 3, 2026 03:22
@ucguy4u
ucguy4u merged commit 9b8989e into main Oct 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants