Why:
svc.sh grew into a three-kind service manager with database operations,
but its only documentation was a flat --help wall of text; the user asked
for a complete usage document and a better help experience.
Evidence:
- docs/svc.md: 14-section manual (prerequisites, quick start, concepts
and directory layout, per-command reference for service/global/db
commands, deploy sources, database operations handbook, configuration
layering, registry fields and event types, safety boundaries, exit
codes, troubleshooting table, recipe index) — every claim cross-checked
against the implementation from the previous two rounds.
- Help layering: no-args and -h print a one-screen overview; --help
renders the header comment reorganized into 7 labeled sections; the new
"help [topic]" command deep-dives eight topics (model, deploy,
lifecycle, db, dbops, config, examples, safety); usage errors now show
the short overview plus a pointer to --help / help / docs/svc.md.
All topics verified to render; unknown topic exits 2.
- No runtime behavior changed: end-to-end db lifecycle regression
(create → start → backup → status → stop → rm --purge) passes after the
refactor.
- Makefile help and README's documentation section point to docs/svc.md.
Impact:
Documentation-only plus display-layer changes; command semantics,
exit codes and file formats are untouched. Maintenance note: behavior
changes must now update both --help and docs/svc.md.
Refs: .task/feature-svc-docs-help.md(任务卡=PR 描述)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
feature/svc-docs-help 任务卡
任务主记录:<PR 链接,task-finish 时填写>;状态:进行中;owner:weichen
基线与授权
22d14db80c仅新增 docs/svc.md,修改 scripts/svc.sh 帮助层、Makefile 帮助行、README 文档指引。
目标与非目标
目标:
事件/安全边界/退出码/故障排查/配方索引)。
help [主题] → 8 个主题详解(model deploy lifecycle db dbops config examples safety);
用法错误改走短帮助并指路。
非目标:不改任何运行行为/命令语义(帮助与文档纯属展示层);不翻译英文错误信息;
不生成 man page。
同步记录
22d14db80c22d14db80c结果与验证(完成后填写)
新增 usage_short() 与 cmd_help()(8 主题 heredoc),main 接线 -h/--help/help 三层,
parse_args 未知参数改走短帮助;Makefile/README 指引。无运行行为改动。
8 个主题全部渲染、help bogus 退出码 2 并列出可选主题;db 用法错误指向分主题;
功能回归(db create→start→backup→status→stop→rm --purge 全链路)通过,runtime 清理干净。
未做 man page / shell 补全(可作后续项)。