/**
 * Build a structured prompt for a single teammate in an Agent Team.
 * The prompt contains all context the teammate needs to execute independently.
 */
export function buildTeammatePrompt(context) {
    const sections = [];
    // Header
    sections.push(`# Teammate Assignment: ${context.specDetails.id}`);
    sections.push('');
    sections.push(`## Spec: ${context.specDetails.title}`);
    sections.push('');
    // Criteria
    if (context.specDetails.criteria.length > 0) {
        sections.push('## Acceptance Criteria');
        for (const c of context.specDetails.criteria) {
            sections.push(`- ${c}`);
        }
        sections.push('');
    }
    // Project context
    sections.push('## Project Context');
    sections.push(`- Language: ${context.projectLanguage}`);
    if (context.projectFramework) {
        sections.push(`- Framework: ${context.projectFramework}`);
    }
    sections.push(`- Architecture: ${context.architecture}`);
    sections.push('');
    // File ownership
    if (context.ownedFiles.length > 0) {
        sections.push('## Owned Files (exclusive write access)');
        for (const f of context.ownedFiles) {
            sections.push(`- ${f}`);
        }
        sections.push('');
    }
    // Forbidden files
    if (context.forbiddenFiles.length > 0) {
        sections.push('## Forbidden Files (DO NOT modify)');
        for (const f of context.forbiddenFiles) {
            sections.push(`- ${f}`);
        }
        sections.push('');
    }
    // Quality rules
    if (context.qualityRules.length > 0) {
        sections.push('## Quality Rules');
        for (const r of context.qualityRules) {
            sections.push(`- ${r}`);
        }
        sections.push('');
    }
    // Testing requirements
    if (context.testingRequirements.length > 0) {
        sections.push('## Testing Requirements');
        for (const t of context.testingRequirements) {
            sections.push(`- ${t}`);
        }
        sections.push('');
    }
    // Git conventions
    if (context.gitConventions.length > 0) {
        sections.push('## Git Conventions');
        for (const g of context.gitConventions) {
            sections.push(`- ${g}`);
        }
        sections.push('');
    }
    // Validation commands
    if (context.validationCommands.length > 0) {
        sections.push('## Validation Commands');
        sections.push('Run these commands before reporting done:');
        for (const v of context.validationCommands) {
            sections.push(`\`\`\`bash\n${v}\n\`\`\``);
        }
        sections.push('');
    }
    return sections.join('\n');
}
//# sourceMappingURL=prompt-builder.js.map