/** * @slowcook 0.18.0+ — side-effects audit. * * After refine's relationship pass detects contradiction, this 2nd LLM * pass enumerates the EXACT assertions in conflicting stories that * would need to flip if the new issue is approved. PM reviews * granularly + accepts (testgen modifies the listed assertions) or * rejects (drop the issue). * * Replaces the prior all-or-nothing "supersede whole story" model. * * Inputs come from refine's existing context: * - issue title + body * - list of conflicting story IDs (from RelationshipVerdict) * - repo root (to read spec yamls + test files) * * Output: structured JSON parsed into SideEffectsAudit; comment body * formatter elsewhere renders it as a markdown table for the PM. */ import type { LlmClient } from "@slowcook-ai/core"; export interface MustChangeEntry { story: string; file: string; line_range: string; current_assertion: string; required_change: string; reason: string; } export interface CompatibleEntry { story: string; assertion: string; reason: string; } export interface RemovedEntry { story: string; file: string; line_range: string; assertion: string; reason: string; } export interface SideEffectsAudit { must_change: MustChangeEntry[]; compatible: CompatibleEntry[]; removed: RemovedEntry[]; } export interface AuditInputs { issueTitle: string; issueBody: string; conflictingStoryIds: string[]; repoRoot: string; } export interface AuditResult { audit: SideEffectsAudit; costUsd: number; usage: { inputTokens: number; outputTokens: number; cacheReadTokens: number; cacheCreateTokens: number; }; } /** * Run the side-effects audit. Reads conflicting specs + their tests * into the prompt; calls LLM; parses JSON; returns structured audit. */ export declare function auditSideEffects(inputs: AuditInputs, opts: { llm: LlmClient; model: string; }): Promise; /** * Render the audit as a markdown comment for the PR. PM sees this * instead of the bare "blocked-contradiction" message. */ export declare function sideEffectsCommentBody(audit: SideEffectsAudit, conflictingStoryIds: string[]): string; //# sourceMappingURL=side-effects-audit.d.ts.map