114 lines
3.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Data Model: SYS-009设计整合与实现对齐
## 1. Source Capability
### Purpose
表示外部 `water-bank-api-doc` 中一个可被正式文档吸收的银行协同能力簇。
### Fields
| Field | Description | Validation |
|------|-------------|------------|
| `capability_id` | 能力标识,如 `REALTIME_PAY``WITHHOLD_SIGNING` | 必填,唯一 |
| `capability_name` | 能力名称 | 必填 |
| `business_domain` | 业务归属,如 `REV-003``REV-008` | 必填,必须落在当前正式模块范围内 |
| `source_docs` | 来源文档列表 | 至少 1 个 |
| `formal_targets` | 正式承接文档与章节 | 至少 1 个 |
| `current_status` | 当前实现状态 | 必填,取值仅限 `已实现` / `部分实现` / `文档先行` |
| `notes` | 边界说明 | 可选 |
### Relationships
- 一个 `Source Capability` 必须映射到至少一个 `Formal Document Section`
- 一个 `Source Capability` 可以关联多个 `Backend Evidence Item`
## 2. Formal Document Section
### Purpose
表示本仓库中承接 `SYS-009` 设计整合结论的正式章节或表格位置。
### Fields
| Field | Description | Validation |
|------|-------------|------------|
| `document_path` | 正式文档路径 | 必填,必须是既有主文档或治理文档 |
| `section_anchor` | 章节锚点或节标题 | 必填 |
| `section_type` | 章节类型,如范围摘要、业务流程、接口契约、数据对象 | 必填 |
| `update_intent` | 本轮更新意图 | 必填 |
| `consistency_impacts` | 受影响的一致性项 | 至少 1 项 |
### Relationships
- 一个 `Formal Document Section` 可承接多个 `Source Capability`
- 一个 `Formal Document Section` 可引用多个 `Backend Evidence Item`
## 3. Backend Evidence Item
### Purpose
表示用于判定当前实现状态的代码或表结构证据。
### Fields
| Field | Description | Validation |
|------|-------------|------------|
| `evidence_path` | 证据文件路径 | 必填 |
| `evidence_type` | 类型,如 `controller``service``table_sql``admin_entry` | 必填 |
| `capability_scope` | 覆盖的能力簇 | 必填 |
| `maturity_signal` | 成熟度信号如完整实现、TODO、骨架接口、表结构已具备 | 必填 |
| `baseline_sha` | 对应 backend 基线 | 必填 |
| `remarks` | 备注 | 可选 |
### State Interpretation
| Maturity Signal | Verdict |
|----------------|---------|
| 完整请求处理 + 业务校验 + 数据写入/状态更新 + 日志留痕 | 已实现 |
| 有路由 / DTO / service 接口 / 部分逻辑,但存在 TODO 或空实现 | 部分实现 |
| 只有正式设计目标,没有明确代码证据 | 文档先行 |
## 4. Alignment Verdict
### Purpose
表示对单个能力簇的正式对齐结论。
### Fields
| Field | Description | Validation |
|------|-------------|------------|
| `capability_id` | 对应能力标识 | 必填 |
| `formal_target` | 正式落点 | 必填 |
| `verdict` | 对齐结论 | 必填,取值仅限 `已实现` / `部分实现` / `文档先行` |
| `basis_summary` | 判定依据摘要 | 必填 |
| `follow_up_action` | 后续动作 | 必填 |
### State Transitions
```text
文档先行 -> 部分实现 -> 已实现
```
触发条件:
- `文档先行 -> 部分实现`:出现 controller/service/DTO/表结构等明确工程骨架
- `部分实现 -> 已实现`:业务链路、状态更新和留痕闭环完成,且有稳定代码证据
## 5. Verification Artifact
### Purpose
表示本轮用于追踪计划、研究、对齐和结论的工件。
### Fields
| Field | Description | Validation |
|------|-------------|------------|
| `artifact_name` | 工件名称 | 必填 |
| `artifact_path` | 工件路径 | 必填 |
| `artifact_role` | 作用,如基线、研究、契约、最终结论 | 必填 |
| `depends_on` | 依赖工件 | 可选 |
| `completion_rule` | 何时可判定完成 | 必填 |