edsger 0.10.3 → 0.11.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.
@@ -1,11 +1,12 @@
1
+ import { UserStoryStatus, TestCaseStatus } from '../../types/index.js';
1
2
  /**
2
3
  * Batch update user story statuses
3
4
  */
4
- export declare function batchUpdateUserStoryStatus(userStoryIds: string[], status: 'draft' | 'ready' | 'in_progress' | 'done' | 'cancelled', verbose?: boolean): Promise<boolean>;
5
+ export declare function batchUpdateUserStoryStatus(userStoryIds: string[], status: UserStoryStatus, verbose?: boolean): Promise<boolean>;
5
6
  /**
6
7
  * Batch update test case statuses
7
8
  */
8
- export declare function batchUpdateTestCaseStatus(testCaseIds: string[], status: 'draft' | 'ready' | 'in_progress' | 'done' | 'cancelled', verbose?: boolean): Promise<boolean>;
9
+ export declare function batchUpdateTestCaseStatus(testCaseIds: string[], status: TestCaseStatus, verbose?: boolean): Promise<boolean>;
9
10
  /**
10
11
  * Batch delete user stories
11
12
  */
@@ -1,4 +1,4 @@
1
- import { TestCase } from '../../types/features.js';
1
+ import { TestCase, TestCaseStatus } from '../../types/features.js';
2
2
  /**
3
3
  * Get test cases for a feature
4
4
  */
@@ -26,4 +26,4 @@ export declare function deleteTestCase(testCaseId: string, verbose?: boolean): P
26
26
  /**
27
27
  * Update test case status
28
28
  */
29
- export declare function updateTestCaseStatus(testCaseId: string, status: 'draft' | 'ready' | 'in_progress' | 'done' | 'cancelled', verbose?: boolean): Promise<boolean>;
29
+ export declare function updateTestCaseStatus(testCaseId: string, status: TestCaseStatus, verbose?: boolean): Promise<boolean>;
@@ -1,4 +1,4 @@
1
- import { UserStory } from '../../types/features.js';
1
+ import { UserStory, UserStoryStatus } from '../../types/features.js';
2
2
  /**
3
3
  * Get user stories for a feature
4
4
  */
@@ -11,14 +11,6 @@ export declare function createUserStory(featureId: string, userStory: {
11
11
  description: string;
12
12
  status?: string;
13
13
  }, verbose?: boolean): Promise<boolean>;
14
- /**
15
- * Create multiple user stories for a feature
16
- */
17
- export declare function createUserStories(mcpServerUrl: string, mcpToken: string, featureId: string, userStories: Array<{
18
- title: string;
19
- description: string;
20
- status?: string;
21
- }>, verbose?: boolean): Promise<boolean>;
22
14
  /**
23
15
  * Delete a user story
24
16
  */
@@ -26,4 +18,4 @@ export declare function deleteUserStory(userStoryId: string, verbose?: boolean):
26
18
  /**
27
19
  * Update user story status
28
20
  */
29
- export declare function updateUserStoryStatus(userStoryId: string, status: 'draft' | 'ready' | 'in_progress' | 'done' | 'cancelled', verbose?: boolean): Promise<boolean>;
21
+ export declare function updateUserStoryStatus(userStoryId: string, status: UserStoryStatus, verbose?: boolean): Promise<boolean>;
@@ -41,28 +41,6 @@ export async function createUserStory(featureId, userStory, verbose) {
41
41
  return false;
42
42
  }
43
43
  }
44
- /**
45
- * Create multiple user stories for a feature
46
- */
47
- export async function createUserStories(mcpServerUrl, mcpToken, featureId, userStories, verbose) {
48
- try {
49
- if (verbose) {
50
- logInfo(`Creating ${userStories.length} user stories for feature: ${featureId}`);
51
- }
52
- for (const story of userStories) {
53
- await createUserStory(featureId, story, false);
54
- }
55
- if (verbose) {
56
- logInfo('✅ All user stories created successfully');
57
- }
58
- return true;
59
- }
60
- catch (error) {
61
- const errorMessage = error instanceof Error ? error.message : String(error);
62
- logError(`Failed to create user stories: ${errorMessage}`);
63
- return false;
64
- }
65
- }
66
44
  /**
67
45
  * Delete a user story
68
46
  */
