rule-validator

Diagnose failing Konveyor rule tests and repair associated test data.

1|2|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/konveyor/ai-rule-gen --skill rule-validator-konveyor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rule-validator
Source: https://github.com/konveyor/ai-rule-gen/tree/main/agents/rule-validator
Command: npx skills add https://github.com/konveyor/ai-rule-gen --skill rule-validator-konveyor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill repairs failing Konveyor rule test data so rules can pass kantra validation without changing the authoritative rule definition.

Core Features & Use Cases

  • Lookup-Based Diagnosis: Reads the failing rule, identifies the condition type, and applies the prescribed fix strategy for that language.
  • Test Data Repair: Updates source files, build files, or XML test artifacts to restore expected incidents and compilation readiness.
  • Verification Loop: Re-runs targeted kantra tests and classifies outcomes as fixed, still failing, or engine-limited.
  • Use Case: A migration rule fails because the sample project uses the wrong import, missing usage, or malformed dependency metadata; this Skill corrects the test fixture and validates the result.

Quick Start

Use the rule-validator skill to inspect the failing rules, repair the test data in the output directory, and verify the fixes against kantra.

Frequently Asked Questions about rule-validator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix failing kantra rule tests for Java or Python migration rules?

Fix failing kantra rule tests by diagnosing the specific condition type, updating the test data in source files or dependency manifests, and re-running targeted validation to verify the repair.

What causes Konveyor rule validation failures in test data?

Konveyor rule validation failures happen when test fixtures contain incorrect imports, missing usage patterns, or malformed dependency metadata that prevents the rule from triggering expected incidents.

Does the rule-validator support Go, Node.js, and C# test data repair?

Yes, rule validation and test data repair support Go, Node.js, C#, Java, and Python across source files, build files, XML artifacts, and dependency manifests for builtin matching rules.

How do I repair malformed dependency metadata causing kantra test failures?

Repair malformed dependency metadata by applying a lookup-based fix strategy that corrects the test fixture output directory and verifies the result against kantra without altering the original rule definition.

Why does my kantra test still fail after updating the test data?

Kantra tests may still fail after updates due to engine limitations or incomplete test data repairs, so the verification loop classifies outcomes as fixed, still failing, or engine-limited to indicate the cause.

Can I use rule-validator without changing my existing migration rule definitions?

Yes, rule validation enforces rule integrity by applying verification-only edits to output test data, ensuring the authoritative rule definition remains unchanged while restoring expected incidents.