task-o-matic 0.0.6 → 0.0.8

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 (57) hide show
  1. package/README.md +86 -23
  2. package/dist/commands/benchmark.d.ts +3 -0
  3. package/dist/commands/benchmark.d.ts.map +1 -0
  4. package/dist/commands/benchmark.js +227 -0
  5. package/dist/commands/prd.d.ts.map +1 -1
  6. package/dist/commands/prd.js +203 -9
  7. package/dist/commands/workflow.d.ts.map +1 -1
  8. package/dist/commands/workflow.js +464 -286
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +2 -0
  11. package/dist/lib/ai-service/ai-operations.d.ts +5 -0
  12. package/dist/lib/ai-service/ai-operations.d.ts.map +1 -1
  13. package/dist/lib/ai-service/ai-operations.js +167 -0
  14. package/dist/lib/benchmark/registry.d.ts +11 -0
  15. package/dist/lib/benchmark/registry.d.ts.map +1 -0
  16. package/dist/lib/benchmark/registry.js +78 -0
  17. package/dist/lib/benchmark/runner.d.ts +6 -0
  18. package/dist/lib/benchmark/runner.d.ts.map +1 -0
  19. package/dist/lib/benchmark/runner.js +150 -0
  20. package/dist/lib/benchmark/storage.d.ts +13 -0
  21. package/dist/lib/benchmark/storage.d.ts.map +1 -0
  22. package/dist/lib/benchmark/storage.js +99 -0
  23. package/dist/lib/benchmark/types.d.ts +54 -0
  24. package/dist/lib/benchmark/types.d.ts.map +1 -0
  25. package/dist/lib/benchmark/types.js +2 -0
  26. package/dist/lib/index.d.ts +9 -0
  27. package/dist/lib/index.d.ts.map +1 -1
  28. package/dist/lib/index.js +7 -1
  29. package/dist/lib/prompt-registry.d.ts.map +1 -1
  30. package/dist/lib/prompt-registry.js +23 -0
  31. package/dist/prompts/index.d.ts +7 -6
  32. package/dist/prompts/index.d.ts.map +1 -1
  33. package/dist/prompts/index.js +1 -0
  34. package/dist/prompts/prd-question.d.ts +3 -0
  35. package/dist/prompts/prd-question.d.ts.map +1 -0
  36. package/dist/prompts/prd-question.js +40 -0
  37. package/dist/services/benchmark.d.ts +12 -0
  38. package/dist/services/benchmark.d.ts.map +1 -0
  39. package/dist/services/benchmark.js +18 -0
  40. package/dist/services/prd.d.ts +25 -0
  41. package/dist/services/prd.d.ts.map +1 -1
  42. package/dist/services/prd.js +188 -28
  43. package/dist/services/workflow.d.ts +85 -0
  44. package/dist/services/workflow.d.ts.map +1 -0
  45. package/dist/services/workflow.js +363 -0
  46. package/dist/types/index.d.ts +3 -0
  47. package/dist/types/index.d.ts.map +1 -1
  48. package/dist/types/options.d.ts +3 -1
  49. package/dist/types/options.d.ts.map +1 -1
  50. package/dist/types/options.js +16 -0
  51. package/dist/types/workflow-options.d.ts +45 -0
  52. package/dist/types/workflow-options.d.ts.map +1 -0
  53. package/dist/types/workflow-options.js +2 -0
  54. package/dist/types/workflow-results.d.ts +55 -0
  55. package/dist/types/workflow-results.d.ts.map +1 -0
  56. package/dist/types/workflow-results.js +2 -0
  57. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -26,6 +26,15 @@ export { TaskService } from "../services/tasks";
26
26
  * Handles PRD parsing, task extraction, and PRD improvement
27
27
  */
28
28
  export { PRDService } from "../services/prd";
