refactor(cli): split workflow/thread into two top-level command groups #146
Reference in New Issue
Block a user
Delete Branch "refactor/split-workflow-thread"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Split the CLI's
workflowcommand into two distinct top-level command groups:workflow(definition layer) andthread(instance/run layer).Why
The original
nerve workflowcommand mixed two different concepts:Separating them makes the CLI more intuitive and aligns with the domain model.
Changes
nerve threadcommand group withlist,show,inspect,killsubcommands — extracted from workflow.tslist,status,triggersubcommands only (definition-layer operations)threadCommandas top-level commandthreadCommandNew CLI structure:
Ref
Closes #145
✅ APPROVED
干净利落的拆分,domain model 对齐得很好。
👍 亮点
workflow= 定义层(list/status/trigger),thread= 实例层(list/show/inspect/kill),符合 CLAUDE.md 里的 domain modelopenStore、buildListOutput等从 workflow.ts export 给 thread.ts 复用,避免了代码重复nerve workflow runs/inspect/thread的提示文案都改成了新命令路径nerve start→nerve daemon start,统一了入口📝 小建议(non-blocking)
workflow list新增了从 nerve.yaml 读定义的功能(readFileSync+parseNerveConfig),这其实是一个小 feat,commit message 里可以提一下formatRowsAsAlignedTable在 diff 里没看到定义,应该是已有的 util,没问题430 tests pass ✅,LGTM 🚀