fix(prime): add --state flag exclusivity validation

The --state flag is meant for quick state checks and cannot be
combined with --hook, --dry-run, or --explain flags.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
george
2026-01-10 18:29:04 -08:00
committed by Steve Yegge
parent 21a88e2c18
commit f1c49630ca

View File

@@ -81,6 +81,11 @@ func init() {
type RoleContext = RoleInfo
func runPrime(cmd *cobra.Command, args []string) error {
// Validate flag combinations: --state is exclusive
if primeState && (primeHookMode || primeDryRun || primeExplain) {
return fmt.Errorf("--state cannot be combined with other flags")
}
cwd, err := os.Getwd()
if err != nil {
return fmt.Errorf("getting current directory: %w", err)