# Platform example: prepares text; never sends a message (ADRs 0001 and 0040). # Prose gates are model judgements, not guarantees of factual correctness. # The mkp: hooks below are supplied by mklang platform, not standalone mklang. mklang: "0.4" machine: support_reply entry: draft budget: 6 default_tier: balanced result: reply context: request: "" facts: "" hooks: - name: "mkp:eq:output:" description: True when the generated text is the empty string. - name: mkp:has:output description: Checks presence only, not correctness or quality. states: draft: structure: A short support reply, using only the supplied facts. execution: Do not invent facts or claim to have performed any external action. prompt: | Request: {{request}} Available facts: {{facts}} Draft a reply. If facts are missing, say what needs clarification. output: reply gates: - when: the draft is empty hook: "mkp:eq:output:" fail: true - when: the reply answers the request and is supported by the supplied facts then: ok to: END - when: the draft can be corrected using only the supplied facts repair: 2 to: draft - when: otherwise escalate: true ask: "What should the reply say? Supply the missing facts or an instruction." to: apply_human_decision apply_human_decision: structure: A support reply following the human instruction. execution: Do not claim to have sent a message or performed any external action. prompt: | Request: {{request}} Available facts: {{facts}} Previous draft: {{reply}} Human instruction: {{human.reply}} Prepare the reply using these instructions. output: reply gates: - when: a reply was produced hook: mkp:has:output then: ok to: END - when: otherwise fail: true