edsger 0.41.1 → 0.41.2

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 (103) hide show
  1. package/.claude/settings.local.json +23 -3
  2. package/.env.local +12 -0
  3. package/dist/api/features/__tests__/regression-prevention.test.d.ts +5 -0
  4. package/dist/api/features/__tests__/regression-prevention.test.js +338 -0
  5. package/dist/api/features/__tests__/status-updater.integration.test.d.ts +5 -0
  6. package/dist/api/features/__tests__/status-updater.integration.test.js +497 -0
  7. package/dist/commands/workflow/pipeline-runner.d.ts +17 -0
  8. package/dist/commands/workflow/pipeline-runner.js +393 -0
  9. package/dist/commands/workflow/runner.d.ts +26 -0
  10. package/dist/commands/workflow/runner.js +119 -0
  11. package/dist/commands/workflow/workflow-runner.d.ts +26 -0
  12. package/dist/commands/workflow/workflow-runner.js +119 -0
  13. package/dist/index.js +0 -0
  14. package/dist/phases/code-implementation/analyzer-helpers.d.ts +28 -0
  15. package/dist/phases/code-implementation/analyzer-helpers.js +177 -0
  16. package/dist/phases/code-implementation/analyzer.d.ts +32 -0
  17. package/dist/phases/code-implementation/analyzer.js +629 -0
  18. package/dist/phases/code-implementation/context-fetcher.d.ts +17 -0
  19. package/dist/phases/code-implementation/context-fetcher.js +86 -0
  20. package/dist/phases/code-implementation/mcp-server.d.ts +1 -0
  21. package/dist/phases/code-implementation/mcp-server.js +93 -0
  22. package/dist/phases/code-implementation/prompts-improvement.d.ts +5 -0
  23. package/dist/phases/code-implementation/prompts-improvement.js +108 -0
  24. package/dist/phases/code-implementation-verification/verifier.d.ts +31 -0
  25. package/dist/phases/code-implementation-verification/verifier.js +196 -0
  26. package/dist/phases/code-refine/analyzer.d.ts +41 -0
  27. package/dist/phases/code-refine/analyzer.js +561 -0
  28. package/dist/phases/code-refine/context-fetcher.d.ts +94 -0
  29. package/dist/phases/code-refine/context-fetcher.js +423 -0
  30. package/dist/phases/code-refine-verification/analysis/llm-analyzer.d.ts +22 -0
  31. package/dist/phases/code-refine-verification/analysis/llm-analyzer.js +134 -0
  32. package/dist/phases/code-refine-verification/verifier.d.ts +47 -0
  33. package/dist/phases/code-refine-verification/verifier.js +597 -0
  34. package/dist/phases/code-review/analyzer.d.ts +29 -0
  35. package/dist/phases/code-review/analyzer.js +363 -0
  36. package/dist/phases/code-review/context-fetcher.d.ts +92 -0
  37. package/dist/phases/code-review/context-fetcher.js +296 -0
  38. package/dist/phases/feature-analysis/analyzer-helpers.d.ts +10 -0
  39. package/dist/phases/feature-analysis/analyzer-helpers.js +47 -0
  40. package/dist/phases/feature-analysis/analyzer.d.ts +11 -0
  41. package/dist/phases/feature-analysis/analyzer.js +208 -0
  42. package/dist/phases/feature-analysis/context-fetcher.d.ts +26 -0
  43. package/dist/phases/feature-analysis/context-fetcher.js +134 -0
  44. package/dist/phases/feature-analysis/http-fallback.d.ts +20 -0
  45. package/dist/phases/feature-analysis/http-fallback.js +95 -0
  46. package/dist/phases/feature-analysis/mcp-server.d.ts +1 -0
  47. package/dist/phases/feature-analysis/mcp-server.js +144 -0
  48. package/dist/phases/feature-analysis/prompts-improvement.d.ts +8 -0
  49. package/dist/phases/feature-analysis/prompts-improvement.js +109 -0
  50. package/dist/phases/feature-analysis-verification/verifier.d.ts +37 -0
  51. package/dist/phases/feature-analysis-verification/verifier.js +147 -0
  52. package/dist/phases/pr-execution/file-assigner.js +20 -12
  53. package/dist/phases/technical-design/analyzer-helpers.d.ts +25 -0
  54. package/dist/phases/technical-design/analyzer-helpers.js +39 -0
  55. package/dist/phases/technical-design/analyzer.d.ts +21 -0
  56. package/dist/phases/technical-design/analyzer.js +461 -0
  57. package/dist/phases/technical-design/context-fetcher.d.ts +12 -0
  58. package/dist/phases/technical-design/context-fetcher.js +39 -0
  59. package/dist/phases/technical-design/http-fallback.d.ts +17 -0
  60. package/dist/phases/technical-design/http-fallback.js +151 -0
  61. package/dist/phases/technical-design/mcp-server.d.ts +1 -0
  62. package/dist/phases/technical-design/mcp-server.js +157 -0
  63. package/dist/phases/technical-design/prompts-improvement.d.ts +5 -0
  64. package/dist/phases/technical-design/prompts-improvement.js +93 -0
  65. package/dist/phases/technical-design-verification/verifier.d.ts +53 -0
  66. package/dist/phases/technical-design-verification/verifier.js +170 -0
  67. package/dist/services/feature-branches.d.ts +77 -0
  68. package/dist/services/feature-branches.js +205 -0
  69. package/dist/workflow-runner/config/phase-configs.d.ts +5 -0
  70. package/dist/workflow-runner/config/phase-configs.js +120 -0
  71. package/dist/workflow-runner/core/feature-filter.d.ts +16 -0
  72. package/dist/workflow-runner/core/feature-filter.js +46 -0
  73. package/dist/workflow-runner/core/index.d.ts +8 -0
  74. package/dist/workflow-runner/core/index.js +12 -0
  75. package/dist/workflow-runner/core/pipeline-evaluator.d.ts +24 -0
  76. package/dist/workflow-runner/core/pipeline-evaluator.js +32 -0
  77. package/dist/workflow-runner/core/state-manager.d.ts +24 -0
  78. package/dist/workflow-runner/core/state-manager.js +42 -0
  79. package/dist/workflow-runner/core/workflow-logger.d.ts +20 -0
  80. package/dist/workflow-runner/core/workflow-logger.js +65 -0
  81. package/dist/workflow-runner/executors/phase-executor.d.ts +8 -0
  82. package/dist/workflow-runner/executors/phase-executor.js +248 -0
  83. package/dist/workflow-runner/feature-workflow-runner.d.ts +26 -0
  84. package/dist/workflow-runner/feature-workflow-runner.js +119 -0
  85. package/dist/workflow-runner/index.d.ts +2 -0
  86. package/dist/workflow-runner/index.js +2 -0
  87. package/dist/workflow-runner/pipeline-runner.d.ts +17 -0
  88. package/dist/workflow-runner/pipeline-runner.js +393 -0
  89. package/dist/workflow-runner/workflow-processor.d.ts +54 -0
  90. package/dist/workflow-runner/workflow-processor.js +170 -0
  91. package/package.json +1 -1
  92. package/dist/services/lifecycle-agent/__tests__/phase-criteria.test.d.ts +0 -4
  93. package/dist/services/lifecycle-agent/__tests__/phase-criteria.test.js +0 -133
  94. package/dist/services/lifecycle-agent/__tests__/transition-rules.test.d.ts +0 -4
  95. package/dist/services/lifecycle-agent/__tests__/transition-rules.test.js +0 -336
  96. package/dist/services/lifecycle-agent/index.d.ts +0 -24
  97. package/dist/services/lifecycle-agent/index.js +0 -25
  98. package/dist/services/lifecycle-agent/phase-criteria.d.ts +0 -57
  99. package/dist/services/lifecycle-agent/phase-criteria.js +0 -335
  100. package/dist/services/lifecycle-agent/transition-rules.d.ts +0 -60
  101. package/dist/services/lifecycle-agent/transition-rules.js +0 -184
  102. package/dist/services/lifecycle-agent/types.d.ts +0 -190
  103. package/dist/services/lifecycle-agent/types.js +0 -12
