Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StatusCmd = &cobra.Command{ Use: "status <REQ-ID>", Short: "Show implementation progress for a requirement", Long: `Status displays implementation progress summary for a requirement. Shows: - Total token count - Breakdown by status (STUB, IMPL, TESTED, BENCHED) - Completion percentage - List of incomplete work Examples: canary status CBIN-133 canary status CBIN-133 --no-color`, Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { prompt, _ := cmd.Flags().GetString("prompt") if prompt != "" { if _, err := utils.LoadPrompt(prompt); err != nil { return err } } reqID := args[0] noColor, _ := cmd.Flags().GetBool("no-color") dbPath, _ := cmd.Flags().GetString("db") jsonOutput, _ := cmd.Flags().GetBool("json") if noColor { color.NoColor = true } db, err := storage.Open(dbPath) if err != nil { fmt.Fprintf(os.Stderr, "⚠️ Database not found\n") fmt.Fprintf(os.Stderr, " Suggestion: Run 'canary index' to build database\n\n") return fmt.Errorf("open database: %w", err) } defer func() { _ = db.Close() }() tokens, err := db.GetTokensByReqID(reqID) if err != nil { return fmt.Errorf("query tokens: %w", err) } if len(tokens) == 0 { fmt.Printf("No tokens found for %s\n", reqID) return fmt.Errorf("requirement not found") } stats := calculateStats(tokens) if jsonOutput { enc := json.NewEncoder(os.Stdout) return enc.Encode(buildStatusJSON(reqID, stats, tokens)) } displayStatusSummary(reqID, stats, tokens) return nil }, }
CANARY: REQ=CBIN-CLI-001; FEATURE="StatusCmd"; ASPECT=CLI; STATUS=TESTED; TEST=TestCANARY_CBIN_CLI_001_CLI_StatusCmd; UPDATED=2026-08-29
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.