const REVIEW_DIMENSIONS = [
    'Edge cases & boundary conditions',
    'Race conditions & concurrency',
    'Security (injection, auth, data handling)',
    'Pattern consistency with codebase',
];
/**
 * Formats file list as @file1 @file2 syntax for Claude Code references.
 */
export function formatFileReferences(files) {
    return files.map((f) => `@${f}`).join(' ');
}
/**
 * Generates a ready-to-paste reviewer prompt for a fresh Claude session.
 * Reviewer starts with clean context — no bias from implementation.
 */
export function generateReviewerPrompt(config) {
    const { specId, modifiedFiles, acceptanceCriteria } = config;
    const fileReferences = formatFileReferences(modifiedFiles);
    const criteriaLines = acceptanceCriteria.length > 0
        ? acceptanceCriteria.map((c) => `- [ ] ${c}`).join('\n')
        : '- [ ] (no acceptance criteria found — review general correctness)';
    const dimensionLines = REVIEW_DIMENSIONS.map((d, i) => `${i + 1}. ${d}`).join('\n');
    const sessionInstructions = [
        'Review the following files for edge cases, race conditions, security issues, and consistency with existing patterns:',
        '',
        fileReferences,
        '',
        'Acceptance criteria to verify:',
        criteriaLines,
        '',
        'Review dimensions:',
        dimensionLines,
        '',
        "Start with a fresh perspective — approach as if you haven't seen the implementation before.",
        'Fix any issues found using --permission-mode acceptEdits.',
    ].join('\n');
    const specNum = specId.replace(/^SPEC-/i, '');
    const startCommand = `claude --permission-mode acceptEdits -n review-SPEC-${specNum}`;
    return {
        sessionInstructions,
        fileReferences,
        reviewChecklist: acceptanceCriteria,
        startCommand,
        dimensions: REVIEW_DIMENSIONS,
    };
}
//# sourceMappingURL=writer-reviewer.js.map