// tools/generate-tests/generators/property-based-generator.ts — SPEC-315
// Adapter: bridges spec-dispatcher with the engine property-based generator.
import { generatePropertyBasedTests } from '../../../engine/generate-tests/generators/property-based-generator.js';
/**
 * Build a TestFile for property-based tests of the given spec.
 * The file content is generated by the engine layer.
 *
 * @param criteria - Acceptance criteria strings from spec.md (optional).
 *   When provided, the generator will extract property-based tests from them.
 *   When omitted, a placeholder file is generated with instructions.
 */
export function buildPropertyBasedTestFile(spec, knowledge, testDir, autoGenerate, criteria = []) {
    const slug = spec.id.toLowerCase().replace(/[^a-z0-9]/g, '-');
    const ext = knowledge.language === 'python' ? 'py' : 'ts';
    const framework = knowledge.language === 'python'
        ? 'hypothesis'
        : knowledge.language === 'java' || knowledge.language === 'kotlin'
            ? 'jqwik'
            : 'fast-check';
    return {
        path: `${testDir}/property/${slug}.property.${ext}`,
        framework,
        content: generatePropertyBasedTests(spec, knowledge, criteria),
        ready: autoGenerate,
    };
}
//# sourceMappingURL=property-based-generator.js.map