edsger 0.2.2 → 0.2.4

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 (87) hide show
  1. package/README.md +17 -0
  2. package/dist/api/features/batch-operations.d.ts +16 -0
  3. package/dist/api/features/batch-operations.js +100 -0
  4. package/dist/api/features/index.d.ts +1 -0
  5. package/dist/api/features/index.js +1 -0
  6. package/dist/api/features/test-cases.d.ts +8 -0
  7. package/dist/api/features/test-cases.js +45 -0
  8. package/dist/api/features/user-stories.d.ts +8 -0
  9. package/dist/api/features/user-stories.js +45 -0
  10. package/dist/cli/commands/refactor-command.d.ts +2 -0
  11. package/dist/cli/commands/refactor-command.js +107 -0
  12. package/dist/cli/index.js +7 -0
  13. package/dist/cli.d.ts +2 -2
  14. package/dist/cli.js +4 -99
  15. package/dist/phases/code-implementation/analyzer-helpers.d.ts +28 -0
  16. package/dist/phases/code-implementation/analyzer-helpers.js +177 -0
  17. package/dist/phases/code-implementation/analyzer.d.ts +2 -0
  18. package/dist/phases/code-implementation/analyzer.js +308 -179
  19. package/dist/phases/code-implementation-verification/index.d.ts +1 -0
  20. package/dist/phases/code-implementation-verification/index.js +1 -0
  21. package/dist/phases/code-implementation-verification/verifier.d.ts +31 -0
  22. package/dist/phases/code-implementation-verification/verifier.js +196 -0
  23. package/dist/phases/feature-analysis/analyzer-helpers.d.ts +62 -0
  24. package/dist/phases/feature-analysis/analyzer-helpers.js +450 -0
  25. package/dist/phases/feature-analysis/analyzer.d.ts +1 -0
  26. package/dist/phases/feature-analysis/analyzer.js +132 -213
  27. package/dist/phases/feature-analysis-verification/index.d.ts +1 -0
  28. package/dist/phases/feature-analysis-verification/index.js +1 -0
  29. package/dist/phases/feature-analysis-verification/verifier.d.ts +37 -0
  30. package/dist/phases/feature-analysis-verification/verifier.js +147 -0
  31. package/dist/phases/pull-request/creator.js +10 -9
  32. package/dist/phases/technical-design/analyzer-helpers.d.ts +37 -0
  33. package/dist/phases/technical-design/analyzer-helpers.js +144 -0
  34. package/dist/phases/technical-design/analyzer.d.ts +3 -0
  35. package/dist/phases/technical-design/analyzer.js +282 -312
  36. package/dist/phases/technical-design-verification/index.d.ts +1 -0
  37. package/dist/phases/technical-design-verification/index.js +1 -0
  38. package/dist/phases/technical-design-verification/verifier.d.ts +36 -0
  39. package/dist/phases/technical-design-verification/verifier.js +147 -0
  40. package/dist/prompts/checklist-verification.d.ts +11 -0
  41. package/dist/prompts/checklist-verification.js +153 -0
  42. package/dist/prompts/code-implementation-improvement.d.ts +5 -0
  43. package/dist/prompts/code-implementation-improvement.js +108 -0
  44. package/dist/prompts/code-implementation-verification.d.ts +3 -0
  45. package/dist/prompts/code-implementation-verification.js +176 -0
  46. package/dist/prompts/feature-analysis-improvement.d.ts +8 -0
  47. package/dist/prompts/feature-analysis-improvement.js +109 -0
  48. package/dist/prompts/feature-analysis.js +1 -1
  49. package/dist/prompts/formatters.d.ts +17 -4
  50. package/dist/prompts/formatters.js +41 -12
  51. package/dist/prompts/technical-design-improvement.d.ts +5 -0
  52. package/dist/prompts/technical-design-improvement.js +93 -0
  53. package/dist/prompts/technical-design-verification.d.ts +11 -0
  54. package/dist/prompts/technical-design-verification.js +134 -0
  55. package/dist/prompts/technical-design.js +1 -1
  56. package/dist/services/audit-logs.d.ts +60 -0
  57. package/dist/services/audit-logs.js +115 -0
  58. package/dist/services/checklist.d.ts +1 -0
  59. package/dist/types/index.d.ts +19 -0
  60. package/dist/utils/image-downloader.d.ts +32 -0
  61. package/dist/utils/image-downloader.js +144 -0
  62. package/dist/workflow-runner/executors/phase-executor.js +56 -12
  63. package/package.json +1 -1
  64. package/dist/api/features.d.ts +0 -100
  65. package/dist/api/features.js +0 -219
  66. package/dist/logger.d.ts +0 -19
  67. package/dist/logger.js +0 -52
  68. package/dist/types.d.ts +0 -99
  69. package/dist/types.js +0 -1
  70. package/dist/workflow-runner/config/stage-configs.d.ts +0 -5
  71. package/dist/workflow-runner/config/stage-configs.js +0 -34
  72. package/dist/workflow-runner/core/feature-filter.test.d.ts +0 -4
  73. package/dist/workflow-runner/core/feature-filter.test.js +0 -127
  74. package/dist/workflow-runner/executors/stage-executor.d.ts +0 -8
  75. package/dist/workflow-runner/executors/stage-executor.js +0 -49
  76. package/dist/workflow-runner/feature-fetcher.d.ts +0 -41
  77. package/dist/workflow-runner/feature-fetcher.js +0 -121
  78. package/dist/workflow-runner/feature-service.d.ts +0 -17
  79. package/dist/workflow-runner/feature-service.js +0 -60
  80. package/dist/workflow-runner/pipeline.d.ts +0 -18
  81. package/dist/workflow-runner/pipeline.js +0 -197
  82. package/dist/workflow-runner/processor.d.ts +0 -40
  83. package/dist/workflow-runner/processor.js +0 -191
  84. package/dist/workflow-runner/status-updater.d.ts +0 -27
  85. package/dist/workflow-runner/status-updater.js +0 -80
  86. package/dist/workflow-runner/types.d.ts +0 -48
  87. package/dist/workflow-runner/types.js +0 -4
