Files
Agent-System/internal/intent/testdata/intent-golden-v1.json
T
WeiCHENandCursor 868238137c fix(intent): Phase 0+1 P0 safety gates for recognition and coordination
Add golden-v1 hard-negative suite, shadow observability fields, query/command
negation gates for high-risk writes, AllowAffirmative enforcement, candidate
conflict clarification, and coordinator clarify-before-ambiguous ordering.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:21 +00:00

150 lines
4.1 KiB
JSON

{
"version": "intent-golden-v1",
"description": "P0 hard-negative / collision golden set for intent recognition Phase 0 baseline and Phase 1 safety gates.",
"cases": [
{
"id": "hn-claim-query",
"input": "这份报告谁认领了?",
"snapshot": {
"user_doc_role": "viewer",
"doc_lifecycle_state": "draft"
},
"expect_phase0": {
"legacy_intent": "DOCGOV_CLAIM",
"branch": "NEW_INTENT_PREEMPT",
"requires_clarifying": false
},
"expect_phase1": {
"must_not_write": true,
"dialogue_act": "ask",
"forbidden_intents": ["DOCGOV_CLAIM"]
}
},
{
"id": "hn-submit-query",
"input": "送审通过了吗?",
"snapshot": {
"user_doc_role": "author",
"doc_lifecycle_state": "draft"
},
"expect_phase0": {
"legacy_intent": "DOCGOV_SUBMIT_REVIEW",
"branch": "NEW_INTENT_PREEMPT",
"requires_clarifying": false
},
"expect_phase1": {
"must_not_write": true,
"dialogue_act": "ask",
"forbidden_intents": ["DOCGOV_SUBMIT_REVIEW", "DOCGOV_REVIEW_APPROVE"]
}
},
{
"id": "hn-negation-query-config",
"input": "不要修改配置,只查询当前配置",
"snapshot": null,
"expect_phase0": {
"legacy_intent": "SECURITY_FORBIDDEN",
"branch": "NEW_INTENT_PREEMPT"
},
"expect_phase1": {
"must_not_intent": "SECURITY_FORBIDDEN",
"dialogue_act": "ask"
}
},
{
"id": "hn-affirm-plus-reg",
"input": "好,请先查法规",
"pending": {
"expected_intent": "ADVANCE_STAGE",
"allow_affirmative": true,
"default_option": {
"option_id": "1",
"title": "推进到 V0.5",
"intent": "ADVANCE_STAGE",
"slots": {
"target_stage": "V0.5_feasibility"
}
}
},
"snapshot": {
"current_stage": "V0.1_triage"
},
"expect_phase0": {
"legacy_intent": "ADVANCE_STAGE",
"branch": "EXPECTATION_HIT"
},
"expect_phase1": {
"must_not_branch": "EXPECTATION_HIT",
"must_not_intent": "ADVANCE_STAGE",
"preferred_intent": "QUERY_REGULATIONS"
}
},
{
"id": "hn-reject-missing-reason",
"input": "把报告审核驳回",
"snapshot": {
"user_doc_role": "reviewer",
"doc_lifecycle_state": "reviewing",
"active_doc_id": "doc-1"
},
"expect_phase0": {
"legacy_intent": "DOCGOV_REVIEW_REJECT",
"branch": "AMBIGUOUS_FALLBACK",
"requires_clarifying": true
},
"expect_phase1": {
"legacy_intent": "DOCGOV_REVIEW_REJECT",
"branch": "NEW_INTENT_PREEMPT",
"requires_clarifying": true,
"clarification_contains": "驳回理由"
}
},
{
"id": "hn-permission-mismatch",
"input": "终审批准这份文档",
"snapshot": {
"user_doc_role": "author",
"doc_lifecycle_state": "final_review",
"active_doc_id": "doc-1"
},
"expect_phase0": {
"legacy_intent": "DOCGOV_FINAL_APPROVE",
"branch": "AMBIGUOUS_FALLBACK",
"requires_clarifying": true
},
"expect_phase1": {
"legacy_intent": "DOCGOV_FINAL_APPROVE",
"branch": "NEW_INTENT_PREEMPT",
"must_not_branch": "AMBIGUOUS_FALLBACK",
"reasoning_contains": "权限不符"
}
},
{
"id": "hn-allow-affirmative-false",
"input": "好",
"pending": {
"expected_intent": "ADVANCE_STAGE",
"allow_affirmative": false,
"default_option": {
"option_id": "1",
"title": "推进到 V0.5",
"intent": "ADVANCE_STAGE",
"slots": {
"target_stage": "V0.5_feasibility"
}
}
},
"snapshot": {
"current_stage": "V0.1_triage"
},
"expect_phase0": {
"legacy_intent": "ADVANCE_STAGE",
"branch": "EXPECTATION_HIT"
},
"expect_phase1": {
"must_not_branch": "EXPECTATION_HIT"
}
}
]
}