/**
 * start CLI types — Input spec and output result
 */

import { z } from 'zod';

export const StartSpecSchema = z.object({
  type: z.enum(['feature', 'release', 'hotfix']),
  name: z.string(),
  noPush: z.boolean().optional().default(false),
  dryRun: z.boolean().optional().default(false),
});

export type StartSpec = z.infer<typeof StartSpecSchema>;

export const StartResultSchema = z.object({
  success: z.boolean(),
  error: z.string().optional(),
  branch: z.string(),
  branchType: z.enum(['feature', 'release', 'hotfix']),
  baseBranch: z.string(),
  worktreePath: z.string().optional(),
  pushed: z.boolean(),
});

export type StartResult = z.infer<typeof StartResultSchema>;
