/** * Command Templates Module * * Defines all SpecForge slash commands with their full markdown content * for scaffolding to AI CLI tools. */ import type { CommandTemplate } from '../commands/scaffold/types.js'; import { SF_INIT_CONTENT } from './content/sf-init.js'; import { SF_STATUS_CONTENT } from './content/sf-status.js'; import { SF_RESET_CONTENT } from './content/sf-reset.js'; import { SF_ANALYZE_BLOCKERS_CONTENT } from './content/sf-blockers.js'; import { SF_CONTEXT_CONTENT } from './content/sf-context.js'; import { SF_SEARCH_CONTENT } from './content/sf-search.js'; import { SF_COMMIT_CONTENT } from './content/sf-commit.js'; import { SF_HELP_CONTENT } from './content/sf-help.js'; export function getCommandTemplates(): CommandTemplate[] { return [ { name: 'sf-init', description: 'Initialize ticket system for a specification', argumentHint: '[specification-id]', content: SF_INIT_CONTENT, category: 'Setup', }, { name: 'sf-context', description: 'View or switch working context', argumentHint: '[project-or-spec-id]', content: SF_CONTEXT_CONTENT, category: 'Setup', }, { name: 'sf-status', description: 'Display implementation status with consolidated tools', argumentHint: '[specification-id]', content: SF_STATUS_CONTENT, category: 'Status', }, { name: 'sf-analyze-blockers', description: 'Analyze blockers and dependency bottlenecks', content: SF_ANALYZE_BLOCKERS_CONTENT, category: 'Status', }, { name: 'sf-search', description: 'Search tickets by text, tags, or filters', argumentHint: '', content: SF_SEARCH_CONTENT, category: 'Review', }, { name: 'sf-reset', description: 'Reset ticket statuses with dependency awareness', argumentHint: '[specification-id]', content: SF_RESET_CONTENT, category: 'Utilities', }, { name: 'sf-commit', description: 'Commit changes with SpecForge ticket metadata', argumentHint: '[ticket-id]', content: SF_COMMIT_CONTENT, category: 'Utilities', }, { name: 'sf-help', description: 'Quick reference for all SpecForge commands', content: SF_HELP_CONTENT, category: 'Utilities', }, ]; } /** * Get a specific command template by name */ export function getCommandTemplate(name: string): CommandTemplate | undefined { return getCommandTemplates().find(t => t.name === name); } /** * Get command templates by category */ export function getCommandsByCategory(category: string): CommandTemplate[] { return getCommandTemplates().filter(t => t.category === category); }