/** * Pure CLI argument parser. Turns argv into a discriminated command the * composition root can switch on. No I/O here, so it is unit-tested directly; * main.ts owns the side effects. */ export interface ModelFlagArgs { plannerModel?: string; workerModel?: string; verifierModel?: string; /** * --plain: force the plainest stdout (no colour, no animation) regardless of * TTY. Only present when the flag was passed, mirroring the model-flag * convention so a command built without it omits the field entirely. */ plain?: boolean; } /** Flags accepted by `diablo init`. */ export interface InitFlags { /** --interactive / -i: run the full interactive flow (Pi session + prompts). */ interactive: boolean; /** --agents (default) or --claude: which agent guidance doc to scaffold. */ agentDoc: "agents" | "claude"; /** --context single|multiple: context layout mode. */ context: "single" | "multiple"; /** --markdown: issue tracker type (future-proofing for other trackers). */ tracker: "markdown"; /** * Triage label scaffold policy. * - `[]` (empty) → scaffold with the default 5-label vocabulary * - `["a","b"]` → scaffold with these custom labels * - `null` → skip triage scaffold entirely (--no-triage-labels) */ triageLabels: string[] | null; /** --bootstrap: run git init + husky/commitlint. */ bootstrap: boolean; /** --package-manager bun|npm|pnpm|skip: non-interactive PM choice. */ packageManager?: string; /** --setup-skills: run the interactive Pi skill-setup session. */ setupSkills: boolean; } export type ParsedArgs = ({ command: "run"; issue?: string; } & ModelFlagArgs) | ({ command: "plan"; issue?: string; } & ModelFlagArgs) | ({ command: "refactor"; area: string; } & ModelFlagArgs) | { command: "clean"; issue?: string; force: boolean; keepBranch: boolean; } | { command: "intake"; feature: string; } | { command: "telegram"; sub: "setup"; } | { command: "version"; } | { command: "help"; } | ({ command: "init"; } & InitFlags) | { command: "error"; message: string; }; export declare function parseArgs(argv: string[]): ParsedArgs; /** The default init flags — zero-argument `diablo init` uses these. */ export declare const INIT_DEFAULTS: InitFlags;