From 26a5d914154b92b6a5d60eff287217be37bc0b7c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 00:26:28 +0000 Subject: [PATCH 1/6] Add write commands to generated CLI and help overrides Co-Authored-By: Aaryan Divate --- scripts/help_overrides.py | 251 +++++++++++++++++++++ src/judgment_cli/generated_commands.py | 301 +++++++++++++++++++++++++ 2 files changed, 552 insertions(+) diff --git a/scripts/help_overrides.py b/scripts/help_overrides.py index 905f52e..8b4b0fc 100644 --- a/scripts/help_overrides.py +++ b/scripts/help_overrides.py @@ -80,6 +80,93 @@ """ +_AUTOMATION_CONDITIONS_HELP = """\ +JSON array of rule conditions. Each condition compares a behavior score or metric to a threshold. Items are ANDed or ORed together based on --combine-type ("all" vs "any"). + +\b +Condition shape: + {"metric": {"type":, ...}, "operator": ">=|<=|>|<|==|!=", "threshold": } + +\b +Supported metric types: + behavior {"type":"behavior","behavior_id":""} + latency {"type":"latency"} (milliseconds) + cost {"type":"cost"} (USD) + token_count {"type":"token_count"} + +Example: --conditions '[{"metric":{"type":"behavior","behavior_id":""},"operator":">=","threshold":0.8}]'\ +""" + +_AUTOMATION_ACTIONS_HELP = """\ +JSON object describing notification actions to fire when the automation triggers. Omit to store the automation with no actions. + +\b +Shape: {"slack":[{"channel":"","webhook_url":""}], "pagerduty":[{"integration_key":""}], "email":[{"to":""}]} + +Example: --actions '{"slack":[{"channel":"#alerts","webhook_url":"https://hooks.slack.com/..."}]}'\ +""" + +_AUTOMATION_TRIGGER_FREQUENCY_HELP = """\ +JSON 3-tuple [count, period, unit] describing the rate-limit window. Omit to disable frequency limiting. + +\b +Shape: [, , ] + +Example: --trigger-frequency '[5, 1, "hours"]' (max 5 triggers per 1 hour)\ +""" + +_AUTOMATION_COOLDOWN_HELP = """\ +JSON 2-tuple [period, unit] describing the minimum wait between triggers. + +\b +Shape: [, ] + +Example: --cooldown-period '[15, "minutes"]' (at least 15 min between triggers)\ +""" + +_BEHAVIOR_ADVANCED_SETTINGS_HELP = """\ +JSON object overriding the judge's online evaluation configuration. If omitted, defaults are applied. + +\b +Shape: + { + "online_evaluation_mode": "always" | "sampled" | "off", + "online_sampling_rate": , + "online_span_triggers": [{"span_name":"","attribute_filters":[...]}]?, + "online_session_scoring": ? + } + +Example: --advanced-settings '{"online_evaluation_mode":"sampled","online_sampling_rate":0.1}'\ +""" + +_BEHAVIOR_CATEGORY_IDS_HELP = ( + "UUID of a category to attach the behavior to. Repeat the flag to attach " + "multiple categories: --category-ids --category-ids ." +) + +_CLASSIFIER_OPTIONS_HELP = """\ +JSON array of the allowed output categories the classifier judge can return. Must contain at least one option. + +\b +Shape: + [ + {"name":"