// engine/plan-mode/diff-estimator.ts — Line estimation heuristics (SPEC-473)
const HIGH_RISK_PATHS = [
    'auth',
    'crypto',
    'payment',
    'billing',
    'security',
    'token',
    'secret',
    'password',
    'license',
    'permission',
    'rbac',
    'oauth',
];
const LOW_RISK_PATHS = ['test', 'spec', 'mock', 'fixture', '__test__', '.test.'];
/** Estimate lines added/removed for a file given its action type. */
export function estimateLinesForFile(filePath, action) {
    const lower = filePath.toLowerCase();
    if (action === 'delete') {
        return { added: 0, removed: 30 };
    }
    // Test files tend to be verbose
    if (LOW_RISK_PATHS.some((p) => lower.includes(p))) {
        return action === 'create' ? { added: 80, removed: 0 } : { added: 40, removed: 10 };
    }
    // Config / JSON files are short
    if (lower.endsWith('.json') || lower.endsWith('.config.ts') || lower.endsWith('.config.js')) {
        return action === 'create' ? { added: 20, removed: 0 } : { added: 10, removed: 5 };
    }
    // Type files are moderate
    if (lower.includes('/types/') || lower.endsWith('.types.ts')) {
        return action === 'create' ? { added: 40, removed: 0 } : { added: 20, removed: 5 };
    }
    // Default heuristics
    return action === 'create' ? { added: 50, removed: 0 } : { added: 30, removed: 10 };
}
/** Infer risk level for a file from its path and the spec's base risk. */
export function inferFileRisk(filePath, specRisk) {
    const lower = filePath.toLowerCase();
    if (HIGH_RISK_PATHS.some((p) => lower.includes(p))) {
        return 'high';
    }
    if (LOW_RISK_PATHS.some((p) => lower.includes(p))) {
        return 'low';
    }
    return specRisk;
}
//# sourceMappingURL=diff-estimator.js.map