29
+ /**
30
+ * WorkflowService - Complete workflow orchestration
31
+ * Handles project initialization, PRD management, task generation, and task splitting
32
+ */
33
+ export { WorkflowService } from "../services/workflow";
34
+ /**
35
+ * Result types for workflow service operations
36
+ */
37
+ export type { InitializeResult, DefinePRDResult, RefinePRDResult, GenerateTasksResult, SplitTasksResult, } from "../types/workflow-results";
29
38
  /**
30
39
  * Re-export all types from the types module
31
40
  * Includes Task, AIConfig, StreamingOptions, and all related interfaces
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM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E,MAAM,kBAAkB,CAAC;AAMjD;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D;;GAEG;AACH,OAAO,EACL,sBAAsB,EACtB,wCAAwC,GACzC,MAAM,4BAA4B,CAAC;AAMpC;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
package/dist/lib/index.js CHANGED
@@ -32,7 +32,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
32
32
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.runValidations = exports.isValidAIProvider = exports.createStreamingOptionsWithCustomHandlers = exports.createStreamingOptions = exports.formatStackInfo = exports.PromptBuilder = exports.ContextBuilder = exports.ModelProvider = exports.AIOperations = exports.configManager = exports.ConfigManager = exports.FileSystemStorage = exports.buildAIConfig = exports.resetServiceInstances = exports.getContextBuilder = exports.getStorage = exports.getModelProvider = exports.getAIOperations = exports.PRDService = exports.TaskService = void 0;
35
+ exports.runValidations = exports.isValidAIProvider = exports.createStreamingOptionsWithCustomHandlers = exports.createStreamingOptions = exports.formatStackInfo = exports.PromptBuilder = exports.ContextBuilder = exports.ModelProvider = exports.AIOperations = exports.configManager = exports.ConfigManager = exports.FileSystemStorage = exports.buildAIConfig = exports.resetServiceInstances = exports.getContextBuilder = exports.getStorage = exports.getModelProvider = exports.getAIOperations = exports.WorkflowService = exports.PRDService = exports.TaskService = void 0;
36
36
  // ============================================================================
37
37
  // Main Services - Business Logic Layer
38
38
  // ============================================================================
@@ -48,6 +48,12 @@ Object.defineProperty(exports, "TaskService", { enumerable: true, get: function
48
48
  */
49
49
  var prd_1 = require("../services/prd");
50
50
  Object.defineProperty(exports, "PRDService", { enumerable: true, get: function () { return prd_1.PRDService; } });
51
+ /**
52
+ * WorkflowService - Complete workflow orchestration
53
+ * Handles project initialization, PRD management, task generation, and task splitting
54
+ */
55
+ var workflow_1 = require("../services/workflow");
56
+ Object.defineProperty(exports, "WorkflowService", { enumerable: true, get: function () { return workflow_1.WorkflowService; } });
51
57
  // ============================================================================
52
58
  // Core Types - Type Definitions
53
59
  // ============================================================================
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-registry.d.ts","sourceRoot":"","sources":["../../src/lib/prompt-registry.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAC,OAAO,CAuInB;IAEH,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAI1D,MAAM,CAAC,aAAa,IAAI,cAAc,EAAE;IAIxC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,cAAc,EAAE;IAMlE,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIvC,MAAM,CAAC,WAAW,IAAI,MAAM;IAyC5B,MAAM,CAAC,cAAc,CACnB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC;QACD,KAAK,EAAE,OAAO,CAAC;QACf,eAAe,EAAE,MAAM,EAAE,CAAC;QAC1B,eAAe,EAAE,MAAM,EAAE,CAAC;KAC3B;CAuBF"}
1
+ {"version":3,"file":"prompt-registry.d.ts","sourceRoot":"","sources":["../../src/lib/prompt-registry.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAC,OAAO,CA8JnB;IAEH,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAI1D,MAAM,CAAC,aAAa,IAAI,cAAc,EAAE;IAIxC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,cAAc,EAAE;IAMlE,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIvC,MAAM,CAAC,WAAW,IAAI,MAAM;IAiD5B,MAAM,CAAC,cAAc,CACnB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC;QACD,KAAK,EAAE,OAAO,CAAC;QACf,eAAe,EAAE,MAAM,EAAE,CAAC;QAC1B,eAAe,EAAE,MAAM,EAAE,CAAC;KAC3B;CAuBF"}
@@ -131,6 +131,29 @@ class PromptRegistry {
131
131
  promptText: prompts_1.TASK_PLANNING_SYSTEM_PROMPT,
132
132
  },
133
133
  ],
134
+ // PRD Question Prompts
135
+ [
136
+ "prd-question",
137
+ {
138
+ name: "prd-question",
139
+ description: "Generate clarifying questions for PRD",
140
+ type: "user",
141
+ requiredVariables: ["PRD_CONTENT"],
142
+ optionalVariables: ["STACK_INFO"],
143
+ promptText: prompts_1.PRD_QUESTION_PROMPT,
144
+ },
145
+ ],
146
+ [
147
+ "prd-question-system",
148
+ {
149
+ name: "prd-question-system",
150
+ description: "System prompt for PRD questioning",
151
+ type: "system",
152
+ requiredVariables: [],
153
+ optionalVariables: [],
154
+ promptText: prompts_1.PRD_QUESTION_SYSTEM_PROMPT,
155
+ },
156
+ ],
134
157
  ]);
