迭代 ONE-OS 多原型:加氢记录/订单同源对账、租赁明细校验与月度损益、车辆与台账增强;新增客户回款与加氢站统计;补齐业务逻辑与对象存储发布规范,同步原型导航。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
37
.cursor/rules/business-logic-documentation.mdc
Normal file
37
.cursor/rules/business-logic-documentation.mdc
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
description: 复杂业务/判断逻辑必须同步写入 PRD 与 .spec Markdown,并同步标注目录
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
# 业务逻辑文档化(全局强制)
|
||||
|
||||
实现或修改**复杂判断逻辑**时,代码与文档**同一轮交付**。完整指南:`rules/business-logic-documentation-guide.md`。
|
||||
|
||||
## 触发条件(满足任一即必须文档化)
|
||||
|
||||
多步判定链、跨模块校验、状态/公式推导、导入保存规则、权限分支、一键修复建议值。
|
||||
|
||||
## 必须更新的文件
|
||||
|
||||
1. **`src/prototypes/<name>/.spec/<topic>.md`** — 完整规则(判定顺序、数据源、边界、代码路径)
|
||||
2. **`src/prototypes/<name>/.spec/requirements-prd.md`** — 摘要表 + §验收项 + 链接到规格全文
|
||||
3. **`annotation-source.json`** — 运行 `sync-annotation-directory.mjs` 同步目录/字段标注
|
||||
4. 字段级:`columnHeaderTips.ts` 或对应 `annotationText`(如有)
|
||||
|
||||
## 规格文最低要求
|
||||
|
||||
- 判定**优先级顺序**(表格)
|
||||
- **前置条件**(何时不校验)
|
||||
- **数据源**(种子 JSON / 哪几个模块)
|
||||
- 用户可见结果(通过/警告文案、是否可替换)
|
||||
- 标明原型本地种子 vs 未接真实 API
|
||||
|
||||
## 禁止
|
||||
|
||||
- 只改 `utils/*.ts` 不更新 PRD / `.spec`
|
||||
- 口头解释替代 Markdown
|
||||
- 验收通过时 PRD 与页面行为不一致
|
||||
|
||||
## 范例
|
||||
|
||||
`lease-business-detail`:`.spec/field-checks.md` + PRD §5 单元格系统校验 + 目录「单元格系统校验」
|
||||
31
.cursor/rules/cloud-publish-url.mdc
Normal file
31
.cursor/rules/cloud-publish-url.mdc
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
description: 对象存储发布 URL 必须与 Make 工具一致,禁止改后缀或加 prototypes/ 前缀
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
# 对象存储发布 URL(全局强制)
|
||||
|
||||
完整规范:`rules/cloud-publish-url-guide.md`。配置:`.axhub/make/axhub.config.json` → `cloudPublishing.s3`。
|
||||
|
||||
## 标准形态
|
||||
|
||||
```text
|
||||
{baseUrl}/{prototype-id}/index.html
|
||||
```
|
||||
|
||||
示例:`https://prototype.lnoneos.com/lease-business-detail/index.html`
|
||||
|
||||
## 禁止(Agent 发布或写链接时)
|
||||
|
||||
- 不得改为 `/prototypes/{id}/index.html`
|
||||
- 不得去掉 `/index.html` 后缀
|
||||
- 不得自改 `baseUrl` 域名
|
||||
- 不得把本地 dev 路径 `/prototypes/...` 当作已发布链接写入 PRD/导航/registry
|
||||
|
||||
## 脚本发布
|
||||
|
||||
使用 `scripts/publish-all-to-s3.mjs`;`resolveObjectPrefix` 已与 Make 对齐为扁平 `{prototype-id}`。
|
||||
|
||||
## 回报用户
|
||||
|
||||
发布成功后给出的 URL 须与 Make「已发布到对象存储」弹窗**完全一致**。
|
||||
Reference in New Issue
Block a user