fix(goals): filter out wisp molecules from gt goals output
Wisp molecules (gt-wisp-* IDs, mol-* titles) are transient operational beads for witness/refinery/polecat patrol, not strategic goals that need human attention. These are now filtered by default. Add --include-wisp flag to show them when debugging. Fixes gt-ysmj Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user