/** * SF-Commit Command Template * * Template for committing changes with SpecForge ticket metadata. */ export const SF_COMMIT_CONTENT = `# Commit Changes (SpecForge) Create a git commit with SpecForge ticket metadata. ## Arguments - \`$ARGUMENTS\` - Optional: Ticket ID (uses context if not provided) ## Task ### 1. Get Ticket Context **MCP Calls:** \`\`\`typescript if ($ARGUMENTS) { get_ticket({ ticketId: $ARGUMENTS }) } else { // Read active ticket from .specforge.json or find active ticket const config = readFile('.specforge.json') const specificationId = config.activeSpecification?.id // Find the currently active ticket list_tickets({ specificationId, status: ["active"] }) // Use the active ticket get_ticket({ ticketId: activeTicket.id }) } \`\`\` ### 2. Generate Commit Message **Logic:** - Format: \`feat(scope): description (TICKET-ID)\` - Extract scope from epic - Use ticket title as description - Add ticket ID reference ### 3. Create Commit **Shell:** \`\`\`bash git add . git commit -m "{type}({scope}): {description} ({ticketId})" \`\`\` ### 4. Update Ticket Status **MCP Calls:** \`\`\`typescript complete_work_session({ ticketId: ticket.id }) \`\`\` ### 5. Display Commit Result **Output:** \`\`\` ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ COMMIT CREATED ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Ticket: E{n}-T{m} Message: {commitMessage} Hash: {commitHash} TICKET COMPLETED ───────────────────────────────────────────────────────────────── ✓ E{n}-T{m} marked as done ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Next: Run /sf-next for the next ticket \`\`\` ## Notes - Automatically completes the work session - Uses conventional commit format - Includes ticket ID for traceability `;