diff --git a/internal/cmd/goals.go b/internal/cmd/goals.go index f34790f5..a1a50881 100644 --- a/internal/cmd/goals.go +++ b/internal/cmd/goals.go @@ -17,9 +17,10 @@ import ( // Goal command flags var ( - goalsJSON bool - goalsStatus string - goalsPriority string + goalsJSON bool + goalsStatus string + goalsPriority string + goalsIncludeWisp bool ) var goalsCmd = &cobra.Command{ @@ -51,6 +52,7 @@ func init() { goalsCmd.Flags().BoolVar(&goalsJSON, "json", false, "Output as JSON") goalsCmd.Flags().StringVar(&goalsStatus, "status", "open", "Filter by status (open, closed, all)") goalsCmd.Flags().StringVar(&goalsPriority, "priority", "", "Filter by priority (e.g., P0, P1, P2)") + goalsCmd.Flags().BoolVar(&goalsIncludeWisp, "include-wisp", false, "Include transient wisp molecules (normally hidden)") rootCmd.AddCommand(goalsCmd) } @@ -196,6 +198,24 @@ func listGoals() error { return fmt.Errorf("parsing goals list: %w", err) } + // Filter out wisp molecules by default (transient/operational, not strategic goals) + // These have IDs like "gt-wisp-*" and are molecule-tracking beads, not human goals + if !goalsIncludeWisp { + filtered := make([]struct { + ID string `json:"id"` + Title string `json:"title"` + Status string `json:"status"` + Priority int `json:"priority"` + UpdatedAt string `json:"updated_at"` + }, 0) + for _, e := range epics { + if !isWispEpic(e.ID, e.Title) { + filtered = append(filtered, e) + } + } + epics = filtered + } + // Filter by priority if specified if goalsPriority != "" { targetPriority := parsePriority(goalsPriority) @@ -446,3 +466,20 @@ func parsePriority(s string) int { } return 2 // Default to P2 } + +// isWispEpic returns true if the epic is a transient wisp molecule. +// These are operational/infrastructure beads, not strategic goals that need human attention. +// Detection criteria: +// - ID contains "-wisp-" (molecule tracking beads) +// - Title starts with "mol-" (molecule beads) +func isWispEpic(id, title string) bool { + // Check for wisp ID pattern (e.g., "gt-wisp-abc123") + if strings.Contains(id, "-wisp-") { + return true + } + // Check for molecule title pattern + if strings.HasPrefix(title, "mol-") { + return true + } + return false +}