# Bank Tag Real Rule Phase 1 Frontend Implementation Plan

> **For agentic workers:** REQUIRED: Use superpowers:subagent-driven-development (if subagents available) or superpowers:executing-plans to implement this plan. Steps use checkbox (`- [ ]`) syntax for tracking.

**Goal:** 固化第一期银行流水真实规则落地的前端边界，确认本期不改页面结构与交互，只做接口影响核验和联调预期沉淀。

**Architecture:** 前端继续沿用现有结果总览页面与模型区展示结构，不新增字段、不调整交互、不新增接口调用。第一期真实规则落地只影响后端打标结果和统计数据来源，前端本期只做边界校验、回归验证和文档记录。

**Tech Stack:** Vue 2, Element UI, Node.js

---

### Task 1: 锁定第一期前端无代码改造边界

**Files:**
- Test: `ruoyi-ui/tests/unit/project-overview-api.test.js`
- Test: `ruoyi-ui/tests/unit/preliminary-check-api-integration.test.js`
- Test: `ruoyi-ui/tests/unit/preliminary-check-model-linkage-flow.test.js`

- [ ] **Step 1: Write the failing test**

补一个前端边界断言，锁定：

- 本期不新增前端 API 方法
- `PreliminaryCheck.vue` 仍按现有接口集合取数
- `RiskModelSection.vue` 不新增规则编码分支判断

可以在现有测试文件中加入如下静态断言思路：

```js
assert(!source.includes('GAMBLING_SENSITIVE_KEYWORD'))
assert(!source.includes('SPECIAL_AMOUNT_TRANSACTION'))
```

- [ ] **Step 2: Run test to verify it fails**

Run:

```bash
cd ruoyi-ui
node tests/unit/project-overview-api.test.js
node tests/unit/preliminary-check-api-integration.test.js
node tests/unit/preliminary-check-model-linkage-flow.test.js
```

Expected:

- 若当前测试尚未锁定边界，则至少有 1 个断言需要补充并先失败

- [ ] **Step 3: Write minimal implementation**

只补测试断言，不改前端业务代码，确保计划执行时能防止误把后端规则落地扩散成前端结构改造。

- [ ] **Step 4: Run test to verify it passes**

Run:

```bash
cd ruoyi-ui
node tests/unit/project-overview-api.test.js
node tests/unit/preliminary-check-api-integration.test.js
node tests/unit/preliminary-check-model-linkage-flow.test.js
```

Expected:

- `PASS`

- [ ] **Step 5: Commit**

```bash
git add ruoyi-ui/tests/unit/project-overview-api.test.js ruoyi-ui/tests/unit/preliminary-check-api-integration.test.js ruoyi-ui/tests/unit/preliminary-check-model-linkage-flow.test.js
git commit -m "锁定第一期流水模型前端边界"
```

### Task 2: 做第一期前端回归并补文档

**Files:**
- Create: `docs/reports/implementation/2026-03-20-bank-tag-real-rule-phase1-frontend-record.md`
- Create: `docs/tests/records/2026-03-20-bank-tag-real-rule-phase1-frontend-verification.md`

- [ ] **Step 1: Run focused frontend regression**

Run:

```bash
cd ruoyi-ui
node tests/unit/project-overview-api.test.js
node tests/unit/preliminary-check-api-integration.test.js
node tests/unit/preliminary-check-model-api.test.js
node tests/unit/preliminary-check-model-data-loading.test.js
node tests/unit/preliminary-check-model-linkage-flow.test.js
```

Expected:

- `PASS`
- 第一期开启真实规则后，前端现有接口依赖和模型区联动结构保持稳定

- [ ] **Step 2: Write implementation record**

在 `docs/reports/implementation/2026-03-20-bank-tag-real-rule-phase1-frontend-record.md` 中记录：

- 第一期前端无业务代码改造
- 仅做边界锁定与联调预期说明
- 前端受影响的仅是后端打标结果数据源更真实

- [ ] **Step 3: Write verification record**

在 `docs/tests/records/2026-03-20-bank-tag-real-rule-phase1-frontend-verification.md` 中记录：

- 执行命令
- 执行时间
- 结果摘要
- 未启动额外前端长期进程；若临时启动，验证后需停止

- [ ] **Step 4: Commit**

```bash
git add docs/reports/implementation/2026-03-20-bank-tag-real-rule-phase1-frontend-record.md docs/tests/records/2026-03-20-bank-tag-real-rule-phase1-frontend-verification.md
git commit -m "补充第一期流水模型前端实施记录"
```
