/** * v1.3.2 §P1 — the manager `review` surface. * * `validate` catches what static rules can prove (kebab ids, cycles, broken * refs). `review` is the complementary LLM pass: it reads a definition (plus * its static findings as context) and suggests *quality* improvements a rule * set can't see — a vague skill description, an agent with no clear escalation * path, a workflow stage whose exit criterion isn't really measurable, a * schedule prompt that doesn't match its cadence. * * Mirrors the injectable-caller pattern used by agent-map (`AgentTeamCaller`) * and classifier (`ClassifierCaller`): the core is pure and deterministic; the * LLM lives behind `ReviewCaller` so tests drive it with a mock and the runtime * only consults a model when the user opts in. `runClaude` is imported lazily. */ export type ReviewKind = "skill" | "agent" | "workflow" | "goal" | "schedule"; export interface ReviewInput { kind: ReviewKind; id: string; /** Raw definition text (SKILL.md / workflow.yaml / goal.md / schedule yaml+prompt). */ body: string; /** Static-validation findings, passed as context so review doesn't repeat them. */ findings?: string[]; } export type SuggestionSeverity = "blocker" | "improvement" | "nit"; export interface ReviewSuggestion { severity: SuggestionSeverity; message: string; } export interface ReviewResult { summary: string; suggestions: ReviewSuggestion[]; } export interface ReviewCaller { review(input: ReviewInput): Promise; /** Diagnostic — incremented per invocation. */ call_count?: number; } /** Build the review prompt (exported for tests + transparency). */ export declare function buildReviewPrompt(input: ReviewInput): string; /** Parse a review reply (tolerant of prose around the JSON). */ export declare function parseReviewReply(raw: string): ReviewResult | null; /** Run a review through the injected caller. Returns null if the caller yields nothing. */ export declare function reviewAsset(input: ReviewInput, caller: ReviewCaller): Promise; /** Claude-backed caller — constructed only when the user opts in. */ export declare function createClaudeReviewCaller(cwd: string, timeoutMs?: number): ReviewCaller;