import { type ArchiveReason, type AssumptionLedger, type Evidence, type EvidenceLedger, type IntelligenceDecisionLedger, type Recommendation, type RecommendationLedger, type RecommendationPriority, type RecommendationReadiness, type RecommendationSource, type RecommendationStatus } from '@manehorizons/cadence-types'; import { type SubjectLedgerSpec } from './ledger.js'; export declare const recommendationLedgerSpec: SubjectLedgerSpec; export declare function readRecommendationLedger(root: string): Promise; export type RecommendationEvidenceOverride = { kind: 'cadence-artifact'; summary: string; path: string; }; export type AddRecommendationInput = { title: string; summary: string; priority: RecommendationPriority; readiness: RecommendationReadiness; affectedAreas: string[]; affectedFiles: string[]; evidenceSummary?: string; scoutId?: string; source?: RecommendationSource; sourceFindingId?: string; evidence?: RecommendationEvidenceOverride; }; export declare function addRecommendation(root: string, input: AddRecommendationInput): Promise; export type AddEvidenceToRecommendationInput = { recommendationId: string; note: string; }; export type AddEvidenceToRecommendationResult = { ok: true; evidence: Evidence; recommendation: Recommendation; } | { ok: false; error: string; }; export declare function addEvidenceToRecommendation(root: string, input: AddEvidenceToRecommendationInput): Promise; export declare function buildRecommendationNotFoundMessage(ledger: RecommendationLedger, id: string, context?: string): string; export declare function deriveRecommendationLinks(recLedger: RecommendationLedger, asLedger: AssumptionLedger, decLedger: IntelligenceDecisionLedger): RecommendationLedger; export type RecommendationTransitionAction = 'convert'; export type RecommendationTransitionResult = { ok: true; ledger: RecommendationLedger; } | { ok: false; error: string; }; export declare function applyRecommendationTransition(ledger: RecommendationLedger, id: string, action: RecommendationTransitionAction, toPhase: string, now: Date): RecommendationTransitionResult; export interface RecommendationPromotionChanges { status?: RecommendationStatus; readiness?: RecommendationReadiness; shippedRef?: string; } export declare function applyRecommendationPromotion(ledger: RecommendationLedger, id: string, changes: RecommendationPromotionChanges, now: Date): RecommendationTransitionResult; /** * Move a live rec into `archived`, stamping `archivedAt`/`archiveReason` (and * bumping `updatedAt`). Errors if `id` is not in the live array (unknown id, or * already archived). The ledger is otherwise untouched. */ export declare function archiveRecommendation(ledger: RecommendationLedger, id: string, reason: ArchiveReason, now: Date): RecommendationTransitionResult; /** * Restore an archived rec into `recommendations`, clearing the archive provenance * fields (and bumping `updatedAt`). Errors if `id` is not in the `archived` array. */ export declare function unarchiveRecommendation(ledger: RecommendationLedger, id: string, now: Date): RecommendationTransitionResult; export declare function autoArchiveReasonForPromotion(status: RecommendationStatus | undefined): ArchiveReason | null; export declare function runRecommendationTransition(root: string, id: string, action: RecommendationTransitionAction, toPhase: string): Promise; export declare function runRecommendationPromotion(root: string, id: string, changes: RecommendationPromotionChanges): Promise; export declare function runAdvanceConvertedToSettlePendingForPhase(root: string, phaseId: string): Promise; export declare function runRecommendationArchive(root: string, id: string, reason: ArchiveReason): Promise; export declare function runRecommendationUnarchive(root: string, id: string): Promise; //# sourceMappingURL=recommendations.d.ts.map