/** * Plan-Driven Auto-Continue Module * * Reads `.opencode/plan.md` and provides next steps when * the AI runs out of todos. This extends the existing * nudge/review flow with plan-aware continuation. */ export interface PlanItem { phase: string; description: string; completed: boolean; lineNumber: number; } export interface PlanParseResult { items: PlanItem[]; currentPhase: string | null; nextItem: PlanItem | null; progress: { completed: number; total: number; }; raw: string; } /** * Parse a plan markdown file. * * Expected format: * ```markdown * # Plan: Build a Dota Game * * ## Phase 1: Project Setup * - [ ] Initialize project structure * - [x] Setup build system * - [ ] Configure testing * * ## Phase 2: Core Engine * - [ ] Implement game loop * - [ ] Create entity system * ``` */ export declare function parsePlan(planPath: string): PlanParseResult; /** * Get the path to the plan file. * If a custom path is provided, uses that. Otherwise searches for common plan filenames. * Priority order: * 1. Custom path (if provided and exists) * 2. PLAN.md (standard project plan) * 3. ROADMAP.md (long-term planning) * 4. .opencode/plan.md (OpenCode specific) * 5. README.md (may contain plan sections) * 6. TODO.md (simple task lists) * Returns the first one found, or the default path if none exist. */ export declare function getPlanPath(directory: string, customPath?: string | null): string; /** * Check if a plan exists and has pending items. */ export declare function hasPendingPlanItems(directory: string): boolean; /** * Build a continue message based on the plan state. * * This tells the AI what the next plan item is so it can * create todos and start working. * * @param result - The parsed plan result * @param maxItems - Maximum number of upcoming items to include (default: 3) */ export declare function buildPlanContinueMessage(result: PlanParseResult, maxItems?: number): string | null; /** * Mark a plan item as completed by description. * Returns true if an item was found and marked. */ export declare function markPlanItemComplete(planPath: string, description: string): boolean; //# sourceMappingURL=plan.d.ts.map