35 lines
1.8 KiB
Markdown
35 lines
1.8 KiB
Markdown
# Handoff Boot
|
|
|
|
用途:新一轮接手时先读本文件,再读 `CURRENT-STATE.md` 和 `PROJECT-MAP.md`。
|
|
|
|
## 开工顺序
|
|
|
|
1. 运行 `rtk git status --short`,确认当前工作区改动。
|
|
2. 阅读 `docx/handoff/CURRENT-STATE.md`。
|
|
3. 阅读 `docx/handoff/PROJECT-MAP.md`。
|
|
4. 涉及 SQL、脚本或配置时,先阅读 `scripts/0.0.1版本基线与后续迭代规则_20260628.md` 和 `docx/design/上线初始化SQL基线说明_20260624.md`。
|
|
5. 修改代码前按 GitNexus 规则做 impact;提交前做 `detect_changes(scope="all")`。如 MCP 返回 `Transport closed`,记录原因并用 `git diff` 和测试结果兜底。
|
|
|
|
## 当前 SQL 规则
|
|
|
|
- `0.0.1` 空库初始化 SQL 基线:`scripts/sql/init/JayuCloud.sql`。
|
|
- 开发、测试、上线空库初始化只执行该文件。
|
|
- 从 `0.0.1` 起不再修改初始化 SQL。
|
|
- 后续新增表、字段、索引、权限种子、系统参数、运行必需种子数据或数据修复时,必须新增 `scripts/sql/migrations/` 下的版本变更 SQL。
|
|
- 后续配置变更必须新增 `scripts/` 下的中文说明文档。
|
|
- 生产已部署库升级不直接复用初始化 SQL;如需升级已有库,必须单独制定迁移方案并经人工确认。
|
|
|
|
## 常用验证
|
|
|
|
```powershell
|
|
rtk git --no-pager diff --check
|
|
rtk mvn -f JY-Core/pom.xml test
|
|
rtk mvn -f JY-Gateway/pom.xml test
|
|
```
|
|
|
|
小程序静态语法检查可使用:
|
|
|
|
```powershell
|
|
rtk node -e "const fs=require('fs');const path=require('path');let n=0;function walk(d){for(const e of fs.readdirSync(d,{withFileTypes:true})){const p=path.join(d,e.name);if(e.isDirectory())walk(p);else if(e.isFile()&&p.endsWith('.js')){new Function(fs.readFileSync(p,'utf8'));n++;}}}['JY-Salon-WeChat/api','JY-Salon-WeChat/utils','JY-Salon-WeChat/pages'].forEach(walk);console.log('checked '+n+' js files')"
|
|
```
|