init 的语义就是'让 app 处于可用状态', system 缺失时唯一合理动作就是 create.
旧 --auto-recover flag 让用户做'恢复 vs 不恢复'是伪决策, 'recover' 用词也误导
(实际场景是干净缺失, 就是 create, 不是恢复旧残骸).
变更:
- src/commands/app/init.ts: 删 --auto-recover option + 分支, 直接调 create
runAutoRecover → runCreateAppIfMissing (语义更准确)
- src/commands/app/{_check_system,context,login}.ts: 3 处 hint 文案统一
- src/core/_health_check.ts: hint 文案统一
- docs/尚数网基本开发规范v3.0.md: 2 处示例更新
- docs/decisions/0018-app-init-no-recover-flag.md: ADR 完整记录决策理由
验证: npx tsx src/cli.ts app init --help 不再含 --auto-recover;
tsc --noEmit 通过; app init --appCode=testspace 实跑正常
⚠ 破坏性变更: 仍在用 --auto-recover 的脚本会报 'unknown option'
缓解: 历史 M2 重启脚本是手动跑, 影响可控; v3.x changelog 待补
27 lines
1.5 KiB
Markdown
27 lines
1.5 KiB
Markdown
# dacli Architecture Decision Records (ADR)
|
|
|
|
> 记录 dacli 关键设计选择的完整理由 + 替代方案 + 后果, 含来源 (drift round / BS 编号 / 实战 app)。
|
|
|
|
## 规则
|
|
|
|
- 每篇 ADR 标准结构 (见 template.md): Context / Decision / Alternatives / Consequences / Cross-refs
|
|
- 编号 4 位数, 顺序递增 (0001, 0002, ...)
|
|
- 不撤销旧 ADR; 改设计时新增 ADR 引用旧 ADR 并说明变化
|
|
- 不入 git 的临时调试日志不属于这里
|
|
|
|
## 索引
|
|
|
|
| 编号 | 标题 | 状态 |
|
|
|------|------|------|
|
|
| [0001](./0001-fk-relation-form-required.md) | FK 字段必显式 relationForm | Accepted |
|
|
| [0002](./0002-form-create-ai-4-limitations.md) | form create --ai 4 限制 | Accepted |
|
|
| [0003](./0003-form-update-fields-no-alter-table.md) | form update 不同步物理表 | Accepted |
|
|
| [0004](./0004-menu-create-type3-moduleid.md) | menu type=3 必传 moduleId | Accepted |
|
|
| [0005](./0005-dict-typecreate-uniqueness.md) | dict typeCreate 全平台唯一 | Accepted |
|
|
| [0006](./0006-workflow-create-startformid.md) | workflow 必传 startFormId | Accepted |
|
|
| [0007](./0007-dacli-form-ai-not-in-dependency.md) | form --ai 不按依赖顺序 | Accepted |
|
|
| [0008](./0008-test-run-no-fk-injection.md) | test run 不自动注入 FK 数据 | Accepted |
|
|
| [0009](./0009-code-comment-hygiene.md) | 代码注释卫生规则 | Accepted |
|
|
| [0017](./0017-tdd2-end-to-end-findings.md) | tdd2 8 模块端到端 10 个 BS 固化 | Accepted |
|
|
| [0018](./0018-app-init-no-recover-flag.md) | app init 移除 --auto-recover flag (create-if-missing 默认行为) | Accepted |
|