/**
 * System prompt assembly — takes the agent's prompt and appends
 * project context and tool guidelines.
 *
 * AgentController definitions (action, plan, ask, installation) own their prompts.
 * This module only handles the assembly of cross-cutting concerns that
 * apply regardless of which agent is active.
 */
/** Assemble the final system prompt from agent prompt + cross-cutting concerns. */
export function assembleSystemPrompt(options) {
    const { agentPrompt, skillsSection, contextFiles, toolGuidelines } = options;
    let prompt = agentPrompt;
    // Append tool-provided guidelines (e.g. MCP, extension tools)
    if (toolGuidelines && toolGuidelines.length > 0) {
        prompt += '\n\n## Tool Guidelines\n';
        for (const guideline of toolGuidelines) {
            prompt += `\n- ${guideline}`;
        }
    }
    // Append project context files (AGENTS.md / CLAUDE.md)
    if (contextFiles && contextFiles.length > 0) {
        prompt += '\n\n# Project Context\n\n';
        prompt += 'Project-specific instructions and guidelines:\n\n';
        for (const { path: filePath, content } of contextFiles) {
            prompt += `## ${filePath}\n\n${content}\n\n`;
        }
    }
    if (skillsSection && skillsSection.trim().length > 0) {
        prompt += `\n\n${skillsSection}`;
    }
    return prompt;
}
//# sourceMappingURL=system-prompt.js.map