% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scan_prompt.R
\name{.run_rules}
\alias{.run_rules}
\title{Run policy rules on text}
\usage{
.run_rules(text, policy)
}
\arguments{
\item{text}{Normalised text.}

\item{policy}{A \code{shieldr_policy} or built-in policy name such as \code{"comprehensive"}.}
}
\value{
A list of finding lists.
}
\description{
Applies every rule in a policy and returns raw finding lists.
}
\details{
Regex rules are matched with \code{gregexpr(..., perl = TRUE)}. Function rules
receive the full text and are coerced into finding objects. The helper
attaches a \code{risk_score} attribute to the finding list, but callers typically
recompute the score after adding semantic or synthetic findings.
}
\keyword{internal}
