@specforge/mcp 3.0.7 → 3.1.1

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 (196) hide show
  1. package/dist/autopilot/agents/agent-runner.d.ts.map +1 -1
  2. package/dist/autopilot/agents/agent-runner.js +7 -0
  3. package/dist/autopilot/agents/agent-runner.js.map +1 -1
  4. package/dist/autopilot/api/autopilot-api-client.d.ts +5 -4
  5. package/dist/autopilot/api/autopilot-api-client.d.ts.map +1 -1
  6. package/dist/autopilot/api/autopilot-api-client.js +21 -26
  7. package/dist/autopilot/api/autopilot-api-client.js.map +1 -1
  8. package/dist/autopilot/cli/run.d.ts.map +1 -1
  9. package/dist/autopilot/cli/run.js +28 -0
  10. package/dist/autopilot/cli/run.js.map +1 -1
  11. package/dist/autopilot/core/dependency-resolver.d.ts +10 -1
  12. package/dist/autopilot/core/dependency-resolver.d.ts.map +1 -1
  13. package/dist/autopilot/core/dependency-resolver.js +27 -1
  14. package/dist/autopilot/core/dependency-resolver.js.map +1 -1
  15. package/dist/autopilot/core/dispatcher.d.ts +26 -0
  16. package/dist/autopilot/core/dispatcher.d.ts.map +1 -1
  17. package/dist/autopilot/core/dispatcher.js +116 -6
  18. package/dist/autopilot/core/dispatcher.js.map +1 -1
  19. package/dist/autopilot/readiness/aggregation.d.ts +56 -0
  20. package/dist/autopilot/readiness/aggregation.d.ts.map +1 -0
  21. package/dist/autopilot/readiness/aggregation.js +94 -0
  22. package/dist/autopilot/readiness/aggregation.js.map +1 -0
  23. package/dist/autopilot/readiness/config.d.ts +15 -0
  24. package/dist/autopilot/readiness/config.d.ts.map +1 -0
  25. package/dist/autopilot/readiness/config.js +76 -0
  26. package/dist/autopilot/readiness/config.js.map +1 -0
  27. package/dist/autopilot/readiness/index.d.ts +16 -0
  28. package/dist/autopilot/readiness/index.d.ts.map +1 -0
  29. package/dist/autopilot/readiness/index.js +11 -0
  30. package/dist/autopilot/readiness/index.js.map +1 -0
  31. package/dist/autopilot/readiness/post-scoring.d.ts +28 -0
  32. package/dist/autopilot/readiness/post-scoring.d.ts.map +1 -0
  33. package/dist/autopilot/readiness/post-scoring.js +41 -0
  34. package/dist/autopilot/readiness/post-scoring.js.map +1 -0
  35. package/dist/autopilot/readiness/preflight.d.ts +36 -0
  36. package/dist/autopilot/readiness/preflight.d.ts.map +1 -0
  37. package/dist/autopilot/readiness/preflight.js +93 -0
  38. package/dist/autopilot/readiness/preflight.js.map +1 -0
  39. package/dist/autopilot/readiness/prompt-section.d.ts +19 -0
  40. package/dist/autopilot/readiness/prompt-section.d.ts.map +1 -0
  41. package/dist/autopilot/readiness/prompt-section.js +33 -0
  42. package/dist/autopilot/readiness/prompt-section.js.map +1 -0
  43. package/dist/autopilot/readiness/types.d.ts +25 -0
  44. package/dist/autopilot/readiness/types.d.ts.map +1 -0
  45. package/dist/autopilot/readiness/types.js +8 -0
  46. package/dist/autopilot/readiness/types.js.map +1 -0
  47. package/dist/autopilot/sync/sync-manager.d.ts.map +1 -1
  48. package/dist/autopilot/sync/sync-manager.js +2 -1
  49. package/dist/autopilot/sync/sync-manager.js.map +1 -1
  50. package/dist/autopilot/types.d.ts +28 -0
  51. package/dist/autopilot/types.d.ts.map +1 -1
  52. package/dist/autopilot/types.js.map +1 -1
  53. package/dist/cli/commands/index.d.ts +5 -0
  54. package/dist/cli/commands/index.d.ts.map +1 -1
  55. package/dist/cli/commands/index.js +5 -0
  56. package/dist/cli/commands/index.js.map +1 -1
  57. package/dist/cli/commands/init.d.ts.map +1 -1
  58. package/dist/cli/commands/init.js +184 -2
  59. package/dist/cli/commands/init.js.map +1 -1
  60. package/dist/cli/commands/init.types.d.ts +37 -0
  61. package/dist/cli/commands/init.types.d.ts.map +1 -1
  62. package/dist/cli/commands/init.types.js +18 -0
  63. package/dist/cli/commands/init.types.js.map +1 -1
  64. package/dist/cli/commands/plan.d.ts +18 -0
  65. package/dist/cli/commands/plan.d.ts.map +1 -0
  66. package/dist/cli/commands/plan.js +154 -0
  67. package/dist/cli/commands/plan.js.map +1 -0
  68. package/dist/cli/commands/plan.types.d.ts +60 -0
  69. package/dist/cli/commands/plan.types.d.ts.map +1 -0
  70. package/dist/cli/commands/plan.types.js +8 -0
  71. package/dist/cli/commands/plan.types.js.map +1 -0
  72. package/dist/cli/commands/review-implementation.d.ts +16 -0
  73. package/dist/cli/commands/review-implementation.d.ts.map +1 -0
  74. package/dist/cli/commands/review-implementation.js +226 -0
  75. package/dist/cli/commands/review-implementation.js.map +1 -0
  76. package/dist/cli/commands/review-planning.d.ts +15 -0
  77. package/dist/cli/commands/review-planning.d.ts.map +1 -0
  78. package/dist/cli/commands/review-planning.js +177 -0
  79. package/dist/cli/commands/review-planning.js.map +1 -0
  80. package/dist/cli/commands/score/display.d.ts +20 -0
  81. package/dist/cli/commands/score/display.d.ts.map +1 -0
  82. package/dist/cli/commands/score/display.js +111 -0
  83. package/dist/cli/commands/score/display.js.map +1 -0
  84. package/dist/cli/commands/score/index.d.ts +9 -0
  85. package/dist/cli/commands/score/index.d.ts.map +1 -0
  86. package/dist/cli/commands/score/index.js +12 -0
  87. package/dist/cli/commands/score/index.js.map +1 -0
  88. package/dist/cli/commands/score/score.d.ts +17 -0
  89. package/dist/cli/commands/score/score.d.ts.map +1 -0
  90. package/dist/cli/commands/score/score.js +144 -0
  91. package/dist/cli/commands/score/score.js.map +1 -0
  92. package/dist/cli/commands/score/types.d.ts +79 -0
  93. package/dist/cli/commands/score/types.d.ts.map +1 -0
  94. package/dist/cli/commands/score/types.js +51 -0
  95. package/dist/cli/commands/score/types.js.map +1 -0
  96. package/dist/cli/commands/spec-activate.d.ts +29 -0
  97. package/dist/cli/commands/spec-activate.d.ts.map +1 -0
  98. package/dist/cli/commands/spec-activate.js +155 -0
  99. package/dist/cli/commands/spec-activate.js.map +1 -0
  100. package/dist/cli/commands/spec-activate.types.d.ts +24 -0
  101. package/dist/cli/commands/spec-activate.types.d.ts.map +1 -0
  102. package/dist/cli/commands/spec-activate.types.js +8 -0
  103. package/dist/cli/commands/spec-activate.types.js.map +1 -0
  104. package/dist/cli/commands/status.d.ts.map +1 -1
  105. package/dist/cli/commands/status.js +89 -1
  106. package/dist/cli/commands/status.js.map +1 -1
  107. package/dist/cli/commands/status.types.d.ts +2 -0
  108. package/dist/cli/commands/status.types.d.ts.map +1 -1
  109. package/dist/cli/commands/status.types.js.map +1 -1
  110. package/dist/cli/config/agent-teams.types.d.ts +194 -0
  111. package/dist/cli/config/agent-teams.types.d.ts.map +1 -0
  112. package/dist/cli/config/agent-teams.types.js +36 -0
  113. package/dist/cli/config/agent-teams.types.js.map +1 -0
  114. package/dist/cli/config/index.d.ts +2 -0
  115. package/dist/cli/config/index.d.ts.map +1 -1
  116. package/dist/cli/config/index.js +2 -0
  117. package/dist/cli/config/index.js.map +1 -1
  118. package/dist/cli/config/loader.d.ts +36 -2
  119. package/dist/cli/config/loader.d.ts.map +1 -1
  120. package/dist/cli/config/loader.js +65 -0
  121. package/dist/cli/config/loader.js.map +1 -1
  122. package/dist/cli/config/validation.d.ts +69 -0
  123. package/dist/cli/config/validation.d.ts.map +1 -0
  124. package/dist/cli/config/validation.js +295 -0
  125. package/dist/cli/config/validation.js.map +1 -0
  126. package/dist/cli/config/writer.d.ts +39 -0
  127. package/dist/cli/config/writer.d.ts.map +1 -1
  128. package/dist/cli/config/writer.js +58 -0
  129. package/dist/cli/config/writer.js.map +1 -1
  130. package/dist/cli/index.d.ts.map +1 -1
  131. package/dist/cli/index.js +10 -8
  132. package/dist/cli/index.js.map +1 -1
  133. package/dist/lib/index.d.ts +3 -0
  134. package/dist/lib/index.d.ts.map +1 -1
  135. package/dist/lib/index.js +3 -0
  136. package/dist/lib/index.js.map +1 -1
  137. package/dist/lib/monorepo-detector.d.ts +31 -0
  138. package/dist/lib/monorepo-detector.d.ts.map +1 -0
  139. package/dist/lib/monorepo-detector.js +271 -0
  140. package/dist/lib/monorepo-detector.js.map +1 -0
  141. package/dist/lib/prompt-generator.d.ts +65 -0
  142. package/dist/lib/prompt-generator.d.ts.map +1 -0
  143. package/dist/lib/prompt-generator.js +174 -0
  144. package/dist/lib/prompt-generator.js.map +1 -0
  145. package/dist/lib/strategy-analyzer.d.ts +59 -0
  146. package/dist/lib/strategy-analyzer.d.ts.map +1 -0
  147. package/dist/lib/strategy-analyzer.js +137 -0
  148. package/dist/lib/strategy-analyzer.js.map +1 -0
  149. package/dist/tools/core/context-helper.d.ts +22 -0
  150. package/dist/tools/core/context-helper.d.ts.map +1 -1
  151. package/dist/tools/core/context-helper.js +37 -1
  152. package/dist/tools/core/context-helper.js.map +1 -1
  153. package/dist/tools/core/workspace-files.d.ts +49 -0
  154. package/dist/tools/core/workspace-files.d.ts.map +1 -0
  155. package/dist/tools/core/workspace-files.js +259 -0
  156. package/dist/tools/core/workspace-files.js.map +1 -0
  157. package/dist/tools/index.d.ts.map +1 -1
  158. package/dist/tools/index.js +147 -0
  159. package/dist/tools/index.js.map +1 -1
  160. package/package.json +3 -2
  161. package/src/cli/templates/agents/content/core/sfag-implementer.ts +113 -0
  162. package/src/cli/templates/agents/content/core/sfag-orchestrator.ts +107 -0
  163. package/src/cli/templates/agents/content/core/sfag-spec-creator.ts +126 -0
  164. package/src/cli/templates/agents/content/core/sfag-ticket-implementer.ts +132 -0
  165. package/src/cli/templates/agents/content/research/sfag-package-researcher.ts +153 -0
  166. package/src/cli/templates/agents/content/task-type/sfag-api-implementer.ts +132 -0
  167. package/src/cli/templates/agents/content/task-type/sfag-docs-writer.ts +183 -0
  168. package/src/cli/templates/agents/content/task-type/sfag-frontend-builder.ts +141 -0
  169. package/src/cli/templates/agents/content/task-type/sfag-infra-architect.ts +149 -0
  170. package/src/cli/templates/agents/content/task-type/sfag-schema-designer.ts +132 -0
  171. package/src/cli/templates/agents/content/task-type/sfag-test-writer.ts +171 -0
  172. package/src/cli/templates/agents/index.ts +74 -0
  173. package/src/cli/templates/commands.ts +179 -0
  174. package/src/cli/templates/content/sf-autonomous.ts +78 -0
  175. package/src/cli/templates/content/sf-blockers.ts +68 -0
  176. package/src/cli/templates/content/sf-commit.ts +78 -0
  177. package/src/cli/templates/content/sf-context.ts +64 -0
  178. package/src/cli/templates/content/sf-create-epics.ts +129 -0
  179. package/src/cli/templates/content/sf-create-spec.ts +136 -0
  180. package/src/cli/templates/content/sf-create-tickets.ts +148 -0
  181. package/src/cli/templates/content/sf-epic.ts +69 -0
  182. package/src/cli/templates/content/sf-help.ts +61 -0
  183. package/src/cli/templates/content/sf-import.ts +88 -0
  184. package/src/cli/templates/content/sf-init.ts +61 -0
  185. package/src/cli/templates/content/sf-next.ts +67 -0
  186. package/src/cli/templates/content/sf-reset.ts +78 -0
  187. package/src/cli/templates/content/sf-review.ts +67 -0
  188. package/src/cli/templates/content/sf-search.ts +64 -0
  189. package/src/cli/templates/content/sf-status.ts +67 -0
  190. package/src/cli/templates/content/sf-ticket.ts +76 -0
  191. package/src/cli/templates/content/sf-validate.ts +78 -0
  192. package/src/cli/templates/index.ts +16 -0
  193. package/src/cli/templates/skills/specforge-conventions.md +109 -0
  194. package/src/cli/templates/skills/specforge-orchestrator.md +401 -0
  195. package/src/cli/templates/skills/specforge-validator.md +122 -0
  196. package/src/cli/templates/skills/specforge-worker.md +378 -0
