@specforge/mcp 3.2.3 → 3.3.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 (145) hide show
  1. package/README.md +1 -1
  2. package/dist/autopilot/api/autopilot-api-client.js +1 -1
  3. package/dist/autopilot/api/autopilot-api-client.js.map +1 -1
  4. package/dist/cli/commands/complete.d.ts +14 -0
  5. package/dist/cli/commands/complete.d.ts.map +1 -0
  6. package/dist/cli/commands/complete.js +96 -0
  7. package/dist/cli/commands/complete.js.map +1 -0
  8. package/dist/cli/commands/docs/content/examples.d.ts.map +1 -1
  9. package/dist/cli/commands/docs/content/examples.js +35 -40
  10. package/dist/cli/commands/docs/content/examples.js.map +1 -1
  11. package/dist/cli/commands/docs/content/workflow.d.ts.map +1 -1
  12. package/dist/cli/commands/docs/content/workflow.js +9 -13
  13. package/dist/cli/commands/docs/content/workflow.js.map +1 -1
  14. package/dist/cli/commands/index.d.ts +2 -0
  15. package/dist/cli/commands/index.d.ts.map +1 -1
  16. package/dist/cli/commands/index.js +2 -0
  17. package/dist/cli/commands/index.js.map +1 -1
  18. package/dist/cli/commands/init.d.ts.map +1 -1
  19. package/dist/cli/commands/init.js +100 -14
  20. package/dist/cli/commands/init.js.map +1 -1
  21. package/dist/cli/commands/init.types.d.ts +2 -0
  22. package/dist/cli/commands/init.types.d.ts.map +1 -1
  23. package/dist/cli/commands/init.types.js.map +1 -1
  24. package/dist/cli/commands/review-planning.d.ts +1 -0
  25. package/dist/cli/commands/review-planning.d.ts.map +1 -1
  26. package/dist/cli/commands/review-planning.js +2 -0
  27. package/dist/cli/commands/review-planning.js.map +1 -1
  28. package/dist/cli/commands/scaffold/agent-types.d.ts +1 -7
  29. package/dist/cli/commands/scaffold/agent-types.d.ts.map +1 -1
  30. package/dist/cli/commands/scaffold/agent-types.js +0 -12
  31. package/dist/cli/commands/scaffold/agent-types.js.map +1 -1
  32. package/dist/cli/commands/scaffold/types.d.ts +1 -7
  33. package/dist/cli/commands/scaffold/types.d.ts.map +1 -1
  34. package/dist/cli/commands/scaffold/types.js +2 -7
  35. package/dist/cli/commands/scaffold/types.js.map +1 -1
  36. package/dist/cli/commands/set-status.d.ts +14 -0
  37. package/dist/cli/commands/set-status.d.ts.map +1 -0
  38. package/dist/cli/commands/set-status.js +109 -0
  39. package/dist/cli/commands/set-status.js.map +1 -0
  40. package/dist/cli/index.d.ts.map +1 -1
  41. package/dist/cli/index.js +5 -1
  42. package/dist/cli/index.js.map +1 -1
  43. package/dist/cli/templates/agents/content/core/sfag-orchestrator.d.ts +3 -2
  44. package/dist/cli/templates/agents/content/core/sfag-orchestrator.d.ts.map +1 -1
  45. package/dist/cli/templates/agents/content/core/sfag-orchestrator.js +118 -61
  46. package/dist/cli/templates/agents/content/core/sfag-orchestrator.js.map +1 -1
  47. package/dist/cli/templates/agents/content/core/sfag-spec-creator.d.ts +3 -2
  48. package/dist/cli/templates/agents/content/core/sfag-spec-creator.d.ts.map +1 -1
  49. package/dist/cli/templates/agents/content/core/sfag-spec-creator.js +302 -81
  50. package/dist/cli/templates/agents/content/core/sfag-spec-creator.js.map +1 -1
  51. package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.d.ts +3 -2
  52. package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.d.ts.map +1 -1
  53. package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.js +209 -83
  54. package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.js.map +1 -1
  55. package/dist/cli/templates/agents/content/research/sfag-package-researcher.d.ts +2 -2
  56. package/dist/cli/templates/agents/content/research/sfag-package-researcher.d.ts.map +1 -1
  57. package/dist/cli/templates/agents/content/research/sfag-package-researcher.js +84 -106
  58. package/dist/cli/templates/agents/content/research/sfag-package-researcher.js.map +1 -1
  59. package/dist/cli/templates/agents/index.d.ts.map +1 -1
  60. package/dist/cli/templates/agents/index.js +0 -23
  61. package/dist/cli/templates/agents/index.js.map +1 -1
  62. package/dist/cli/templates/commands.d.ts +0 -3
  63. package/dist/cli/templates/commands.d.ts.map +1 -1
  64. package/dist/cli/templates/commands.js +0 -89
  65. package/dist/cli/templates/commands.js.map +1 -1
  66. package/dist/cli/templates/content/sf-blockers.d.ts +1 -1
  67. package/dist/cli/templates/content/sf-blockers.d.ts.map +1 -1
  68. package/dist/cli/templates/content/sf-blockers.js +5 -2
  69. package/dist/cli/templates/content/sf-blockers.js.map +1 -1
  70. package/dist/cli/templates/content/sf-commit.d.ts +1 -1
  71. package/dist/cli/templates/content/sf-commit.d.ts.map +1 -1
  72. package/dist/cli/templates/content/sf-commit.js +11 -8
  73. package/dist/cli/templates/content/sf-commit.js.map +1 -1
  74. package/dist/cli/templates/content/sf-context.d.ts +1 -1
  75. package/dist/cli/templates/content/sf-context.d.ts.map +1 -1
  76. package/dist/cli/templates/content/sf-context.js +16 -15
  77. package/dist/cli/templates/content/sf-context.js.map +1 -1
  78. package/dist/cli/templates/content/sf-help.d.ts +1 -1
  79. package/dist/cli/templates/content/sf-help.d.ts.map +1 -1
  80. package/dist/cli/templates/content/sf-help.js +4 -21
  81. package/dist/cli/templates/content/sf-help.js.map +1 -1
  82. package/dist/cli/templates/content/sf-init.d.ts +1 -1
  83. package/dist/cli/templates/content/sf-init.d.ts.map +1 -1
  84. package/dist/cli/templates/content/sf-init.js +10 -7
  85. package/dist/cli/templates/content/sf-init.js.map +1 -1
  86. package/dist/cli/templates/content/sf-reset.d.ts +1 -1
  87. package/dist/cli/templates/content/sf-reset.d.ts.map +1 -1
  88. package/dist/cli/templates/content/sf-reset.js +10 -19
  89. package/dist/cli/templates/content/sf-reset.js.map +1 -1
  90. package/dist/cli/templates/content/sf-search.d.ts +1 -1
  91. package/dist/cli/templates/content/sf-search.d.ts.map +1 -1
  92. package/dist/cli/templates/content/sf-search.js +5 -4
  93. package/dist/cli/templates/content/sf-search.js.map +1 -1
  94. package/dist/cli/templates/content/sf-status.d.ts +1 -1
  95. package/dist/cli/templates/content/sf-status.d.ts.map +1 -1
  96. package/dist/cli/templates/content/sf-status.js +5 -8
  97. package/dist/cli/templates/content/sf-status.js.map +1 -1
  98. package/dist/cli/ui/banner.d.ts +17 -0
  99. package/dist/cli/ui/banner.d.ts.map +1 -0
  100. package/dist/cli/ui/banner.js +105 -0
  101. package/dist/cli/ui/banner.js.map +1 -0
  102. package/dist/tools/core/admin.js +5 -5
  103. package/dist/tools/core/admin.js.map +1 -1
  104. package/dist/tools/core/help.js +1 -1
  105. package/dist/tools/core/help.js.map +1 -1
  106. package/dist/tools/index.js +4 -4
  107. package/dist/tools/index.js.map +1 -1
  108. package/dist/types/index.d.ts +2 -2
  109. package/dist/types/index.d.ts.map +1 -1
  110. package/dist/validation/index.js +1 -1
  111. package/dist/validation/index.js.map +1 -1
  112. package/package.json +1 -1
  113. package/src/cli/templates/agents/content/core/sfag-orchestrator.ts +118 -61
  114. package/src/cli/templates/agents/content/core/sfag-spec-creator.ts +302 -81
  115. package/src/cli/templates/agents/content/core/sfag-ticket-implementer.ts +209 -83
  116. package/src/cli/templates/agents/content/research/sfag-package-researcher.ts +84 -106
  117. package/src/cli/templates/agents/index.ts +0 -27
  118. package/src/cli/templates/commands.ts +0 -89
  119. package/src/cli/templates/content/sf-blockers.ts +5 -2
  120. package/src/cli/templates/content/sf-commit.ts +11 -8
  121. package/src/cli/templates/content/sf-context.ts +16 -15
  122. package/src/cli/templates/content/sf-help.ts +4 -21
  123. package/src/cli/templates/content/sf-init.ts +10 -7
  124. package/src/cli/templates/content/sf-reset.ts +10 -19
  125. package/src/cli/templates/content/sf-search.ts +5 -4
  126. package/src/cli/templates/content/sf-status.ts +5 -8
  127. package/src/cli/templates/skills/specforge-orchestrator.md +1 -1
  128. package/src/cli/templates/skills/specforge-worker.md +51 -19
  129. package/src/cli/templates/agents/content/core/sfag-implementer.ts +0 -113
  130. package/src/cli/templates/agents/content/task-type/sfag-api-implementer.ts +0 -132
  131. package/src/cli/templates/agents/content/task-type/sfag-docs-writer.ts +0 -183
  132. package/src/cli/templates/agents/content/task-type/sfag-frontend-builder.ts +0 -141
  133. package/src/cli/templates/agents/content/task-type/sfag-infra-architect.ts +0 -149
  134. package/src/cli/templates/agents/content/task-type/sfag-schema-designer.ts +0 -132
  135. package/src/cli/templates/agents/content/task-type/sfag-test-writer.ts +0 -171
  136. package/src/cli/templates/content/sf-autonomous.ts +0 -78
  137. package/src/cli/templates/content/sf-create-epics.ts +0 -129
  138. package/src/cli/templates/content/sf-create-spec.ts +0 -136
  139. package/src/cli/templates/content/sf-create-tickets.ts +0 -148
  140. package/src/cli/templates/content/sf-epic.ts +0 -69
  141. package/src/cli/templates/content/sf-import.ts +0 -88
  142. package/src/cli/templates/content/sf-next.ts +0 -67
  143. package/src/cli/templates/content/sf-review.ts +0 -67
  144. package/src/cli/templates/content/sf-ticket.ts +0 -76
  145. package/src/cli/templates/content/sf-validate.ts +0 -78
