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
+13 -3
View File
@@ -10,15 +10,20 @@ import (
)
type depAddOptions struct {
runID string
taskID string
dependsOn string
runID string
taskID string
dependsOn string
}
func newDepCmd(root *rootOptions) *cobra.Command {
cmd := &cobra.Command{
Use: "dep",
Short: "Task dependency commands",
Long: helpLong(
"Use dep commands to gate one task on another task's completion.",
"Dependencies affect the ready queue; they do not themselves launch or cancel work.",
),
Example: ` orch --db .agents/coord.db dep add --run blog_mvp_001 --task T2 --depends-on T1`,
}
cmd.AddCommand(newDepAddCmd(root))
@@ -31,6 +36,11 @@ func newDepAddCmd(root *rootOptions) *cobra.Command {
cmd := &cobra.Command{
Use: "add",
Short: "Add a dependency edge to a task",
Long: helpLong(
"Use dep add to make one task wait for another task to finish before it becomes ready.",
"The dependency target and dependent task must already exist in the same run.",
),
Example: ` orch --db .agents/coord.db dep add --run blog_mvp_001 --task frontend --depends-on backend`,
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()