@@ -1,4 +1,3 @@
1
- import { createUserStories, createTestCases } from '../../api/features/index.js';
2
1
  import type { FeatureInfo, UserStory, TestCase } from '../../types/features.js';
3
2
  import { type ProductInfo } from '../../api/products.js';
4
3
  import { ChecklistPhaseContext } from '../../services/checklist.js';
@@ -12,7 +11,6 @@ export interface FeatureAnalysisContext {
12
11
  * Fetch all feature analysis context information via MCP endpoints
13
12
  */
14
13
  export declare function fetchFeatureAnalysisContext(featureId: string, verbose?: boolean): Promise<FeatureAnalysisContext>;
15
- export { createUserStories, createTestCases };
16
14
  /**
17
15
  * Format the context into a readable string for Claude Code
18
16
  */
@@ -1,5 +1,5 @@
1
1
  import { logInfo, logError } from '../../utils/logger.js';
2
- import { getFeature, getUserStories, createUserStories, getTestCases, createTestCases, } from '../../api/features/index.js';
2
+ import { getFeature, getUserStories, getTestCases, } from '../../api/features/index.js';
3
3
  import { getProduct } from '../../api/products.js';
4
4
  import { formatChecklistsForContext, } from '../../services/checklist.js';
5
5
  import { getFeedbacksForPhase, formatFeedbacksForContext, } from '../../services/feedbacks.js';
@@ -40,8 +40,6 @@ export async function fetchFeatureAnalysisContext(featureId, verbose) {
40
40
  throw new Error(`Context fetch failed: ${errorMessage}`);
41
41
  }
42
42
  }
43
- // Re-export the create functions for convenience
44
- export { createUserStories, createTestCases };
45
43
  /**
46
44
  * Format the context into a readable string for Claude Code
47
45
  */
@@ -180,7 +180,7 @@ export function buildAnalysisResult(featureId, context, structuredAnalysisResult
180
180
  featureInfo: context.feature,
181
181
  existingUserStories: context.existing_user_stories.map((story) => ({
182
182
  ...story,
183
- status: story.status,
183
+ status: (story.status === 'ready' ? 'ready' : 'draft'),
184
184
  created_at: story.created_at || new Date().toISOString(),
185
185
  updated_at: story.updated_at || new Date().toISOString(),
186
186
  })),
@@ -193,7 +193,7 @@ export function buildAnalysisResult(featureId, context, structuredAnalysisResult
193
193
  id: '',
194
194
  title: story.title,
195
195
  description: story.description,
196
- status: story.status || 'draft',
196
+ status: 'draft',
197
197
  created_at: new Date().toISOString(),
198
198
  updated_at: new Date().toISOString(),
199
199
  })),
@@ -88,14 +88,16 @@ You MUST return ONLY a JSON object with your analysis results. Do NOT include an
88
88
  {
89
89
  "title": "User story title",
90
90
  "description": "As a [user], I want [goal] so that [benefit]",
91
- "status": "draft"
91
+ "status": "draft",
92
+ "differentiation": "REQUIRED: Explain how this differs from existing user stories. Reference specific existing story titles and explain what new scenario/user type/workflow this covers that is NOT already addressed."
92
93
  }
93
94
  ],
94
95
  "created_test_cases": [
95
96
  {
96
97
  "name": "Test case name",
97
98
  "description": "Detailed test case description with steps and expected outcomes",
98
- "is_critical": true
99
+ "is_critical": true,
100
+ "differentiation": "REQUIRED: Explain how this differs from existing test cases. Reference specific existing test case names and explain what new scenario/edge case this covers that is NOT already tested."
99
101
  }
100
102
  ],