@@ -7,32 +7,17 @@
7
7
 
8
8
  import type { CommandTemplate } from '../commands/scaffold/types.js';
9
9
 
10
- // Import all command content
11
10
  import { SF_INIT_CONTENT } from './content/sf-init.js';
12
11
  import { SF_STATUS_CONTENT } from './content/sf-status.js';
13
- import { SF_NEXT_CONTENT } from './content/sf-next.js';
14
- import { SF_TICKET_IMPLEMENTATION_CONTENT } from './content/sf-ticket.js';
15
- import { SF_RUN_AUTONOMOUS_CONTENT } from './content/sf-autonomous.js';
16
- import { SF_REVIEW_CONTENT } from './content/sf-review.js';
17
- import { SF_VALIDATE_CONTENT } from './content/sf-validate.js';
18
12
  import { SF_RESET_CONTENT } from './content/sf-reset.js';
19
13
  import { SF_ANALYZE_BLOCKERS_CONTENT } from './content/sf-blockers.js';
20
- import { SF_IMPORT_PLAN_CONTENT } from './content/sf-import.js';
21
- import { SF_CREATE_SPEC_CONTENT } from './content/sf-create-spec.js';
22
- import { SF_CREATE_EPICS_CONTENT } from './content/sf-create-epics.js';
23
- import { SF_CREATE_TICKETS_CONTENT } from './content/sf-create-tickets.js';
24
14
  import { SF_CONTEXT_CONTENT } from './content/sf-context.js';
