/**
 * GitHub Issue Body Generator
 *
 * Generates GitHub issue body markdown from a User Story.
 * Used by the spec-to-issue push sync to create rich issue content
 * with AC checkboxes, priority badges, and sync markers.
 *
 * @module github-issue-body-generator
 */
/**
 * Generate a GitHub issue body from a User Story input.
 *
 * Output format:
 * - Description section
 * - AC checkboxes between specweave markers
 * - Priority badge
 * - Sync footer marker
 */
export function generateIssueBody(userStory) {
    const lines = [];
    // Description
    lines.push('## Description');
    lines.push('');
    lines.push(userStory.description);
    lines.push('');
    // Priority badge
    lines.push(`**Priority**: ${userStory.priority}`);
    lines.push('');
    // Acceptance Criteria with markers
    if (userStory.acceptanceCriteria.length > 0) {
        lines.push('## Acceptance Criteria');
        lines.push('');
        lines.push('<!-- specweave:ac-start -->');
        for (const ac of userStory.acceptanceCriteria) {
            const checkbox = ac.completed ? '[x]' : '[ ]';
            lines.push(`- ${checkbox} **${ac.id}**: ${ac.description}`);
        }
        lines.push('<!-- specweave:ac-end -->');
        lines.push('');
    }
    // Sync footer marker
    const syncParts = [];
    if (userStory.specId) {
        syncParts.push(`spec=${userStory.specId}`);
    }
    syncParts.push(`us=${userStory.id}`);
    lines.push(`<!-- specweave:sync ${syncParts.join(' ')} -->`);
    return lines.join('\n');
}
//# sourceMappingURL=github-issue-body-generator.js.map