docs(cli): forbid high-frequency help dumps
Pipelines as Code CI / hwlab-web-probe-sentinel-nc01- Success
Pipelines as Code CI / platform-infra-gitea-nc01- Success
Pipelines as Code CI / unidesk-host- Success

This commit is contained in:
Codex
2026-07-12 01:47:29 +02:00
parent c19ea76e56
commit 3820fcd785
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -32,8 +32,9 @@ Host workspace、k3s、Windows、GitHub issue/PR route 见 [references/routes.md
## P0 边界
- `trans --help` 是高频直接阅读入口:
- 顶层只展示 route 语法、operation 分组和 `trans --help <operation>` 下钻索引。
- 顶层默认使用紧凑文本,只展示 route 语法、operation 分组和 `trans --help <operation>` 下钻索引JSON 必须由显式机器输出参数请求
- 顶层与 scoped help 都必须有界且直接返回;出现 `outputTruncated` 或 dump 即视为 CLI 缺陷。
- 未知 help scope 和可预测参数错误必须紧凑、无 stack;只有显式 debug/raw 错误模式可以披露 stack,内部异常不得冒充输入错误。
- 修复帮助过长时必须收敛信息结构,禁止提高 stdout 阈值。
- dump 只允许用于显式 `--full``--raw` 或确实无法预先界定的一次性异常证据。
- 远端文本修改优先 `trans <route> apply-patch`;不要 download/upload/sed 拼临时 diff 代替 patch。