@@ -1,190 +0,0 @@
1
- /**
2
- * Lifecycle Agent Types
3
- *
4
- * Type definitions for the AI-powered lifecycle agent that manages
5
- * product feature lifecycle decisions: when to advance to the next phase,
6
- * when to re-run the current phase, and when to escalate to a human.
7
- *
8
- * The lifecycle agent evaluates phase outputs against quality criteria
9
- * and makes transition decisions, reducing reliance on manual human
10
- * intervention while preserving the ability to escalate when needed.
11
- */
12
- import type { FeatureStatus } from '../../types/index.js';
13
- import type { ExecutionMode } from '../../types/pipeline.js';
14
- /**
15
- * Decision the lifecycle agent can make after evaluating a phase
16
- *
17
- * - advance: Phase output meets quality criteria, proceed to next phase
18
- * - rerun: Phase output needs improvement, re-run with generated feedback
19
- * - escalate: Agent is uncertain or output requires human judgment
20
- */
21
- export type LifecycleDecision = 'advance' | 'rerun' | 'escalate';
22
- /**
23
- * Result of evaluating a single quality criterion
24
- */
25
- export interface CriterionEvaluation {
26
- /** Criterion identifier matching a CriterionDefinition.id */
27
- readonly criterionId: string;
28
- /** Score from 0-100 for this criterion */
29
- readonly score: number;
30
- /** Whether the criterion meets its minimum threshold */
31
- readonly passed: boolean;
32
- /** Explanation of the evaluation result */
33
- readonly reasoning: string;
34
- /** Specific issues found, if any */
35
- readonly issues?: readonly string[];
36
- }
37
- /**
38
- * Complete evaluation result for a phase execution
39
- * This is the primary output of the lifecycle agent's evaluation step
40
- */
41
- export interface PhaseEvaluationResult {
42
- /** The phase that was evaluated */
43
- readonly phase: string;
44
- /** Feature being evaluated */
45
- readonly featureId: string;
46
- /** Overall quality score (weighted average of criteria scores, 0-100) */
47
- readonly qualityScore: number;
48
- /** Decision: advance, rerun, or escalate */
49
- readonly decision: LifecycleDecision;
50
- /** Agent's confidence in its decision (0-100) */
51
- readonly confidence: number;
52
- /** Individual criterion evaluations */
53
- readonly criteria: readonly CriterionEvaluation[];
54
- /** Summary reasoning for the decision */
55
- readonly reasoning: string;
56
- /** If decision is 'rerun', suggested feedbacks to inject */
57
- readonly suggestedFeedbacks?: readonly SuggestedFeedback[];
58
- /** How many times this phase has been re-run in the current cycle */
59
- readonly rerunCount: number;
60
- /** Timestamp of the evaluation */
61
- readonly evaluatedAt: string;
62
- }
63
- /**
64
- * Feedback suggested by the lifecycle agent when deciding to re-run a phase
65
- * These mirror the existing Feedback structure so they can be injected
66
- * into the feedback system seamlessly
67
- */
68
- export interface SuggestedFeedback {
69
- /** Type of feedback, matching existing FeedbackType */
70
- readonly feedbackType: 'requirement' | 'constraint' | 'preference' | 'context' | 'quality_criteria' | 'issue' | 'suggestion';
71
- /** Short title describing the feedback */
72
- readonly title: string;
73
- /** Detailed content of the feedback */
74
- readonly content: string;
75
- /** Priority from 1-10 (higher = more important) */
76
- readonly priority: number;
77
- /** Which phase this feedback targets */
78
- readonly phase: string;
79
- }
80
- /**
81
- * Definition of a quality criterion for phase evaluation
82
- * Each phase has its own set of criteria that the agent uses to evaluate outputs
83
- */
84
- export interface CriterionDefinition {
85
- /** Unique identifier for this criterion */
86
- readonly id: string;
87
- /** Human-readable name */
88
- readonly name: string;
89
- /** Description of what this criterion measures */
90
- readonly description: string;
91
- /** Relative importance weight (0-1, all weights for a phase should sum to ~1) */
92
- readonly weight: number;
93
- /** Minimum score (0-100) needed to pass this criterion */
94
- readonly minimumScore: number;
95
- /** Prompt instructions for how the AI should evaluate this criterion */
96
- readonly evaluationGuidance: string;
97
- }
98
- /**
99
- * Quality criteria configuration for a specific phase
100
- * Defines the thresholds and criteria used to evaluate that phase's outputs
101
- */
102
- export interface PhaseQualityCriteria {
103
- /** Phase name (underscore format, e.g., 'user_stories_analysis') */
104
- readonly phase: string;
105
- /** Minimum overall quality score needed to auto-advance (0-100) */
106
- readonly advanceThreshold: number;
107
- /** Overall score below which the agent should escalate to human (0-100) */
108
- readonly escalateThreshold: number;
109
- /** Maximum number of automatic re-runs before escalating */
110
- readonly maxAutoRetries: number;
111
- /** Individual quality criteria for this phase */
112
- readonly criteria: readonly CriterionDefinition[];
113
- }
114
- /**
115
- * A transition rule that maps phase evaluation outcomes to actions
116
- */
117
- export interface TransitionRule {
118
- /** Phase this rule applies to (underscore format) */
119
- readonly fromPhase: string;
120
- /** Target phase if advancing */
121
- readonly toPhase: string;
122
- /** Execution mode to use when advancing to the target phase */
123
- readonly executionMode: ExecutionMode;
124
- /** Feature status to set when advancing */
125
- readonly targetStatus: FeatureStatus;
126
- }
127
- /**
128
- * Configuration for the lifecycle agent
129
- * Controls behavior and thresholds for automated lifecycle management
130
- */
131
- export interface LifecycleAgentConfig {
132
- /** Whether the lifecycle agent is enabled for this product */
133
- readonly enabled: boolean;
134
- /** Allow agent to auto-advance phases without human approval */
135
- readonly autoAdvanceEnabled: boolean;
136
- /** Allow agent to auto-rerun phases with generated feedback */
137
- readonly autoRerunEnabled: boolean;
138
- /** Global maximum auto-retries (overrides per-phase if lower) */
139
- readonly maxAutoRetries: number;
140
- /** When confidence is below this threshold, always escalate (0-100) */
141
- readonly confidenceThreshold: number;
142
- /** Per-phase quality criteria overrides (falls back to defaults if not set) */
143
- readonly phaseOverrides?: Partial<Record<string, Partial<PhaseQualityCriteria>>>;
144
- }
145
- /**
146
- * Runtime state for the lifecycle agent managing a specific feature
147
- * Tracks re-run counts and evaluation history
148
- */
149
- export interface LifecycleAgentState {
150
- /** Feature being managed */
151
- readonly featureId: string;
152
- /** Number of re-runs per phase in current cycle */
153
- readonly rerunCounts: Readonly<Record<string, number>>;
154
- /** History of evaluation results */
155
- readonly evaluationHistory: readonly PhaseEvaluationResult[];
156
- }
157
- /**
158
- * Input to the lifecycle agent's evaluate function
159
- * Contains all context needed to evaluate a phase's output
160
- */
161
- export interface PhaseEvaluationInput {
162
- /** Feature ID */
163
- readonly featureId: string;
164
- /** Phase that was just executed */
165
- readonly phase: string;
166
- /** Current feature status */
167
- readonly currentStatus: FeatureStatus;
168
- /** The phase execution result data (varies by phase) */
169
- readonly phaseOutput: unknown;
170
- /** Quality criteria to evaluate against */
171
- readonly qualityCriteria: PhaseQualityCriteria;
172
- /** Current re-run count for this phase */
173
- readonly rerunCount: number;
174
- /** Agent configuration */
175
- readonly config: LifecycleAgentConfig;
176
- }
177
- /**
178
- * Output from the lifecycle agent's decide function
179
- * Contains the decision and all information needed to execute it
180
- */
181
- export interface LifecycleDecisionResult {
182
- /** The evaluation that led to this decision */
183
- readonly evaluation: PhaseEvaluationResult;
184
- /** The transition to execute if advancing */
185
- readonly transition?: TransitionRule;
186
- /** Execution mode to use (for both advance and rerun scenarios) */
187
- readonly executionMode?: ExecutionMode;
188
- /** Feature status to set */
189
- readonly targetStatus?: FeatureStatus;
190
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * Lifecycle Agent Types
3
- *
4
- * Type definitions for the AI-powered lifecycle agent that manages
5
- * product feature lifecycle decisions: when to advance to the next phase,
6
- * when to re-run the current phase, and when to escalate to a human.
7
- *
8
- * The lifecycle agent evaluates phase outputs against quality criteria
9
- * and makes transition decisions, reducing reliance on manual human
10
- * intervention while preserving the ability to escalate when needed.
11
- */
12
- export {};