@specforge/mcp 3.0.7 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/cli/commands/index.d.ts +2 -0
  2. package/dist/cli/commands/index.d.ts.map +1 -1
  3. package/dist/cli/commands/index.js +2 -0
  4. package/dist/cli/commands/index.js.map +1 -1
  5. package/dist/cli/commands/init.d.ts.map +1 -1
  6. package/dist/cli/commands/init.js +184 -2
  7. package/dist/cli/commands/init.js.map +1 -1
  8. package/dist/cli/commands/init.types.d.ts +37 -0
  9. package/dist/cli/commands/init.types.d.ts.map +1 -1
  10. package/dist/cli/commands/init.types.js +18 -0
  11. package/dist/cli/commands/init.types.js.map +1 -1
  12. package/dist/cli/commands/plan.d.ts +18 -0
  13. package/dist/cli/commands/plan.d.ts.map +1 -0
  14. package/dist/cli/commands/plan.js +154 -0
  15. package/dist/cli/commands/plan.js.map +1 -0
  16. package/dist/cli/commands/plan.types.d.ts +60 -0
  17. package/dist/cli/commands/plan.types.d.ts.map +1 -0
  18. package/dist/cli/commands/plan.types.js +8 -0
  19. package/dist/cli/commands/plan.types.js.map +1 -0
  20. package/dist/cli/commands/spec-activate.d.ts +29 -0
  21. package/dist/cli/commands/spec-activate.d.ts.map +1 -0
  22. package/dist/cli/commands/spec-activate.js +155 -0
  23. package/dist/cli/commands/spec-activate.js.map +1 -0
  24. package/dist/cli/commands/spec-activate.types.d.ts +24 -0
  25. package/dist/cli/commands/spec-activate.types.d.ts.map +1 -0
  26. package/dist/cli/commands/spec-activate.types.js +8 -0
  27. package/dist/cli/commands/spec-activate.types.js.map +1 -0
  28. package/dist/cli/commands/status.d.ts.map +1 -1
  29. package/dist/cli/commands/status.js +89 -1
  30. package/dist/cli/commands/status.js.map +1 -1
  31. package/dist/cli/commands/status.types.d.ts +2 -0
  32. package/dist/cli/commands/status.types.d.ts.map +1 -1
  33. package/dist/cli/commands/status.types.js.map +1 -1
  34. package/dist/cli/config/agent-teams.types.d.ts +194 -0
  35. package/dist/cli/config/agent-teams.types.d.ts.map +1 -0
  36. package/dist/cli/config/agent-teams.types.js +36 -0
  37. package/dist/cli/config/agent-teams.types.js.map +1 -0
  38. package/dist/cli/config/index.d.ts +2 -0
  39. package/dist/cli/config/index.d.ts.map +1 -1
  40. package/dist/cli/config/index.js +2 -0
  41. package/dist/cli/config/index.js.map +1 -1
  42. package/dist/cli/config/loader.d.ts +36 -2
  43. package/dist/cli/config/loader.d.ts.map +1 -1
  44. package/dist/cli/config/loader.js +65 -0
  45. package/dist/cli/config/loader.js.map +1 -1
  46. package/dist/cli/config/validation.d.ts +69 -0
  47. package/dist/cli/config/validation.d.ts.map +1 -0
  48. package/dist/cli/config/validation.js +295 -0
  49. package/dist/cli/config/validation.js.map +1 -0
  50. package/dist/cli/config/writer.d.ts +39 -0
  51. package/dist/cli/config/writer.d.ts.map +1 -1
  52. package/dist/cli/config/writer.js +58 -0
  53. package/dist/cli/config/writer.js.map +1 -1
  54. package/dist/cli/index.d.ts.map +1 -1
  55. package/dist/cli/index.js +5 -1
  56. package/dist/cli/index.js.map +1 -1
  57. package/dist/lib/index.d.ts +3 -0
  58. package/dist/lib/index.d.ts.map +1 -1
  59. package/dist/lib/index.js +3 -0
  60. package/dist/lib/index.js.map +1 -1
  61. package/dist/lib/monorepo-detector.d.ts +31 -0
  62. package/dist/lib/monorepo-detector.d.ts.map +1 -0
  63. package/dist/lib/monorepo-detector.js +271 -0
  64. package/dist/lib/monorepo-detector.js.map +1 -0
  65. package/dist/lib/prompt-generator.d.ts +65 -0
  66. package/dist/lib/prompt-generator.d.ts.map +1 -0
  67. package/dist/lib/prompt-generator.js +172 -0
  68. package/dist/lib/prompt-generator.js.map +1 -0
  69. package/dist/lib/strategy-analyzer.d.ts +59 -0
  70. package/dist/lib/strategy-analyzer.d.ts.map +1 -0
  71. package/dist/lib/strategy-analyzer.js +137 -0
  72. package/dist/lib/strategy-analyzer.js.map +1 -0
  73. package/dist/tools/core/context-helper.d.ts +22 -0
  74. package/dist/tools/core/context-helper.d.ts.map +1 -1
  75. package/dist/tools/core/context-helper.js +37 -1
  76. package/dist/tools/core/context-helper.js.map +1 -1
  77. package/dist/tools/core/workspace-files.d.ts +49 -0
  78. package/dist/tools/core/workspace-files.d.ts.map +1 -0
  79. package/dist/tools/core/workspace-files.js +259 -0
  80. package/dist/tools/core/workspace-files.js.map +1 -0
  81. package/dist/tools/index.d.ts.map +1 -1
  82. package/dist/tools/index.js +147 -0
  83. package/dist/tools/index.js.map +1 -1
  84. package/package.json +3 -2
  85. package/src/cli/templates/agents/content/core/sfag-implementer.ts +113 -0
  86. package/src/cli/templates/agents/content/core/sfag-orchestrator.ts +107 -0
  87. package/src/cli/templates/agents/content/core/sfag-spec-creator.ts +126 -0
  88. package/src/cli/templates/agents/content/core/sfag-ticket-implementer.ts +132 -0
  89. package/src/cli/templates/agents/content/research/sfag-package-researcher.ts +153 -0
  90. package/src/cli/templates/agents/content/task-type/sfag-api-implementer.ts +132 -0
  91. package/src/cli/templates/agents/content/task-type/sfag-docs-writer.ts +183 -0
  92. package/src/cli/templates/agents/content/task-type/sfag-frontend-builder.ts +141 -0
  93. package/src/cli/templates/agents/content/task-type/sfag-infra-architect.ts +149 -0
  94. package/src/cli/templates/agents/content/task-type/sfag-schema-designer.ts +132 -0
  95. package/src/cli/templates/agents/content/task-type/sfag-test-writer.ts +171 -0
  96. package/src/cli/templates/agents/index.ts +74 -0
  97. package/src/cli/templates/commands.ts +179 -0
  98. package/src/cli/templates/content/sf-autonomous.ts +78 -0
  99. package/src/cli/templates/content/sf-blockers.ts +68 -0
  100. package/src/cli/templates/content/sf-commit.ts +78 -0
  101. package/src/cli/templates/content/sf-context.ts +64 -0
  102. package/src/cli/templates/content/sf-create-epics.ts +129 -0
  103. package/src/cli/templates/content/sf-create-spec.ts +136 -0
  104. package/src/cli/templates/content/sf-create-tickets.ts +148 -0
  105. package/src/cli/templates/content/sf-epic.ts +69 -0
  106. package/src/cli/templates/content/sf-help.ts +61 -0
  107. package/src/cli/templates/content/sf-import.ts +88 -0
  108. package/src/cli/templates/content/sf-init.ts +61 -0
  109. package/src/cli/templates/content/sf-next.ts +67 -0
  110. package/src/cli/templates/content/sf-reset.ts +78 -0
  111. package/src/cli/templates/content/sf-review.ts +67 -0
  112. package/src/cli/templates/content/sf-search.ts +64 -0
  113. package/src/cli/templates/content/sf-status.ts +67 -0
  114. package/src/cli/templates/content/sf-ticket.ts +76 -0
  115. package/src/cli/templates/content/sf-validate.ts +78 -0
  116. package/src/cli/templates/index.ts +16 -0
  117. package/src/cli/templates/skills/specforge-conventions.md +109 -0
  118. package/src/cli/templates/skills/specforge-orchestrator.md +401 -0
  119. package/src/cli/templates/skills/specforge-validator.md +122 -0
  120. package/src/cli/templates/skills/specforge-worker.md +378 -0
