From 148d15b774416a91270d0fa22a222fc126edf422 Mon Sep 17 00:00:00 2001 From: tester Date: Sun, 17 May 2026 02:56:33 -0700 Subject: [PATCH] docs: sharpen user-facing copy across core commands Tighten cobra Short/Long/Example fields for root, create, start, log, handoff, review, approve, reject, close, focus, list, resume, and usage. Imperative voice, sentence-case Shorts, action-oriented Longs, and consistent example formatting. No behavior or test changes. Nightshift-Task: ux-copy-sharpener Nightshift-Ref: https://github.com/marcus/nightshift --- cmd/context.go | 12 +++++++++--- cmd/create.go | 13 +++++++++---- cmd/focus.go | 7 +++++-- cmd/handoff.go | 31 ++++++++++++++++++------------- cmd/list.go | 14 ++++++++++++-- cmd/log.go | 26 +++++++++++--------------- cmd/review.go | 38 +++++++++++++++++++++----------------- cmd/root.go | 8 +++++--- cmd/start.go | 10 ++++++---- 9 files changed, 96 insertions(+), 63 deletions(-) diff --git a/cmd/context.go b/cmd/context.go index 01be928a..a08aa3b3 100644 --- a/cmd/context.go +++ b/cmd/context.go @@ -13,7 +13,7 @@ import ( var resumeCmd = &cobra.Command{ Use: "resume [issue-id]", - Short: "Show context and set focus", + Short: "Show an issue's context and focus on it", GroupID: "session", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { @@ -31,8 +31,14 @@ var resumeCmd = &cobra.Command{ } var usageCmd = &cobra.Command{ - Use: "usage", - Short: "Generate optimized context block for AI agents", + Use: "usage", + Short: "Print a session-aware context block for AI agents", + Long: `Print a compact summary of your session, focused issue, in-progress work, +and reviewable issues. Designed to be pasted into an AI agent at the start of +a conversation so it knows where to pick up. + +Use --new-session at conversation start (or after /clear) to rotate sessions. +Use -q/--quiet for the compact form suited to agent prompts.`, GroupID: "session", RunE: func(cmd *cobra.Command, args []string) error { baseDir := getBaseDir() diff --git a/cmd/create.go b/cmd/create.go index 09f9b009..5e061aff 100644 --- a/cmd/create.go +++ b/cmd/create.go @@ -18,11 +18,16 @@ import ( var createCmd = &cobra.Command{ Use: "create [title]", Aliases: []string{"add", "new"}, - Short: "Create a new issue", - Long: `Create a new issue with optional flags for type, priority, labels, and more.`, + Short: "Create an issue", + Long: `Create an issue. Title is required; type, priority, labels, parent, +dependencies, and rich-text description/acceptance are all optional. + +You can prefix the title with a type (e.g., "epic: Migrate auth") and td will +extract it; explicit --type wins.`, Example: " td create \"Add user auth\" --type feature --priority P1\n" + - " td create \"Rich markdown issue\" --description-file description.md --acceptance-file acceptance.md\n" + - " cat acceptance.md | td create \"Import from stdin\" --acceptance-file -", + " td create \"epic: Migrate auth\" # type from prefix\n" + + " td create \"Rich issue\" --description-file body.md --acceptance-file accept.md\n" + + " cat accept.md | td create \"From stdin\" --acceptance-file -", GroupID: "core", RunE: func(cmd *cobra.Command, args []string) error { // Route "td new task Title" → td create --type task "Title" diff --git a/cmd/focus.go b/cmd/focus.go index e7211f97..439a6d8f 100644 --- a/cmd/focus.go +++ b/cmd/focus.go @@ -12,8 +12,11 @@ import ( ) var focusCmd = &cobra.Command{ - Use: "focus [issue-id]", - Short: "Set the current working issue", + Use: "focus [issue-id]", + Short: "Pin an issue as the default for log, handoff, and close", + Long: `Set the focused issue so commands like 'td log' and 'td handoff' can be +run without an ID. Focus is cleared automatically when an issue moves to +review or closed.`, GroupID: "session", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/handoff.go b/cmd/handoff.go index 348d5b72..8054ff6a 100644 --- a/cmd/handoff.go +++ b/cmd/handoff.go @@ -18,23 +18,28 @@ import ( var handoffCmd = &cobra.Command{ Use: "handoff [message]", - Short: "Capture structured working state", - Long: `Required before submitting for review. Captures git state automatically. - -Accepts YAML-like format via stdin: + Short: "Capture working state so the next session can resume", + Long: `Record what's done, what's left, decisions made, and open questions. +Captures git state automatically. Run this before 'td review' so the reviewer +(or the next session) has full context. + +Provide items via flags, stdin (-), file (@path), or a YAML-like block on +stdin with done/remaining/decisions/uncertain sections. + +Examples: + td handoff td-abc1 --done "wired up oauth" --remaining "add tests" + td handoff td-abc1 --done @done.txt # one item per line from file + echo "fixed login" | td handoff td-abc1 --done - + td handoff td-abc1 <", - Short: "Append a log entry to the current issue", - Long: `Low-friction progress tracking during a session. - -Syntax: - td log # Log to focused issue - td log # Log to specific issue - td log --issue # Log to specific issue (flag syntax) - -Supports stdin input for multi-line messages or piped input: - echo "message" | td log - td log < notes.txt - td log <