---
name: knowledge-injection-boundary
scope:
  - '*'
products:
  - '*'
id: ka-hard-rule-知识注入边界规则
asset_kind: governance_rule
lifecycle_status: active
authority: canonical
owner_mechanism_id: mc-knowledge-injection-boundary
routes: ['*']
primary_triggers:
  - 知识注入边界规则
secondary_triggers: []
negative_triggers: []
priority: P0
specificity: 5
consumes:
  - mc-knowledge-injection-boundary
hard_blocks:
  - 注入越权
  - deprecated被注入
fallback: manual_required
required_evidence:
  - injection_report
  - consumption_snapshot
version: 1.1.0
last_reviewed: '2026-06-01'
type: governance_rule
when: 知识注入边界规则
stages: ["*"]
---

# 知识注入边界规则

## 核心原则

知识注入必须经过三道门过滤: 状态门、路由门、预算门。未经审核的知识不可进入 prompt。

## 三道门

1. **状态门**: draft/quarantine/deprecated 知识被过滤，不进入 prompt
2. **路由门**: 知识类型必须匹配当前路由，防止错误注入
3. **预算门**: budget 不足时优先保留 required，supporting 可被裁剪

## 规则

1. consumption_mode=required 资产缺失时必须报错，不可静默降级
2. pending_review 知识只能进入 advisory_only，不可进入 injected
3. 所有注入结果必须生成 KnowledgeInjectionReport
4. route 不匹配时跳过模版注入，不可强行注入

## 验收标准

- [ ] draft/quarantine 知识不出现在 injected 列表中
- [ ] required 资产缺失时产生 missing_required_knowledge finding
- [ ] KnowledgeInjectionReport 包含完整字段
- [ ] budget 不足时 required 优先于 supporting