@@ -1,80 +0,0 @@
1
- /**
2
- * Feature status updater for workflow pipeline
3
- * Updates feature status at each stage of the development workflow
4
- */
5
- /**
6
- * Update feature status via MCP endpoint
7
- */
8
- export async function updateFeatureStatus({ mcpServerUrl, mcpToken, featureId, status, verbose = false, }) {
9
- try {
10
- if (verbose) {
11
- console.log(`📊 Updating feature ${featureId} status to: ${status}`);
12
- }
13
- const response = await fetch(`${mcpServerUrl}/mcp`, {
14
- method: 'POST',
15
- headers: {
16
- 'Content-Type': 'application/json',
17
- Authorization: `Bearer ${mcpToken}`,
18
- },
19
- body: JSON.stringify({
20
- jsonrpc: '2.0',
21
- method: 'features/update',
22
- params: {
23
- feature_id: featureId,
24
- status,
25
- },
26
- id: Math.random().toString(36).substring(7),
27
- }),
28
- });
29
- if (!response.ok) {
30
- throw new Error(`HTTP ${response.status}: ${response.statusText}`);
31
- }
32
- const data = await response.json();
33
- if (data.error) {
34
- throw new Error(data.error.message || 'Status update failed');
35
- }
36
- if (verbose) {
37
- console.log(`✅ Feature status updated successfully to: ${status}`);
38
- }
39
- return true;
40
- }
41
- catch (error) {
42
- if (verbose) {
43
- console.error(`❌ Failed to update feature status: ${error instanceof Error ? error.message : String(error)}`);
44
- }
45
- return false;
46
- }
47
- }
48
- /**
49
- * Map pipeline stage to feature status
50
- */
51
- export const getStatusForStage = (stage) => {
52
- switch (stage) {
53
- case 'feature-analysis':
54
- return 'feature_analysis';
55
- case 'technical-design':
56
- return 'technical_design';
57
- case 'code-implementation':
58
- return 'code_implementation';
59
- case 'functional-testing':
60
- return 'testing_in_progress';
61
- case 'testing-passed':
62
- return 'testing_passed';
63
- case 'testing-failed':
64
- return 'testing_failed';
65
- default:
66
- return 'backlog';
67
- }
68
- };
69
- /**
70
- * Update feature status based on pipeline stage
71
- */
72
- export const updateFeatureStatusForStage = (mcpConfig, featureId, stage, verbose) => {
73
- const status = getStatusForStage(stage);
74
- return updateFeatureStatus({
75
- ...mcpConfig,
76
- featureId,
77
- status,
78
- verbose,
79
- });
80
- };
@@ -1,48 +0,0 @@
1
- /**
2
- * Types and interfaces for workflow processor
3
- */
4
- import { EdsgerConfig } from '../types.js';
5
- export interface WorkflowOptions {
6
- readonly productId: string;
7
- readonly mcpServerUrl: string;
8
- readonly mcpToken: string;
9
- readonly pollInterval?: number;
10
- readonly maxRetries?: number;
11
- readonly verbose?: boolean;
12
- readonly githubToken?: string;
13
- readonly githubOwner?: string;
14
- readonly githubRepo?: string;
15
- readonly githubBaseBranch?: string;
16
- }
17
- export interface PipelineStageOptions {
18
- readonly featureId: string;
19
- readonly mcpServerUrl: string;
20
- readonly mcpToken: string;
21
- readonly verbose?: boolean;
22
- }
23
- export interface PipelineResult {
24
- readonly featureId: string;
25
- readonly stage: string;
26
- readonly status: 'success' | 'error';
27
- readonly message: string;
28
- readonly data?: unknown;
29
- }
30
- export interface FeatureProcessingState {
31
- readonly featureId: string;
32
- readonly retryCount: number;
33
- readonly lastAttempt: Date;
34
- readonly status: 'processing' | 'completed' | 'failed';
35
- }
36
- export interface WorkflowStats {
37
- readonly totalProcessed: number;
38
- readonly completed: number;
39
- readonly failed: number;
40
- readonly processing: number;
41
- readonly isRunning: boolean;
42
- }
43
- export interface StageConfig {
44
- readonly name: string;
45
- readonly checkRequirements: () => Promise<boolean>;
46
- readonly execute: (options: PipelineStageOptions, config: EdsgerConfig) => Promise<any>;
47
- readonly requirementsError: string;
48
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * Types and interfaces for workflow processor
3
- */
4
- export {};