cli: make bundled help self-describing
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user