Governed Rules
A governed rule connects the readable source to a specific compiled artifact, test report, release decision, and execution record.
Declare rule identity
Section titled “Declare rule identity”Add a Rule: section at the top of the source:
Rule: id: lending.dti_check version: 1.2.0 author: Risk Operations effective from 2026-01-01 effective until 2026-12-31
debt_ratio equals monthly_debt divided by monthly_income
If debt_ratio is greater than 0.43: Respond with "declined"
Respond with "approved"id and version are required. The compiler includes the rule metadata in
the manifest and bytecode, so the identity travels with the executable
artifact instead of living only in surrounding documentation.
Choose the version in force
Section titled “Choose the version in force”Pass candidate versions with an as-of date:
devlish run lending-v1.dvl lending-v2.dvl --as-of 2026-07-01Devlish selects the version whose effective window contains the date and rejects gaps, overlaps, or mismatched rule identifiers.
Inspect identity in JavaScript
Section titled “Inspect identity in JavaScript”The JavaScript runtime exposes the selected identity without running the rule:
const tool = await loadTool({ bytecode });
console.log(tool.info.rule);// {// id: "lending.dti_check",// version: "1.2.0",// author: "Risk Operations",// effectiveFrom: "2026-01-01",// effectiveUntil: "2026-12-31"// }tool.info.rule is null for an ungoverned artifact.
The governance chain
Section titled “The governance chain”Rule identity is the starting point:
- Evidence bundles bind golden-case results to the compiled artifact hash.
- Controlled releases allow only an approved,
published artifact to run under
--governed. - Audit and replay record which artifact ran and reproduce it against the captured effects.