Files
loan-pricing/docs/superpowers/plans/2026-03-31-production-db-init-export-frontend-plan.md

79 lines
3.3 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.
# Production DB Init Export Frontend Implementation Plan
> **For agentic workers:** REQUIRED: Use superpowers:executing-plans to implement this plan in this repository. Do not use subagents. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** 明确本次生产初始化数据库导出任务无前端代码改动范围,并将该结论以可追溯文档形式沉淀,避免执行阶段误改 `ruoyi-ui`
**Architecture:** 本次交付物是单文件 SQL职责只在数据库初始化层不涉及前端页面、接口契约、构建配置或部署产物调整。因此前端计划不做功能实现只负责范围确认、源码复核和实施记录留档确保“无前端改动”是被显式验证过的结论而不是口头假设。
**Tech Stack:** Vue 2、RuoYi 前端工程、shell、`rg`
---
### Task 1: 确认本次任务无前端实现范围
**Files:**
- Inspect: `docs/superpowers/specs/2026-03-31-production-db-init-export-design.md`
- Inspect: `ruoyi-ui/src`
- Inspect: `ruoyi-ui/package.json`
- [ ] **Step 1: 核对设计文档中的交付物边界**
Run: `rg -n "单一 \\.sql|生产初始化|不包含任何业务数据|业务表结构" docs/superpowers/specs/2026-03-31-production-db-init-export-design.md`
Expected: 能看到本次交付物明确限定为数据库初始化 SQL不包含前端实现要求。
- [ ] **Step 2: 检查前端目录中不存在与本次任务直接相关的待改文件**
Run: `rg -n "loan_pricing_prod_init|production db init|数据库导出|初始化脚本" ruoyi-ui/src ruoyi-ui/package.json`
Expected: 无输出,说明前端工程不存在与本次 SQL 导出任务耦合的实现点。
- [ ] **Step 3: 明确本次执行阶段不得改动 `ruoyi-ui`**
把执行约束写入实施记录草稿,至少包含:
```markdown
- 本次任务交付物为数据库初始化 SQL
- 不修改 `ruoyi-ui` 下任何源码、接口或构建配置
- 如执行中出现前端需求,应回到新需求重新做设计和计划
```
- [ ] **Step 4: 提交本任务**
```bash
git add docs/superpowers/plans/2026-03-31-production-db-init-export-frontend-plan.md
git commit -m "补充生产初始化数据库导出前端计划"
```
### Task 2: 补前端实施记录并留痕无改动结论
**Files:**
- Create: `doc/implementation-report-2026-03-31-production-db-init-export-frontend.md`
- [ ] **Step 1: 编写前端实施记录**
实施记录至少写明:
```markdown
- 已根据设计文档确认本次交付物仅为数据库初始化单文件 SQL
- 已检查 `ruoyi-ui` 工程,不存在需要随本次任务修改的页面、接口或构建配置
- 本次前端范围为无代码改动
- 执行阶段应保持 `ruoyi-ui` 目录不变
```
- [ ] **Step 2: 核对实施记录路径**
Run: `ls doc/implementation-report-2026-03-31-production-db-init-export-frontend.md`
Expected: 文件存在于仓库 `doc/` 目录。
- [ ] **Step 3: 再次确认 `ruoyi-ui` 未被纳入提交范围**
Run: `git status --short ruoyi-ui`
Expected: 无本次任务新增或修改的前端文件;如果有输出,需要先确认是否为历史遗留改动,不得误提交。
- [ ] **Step 4: 提交本任务**
```bash
git add doc/implementation-report-2026-03-31-production-db-init-export-frontend.md
git commit -m "补充生产初始化数据库导出前端实施记录"
```