addon-range-rules-validation
SKILL.md
Add-on: Range Rules Validation (Policy Engine)
Use this skill to implement the validation stage:
- consumes
extracted_clauses - compares against known rules/policies (“Range”)
- emits structured validation results with explanations, severity, confidence, and review flags
This stage should not depend on top-k retrieval over the document as the main method.
Inputs
Collect:
RANGE_RULE_SOURCE:db(recommended) orrepo-file(YAML/JSON checked into repo).VALIDATION_RESULT_SET:compliant|non_compliant|uncertain.SEVERITY_LEVELS: defaultinfo|low|medium|high|critical.UNCERTAINTY_REVIEW_THRESHOLD: default0.6.
Data Contracts
Rules
Model rules as versioned objects with:
rule_id(stable)namedescriptionapplies_to_clause_typeslogic(deterministic checks) and/orguidance(LLM-assisted rubric)version,effective_at
Validations (validations table)
Each validation record must include:
clause_idrule_id/rule_nameresult(fromVALIDATION_RESULT_SET)explanation(human-readable)severityconfidence(0..1)review_needed(true when uncertain or confidence low)- citations: reuse clause citation linkage; do not lose source anchoring
Validation Workflow
- Load active ruleset (latest version or effective-at timestamp).
- For each
extracted_clause:- select applicable rules by
clause_type - evaluate deterministically when possible
- if LLM-assisted evaluation is used, enforce strict schema output and store model+prompt provenance
- select applicable rules by
- Persist one validation row per (clause, rule) evaluation.
- Mark
review_neededwhen:- result is
uncertain, or - confidence < threshold, or
- clause is missing a required field for the rule
- result is
Guardrails
- Do not fetch extra context via semantic retrieval unless explicitly requested; validate on clause + rule.
- If a rule cannot be applied due to missing evidence, output
uncertainand setreview_needed=true. - Store rule versions used in every validation for reproducibility.
Decision Justification Rule
- Every non-trivial decision must include a concrete justification.
- Capture the alternatives considered and why they were rejected.
- State tradeoffs and residual risks for the chosen option.
- If justification is missing, treat the task as incomplete and surface it as a blocker.
Weekly Installs
1
Repository
ajrlewis/ai-skillsFirst Seen
6 days ago
Security Audits
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1