@schnick371/devsteps-shared 0.5.0 → 0.5.1
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.
- package/dist/core/add.d.ts +4 -4
- package/dist/core/add.d.ts.map +1 -1
- package/dist/core/add.js +8 -8
- package/dist/core/add.js.map +1 -1
- package/dist/core/archive.d.ts +2 -2
- package/dist/core/archive.d.ts.map +1 -1
- package/dist/core/archive.js +12 -12
- package/dist/core/archive.js.map +1 -1
- package/dist/core/bulk-update.d.ts +6 -6
- package/dist/core/bulk-update.d.ts.map +1 -1
- package/dist/core/bulk-update.js +11 -11
- package/dist/core/bulk-update.js.map +1 -1
- package/dist/core/context.d.ts +4 -4
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/context.js +14 -14
- package/dist/core/context.js.map +1 -1
- package/dist/core/get.d.ts +1 -1
- package/dist/core/get.d.ts.map +1 -1
- package/dist/core/get.js +5 -5
- package/dist/core/get.js.map +1 -1
- package/dist/core/list.d.ts +3 -3
- package/dist/core/list.d.ts.map +1 -1
- package/dist/core/list.js +7 -7
- package/dist/core/list.js.map +1 -1
- package/dist/core/update.d.ts +1 -1
- package/dist/core/update.d.ts.map +1 -1
- package/dist/core/update.js +7 -7
- package/dist/core/update.js.map +1 -1
- package/dist/schemas/index.d.ts +7 -7
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +5 -5
- package/dist/schemas/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -2
- package/src/core/add.js.map +0 -1
- package/src/core/add.ts +0 -145
- package/src/core/archive.js.map +0 -1
- package/src/core/archive.ts +0 -153
- package/src/core/bulk-update.js.map +0 -1
- package/src/core/bulk-update.ts +0 -180
- package/src/core/context.js.map +0 -1
- package/src/core/context.ts +0 -269
- package/src/core/get.js.map +0 -1
- package/src/core/get.ts +0 -39
- package/src/core/index.js.map +0 -1
- package/src/core/index.ts +0 -26
- package/src/core/list.js.map +0 -1
- package/src/core/list.ts +0 -96
- package/src/core/update.js.map +0 -1
- package/src/core/update.ts +0 -154
- package/src/core/validation.ts +0 -252
- package/src/index.js +0 -21
- package/src/index.js.map +0 -1
- package/src/index.ts +0 -4
- package/src/schemas/index.js.map +0 -1
- package/src/schemas/index.ts +0 -226
- package/src/schemas/project.js.map +0 -1
- package/src/schemas/project.ts +0 -73
- package/src/schemas/relationships.ts +0 -48
- package/src/types/commands.js.map +0 -1
- package/src/types/commands.ts +0 -116
- package/src/types/index.js.map +0 -1
- package/src/types/index.ts +0 -13
- package/src/utils/cache.js.map +0 -1
- package/src/utils/cache.ts +0 -200
- package/src/utils/index.js.map +0 -1
- package/src/utils/index.ts +0 -170
package/src/core/update.ts
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import type {
|
|
4
|
-
DevCrumbsIndex,
|
|
5
|
-
EisenhowerQuadrant,
|
|
6
|
-
ItemMetadata,
|
|
7
|
-
ItemStatus,
|
|
8
|
-
Priority,
|
|
9
|
-
} from '../schemas/index.js';
|
|
10
|
-
import { TYPE_TO_DIRECTORY, getCurrentTimestamp, parseItemId } from '../utils/index.js';
|
|
11
|
-
|
|
12
|
-
export interface UpdateItemArgs {
|
|
13
|
-
id: string;
|
|
14
|
-
status?: ItemStatus;
|
|
15
|
-
priority?: Priority;
|
|
16
|
-
eisenhower?: EisenhowerQuadrant;
|
|
17
|
-
superseded_by?: string;
|
|
18
|
-
title?: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
append_description?: string;
|
|
21
|
-
assignee?: string;
|
|
22
|
-
tags?: string[];
|
|
23
|
-
affected_paths?: string[];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface UpdateItemResult {
|
|
27
|
-
metadata: ItemMetadata;
|
|
28
|
-
oldStatus: ItemStatus;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Core business logic for updating an item
|
|
33
|
-
*/
|
|
34
|
-
export async function updateItem(
|
|
35
|
-
devcrumbsDir: string,
|
|
36
|
-
args: UpdateItemArgs
|
|
37
|
-
): Promise<UpdateItemResult> {
|
|
38
|
-
if (!existsSync(devcrumbsDir)) {
|
|
39
|
-
throw new Error('Project not initialized. Run devcrumbs-init first.');
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const parsed = parseItemId(args.id);
|
|
43
|
-
if (!parsed) {
|
|
44
|
-
throw new Error(`Invalid item ID: ${args.id}`);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const typeFolder = TYPE_TO_DIRECTORY[parsed.type];
|
|
48
|
-
const metadataPath = join(devcrumbsDir, typeFolder, `${args.id}.json`);
|
|
49
|
-
const descriptionPath = join(devcrumbsDir, typeFolder, `${args.id}.md`);
|
|
50
|
-
|
|
51
|
-
if (!existsSync(metadataPath)) {
|
|
52
|
-
throw new Error(`Item not found: ${args.id}`);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Read and update metadata
|
|
56
|
-
const metadata: ItemMetadata = JSON.parse(readFileSync(metadataPath, 'utf-8'));
|
|
57
|
-
const oldStatus = metadata.status;
|
|
58
|
-
|
|
59
|
-
// Validate status transitions (parent-child rules)
|
|
60
|
-
if (args.status === 'done') {
|
|
61
|
-
// Helper function to validate children are complete
|
|
62
|
-
const validateChildren = (relationshipType: 'implemented-by' | 'tested-by'): void => {
|
|
63
|
-
const children = metadata.linked_items[relationshipType];
|
|
64
|
-
if (children.length > 0) {
|
|
65
|
-
const openChildren: string[] = [];
|
|
66
|
-
for (const childId of children) {
|
|
67
|
-
const childParsed = parseItemId(childId);
|
|
68
|
-
if (childParsed) {
|
|
69
|
-
const childFolder = TYPE_TO_DIRECTORY[childParsed.type];
|
|
70
|
-
const childPath = join(devcrumbsDir, childFolder, `${childId}.json`);
|
|
71
|
-
if (existsSync(childPath)) {
|
|
72
|
-
const childMeta: ItemMetadata = JSON.parse(readFileSync(childPath, 'utf-8'));
|
|
73
|
-
if (childMeta.status !== 'done' && childMeta.status !== 'cancelled' && childMeta.status !== 'obsolete') {
|
|
74
|
-
openChildren.push(childId);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
if (openChildren.length > 0) {
|
|
80
|
-
const relationLabel = relationshipType === 'implemented-by' ? 'implementation' : 'test';
|
|
81
|
-
throw new Error(
|
|
82
|
-
`Cannot close ${args.id}: ${openChildren.length} ${relationLabel} item(s) still open: ${openChildren.join(', ')}`
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
// Validate implemented-by children (Scrum: Epic→Story, Story→Task; Waterfall: Requirement→Feature, Feature→Task)
|
|
89
|
-
if (['epic', 'story', 'requirement', 'feature'].includes(metadata.type)) {
|
|
90
|
-
validateChildren('implemented-by');
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Validate tested-by children (all parent types must have tests complete)
|
|
94
|
-
if (['epic', 'story', 'requirement', 'feature'].includes(metadata.type)) {
|
|
95
|
-
validateChildren('tested-by');
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (args.status) metadata.status = args.status;
|
|
100
|
-
if (args.priority) metadata.priority = args.priority;
|
|
101
|
-
if (args.eisenhower) metadata.eisenhower = args.eisenhower;
|
|
102
|
-
if (args.superseded_by !== undefined) metadata.superseded_by = args.superseded_by;
|
|
103
|
-
if (args.title) metadata.title = args.title;
|
|
104
|
-
if (args.assignee !== undefined) metadata.assignee = args.assignee;
|
|
105
|
-
if (args.tags) metadata.tags = args.tags;
|
|
106
|
-
if (args.affected_paths) metadata.affected_paths = args.affected_paths;
|
|
107
|
-
|
|
108
|
-
metadata.updated = getCurrentTimestamp();
|
|
109
|
-
|
|
110
|
-
writeFileSync(metadataPath, JSON.stringify(metadata, null, 2));
|
|
111
|
-
|
|
112
|
-
// Update description
|
|
113
|
-
if (args.description && args.append_description) {
|
|
114
|
-
throw new Error('Cannot use both description and append_description simultaneously');
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (args.description) {
|
|
118
|
-
// Replace entire description
|
|
119
|
-
writeFileSync(descriptionPath, args.description);
|
|
120
|
-
} else if (args.append_description) {
|
|
121
|
-
// Append to existing (or create new if doesn't exist)
|
|
122
|
-
const existing = existsSync(descriptionPath)
|
|
123
|
-
? readFileSync(descriptionPath, 'utf-8')
|
|
124
|
-
: '';
|
|
125
|
-
writeFileSync(descriptionPath, existing + args.append_description);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// Update index
|
|
129
|
-
const indexPath = join(devcrumbsDir, 'index.json');
|
|
130
|
-
const index: DevCrumbsIndex = JSON.parse(readFileSync(indexPath, 'utf-8'));
|
|
131
|
-
|
|
132
|
-
const itemIndex = index.items.findIndex((i) => i.id === args.id);
|
|
133
|
-
if (itemIndex !== -1) {
|
|
134
|
-
if (args.status) index.items[itemIndex].status = args.status;
|
|
135
|
-
if (args.priority) index.items[itemIndex].priority = args.priority;
|
|
136
|
-
if (args.title) index.items[itemIndex].title = args.title;
|
|
137
|
-
index.items[itemIndex].updated = metadata.updated;
|
|
138
|
-
|
|
139
|
-
// Update stats
|
|
140
|
-
if (args.status && oldStatus !== args.status) {
|
|
141
|
-
index.stats = index.stats || { total: 0, by_type: {}, by_status: {} };
|
|
142
|
-
index.stats.by_status[oldStatus] = (index.stats.by_status[oldStatus] || 1) - 1;
|
|
143
|
-
index.stats.by_status[args.status] = (index.stats.by_status[args.status] || 0) + 1;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
index.last_updated = metadata.updated;
|
|
148
|
-
writeFileSync(indexPath, JSON.stringify(index, null, 2));
|
|
149
|
-
|
|
150
|
-
return {
|
|
151
|
-
metadata,
|
|
152
|
-
oldStatus,
|
|
153
|
-
};
|
|
154
|
-
}
|
package/src/core/validation.ts
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import type { ItemType, Methodology } from '../schemas/index.js';
|
|
2
|
-
import { isFlexibleRelation, isHierarchyRelation } from '../schemas/relationships.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Validation result with detailed error messaging
|
|
6
|
-
*/
|
|
7
|
-
export interface ValidationResult {
|
|
8
|
-
valid: boolean;
|
|
9
|
-
error?: string;
|
|
10
|
-
suggestion?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Minimal work item info needed for validation
|
|
15
|
-
*/
|
|
16
|
-
export interface WorkItem {
|
|
17
|
-
id: string;
|
|
18
|
-
type: ItemType;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Validate relationship between two items based on methodology
|
|
23
|
-
* Only validates "implements" relationships - all other relations are flexible
|
|
24
|
-
*
|
|
25
|
-
* @param source - Item creating the relationship (child in hierarchy)
|
|
26
|
-
* @param target - Item being referenced (parent in hierarchy)
|
|
27
|
-
* @param relationType - Type of relationship
|
|
28
|
-
* @param methodology - Project methodology (scrum, waterfall, hybrid)
|
|
29
|
-
* @returns ValidationResult with valid flag and optional error/suggestion
|
|
30
|
-
*/
|
|
31
|
-
export function validateRelationship(
|
|
32
|
-
source: WorkItem,
|
|
33
|
-
target: WorkItem,
|
|
34
|
-
relationType: string,
|
|
35
|
-
methodology: Methodology
|
|
36
|
-
): ValidationResult {
|
|
37
|
-
// Flexible relationships always allowed
|
|
38
|
-
if (isFlexibleRelation(relationType)) {
|
|
39
|
-
return { valid: true };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Only validate hierarchy relationships
|
|
43
|
-
if (!isHierarchyRelation(relationType)) {
|
|
44
|
-
return { valid: false, error: `Unknown relationship type: ${relationType}` };
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Only validate "implements" direction (implemented-by is automatic reverse)
|
|
48
|
-
if (relationType === 'implemented-by') {
|
|
49
|
-
return { valid: true }; // Reverse relationships auto-created, no validation needed
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Validate based on methodology
|
|
53
|
-
if (methodology === 'scrum') {
|
|
54
|
-
return validateScrumHierarchy(source, target);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (methodology === 'waterfall') {
|
|
58
|
-
return validateWaterfallHierarchy(source, target);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (methodology === 'hybrid') {
|
|
62
|
-
// Try Scrum rules first
|
|
63
|
-
const scrumResult = validateScrumHierarchy(source, target);
|
|
64
|
-
if (scrumResult.valid) {
|
|
65
|
-
return scrumResult;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Try Waterfall rules
|
|
69
|
-
const waterfallResult = validateWaterfallHierarchy(source, target);
|
|
70
|
-
if (waterfallResult.valid) {
|
|
71
|
-
return waterfallResult;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Neither worked - return Scrum error (more common)
|
|
75
|
-
return scrumResult;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return {
|
|
79
|
-
valid: false,
|
|
80
|
-
error: `Unknown methodology: ${methodology}`,
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Validate Scrum hierarchy rules
|
|
86
|
-
* Epic → Story|Spike → Task
|
|
87
|
-
* Bug/Test can implement Epic or Story
|
|
88
|
-
*/
|
|
89
|
-
function validateScrumHierarchy(source: WorkItem, target: WorkItem): ValidationResult {
|
|
90
|
-
const { type: sourceType } = source;
|
|
91
|
-
const { type: targetType } = target;
|
|
92
|
-
|
|
93
|
-
// Task → Story or Spike
|
|
94
|
-
if (sourceType === 'task') {
|
|
95
|
-
if (targetType === 'story' || targetType === 'spike') {
|
|
96
|
-
return { valid: true };
|
|
97
|
-
}
|
|
98
|
-
return {
|
|
99
|
-
valid: false,
|
|
100
|
-
error: 'Tasks can only implement Stories or Spikes in Scrum',
|
|
101
|
-
suggestion: `Change ${target.id} to a Story or create a Story first, then link Task → Story`,
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// Story → Epic
|
|
106
|
-
if (sourceType === 'story') {
|
|
107
|
-
if (targetType === 'epic') {
|
|
108
|
-
return { valid: true };
|
|
109
|
-
}
|
|
110
|
-
return {
|
|
111
|
-
valid: false,
|
|
112
|
-
error: 'Stories can only implement Epics in Scrum',
|
|
113
|
-
suggestion: `Change ${target.id} to an Epic or create an Epic first, then link Story → Epic`,
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// Spike → Epic
|
|
118
|
-
if (sourceType === 'spike') {
|
|
119
|
-
if (targetType === 'epic') {
|
|
120
|
-
return { valid: true };
|
|
121
|
-
}
|
|
122
|
-
return {
|
|
123
|
-
valid: false,
|
|
124
|
-
error: 'Spikes can only implement Epics in Scrum',
|
|
125
|
-
suggestion: `Change ${target.id} to an Epic or create an Epic first, then link Spike → Epic`,
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Bug → Epic or Story (flexible)
|
|
130
|
-
if (sourceType === 'bug') {
|
|
131
|
-
if (targetType === 'epic' || targetType === 'story') {
|
|
132
|
-
return { valid: true };
|
|
133
|
-
}
|
|
134
|
-
return {
|
|
135
|
-
valid: false,
|
|
136
|
-
error: 'Bugs can only implement Epics or Stories in Scrum',
|
|
137
|
-
suggestion: `Use "relates-to" for Bug → ${targetType} relationships, or create Epic/Story first`,
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// Test → Epic or Story (flexible)
|
|
142
|
-
if (sourceType === 'test') {
|
|
143
|
-
if (targetType === 'epic' || targetType === 'story') {
|
|
144
|
-
return { valid: true };
|
|
145
|
-
}
|
|
146
|
-
return {
|
|
147
|
-
valid: false,
|
|
148
|
-
error: 'Tests can only implement Epics or Stories in Scrum',
|
|
149
|
-
suggestion: `Use "tested-by" relationship or create Epic/Story first`,
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// Epic cannot implement anything (top-level)
|
|
154
|
-
if (sourceType === 'epic') {
|
|
155
|
-
return {
|
|
156
|
-
valid: false,
|
|
157
|
-
error: 'Epics are top-level items and cannot implement other items',
|
|
158
|
-
suggestion: 'Consider using "relates-to" to link Epics together',
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
return {
|
|
163
|
-
valid: false,
|
|
164
|
-
error: `Invalid Scrum relationship: ${sourceType} → ${targetType}`,
|
|
165
|
-
suggestion: 'Check Scrum hierarchy: Epic → Story|Spike → Task',
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Validate Waterfall hierarchy rules
|
|
171
|
-
* Requirement → Feature|Spike → Task
|
|
172
|
-
* Bug/Test can implement Requirement or Feature
|
|
173
|
-
*/
|
|
174
|
-
function validateWaterfallHierarchy(source: WorkItem, target: WorkItem): ValidationResult {
|
|
175
|
-
const { type: sourceType } = source;
|
|
176
|
-
const { type: targetType } = target;
|
|
177
|
-
|
|
178
|
-
// Task → Feature or Spike
|
|
179
|
-
if (sourceType === 'task') {
|
|
180
|
-
if (targetType === 'feature' || targetType === 'spike') {
|
|
181
|
-
return { valid: true };
|
|
182
|
-
}
|
|
183
|
-
return {
|
|
184
|
-
valid: false,
|
|
185
|
-
error: 'Tasks can only implement Features or Spikes in Waterfall',
|
|
186
|
-
suggestion: `Change ${target.id} to a Feature or create a Feature first, then link Task → Feature`,
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// Feature → Requirement
|
|
191
|
-
if (sourceType === 'feature') {
|
|
192
|
-
if (targetType === 'requirement') {
|
|
193
|
-
return { valid: true };
|
|
194
|
-
}
|
|
195
|
-
return {
|
|
196
|
-
valid: false,
|
|
197
|
-
error: 'Features can only implement Requirements in Waterfall',
|
|
198
|
-
suggestion: `Change ${target.id} to a Requirement or create a Requirement first, then link Feature → Requirement`,
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// Spike → Requirement
|
|
203
|
-
if (sourceType === 'spike') {
|
|
204
|
-
if (targetType === 'requirement') {
|
|
205
|
-
return { valid: true };
|
|
206
|
-
}
|
|
207
|
-
return {
|
|
208
|
-
valid: false,
|
|
209
|
-
error: 'Spikes can only implement Requirements in Waterfall',
|
|
210
|
-
suggestion: `Change ${target.id} to a Requirement or create a Requirement first, then link Spike → Requirement`,
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
// Bug → Requirement or Feature (flexible)
|
|
215
|
-
if (sourceType === 'bug') {
|
|
216
|
-
if (targetType === 'requirement' || targetType === 'feature') {
|
|
217
|
-
return { valid: true };
|
|
218
|
-
}
|
|
219
|
-
return {
|
|
220
|
-
valid: false,
|
|
221
|
-
error: 'Bugs can only implement Requirements or Features in Waterfall',
|
|
222
|
-
suggestion: `Use "relates-to" for Bug → ${targetType} relationships, or create Requirement/Feature first`,
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
// Test → Requirement or Feature (flexible)
|
|
227
|
-
if (sourceType === 'test') {
|
|
228
|
-
if (targetType === 'requirement' || targetType === 'feature') {
|
|
229
|
-
return { valid: true };
|
|
230
|
-
}
|
|
231
|
-
return {
|
|
232
|
-
valid: false,
|
|
233
|
-
error: 'Tests can only implement Requirements or Features in Waterfall',
|
|
234
|
-
suggestion: `Use "tested-by" relationship or create Requirement/Feature first`,
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// Requirement cannot implement anything (top-level)
|
|
239
|
-
if (sourceType === 'requirement') {
|
|
240
|
-
return {
|
|
241
|
-
valid: false,
|
|
242
|
-
error: 'Requirements are top-level items and cannot implement other items',
|
|
243
|
-
suggestion: 'Consider using "relates-to" to link Requirements together',
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
return {
|
|
248
|
-
valid: false,
|
|
249
|
-
error: `Invalid Waterfall relationship: ${sourceType} → ${targetType}`,
|
|
250
|
-
suggestion: 'Check Waterfall hierarchy: Requirement → Feature|Spike → Task',
|
|
251
|
-
};
|
|
252
|
-
}
|
package/src/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types/index.js"), exports);
|
|
18
|
-
__exportStar(require("./schemas/index.js"), exports);
|
|
19
|
-
__exportStar(require("./utils/index.js"), exports);
|
|
20
|
-
__exportStar(require("./core/index.js"), exports);
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,qDAAmC;AACnC,mDAAiC;AACjC,kDAAgC"}
|
package/src/index.ts
DELETED
package/src/schemas/index.js.map
DELETED
|
@@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AAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC;QACzC,SAAS,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC;QAC3C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC"}
|
package/src/schemas/index.ts
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
// Re-export project context schemas
|
|
4
|
-
export * from './project.js';
|
|
5
|
-
export * from './relationships.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Methodology types
|
|
9
|
-
*/
|
|
10
|
-
export const Methodology = z.enum(['scrum', 'waterfall', 'hybrid']);
|
|
11
|
-
export type Methodology = z.infer<typeof Methodology>;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Item types in devcrumbs system
|
|
15
|
-
* Scrum: epic, story, task, bug, spike, test
|
|
16
|
-
* Waterfall: requirement, feature, task, bug, test
|
|
17
|
-
* Hybrid: all of the above
|
|
18
|
-
*/
|
|
19
|
-
export const ItemType = z.enum([
|
|
20
|
-
'epic',
|
|
21
|
-
'story',
|
|
22
|
-
'task',
|
|
23
|
-
'requirement',
|
|
24
|
-
'feature',
|
|
25
|
-
'bug',
|
|
26
|
-
'spike',
|
|
27
|
-
'test',
|
|
28
|
-
]);
|
|
29
|
-
export type ItemType = z.infer<typeof ItemType>;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Item status lifecycle
|
|
33
|
-
*/
|
|
34
|
-
export const ItemStatus = z.enum([
|
|
35
|
-
'draft',
|
|
36
|
-
'planned',
|
|
37
|
-
'in-progress',
|
|
38
|
-
'review',
|
|
39
|
-
'done',
|
|
40
|
-
'obsolete',
|
|
41
|
-
'blocked',
|
|
42
|
-
'cancelled',
|
|
43
|
-
]);
|
|
44
|
-
export type ItemStatus = z.infer<typeof ItemStatus>;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Priority levels
|
|
48
|
-
*/
|
|
49
|
-
export const Priority = z.enum(['critical', 'high', 'medium', 'low']);
|
|
50
|
-
export type Priority = z.infer<typeof Priority>;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Eisenhower Matrix quadrants for prioritization
|
|
54
|
-
* Q1: Urgent + Important = Do First
|
|
55
|
-
* Q2: Not Urgent + Important = Schedule/Plan
|
|
56
|
-
* Q3: Urgent + Not Important = Delegate
|
|
57
|
-
* Q4: Not Urgent + Not Important = Eliminate/Later
|
|
58
|
-
*/
|
|
59
|
-
export const EisenhowerQuadrant = z.enum([
|
|
60
|
-
'urgent-important', // Q1: Do First
|
|
61
|
-
'not-urgent-important', // Q2: Schedule
|
|
62
|
-
'urgent-not-important', // Q3: Delegate
|
|
63
|
-
'not-urgent-not-important', // Q4: Eliminate
|
|
64
|
-
]);
|
|
65
|
-
export type EisenhowerQuadrant = z.infer<typeof EisenhowerQuadrant>;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Relationship types between items
|
|
69
|
-
*/
|
|
70
|
-
export const RelationType = z.enum([
|
|
71
|
-
'implements',
|
|
72
|
-
'implemented-by',
|
|
73
|
-
'tested-by',
|
|
74
|
-
'tests',
|
|
75
|
-
'blocks',
|
|
76
|
-
'blocked-by',
|
|
77
|
-
'relates-to',
|
|
78
|
-
'depends-on',
|
|
79
|
-
'required-by',
|
|
80
|
-
'supersedes',
|
|
81
|
-
'superseded-by',
|
|
82
|
-
]);
|
|
83
|
-
export type RelationType = z.infer<typeof RelationType>;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Linked items structure
|
|
87
|
-
*/
|
|
88
|
-
export const LinkedItems = z
|
|
89
|
-
.object({
|
|
90
|
-
implements: z.array(z.string()),
|
|
91
|
-
'implemented-by': z.array(z.string()),
|
|
92
|
-
'tested-by': z.array(z.string()),
|
|
93
|
-
tests: z.array(z.string()),
|
|
94
|
-
blocks: z.array(z.string()),
|
|
95
|
-
'blocked-by': z.array(z.string()),
|
|
96
|
-
'relates-to': z.array(z.string()),
|
|
97
|
-
'depends-on': z.array(z.string()),
|
|
98
|
-
'required-by': z.array(z.string()),
|
|
99
|
-
supersedes: z.array(z.string()),
|
|
100
|
-
'superseded-by': z.array(z.string()),
|
|
101
|
-
})
|
|
102
|
-
.default({
|
|
103
|
-
implements: [],
|
|
104
|
-
'implemented-by': [],
|
|
105
|
-
'tested-by': [],
|
|
106
|
-
tests: [],
|
|
107
|
-
blocks: [],
|
|
108
|
-
'blocked-by': [],
|
|
109
|
-
'relates-to': [],
|
|
110
|
-
'depends-on': [],
|
|
111
|
-
'required-by': [],
|
|
112
|
-
supersedes: [],
|
|
113
|
-
'superseded-by': [],
|
|
114
|
-
});
|
|
115
|
-
export type LinkedItems = z.infer<typeof LinkedItems>;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Git commit reference
|
|
119
|
-
*/
|
|
120
|
-
export const GitCommit = z.object({
|
|
121
|
-
hash: z.string(),
|
|
122
|
-
message: z.string(),
|
|
123
|
-
author: z.string(),
|
|
124
|
-
timestamp: z.string(),
|
|
125
|
-
branch: z.string().optional(),
|
|
126
|
-
});
|
|
127
|
-
export type GitCommit = z.infer<typeof GitCommit>;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Core item schema - metadata stored as JSON
|
|
131
|
-
*/
|
|
132
|
-
export const ItemMetadata = z.object({
|
|
133
|
-
id: z.string().regex(/^(EPIC|STORY|TASK|REQ|FEAT|BUG|SPIKE|TEST)-\d{3,}$/),
|
|
134
|
-
type: ItemType,
|
|
135
|
-
category: z.string().default('general'),
|
|
136
|
-
title: z.string().min(1).max(200),
|
|
137
|
-
status: ItemStatus.default('draft'),
|
|
138
|
-
priority: Priority.default('medium'),
|
|
139
|
-
eisenhower: EisenhowerQuadrant.optional(),
|
|
140
|
-
superseded_by: z.string().optional(),
|
|
141
|
-
created: z.string().datetime(),
|
|
142
|
-
updated: z.string().datetime(),
|
|
143
|
-
author: z.string().email().optional(),
|
|
144
|
-
assignee: z.string().email().optional(),
|
|
145
|
-
affected_paths: z.array(z.string()).default([]),
|
|
146
|
-
linked_items: LinkedItems,
|
|
147
|
-
tags: z.array(z.string()).default([]),
|
|
148
|
-
estimated_effort: z.string().optional(),
|
|
149
|
-
actual_effort: z.string().optional(),
|
|
150
|
-
commits: z.array(GitCommit).default([]),
|
|
151
|
-
metadata: z.record(z.string(), z.unknown()).default({}),
|
|
152
|
-
});
|
|
153
|
-
export type ItemMetadata = z.infer<typeof ItemMetadata>;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Configuration schema for .devcrumbs/config.json
|
|
157
|
-
*/
|
|
158
|
-
export const DevCrumbsConfig = z.object({
|
|
159
|
-
version: z.string().default('0.1.0'),
|
|
160
|
-
project_name: z.string(),
|
|
161
|
-
project_id: z.string(),
|
|
162
|
-
created: z.string().datetime(),
|
|
163
|
-
updated: z.string().datetime(),
|
|
164
|
-
settings: z
|
|
165
|
-
.object({
|
|
166
|
-
methodology: Methodology.default('scrum'),
|
|
167
|
-
auto_increment: z.boolean(),
|
|
168
|
-
git_integration: z.boolean(),
|
|
169
|
-
default_author: z.string().email().optional(),
|
|
170
|
-
item_types: z.array(ItemType),
|
|
171
|
-
item_prefixes: z.record(z.string(), z.string()),
|
|
172
|
-
})
|
|
173
|
-
.default({
|
|
174
|
-
methodology: 'scrum',
|
|
175
|
-
auto_increment: true,
|
|
176
|
-
git_integration: true,
|
|
177
|
-
item_types: ['epic', 'story', 'task', 'bug', 'spike', 'test'],
|
|
178
|
-
item_prefixes: {
|
|
179
|
-
epic: 'EPIC',
|
|
180
|
-
story: 'STORY',
|
|
181
|
-
task: 'TASK',
|
|
182
|
-
bug: 'BUG',
|
|
183
|
-
spike: 'SPIKE',
|
|
184
|
-
test: 'TEST',
|
|
185
|
-
},
|
|
186
|
-
}),
|
|
187
|
-
});
|
|
188
|
-
export type DevCrumbsConfig = z.infer<typeof DevCrumbsConfig>;
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Index schema for .devcrumbs/index.json
|
|
192
|
-
*/
|
|
193
|
-
export const DevCrumbsIndex = z.object({
|
|
194
|
-
items: z.array(
|
|
195
|
-
z.object({
|
|
196
|
-
id: z.string(),
|
|
197
|
-
type: ItemType,
|
|
198
|
-
title: z.string(),
|
|
199
|
-
status: ItemStatus,
|
|
200
|
-
priority: Priority,
|
|
201
|
-
updated: z.string().datetime(),
|
|
202
|
-
})
|
|
203
|
-
),
|
|
204
|
-
last_updated: z.string().datetime(),
|
|
205
|
-
counters: z.record(z.string(), z.number()).default({}),
|
|
206
|
-
archived_items: z
|
|
207
|
-
.array(
|
|
208
|
-
z.object({
|
|
209
|
-
id: z.string(),
|
|
210
|
-
type: ItemType,
|
|
211
|
-
title: z.string(),
|
|
212
|
-
archived_at: z.string().datetime(),
|
|
213
|
-
original_status: ItemStatus,
|
|
214
|
-
})
|
|
215
|
-
)
|
|
216
|
-
.default([]),
|
|
217
|
-
stats: z
|
|
218
|
-
.object({
|
|
219
|
-
total: z.number(),
|
|
220
|
-
by_type: z.record(z.string(), z.number()),
|
|
221
|
-
by_status: z.record(z.string(), z.number()),
|
|
222
|
-
archived: z.number().optional(),
|
|
223
|
-
})
|
|
224
|
-
.optional(),
|
|
225
|
-
});
|
|
226
|
-
export type DevCrumbsIndex = z.infer<typeof DevCrumbsIndex>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["project.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB;;GAEG;AACU,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,OAAC,CAAC,MAAM,EA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