import { resolveRoles } from './role-resolver.js';
import { buildAgentPrompt } from './prompt-builder.js';
const PARALLEL_INSTRUCTION = 'AGENT TEAM REQUIRED: Spawn each role below as a parallel subagent (Agent tool, subagent_type=Explore, model per modelHint). ' +
    'Pass investigationPrompt verbatim as the subagent prompt. ' +
    'Collect results, then call create_spec again with agentTeamFindings to synthesize.';
export async function buildAgentTeamPlan(opts) {
    if (opts.specScope === 'trivial' || opts.stackSignals.length === 0) {
        return { specId: opts.specId, roles: [], parallelInstruction: '' };
    }
    const resolvedRoles = await resolveRoles(opts.stackSignals);
    const roles = resolvedRoles.map((r) => ({
        ...r,
        investigationPrompt: buildAgentPrompt({
            role: r,
            specTitle: opts.specTitle,
            specDescription: opts.specDescription,
            projectPath: opts.projectPath,
        }),
    }));
    return { specId: opts.specId, roles, parallelInstruction: PARALLEL_INSTRUCTION };
}
//# sourceMappingURL=index.js.map