@@ -0,0 +1,78 @@
1
+ /**
2
+ * SF-Commit Command Template
3
+ *
4
+ * Template for committing changes with SpecForge ticket metadata.
5
+ */
6
+
7
+ export const SF_COMMIT_CONTENT = `# Commit Changes (SpecForge)
8
+
9
+ Create a git commit with SpecForge ticket metadata.
10
+
11
+ ## Arguments
12
+ - \`$ARGUMENTS\` - Optional: Ticket ID (uses context if not provided)
13
+
14
+ ## Task
15
+
16
+ ### 1. Get Ticket Context
17
+
18
+ **MCP Calls:**
19
+ \`\`\`typescript
20
+ if ($ARGUMENTS) {
21
+ get_ticket($ARGUMENTS)
22
+ } else {
23
+ get_working_context()
24
+ get_ticket(context.ticketId)
25
+ }
26
+ \`\`\`
27
+
28
+ ### 2. Generate Commit Message
29
+
30
+ **Logic:**
31
+ - Format: \`feat(scope): description (TICKET-ID)\`
32
+ - Extract scope from epic
33
+ - Use ticket title as description
34
+ - Add ticket ID reference
35
+
36
+ ### 3. Create Commit
37
+
38
+ **Shell:**
39
+ \`\`\`bash
40
+ git add .
41
+ git commit -m "{type}({scope}): {description} ({ticketId})"
42
+ \`\`\`
43
+
44
+ ### 4. Update Ticket Status
45
+
46
+ **MCP Calls:**
47
+ \`\`\`typescript
48
+ update_ticket({
49
+ ticketId: ticket.id,
50
+ status: 'done',
51
+ completedAt: new Date().toISOString()
52
+ })
53
+ \`\`\`
54
+
55
+ ### 5. Display Commit Result
56
+
57
+ **Output:**
58
+ \`\`\`
59
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
60
+ COMMIT CREATED
61
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
62
+ Ticket: E{n}-T{m}
63
+ Message: {commitMessage}
64
+ Hash: {commitHash}
65
+
66
+ TICKET COMPLETED
67
+ ─────────────────────────────────────────────────────────────────
68
+ ✓ E{n}-T{m} marked as done
69
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
70
+
71
+ Next: Run /sf-next for the next ticket
72
+ \`\`\`
73
+
74
+ ## Notes
75
+ - Automatically marks ticket as done
76
+ - Uses conventional commit format
77
+ - Includes ticket ID for traceability
78
+ `;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * SF-Context Command Template
3
+ *
4
+ * Template for viewing or switching working context.
5
+ */
6
+
7
+ export const SF_CONTEXT_CONTENT = `# Working Context (SpecForge)
8
+
9
+ Quickly view or switch the current working context.
10
+
11
+ ## Arguments
12
+ - \`$ARGUMENTS\` - Optional: Project or Specification ID to switch to
13
+
14
+ ## Task
15
+
16
+ ### 1. If No Arguments - Show Current Context
17
+
18
+ **MCP Calls:**
19
+ \`\`\`typescript
20
+ get_working_context()
21
+ \`\`\`
22
+
23
+ **Output:**
24
+ \`\`\`
25
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
26
+ WORKING CONTEXT
27
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
28
+ Project: {project.name}
29
+ Specification: {spec.title}
30
+ Epic: {epic.title} (if set)
31
+ Ticket: E{n}-T{m} {title} (if set)
32
+
33
+ Session: {active/none}
34
+ Progress: {done}/{total} ({pct}%)
35
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
36
+ \`\`\`
37
+
38
+ ### 2. If Arguments - Switch Context
39
+
40
+ **MCP Calls:**
41
+ \`\`\`typescript
42
+ // Try as specification first
43
+ get_specification($ARGUMENTS)
44
+
45
+ // If not found, try as project
46
+ get_project($ARGUMENTS)
47
+
48
+ // Set context
49
+ set_working_context({
50
+ projectId: project.id,
51
+ specificationId: spec?.id
52
+ })
53
+ \`\`\`
54
+
55
+ **Output:**
56
+ \`\`\`
57
+ ✓ Switched to: {name}
58
+ \`\`\`
59
+
60
+ ## Notes
61
+ - No argument = show current context
62
+ - With argument = switch context
63
+ - Auto-detects if ID is project or specification
64
+ `;
@@ -0,0 +1,129 @@
1
+ /**
2
+ * SF-Create-Epics Command Template
3
+ *
4
+ * Template for creating epics with epic-level patterns from plan phases.
5
+ */
6
+
7
+ export const SF_CREATE_EPICS_CONTENT = `# Create Epics (SpecForge)
8
+
9
+ Create epics for a specification with objectives extracted from plan phases.
10
+
11
+ ## Arguments
12
+ - \`$ARGUMENTS\` - Required: Specification ID
13
+
14
+ ## Task
15
+
16
+ ### 1. Get Specification
17
+
18
+ **MCP Calls:**
19
+ \`\`\`typescript
20
+ specification({
21
+ operation: 'get',
22
+ specificationId: $ARGUMENTS,
23
+ include: ['epics', 'patterns'] // Get existing epics and inherited patterns
24
+ })
25
+ \`\`\`
26
+
27
+ ### 2. Read Original Plan
28
+
29
+ **Logic:**
30
+ - Locate original plan file from specification metadata
31
+ - Parse plan phases/sections
32
+ - Extract epic-level titles, descriptions, and objectives
33
+ - Identify epic-specific technical details
34
+
35
+ ### 3. Create Epics
36
+
37
+ **MCP Calls:**
38
+ \`\`\`typescript
39
+ // For each phase/section in plan
40
+ for (const phase of phases) {
41
+ await epic({
42
+ operation: 'create',
43
+
44
+ // === REQUIRED ===
45
+ specificationId: $ARGUMENTS,
46
+ title: phase.title,
47
+ description: phase.description,
48
+ objective: phase.objective, // Clear goal statement
49
+
50
+ // === CORE (recommended) ===
51
+ content: phase.fullContent, // Full markdown content
52
+ scope: phase.scope, // What's in/out of scope
53
+ priority: 'high', // high | medium | low
54
+ tags: ['phase1', 'backend'],
55
+ estimatedHours: 40,
56
+
57
+ // === PLANNING ===
58
+ goals: ['Implement X', 'Enable Y'],
59
+ acceptanceCriteria: ['Feature X works', 'Tests pass'],
60
+ guardrails: ['Do NOT break existing API'],
61
+ constraints: ['Must be backward compatible'],
62
+ assumptions: ['Database schema is stable'],
63
+ risks: ['May require migration'],
64
+
65
+ // === TECHNICAL ===
66
+ architecture: 'Service layer with repository pattern',
67
+ fileStructure: 'src/services/\\n user.service.ts\\n auth.service.ts',
68
+ techStack: ['typescript', 'prisma'],
69
+ dependencies: ['zod', '@prisma/client'],
70
+ apiContracts: { endpoints: [{ path: '/api/users', method: 'POST' }] },
71
+
72
+ // === PATTERN OVERRIDES (override spec-level patterns) ===
73
+ sharedPatterns: {
74
+ errorHandling: 'Custom error handling for this epic',
75
+ validation: 'Use zod schemas'
76
+ },
77
+ additionalImports: [
78
+ "import { z } from 'zod'",
79
+ "import { PrismaClient } from '@prisma/client'"
80
+ ],
81
+ commonFiles: {
82
+ 'types.ts': 'Shared types for this epic',
83
+ 'utils.ts': 'Epic-specific utilities'
84
+ }
85
+ })
86
+ }
87
+ \`\`\`
88
+
89
+ ### 4. Display Creation Results
90
+
91
+ **Output:**
92
+ \`\`\`
93
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
94
+ EPICS CREATED
95
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
96
+ Specification: {title}
97
+
98
+ CREATED EPICS
99
+ ─────────────────────────────────────────────────────────────────
100
+ E1 │ {title} │ {objective}
101
+ E2 │ {title} │ {objective}
102
+ E3 │ {title} │ {objective}
103
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
104
+
105
+ Next: Run /sf-create-tickets <epic-id> for each epic
106
+ \`\`\`
107
+
108
+ ## Field Reference
109
+
110
+ | Field | Required | Description |
111
+ |-------|----------|-------------|
112
+ | specificationId | ✅ | Parent specification |
113
+ | title | ✅ | Epic title |
114
+ | description | ✅ | Epic description |
115
+ | objective | ✅ | Clear goal statement |
116
+ | content | | Full markdown content |
117
+ | scope | | In/out of scope |
118
+ | goals | | Epic-specific goals |
119
+ | guardrails | | What NOT to do |
120
+ | architecture | | Epic-level design |
121
+ | sharedPatterns | | Override spec patterns |
122
+ | additionalImports | | Extra imports for tickets |
123
+
124
+ ## Notes
125
+ - specificationId, title, description, and objective are required
126
+ - sharedPatterns override specification-level patterns
127
+ - additionalImports are added to spec-level commonImports
128
+ - Use /sf-create-tickets for each epic after creation
129
+ `;
@@ -0,0 +1,136 @@
1
+ /**
2
+ * SF-Create-Spec Command Template
3
+ *
4
+ * Template for creating a SpecForge specification with patterns from a plan.
5
+ */
6
+
7
+ export const SF_CREATE_SPEC_CONTENT = `# Create Specification (SpecForge)
8
+
9
+ Create a SpecForge specification structure with metadata extracted from a plan document.
10
+
11
+ ## Arguments
12
+ - \`$ARGUMENTS\` - Required: Path to plan markdown file
13
+
14
+ ## Task
15
+
16
+ ### 1. Read and Analyze Plan
17
+
18
+ **Logic:**
19
+ - Read file at $ARGUMENTS
20
+ - Extract specification title and description
21
+ - Identify priority level (high/medium/low)
22
+ - Parse tags from plan categories/themes
23
+ - Extract goals, requirements, and constraints
24
+
25
+ ### 2. Create Specification
26
+
27
+ **MCP Calls:**
28
+ \`\`\`typescript
29
+ specification({
30
+ operation: 'create',
31
+
32
+ // === REQUIRED ===
33
+ projectId: currentProjectId,
34
+ title: extractedTitle,
35
+
36
+ // === CORE (recommended) ===
37
+ description: shortSummary, // 2-3 sentence summary
38
+ content: fullMarkdownContent, // Full markdown content
39
+ background: problemContext, // Why this exists
40
+ scope: scopeDefinition, // What's in/out of scope
41
+ priority: 'high', // high | medium | low
42
+ tags: ['feature', 'api'],
43
+ estimatedHours: 40,
44
+ targetAudience: 'developers',
45
+
46
+ // === GOALS & REQUIREMENTS ===
47
+ goals: ['Enable X', 'Improve Y'],
48
+ requirements: ['Must do A', 'Must support B'],
49
+ nonFunctionalRequirements: ['< 100ms latency', '99.9% uptime'],
50
+ acceptanceCriteria: ['Users can X', 'System handles Y'],
51
+ successMetrics: ['50% reduction in Z'],
52
+
53
+ // === GUARDRAILS & RISKS ===
54
+ guardrails: ['Do NOT modify X', 'Avoid pattern Y'],
55
+ constraints: ['Must use existing auth', 'Budget limit'],
56
+ assumptions: ['Users have Node 18+'],
57
+ risks: ['Third-party API may change'],
58
+
59
+ // === TECHNICAL ===
60
+ architecture: 'Microservices with event-driven communication',
61
+ fileStructure: 'src/\\n components/\\n services/\\n utils/',
62
+ techStack: ['typescript', 'react', 'node'],
63
+ dependencies: ['@aws-sdk/client-s3', 'zod'],
64
+ apiContracts: { endpoints: [{ path: '/api/v1/users', method: 'GET' }] },
65
+
66
+ // === PATTERN INHERITANCE (for epics/tickets) ===
67
+ codeStandards: {
68
+ errorHandling: 'Use Result<T, E> pattern',
69
+ naming: 'camelCase for functions, PascalCase for types'
70
+ },
71
+ commonImports: [
72
+ "import { logger } from '@/lib/logger'",
73
+ "import { db } from '@/lib/db'"
74
+ ],
75
+ returnTypes: {
76
+ success: '{ success: true, data: T }',
77
+ error: '{ success: false, error: string }'
78
+ },
79
+
80
+ // === VALIDATION (for CI/CD) ===
81
+ validationCommands: {
82
+ test: 'npm test',
83
+ lint: 'npm run lint',
84
+ build: 'npm run build',
85
+ typeCheck: 'npm run typecheck'
86
+ },
87
+ workingDirectory: './src',
88
+ outputDirectory: './dist'
89
+ })
90
+ \`\`\`
91
+
92
+ ### 3. Display Creation Results
93
+
94
+ **Output:**
95
+ \`\`\`
96
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
97
+ SPECIFICATION CREATED
98
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
99
+ Title: {title}
100
+ ID: {specificationId}
101
+ Priority: {priority}
102
+
103
+ DESCRIPTION
104
+ ─────────────────────────────────────────────────────────────────
105
+ {description}
106
+
107
+ TAGS
108
+ ─────────────────────────────────────────────────────────────────
109
+ {tags}
110
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
111
+
112
+ Next: Run /sf-create-epics {specificationId} to create epics
113
+ \`\`\`
114
+
115
+ ## Field Reference
116
+
117
+ | Field | Required | Description |
118
+ |-------|----------|-------------|
119
+ | projectId | ✅ | Project to create spec in |
120
+ | title | ✅ | Specification title |
121
+ | description | | Short summary |
122
+ | content | | Full markdown content |
123
+ | background | | Problem context |
124
+ | scope | | In/out of scope |
125
+ | goals | | Business objectives |
126
+ | requirements | | Functional requirements |
127
+ | guardrails | | What NOT to do |
128
+ | architecture | | System design |
129
+ | techStack | | Technologies used |
130
+ | codeStandards | | Inherited by epics/tickets |
131
+
132
+ ## Notes
133
+ - Only projectId and title are required
134
+ - codeStandards, commonImports, returnTypes are inherited by child epics/tickets
135
+ - Use /sf-create-epics to add epics after creation
136
+ `;
@@ -0,0 +1,148 @@
1
+ /**
2
+ * SF-Create-Tickets Command Template
3
+ *
4
+ * Template for creating detailed tickets individually with full implementation context.
5
+ */
6
+
7
+ export const SF_CREATE_TICKETS_CONTENT = `# Create Tickets (SpecForge)
8
+
9
+ Create detailed tickets for an epic with full implementation context.
10
+
11
+ ## Arguments
12
+ - \`$ARGUMENTS\` - Required: Epic ID
13
+
14
+ ## Task
15
+
16
+ ### 1. Get Epic Context
17
+
18
+ **MCP Calls:**
19
+ \`\`\`typescript
20
+ epic({
21
+ operation: 'get',
22
+ epicId: $ARGUMENTS,
23
+ include: ['tickets', 'specification'] // Get existing tickets and parent spec
24
+ })
25
+ \`\`\`
26
+
27
+ ### 2. Extract Ticket Definitions
28
+
29
+ **Logic:**
30
+ - Read epic description and objective
31
+ - Parse task breakdown from epic content
32
+ - Determine complexity and dependencies
33
+ - Extract acceptance criteria for each ticket
34
+
35
+ ### 3. Create Tickets
36
+
37
+ **MCP Calls:**
38
+ \`\`\`typescript
39
+ // For each task in epic
40
+ for (const task of tasks) {
41
+ await ticket({
42
+ operation: 'create',
43
+
44
+ // === REQUIRED ===
45
+ epicId: $ARGUMENTS,
46
+ title: task.title,
47
+
48
+ // === CORE (recommended) ===
49
+ description: task.description,
50
+ priority: 'high', // high | medium | low
51
+ complexity: 'medium', // small | medium | large | xlarge
52
+ estimatedHours: 4,
53
+ tags: ['feature', 'api'],
54
+ notes: 'Watch out for edge case X', // Warnings, considerations
55
+
56
+ // === ACCEPTANCE CRITERIA ===
57
+ acceptanceCriteria: [
58
+ 'Function returns correct result for valid input',
59
+ 'Function throws error for invalid input',
60
+ 'Unit tests cover all branches'
61
+ ],
62
+
63
+ // === IMPLEMENTATION GUIDANCE ===
64
+ implementation: {
65
+ filesToCreate: ['src/services/user.service.ts'],
66
+ filesToModify: ['src/index.ts'],
67
+ steps: [
68
+ 'Create UserService class',
69
+ 'Implement createUser method',
70
+ 'Add validation with zod',
71
+ 'Write unit tests'
72
+ ],
73
+ testing: 'Use vitest with mocked database'
74
+ },
75
+ technicalDetails: {
76
+ approach: 'Repository pattern with dependency injection',
77
+ stack: ['typescript', 'prisma', 'zod'],
78
+ endpoints: ['/api/users POST'],
79
+ databaseChanges: ['Add users table']
80
+ },
81
+
82
+ // === CODE REFERENCES ===
83
+ codeReferences: [{
84
+ name: 'createUser',
85
+ language: 'typescript',
86
+ code: \`async function createUser(data: CreateUserInput): Promise<User> {
87
+ const validated = createUserSchema.parse(data);
88
+ return await db.user.create({ data: validated });
89
+ }\`
90
+ }],
91
+ typeReferences: [{
92
+ name: 'CreateUserInput',
93
+ definition: \`interface CreateUserInput {
94
+ email: string;
95
+ name: string;
96
+ role?: 'admin' | 'user';
97
+ }\`
98
+ }],
99
+
100
+ // === DEPENDENCIES ===
101
+ dependsOn: ['ticket-id-1', 'ticket-id-2'] // Must complete these first
102
+ })
103
+ }
104
+ \`\`\`
105
+
106
+ ### 4. Display Creation Results
107
+
108
+ **Output:**
109
+ \`\`\`
110
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
111
+ TICKETS CREATED
112
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
113
+ Epic: E{n} - {epicTitle}
114
+
115
+ CREATED TICKETS
116
+ ─────────────────────────────────────────────────────────────────
117
+ E{n}-T1 │ {title} │ {complexity} │ ready
118
+ E{n}-T2 │ {title} │ {complexity} │ pending (depends on T1)
119
+ E{n}-T3 │ {title} │ {complexity} │ ready
120
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
121
+
122
+ Total: {ticketCount} tickets created
123
+
124
+ Next: Run /sf-status to see overall progress
125
+ \`\`\`
126
+
127
+ ## Field Reference
128
+
129
+ | Field | Required | Description |
130
+ |-------|----------|-------------|
131
+ | epicId | ✅ | Parent epic |
132
+ | title | ✅ | Ticket title |
133
+ | description | | What to implement |
134
+ | complexity | | small \\| medium \\| large \\| xlarge |
135
+ | acceptanceCriteria | | Success criteria (array of strings) |
136
+ | implementation | | Steps, files to create/modify |
137
+ | technicalDetails | | Approach, stack, endpoints |
138
+ | codeReferences | | Code snippets to guide implementation |
139
+ | typeReferences | | Type definitions to implement |
140
+ | dependsOn | | Ticket IDs that must complete first |
141
+ | notes | | Warnings, edge cases, considerations |
142
+
143
+ ## Notes
144
+ - Only epicId and title are required
145
+ - Tickets with dependsOn start as 'pending', others as 'ready'
146
+ - codeReferences and typeReferences provide implementation guidance
147
+ - Use /sf-next to start working on ready tickets
148
+ `;
@@ -0,0 +1,69 @@
1
+ /**
2
+ * SF-Epic Command Template
3
+ *
4
+ * Template for viewing epic details and progress.
5
+ */
6
+
7
+ export const SF_EPIC_CONTENT = `# View Epic (SpecForge)
8
+
9
+ View detailed information about a specific epic and its progress.
10
+
11
+ ## Arguments
12
+ - \`$ARGUMENTS\` - Required: Epic ID (e.g., E1)
13
+
14
+ ## Task
15
+
16
+ ### 1. Get Epic Details
17
+
18
+ **MCP Calls:**
19
+ \`\`\`typescript
20
+ get_epic($ARGUMENTS)
21
+ get_specification(epic.specificationId)
22
+ list_tickets({ epicId: $ARGUMENTS })
23
+ \`\`\`
24
+
25
+ ### 2. Calculate Progress
26
+
27
+ **Logic:**
28
+ - Count tickets by status
29
+ - Calculate completion percentage
30
+ - Identify blockers
31
+ - Track velocity
32
+
33
+ ### 3. Display Epic Overview
34
+
35
+ **Output:**
36
+ \`\`\`
37
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
38
+ EPIC: E{n}
39
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
40
+ {title}
41
+
42
+ Specification: {specTitle}
43
+ Progress: {done}/{total} ({percentage}%)
44
+ Status: {status}
45
+
46
+ DESCRIPTION
47
+ ─────────────────────────────────────────────────────────────────
48
+ {description}
49
+
50
+ TICKETS
51
+ ─────────────────────────────────────────────────────────────────
52
+ ✓ E{n}-T{m} │ {title} │ done
53
+ → E{n}-T{m} │ {title} │ in_progress
54
+ ○ E{n}-T{m} │ {title} │ ready
55
+ ⊗ E{n}-T{m} │ {title} │ blocked
56
+
57
+ PATTERNS
58
+ ─────────────────────────────────────────────────────────────────
59
+ {epicPatterns}
60
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
61
+
62
+ Next: Run /sf-next to continue implementation
63
+ \`\`\`
64
+
65
+ ## Notes
66
+ - Shows all tickets in epic
67
+ - Displays epic-level patterns
68
+ - Use /sf-ticket-implementation <id> to work on specific ticket
69
+ `;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * SF-Help Command Template
3
+ *
4
+ * Template for displaying SpecForge command reference.
5
+ */
6
+
7
+ export const SF_HELP_CONTENT = `# SpecForge Command Reference
8
+
9
+ Quick reference for all available SpecForge slash commands.
10
+
11
+ ## Task
12
+
13
+ Display the command reference:
14
+
15
+ \`\`\`
16
+ ═══════════════════════════════════════════════════════════════════
17
+ SPECFORGE COMMAND REFERENCE
18
+ ═══════════════════════════════════════════════════════════════════
19
+
20
+ SETUP & CONTEXT
21
+ ─────────────────────────────────────────────────────────────────
22
+ /sf-init [spec-id] Initialize specification for work
23
+ /sf-context [id] View or switch working context
24
+
25
+ STATUS & ANALYSIS
26
+ ─────────────────────────────────────────────────────────────────
27
+ /sf-status [spec-id] Implementation status overview
28
+ /sf-validate [spec-id] System health check
29
+ /sf-analyze-blockers Dependency bottleneck analysis
30
+ /sf-epic <epic-id> Epic details and progress
31
+ /sf-search <query> Search tickets
32
+
33
+ IMPLEMENTATION
34
+ ─────────────────────────────────────────────────────────────────
35
+ /sf-next Start next ready ticket
36
+ /sf-ticket-implementation Implement specific ticket
37
+ /sf-run-autonomous [max] Batch implement tickets
38
+ /sf-commit [ticket-id] Commit with ticket metadata
39
+
40
+ PLANNING
41
+ ─────────────────────────────────────────────────────────────────
42
+ /sf-import-plan <file> Import plan to full spec
43
+ /sf-create-spec <file> Create spec from plan
44
+ /sf-create-epics <spec> Create epics for spec
45
+ /sf-create-tickets <epic> Create tickets for epic
46
+
47
+ MANAGEMENT
48
+ ─────────────────────────────────────────────────────────────────
49
+ /sf-review [spec-id] Accomplishment review
50
+ /sf-reset [spec-id] Reset ticket statuses
51
+
52
+ ═══════════════════════════════════════════════════════════════════
53
+ Tip: Use /sf-init first to set up your working context.
54
+ ═══════════════════════════════════════════════════════════════════
55
+ \`\`\`
56
+
57
+ ## Notes
58
+ - Commands use MCP tools from @specforge/mcp
59
+ - Context is persisted across commands
60
+ - Use /sf-status to see current progress
61
+ `;