ai-sdlc 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +847 -0
- package/dist/agents/implementation.d.ts +11 -0
- package/dist/agents/implementation.d.ts.map +1 -0
- package/dist/agents/implementation.js +123 -0
- package/dist/agents/implementation.js.map +1 -0
- package/dist/agents/index.d.ts +7 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +8 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/planning.d.ts +9 -0
- package/dist/agents/planning.d.ts.map +1 -0
- package/dist/agents/planning.js +84 -0
- package/dist/agents/planning.js.map +1 -0
- package/dist/agents/refinement.d.ts +10 -0
- package/dist/agents/refinement.d.ts.map +1 -0
- package/dist/agents/refinement.js +98 -0
- package/dist/agents/refinement.js.map +1 -0
- package/dist/agents/research.d.ts +16 -0
- package/dist/agents/research.d.ts.map +1 -0
- package/dist/agents/research.js +141 -0
- package/dist/agents/research.js.map +1 -0
- package/dist/agents/review.d.ts +24 -0
- package/dist/agents/review.d.ts.map +1 -0
- package/dist/agents/review.js +740 -0
- package/dist/agents/review.js.map +1 -0
- package/dist/agents/rework.d.ts +17 -0
- package/dist/agents/rework.d.ts.map +1 -0
- package/dist/agents/rework.js +139 -0
- package/dist/agents/rework.js.map +1 -0
- package/dist/agents/state-assessor.d.ts +21 -0
- package/dist/agents/state-assessor.d.ts.map +1 -0
- package/dist/agents/state-assessor.js +29 -0
- package/dist/agents/state-assessor.js.map +1 -0
- package/dist/cli/commands.d.ts +87 -0
- package/dist/cli/commands.d.ts.map +1 -0
- package/dist/cli/commands.js +1183 -0
- package/dist/cli/commands.js.map +1 -0
- package/dist/cli/formatting.d.ts +68 -0
- package/dist/cli/formatting.d.ts.map +1 -0
- package/dist/cli/formatting.js +194 -0
- package/dist/cli/formatting.js.map +1 -0
- package/dist/cli/runner.d.ts +57 -0
- package/dist/cli/runner.d.ts.map +1 -0
- package/dist/cli/runner.js +272 -0
- package/dist/cli/runner.js.map +1 -0
- package/dist/cli/story-utils.d.ts +19 -0
- package/dist/cli/story-utils.d.ts.map +1 -0
- package/dist/cli/story-utils.js +44 -0
- package/dist/cli/story-utils.js.map +1 -0
- package/dist/cli/table-renderer.d.ts +22 -0
- package/dist/cli/table-renderer.d.ts.map +1 -0
- package/dist/cli/table-renderer.js +159 -0
- package/dist/cli/table-renderer.js.map +1 -0
- package/dist/core/auth.d.ts +39 -0
- package/dist/core/auth.d.ts.map +1 -0
- package/dist/core/auth.js +128 -0
- package/dist/core/auth.js.map +1 -0
- package/dist/core/client.d.ts +73 -0
- package/dist/core/client.d.ts.map +1 -0
- package/dist/core/client.js +140 -0
- package/dist/core/client.js.map +1 -0
- package/dist/core/config.d.ts +48 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +330 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/kanban.d.ts +34 -0
- package/dist/core/kanban.d.ts.map +1 -0
- package/dist/core/kanban.js +253 -0
- package/dist/core/kanban.js.map +1 -0
- package/dist/core/story.d.ts +91 -0
- package/dist/core/story.d.ts.map +1 -0
- package/dist/core/story.js +349 -0
- package/dist/core/story.js.map +1 -0
- package/dist/core/theme.d.ts +17 -0
- package/dist/core/theme.d.ts.map +1 -0
- package/dist/core/theme.js +136 -0
- package/dist/core/theme.js.map +1 -0
- package/dist/core/workflow-state.d.ts +56 -0
- package/dist/core/workflow-state.d.ts.map +1 -0
- package/dist/core/workflow-state.js +162 -0
- package/dist/core/workflow-state.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +103 -0
- package/dist/index.js.map +1 -0
- package/dist/types/index.d.ts +228 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +38 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/workflow-state.d.ts +54 -0
- package/dist/types/workflow-state.d.ts.map +1 -0
- package/dist/types/workflow-state.js +5 -0
- package/dist/types/workflow-state.js.map +1 -0
- package/package.json +71 -0
- package/templates/story.md +35 -0
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
const CONFIG_FILENAME = '.agentic-sdlc.json';
|
|
4
|
+
/**
|
|
5
|
+
* Default timeout configuration
|
|
6
|
+
*/
|
|
7
|
+
export const DEFAULT_TIMEOUTS = {
|
|
8
|
+
agentTimeout: 600000, // 10 minutes
|
|
9
|
+
buildTimeout: 120000, // 2 minutes
|
|
10
|
+
testTimeout: 300000, // 5 minutes
|
|
11
|
+
};
|
|
12
|
+
export const DEFAULT_CONFIG = {
|
|
13
|
+
sdlcFolder: '.agentic-sdlc',
|
|
14
|
+
stageGates: {
|
|
15
|
+
requireApprovalBeforeImplementation: false,
|
|
16
|
+
requireApprovalBeforePR: false,
|
|
17
|
+
autoMergeOnApproval: false,
|
|
18
|
+
},
|
|
19
|
+
refinement: {
|
|
20
|
+
maxIterations: 3,
|
|
21
|
+
escalateOnMaxAttempts: 'manual',
|
|
22
|
+
enableCircuitBreaker: true,
|
|
23
|
+
},
|
|
24
|
+
reviewConfig: {
|
|
25
|
+
maxRetries: Infinity,
|
|
26
|
+
maxRetriesUpperBound: Infinity,
|
|
27
|
+
autoCompleteOnApproval: true,
|
|
28
|
+
autoRestartOnRejection: true,
|
|
29
|
+
},
|
|
30
|
+
defaultLabels: [],
|
|
31
|
+
theme: 'auto',
|
|
32
|
+
// Test and build commands - auto-detected from package.json if present
|
|
33
|
+
testCommand: 'npm test',
|
|
34
|
+
buildCommand: 'npm run build',
|
|
35
|
+
// Agent SDK settings sources - empty array maintains SDK isolation mode (default)
|
|
36
|
+
settingSources: [],
|
|
37
|
+
// Timeout configuration
|
|
38
|
+
timeouts: { ...DEFAULT_TIMEOUTS },
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Get the SDLC root folder path
|
|
42
|
+
* Respects AGENTIC_SDLC_ROOT env var if set (useful for testing)
|
|
43
|
+
*/
|
|
44
|
+
export function getSdlcRoot(workingDir = process.cwd()) {
|
|
45
|
+
// Check for test override first
|
|
46
|
+
if (process.env.AGENTIC_SDLC_ROOT) {
|
|
47
|
+
return process.env.AGENTIC_SDLC_ROOT;
|
|
48
|
+
}
|
|
49
|
+
const config = loadConfig(workingDir);
|
|
50
|
+
return path.join(workingDir, config.sdlcFolder);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Security: Validate command string to prevent command injection
|
|
54
|
+
* Whitelists common package managers and build tools
|
|
55
|
+
*/
|
|
56
|
+
function validateCommand(command, fieldName) {
|
|
57
|
+
if (!command || typeof command !== 'string') {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
// Whitelist of allowed executables
|
|
61
|
+
const allowedExecutables = ['npm', 'yarn', 'pnpm', 'node', 'npx', 'bun', 'make', 'mvn', 'gradle'];
|
|
62
|
+
// Extract first word (executable name)
|
|
63
|
+
const parts = command.trim().split(/\s+/);
|
|
64
|
+
const executable = parts[0];
|
|
65
|
+
// Check if executable is in whitelist
|
|
66
|
+
if (!allowedExecutables.includes(executable)) {
|
|
67
|
+
console.warn(`Warning: ${fieldName} uses non-whitelisted executable "${executable}". Allowed: ${allowedExecutables.join(', ')}`);
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
// Check for dangerous shell metacharacters
|
|
71
|
+
const dangerousPatterns = [
|
|
72
|
+
/[;&|`$()]/, // Shell operators
|
|
73
|
+
/\$\{/, // Variable substitution
|
|
74
|
+
/\$\(/, // Command substitution
|
|
75
|
+
];
|
|
76
|
+
for (const pattern of dangerousPatterns) {
|
|
77
|
+
if (pattern.test(command)) {
|
|
78
|
+
console.warn(`Warning: ${fieldName} contains potentially dangerous shell metacharacters: ${command}`);
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Validate and sanitize user configuration to prevent prototype pollution
|
|
86
|
+
*/
|
|
87
|
+
function sanitizeUserConfig(userConfig) {
|
|
88
|
+
// Check for prototype pollution attempts
|
|
89
|
+
if (Object.prototype.hasOwnProperty.call(userConfig, '__proto__') ||
|
|
90
|
+
Object.prototype.hasOwnProperty.call(userConfig, 'constructor') ||
|
|
91
|
+
Object.prototype.hasOwnProperty.call(userConfig, 'prototype')) {
|
|
92
|
+
throw new Error('Invalid configuration: prototype pollution attempt detected');
|
|
93
|
+
}
|
|
94
|
+
// Security: Validate command strings before using them
|
|
95
|
+
if (userConfig.testCommand !== undefined) {
|
|
96
|
+
if (!validateCommand(userConfig.testCommand, 'testCommand')) {
|
|
97
|
+
console.warn('Invalid or unsafe testCommand in config, removing');
|
|
98
|
+
delete userConfig.testCommand;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (userConfig.buildCommand !== undefined) {
|
|
102
|
+
if (!validateCommand(userConfig.buildCommand, 'buildCommand')) {
|
|
103
|
+
console.warn('Invalid or unsafe buildCommand in config, removing');
|
|
104
|
+
delete userConfig.buildCommand;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// Validate settingSources if present
|
|
108
|
+
if (userConfig.settingSources !== undefined) {
|
|
109
|
+
if (!Array.isArray(userConfig.settingSources)) {
|
|
110
|
+
console.warn('Invalid settingSources in config (must be array), ignoring');
|
|
111
|
+
delete userConfig.settingSources;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
const validSources = ['user', 'project', 'local'];
|
|
115
|
+
const invalidSources = userConfig.settingSources.filter((s) => typeof s !== 'string' || !validSources.includes(s));
|
|
116
|
+
if (invalidSources.length > 0) {
|
|
117
|
+
console.warn(`Invalid settingSources values in config: ${invalidSources.join(', ')}. Valid values: ${validSources.join(', ')}`);
|
|
118
|
+
userConfig.settingSources = userConfig.settingSources.filter((s) => validSources.includes(s));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// Security: Enforce hard limits on timeout values
|
|
123
|
+
const MIN_TIMEOUT_MS = 5000; // 5 seconds minimum
|
|
124
|
+
const MAX_TIMEOUT_MS = 3600000; // 1 hour maximum
|
|
125
|
+
if (userConfig.timeouts !== undefined) {
|
|
126
|
+
if (typeof userConfig.timeouts !== 'object' || userConfig.timeouts === null) {
|
|
127
|
+
console.warn('Invalid timeouts in config (must be object), ignoring');
|
|
128
|
+
delete userConfig.timeouts;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
const timeoutFields = ['agentTimeout', 'buildTimeout', 'testTimeout'];
|
|
132
|
+
for (const field of timeoutFields) {
|
|
133
|
+
if (userConfig.timeouts[field] !== undefined) {
|
|
134
|
+
const value = userConfig.timeouts[field];
|
|
135
|
+
if (typeof value !== 'number' || !Number.isFinite(value) || isNaN(value)) {
|
|
136
|
+
console.warn(`Invalid ${field} in config (must be finite number), using default`);
|
|
137
|
+
delete userConfig.timeouts[field];
|
|
138
|
+
}
|
|
139
|
+
else if (value < MIN_TIMEOUT_MS) {
|
|
140
|
+
console.warn(`${field} is below minimum (${MIN_TIMEOUT_MS}ms), setting to minimum`);
|
|
141
|
+
userConfig.timeouts[field] = MIN_TIMEOUT_MS;
|
|
142
|
+
}
|
|
143
|
+
else if (value > MAX_TIMEOUT_MS) {
|
|
144
|
+
console.warn(`${field} exceeds maximum (${MAX_TIMEOUT_MS}ms), setting to maximum`);
|
|
145
|
+
userConfig.timeouts[field] = MAX_TIMEOUT_MS;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return userConfig;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Load configuration from the working directory
|
|
155
|
+
*/
|
|
156
|
+
export function loadConfig(workingDir = process.cwd()) {
|
|
157
|
+
const configPath = path.join(workingDir, CONFIG_FILENAME);
|
|
158
|
+
let config;
|
|
159
|
+
if (!fs.existsSync(configPath)) {
|
|
160
|
+
config = { ...DEFAULT_CONFIG };
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
try {
|
|
164
|
+
const content = fs.readFileSync(configPath, 'utf-8');
|
|
165
|
+
const parsedConfig = JSON.parse(content);
|
|
166
|
+
const userConfig = sanitizeUserConfig(parsedConfig);
|
|
167
|
+
config = {
|
|
168
|
+
...DEFAULT_CONFIG,
|
|
169
|
+
...userConfig,
|
|
170
|
+
stageGates: {
|
|
171
|
+
...DEFAULT_CONFIG.stageGates,
|
|
172
|
+
...userConfig.stageGates,
|
|
173
|
+
},
|
|
174
|
+
refinement: {
|
|
175
|
+
...DEFAULT_CONFIG.refinement,
|
|
176
|
+
...userConfig.refinement,
|
|
177
|
+
},
|
|
178
|
+
reviewConfig: {
|
|
179
|
+
...DEFAULT_CONFIG.reviewConfig,
|
|
180
|
+
...userConfig.reviewConfig,
|
|
181
|
+
},
|
|
182
|
+
timeouts: {
|
|
183
|
+
...DEFAULT_TIMEOUTS,
|
|
184
|
+
...userConfig.timeouts,
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
// Re-throw security-related errors (prototype pollution, etc.)
|
|
190
|
+
if (error instanceof Error && error.message.includes('prototype pollution')) {
|
|
191
|
+
throw error;
|
|
192
|
+
}
|
|
193
|
+
console.warn(`Warning: Could not parse ${CONFIG_FILENAME}, using defaults`);
|
|
194
|
+
config = { ...DEFAULT_CONFIG };
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
// Security: Apply environment variable overrides with strict validation
|
|
198
|
+
if (process.env.AGENTIC_SDLC_MAX_RETRIES) {
|
|
199
|
+
const maxRetries = parseInt(process.env.AGENTIC_SDLC_MAX_RETRIES, 10);
|
|
200
|
+
// Security: Limit to 0-10 range (not 0-100) to prevent resource exhaustion
|
|
201
|
+
if (!isNaN(maxRetries) && maxRetries >= 0 && maxRetries <= 10) {
|
|
202
|
+
console.log(`Environment override: maxRetries set to ${maxRetries}`);
|
|
203
|
+
config.reviewConfig.maxRetries = maxRetries;
|
|
204
|
+
// If user sets maxRetries via env, raise upper bound to allow it
|
|
205
|
+
config.reviewConfig.maxRetriesUpperBound = Math.max(config.reviewConfig.maxRetriesUpperBound, maxRetries);
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
console.warn(`Invalid AGENTIC_SDLC_MAX_RETRIES value "${process.env.AGENTIC_SDLC_MAX_RETRIES}" (must be 0-10), ignoring`);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (process.env.AGENTIC_SDLC_AUTO_COMPLETE) {
|
|
212
|
+
const value = process.env.AGENTIC_SDLC_AUTO_COMPLETE;
|
|
213
|
+
if (value === 'true' || value === 'false') {
|
|
214
|
+
console.log(`Environment override: autoCompleteOnApproval set to ${value}`);
|
|
215
|
+
config.reviewConfig.autoCompleteOnApproval = value === 'true';
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
console.warn(`Invalid AGENTIC_SDLC_AUTO_COMPLETE value "${value}" (must be "true" or "false"), ignoring`);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (process.env.AGENTIC_SDLC_AUTO_RESTART) {
|
|
222
|
+
const value = process.env.AGENTIC_SDLC_AUTO_RESTART;
|
|
223
|
+
if (value === 'true' || value === 'false') {
|
|
224
|
+
console.log(`Environment override: autoRestartOnRejection set to ${value}`);
|
|
225
|
+
config.reviewConfig.autoRestartOnRejection = value === 'true';
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
console.warn(`Invalid AGENTIC_SDLC_AUTO_RESTART value "${value}" (must be "true" or "false"), ignoring`);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
// Validate review config
|
|
232
|
+
config.reviewConfig = validateReviewConfig(config.reviewConfig);
|
|
233
|
+
return config;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Save configuration to the working directory
|
|
237
|
+
*/
|
|
238
|
+
export function saveConfig(config, workingDir = process.cwd()) {
|
|
239
|
+
const configPath = path.join(workingDir, CONFIG_FILENAME);
|
|
240
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n');
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Update stage gate configuration
|
|
244
|
+
*/
|
|
245
|
+
export function updateStageGates(gates, workingDir = process.cwd()) {
|
|
246
|
+
const config = loadConfig(workingDir);
|
|
247
|
+
config.stageGates = {
|
|
248
|
+
...config.stageGates,
|
|
249
|
+
...gates,
|
|
250
|
+
};
|
|
251
|
+
saveConfig(config, workingDir);
|
|
252
|
+
return config;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Check if a specific stage gate is enabled
|
|
256
|
+
*/
|
|
257
|
+
export function isStageGateEnabled(gate, workingDir = process.cwd()) {
|
|
258
|
+
const config = loadConfig(workingDir);
|
|
259
|
+
return config.stageGates[gate];
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Initialize configuration file with defaults
|
|
263
|
+
*/
|
|
264
|
+
export function initConfig(workingDir = process.cwd()) {
|
|
265
|
+
const configPath = path.join(workingDir, CONFIG_FILENAME);
|
|
266
|
+
if (!fs.existsSync(configPath)) {
|
|
267
|
+
saveConfig(DEFAULT_CONFIG, workingDir);
|
|
268
|
+
}
|
|
269
|
+
return loadConfig(workingDir);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Update refinement configuration
|
|
273
|
+
*/
|
|
274
|
+
export function updateRefinementConfig(refinementConfig, workingDir = process.cwd()) {
|
|
275
|
+
const config = loadConfig(workingDir);
|
|
276
|
+
config.refinement = {
|
|
277
|
+
...config.refinement,
|
|
278
|
+
...refinementConfig,
|
|
279
|
+
};
|
|
280
|
+
saveConfig(config, workingDir);
|
|
281
|
+
return config;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Get the maximum number of refinement iterations allowed
|
|
285
|
+
*/
|
|
286
|
+
export function getMaxRefinementIterations(workingDir = process.cwd()) {
|
|
287
|
+
const config = loadConfig(workingDir);
|
|
288
|
+
return config.refinement.maxIterations;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Validate review configuration
|
|
292
|
+
*/
|
|
293
|
+
export function validateReviewConfig(reviewConfig) {
|
|
294
|
+
const validated = { ...reviewConfig };
|
|
295
|
+
// Handle Infinity as valid "no limit" value
|
|
296
|
+
if (validated.maxRetries === Infinity) {
|
|
297
|
+
return validated;
|
|
298
|
+
}
|
|
299
|
+
// Ensure maxRetries is within valid bounds
|
|
300
|
+
if (validated.maxRetries < 0) {
|
|
301
|
+
console.warn(`Warning: maxRetries cannot be negative, using 0`);
|
|
302
|
+
validated.maxRetries = 0;
|
|
303
|
+
}
|
|
304
|
+
// Only apply upper bound check for finite values
|
|
305
|
+
if (Number.isFinite(validated.maxRetries) && Number.isFinite(validated.maxRetriesUpperBound)) {
|
|
306
|
+
if (validated.maxRetries > validated.maxRetriesUpperBound) {
|
|
307
|
+
console.warn(`Warning: maxRetries (${validated.maxRetries}) exceeds upper bound (${validated.maxRetriesUpperBound}), capping at ${validated.maxRetriesUpperBound}`);
|
|
308
|
+
validated.maxRetries = validated.maxRetriesUpperBound;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
// Log unusual values
|
|
312
|
+
if (validated.maxRetries === 0) {
|
|
313
|
+
console.warn('Warning: maxRetries is set to 0 - auto-retry is disabled');
|
|
314
|
+
}
|
|
315
|
+
return validated;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Update review configuration
|
|
319
|
+
*/
|
|
320
|
+
export function updateReviewConfig(reviewConfig, workingDir = process.cwd()) {
|
|
321
|
+
const config = loadConfig(workingDir);
|
|
322
|
+
config.reviewConfig = {
|
|
323
|
+
...config.reviewConfig,
|
|
324
|
+
...reviewConfig,
|
|
325
|
+
};
|
|
326
|
+
config.reviewConfig = validateReviewConfig(config.reviewConfig);
|
|
327
|
+
saveConfig(config, workingDir);
|
|
328
|
+
return config;
|
|
329
|
+
}
|
|
330
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAkB;IAC7C,YAAY,EAAE,MAAM,EAAI,aAAa;IACrC,YAAY,EAAE,MAAM,EAAI,YAAY;IACpC,WAAW,EAAE,MAAM,EAAK,YAAY;CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAW;IACpC,UAAU,EAAE,eAAe;IAC3B,UAAU,EAAE;QACV,mCAAmC,EAAE,KAAK;QAC1C,uBAAuB,EAAE,KAAK;QAC9B,mBAAmB,EAAE,KAAK;KAC3B;IACD,UAAU,EAAE;QACV,aAAa,EAAE,CAAC;QAChB,qBAAqB,EAAE,QAAQ;QAC/B,oBAAoB,EAAE,IAAI;KAC3B;IACD,YAAY,EAAE;QACZ,UAAU,EAAE,QAAQ;QACpB,oBAAoB,EAAE,QAAQ;QAC9B,sBAAsB,EAAE,IAAI;QAC5B,sBAAsB,EAAE,IAAI;KAC7B;IACD,aAAa,EAAE,EAAE;IACjB,KAAK,EAAE,MAAM;IACb,uEAAuE;IACvE,WAAW,EAAE,UAAU;IACvB,YAAY,EAAE,eAAe;IAC7B,kFAAkF;IAClF,cAAc,EAAE,EAAE;IAClB,wBAAwB;IACxB,QAAQ,EAAE,EAAE,GAAG,gBAAgB,EAAE;CAClC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,aAAqB,OAAO,CAAC,GAAG,EAAE;IAC5D,gCAAgC;IAChC,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;QAClC,OAAO,OAAO,CAAC,GA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C;IACH,CAAC;IAED,qBAAqB;IACrB,IAAI,SAAS,CAAC,UAAU,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,CAAC,IAAI,CAAC,0DAA0D,CAAC,CAAC;IAC3E,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAChC,YAAmC,EACnC,aAAqB,OAAO,CAAC,GAAG,EAAE;IAElC,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,CAAC,YAAY,GAAG;QACpB,GAAG,MAAM,CAAC,YAAY;QACtB,GAAG,YAAY;KAChB,CAAC;IACF,MAAM,CAAC,YAAY,GAAG,oBAAoB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAChE,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC/B,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Story, StateAssessment, KanbanFolder } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get all stories in a specific kanban folder
|
|
4
|
+
*/
|
|
5
|
+
export declare function getStoriesInFolder(sdlcRoot: string, folder: KanbanFolder): Story[];
|
|
6
|
+
/**
|
|
7
|
+
* Get all stories across all kanban folders
|
|
8
|
+
*/
|
|
9
|
+
export declare function getAllStories(sdlcRoot: string): Map<KanbanFolder, Story[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Find a story by ID across all folders
|
|
12
|
+
*/
|
|
13
|
+
export declare function findStoryById(sdlcRoot: string, storyId: string): Story | null;
|
|
14
|
+
/**
|
|
15
|
+
* Find a story by slug across all folders
|
|
16
|
+
*/
|
|
17
|
+
export declare function findStoryBySlug(sdlcRoot: string, slug: string): Story | null;
|
|
18
|
+
/**
|
|
19
|
+
* Assess the current state of the kanban board and recommend actions
|
|
20
|
+
*/
|
|
21
|
+
export declare function assessState(sdlcRoot: string): StateAssessment;
|
|
22
|
+
/**
|
|
23
|
+
* Initialize the kanban folder structure
|
|
24
|
+
*/
|
|
25
|
+
export declare function initializeKanban(sdlcRoot: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Check if kanban structure exists
|
|
28
|
+
*/
|
|
29
|
+
export declare function kanbanExists(sdlcRoot: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Get board statistics
|
|
32
|
+
*/
|
|
33
|
+
export declare function getBoardStats(sdlcRoot: string): Record<KanbanFolder, number>;
|
|
34
|
+
//# sourceMappingURL=kanban.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kanban.d.ts","sourceRoot":"","sources":["../../src/core/kanban.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,eAAe,EAA0B,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAKjH;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,KAAK,EAAE,CAYlF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC,YAAY,EAAE,KAAK,EAAE,CAAC,CAQ1E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAO7E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAO5E;AAeD;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,CA+J7D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAOvD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAItD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAa5E"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { KANBAN_FOLDERS, ReviewDecision } from '../types/index.js';
|
|
4
|
+
import { parseStory, isAtMaxRetries, canRetryRefinement, getLatestReviewAttempt } from './story.js';
|
|
5
|
+
import { loadConfig } from './config.js';
|
|
6
|
+
import { determineTargetPhase } from '../agents/rework.js';
|
|
7
|
+
/**
|
|
8
|
+
* Get all stories in a specific kanban folder
|
|
9
|
+
*/
|
|
10
|
+
export function getStoriesInFolder(sdlcRoot, folder) {
|
|
11
|
+
const folderPath = path.join(sdlcRoot, folder);
|
|
12
|
+
if (!fs.existsSync(folderPath)) {
|
|
13
|
+
return [];
|
|
14
|
+
}
|
|
15
|
+
const files = fs.readdirSync(folderPath).filter(f => f.endsWith('.md'));
|
|
16
|
+
return files
|
|
17
|
+
.map(f => parseStory(path.join(folderPath, f)))
|
|
18
|
+
.sort((a, b) => a.frontmatter.priority - b.frontmatter.priority);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get all stories across all kanban folders
|
|
22
|
+
*/
|
|
23
|
+
export function getAllStories(sdlcRoot) {
|
|
24
|
+
const stories = new Map();
|
|
25
|
+
for (const folder of KANBAN_FOLDERS) {
|
|
26
|
+
stories.set(folder, getStoriesInFolder(sdlcRoot, folder));
|
|
27
|
+
}
|
|
28
|
+
return stories;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Find a story by ID across all folders
|
|
32
|
+
*/
|
|
33
|
+
export function findStoryById(sdlcRoot, storyId) {
|
|
34
|
+
for (const folder of KANBAN_FOLDERS) {
|
|
35
|
+
const stories = getStoriesInFolder(sdlcRoot, folder);
|
|
36
|
+
const found = stories.find(s => s.frontmatter.id === storyId);
|
|
37
|
+
if (found)
|
|
38
|
+
return found;
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Find a story by slug across all folders
|
|
44
|
+
*/
|
|
45
|
+
export function findStoryBySlug(sdlcRoot, slug) {
|
|
46
|
+
for (const folder of KANBAN_FOLDERS) {
|
|
47
|
+
const stories = getStoriesInFolder(sdlcRoot, folder);
|
|
48
|
+
const found = stories.find(s => s.slug === slug);
|
|
49
|
+
if (found)
|
|
50
|
+
return found;
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Check if a story has a failed review that needs rework
|
|
56
|
+
*/
|
|
57
|
+
function hasFailedReview(story) {
|
|
58
|
+
const latestReview = getLatestReviewAttempt(story);
|
|
59
|
+
if (!latestReview) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
// Check if the latest review was rejected (not failed - that's a review agent error)
|
|
63
|
+
return latestReview.decision === ReviewDecision.REJECTED;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Assess the current state of the kanban board and recommend actions
|
|
67
|
+
*/
|
|
68
|
+
export function assessState(sdlcRoot) {
|
|
69
|
+
const backlogItems = getStoriesInFolder(sdlcRoot, 'backlog');
|
|
70
|
+
const readyItems = getStoriesInFolder(sdlcRoot, 'ready');
|
|
71
|
+
const inProgressItems = getStoriesInFolder(sdlcRoot, 'in-progress');
|
|
72
|
+
const doneItems = getStoriesInFolder(sdlcRoot, 'done');
|
|
73
|
+
const recommendedActions = [];
|
|
74
|
+
const workingDir = path.dirname(sdlcRoot);
|
|
75
|
+
const config = loadConfig(workingDir);
|
|
76
|
+
// Priority order: In-Progress (0-150) > Ready (200-400) > Backlog (500+)
|
|
77
|
+
// Check in-progress items FIRST (highest priority)
|
|
78
|
+
for (const story of inProgressItems) {
|
|
79
|
+
// Check if implementation is complete but review failed
|
|
80
|
+
if (story.frontmatter.implementation_complete && !story.frontmatter.reviews_complete) {
|
|
81
|
+
// Check if there's a failed review that needs rework
|
|
82
|
+
if (hasFailedReview(story)) {
|
|
83
|
+
// Check if we can still retry refinement (circuit breaker)
|
|
84
|
+
if (canRetryRefinement(story, config.refinement.maxIterations)) {
|
|
85
|
+
const latestReview = getLatestReviewAttempt(story);
|
|
86
|
+
const refinementCount = story.frontmatter.refinement_count || 0;
|
|
87
|
+
// Create a mock ReviewResult for determineTargetPhase
|
|
88
|
+
const reviewResult = {
|
|
89
|
+
issues: latestReview?.blockers.map(b => ({
|
|
90
|
+
severity: 'blocker',
|
|
91
|
+
category: 'review_failure',
|
|
92
|
+
description: b,
|
|
93
|
+
})) || [],
|
|
94
|
+
};
|
|
95
|
+
// Determine which phase to rework (research, plan, or implement)
|
|
96
|
+
const targetPhase = determineTargetPhase(reviewResult);
|
|
97
|
+
recommendedActions.push({
|
|
98
|
+
type: 'rework',
|
|
99
|
+
storyId: story.frontmatter.id,
|
|
100
|
+
storyPath: story.path,
|
|
101
|
+
reason: `⟳ Story "${story.frontmatter.title}" needs rework (iteration ${refinementCount + 1}, target: ${targetPhase})`,
|
|
102
|
+
priority: story.frontmatter.priority, // Highest priority (0-based)
|
|
103
|
+
context: {
|
|
104
|
+
reviewFeedback: latestReview,
|
|
105
|
+
targetPhase,
|
|
106
|
+
iteration: refinementCount + 1,
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
// Circuit breaker: max refinement attempts reached
|
|
112
|
+
const refinementCount = story.frontmatter.refinement_count || 0;
|
|
113
|
+
const maxAttempts = story.frontmatter.max_refinement_attempts || config.refinement.maxIterations;
|
|
114
|
+
recommendedActions.push({
|
|
115
|
+
type: 'review', // Keep as review to flag it
|
|
116
|
+
storyId: story.frontmatter.id,
|
|
117
|
+
storyPath: story.path,
|
|
118
|
+
reason: `🛑 Story "${story.frontmatter.title}" reached max refinement attempts (${refinementCount}/${maxAttempts}) - manual intervention required`,
|
|
119
|
+
priority: story.frontmatter.priority + 10000, // Very low priority to not auto-execute
|
|
120
|
+
context: { blockedByMaxRefinements: true },
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
continue; // Skip other checks for this story
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
// Check if story is at max retries
|
|
127
|
+
const atMaxRetries = isAtMaxRetries(story, config);
|
|
128
|
+
if (atMaxRetries) {
|
|
129
|
+
// Story blocked by max retries - flag for manual intervention
|
|
130
|
+
const retryCount = story.frontmatter.retry_count || 0;
|
|
131
|
+
recommendedActions.push({
|
|
132
|
+
type: 'review', // Keep as review but with special reason
|
|
133
|
+
storyId: story.frontmatter.id,
|
|
134
|
+
storyPath: story.path,
|
|
135
|
+
reason: `⚠️ Story "${story.frontmatter.title}" requires manual intervention (max retries: ${retryCount})`,
|
|
136
|
+
priority: story.frontmatter.priority + 10000, // Very low priority to not auto-execute
|
|
137
|
+
context: { blockedByMaxRetries: true },
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
else if (!story.frontmatter.implementation_complete) {
|
|
141
|
+
recommendedActions.push({
|
|
142
|
+
type: 'implement',
|
|
143
|
+
storyId: story.frontmatter.id,
|
|
144
|
+
storyPath: story.path,
|
|
145
|
+
reason: `Story "${story.frontmatter.title}" implementation in progress`,
|
|
146
|
+
priority: story.frontmatter.priority + 50,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
else if (!story.frontmatter.reviews_complete) {
|
|
150
|
+
// Deprioritize stories with high retry counts
|
|
151
|
+
const retryCount = story.frontmatter.retry_count || 0;
|
|
152
|
+
const priorityPenalty = retryCount * 50; // Add 50 to priority per retry
|
|
153
|
+
recommendedActions.push({
|
|
154
|
+
type: 'review',
|
|
155
|
+
storyId: story.frontmatter.id,
|
|
156
|
+
storyPath: story.path,
|
|
157
|
+
reason: `Story "${story.frontmatter.title}" needs review${retryCount > 0 ? ` (retry ${retryCount})` : ''}`,
|
|
158
|
+
priority: story.frontmatter.priority + 100 + priorityPenalty,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
recommendedActions.push({
|
|
163
|
+
type: 'create_pr',
|
|
164
|
+
storyId: story.frontmatter.id,
|
|
165
|
+
storyPath: story.path,
|
|
166
|
+
reason: `Story "${story.frontmatter.title}" is ready for PR`,
|
|
167
|
+
priority: story.frontmatter.priority + 150,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
// Check ready items SECOND (medium priority)
|
|
172
|
+
for (const story of readyItems) {
|
|
173
|
+
if (!story.frontmatter.research_complete) {
|
|
174
|
+
recommendedActions.push({
|
|
175
|
+
type: 'research',
|
|
176
|
+
storyId: story.frontmatter.id,
|
|
177
|
+
storyPath: story.path,
|
|
178
|
+
reason: `Story "${story.frontmatter.title}" needs research`,
|
|
179
|
+
priority: story.frontmatter.priority + 200,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
else if (!story.frontmatter.plan_complete) {
|
|
183
|
+
recommendedActions.push({
|
|
184
|
+
type: 'plan',
|
|
185
|
+
storyId: story.frontmatter.id,
|
|
186
|
+
storyPath: story.path,
|
|
187
|
+
reason: `Story "${story.frontmatter.title}" needs implementation plan`,
|
|
188
|
+
priority: story.frontmatter.priority + 300,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
recommendedActions.push({
|
|
193
|
+
type: 'implement',
|
|
194
|
+
storyId: story.frontmatter.id,
|
|
195
|
+
storyPath: story.path,
|
|
196
|
+
reason: `Story "${story.frontmatter.title}" is ready for implementation`,
|
|
197
|
+
priority: story.frontmatter.priority + 400,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
// Check backlog items LAST (lowest priority)
|
|
202
|
+
for (const story of backlogItems) {
|
|
203
|
+
recommendedActions.push({
|
|
204
|
+
type: 'refine',
|
|
205
|
+
storyId: story.frontmatter.id,
|
|
206
|
+
storyPath: story.path,
|
|
207
|
+
reason: `Story "${story.frontmatter.title}" needs refinement`,
|
|
208
|
+
priority: story.frontmatter.priority + 500,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
// Sort actions by priority (lower number = higher priority)
|
|
212
|
+
recommendedActions.sort((a, b) => a.priority - b.priority);
|
|
213
|
+
return {
|
|
214
|
+
backlogItems,
|
|
215
|
+
readyItems,
|
|
216
|
+
inProgressItems,
|
|
217
|
+
doneItems,
|
|
218
|
+
recommendedActions,
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Initialize the kanban folder structure
|
|
223
|
+
*/
|
|
224
|
+
export function initializeKanban(sdlcRoot) {
|
|
225
|
+
for (const folder of KANBAN_FOLDERS) {
|
|
226
|
+
const folderPath = path.join(sdlcRoot, folder);
|
|
227
|
+
if (!fs.existsSync(folderPath)) {
|
|
228
|
+
fs.mkdirSync(folderPath, { recursive: true });
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Check if kanban structure exists
|
|
234
|
+
*/
|
|
235
|
+
export function kanbanExists(sdlcRoot) {
|
|
236
|
+
return KANBAN_FOLDERS.every(folder => fs.existsSync(path.join(sdlcRoot, folder)));
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Get board statistics
|
|
240
|
+
*/
|
|
241
|
+
export function getBoardStats(sdlcRoot) {
|
|
242
|
+
const stats = {
|
|
243
|
+
backlog: 0,
|
|
244
|
+
ready: 0,
|
|
245
|
+
'in-progress': 0,
|
|
246
|
+
done: 0,
|
|
247
|
+
};
|
|
248
|
+
for (const folder of KANBAN_FOLDERS) {
|
|
249
|
+
stats[folder] = getStoriesInFolder(sdlcRoot, folder).length;
|
|
250
|
+
}
|
|
251
|
+
return stats;
|
|
252
|
+
}
|
|
253
|
+
//# sourceMappingURL=kanban.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kanban.js","sourceRoot":"","sources":["../../src/core/kanban.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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