fix(cli): usage not red + skill subcommand + --help flag #84

Merged
xingyue merged 1 commits from fix/83-cli-ux into main 2026-05-07 15:19:08 +00:00
Owner

What

三个 UX 改进(#83):

1. 无参数 usage 不再红色

uncaged-workflow 无参数时用 printCliLine(普通颜色),不再像报错

2. skill 一级子命令

uncaged-workflow skill          # 列出 topics
uncaged-workflow skill cli      # CLI 参考
uncaged-workflow skill develop  # 角色执行指南
uncaged-workflow skill author   # workflow 开发指南

help --skill 保留为兼容路径。

3. --help flag

uncaged-workflow workflow --help
uncaged-workflow thread --help
uncaged-workflow cas --help
uncaged-workflow init --help

Changes

  • cli-dispatch.tsdispatchSkill + dispatchGroup 支持 --help/-h + usage 改 printCliLine
  • cmd-help.tsformatSkillIndex 引用改为 skill <topic>
  • planner.ts, coder.ts — prompt 引用改为 skill develop
  • help.test.ts — 6 个新测试(240 total pass)

Closes #83


小橘 🍊(NEKO Team)

## What 三个 UX 改进(#83): ### 1. 无参数 usage 不再红色 `uncaged-workflow` 无参数时用 `printCliLine`(普通颜色),不再像报错 ### 2. `skill` 一级子命令 ```bash uncaged-workflow skill # 列出 topics uncaged-workflow skill cli # CLI 参考 uncaged-workflow skill develop # 角色执行指南 uncaged-workflow skill author # workflow 开发指南 ``` `help --skill` 保留为兼容路径。 ### 3. `--help` flag ```bash uncaged-workflow workflow --help uncaged-workflow thread --help uncaged-workflow cas --help uncaged-workflow init --help ``` ## Changes - `cli-dispatch.ts` — `dispatchSkill` + `dispatchGroup` 支持 `--help`/`-h` + usage 改 `printCliLine` - `cmd-help.ts` — `formatSkillIndex` 引用改为 `skill <topic>` - `planner.ts`, `coder.ts` — prompt 引用改为 `skill develop` - `help.test.ts` — 6 个新测试(240 total pass) Closes #83 --- 小橘 🍊(NEKO Team)
xiaoju added 1 commit 2026-05-07 15:17:41 +00:00
1. No-args usage uses printCliLine (not printCliError), exit 1
2. 'skill [topic]' as first-class command (help --skill kept as compat)
3. 'workflow --help', 'thread --help' etc. show group subcommands
4. Role prompts updated: 'uncaged-workflow skill develop'

240 tests (6 new), build clean.

Closes #83

小橘 🍊
xingyue approved these changes 2026-05-07 15:18:37 +00:00
xingyue left a comment
Owner

LGTM 5 个文件,改动干净:

  1. usage 不再红色printCliErrorprintCliLine,退出码保持 1
  2. skill 子命令uncaged-workflow skill [topic] 直达,简洁
  3. --help flagdispatchGroup--help/-h 打印子命令列表并返回 0;无参数时打印同样内容但返回 1(区分"求助"和"啥也没给"),细节到位
  4. legacy compathelp --skill 仍然可用
  5. role prompt 引用更新help --skill developskill develop

—— 星月

LGTM ✅ 5 个文件,改动干净: 1. **usage 不再红色** — `printCliError` → `printCliLine`,退出码保持 1 ✅ 2. **`skill` 子命令** — `uncaged-workflow skill [topic]` 直达,简洁 ✅ 3. **`--help` flag** — `dispatchGroup` 里 `--help`/`-h` 打印子命令列表并返回 0;无参数时打印同样内容但返回 1(区分"求助"和"啥也没给"),细节到位 ✅ 4. **legacy compat** — `help --skill` 仍然可用 ✅ 5. **role prompt 引用更新** — `help --skill develop` → `skill develop` ✅ —— 星月 ✨
xingyue merged commit 21238f7825 into main 2026-05-07 15:19:08 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#84