Schema · Rules
Rules & heuristics
Five sections capture how the source tells an agent to act: stable principles, fast heuristics, formal decision rules, atomic if-then rules and exceptions to them.
principles
ts
interface Principle {
id: string; // pri_*
statement: string;
applies_when: string;
does_not_apply_when: string;
rationale: string;
operational_use: string;
confidence: number;
}heuristics
ts
interface Heuristic {
id: string; // heu_*
trigger: string; // observable cue
interpretation: string;
recommended_action: string;
avoid: string;
confidence: number;
}decision_rules
ts
interface DecisionRule {
id: string; // dec_*
condition: string;
decision: string;
reasoning: string;
required_context: string;
output_action: string;
failure_mode: string;
confidence: number;
}if_then_rules
ts
interface IfThenRule {
id: string; // ift_*
if: string;
then: string;
because: string;
confidence: number;
}exceptions
ts
interface Exception {
id: string; // exc_*
general_rule: string;
exception_case: string;
modified_action: string;
explanation: string;
}Combined example
yaml
principles:
- id: pri_unit_economics_first
statement: "Validate unit economics before scaling marketing spend."
applies_when: "Company is preparing to increase paid acquisition."
does_not_apply_when: "Pure brand campaigns with no direct-response goal."
rationale: "Growth without margin amplifies losses."
operational_use: "Compute LTV/CAC; require ratio >= 3 before scaling."
confidence: 0.9
heuristics:
- id: heu_rising_churn_onboarding
trigger: "Churn increased two months in a row."
interpretation: "Onboarding is failing to deliver early value."
recommended_action: "Audit first-week activation events before raising acquisition spend."
avoid: "Defaulting to discount-driven win-back campaigns."
confidence: 0.78
if_then_rules:
- id: ift_cac_exceeds_ltv
if: "CAC exceeds LTV for the cohort"
then: "Pause paid expansion and rework pricing or retention"
because: "Each new customer destroys value at the current ratio"
confidence: 0.95