Generate Rego test skeleton
rego_generate_test_skeletonGenerate *_test.rego skeleton stubs for each rule from a Rego policy, optionally using table-driven every tc in cases { ... } loops for multiple inputs.
Instructions
Generate a *_test.rego skeleton from a policy. Parses the AST, finds each rule, and emits one stub test per rule. The agent fills in realistic inputs and assertions. With tableStyle: true, each stub uses an every tc in cases { ... } loop so you can add multiple input/expected pairs without duplicating assertion code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Rego source to generate tests for. | |
| tableStyle | No | Generate table-driven test stubs instead of single-case stubs. Each rule gets a `cases` array and an `every tc in cases { ... }` assertion loop. Pair with `rego_test varValues: true` to see which case failed. |