/** * Increment resolution shared by `task`, `verify`, `handoff`. * * - explicit id: short (`0874`) or full slug, via resolveIncrementId * - omitted: the SINGLE increment whose metadata.json status is in flight * (`active`, `in-progress`, `ready_for_review`). When nothing is in flight we * fall back to the single `planned`/`backlog` increment, so an increment that * has not been started yet still resolves (`task claim` starts it). * (2+ → error listing candidates; 0 → error). metadata.json is read directly * (never lazily created). * * @module core/tasks/resolve-increment */ export interface ResolvedIncrement { id: string; dir: string; } export declare class IncrementResolutionError extends Error { readonly candidates: string[]; constructor(message: string, candidates?: string[]); } export declare function incrementsDir(projectRoot: string): string; /** Ids of increments whose metadata.json says `active` (read-only scan). */ export declare function listActiveIncrementIds(projectRoot: string): string[]; /** Ids of increments that exist but have not been started (`planned`/`backlog`). */ export declare function listStartableIncrementIds(projectRoot: string): string[]; export declare function resolveIncrement(projectRoot: string, id?: string): ResolvedIncrement; /** Lease hours from config (`tasks.leaseHours`), default 2. */ export declare function readLeaseHours(projectRoot: string): number; /** * Active increments whose task board is finished (every task done or skipped, * and at least one task exists). This is the candidate set for * `specweave complete --all --reason "…"`. */ export declare function listTaskCompleteIncrementIds(projectRoot: string, leaseHours?: number): string[]; /** * Move a not-started increment (`planned`/`planning`/`backlog`) to `active`. * * Claiming a task IS starting the increment, so the CLI owns this transition — * the skills forbid hand-editing metadata.json, and before 2.0 there was no * command that performed it at all. * * Returns a one-line note when it transitioned, `undefined` when the increment * was already in flight (or metadata.json is missing/unreadable). */ export declare function ensureIncrementStarted(incrementDir: string): string | undefined; //# sourceMappingURL=resolve-increment.d.ts.map