Files
dacli/docs/decisions
ssw 5ead157903 feat(dacli): P1 dm/drop TTY 拦截 + workflow shim 清理 (11 文件)
P1 (0.5h):
  - dm/drop.ts 加 TTY 拦截 — 镜像 form/delete.ts:25 + print/delete.ts:46 +
    report/delete.ts:39 已稳定的 pattern: `if (!opts.yes && process.stdin.isTTY)` 时
    warn + exit 1; 非 TTY 模式 (CI/脚本) 静默 --yes 走即可. 同步 DOC 注释 + 移除 TODO.
  - storage/info.ts:38 DacliError 分叉 — 验证**实际不存在** (`class DacliError`
    仅 src/core/types.ts:57 一处定义, 已被 storage/_helpers.ts:21 正确 import).
    ADR 0015 §2.2 早期记述有误, 修订清空.

shim 清理 (0.5h):
  - 11 个 workflow 子命令 (approve/create/decision/delete/info/launch/list/
    selector/syncForm/tasks/update) 把 `import { ... } from './_output.ts'`
    改成 `from '../_output_filter.ts'` (1 行 sed × 11 文件).
  - 删除 src/commands/workflow/_output.ts shim 文件 (D 掉), 减少 1 个间接层.
  - 不影响 L1 输出过滤 / L3 CommandLog 落盘, 因接口签名不变.

验证:
  - TS compile: 56 errors baseline 不变, 0 新错误
  - 68/68 单元测试 PASS (含 tests/unit/workflow/create_stale_retry)
  - 端到端: dacli dm drop --help + dacli workflow info --help 完整
2026-07-21 17:35:09 +08:00
..

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 FK 字段必显式 relationForm Accepted
0002 form create --ai 4 限制 Accepted
0003 form update 不同步物理表 Accepted
0004 menu type=3 必传 moduleId Accepted
0005 dict typeCreate 全平台唯一 Accepted
0006 workflow 必传 startFormId Accepted
0007 form --ai 不按依赖顺序 Accepted
0008 test run 不自动注入 FK 数据 Accepted
0009 代码注释卫生规则 Accepted