@@ -0,0 +1,259 @@
1
+ // mcp/src/tools/core/workspace-files.ts
2
+ /**
3
+ * Workspace Files Tool
4
+ *
5
+ * Local filesystem operation that returns workspace metadata needed by workers.
6
+ * Given a workspace path (or auto-detected from project root), returns parsed
7
+ * configuration files, framework detection, and key dependency information.
8
+ *
9
+ * NOTE: This runs locally in the MCP server (stdio transport). It requires
10
+ * filesystem access and will not work over SSE/cloud transports.
11
+ */
12
+ import * as fs from 'node:fs';
13
+ import * as path from 'node:path';
14
+ import { findProjectRoot } from '../../cli/config/paths.js';
15
+ // ============================================================================
16
+ // Framework detection mapping
17
+ // ============================================================================
18
+ const FRAMEWORK_DETECTION = {
19
+ 'next': 'Next.js',
20
+ 'nuxt': 'Nuxt',
21
+ '@nestjs/core': 'NestJS',
22
+ 'express': 'Express',
23
+ 'fastify': 'Fastify',
24
+ '@angular/core': 'Angular',
25
+ 'react': 'React',
26
+ 'vue': 'Vue',
27
+ 'svelte': 'Svelte',
28
+ '@remix-run/react': 'Remix',
29
+ 'gatsby': 'Gatsby',
30
+ 'hono': 'Hono',
31
+ 'elysia': 'Elysia',
32
+ };
33
+ /**
34
+ * Well-known dependencies that are useful context for workers.
35
+ * Only included if present in the workspace.
36
+ */
37
+ const KEY_DEPENDENCY_NAMES = new Set([
38
+ // Frameworks
39
+ 'next', 'react', 'react-dom', 'vue', 'angular', 'svelte', 'express', 'fastify', '@nestjs/core',
40
+ // State management
41
+ 'redux', '@reduxjs/toolkit', 'zustand', 'mobx', 'jotai', 'recoil',
42
+ // UI
43
+ '@mui/material', '@chakra-ui/react', 'tailwindcss', 'styled-components', '@emotion/react',
44
+ // Data fetching
45
+ 'axios', '@tanstack/react-query', 'swr', '@apollo/client', 'graphql',
46
+ // Database
47
+ 'prisma', '@prisma/client', 'drizzle-orm', 'typeorm', 'sequelize', 'mongoose', 'knex',
48
+ // Auth
49
+ 'next-auth', 'passport', 'jsonwebtoken', '@auth/core',
50
+ // Testing
51
+ 'jest', 'vitest', '@testing-library/react', 'playwright', 'cypress', 'mocha',
52
+ // AWS
53
+ 'aws-amplify', '@aws-sdk/client-s3', '@aws-sdk/client-dynamodb', 'aws-cdk-lib',
54
+ // Build tools
55
+ 'typescript', 'vite', 'webpack', 'esbuild', 'turbo',
56
+ // Linting
57
+ 'eslint', 'prettier', 'biome',
58
+ ]);
59
+ // ============================================================================
60
+ // Implementation
61
+ // ============================================================================
62
+ /**
63
+ * Read and parse a JSON file. Returns null if file is missing or invalid.
64
+ */
65
+ function readJsonFile(filePath) {
66
+ try {
67
+ const content = fs.readFileSync(filePath, 'utf-8');
68
+ return JSON.parse(content);
69
+ }
70
+ catch {
71
+ return null;
72
+ }
73
+ }
74
+ /**
75
+ * Read a text file. Returns null if file is missing.
76
+ */
77
+ function readTextFile(filePath) {
78
+ try {
79
+ return fs.readFileSync(filePath, 'utf-8');
80
+ }
81
+ catch {
82
+ return null;
83
+ }
84
+ }
85
+ /**
86
+ * Read the first N lines of a text file. Returns null if file is missing.
87
+ */
88
+ function readFirstLines(filePath, maxLines) {
89
+ try {
90
+ const content = fs.readFileSync(filePath, 'utf-8');
91
+ const lines = content.split('\n').slice(0, maxLines);
92
+ return lines.join('\n');
93
+ }
94
+ catch {
95
+ return null;
96
+ }
97
+ }
98
+ /**
99
+ * Detect framework from dependencies.
100
+ * Checks in priority order (more specific frameworks first).
101
+ */
102
+ function detectFramework(deps) {
103
+ for (const [pkg, name] of Object.entries(FRAMEWORK_DETECTION)) {
104
+ if (pkg in deps) {
105
+ return name;
106
+ }
107
+ }
108
+ return null;
109
+ }
110
+ /**
111
+ * Extract key dependencies from package.json deps/devDeps.
112
+ */
113
+ function extractKeyDependencies(deps, devDeps) {
114
+ const result = {};
115
+ const all = { ...deps, ...devDeps };
116
+ for (const [name, version] of Object.entries(all)) {
117
+ if (KEY_DEPENDENCY_NAMES.has(name)) {
118
+ result[name] = version;
119
+ }
120
+ }
121
+ return result;
122
+ }
123
+ /**
124
+ * Check if the workspace has tests by looking at scripts and directories.
125
+ */
126
+ function detectHasTests(workspacePath, scripts) {
127
+ // Check for test script
128
+ if (scripts.test && scripts.test !== 'echo "Error: no test specified" && exit 1') {
129
+ return true;
130
+ }
131
+ // Check for common test directories
132
+ const testDirs = ['__tests__', 'test', 'tests', 'spec'];
133
+ for (const dir of testDirs) {
134
+ const dirPath = path.join(workspacePath, dir);
135
+ try {
136
+ if (fs.statSync(dirPath).isDirectory()) {
137
+ return true;
138
+ }
139
+ }
140
+ catch {
141
+ // Directory doesn't exist
142
+ }
143
+ }
144
+ // Check for test files in src
145
+ const srcDir = path.join(workspacePath, 'src');
146
+ try {
147
+ if (fs.statSync(srcDir).isDirectory()) {
148
+ const srcTestDir = path.join(srcDir, '__tests__');
149
+ if (fs.statSync(srcTestDir).isDirectory()) {
150
+ return true;
151
+ }
152
+ }
153
+ }
154
+ catch {
155
+ // Directory doesn't exist
156
+ }
157
+ return false;
158
+ }
159
+ /**
160
+ * Get workspace metadata for a given directory path.
161
+ *
162
+ * @param args.workspacePath - Path to the workspace (absolute or relative to projectRoot)
163
+ * @param args.projectRoot - Optional project root for resolving relative paths
164
+ * @returns Structured workspace metadata
165
+ */
166
+ export async function getWorkspaceFiles(args) {
167
+ let workspacePath = args.workspacePath;
168
+ const projectRoot = args.projectRoot || findProjectRoot() || process.cwd();
169
+ // Resolve workspace path
170
+ if (workspacePath) {
171
+ workspacePath = path.resolve(projectRoot, workspacePath);
172
+ }
173
+ else {
174
+ workspacePath = projectRoot;
175
+ }
176
+ // Verify directory exists
177
+ try {
178
+ const stat = fs.statSync(workspacePath);
179
+ if (!stat.isDirectory()) {
180
+ throw new Error(`Path is not a directory: ${workspacePath}`);
181
+ }
182
+ }
183
+ catch (err) {
184
+ if (err.code === 'ENOENT') {
185
+ throw new Error(`Workspace directory not found: ${workspacePath}`);
186
+ }
187
+ throw err;
188
+ }
189
+ // Read package.json
190
+ const pkgJsonPath = path.join(workspacePath, 'package.json');
191
+ const rawPkg = readJsonFile(pkgJsonPath);
192
+ let packageJson = null;
193
+ let name = null;
194
+ let framework = null;
195
+ let scripts = {};
196
+ let deps = {};
197
+ let devDeps = {};
198
+ let keyDependencies = {};
199
+ if (rawPkg) {
200
+ name = rawPkg.name || null;
201
+ scripts = rawPkg.scripts || {};
202
+ deps = rawPkg.dependencies || {};
203
+ devDeps = rawPkg.devDependencies || {};
204
+ packageJson = {
205
+ name: name || '',
206
+ version: rawPkg.version,
207
+ scripts,
208
+ dependencies: deps,
209
+ devDependencies: devDeps,
210
+ };
211
+ framework = detectFramework({ ...deps, ...devDeps });
212
+ keyDependencies = extractKeyDependencies(deps, devDeps);
213
+ }
214
+ // Read tsconfig.json
215
+ const tsconfigPath = path.join(workspacePath, 'tsconfig.json');
216
+ const rawTsConfig = readJsonFile(tsconfigPath);
217
+ let tsConfig = null;
218
+ if (rawTsConfig) {
219
+ const compilerOptions = rawTsConfig.compilerOptions || null;
220
+ const paths = compilerOptions?.paths;
221
+ tsConfig = {
222
+ compilerOptions,
223
+ paths: paths || null,
224
+ };
225
+ }
226
+ // Read README.md (first 50 lines)
227
+ const readmePath = path.join(workspacePath, 'README.md');
228
+ const readme = readFirstLines(readmePath, 50);
229
+ // Read .env.example
230
+ const envExamplePath = path.join(workspacePath, '.env.example');
231
+ const envExample = readTextFile(envExamplePath);
232
+ // Detect test/lint/typecheck commands
233
+ const hasTests = detectHasTests(workspacePath, scripts);
234
+ const testCommand = scripts.test || null;
235
+ const lintCommand = scripts.lint || null;
236
+ const buildCommand = scripts.build || null;
237
+ // Detect typecheck command
238
+ let typecheckCommand = scripts.typecheck || scripts['type-check'] || null;
239
+ if (!typecheckCommand && rawTsConfig) {
240
+ // If tsconfig exists but no typecheck script, suggest one
241
+ typecheckCommand = 'npx tsc --noEmit';
242
+ }
243
+ return {
244
+ path: workspacePath,
245
+ name,
246
+ framework,
247
+ hasTests,
248
+ testCommand,
249
+ lintCommand,
250
+ typecheckCommand,
251
+ buildCommand,
252
+ packageJson,
253
+ tsConfig,
254
+ readme,
255
+ envExample,
256
+ keyDependencies,
257
+ };
258
+ }
259
+ //# sourceMappingURL=workspace-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-files.js","sourceRoot":"","sources":["../../../src/tools/core/workspace-files.ts"],"names":[],"mappings":"AAAA,wCAAwC;AAExC;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAgD5D,+EAA+E;AAC/E,8BAA8B;AAC9B,+EAA+E;AAE/E,MAAM,mBAAmB,GAA2B;IAClD,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,MAAM;IACd,cAAc,EAAE,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AAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAC"}
@@ -22,6 +22,9 @@ import { createWorkflowGuideHandler } from './core/workflow-guide.js';
22
22
  import { blueprintTool, createBlueprintHandler } from './core/blueprint.js';
