import type { Repositories } from "../repositories/index.js"; import { PMDiagnosticsTracker } from "./pm-diagnostics.js"; export declare class WorkflowAdvisorService { private readonly repos; private readonly diagnostics; private sessionActions; private nudgesDelivered; private pmLiteEnabled; private pmFullEnabled; constructor(repos: Repositories, diagnostics: PMDiagnosticsTracker); /** Called by dispatcher before/after every tool invocation. */ recordAction(action: string, params?: Record): void; /** * Returns a nudge message if one is warranted, null otherwise. * Each nudge id is only delivered once per session. * Capped at PM_MAX_NUDGES total nudges per session. * Individual check failures are caught and logged to diagnostics. */ checkNudge(): string | null; /** Whether the per-session nudge cap has been reached. */ get maxNudgesReached(): boolean; /** Diagnostic summary for pm_status action. */ get stats(): { delivered: number; available: string[]; }; private get checks(); /** * Check 1: Agent started work on 3+ files without recording any changes. * Trigger: ≥3 begin_work calls, 0 record_change calls. */ private checkUnrecordedEdits; /** * Check 2: Tasks created without checking existing decisions first. * Trigger: create_task called, but get_decisions never called this session. */ private checkMissingDecisionLookup; /** * Check 3: Working on multiple files without checking file notes. * Trigger: ≥3 begin_work calls without any get_file_notes call. */ private checkMissingFileNotes; /** * Check 4: Extended session without recording any decisions. * Trigger: ≥6 total actions, 0 record_decision calls. */ private checkUnrecordedDecisions; /** * Check 5: Phase task marked done without checking the phase gate checklist. * Trigger: update_task with status:'done' and phase tag, but no get_knowledge calls. */ private checkPhaseGateSkip; /** * Check 6: Extended work without referencing requirements or prior decisions. * Trigger: ≥8 total actions without search, get_decisions, or get_file_notes. */ private checkPhaseAwareness; /** * Check 7: Scope additions (new tasks) without documenting risks or decisions. * Trigger: ≥2 create_task calls without record_decision. */ private checkRiskRegister; /** * PM-Full eligibility: offer PM-Full when criteria are met. * Only fires once per project (guarded by pm_full_offered config flag). * Criteria: ≥3 create_task calls OR phase tags OR PM keywords in task title. */ private checkPMFullEligibility; } //# sourceMappingURL=workflow-advisor.service.d.ts.map