RuleCraft prevents a better-looking AI experiment from silently promoting a worse production model. It reads DataHub lineage, simulates the downstream blast radius of measured regressions, applies a deterministic safety gate, verifies the decision, and writes durable decision memory back to DataHub.
Built for Build with DataHub: The Agent Hackathon. Primary category: Production ML Agents.
An experiment's aggregate score can improve while a critical task regresses. The run log alone cannot tell whether that regression reaches a benchmark, model release, dashboard, or another team's decision. That dependency and ownership context lives in DataHub.
Existing catalogs explain what data exists; RuleCraft uses the context graph to decide whether an AI experiment is safe to promote—and leaves the reason behind for the next human or agent.
RuleCraft executes one auditable workflow:
- Context — read candidate experiment metadata and transitive downstream lineage from DataHub.
- Reason — detect per-task improvements and regressions, not just aggregate score.
- Simulate — score every affected asset using measured regression severity, graph depth, and criticality.
- Act — approve, request human approval, or block promotion; produce owner-specific remediation.
- Verify — deterministically check that the gate outcome agrees with the observed regression.
- Remember — write findings, gate status, max risk, impacted count, verification result, tags, and remediation back to DataHub.
This is not an LLM claim or a fabricated benchmark: the gate is deterministic and the included report is generated by the executable demo.
Final Live DataHub demo (2:55): https://youtu.be/05c3MZno0l0
Python 3.11+:
python -m pip install -e .
rulecraft --input examples/arc_experiment_runs.json \
--output examples/blast_radius_report.jsonInfrastructure-free output:
RuleCraft
- [regression] arc-001 regressed by 0.50 between solver-v1 and solver-v2.
- [improvement] arc-002 improved by 0.50 between solver-v1 and solver-v2.
Written tags: ['arc-improvement', 'arc-regression', 'needs-review', 'rulecraft-blocked']
Release gate: blocked (risk 95/100)
Impacted assets: 3; verification: PASS
The in-memory demo mirrors the same graph contract for reproducibility. It is not presented as a live DataHub run.
Without DataHub, RuleCraft can compare two JSON files but cannot know the organizational blast radius. The production adapter uses DataHub for both sides of the loop:
- Read:
scroll_lineage(..., direction=DOWNSTREAM)traverses actual DataHub lineage up to a configured depth. Dataset properties and governance tags enrich asset criticality where available. - Write: Metadata Change Proposals persist experiment datasets, lineage, findings, decision tags, risk, impacted-asset count, verification state, and remediation notes.
The live example deliberately writes a small reproducible graph, then reads it back through DataHub before making the gate decision:
datahub docker quickstart
python examples/datahub_writeback.pySet DATAHUB_GMS_URL and optionally DATAHUB_TOKEN for a remote instance.
flowchart LR
E["ARC experiment runs"] --> C["Context: DataHub metadata + lineage"]
C --> R["Reason: task-level regression analysis"]
R --> S["Simulate: transitive blast radius + risk score"]
S --> G{"Safety gate"}
G -->|low risk| A["Approve"]
G -->|medium risk| H["Human approval"]
G -->|high risk| B["Block promotion"]
A --> V["Verify"]
H --> V
B --> V
V --> W["Remember: DataHub write-back"]
W --> C
ResearchLineageAgent depends on a small ContextGraph protocol. The in-memory adapter makes every branch testable; DataHubContextGraph implements the production read/write boundary.
Generated from examples/arc_experiment_runs.json by the current code:
| Metric | Result |
|---|---|
| Entities inspected | 5 |
| Lineage edges traversed | 3 |
| Impacted assets detected | 3 |
| Risks detected | 3 |
| Actions proposed | 3 |
| Decision | blocked |
| Max risk | 95/100 |
| Verification | PASS |
| DataHub write-back | PASS |
Machine-readable fixture evidence: examples/blast_radius_report.json. Live DataHub evidence is preserved separately in examples/reports/rulecraft_live_datahub_2026-08-08.json.
Latency is recorded in each report but intentionally not advertised as a stable benchmark because it varies by machine and excludes network latency in the infrastructure-free demo.
- Risk
>= 80with a measured regression blocks promotion. - Lower-risk regressions require human approval.
- No material regression permits staged promotion.
- Traversal is depth-bounded and cycle-safe.
- Verification never reports success when an approval decision contradicts observed regression state.
- DataHub enrichment failures degrade to conservative defaults; DataHub lineage read failures propagate instead of producing a false success.
examples/
arc_experiment_runs.json reproducible input
blast_radius_report.json generated quantitative evidence
datahub_writeback.py live DataHub read/write scenario
src/arc_lineage_agent/
agent.py workflow, risk, gate, verification
datahub_adapter.py DataHub lineage read + MCP write-back
graph.py graph contract + in-memory adapter
models.py structured workflow records
tests/ deterministic unit/contract tests
SUBMISSION.md Devpost-ready copy and demo script
python -m unittest discover -s tests -vCurrent suite: 10 passing tests, covering legacy findings, thresholds, duplicate protection, approval/block branches, transitive traversal, DataHub context enrichment, decision memory, and SDK contracts.
- The deterministic workflow and DataHub SDK/OpenAPI contracts are covered by 10 passing tests.
- The signature workflow was rerun end-to-end against a healthy local DataHub Quickstart on 2026-08-08 at 16:02 KST.
- The successful live run inspected 5 entities, traversed 3 lineage edges, found 3 impacted assets and 3 risks, proposed 3 owner-specific remediations, blocked release at 95/100, passed deterministic verification, and successfully wrote the decision back to DataHub.
- Write-back was independently queried again through the DataHub API and confirmed in the DataHub UI as
blocked / 95 / 3 / pass, including therulecraft-blockedtag. - The first run encountered normal lineage-index propagation delay and is explicitly excluded from the successful demo metrics. Fixture and in-memory results are never labeled as live evidence.
- Final video: https://youtu.be/05c3MZno0l0
Apache-2.0. See LICENSE.