23
23
  import { WORKFLOW_TYPES } from '../lib/workflow-definitions.js';
24
24
  import { injectContext, injectContextRequired } from './core/context-helper.js';
25
+ import { getWorkspaceFiles } from './core/workspace-files.js';
26
+ import { detectMonorepo } from '../lib/monorepo-detector.js';
27
+ import { findProjectRoot } from '../cli/config/paths.js';
25
28
  /**
26
29
  * Get list of all available tools
27
30
  *
@@ -81,6 +84,9 @@ const READ_TOOL_NAMES = new Set([
81
84
  'get_working_context',
82
85
  // Job status
83
86
  'get_job_status',
87
+ // Agent Teams (read operations)
88
+ 'get_epic_dependency_graph',
89
+ 'get_implementation_plan',
84
90
  ]);
85
91
  /**
86
92
  * Add format parameter to a tool's input schema
@@ -2631,6 +2637,101 @@ At least one scope filter (projectId, specificationId, or epicId) is required.`,
2631
2637
  required: ['specificationId'],
2632
2638
  },
2633
2639
  },
2640
+ // ========================================================================
2641
+ // Agent Teams Operations
2642
+ // ========================================================================
2643
+ {
2644
+ name: 'get_epic_dependency_graph',
2645
+ description: 'Analyze cross-epic dependencies for a specification. Returns an epic-level dependency graph with topological phase ordering. Use this to understand which epics can run in parallel and which must be sequenced.',
2646
+ inputSchema: {
2647
+ type: 'object',
2648
+ properties: {
2649
+ specificationId: {
2650
+ type: 'string',
2651
+ description: 'The ID of the specification to analyze',
2652
+ },
2653
+ },
2654
+ required: ['specificationId'],
2655
+ },
2656
+ },
2657
+ {
2658
+ name: 'get_implementation_plan',
2659
+ description: 'Generate a team-worker mapping for parallel implementation of a specification. Analyzes the spec structure and produces teams (one per epic), execution phases, and suggested worker counts. Supports strategies: epic-as-team (multiple epics), spec-as-team (single epic, multiple workers), single-session (small scope).',
2660
+ inputSchema: {
2661
+ type: 'object',
2662
+ properties: {
2663
+ specificationId: {
2664
+ type: 'string',
2665
+ description: 'The ID of the specification to plan',
2666
+ },
2667
+ strategy: {
2668
+ type: 'string',
2669
+ enum: ['epic-as-team', 'spec-as-team', 'single-session', 'auto'],
2670
+ description: "Strategy for team formation. 'auto' (default) selects based on spec structure. 'epic-as-team' creates one team per epic. 'spec-as-team' creates a single team. 'single-session' for small sequential work.",
2671
+ default: 'auto',
2672
+ },
2673
+ maxWorkersPerTeam: {
2674
+ type: 'number',
2675
+ description: 'Maximum number of parallel workers per team (default: 3)',
2676
+ default: 3,
2677
+ },
2678
+ },
2679
+ required: ['specificationId'],
2680
+ },
2681
+ },
2682
+ {
2683
+ name: 'report_completion',
2684
+ description: "Report completion of an epic or specification. Updates the entity status to 'completed', stores the completion summary, and returns metrics. Supports partial completion (not all tickets/epics done). Idempotent: calling on an already-completed entity returns current state.",
2685
+ inputSchema: {
2686
+ type: 'object',
2687
+ properties: {
2688
+ entityType: {
2689
+ type: 'string',
2690
+ enum: ['epic', 'specification'],
2691
+ description: "Type of entity to mark as completed: 'epic' or 'specification'",
2692
+ },
2693
+ entityId: {
2694
+ type: 'string',
2695
+ description: 'The ID of the epic or specification to complete',
2696
+ },
2697
+ summary: {
2698
+ type: 'string',
2699
+ description: 'Completion summary describing what was accomplished',
2700
+ },
2701
+ metrics: {
2702
+ type: 'object',
2703
+ description: 'Optional completion metrics (auto-calculated from tickets if not provided)',
2704
+ properties: {
2705
+ completedTickets: { type: 'number', description: 'Number of tickets completed' },
2706
+ totalTickets: { type: 'number', description: 'Total number of tickets' },
2707
+ failedTickets: { type: 'number', description: 'Number of tickets that failed' },
2708
+ totalHours: { type: 'number', description: 'Total hours spent' },
2709
+ },
2710
+ },
2711
+ },
2712
+ required: ['entityType', 'entityId', 'summary'],
2713
+ },
2714
+ },
2715
+ // ========================================================================
2716
+ // Agent Teams - Workspace Files (Local-only)
2717
+ // ========================================================================
2718
+ {
2719
+ name: 'get_workspace_files',
2720
+ description: 'Get workspace metadata for agent workers. Returns parsed package.json, tsconfig.json, framework detection, key dependencies, and validation commands. Runs locally (requires stdio transport).',
2721
+ inputSchema: {
2722
+ type: 'object',
2723
+ properties: {
2724
+ workspacePath: {
2725
+ type: 'string',
2726
+ description: 'Path to the workspace directory (absolute or relative to project root). Defaults to project root if not provided.',
2727
+ },
2728
+ projectRoot: {
2729
+ type: 'string',
2730
+ description: 'Override project root for resolving relative workspacePath. Auto-detected from .specforge.json if not provided.',
2731
+ },
2732
+ },
2733
+ },
2734
+ },
2634
2735
  ];
2635
2736
  // Apply format parameter to all read operations
2636
2737
  return tools.map(tool => READ_TOOL_NAMES.has(tool.name) ? addFormatParameter(tool) : tool);
@@ -3750,6 +3851,52 @@ export function createToolHandlers(apiClient) {
3750
3851
  specificationId: args.specificationId,
3751
3852
  });
3752
3853
  },
3854
+ // ========================================================================
3855
+ // Agent Teams Operations
3856
+ // ========================================================================
3857
+ get_epic_dependency_graph: async (_client, args) => {
3858
+ validateRequired(args, 'specificationId');
3859
+ return await apiClient.call('get_epic_dependency_graph', {
3860
+ specificationId: args.specificationId,
3861
+ ...injectContext(args, ['specificationId']),
3862
+ });
3863
+ },
3864
+ get_implementation_plan: async (_client, args) => {
3865
+ validateRequired(args, 'specificationId');
3866
+ // Detect monorepo locally (local-only feature, graceful degradation)
3867
+ let monorepoInfo = null;
3868
+ try {
3869
+ const projectRoot = findProjectRoot();
3870
+ if (projectRoot) {
3871
+ monorepoInfo = detectMonorepo(projectRoot);
3872
+ }
3873
+ }
3874
+ catch {
3875
+ // Skip monorepo detection on failure
3876
+ }
3877
+ return await apiClient.call('get_implementation_plan', {
3878
+ specificationId: args.specificationId,
3879
+ strategy: args.strategy,
3880
+ maxWorkersPerTeam: args.maxWorkersPerTeam,
3881
+ monorepoInfo,
3882
+ ...injectContext(args, ['specificationId']),
3883
+ });
3884
+ },
3885
+ report_completion: async (_client, args) => {
3886
+ validateRequired(args, 'entityType', 'entityId', 'summary');
3887
+ return await apiClient.call('report_completion', {
3888
+ entityType: args.entityType,
3889
+ entityId: args.entityId,
3890
+ summary: args.summary,
3891
+ metrics: args.metrics,
3892
+ });
3893
+ },
3894
+ // ========================================================================
3895
+ // Agent Teams - Workspace Files (Local-only)
3896
+ // ========================================================================
3897
+ get_workspace_files: async (_client, args) => {
3898
+ return await getWorkspaceFiles(args);
3899
+ },
3753
3900
  };
3754
3901
  }
3755
3902
  /**