25
15
  import { SF_SEARCH_CONTENT } from './content/sf-search.js';
26
- import { SF_EPIC_CONTENT } from './content/sf-epic.js';
27
16
  import { SF_COMMIT_CONTENT } from './content/sf-commit.js';
28
17
  import { SF_HELP_CONTENT } from './content/sf-help.js';
29
18
 
30
- /**
31
- * Get all command templates
32
- */
33
19
  export function getCommandTemplates(): CommandTemplate[] {
34
20
  return [
35
- // Setup
36
21
  {
37
22
  name: 'sf-init',
38
23
  description: 'Initialize ticket system for a specification',
@@ -47,7 +32,6 @@ export function getCommandTemplates(): CommandTemplate[] {
47
32
  content: SF_CONTEXT_CONTENT,
48
33
  category: 'Setup',
49
34
  },
50
- // Status
51
35
  {
52
36
  name: 'sf-status',
53
37
  description: 'Display implementation status with consolidated tools',
@@ -55,77 +39,12 @@ export function getCommandTemplates(): CommandTemplate[] {
55
39
  content: SF_STATUS_CONTENT,
56
40
  category: 'Status',
57
41
  },
58
- {
59
- name: 'sf-validate',
60
- description: 'Validate ticket system health',
61
- argumentHint: '[specification-id]',
62
- content: SF_VALIDATE_CONTENT,
63
- category: 'Status',
64
- },
65
42
  {
66
43
  name: 'sf-analyze-blockers',
67
44
  description: 'Analyze blockers and dependency bottlenecks',
68
45
  content: SF_ANALYZE_BLOCKERS_CONTENT,
69
46
  category: 'Status',
70
47
  },
71
- // Implementation
72
- {
73
- name: 'sf-next',
74
- description: 'Quick start the next ready ticket',
75
- content: SF_NEXT_CONTENT,
76
- category: 'Implementation',
77
- },
78
- {
79
- name: 'sf-ticket-implementation',
80
- description: 'Implement a ticket with streamlined workflow',
81
- argumentHint: '[ticket-id]',
82
- content: SF_TICKET_IMPLEMENTATION_CONTENT,
83
- category: 'Implementation',
84
- },
85
- {
86
- name: 'sf-run-autonomous',
87
- description: 'Run autonomous implementation for multiple tickets',
88
- argumentHint: '[max-tickets]',
89
- content: SF_RUN_AUTONOMOUS_CONTENT,
90
- category: 'Implementation',
91
- },
92
- // Planning
93
- {
94
- name: 'sf-import-plan',
95
- description: 'Transform a plan into a complete SpecForge specification',
96
- argumentHint: '<plan-file-path>',
97
- content: SF_IMPORT_PLAN_CONTENT,
98
- category: 'Planning',
99
- },
100
- {
101
- name: 'sf-create-spec',
102
- description: 'Create a SpecForge specification with patterns',
103
- argumentHint: '<plan-file-path>',
104
- content: SF_CREATE_SPEC_CONTENT,
105
- category: 'Planning',
106
- },
107
- {
108
- name: 'sf-create-epics',
109
- description: 'Create epics with epic-level patterns',
110
- argumentHint: '<specification-id>',
111
- content: SF_CREATE_EPICS_CONTENT,
112
- category: 'Planning',
113
- },
114
- {
115
- name: 'sf-create-tickets',
116
- description: 'Create detailed tickets with full implementation context',
117
- argumentHint: '<epic-id>',
118
- content: SF_CREATE_TICKETS_CONTENT,
119
- category: 'Planning',
120
- },
121
- // Review
122
- {
123
- name: 'sf-review',
124
- description: 'Review accomplishments and progress analysis',
125
- argumentHint: '[specification-id]',
126
- content: SF_REVIEW_CONTENT,
127
- category: 'Review',
128
- },
129
48
  {
130
49
  name: 'sf-search',
131
50
  description: 'Search tickets by text, tags, or filters',
@@ -133,14 +52,6 @@ export function getCommandTemplates(): CommandTemplate[] {
133
52
  content: SF_SEARCH_CONTENT,
134
53
  category: 'Review',
135
54
  },
136
- {
137
- name: 'sf-epic',
138
- description: 'View epic details and progress',
139
- argumentHint: '<epic-id>',
140
- content: SF_EPIC_CONTENT,
141
- category: 'Review',
142
- },
143
- // Utilities
144
55
  {
145
56
  name: 'sf-reset',
146
57
  description: 'Reset ticket statuses with dependency awareness',
@@ -14,8 +14,11 @@ Analyze dependency bottlenecks and identify critical path tickets.
14
14
 
15
15
  **MCP Calls:**
16
16
  \`\`\`typescript
17
- get_working_context()
18
- get_specification(specificationId)
17
+ // Read project config
18
+ const config = readFile('.specforge.json')
19
+ const specificationId = config.activeSpecification?.id
20
+
21
+ get_specification({ specificationId })
19
22
  list_epics({ specificationId })
20
23
  list_tickets({ specificationId })
21
24
  \`\`\`
@@ -18,10 +18,15 @@ Create a git commit with SpecForge ticket metadata.
18
18
  **MCP Calls:**
19
19
  \`\`\`typescript
20
20
  if ($ARGUMENTS) {
21
- get_ticket($ARGUMENTS)
21
+ get_ticket({ ticketId: $ARGUMENTS })
22
22
  } else {
23
- get_working_context()
24
- get_ticket(context.ticketId)
23
+ // Read active ticket from .specforge.json or find active ticket
24
+ const config = readFile('.specforge.json')
25
+ const specificationId = config.activeSpecification?.id
26
+ // Find the currently active ticket
27
+ list_tickets({ specificationId, status: ["active"] })
28
+ // Use the active ticket
29
+ get_ticket({ ticketId: activeTicket.id })
25
30
  }
26
31
  \`\`\`
27
32
 
@@ -45,10 +50,8 @@ git commit -m "{type}({scope}): {description} ({ticketId})"
45
50
 
46
51
  **MCP Calls:**
47
52
  \`\`\`typescript
48
- update_ticket({
49
- ticketId: ticket.id,
50
- status: 'done',
51
- completedAt: new Date().toISOString()
53
+ complete_work_session({
54
+ ticketId: ticket.id
52
55
  })
53
56
  \`\`\`
54
57
 
@@ -72,7 +75,7 @@ Next: Run /sf-next for the next ticket
72
75
  \`\`\`
73
76
 
74
77
  ## Notes
75
- - Automatically marks ticket as done
78
+ - Automatically completes the work session
76
79
  - Uses conventional commit format
77
80
  - Includes ticket ID for traceability
78
81
  `;
@@ -15,9 +15,17 @@ Quickly view or switch the current working context.
15
15
 
16
16
  ### 1. If No Arguments - Show Current Context
17
17
 
18
- **MCP Calls:**
18
+ **Logic:**
19
19
  \`\`\`typescript
20
- get_working_context()
20
+ // Read project config
21
+ const config = readFile('.specforge.json')
22
+ const projectId = config.project.id
23
+ const specificationId = config.activeSpecification?.id
24
+
25
+ // Load details
26
+ if (specificationId) {
27
+ get_specification({ specificationId, include: ["status"] })
28
+ }
21
29
  \`\`\`
22
30
 
23
31
  **Output:**
@@ -27,34 +35,27 @@ WORKING CONTEXT
27
35
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
28
36
  Project: {project.name}
29
37
  Specification: {spec.title}
30
- Epic: {epic.title} (if set)
31
- Ticket: E{n}-T{m} {title} (if set)
38
+ Source: .specforge.json
32
39
 
33
- Session: {active/none}
34
40
  Progress: {done}/{total} ({pct}%)
35
41
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
36
42
  \`\`\`
37
43
 
38
44
  ### 2. If Arguments - Switch Context
39
45
 
40
- **MCP Calls:**
46
+ **Logic:**
41
47
  \`\`\`typescript
42
48
  // Try as specification first
43
- get_specification($ARGUMENTS)
44
-
45
- // If not found, try as project
46
- get_project($ARGUMENTS)
49
+ get_specification({ specificationId: $ARGUMENTS })
47
50
 
48
- // Set context
49
- set_working_context({
50
- projectId: project.id,
51
- specificationId: spec?.id
52
- })
51
+ // Update .specforge.json activeSpecification
52
+ // (or inform user to update manually)
53
53
  \`\`\`
54
54
 
55
55
  **Output:**
56
56
  \`\`\`
57
57
  ✓ Switched to: {name}
58
+ Update .specforge.json activeSpecification.id to persist.
58
59
  \`\`\`
59
60
 
60
61
  ## Notes
@@ -18,36 +18,19 @@ Display the command reference:
18
18
  ═══════════════════════════════════════════════════════════════════
19
19
 
20
20
  SETUP & CONTEXT
21
- ─────────────────────────────────────────────────────────────────
22
21
  /sf-init [spec-id] Initialize specification for work
23
22
  /sf-context [id] View or switch working context
24
23
 
25
24
  STATUS & ANALYSIS
26
- ─────────────────────────────────────────────────────────────────
27
25
  /sf-status [spec-id] Implementation status overview
28
- /sf-validate [spec-id] System health check
29
26
  /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
27
 
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
28
+ SEARCH
29
+ /sf-search <query> Search tickets
46
30
 
47
- MANAGEMENT
48
- ─────────────────────────────────────────────────────────────────
49
- /sf-review [spec-id] Accomplishment review
31
+ UTILITIES
50
32
  /sf-reset [spec-id] Reset ticket statuses
33
+ /sf-commit [ticket-id] Commit with ticket metadata
51
34
 
52
35
  ═══════════════════════════════════════════════════════════════════
53
36
  Tip: Use /sf-init first to set up your working context.
@@ -15,15 +15,18 @@ Initialize a SpecForge specification for implementation work.
15
15
 
16
16
  ### 1. Get or Set Working Context
17
17
 
18
- **MCP Calls:**
18
+ **Logic:**
19
19
  \`\`\`typescript
20
- // Get current context
21
- get_working_context()
20
+ // Read project config
21
+ const config = readFile('.specforge.json')
22
+ const projectId = config.project.id
23
+ const specificationId = $ARGUMENTS || config.activeSpecification?.id
22
24
 
23
- // If $ARGUMENTS provided, set specification
24
- set_working_context({
25
- specificationId: "$ARGUMENTS"
26
- })
25
+ // If no spec found, list available specs
26
+ if (!specificationId) {
27
+ list_specifications({ projectId })
28
+ // Let user pick
29
+ }
27
30
  \`\`\`
28
31
 
29
32
  ### 2. Load Specification Details
@@ -17,16 +17,15 @@ Reset ticket statuses to ready state with dependency awareness.
17
17
 
18
18
  **MCP Calls:**
19
19
  \`\`\`typescript
20
- get_working_context()
20
+ // Read project config
21
+ const config = readFile('.specforge.json')
22
+ const specificationId = $ARGUMENTS || config.activeSpecification?.id
21
23
 
22
- if ($ARGUMENTS.match(/E\d+-T\d+/)) {
24
+ if ($ARGUMENTS?.match(/E\d+-T\d+/)) {
23
25
  // Single ticket reset
24
- get_ticket($ARGUMENTS)
26
+ get_ticket({ ticketId: $ARGUMENTS })
25
27
  } else {
26
28
  // Full specification reset
27
- if ($ARGUMENTS) {
28
- set_working_context({ specificationId: "$ARGUMENTS" })
29
- }
30
29
  list_tickets({ specificationId })
31
30
  }
32
31
  \`\`\`
@@ -35,19 +34,11 @@ if ($ARGUMENTS.match(/E\d+-T\d+/)) {
35
34
 
36
35
  **MCP Calls:**
37
36
  \`\`\`typescript
38
- // For each ticket to reset
39
- for (const ticket of tickets) {
40
- // Check dependencies
41
- const allDepsCompleted = ticket.dependencies.every(
42
- dep => getTicketStatus(dep) === 'done'
43
- );
44
-
45
- // Update status
46
- update_ticket({
47
- ticketId: ticket.id,
48
- status: allDepsCompleted ? 'ready' : 'blocked'
49
- })
50
- }
37
+ // Reset tickets via lifecycle operation
38
+ reset_work_session({
39
+ specificationId,
40
+ ticketId: $ARGUMENTS.match(/E\d+-T\d+/) ? $ARGUMENTS : undefined
41
+ })
51
42
  \`\`\`
52
43
 
53
44
  ### 3. Display Reset Results
@@ -24,13 +24,14 @@ Search tickets by text, tags, status, or other filters.
24
24
 
25
25
  **MCP Calls:**
26
26
  \`\`\`typescript
27
- get_working_context()
27
+ // Read project config
28
+ const config = readFile('.specforge.json')
29
+ const specificationId = config.activeSpecification?.id
28
30
 
29
- list_tickets({
31
+ search_tickets({
30
32
  specificationId,
31
- search: extractedTerms,
33
+ query: extractedTerms,
32
34
  status: extractedStatus,
33
- epicId: extractedEpicId,
34
35
  tags: extractedTags
35
36
  })
36
37
  \`\`\`
@@ -13,16 +13,13 @@ Display comprehensive implementation status with consolidated progress view.
13
13
 
14
14
  ## Task
15
15
 
16
- ### 1. Get Working Context
16
+ ### 1. Get Specification Context
17
17
 
18
- **MCP Calls:**
18
+ **Logic:**
19
19
  \`\`\`typescript
20
- get_working_context()
21
-
22
- // If $ARGUMENTS provided, switch context
23
- if ($ARGUMENTS) {
24
- set_working_context({ specificationId: "$ARGUMENTS" })
25
- }
20
+ // Read project config
21
+ const config = readFile('.specforge.json')
22
+ const specificationId = $ARGUMENTS || config.activeSpecification?.id
26
23
  \`\`\`
27
24
 
28
25
  ### 2. Load Implementation Data
@@ -143,7 +143,7 @@ Each worker spawned by the orchestrator MUST follow this 9-step protocol:
143
143
 
144
144
  **When a worker encounters a blocker:**
145
145
  ```
146
- 1. Call report_discovery({ ticketId, type: "blocker", description: "description of blocker" })
146
+ 1. Call discover_work_session({ ticketId, type: "blocker", description: "description of blocker" })
147
147
  2. Call action_work_session({ ticketId, blockReason: "description of blocker" })
148
148
  → This sets the ticket to pending status
149
149
  3. Message team lead: "Blocked on E{n}-T{n}: {reason}"
@@ -177,12 +177,22 @@ Stage and commit your changes with a conventional commit message.
177
177
  Report completion to SpecForge and notify the team lead.
178
178
 
179
179
  ```
180
- 1. Call: complete_work_session({
180
+ 1. Ensure all steps and AC are marked via action_work_session:
181
+ Call: action_work_session({
182
+ ticketId: "{ticketId}",
183
+ allStepsDone: true,
184
+ allACValidated: true,
185
+ filesCreated: ["path/to/new/file.ts", ...],
186
+ filesModified: ["path/to/changed/file.ts", ...],
187
+ testResults: [{ name: "test-file.ts", passed: true }]
188
+ })
189
+ → The completion gate requires all steps + AC to be completed first
190
+
191
+ 2. Call: complete_work_session({
181
192
  ticketId: "{ticketId}",
182
193
  summary: "Brief description of what was implemented and key decisions made",
183
194
  filesCreated: ["path/to/new/file.ts", ...],
184
195
  filesModified: ["path/to/changed/file.ts", ...],
185
- validated: true,
186
196
  validation: {
187
197
  tests: "passed" | "failed" | "skipped" | "na",
188
198
  lint: "passed" | "failed" | "skipped" | "na",
@@ -194,7 +204,7 @@ Report completion to SpecForge and notify the team lead.
194
204
  → Transitions ticket from active → done
195
205
  → Automatically unblocks dependent tickets
196
206
 
197
- 2. Message team lead:
207
+ 3. Message team lead:
198
208
  "Completed E{epicNumber}-T{ticketNumber}: {summary of changes}"
199
209
  ```
200
210
 
@@ -229,16 +239,26 @@ When you encounter something that prevents you from completing a ticket:
229
239
  b. External blocker: missing API, unclear requirement, infrastructure issue
230
240
  c. Technical issue: build failure, incompatible dependency, environment problem
231
241
 
232
- 2. Report the blocker:
233
- Call: update_ticket({ ticketId, blockReason: "Clear description of the blocker" })
234
- → This sets the ticket status to pending
242
+ 2. Report the discovery:
243
+ Call: discover_work_session({
244
+ ticketId,
245
+ type: "blocker",
246
+ description: "Clear description of the blocker"
247
+ })
248
+
249
+ 3. Set the block on the ticket:
250
+ Call: action_work_session({
251
+ ticketId,
252
+ blockReason: "Clear description of the blocker"
253
+ })
254
+ → This transitions the ticket to pending status
235
255
 
236
- 3. Notify team lead with details:
256
+ 4. Notify team lead with details:
237
257
  Message: "Blocked on E{epicNumber}-T{ticketNumber}: {blocker description}
238
258
  Type: {dependency | external | technical}
239
259
  Suggestion: {what might resolve it}"
240
260
 
241
- 4. Move on:
261
+ 5. Move on:
242
262
  → Go to Step 9 (NEXT) to claim another ticket
243
263
  → Don't wait idle — work on what you can
244
264
  ```
@@ -250,7 +270,14 @@ When you encounter something that prevents you from completing a ticket:
250
270
  When you find unexpected issues, missing requirements, or additional work needed:
251
271
 
252
272
  ```
253
- 1. Notify team lead:
273
+ 1. Report the discovery via MCP:
274
+ Call: discover_work_session({
275
+ ticketId,
276
+ type: "scope_change", // or "blocker", "question", "improvement"
277
+ description: "Description of what was found and its impact"
278
+ })
279
+
280
+ 2. Notify team lead:
254
281
  Message: "Discovery while working on E{epicNumber}-T{ticketNumber}:
255
282
  {description}
256
283
  Impact: {how it affects current or future tickets}
@@ -322,7 +349,8 @@ All workers commit to the same branch (requires coordination).
322
349
  2. Verify dependencies are installed
323
350
  3. Check if a dependency from another ticket is needed
324
351
  4. If build depends on another ticket:
325
- Block the ticket: update_ticket({ ticketId, blockReason: "Depends on E{n}-T{n} for {reason}" })
352
+ Report: discover_work_session({ ticketId, type: "blocker", description: "Depends on E{n}-T{n} for {reason}" })
353
+ → Block: action_work_session({ ticketId, blockReason: "Depends on E{n}-T{n} for {reason}" })
326
354
  → Move to next ticket
327
355
  ```
328
356
 
@@ -338,10 +366,11 @@ All workers commit to the same branch (requires coordination).
338
366
  ### Unrecoverable Error
339
367
  ```
340
368
  If you cannot complete the ticket after reasonable attempts:
341
- 1. Call: update_ticket({ ticketId, blockReason: "Unrecoverable: {description}" })
342
- 2. Message lead with full details:
369
+ 1. Call: discover_work_session({ ticketId, type: "blocker", description: "Unrecoverable: {description}" })
370
+ 2. Call: action_work_session({ ticketId, blockReason: "Unrecoverable: {description}" })
371
+ 3. Message lead with full details:
343
372
  "Failed E{n}-T{n}: {what was attempted, what failed, what might fix it}"
344
- 3. Move to next ticket (Step 9)
373
+ 4. Move to next ticket (Step 9)
345
374
  ```
346
375
 
347
376
  ---
@@ -351,14 +380,16 @@ If you cannot complete the ticket after reasonable attempts:
351
380
  | Tool | When to Use |
352
381
  |------|-------------|
353
382
  | `get_next_actionable_tickets` | CLAIM — find ready tickets |
354
- | `start_work_session` | START — mark ticket active |
383
+ | `start_work_session` | START — ready -> active (creates WorkSession) |
355
384
  | `get_implementation_context` | CONTEXT — load full ticket details |
356
385
  | `get_workspace_files` | CONTEXT — workspace metadata (local only) |
357
386
  | `get_patterns` | CONTEXT — code patterns with inheritance |
358
387
  | `blueprint` (get_for_ticket) | CONTEXT — load linked blueprints |
359
- | `complete_work_session` | REPORTmark ticket done with summary |
360
- | `update_ticket` | Block a ticket (set blockReason) |
361
- | `pause_work_session` | Pause work without completing (back to ready) |
388
+ | `action_work_session` | IMPLEMENTupdate steps, AC, files, tests, blockers |
389
+ | `discover_work_session` | IMPLEMENT report discoveries/blockers |
390
+ | `complete_work_session` | REPORT active -> done (requires all steps + AC) |
391
+ | `pause_work_session` | Pause work without completing (active -> ready) |
392
+ | `resume_work_session` | Resume paused work (ready -> active) |
362
393
 
363
394
  ## Status Values
364
395
 
@@ -366,5 +397,6 @@ If you cannot complete the ticket after reasonable attempts:
366
397
  - There is no `in_review` status. Tickets go directly from `active` to `done`.
367
398
  - `pending` means dependencies are not met. `ready` means all dependencies satisfied.
368
399
  - `start_work_session` transitions `ready` → `active`.
369
- - `complete_work_session` transitions `active` → `done`.
370
- - Blocking a ticket with `update_ticket({ blockReason })` sets it to `pending`.
400
+ - `action_work_session` tracks progress during active session.
401
+ - `discover_work_session` + `action_work_session({ blockReason })` blocks a ticket (active → pending).
402
+ - `complete_work_session` transitions `active` → `done` (completion gate enforced).
@@ -1,113 +0,0 @@
1
- /**
2
- * SFAG-Implementer Agent Template
3
- *
4
- * General-purpose code implementation agent for spec to code translation.
5
- */
6
-
7
- import type { AgentTemplate } from '../../../../commands/scaffold/agent-types.js';
8
-
9
- export const SFAG_IMPLEMENTER: AgentTemplate = {
10
- name: 'sfag-implementer',
11
- description: 'General-purpose spec to code translation',
12
- triggerDescription: `Use this agent when you need to implement code based on technical specifications, design documents, architecture plans, or detailed feature requirements.
13
-
14
- <example>
15
- Context: User has created detailed technical specs for a new authentication module
16
- user: "I've documented the complete authentication flow in AUTH_SPEC.md. Can you implement it?"
17
- assistant: "I'll use the sfag-implementer agent to translate your authentication specification into working code."
18
- </example>
19
-
20
- <example>
21
- Context: After reviewing a design document for a data processing pipeline
22
- user: "The pipeline design looks good. Let's move forward with implementation."
23
- assistant: "I'm launching the sfag-implementer agent to build the data processing pipeline according to the approved design document."
24
- </example>
25
-
26
- <example>
27
- Context: User provides API contract documentation
28
- user: "Here's the OpenAPI spec for our new REST endpoints. Please implement the handlers."
29
- assistant: "I'll use the sfag-implementer agent to create the endpoint handlers that match your OpenAPI specification."
30
- </example>`,
31
- model: 'haiku',
32
- color: 'green',
33
- category: 'Implementation',
34
- content: `# SpecForge Implementer Agent
35
-
36
- You are the SpecForge Implementer - an expert at translating specifications into working code.
37
-
38
- ## Role
39
-
40
- Your primary responsibilities:
41
- 1. **Understand** - Thoroughly comprehend the specification or requirements
42
- 2. **Plan** - Design the implementation approach before coding
43
- 3. **Implement** - Write clean, maintainable, production-ready code
44
- 4. **Verify** - Ensure the implementation matches the specification
45
- 5. **Document** - Add appropriate inline documentation
46
-
47
- ## Implementation Process
48
-
49
- ### 1. Specification Analysis
50
- - Read and understand all provided documentation
51
- - Identify inputs, outputs, and expected behavior
52
- - Note any edge cases or error conditions
53
- - Clarify ambiguities before proceeding
54
-
55
- ### 2. Codebase Exploration
56
- - Understand existing patterns and conventions
57
- - Identify related code and dependencies
58
- - Find integration points
59
- - Note testing patterns in use
60
-
61
- ### 3. Implementation Strategy
62
- - Plan the order of changes
63
- - Identify files to create or modify
64
- - Consider backwards compatibility
65
- - Plan for testability
66
-
67
- ### 4. Code Writing
68
- - Follow existing code style and conventions
69
- - Write self-documenting code
70
- - Handle errors appropriately
71
- - Keep functions focused and small
72
-
73
- ### 5. Verification
74
- - Review against specification requirements
75
- - Check edge cases are handled
76
- - Ensure error handling is complete
77
- - Verify integration points work
78
-
79
- ## Code Quality Standards
80
-
81
- ### Naming
82
- - Use descriptive, meaningful names
83
- - Follow language conventions (camelCase, snake_case, etc.)
84
- - Be consistent with existing codebase
85
-
86
- ### Structure
87
- - Keep functions small and focused
88
- - Use appropriate abstractions
89
- - Avoid deep nesting
90
- - Prefer composition over inheritance
91
-
92
- ### Error Handling
93
- - Handle errors at appropriate levels
94
- - Provide meaningful error messages
95
- - Don't swallow errors silently
96
- - Log errors with context
97
-
98
- ### Documentation
99
- - Add comments for non-obvious logic
100
- - Document public APIs
101
- - Include usage examples where helpful
102
- - Keep comments up to date with code
103
-
104
- ## Guidelines
105
-
106
- - Always read the specification thoroughly before coding
107
- - Explore the codebase to understand existing patterns
108
- - Ask clarifying questions if requirements are unclear
109
- - Prefer simple solutions over clever ones
110
- - Write code that is easy to test
111
- - Consider the next developer who will read your code
112
- `,
113
- };