sdd-mcp-server 1.0.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 (165) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +256 -0
  3. package/dist/__tests__/setup.d.ts +44 -0
  4. package/dist/__tests__/setup.js +178 -0
  5. package/dist/__tests__/setup.js.map +1 -0
  6. package/dist/__tests__/test-helpers/mock-factories.d.ts +26 -0
  7. package/dist/__tests__/test-helpers/mock-factories.js +466 -0
  8. package/dist/__tests__/test-helpers/mock-factories.js.map +1 -0
  9. package/dist/adapters/cli/SDDToolAdapter.d.ts +26 -0
  10. package/dist/adapters/cli/SDDToolAdapter.js +273 -0
  11. package/dist/adapters/cli/SDDToolAdapter.js.map +1 -0
  12. package/dist/application/services/CodebaseAnalysisService.d.ts +38 -0
  13. package/dist/application/services/CodebaseAnalysisService.js +737 -0
  14. package/dist/application/services/CodebaseAnalysisService.js.map +1 -0
  15. package/dist/application/services/LocalizationService.d.ts +184 -0
  16. package/dist/application/services/LocalizationService.js +536 -0
  17. package/dist/application/services/LocalizationService.js.map +1 -0
  18. package/dist/application/services/ProjectContextService.d.ts +61 -0
  19. package/dist/application/services/ProjectContextService.js +550 -0
  20. package/dist/application/services/ProjectContextService.js.map +1 -0
  21. package/dist/application/services/ProjectInitializationService.d.ts +57 -0
  22. package/dist/application/services/ProjectInitializationService.js +485 -0
  23. package/dist/application/services/ProjectInitializationService.js.map +1 -0
  24. package/dist/application/services/ProjectService.d.ts +19 -0
  25. package/dist/application/services/ProjectService.js +159 -0
  26. package/dist/application/services/ProjectService.js.map +1 -0
  27. package/dist/application/services/QualityGateService.d.ts +62 -0
  28. package/dist/application/services/QualityGateService.js +428 -0
  29. package/dist/application/services/QualityGateService.js.map +1 -0
  30. package/dist/application/services/QualityService.d.ts +43 -0
  31. package/dist/application/services/QualityService.js +245 -0
  32. package/dist/application/services/QualityService.js.map +1 -0
  33. package/dist/application/services/SteeringDocumentService.d.ts +62 -0
  34. package/dist/application/services/SteeringDocumentService.js +694 -0
  35. package/dist/application/services/SteeringDocumentService.js.map +1 -0
  36. package/dist/application/services/TemplateService.d.ts +47 -0
  37. package/dist/application/services/TemplateService.js +438 -0
  38. package/dist/application/services/TemplateService.js.map +1 -0
  39. package/dist/application/services/WorkflowEngineService.d.ts +56 -0
  40. package/dist/application/services/WorkflowEngineService.js +348 -0
  41. package/dist/application/services/WorkflowEngineService.js.map +1 -0
  42. package/dist/application/services/WorkflowService.d.ts +22 -0
  43. package/dist/application/services/WorkflowService.js +147 -0
  44. package/dist/application/services/WorkflowService.js.map +1 -0
  45. package/dist/application/services/WorkflowValidationService.d.ts +51 -0
  46. package/dist/application/services/WorkflowValidationService.js +665 -0
  47. package/dist/application/services/WorkflowValidationService.js.map +1 -0
  48. package/dist/domain/context/ProjectContext.d.ts +350 -0
  49. package/dist/domain/context/ProjectContext.js +138 -0
  50. package/dist/domain/context/ProjectContext.js.map +1 -0
  51. package/dist/domain/i18n/index.d.ts +286 -0
  52. package/dist/domain/i18n/index.js +97 -0
  53. package/dist/domain/i18n/index.js.map +1 -0
  54. package/dist/domain/plugins/index.d.ts +498 -0
  55. package/dist/domain/plugins/index.js +157 -0
  56. package/dist/domain/plugins/index.js.map +1 -0
  57. package/dist/domain/ports.d.ts +54 -0
  58. package/dist/domain/ports.js +3 -0
  59. package/dist/domain/ports.js.map +1 -0
  60. package/dist/domain/quality/index.d.ts +361 -0
  61. package/dist/domain/quality/index.js +113 -0
  62. package/dist/domain/quality/index.js.map +1 -0
  63. package/dist/domain/services/DomainService.d.ts +18 -0
  64. package/dist/domain/services/DomainService.js +71 -0
  65. package/dist/domain/services/DomainService.js.map +1 -0
  66. package/dist/domain/templates/index.d.ts +158 -0
  67. package/dist/domain/templates/index.js +22 -0
  68. package/dist/domain/templates/index.js.map +1 -0
  69. package/dist/domain/types.d.ts +115 -0
  70. package/dist/domain/types.js +37 -0
  71. package/dist/domain/types.js.map +1 -0
  72. package/dist/domain/workflow/WorkflowStateMachine.d.ts +62 -0
  73. package/dist/domain/workflow/WorkflowStateMachine.js +286 -0
  74. package/dist/domain/workflow/WorkflowStateMachine.js.map +1 -0
  75. package/dist/index.d.ts +19 -0
  76. package/dist/index.js +97 -0
  77. package/dist/index.js.map +1 -0
  78. package/dist/infrastructure/adapters/AjvValidationAdapter.d.ts +7 -0
  79. package/dist/infrastructure/adapters/AjvValidationAdapter.js +37 -0
  80. package/dist/infrastructure/adapters/AjvValidationAdapter.js.map +1 -0
  81. package/dist/infrastructure/adapters/ConsoleLoggerAdapter.d.ts +8 -0
  82. package/dist/infrastructure/adapters/ConsoleLoggerAdapter.js +41 -0
  83. package/dist/infrastructure/adapters/ConsoleLoggerAdapter.js.map +1 -0
  84. package/dist/infrastructure/adapters/FileBasedTaskTracker.d.ts +9 -0
  85. package/dist/infrastructure/adapters/FileBasedTaskTracker.js +41 -0
  86. package/dist/infrastructure/adapters/FileBasedTaskTracker.js.map +1 -0
  87. package/dist/infrastructure/adapters/HandlebarsTemplateEngine.d.ts +8 -0
  88. package/dist/infrastructure/adapters/HandlebarsTemplateEngine.js +38 -0
  89. package/dist/infrastructure/adapters/HandlebarsTemplateEngine.js.map +1 -0
  90. package/dist/infrastructure/adapters/JsonConfigurationAdapter.d.ts +7 -0
  91. package/dist/infrastructure/adapters/JsonConfigurationAdapter.js +24 -0
  92. package/dist/infrastructure/adapters/JsonConfigurationAdapter.js.map +1 -0
  93. package/dist/infrastructure/adapters/LinusQualityAnalyzer.d.ts +9 -0
  94. package/dist/infrastructure/adapters/LinusQualityAnalyzer.js +75 -0
  95. package/dist/infrastructure/adapters/LinusQualityAnalyzer.js.map +1 -0
  96. package/dist/infrastructure/adapters/NodeFileSystemAdapter.d.ts +12 -0
  97. package/dist/infrastructure/adapters/NodeFileSystemAdapter.js +39 -0
  98. package/dist/infrastructure/adapters/NodeFileSystemAdapter.js.map +1 -0
  99. package/dist/infrastructure/di/container.d.ts +3 -0
  100. package/dist/infrastructure/di/container.js +98 -0
  101. package/dist/infrastructure/di/container.js.map +1 -0
  102. package/dist/infrastructure/di/types.d.ts +39 -0
  103. package/dist/infrastructure/di/types.js +45 -0
  104. package/dist/infrastructure/di/types.js.map +1 -0
  105. package/dist/infrastructure/i18n/I18nextService.d.ts +27 -0
  106. package/dist/infrastructure/i18n/I18nextService.js +357 -0
  107. package/dist/infrastructure/i18n/I18nextService.js.map +1 -0
  108. package/dist/infrastructure/mcp/CapabilityNegotiator.d.ts +21 -0
  109. package/dist/infrastructure/mcp/CapabilityNegotiator.js +75 -0
  110. package/dist/infrastructure/mcp/CapabilityNegotiator.js.map +1 -0
  111. package/dist/infrastructure/mcp/ErrorHandler.d.ts +29 -0
  112. package/dist/infrastructure/mcp/ErrorHandler.js +101 -0
  113. package/dist/infrastructure/mcp/ErrorHandler.js.map +1 -0
  114. package/dist/infrastructure/mcp/MCPServer.d.ts +25 -0
  115. package/dist/infrastructure/mcp/MCPServer.js +246 -0
  116. package/dist/infrastructure/mcp/MCPServer.js.map +1 -0
  117. package/dist/infrastructure/mcp/PromptManager.d.ts +18 -0
  118. package/dist/infrastructure/mcp/PromptManager.js +373 -0
  119. package/dist/infrastructure/mcp/PromptManager.js.map +1 -0
  120. package/dist/infrastructure/mcp/ResourceManager.d.ts +15 -0
  121. package/dist/infrastructure/mcp/ResourceManager.js +229 -0
  122. package/dist/infrastructure/mcp/ResourceManager.js.map +1 -0
  123. package/dist/infrastructure/mcp/SessionManager.d.ts +64 -0
  124. package/dist/infrastructure/mcp/SessionManager.js +221 -0
  125. package/dist/infrastructure/mcp/SessionManager.js.map +1 -0
  126. package/dist/infrastructure/mcp/ToolRegistry.d.ts +48 -0
  127. package/dist/infrastructure/mcp/ToolRegistry.js +235 -0
  128. package/dist/infrastructure/mcp/ToolRegistry.js.map +1 -0
  129. package/dist/infrastructure/platform/PlatformAdapter.d.ts +46 -0
  130. package/dist/infrastructure/platform/PlatformAdapter.js +355 -0
  131. package/dist/infrastructure/platform/PlatformAdapter.js.map +1 -0
  132. package/dist/infrastructure/plugins/HookSystem.d.ts +40 -0
  133. package/dist/infrastructure/plugins/HookSystem.js +415 -0
  134. package/dist/infrastructure/plugins/HookSystem.js.map +1 -0
  135. package/dist/infrastructure/plugins/PluginManager.d.ts +51 -0
  136. package/dist/infrastructure/plugins/PluginManager.js +650 -0
  137. package/dist/infrastructure/plugins/PluginManager.js.map +1 -0
  138. package/dist/infrastructure/plugins/PluginSteeringRegistry.d.ts +63 -0
  139. package/dist/infrastructure/plugins/PluginSteeringRegistry.js +439 -0
  140. package/dist/infrastructure/plugins/PluginSteeringRegistry.js.map +1 -0
  141. package/dist/infrastructure/plugins/PluginToolRegistry.d.ts +54 -0
  142. package/dist/infrastructure/plugins/PluginToolRegistry.js +490 -0
  143. package/dist/infrastructure/plugins/PluginToolRegistry.js.map +1 -0
  144. package/dist/infrastructure/quality/ASTAnalyzer.d.ts +65 -0
  145. package/dist/infrastructure/quality/ASTAnalyzer.js +439 -0
  146. package/dist/infrastructure/quality/ASTAnalyzer.js.map +1 -0
  147. package/dist/infrastructure/quality/LinusCodeReviewer.d.ts +52 -0
  148. package/dist/infrastructure/quality/LinusCodeReviewer.js +551 -0
  149. package/dist/infrastructure/quality/LinusCodeReviewer.js.map +1 -0
  150. package/dist/infrastructure/repositories/InMemoryProjectRepository.d.ts +10 -0
  151. package/dist/infrastructure/repositories/InMemoryProjectRepository.js +35 -0
  152. package/dist/infrastructure/repositories/InMemoryProjectRepository.js.map +1 -0
  153. package/dist/infrastructure/schemas/project.schema.d.ts +192 -0
  154. package/dist/infrastructure/schemas/project.schema.js +114 -0
  155. package/dist/infrastructure/schemas/project.schema.js.map +1 -0
  156. package/dist/infrastructure/templates/FileGenerator.d.ts +15 -0
  157. package/dist/infrastructure/templates/FileGenerator.js +385 -0
  158. package/dist/infrastructure/templates/FileGenerator.js.map +1 -0
  159. package/dist/infrastructure/templates/HandlebarsRenderer.d.ts +16 -0
  160. package/dist/infrastructure/templates/HandlebarsRenderer.js +252 -0
  161. package/dist/infrastructure/templates/HandlebarsRenderer.js.map +1 -0
  162. package/dist/infrastructure/templates/TemplateManager.d.ts +36 -0
  163. package/dist/infrastructure/templates/TemplateManager.js +777 -0
  164. package/dist/infrastructure/templates/TemplateManager.js.map +1 -0
  165. package/package.json +89 -0