101
103
  "deleted_user_story_ids": [
@@ -141,6 +143,14 @@ deletion_reasons: {"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d": "Duplicate of test ca
141
143
  **EXAMPLE - WRONG (DO NOT DO THIS)**:
142
144
  deleted_test_case_ids: ["Duplicate test case", "Similar test"] // WRONG - these are text, not UUIDs
143
145
 
146
+ **CRITICAL - Differentiation Requirement**:
147
+ - The "differentiation" field is MANDATORY for every new user story and test case
148
+ - You MUST explain WHY this item is NOT a duplicate of existing items
149
+ - Reference specific existing item titles/names when explaining the difference
150
+ - If there are no existing items, write: "First item for this feature - no existing items to compare"
151
+ - If you cannot clearly articulate the difference, DO NOT create the item - it is likely a duplicate
152
+ - Generic explanations like "covers different scenario" are NOT acceptable - be specific
153
+
144
154
  **Quality Guidelines**:
145
155
  - User stories should be clear, concise, and user-focused
146
156
  - Test cases should be comprehensive and cover all scenarios
@@ -300,10 +310,20 @@ You MUST return ONLY the JSON object below. Do NOT include any explanatory text,
300
310
  "status": "success",
301
311
  "summary": "Improved analysis based on verification feedback",
302
312
  "created_user_stories": [
303
- // Include ALL user stories (existing + new)
313
+ {
314
+ "title": "User story title",
315
+ "description": "As a [user], I want [goal] so that [benefit]",
316
+ "status": "draft",
317
+ "differentiation": "REQUIRED: Explain how this differs from existing user stories"
318
+ }
304
319
  ],
305
320
  "created_test_cases": [
306
- // Include ALL test cases (existing + new)
321
+ {
322
+ "name": "Test case name",
323
+ "description": "Detailed test case description",
324
+ "is_critical": true,
325
+ "differentiation": "REQUIRED: Explain how this differs from existing test cases"
326
+ }
307
327
  ],
308
328
  "deleted_user_story_ids": [
309
329
  // UUIDs of user stories to delete
@@ -327,6 +347,11 @@ You MUST return ONLY the JSON object below. Do NOT include any explanatory text,
327
347
  }
328
348
  \`\`\`
329
349
 
350
+ **CRITICAL - Differentiation Requirement**:
351
+ - The "differentiation" field is MANDATORY for every user story and test case
352
+ - You MUST explain WHY each item is NOT a duplicate of existing items
353
+ - If you cannot clearly articulate the difference, DO NOT include the item
354
+
330
355
  MANDATORY: You MUST include checklist_item_results for ALL checklist items in your response. Every checklist item ID must be addressed - either passed or with explanation in notes why it cannot be satisfied. Missing any checklist item will cause the pipeline to fail again.
331
356
 
332
357
  IMPORTANT: Return ONLY the JSON above. Do not add any text explaining what you did or how you improved the analysis. The JSON should be the complete and only content of your response.`;
@@ -10,11 +10,13 @@ export interface FeatureInfo {
10
10
  created_at?: string;
11
11
  updated_at?: string;
12
12
  }
13
+ export type UserStoryStatus = 'draft' | 'ready';
14
+ export type TestCaseStatus = 'draft' | 'ready';
13
15
  export interface UserStory {
14
16
  id: string;
15
17
  title: string;
16
18
  description: string;
17
- status: string;
19
+ status: UserStoryStatus;
18
20
  created_at?: string;
19
21
  updated_at?: string;
20
22
  [key: string]: any;
@@ -24,6 +26,7 @@ export interface TestCase {
24
26
  name: string;
25
27
  description: string;
26
28
  is_critical: boolean;
29
+ status?: TestCaseStatus;
27
30
  created_at?: string;
28
31
  updated_at?: string;
29
32
  [key: string]: any;
@@ -97,11 +97,13 @@ export interface FeatureData {
97
97
  };
98
98
  };
99
99
  }
100
+ export type UserStoryStatus = 'draft' | 'ready';
101
+ export type TestCaseStatus = 'draft' | 'ready';
100
102
  export interface UserStory {
101
103
  id: string;
102
104
  title: string;
103
105
  description: string;
104
- status: 'draft' | 'ready' | 'in_progress' | 'done' | 'cancelled';
106
+ status: UserStoryStatus;
105
107
  created_at: string;
106
108
  updated_at: string;
107
109
  }
@@ -110,7 +112,7 @@ export interface TestCase {
110
112
  name: string;
111
113
  description: string;
112
114
  is_critical: boolean;
113
- status?: 'draft' | 'ready' | 'in_progress' | 'done' | 'cancelled';
115
+ status?: TestCaseStatus;
114
116
  created_at: string;
115
117
  updated_at: string;
116
118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edsger",
3
- "version": "0.10.3",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "edsger": "dist/index.js"