135
158
  static getPrompt(name) {
136
159
  return this.prompts.get(name);
@@ -1,7 +1,8 @@
1
- export * from './prd-parsing';
2
- export * from './task-breakdown';
3
- export * from './task-enhancement';
4
- export * from './prd-rework';
5
- export * from './documentation-detection';
6
- export * from './task-planning';
1
+ export * from "./prd-parsing";
2
+ export * from "./task-breakdown";
3
+ export * from "./task-enhancement";
4
+ export * from "./prd-rework";
5
+ export * from "./documentation-detection";
6
+ export * from "./task-planning";
7
+ export * from "./prd-question";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -20,3 +20,4 @@ __exportStar(require("./task-enhancement"), exports);
20
20
  __exportStar(require("./prd-rework"), exports);
21
21
  __exportStar(require("./documentation-detection"), exports);
22
22
  __exportStar(require("./task-planning"), exports);
23
+ __exportStar(require("./prd-question"), exports);
@@ -0,0 +1,3 @@
1
+ export declare const PRD_QUESTION_PROMPT = "\nAnalyze this PRD and generate meaningful clarifying questions to help improve its quality and completeness.\n\n## Current PRD:\n{PRD_CONTENT}\n\n## Project Technology Stack:\n{STACK_INFO}\n\nIdentify ambiguities, missing requirements, technical gaps, or potential conflicts.\nFocus on questions that will help:\n- Clarify user intent\n- Define edge cases\n- Specify technical implementation details aligned with the stack\n- Resolve potential architectural issues\n\nReturn a JSON object with a \"questions\" array, where each item is a string containing a question.\n";
2
+ export declare const PRD_QUESTION_SYSTEM_PROMPT = "\nYou are an expert Product Manager and Technical Architect. Your goal is to analyze Product Requirements Documents (PRDs) and ask insightful questions to clarify requirements and ensure technical feasibility.\n\nOutput Format:\nYou must return a valid JSON object with the following structure:\n{\n \"questions\": [\n \"Question 1?\",\n \"Question 2?\",\n ...\n ]\n}\n\nGuidelines:\n1. Ask 3-5 most critical questions. Do not overwhelm the user.\n2. Focus on \"what\" and \"why\" rather than \"how\" unless it affects feasibility.\n3. Be specific and reference parts of the PRD.\n4. Consider the technology stack constraints.\n";
3
+ //# sourceMappingURL=prd-question.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prd-question.d.ts","sourceRoot":"","sources":["../../src/prompts/prd-question.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,+jBAiB/B,CAAC;AAEF,eAAO,MAAM,0BAA0B,ooBAkBtC,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRD_QUESTION_SYSTEM_PROMPT = exports.PRD_QUESTION_PROMPT = void 0;
4
+ exports.PRD_QUESTION_PROMPT = `
5
+ Analyze this PRD and generate meaningful clarifying questions to help improve its quality and completeness.
6
+
7
+ ## Current PRD:
8
+ {PRD_CONTENT}
9
+
10
+ ## Project Technology Stack:
11
+ {STACK_INFO}
12
+
13
+ Identify ambiguities, missing requirements, technical gaps, or potential conflicts.
14
+ Focus on questions that will help:
15
+ - Clarify user intent
16
+ - Define edge cases
17
+ - Specify technical implementation details aligned with the stack
18
+ - Resolve potential architectural issues
19
+
20
+ Return a JSON object with a "questions" array, where each item is a string containing a question.
21
+ `;
22
+ exports.PRD_QUESTION_SYSTEM_PROMPT = `
23
+ You are an expert Product Manager and Technical Architect. Your goal is to analyze Product Requirements Documents (PRDs) and ask insightful questions to clarify requirements and ensure technical feasibility.
24
+
25
+ Output Format:
26
+ You must return a valid JSON object with the following structure:
27
+ {
28
+ "questions": [
29
+ "Question 1?",
30
+ "Question 2?",
31
+ ...
32
+ ]
33
+ }
34
+
35
+ Guidelines:
36
+ 1. Ask 3-5 most critical questions. Do not overwhelm the user.
37
+ 2. Focus on "what" and "why" rather than "how" unless it affects feasibility.
38
+ 3. Be specific and reference parts of the PRD.
39
+ 4. Consider the technology stack constraints.
40
+ `;
@@ -0,0 +1,12 @@
1
+ import { BenchmarkConfig, BenchmarkRun, BenchmarkProgressEvent } from "../lib/benchmark/types";
2
+ export declare class BenchmarkService {
3
+ runBenchmark(operationId: string, input: any, config: BenchmarkConfig, onProgress?: (event: BenchmarkProgressEvent) => void): Promise<BenchmarkRun>;
4
+ getRun(id: string): BenchmarkRun | null;
5
+ listRuns(): Array<{
6
+ id: string;
7
+ timestamp: number;
8
+ command: string;
9
+ }>;
10
+ }
11
+ export declare const benchmarkService: BenchmarkService;
12
+ //# sourceMappingURL=benchmark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"benchmark.d.ts","sourceRoot":"","sources":["../../src/services/benchmark.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAEhC,qBAAa,gBAAgB;IACrB,YAAY,CAChB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,eAAe,EACvB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,GACnD,OAAO,CAAC,YAAY,CAAC;IAIxB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAIvC,QAAQ,IAAI,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAGtE;AAED,eAAO,MAAM,gBAAgB,kBAAyB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.benchmarkService = exports.BenchmarkService = void 0;
4
+ const runner_1 = require("../lib/benchmark/runner");
5
+ const storage_1 = require("../lib/benchmark/storage");
6
+ class BenchmarkService {
7
+ async runBenchmark(operationId, input, config, onProgress) {
8
+ return await runner_1.benchmarkRunner.run(operationId, input, config, onProgress);
9
+ }
10
+ getRun(id) {
11
+ return storage_1.benchmarkStorage.getRun(id);
12
+ }
13
+ listRuns() {
14
+ return storage_1.benchmarkStorage.listRuns();
15
+ }
16
+ }
17
+ exports.BenchmarkService = BenchmarkService;
18
+ exports.benchmarkService = new BenchmarkService();
@@ -17,6 +17,16 @@ export declare class PRDService {
17
17
  streamingOptions?: StreamingOptions;
18
18
  callbacks?: ProgressCallback;
19
19
  }): Promise<PRDParseResult>;
20
+ generateQuestions(input: {
21
+ file: string;
22
+ workingDirectory?: string;
23
+ enableFilesystemTools?: boolean;
24
+ aiOptions?: AIOptions;
25
+ promptOverride?: string;
26
+ messageOverride?: string;
27
+ streamingOptions?: StreamingOptions;
28
+ callbacks?: ProgressCallback;
29
+ }): Promise<string[]>;
20
30
  reworkPRD(input: {
21
31
  file: string;
22
32
  feedback: string;
@@ -29,6 +39,21 @@ export declare class PRDService {
29
39
  streamingOptions?: StreamingOptions;
30
40
  callbacks?: ProgressCallback;
31
41
  }): Promise<string>;
42
+ refinePRDWithQuestions(input: {
43
+ file: string;
44
+ questionMode: "user" | "ai";
45
+ answers?: Record<string, string>;
46
+ questionAIOptions?: AIOptions;
47
+ workingDirectory?: string;
48
+ enableFilesystemTools?: boolean;
49
+ aiOptions?: AIOptions;
50
+ streamingOptions?: StreamingOptions;
51
+ callbacks?: ProgressCallback;
52
+ }): Promise<{
53
+ questions: string[];
54
+ answers: Record<string, string>;
55
+ refinedPRDPath: string;
56
+ }>;
32
57
  }
33
58
  export declare const prdService: PRDService;
34
59
  //# sourceMappingURL=prd.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prd.d.ts","sourceRoot":"","sources":["../../src/services/prd.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAY,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,qBAAa,UAAU;IAEf,QAAQ,CAAC,KAAK,EAAE;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAChC,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;QACpC,SAAS,CAAC,EAAE,gBAAgB,CAAC;KAC9B,GAAG,OAAO,CAAC,cAAc,CAAC;IAgLrB,SAAS,CAAC,KAAK,EAAE;QACrB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAChC,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;QACpC,SAAS,CAAC,EAAE,gBAAgB,CAAC;KAC9B,GAAG,OAAO,CAAC,MAAM,CAAC;CA6DpB;AAGD,eAAO,MAAM,UAAU,YAAmB,CAAC"}
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C,EAAE,OAAO,CAAC;QAChC,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;QACpC,SAAS,CAAC,EAAE,gBAAgB,CAAC;KAC9B,GAAG,OAAO,CAAC,MAAM,CAAC;IAiEb,sBAAsB,CAAC,KAAK,EAAE;QAClC,IAAI,EAAE,MAAM,CAAC;QACb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,iBAAiB,CAAC,EAAE,SAAS,CAAC;QAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAChC,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;QACpC,SAAS,CAAC,EAAE,gBAAgB,CAAC;KAC9B,GAAG,OAAO,CAAC;QACV,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CAwHH;AAGD,eAAO,MAAM,UAAU,YAAmB,CAAC"}
@@ -1,4 +1,37 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.prdService = exports.PRDService = void 0;
4
37
  const fs_1 = require("fs");
@@ -16,8 +49,8 @@ class PRDService {
16
49
  const startTime = Date.now();
17
50
  const steps = [];
18
51
  input.callbacks?.onProgress?.({
19
- type: 'started',
20
- message: 'Starting PRD parsing...',
52
+ type: "started",
53
+ message: "Starting PRD parsing...",
21
54
  });
22
55
  // Validate file exists
23
56
  if (!(0, fs_1.existsSync)(input.file)) {
@@ -32,14 +65,14 @@ class PRDService {
32
65
  const workingDir = input.workingDirectory || process.cwd();
33
66
  config_1.configManager.setWorkingDirectory(workingDir);
34
67
  input.callbacks?.onProgress?.({
35
- type: 'progress',
36
- message: 'Reading PRD file...',
68
+ type: "progress",
69
+ message: "Reading PRD file...",
37
70
  });
38
71
  const prdContent = (0, fs_1.readFileSync)(input.file, "utf-8");
39
72
  // Save PRD file to .task-o-matic/prd directory
40
73
  input.callbacks?.onProgress?.({
41
- type: 'progress',
42
- message: 'Saving PRD to project directory...',
74
+ type: "progress",
75
+ message: "Saving PRD to project directory...",
43
76
  });
44
77
  const stepStart1 = Date.now();
45
78
  const prdDir = (0, path_1.join)(taskOMaticDir, "prd");
@@ -54,31 +87,32 @@ class PRDService {
54
87
  // Get relative path from .task-o-matic directory for storage
55
88
  const relativePrdPath = (0, path_1.relative)(taskOMaticDir, savedPrdPath);
56
89
  steps.push({
57
- step: 'Save PRD File',
58
- status: 'completed',
90
+ step: "Save PRD File",
91
+ status: "completed",
59
92
  duration: Date.now() - stepStart1,
60
93
  });
61
94
  // Validate AI provider if specified
62
- if (input.aiOptions?.aiProvider && !(0, validation_1.isValidAIProvider)(input.aiOptions.aiProvider)) {
95
+ if (input.aiOptions?.aiProvider &&
96
+ !(0, validation_1.isValidAIProvider)(input.aiOptions.aiProvider)) {
63
97
  throw new Error(`Invalid AI provider: ${input.aiOptions.aiProvider}`);
64
98
  }
65
99
  const aiConfig = (0, ai_config_builder_1.buildAIConfig)(input.aiOptions);
66
100
  input.callbacks?.onProgress?.({
67
- type: 'progress',
68
- message: 'Parsing PRD with AI...',
101
+ type: "progress",
102
+ message: "Parsing PRD with AI...",
69
103
  });
70
104
  const stepStart2 = Date.now();
71
105
  const result = await (0, ai_service_factory_1.getAIOperations)().parsePRD(prdContent, aiConfig, input.promptOverride, input.messageOverride, input.streamingOptions, undefined, // retryConfig
72
106
  workingDir, // Pass working directory to AI operations
73
107
  input.enableFilesystemTools);
74
108
  steps.push({
75
- step: 'AI Parsing',
76
- status: 'completed',
109
+ step: "AI Parsing",
110
+ status: "completed",
77
111
  duration: Date.now() - stepStart2,
78
112
  details: { tasksFound: result.tasks.length },
79
113
  });
80
114
  input.callbacks?.onProgress?.({
81
- type: 'progress',
115
+ type: "progress",
82
116
  message: `Creating ${result.tasks.length} tasks...`,
83
117
  });
84
118
  // Create tasks
@@ -87,7 +121,7 @@ class PRDService {
87
121
  for (let i = 0; i < result.tasks.length; i++) {
88
122
  const task = result.tasks[i];
89
123
  input.callbacks?.onProgress?.({
90
- type: 'progress',
124
+ type: "progress",
91
125
  message: `Creating task ${i + 1}/${result.tasks.length}: ${task.title}`,
92
126
  current: i + 1,
93
127
  total: result.tasks.length,
@@ -117,13 +151,13 @@ class PRDService {
117
151
  await (0, ai_service_factory_1.getStorage)().saveTaskAIMetadata(aiMetadata);
118
152
  }
119
153
  steps.push({
120
- step: 'Create Tasks',
121
- status: 'completed',
154
+ step: "Create Tasks",
155
+ status: "completed",
122
156
  duration: Date.now() - stepStart3,
123
157
  details: { count: createdTasks.length },
124
158
  });
125
159
  input.callbacks?.onProgress?.({
126
- type: 'completed',
160
+ type: "completed",
127
161
  message: `Successfully created ${createdTasks.length} tasks from PRD`,
128
162
  });
129
163
  const duration = Date.now() - startTime;
@@ -144,10 +178,41 @@ class PRDService {
144
178
  steps,
145
179
  };
146
180
  }
181
+ async generateQuestions(input) {
182
+ input.callbacks?.onProgress?.({
183
+ type: "started",
184
+ message: "Generating clarifying questions...",
185
+ });
186
+ if (!(0, fs_1.existsSync)(input.file)) {
187
+ throw new Error(`PRD file not found: ${input.file}`);
188
+ }
189
+ const workingDir = input.workingDirectory || process.cwd();
190
+ config_1.configManager.setWorkingDirectory(workingDir);
191
+ input.callbacks?.onProgress?.({
192
+ type: "progress",
193
+ message: "Reading PRD file...",
194
+ });
195
+ const prdContent = (0, fs_1.readFileSync)(input.file, "utf-8");
196
+ if (input.aiOptions?.aiProvider &&
197
+ !(0, validation_1.isValidAIProvider)(input.aiOptions.aiProvider)) {
198
+ throw new Error(`Invalid AI provider: ${input.aiOptions.aiProvider}`);
199
+ }
200
+ const aiConfig = (0, ai_config_builder_1.buildAIConfig)(input.aiOptions);
201
+ input.callbacks?.onProgress?.({
202
+ type: "progress",
203
+ message: "Analyzing PRD with AI...",
204
+ });
205
+ const questions = await (0, ai_service_factory_1.getAIOperations)().generatePRDQuestions(prdContent, aiConfig, input.promptOverride, input.messageOverride, input.streamingOptions, undefined, workingDir, input.enableFilesystemTools);
206
+ input.callbacks?.onProgress?.({
207
+ type: "completed",
208
+ message: `Generated ${questions.length} questions`,
209
+ });
210
+ return questions;
211
+ }
147
212
  async reworkPRD(input) {
148
213
  input.callbacks?.onProgress?.({
149
- type: 'started',
150
- message: 'Starting PRD improvement...',
214
+ type: "started",
215
+ message: "Starting PRD improvement...",
151
216
  });
152
217
  // Validate file exists
153
218
  if (!(0, fs_1.existsSync)(input.file)) {
@@ -157,34 +222,129 @@ class PRDService {
157
222
  const workingDir = input.workingDirectory || process.cwd();
158
223
  config_1.configManager.setWorkingDirectory(workingDir);
159
224
  input.callbacks?.onProgress?.({
160
- type: 'progress',
161
- message: 'Reading PRD file...',
225
+ type: "progress",
226
+ message: "Reading PRD file...",
162
227
  });
163
228
  const prdContent = (0, fs_1.readFileSync)(input.file, "utf-8");
164
229
  // Validate AI provider if specified
165
- if (input.aiOptions?.aiProvider && !(0, validation_1.isValidAIProvider)(input.aiOptions.aiProvider)) {
230
+ if (input.aiOptions?.aiProvider &&
231
+ !(0, validation_1.isValidAIProvider)(input.aiOptions.aiProvider)) {
166
232
  throw new Error(`Invalid AI provider: ${input.aiOptions.aiProvider}`);
167
233
  }
168
234
  const aiConfig = (0, ai_config_builder_1.buildAIConfig)(input.aiOptions);
169
235
  input.callbacks?.onProgress?.({
170
- type: 'progress',
171
- message: 'Calling AI to improve PRD...',
236
+ type: "progress",
237
+ message: "Calling AI to improve PRD...",
172
238
  });
173
239
  const improvedPRD = await (0, ai_service_factory_1.getAIOperations)().reworkPRD(prdContent, input.feedback, aiConfig, input.promptOverride, input.messageOverride, input.streamingOptions, undefined, // retryConfig
174
240
  workingDir, // Pass working directory to AI operations
175
241
  input.enableFilesystemTools);
176
242
  input.callbacks?.onProgress?.({
177
- type: 'progress',
178
- message: 'Saving improved PRD...',
243
+ type: "progress",
244
+ message: "Saving improved PRD...",
179
245
  });
180
246
  const outputPath = input.output || input.file;
181
247
  (0, fs_1.writeFileSync)(outputPath, improvedPRD);
182
248
  input.callbacks?.onProgress?.({
183
- type: 'completed',
249
+ type: "completed",
184
250
  message: `PRD improved and saved to ${outputPath}`,
185
251
  });
186
252
  return outputPath;
187
253
  }
254
+ async refinePRDWithQuestions(input) {
255
+ input.callbacks?.onProgress?.({
256
+ type: "started",
257
+ message: "Starting PRD question/refine process...",
258
+ });
259
+ // Step 1: Generate questions
260
+ input.callbacks?.onProgress?.({
261
+ type: "progress",
262
+ message: "Generating clarifying questions...",
263
+ });
264
+ const questions = await this.generateQuestions({
265
+ file: input.file,
266
+ workingDirectory: input.workingDirectory,
267
+ enableFilesystemTools: input.enableFilesystemTools,
268
+ aiOptions: input.aiOptions,
269
+ streamingOptions: input.streamingOptions,
270
+ callbacks: input.callbacks,
271
+ });
272
+ if (questions.length === 0) {
273
+ input.callbacks?.onProgress?.({
274
+ type: "completed",
275
+ message: "No questions generated - PRD appears complete",
276
+ });
277
+ return {
278
+ questions: [],
279
+ answers: {},
280
+ refinedPRDPath: input.file,
281
+ };
282
+ }
283
+ // Step 2: Get stack info for context
284
+ const workingDir = input.workingDirectory || process.cwd();
285
+ const PromptBuilder = (await Promise.resolve().then(() => __importStar(require("../lib/prompt-builder")))).PromptBuilder;
286
+ let stackInfo = "";
287
+ try {
288
+ stackInfo = await PromptBuilder.detectStackInfo(workingDir);
289
+ if (stackInfo === "Not detected") {
290
+ stackInfo = "";
291
+ }
292
+ }
293
+ catch (error) {
294
+ // Stack info not available
295
+ }
296
+ // Step 3: Get answers
297
+ let answers;
298
+ if (input.questionMode === "user") {
299
+ // User mode: return questions for CLI to prompt user
300
+ // Answers should be provided in input.answers
301
+ if (!input.answers || Object.keys(input.answers).length === 0) {
302
+ throw new Error("User mode selected but no answers provided. CLI layer should collect answers.");
303
+ }
304
+ answers = input.answers;
305
+ }
306
+ else {
307
+ // AI mode: use AI to answer questions with context
308
+ input.callbacks?.onProgress?.({
309
+ type: "progress",
310
+ message: "AI is answering questions...",
311
+ });
312
+ const prdContent = (0, fs_1.readFileSync)(input.file, "utf-8");
313
+ // Use questionAIOptions if provided, otherwise use main aiOptions
314
+ const answeringAIConfig = (0, ai_config_builder_1.buildAIConfig)(input.questionAIOptions || input.aiOptions);
315
+ answers = await (0, ai_service_factory_1.getAIOperations)().answerPRDQuestions(prdContent, questions, answeringAIConfig, {
316
+ stackInfo,
317
+ }, input.streamingOptions);
318
+ }
319
+ // Step 4: Format questions + answers as structured feedback
320
+ let feedback = "Please incorporate the following clarifications into the PRD:\n\n";
321
+ questions.forEach((q, i) => {
322
+ feedback += `Q${i + 1}: ${q}\nA: ${answers[q] || "No answer provided"}\n\n`;
323
+ });
324
+ // Step 5: Automatically call reworkPRD with formatted feedback
325
+ input.callbacks?.onProgress?.({
326
+ type: "progress",
327
+ message: "Refining PRD with answers...",
328
+ });
329
+ const refinedPRDPath = await this.reworkPRD({
330
+ file: input.file,
331
+ feedback,
332
+ workingDirectory: input.workingDirectory,
333
+ enableFilesystemTools: input.enableFilesystemTools,
334
+ aiOptions: input.aiOptions,
335
+ streamingOptions: input.streamingOptions,
336
+ callbacks: input.callbacks,
337
+ });
338
+ input.callbacks?.onProgress?.({
339
+ type: "completed",
340
+ message: `PRD refined with ${questions.length} questions answered`,
341
+ });
342
+ return {
343
+ questions,
344
+ answers,
345
+ refinedPRDPath,
346
+ };
347
+ }
188
348
  }
189
349
  exports.PRDService = PRDService;
190
350
  // Export singleton instance
@@ -0,0 +1,85 @@
1
+ import { AIOptions } from "../utils/ai-config-builder";
2
+ import { StreamingOptions } from "../types";
3
+ import { ProgressCallback } from "../types/callbacks";
4
+ import { InitializeResult, DefinePRDResult, RefinePRDResult, GenerateTasksResult, SplitTasksResult } from "../types/workflow-results";
5
+ /**
6
+ * WorkflowService - Business logic for workflow operations
7
+ * Extracts all workflow logic from the command layer for reusability
8
+ */
9
+ export declare class WorkflowService {
10
+ /**
11
+ * Step 1: Initialize Project
12
+ * Handles project initialization, AI configuration, and optional bootstrapping
13
+ */
14
+ initializeProject(input: {
15
+ projectName: string;
16
+ projectDir?: string;
17
+ initMethod?: "quick" | "custom" | "ai";
18
+ projectDescription?: string;
19
+ aiOptions?: AIOptions;
20
+ stackConfig?: {
21
+ frontend?: string;
22
+ backend?: string;
23
+ database?: string;
24
+ auth?: boolean;
25
+ };
26
+ bootstrap?: boolean;
27
+ streamingOptions?: StreamingOptions;
28
+ callbacks?: ProgressCallback;
29
+ }): Promise<InitializeResult>;
30
+ /**
31
+ * Step 2: Define PRD
32
+ * Handles PRD creation through various methods
33
+ */
34
+ definePRD(input: {
35
+ method: "upload" | "manual" | "ai" | "skip";
36
+ prdFile?: string;
37
+ prdDescription?: string;
38
+ prdContent?: string;
39
+ projectDir: string;
40
+ aiOptions?: AIOptions;
41
+ streamingOptions?: StreamingOptions;
42
+ callbacks?: ProgressCallback;
43
+ }): Promise<DefinePRDResult>;
44
+ /**
45
+ * Step 3: Refine PRD
46
+ * Handles PRD refinement through manual or AI methods
47
+ */
48
+ refinePRD(input: {
49
+ method: "manual" | "ai" | "skip";
50
+ prdFile: string;
51
+ prdContent?: string;
52
+ feedback?: string;
53
+ projectDir: string;
54
+ aiOptions?: AIOptions;
55
+ streamingOptions?: StreamingOptions;
56
+ callbacks?: ProgressCallback;
57
+ }): Promise<RefinePRDResult>;
58
+ /**
59
+ * Step 4: Generate Tasks
60
+ * Generates tasks from PRD using the prdService
61
+ */
62
+ generateTasks(input: {
63
+ prdFile: string;
64
+ method: "standard" | "ai";
65
+ customInstructions?: string;
66
+ projectDir: string;
67
+ aiOptions?: AIOptions;
68
+ streamingOptions?: StreamingOptions;
69
+ callbacks?: ProgressCallback;
70
+ }): Promise<GenerateTasksResult>;
71
+ /**
72
+ * Step 5: Split Tasks
73
+ * Splits complex tasks into subtasks
74
+ */
75
+ splitTasks(input: {
76
+ taskIds: string[];
77
+ splitMethod: "interactive" | "standard" | "custom";
78
+ customInstructions?: string;
79
+ aiOptions?: AIOptions;
80
+ streamingOptions?: StreamingOptions;
81
+ callbacks?: ProgressCallback;
82
+ }): Promise<SplitTasksResult>;
83
+ }
84
+ export declare const workflowService: WorkflowService;
85
+ //# sourceMappingURL=workflow.d.ts.map