Draft rules from a policy
import_policy_rulesConvert a written policy document into DRAFT decision rules (LLM-assisted).
Instructions
Convert a written policy document into DRAFT decision rules (LLM-assisted).
Returns validated draft rules (when/action, including chained asserts where
the policy stages its determinations), derived rule→rule edges, and overlap
warnings. Each returned rule carries a citation field holding the policy
sentence it encodes (also summarized in the top-level citations map).
Coverage runs the other way too: uncovered_sentences lists policy
sentences no rule's citation points back to (out of
policy_sentence_count), and unverified_citations names rules whose
quote is missing or not found verbatim in the policy. Show both to the
user: an uncovered sentence may need a rule; an unverified one may be a
paraphrase that misstates the policy. background_sentences is the subset
of uncovered sentences with no obligation language (definitions,
preamble); lead with the others, but mention these too, since the split
is a keyword heuristic.
NOTHING IS SAVED: review the drafts (and show them to the user), then
persist explicitly with put_rules — validate first with dry_run=true,
and keep each rule's citation in the YAML you save so the audit trail
back to the policy survives.
Args: domain: Domain the rules are drafted for (an owned domain or a new name). policy_text: The policy document text (max ~50k characters).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | ||
| policy_text | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |