/** * `aidlc add action` command — AI-assisted action authoring. * * Translates a natural language description into a lifecycle action entry * in `.aidlc/actions.yaml`. Supports interactive confirmation, dry-run, * and non-interactive mode. * * Requirements: 22.1, 22.5, 22.6, 22.7, 22.8, 22.9, 22.10, 22.11, 22.13, 20.2, 20.3 * * @module */ import { Command } from 'commander'; import type { LifecycleEvent, PhaseName } from '../core/types.js'; /** The inferred action declaration from a natural language description. */ export interface InferredAction { id: string; event: LifecycleEvent; phase?: PhaseName | string; use?: string; with?: Record; run?: string; blocking: boolean; description: string; } /** * Infer a lifecycle event from a natural language description. * * Rules: * - "when starting" / "on start" → on-instance-start * - "when entering" / "on enter" → on-phase-enter * - "when exiting" / "on exit" / "after" → on-phase-exit * - "when complete" / "on finish" → on-instance-complete * - Otherwise → null (cannot infer) */ export declare function inferEvent(description: string): LifecycleEvent | null; /** * Infer a phase filter from the description. * Looks for known phase names in the text. */ export declare function inferPhase(description: string): PhaseName | undefined; /** * Infer whether the action should use a built-in or a custom command. * * Rules: * - "create branch" / "git branch" → use: git-branch * - "issue" / "github" → use: github-issue * - Otherwise → run: */ export declare function inferAction(description: string): { use?: string; with?: Record; run?: string; }; /** * Generate a URL-safe action ID from the description. */ export declare function generateActionId(description: string): string; /** * Full inference pipeline: take a natural language description and produce * an InferredAction. Returns `null` for the event field if it cannot be inferred. */ export declare function inferActionFromDescription(description: string, eventOverride?: LifecycleEvent, blockingOverride?: boolean): InferredAction | { event: null; description: string; }; /** * Validate a single action entry against the ActionsConfig schema. * Returns null if valid, or an error string describing the violation. */ export declare function validateActionEntry(entry: InferredAction): string | null; export declare function appendAction(actionsPath: string, action: InferredAction): void; /** * Render an InferredAction as a YAML preview for user confirmation. */ export declare function renderActionPreview(action: InferredAction): string; /** * Register the `aidlc add action` command on the given commander program. */ export declare function registerAddAction(program: Command): void; //# sourceMappingURL=add-action.d.ts.map