cli: make bundled help self-describing

This commit is contained in:
2026-03-22 23:37:38 +08:00
parent 5859ff219e
commit 4d8c90eb26
49 changed files with 792 additions and 29 deletions
@@ -27,6 +27,16 @@ func newDispatchCmd(root *rootOptions) *cobra.Command {
cmd := &cobra.Command{
Use: "dispatch",
Short: "Dispatch a ready task to a worker through inbox",
Long: helpLong(
"Use dispatch to turn one ready task into a concrete attempt and inbox thread.",
"You must choose exactly one execution mode.",
"analysis: create the attempt and thread only; do not allocate a worktree.",
"code: allocate a Git worktree for the attempt and record workspace metadata.",
"repo-path, workspace-root, and base-ref only apply to execution-mode code.",
"dispatch creates handoff state only; a separate worker runtime or worker agent must still claim the assigned inbox thread.",
),
Example: ` orch --db .agents/coord.db dispatch --run blog_mvp_001 --task T1 --execution-mode analysis --to qa-worker --body "Summarize the latest failures."
orch --db .agents/coord.db dispatch --run blog_mvp_001 --task T2 --execution-mode code --to backend-worker --repo-path /path/to/repo --workspace-root .orch/worktrees --base-ref main --body-file ./tasks/t2.md`,
RunE: func(cmd *cobra.Command, args []string) error {
normalizedOpts, err := normalizeDispatchOptions(*opts)
if err != nil {