docs(详细设计): 新增Word回填导出设计
This commit is contained in:
70
docs/详细设计/skill/回填拦截检查Skill.md
Normal file
70
docs/详细设计/skill/回填拦截检查Skill.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# 回填拦截检查Skill 设计
|
||||
|
||||
## 1. Skill 定位
|
||||
|
||||
`回填拦截检查Skill` 负责根据字段冲突、风险报告和必填字段缺失情况判断是否允许正式回填导出。
|
||||
|
||||
英文实现标识建议使用 `FillBlockerCheckSkill`。
|
||||
|
||||
## 2. 输入
|
||||
|
||||
```python
|
||||
@dataclass
|
||||
class FillBlockerCheckInput:
|
||||
fill_dataset: dict
|
||||
risk_report: dict
|
||||
consistency_report: dict
|
||||
missing_required_fields: list[dict]
|
||||
allow_draft_when_blocked: bool
|
||||
```
|
||||
|
||||
## 3. 输出
|
||||
|
||||
```python
|
||||
@dataclass
|
||||
class FillBlockerCheckOutput:
|
||||
export_mode: str
|
||||
blocked_fields: list[dict]
|
||||
blockers: list[dict]
|
||||
```
|
||||
|
||||
## 4. 拦截规则
|
||||
|
||||
1. 高风险未处理:拦截正式版。
|
||||
2. 字段冲突:拦截正式版。
|
||||
3. 必填字段缺失:拦截正式版。
|
||||
4. 待人工复核:允许草稿,不允许正式版。
|
||||
|
||||
## 5. 核心方法
|
||||
|
||||
### 5.1 `run(input) -> FillBlockerCheckOutput`
|
||||
|
||||
主入口方法。
|
||||
|
||||
### 5.2 `detect_high_risk_blocker(risk_report) -> list[dict]`
|
||||
|
||||
检测高风险。
|
||||
|
||||
### 5.3 `detect_conflict_blocker(consistency_report) -> list[dict]`
|
||||
|
||||
检测冲突字段。
|
||||
|
||||
### 5.4 `resolve_export_mode(blockers, allow_draft) -> str`
|
||||
|
||||
确定导出模式。
|
||||
|
||||
## 6. 技术实现
|
||||
|
||||
使用技术:
|
||||
|
||||
1. 风险报告
|
||||
2. 一致性报告
|
||||
3. 本地规则
|
||||
|
||||
## 7. 测试要点
|
||||
|
||||
1. 高风险拦截正式导出。
|
||||
2. 冲突字段拦截正式导出。
|
||||
3. 草稿模式可用。
|
||||
4. 无拦截时正式导出。
|
||||
|
||||
Reference in New Issue
Block a user