@@ -0,0 +1,159 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ import { injectable, inject } from 'inversify';
14
+ import { v4 as uuidv4 } from 'uuid';
15
+ import { TYPES } from '../../infrastructure/di/types.js';
16
+ import { WorkflowPhase } from '../../domain/types.js';
17
+ import { projectSchema } from '../../infrastructure/schemas/project.schema.js';
18
+ let ProjectService = class ProjectService {
19
+ projectRepository;
20
+ fileSystem;
21
+ validation;
22
+ logger;
23
+ constructor(projectRepository, fileSystem, validation, logger) {
24
+ this.projectRepository = projectRepository;
25
+ this.fileSystem = fileSystem;
26
+ this.validation = validation;
27
+ this.logger = logger;
28
+ }
29
+ async createProject(name, path, language = 'en') {
30
+ const correlationId = uuidv4();
31
+ this.logger.info('Creating new project', {
32
+ correlationId,
33
+ name,
34
+ path,
35
+ language
36
+ });
37
+ const project = {
38
+ id: uuidv4(),
39
+ name,
40
+ path,
41
+ phase: WorkflowPhase.INIT,
42
+ metadata: {
43
+ createdAt: new Date(),
44
+ updatedAt: new Date(),
45
+ language,
46
+ approvals: {
47
+ requirements: { generated: false, approved: false },
48
+ design: { generated: false, approved: false },
49
+ tasks: { generated: false, approved: false }
50
+ }
51
+ }
52
+ };
53
+ // Validate project data
54
+ await this.validation.validate(project, projectSchema);
55
+ // Create project directory structure
56
+ await this.createProjectStructure(project.path);
57
+ // Save project
58
+ await this.projectRepository.save(project);
59
+ this.logger.info('Project created successfully', {
60
+ correlationId,
61
+ projectId: project.id
62
+ });
63
+ return project;
64
+ }
65
+ async getProject(id) {
66
+ return await this.projectRepository.findById(id);
67
+ }
68
+ async getProjectByPath(path) {
69
+ return await this.projectRepository.findByPath(path);
70
+ }
71
+ async listProjects() {
72
+ return await this.projectRepository.list();
73
+ }
74
+ async updateProjectPhase(projectId, phase) {
75
+ const correlationId = uuidv4();
76
+ this.logger.info('Updating project phase', {
77
+ correlationId,
78
+ projectId,
79
+ phase
80
+ });
81
+ const project = await this.projectRepository.findById(projectId);
82
+ if (!project) {
83
+ throw new Error(`Project not found: ${projectId}`);
84
+ }
85
+ const updatedProject = {
86
+ ...project,
87
+ phase,
88
+ metadata: {
89
+ ...project.metadata,
90
+ updatedAt: new Date()
91
+ }
92
+ };
93
+ await this.validation.validate(updatedProject, projectSchema);
94
+ await this.projectRepository.save(updatedProject);
95
+ this.logger.info('Project phase updated successfully', {
96
+ correlationId,
97
+ projectId,
98
+ phase
99
+ });
100
+ return updatedProject;
101
+ }
102
+ async updateApprovalStatus(projectId, phaseType, status) {
103
+ const correlationId = uuidv4();
104
+ this.logger.info('Updating approval status', {
105
+ correlationId,
106
+ projectId,
107
+ phaseType,
108
+ status
109
+ });
110
+ const project = await this.projectRepository.findById(projectId);
111
+ if (!project) {
112
+ throw new Error(`Project not found: ${projectId}`);
113
+ }
114
+ const updatedProject = {
115
+ ...project,
116
+ metadata: {
117
+ ...project.metadata,
118
+ updatedAt: new Date(),
119
+ approvals: {
120
+ ...project.metadata.approvals,
121
+ [phaseType]: {
122
+ ...project.metadata.approvals[phaseType],
123
+ ...status
124
+ }
125
+ }
126
+ }
127
+ };
128
+ await this.validation.validate(updatedProject, projectSchema);
129
+ await this.projectRepository.save(updatedProject);
130
+ this.logger.info('Approval status updated successfully', {
131
+ correlationId,
132
+ projectId,
133
+ phaseType
134
+ });
135
+ return updatedProject;
136
+ }
137
+ async createProjectStructure(basePath) {
138
+ const directories = [
139
+ `${basePath}/.kiro/specs`,
140
+ `${basePath}/.kiro/steering`,
141
+ `${basePath}/.claude/commands`
142
+ ];
143
+ for (const dir of directories) {
144
+ if (!(await this.fileSystem.exists(dir))) {
145
+ await this.fileSystem.mkdir(dir);
146
+ }
147
+ }
148
+ }
149
+ };
150
+ ProjectService = __decorate([
151
+ injectable(),
152
+ __param(0, inject(TYPES.ProjectRepository)),
153
+ __param(1, inject(TYPES.FileSystemPort)),
154
+ __param(2, inject(TYPES.ValidationPort)),
155
+ __param(3, inject(TYPES.LoggerPort)),
156
+ __metadata("design:paramtypes", [Object, Object, Object, Object])
157
+ ], ProjectService);
158
+ export { ProjectService };
159
+ //# sourceMappingURL=ProjectService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectService.js","sourceRoot":"","sources":["../../../src/application/services/ProjectService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AACzD,OAAO,EAEL,aAAa,EAGd,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAGxE,IAAM,cAAc,GAApB,MAAM,cAAc;IAE2B;IACH;IACA;IACJ;IAJ7C,YACoD,iBAAoC,EACvC,UAA0B,EAC1B,UAA0B,EAC9B,MAAkB;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;QAEF,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;YAC9B,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;gBACzC,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AA9JY,cAAc;IAD1B,UAAU,EAAE;IAGR,WAAA,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;IAC/B,WAAA,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;IAC5B,WAAA,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;IAC5B,WAAA,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;;GALhB,cAAc,CA8J1B"}
@@ -0,0 +1,62 @@
1
+ import type { LoggerPort, FileSystemPort } from '../../domain/ports.js';
2
+ import { WorkflowPhase } from '../../domain/types.js';
3
+ import type { Project } from '../../domain/types.js';
4
+ import type { CodeQualityAnalyzerPort, QualityReport } from '../../domain/quality/index.js';
5
+ import { QualityScore, ViolationSeverity, ImprovementPriority } from '../../domain/quality/index.js';
6
+ export interface QualityGateConfig {
7
+ readonly enforceOnPhases: WorkflowPhase[];
8
+ readonly minimumScore: QualityScore;
9
+ readonly maxCriticalViolations: number;
10
+ readonly maxMajorViolations: number;
11
+ readonly requiredImprovements: ImprovementPriority[];
12
+ readonly excludePatterns: string[];
13
+ readonly includePatterns: string[];
14
+ readonly failOnGarbage: boolean;
15
+ readonly generateReports: boolean;
16
+ }
17
+ export interface QualityGateResult {
18
+ readonly passed: boolean;
19
+ readonly phase: WorkflowPhase;
20
+ readonly project: Project;
21
+ readonly report: QualityReport;
22
+ readonly blockers: QualityBlocker[];
23
+ readonly warnings: QualityWarning[];
24
+ readonly recommendations: string[];
25
+ readonly executedAt: Date;
26
+ }
27
+ export interface QualityBlocker {
28
+ readonly type: 'score' | 'violations' | 'debt';
29
+ readonly severity: ViolationSeverity;
30
+ readonly description: string;
31
+ readonly files: string[];
32
+ readonly suggestedAction: string;
33
+ readonly estimatedEffort: string;
34
+ }
35
+ export interface QualityWarning {
36
+ readonly type: 'trend' | 'pattern' | 'maintenance';
37
+ readonly description: string;
38
+ readonly impact: string;
39
+ readonly suggestion: string;
40
+ }
41
+ export declare class QualityGateService {
42
+ private readonly logger;
43
+ private readonly fileSystem;
44
+ private readonly qualityAnalyzer;
45
+ private readonly config;
46
+ constructor(logger: LoggerPort, fileSystem: FileSystemPort, qualityAnalyzer: CodeQualityAnalyzerPort, config?: Partial<QualityGateConfig>);
47
+ executeQualityGate(project: Project, phase: WorkflowPhase, customConfig?: Partial<QualityGateConfig>): Promise<QualityGateResult>;
48
+ validateRequirementsQuality(project: Project): Promise<QualityGateResult>;
49
+ validateDesignQuality(project: Project): Promise<QualityGateResult>;
50
+ validateTasksQuality(project: Project): Promise<QualityGateResult>;
51
+ validateImplementationQuality(project: Project): Promise<QualityGateResult>;
52
+ private discoverSourceFiles;
53
+ private findFilesRecursively;
54
+ private analyzeSourceFiles;
55
+ private evaluateQualityCriteria;
56
+ private generateWarnings;
57
+ private generateRecommendations;
58
+ private generateQualityReport;
59
+ private createPassingResult;
60
+ getQualityConfig(): Promise<QualityGateConfig>;
61
+ updateQualityConfig(updates: Partial<QualityGateConfig>): Promise<void>;
62
+ }
@@ -0,0 +1,428 @@
1
+ // Quality gate service for integrating code quality enforcement throughout the SDD workflow
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ import { injectable, inject } from 'inversify';
15
+ import { WorkflowPhase } from '../../domain/types.js';
16
+ import { QualityScore, ViolationSeverity, ImprovementPriority } from '../../domain/quality/index.js';
17
+ import { TYPES } from '../../infrastructure/di/types.js';
18
+ const DEFAULT_QUALITY_CONFIG = {
19
+ enforceOnPhases: [WorkflowPhase.REQUIREMENTS, WorkflowPhase.DESIGN, WorkflowPhase.TASKS, WorkflowPhase.IMPLEMENTATION],
20
+ minimumScore: QualityScore.PASSABLE,
21
+ maxCriticalViolations: 0,
22
+ maxMajorViolations: 5,
23
+ requiredImprovements: [ImprovementPriority.HIGH],
24
+ excludePatterns: ['*.test.ts', '*.spec.ts', 'node_modules/**', 'dist/**'],
25
+ includePatterns: ['src/**/*.ts', 'src/**/*.js'],
26
+ failOnGarbage: true,
27
+ generateReports: true
28
+ };
29
+ let QualityGateService = class QualityGateService {
30
+ logger;
31
+ fileSystem;
32
+ qualityAnalyzer;
33
+ config;
34
+ constructor(logger, fileSystem, qualityAnalyzer, config = {}) {
35
+ this.logger = logger;
36
+ this.fileSystem = fileSystem;
37
+ this.qualityAnalyzer = qualityAnalyzer;
38
+ this.config = { ...DEFAULT_QUALITY_CONFIG, ...config };
39
+ }
40
+ async executeQualityGate(project, phase, customConfig) {
41
+ const effectiveConfig = customConfig
42
+ ? { ...this.config, ...customConfig }
43
+ : this.config;
44
+ this.logger.info('Executing quality gate', {
45
+ projectId: project.id,
46
+ phase,
47
+ minimumScore: effectiveConfig.minimumScore
48
+ });
49
+ try {
50
+ // Check if quality gate should run for this phase
51
+ if (!effectiveConfig.enforceOnPhases.includes(phase)) {
52
+ this.logger.debug('Quality gate skipped for phase', { phase });
53
+ return this.createPassingResult(project, phase);
54
+ }
55
+ // Discover and analyze source files
56
+ const sourceFiles = await this.discoverSourceFiles(project, effectiveConfig);
57
+ if (sourceFiles.length === 0) {
58
+ this.logger.warn('No source files found for quality analysis', {
59
+ projectPath: project.path,
60
+ patterns: effectiveConfig.includePatterns
61
+ });
62
+ return this.createPassingResult(project, phase);
63
+ }
64
+ // Perform quality analysis
65
+ const analysisResults = await this.analyzeSourceFiles(sourceFiles);
66
+ const qualityReport = await this.qualityAnalyzer.getQualityReport(analysisResults);
67
+ // Evaluate quality gate criteria
68
+ const blockers = this.evaluateQualityCriteria(qualityReport, effectiveConfig);
69
+ const warnings = this.generateWarnings(qualityReport);
70
+ const recommendations = this.generateRecommendations(qualityReport, phase);
71
+ const passed = blockers.length === 0;
72
+ // Generate quality report if enabled
73
+ if (effectiveConfig.generateReports) {
74
+ await this.generateQualityReport(project, phase, qualityReport);
75
+ }
76
+ const result = {
77
+ passed,
78
+ phase,
79
+ project,
80
+ report: qualityReport,
81
+ blockers,
82
+ warnings,
83
+ recommendations,
84
+ executedAt: new Date()
85
+ };
86
+ this.logger.info('Quality gate completed', {
87
+ projectId: project.id,
88
+ phase,
89
+ passed,
90
+ blockersCount: blockers.length,
91
+ warningsCount: warnings.length
92
+ });
93
+ return result;
94
+ }
95
+ catch (error) {
96
+ this.logger.error('Quality gate execution failed', {
97
+ projectId: project.id,
98
+ phase,
99
+ error: error instanceof Error ? error.message : String(error)
100
+ });
101
+ throw error;
102
+ }
103
+ }
104
+ async validateRequirementsQuality(project) {
105
+ // Requirements phase: Focus on clarity, completeness, and testability
106
+ const config = {
107
+ minimumScore: QualityScore.PASSABLE,
108
+ maxCriticalViolations: 0,
109
+ maxMajorViolations: 3,
110
+ includePatterns: ['**/requirements.md', '**/specs/**/*.md']
111
+ };
112
+ return this.executeQualityGate(project, WorkflowPhase.REQUIREMENTS, config);
113
+ }
114
+ async validateDesignQuality(project) {
115
+ // Design phase: Focus on architecture, modularity, and maintainability
116
+ const config = {
117
+ minimumScore: QualityScore.PASSABLE,
118
+ maxCriticalViolations: 0,
119
+ maxMajorViolations: 5,
120
+ requiredImprovements: [ImprovementPriority.HIGH],
121
+ includePatterns: ['**/design.md', 'src/**/*.ts', '!src/**/*.test.ts']
122
+ };
123
+ return this.executeQualityGate(project, WorkflowPhase.DESIGN, config);
124
+ }
125
+ async validateTasksQuality(project) {
126
+ // Tasks phase: Focus on implementation plan quality and feasibility
127
+ const config = {
128
+ minimumScore: QualityScore.PASSABLE,
129
+ maxCriticalViolations: 0,
130
+ maxMajorViolations: 2,
131
+ includePatterns: ['**/tasks.md', 'src/**/*.ts']
132
+ };
133
+ return this.executeQualityGate(project, WorkflowPhase.TASKS, config);
134
+ }
135
+ async validateImplementationQuality(project) {
136
+ // Implementation phase: Full code quality analysis
137
+ const config = {
138
+ minimumScore: QualityScore.PASSABLE,
139
+ maxCriticalViolations: 0,
140
+ maxMajorViolations: 10,
141
+ requiredImprovements: [ImprovementPriority.HIGH, ImprovementPriority.MEDIUM],
142
+ failOnGarbage: true
143
+ };
144
+ return this.executeQualityGate(project, WorkflowPhase.IMPLEMENTATION, config);
145
+ }
146
+ async discoverSourceFiles(project, config) {
147
+ const files = [];
148
+ try {
149
+ // This is a simplified implementation - in production, would use glob patterns
150
+ const srcDir = `${project.path}/src`;
151
+ if (await this.fileSystem.exists(srcDir)) {
152
+ const sourceFiles = await this.findFilesRecursively(srcDir, config.includePatterns, config.excludePatterns);
153
+ for (const filePath of sourceFiles) {
154
+ try {
155
+ const content = await this.fileSystem.readFile(filePath);
156
+ files.push({ path: filePath, content });
157
+ }
158
+ catch (error) {
159
+ this.logger.warn('Failed to read source file', {
160
+ filePath,
161
+ error: error instanceof Error ? error.message : String(error)
162
+ });
163
+ }
164
+ }
165
+ }
166
+ // Also check documentation files for requirements/design phases
167
+ const docsFiles = [
168
+ `${project.path}/.kiro/specs/${project.name}/requirements.md`,
169
+ `${project.path}/.kiro/specs/${project.name}/design.md`,
170
+ `${project.path}/.kiro/specs/${project.name}/tasks.md`
171
+ ];
172
+ for (const filePath of docsFiles) {
173
+ if (await this.fileSystem.exists(filePath)) {
174
+ try {
175
+ const content = await this.fileSystem.readFile(filePath);
176
+ files.push({ path: filePath, content });
177
+ }
178
+ catch (error) {
179
+ this.logger.debug('Failed to read documentation file', {
180
+ filePath,
181
+ error: error instanceof Error ? error.message : String(error)
182
+ });
183
+ }
184
+ }
185
+ }
186
+ }
187
+ catch (error) {
188
+ this.logger.error('Failed to discover source files', {
189
+ projectPath: project.path,
190
+ error: error instanceof Error ? error.message : String(error)
191
+ });
192
+ }
193
+ return files;
194
+ }
195
+ async findFilesRecursively(dir, includePatterns, excludePatterns) {
196
+ // Simplified file discovery - in production would use proper glob matching
197
+ const files = [];
198
+ try {
199
+ if (await this.fileSystem.exists(dir)) {
200
+ // This is a placeholder - would implement proper recursive file discovery
201
+ const typescriptFiles = [
202
+ `${dir}/index.ts`,
203
+ `${dir}/main.ts`,
204
+ `${dir}/app.ts`
205
+ ];
206
+ for (const file of typescriptFiles) {
207
+ if (await this.fileSystem.exists(file)) {
208
+ files.push(file);
209
+ }
210
+ }
211
+ }
212
+ }
213
+ catch (error) {
214
+ this.logger.error('File discovery failed', {
215
+ dir,
216
+ error: error instanceof Error ? error.message : String(error)
217
+ });
218
+ }
219
+ return files;
220
+ }
221
+ async analyzeSourceFiles(sourceFiles) {
222
+ const results = [];
223
+ for (const file of sourceFiles) {
224
+ try {
225
+ const analysis = await this.qualityAnalyzer.analyzeFile(file.path, file.content);
226
+ results.push(analysis);
227
+ }
228
+ catch (error) {
229
+ this.logger.warn('Failed to analyze source file', {
230
+ filePath: file.path,
231
+ error: error instanceof Error ? error.message : String(error)
232
+ });
233
+ }
234
+ }
235
+ return results;
236
+ }
237
+ evaluateQualityCriteria(report, config) {
238
+ const blockers = [];
239
+ // Check overall quality score
240
+ if (config.failOnGarbage && report.overall === QualityScore.GARBAGE) {
241
+ blockers.push({
242
+ type: 'score',
243
+ severity: ViolationSeverity.CRITICAL,
244
+ description: 'Overall code quality is rated as GARBAGE',
245
+ files: report.files.filter(f => f.overallScore === QualityScore.GARBAGE).map(f => f.filePath),
246
+ suggestedAction: 'Refactor code to improve taste, reduce complexity, and eliminate special cases',
247
+ estimatedEffort: '16-40 hours'
248
+ });
249
+ }
250
+ // Check minimum score requirement
251
+ const scoreValues = {
252
+ [QualityScore.GOOD]: 3,
253
+ [QualityScore.PASSABLE]: 2,
254
+ [QualityScore.GARBAGE]: 1
255
+ };
256
+ if (scoreValues[report.overall] < scoreValues[config.minimumScore]) {
257
+ blockers.push({
258
+ type: 'score',
259
+ severity: ViolationSeverity.MAJOR,
260
+ description: `Code quality (${report.overall}) is below minimum requirement (${config.minimumScore})`,
261
+ files: report.files.map(f => f.filePath),
262
+ suggestedAction: 'Address quality issues to meet minimum standards',
263
+ estimatedEffort: '4-16 hours'
264
+ });
265
+ }
266
+ // Check violation thresholds
267
+ const criticalViolations = report.files.reduce((sum, file) => sum + file.violations.filter(v => v.severity === ViolationSeverity.CRITICAL).length, 0);
268
+ if (criticalViolations > config.maxCriticalViolations) {
269
+ blockers.push({
270
+ type: 'violations',
271
+ severity: ViolationSeverity.CRITICAL,
272
+ description: `${criticalViolations} critical violations exceed limit of ${config.maxCriticalViolations}`,
273
+ files: report.files.filter(f => f.violations.some(v => v.severity === ViolationSeverity.CRITICAL)).map(f => f.filePath),
274
+ suggestedAction: 'Fix all critical violations before proceeding',
275
+ estimatedEffort: '1-4 hours per violation'
276
+ });
277
+ }
278
+ const majorViolations = report.files.reduce((sum, file) => sum + file.violations.filter(v => v.severity === ViolationSeverity.MAJOR).length, 0);
279
+ if (majorViolations > config.maxMajorViolations) {
280
+ blockers.push({
281
+ type: 'violations',
282
+ severity: ViolationSeverity.MAJOR,
283
+ description: `${majorViolations} major violations exceed limit of ${config.maxMajorViolations}`,
284
+ files: report.files.filter(f => f.violations.some(v => v.severity === ViolationSeverity.MAJOR)).map(f => f.filePath),
285
+ suggestedAction: 'Address major violations to improve code quality',
286
+ estimatedEffort: '30min-2 hours per violation'
287
+ });
288
+ }
289
+ // Check technical debt
290
+ if (report.summary.technicalDebt > 40) {
291
+ blockers.push({
292
+ type: 'debt',
293
+ severity: ViolationSeverity.MAJOR,
294
+ description: `Technical debt of ${report.summary.technicalDebt} hours is too high`,
295
+ files: report.files.map(f => f.filePath),
296
+ suggestedAction: 'Prioritize technical debt reduction',
297
+ estimatedEffort: `${Math.ceil(report.summary.technicalDebt / 4)} days`
298
+ });
299
+ }
300
+ return blockers;
301
+ }
302
+ generateWarnings(report) {
303
+ const warnings = [];
304
+ // Check quality trends
305
+ const decliningTrends = report.trends.filter(t => t.direction === 'degrading');
306
+ if (decliningTrends.length > 0) {
307
+ warnings.push({
308
+ type: 'trend',
309
+ description: `${decliningTrends.length} quality metrics are declining`,
310
+ impact: 'Code quality may continue to degrade over time',
311
+ suggestion: 'Monitor and address declining trends proactively'
312
+ });
313
+ }
314
+ // Check for patterns
315
+ if (report.summary.passableFiles > report.summary.goodFiles) {
316
+ warnings.push({
317
+ type: 'pattern',
318
+ description: 'More files are rated as passable than good',
319
+ impact: 'Overall codebase quality is mediocre',
320
+ suggestion: 'Focus on improving passable files to good quality'
321
+ });
322
+ }
323
+ // Maintenance warnings
324
+ const avgComplexity = report.files.reduce((sum, f) => sum + f.complexityAnalysis.cyclomaticComplexity, 0) / report.files.length;
325
+ if (avgComplexity > 15) {
326
+ warnings.push({
327
+ type: 'maintenance',
328
+ description: 'Average complexity is high across the codebase',
329
+ impact: 'Code will be harder to maintain and debug',
330
+ suggestion: 'Refactor complex functions and reduce branching logic'
331
+ });
332
+ }
333
+ return warnings;
334
+ }
335
+ generateRecommendations(report, phase) {
336
+ const recommendations = [];
337
+ switch (phase) {
338
+ case WorkflowPhase.REQUIREMENTS:
339
+ recommendations.push('Ensure requirements are testable and measurable');
340
+ recommendations.push('Review requirements with stakeholders for completeness');
341
+ break;
342
+ case WorkflowPhase.DESIGN:
343
+ recommendations.push('Validate architectural decisions against requirements');
344
+ recommendations.push('Consider design patterns for complex interactions');
345
+ if (report.summary.technicalDebt > 20) {
346
+ recommendations.push('Design should minimize technical debt accumulation');
347
+ }
348
+ break;
349
+ case WorkflowPhase.TASKS:
350
+ recommendations.push('Break down complex tasks into smaller, manageable units');
351
+ recommendations.push('Ensure task dependencies are clearly defined');
352
+ break;
353
+ case WorkflowPhase.IMPLEMENTATION:
354
+ recommendations.push('Focus on high-priority quality improvements first');
355
+ if (report.summary.garbageFiles > 0) {
356
+ recommendations.push('Refactor garbage-quality files before proceeding');
357
+ }
358
+ recommendations.push('Add comprehensive tests for complex logic');
359
+ break;
360
+ }
361
+ // Add general recommendations based on report
362
+ if (report.summary.technicalDebt > 10) {
363
+ recommendations.push(`Address ${Math.ceil(report.summary.technicalDebt)} hours of technical debt`);
364
+ }
365
+ return recommendations;
366
+ }
367
+ async generateQualityReport(project, phase, report) {
368
+ try {
369
+ const reportDir = `${project.path}/.kiro/quality`;
370
+ await this.fileSystem.mkdir(reportDir);
371
+ const reportPath = `${reportDir}/quality-report-${phase.toLowerCase()}-${Date.now()}.json`;
372
+ const reportContent = JSON.stringify(report, null, 2);
373
+ await this.fileSystem.writeFile(reportPath, reportContent);
374
+ this.logger.debug('Quality report generated', { reportPath });
375
+ }
376
+ catch (error) {
377
+ this.logger.warn('Failed to generate quality report', {
378
+ projectId: project.id,
379
+ phase,
380
+ error: error instanceof Error ? error.message : String(error)
381
+ });
382
+ }
383
+ }
384
+ createPassingResult(project, phase) {
385
+ return {
386
+ passed: true,
387
+ phase,
388
+ project,
389
+ report: {
390
+ overall: QualityScore.GOOD,
391
+ summary: {
392
+ totalFiles: 0,
393
+ goodFiles: 0,
394
+ passableFiles: 0,
395
+ garbageFiles: 0,
396
+ averageScore: 10,
397
+ topIssues: [],
398
+ technicalDebt: 0
399
+ },
400
+ files: [],
401
+ trends: [],
402
+ recommendations: [],
403
+ generatedAt: new Date()
404
+ },
405
+ blockers: [],
406
+ warnings: [],
407
+ recommendations: [],
408
+ executedAt: new Date()
409
+ };
410
+ }
411
+ // Public utility methods
412
+ async getQualityConfig() {
413
+ return this.config;
414
+ }
415
+ async updateQualityConfig(updates) {
416
+ Object.assign(this.config, updates);
417
+ this.logger.info('Quality gate configuration updated', updates);
418
+ }
419
+ };
420
+ QualityGateService = __decorate([
421
+ injectable(),
422
+ __param(0, inject(TYPES.LoggerPort)),
423
+ __param(1, inject(TYPES.FileSystemPort)),
424
+ __param(2, inject(TYPES.CodeQualityAnalyzerPort)),
425
+ __metadata("design:paramtypes", [Object, Object, Object, Object])
426
+ ], QualityGateService);
427
+ export { QualityGateService };
428
+ //# sourceMappingURL=QualityGateService.js.map