refactor(cmd): clarify batch operation output

Amolith and Crush created

- Show full plan only when multiple tasks added; print 'Added'
  for single task
- Recommend batch mode first in goal set help text
- Add guidance to check task list after sequential adds

Co-authored-by: Crush <crush@charm.land>
Implements: bug-8461b50

Change summary

cmd/g/s.go |  4 +++-
cmd/t/a.go | 24 ++++++++++++++++--------
2 files changed, 19 insertions(+), 9 deletions(-)

Detailed changes

cmd/g/s.go 🔗

@@ -106,8 +106,10 @@ func runSetGoal(cmd *cobra.Command, _ []string) error {
 	_, _ = fmt.Fprintln(out, "Study the goal and its description carefully.")
 	_, _ = fmt.Fprintln(out, "Review referenced tickets and files to gather context before planning changes.")
 	_, _ = fmt.Fprintln(out, "Add tasks once you understand the approach:")
+	_, _ = fmt.Fprintln(out, "  Prefer batch:  `np t a -t \"first\" -d \"details\" -t \"second\" -d \"more details\"`")
 	_, _ = fmt.Fprintln(out, "  Single task:   `np t a -t \"task title\" -d \"details\"`")
-	_, _ = fmt.Fprintln(out, "  Multiple tasks: `np t a -t \"first\" -d \"details\" -t \"second\" -d \"more details\"`")
+	_, _ = fmt.Fprintln(out, "")
+	_, _ = fmt.Fprintln(out, "If adding tasks one at a time, run `np t` after the batch to see the resulting list.")
 
 	return nil
 }

cmd/t/a.go 🔗

@@ -148,18 +148,26 @@ func runAddTasks(cmd *cobra.Command, _ []string) error {
 		return err
 	}
 
+	if addedCount == 0 {
+		return nil
+	}
+
+	if addedCount == 1 {
+		_, _ = fmt.Fprintln(cmd.OutOrStdout(), "Added")
+		return nil
+	}
+
+	// Multiple tasks added, show full plan
 	if _, err := shared.PrintPlan(cmd, env, sessionDoc.SID); err != nil {
 		return err
 	}
 
-	if addedCount > 0 {
-		out := cmd.OutOrStdout()
-		_, _ = fmt.Fprintln(out, "")
-		_, _ = fmt.Fprintf(out, "Added %d task(s).\n", addedCount)
-		_, _ = fmt.Fprintln(out, "Update task statuses as you work:")
-		_, _ = fmt.Fprintln(out, "  Single: `np t u -i task-id -s in_progress|completed|failed|cancelled`")
-		_, _ = fmt.Fprintln(out, "  Batch:  `np t u -i abc123 -s completed -i def456 -s in_progress`")
-	}
+	out := cmd.OutOrStdout()
+	_, _ = fmt.Fprintln(out, "")
+	_, _ = fmt.Fprintf(out, "Added %d task(s).\n", addedCount)
+	_, _ = fmt.Fprintln(out, "Update task statuses as you work:")
+	_, _ = fmt.Fprintln(out, "  Single: `np t u -i task-id -s in_progress|completed|failed|cancelled`")
+	_, _ = fmt.Fprintln(out, "  Batch:  `np t u -i abc123 -s completed -i def456 -s in_progress`")
 
 	return nil
 }