auto-sync: 2026-05-15 21:26:27

This commit is contained in:
cfdaily
2026-05-15 21:26:27 +08:00
parent f45b19d511
commit 510276c6f3
+13 -8
View File
@@ -1489,23 +1489,28 @@ research 任务:working → [庞统确认] → review → done
```yaml
# guardrails.yaml
#
# L1 check 用 assert 字段(Python 表达式,Daemon eval 执行)
# L2 check 用 prompt 字段(传给 subagent 的检查指令)
# 两者本质不同,不用同一个字段
task_types:
coding:
output_guardrails:
- name: file_exists
check: "output.files | length > 0"
assert: "len(output.get('files', [])) > 0"
severity: blocking
layer: L1
- name: json_valid
check: "output.json_schema_valid"
assert: "output.get('json_schema_valid', False) == True"
severity: blocking
layer: L1
- name: artifacts_exist
check: "output.artifacts_paths all exist"
assert: "all(os.path.exists(p) for p in output.get('artifacts_paths', []))"
severity: blocking
layer: L1
- name: code_quality
check: "scope_declaration vs task.truths"
- name: scope_alignment
prompt: "Compare the agent's scope_declaration against task truths. Check: is every truth covered? Are there deviations not declared?"
severity: warning
layer: L2
output_review:
@@ -1520,11 +1525,11 @@ task_types:
max_rounds: 5
output_guardrails:
- name: no_direct_production
check: "output.target_env != 'production'"
assert: "output.get('target_env') != 'production'"
severity: tripwire
layer: L1
- name: rollback_plan_exists
check: "output.rollback_plan != null"
assert: "output.get('rollback_plan') is not None"
severity: blocking
layer: L1
output_review:
@@ -1535,7 +1540,7 @@ task_types:
data:
output_guardrails:
- name: format_check
check: "output.format in ['csv', 'parquet', 'json']"
assert: "output.get('format') in ['csv', 'parquet', 'json']"
severity: blocking
layer: L1
output_review: