mcp-adr-analysis-server 2.0.21 → 2.0.24
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/.tsbuildinfo +1 -1
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1380 -781
- package/dist/src/index.js.map +1 -1
- package/dist/src/tools/adr-suggestion-tool.d.ts.map +1 -1
- package/dist/src/tools/adr-suggestion-tool.js +32 -30
- package/dist/src/tools/adr-suggestion-tool.js.map +1 -1
- package/dist/src/tools/content-masking-tool.d.ts +4 -0
- package/dist/src/tools/content-masking-tool.d.ts.map +1 -1
- package/dist/src/tools/content-masking-tool.js +531 -28
- package/dist/src/tools/content-masking-tool.js.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.d.ts +8 -5
- package/dist/src/tools/deployment-readiness-tool.d.ts.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.js +741 -79
- package/dist/src/tools/deployment-readiness-tool.js.map +1 -1
- package/dist/src/tools/environment-analysis-tool.d.ts +4 -0
- package/dist/src/tools/environment-analysis-tool.d.ts.map +1 -1
- package/dist/src/tools/environment-analysis-tool.js +568 -24
- package/dist/src/tools/environment-analysis-tool.js.map +1 -1
- package/dist/src/tools/mcp-planning-tool.d.ts.map +1 -1
- package/dist/src/tools/mcp-planning-tool.js +298 -173
- package/dist/src/tools/mcp-planning-tool.js.map +1 -1
- package/dist/src/tools/memory-loading-tool.d.ts +60 -0
- package/dist/src/tools/memory-loading-tool.d.ts.map +1 -0
- package/dist/src/tools/memory-loading-tool.js +457 -0
- package/dist/src/tools/memory-loading-tool.js.map +1 -0
- package/dist/src/tools/smart-git-push-tool.d.ts +3 -0
- package/dist/src/tools/smart-git-push-tool.d.ts.map +1 -1
- package/dist/src/tools/smart-git-push-tool.js +177 -223
- package/dist/src/tools/smart-git-push-tool.js.map +1 -1
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts +20 -11
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts.map +1 -1
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js +506 -22
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js.map +1 -1
- package/dist/src/types/enhanced-errors.d.ts +173 -0
- package/dist/src/types/enhanced-errors.d.ts.map +1 -0
- package/dist/src/types/enhanced-errors.js +668 -0
- package/dist/src/types/enhanced-errors.js.map +1 -0
- package/dist/src/types/knowledge-graph-schemas.d.ts +92 -0
- package/dist/src/types/knowledge-graph-schemas.d.ts.map +1 -1
- package/dist/src/types/knowledge-graph-schemas.js +45 -17
- package/dist/src/types/knowledge-graph-schemas.js.map +1 -1
- package/dist/src/types/memory-entities.d.ts +7209 -0
- package/dist/src/types/memory-entities.d.ts.map +1 -0
- package/dist/src/types/memory-entities.js +395 -0
- package/dist/src/types/memory-entities.js.map +1 -0
- package/dist/src/types/todo-json-schemas.d.ts +7 -653
- package/dist/src/types/todo-json-schemas.d.ts.map +1 -1
- package/dist/src/types/todo-json-schemas.js +6 -110
- package/dist/src/types/todo-json-schemas.js.map +1 -1
- package/dist/src/utils/enhanced-logging.d.ts +195 -0
- package/dist/src/utils/enhanced-logging.d.ts.map +1 -0
- package/dist/src/utils/enhanced-logging.js +449 -0
- package/dist/src/utils/enhanced-logging.js.map +1 -0
- package/dist/src/utils/interactive-approval.d.ts +1 -1
- package/dist/src/utils/interactive-approval.d.ts.map +1 -1
- package/dist/src/utils/interactive-approval.js +20 -16
- package/dist/src/utils/interactive-approval.js.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.d.ts +23 -1
- package/dist/src/utils/knowledge-graph-manager.d.ts.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.js +297 -69
- package/dist/src/utils/knowledge-graph-manager.js.map +1 -1
- package/dist/src/utils/memory-entity-manager.d.ts +134 -0
- package/dist/src/utils/memory-entity-manager.d.ts.map +1 -0
- package/dist/src/utils/memory-entity-manager.js +848 -0
- package/dist/src/utils/memory-entity-manager.js.map +1 -0
- package/dist/src/utils/memory-health-scoring.d.ts +125 -0
- package/dist/src/utils/memory-health-scoring.d.ts.map +1 -0
- package/dist/src/utils/memory-health-scoring.js +277 -0
- package/dist/src/utils/memory-health-scoring.js.map +1 -0
- package/dist/src/utils/memory-migration-manager.d.ts +93 -0
- package/dist/src/utils/memory-migration-manager.d.ts.map +1 -0
- package/dist/src/utils/memory-migration-manager.js +834 -0
- package/dist/src/utils/memory-migration-manager.js.map +1 -0
- package/dist/src/utils/memory-relationship-mapper.d.ts +87 -0
- package/dist/src/utils/memory-relationship-mapper.d.ts.map +1 -0
- package/dist/src/utils/memory-relationship-mapper.js +481 -0
- package/dist/src/utils/memory-relationship-mapper.js.map +1 -0
- package/dist/src/utils/memory-rollback-manager.d.ts +93 -0
- package/dist/src/utils/memory-rollback-manager.d.ts.map +1 -0
- package/dist/src/utils/memory-rollback-manager.js +542 -0
- package/dist/src/utils/memory-rollback-manager.js.map +1 -0
- package/dist/src/utils/memory-transformation.d.ts +59 -0
- package/dist/src/utils/memory-transformation.d.ts.map +1 -0
- package/dist/src/utils/memory-transformation.js +742 -0
- package/dist/src/utils/memory-transformation.js.map +1 -0
- package/dist/src/utils/prompt-execution.d.ts.map +1 -1
- package/dist/src/utils/prompt-execution.js +72 -51
- package/dist/src/utils/prompt-execution.js.map +1 -1
- package/dist/src/utils/todo-file-watcher.d.ts +11 -23
- package/dist/src/utils/todo-file-watcher.d.ts.map +1 -1
- package/dist/src/utils/todo-file-watcher.js +18 -156
- package/dist/src/utils/todo-file-watcher.js.map +1 -1
- package/package.json +22 -6
- package/dist/src/tools/smart-score-tool.d.ts +0 -173
- package/dist/src/tools/smart-score-tool.d.ts.map +0 -1
- package/dist/src/tools/smart-score-tool.js +0 -681
- package/dist/src/tools/smart-score-tool.js.map +0 -1
- package/dist/src/tools/todo-management-tool-v2.d.ts +0 -368
- package/dist/src/tools/todo-management-tool-v2.d.ts.map +0 -1
- package/dist/src/tools/todo-management-tool-v2.js +0 -922
- package/dist/src/tools/todo-management-tool-v2.js.map +0 -1
- package/dist/src/utils/project-health-scoring.d.ts +0 -177
- package/dist/src/utils/project-health-scoring.d.ts.map +0 -1
- package/dist/src/utils/project-health-scoring.js +0 -370
- package/dist/src/utils/project-health-scoring.js.map +0 -1
- package/dist/src/utils/todo-json-manager.d.ts +0 -71
- package/dist/src/utils/todo-json-manager.d.ts.map +0 -1
- package/dist/src/utils/todo-json-manager.js +0 -396
- package/dist/src/utils/todo-json-manager.js.map +0 -1
- package/dist/src/utils/todo-markdown-converter.d.ts +0 -16
- package/dist/src/utils/todo-markdown-converter.d.ts.map +0 -1
- package/dist/src/utils/todo-markdown-converter.js +0 -362
- package/dist/src/utils/todo-markdown-converter.js.map +0 -1
- package/dist/src/utils/todo-migration.d.ts +0 -47
- package/dist/src/utils/todo-migration.d.ts.map +0 -1
- package/dist/src/utils/todo-migration.js +0 -261
- package/dist/src/utils/todo-migration.js.map +0 -1
|
@@ -31,14 +31,14 @@ import { McpAdrError } from '../types/index.js';
|
|
|
31
31
|
import { execSync } from 'child_process';
|
|
32
32
|
import { readFileSync, existsSync, statSync } from 'fs';
|
|
33
33
|
import { join, basename } from 'path';
|
|
34
|
-
import { jsonSafeFilePath, jsonSafeMarkdownList, jsonSafeError, jsonSafeUserInput } from '../utils/json-safe.js';
|
|
34
|
+
import { jsonSafeFilePath, jsonSafeMarkdownList, jsonSafeError, jsonSafeUserInput, } from '../utils/json-safe.js';
|
|
35
35
|
import { validateMcpResponse } from '../utils/mcp-response-validator.js';
|
|
36
36
|
import { KnowledgeGraphManager } from '../utils/knowledge-graph-manager.js';
|
|
37
37
|
/**
|
|
38
38
|
* Main smart git push function - Knowledge Graph Enhanced Version
|
|
39
39
|
*/
|
|
40
40
|
async function _smartGitPushInternal(args) {
|
|
41
|
-
const { branch, message, skipValidation = false, allowedArtifacts = [], sensitivityLevel = 'moderate', dryRun = false, projectPath = process.cwd(), checkReleaseReadiness = false, releaseType = 'minor', skipKnowledgeGraphAnalysis = false } = args;
|
|
41
|
+
const { branch, message, skipValidation = false, allowedArtifacts = [], sensitivityLevel = 'moderate', dryRun = false, projectPath = process.cwd(), checkReleaseReadiness = false, releaseType = 'minor', skipKnowledgeGraphAnalysis = false, } = args;
|
|
42
42
|
try {
|
|
43
43
|
// Step 1: Get staged files using git CLI
|
|
44
44
|
const stagedFiles = await getStagedFiles(projectPath);
|
|
@@ -61,20 +61,13 @@ async function _smartGitPushInternal(args) {
|
|
|
61
61
|
releaseReadinessResult = await analyzeReleaseReadiness({
|
|
62
62
|
projectPath,
|
|
63
63
|
releaseType,
|
|
64
|
-
includeAnalysis: true
|
|
64
|
+
includeAnalysis: true,
|
|
65
65
|
});
|
|
66
66
|
// Update deployment readiness score in health scoring system
|
|
67
67
|
try {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
releaseScore: releaseReadinessResult.score,
|
|
72
|
-
milestoneCompletion: releaseReadinessResult.milestones.length > 0 ?
|
|
73
|
-
releaseReadinessResult.milestones.reduce((sum, m) => sum + m.completionRate, 0) / releaseReadinessResult.milestones.length : 0.5,
|
|
74
|
-
criticalBlockers: releaseReadinessResult.blockers.filter((b) => b.severity === 'error').length,
|
|
75
|
-
warningBlockers: releaseReadinessResult.blockers.filter((b) => b.severity === 'warning').length,
|
|
76
|
-
gitHealthScore: releaseReadinessResult.blockers.some((b) => b.type === 'unstable-code') ? 30 : 80
|
|
77
|
-
});
|
|
68
|
+
// ProjectHealthScoring removed - skip health scoring
|
|
69
|
+
console.warn('⚠️ ProjectHealthScoring is deprecated and was removed in memory-centric transformation');
|
|
70
|
+
// Skip health scoring update - ProjectHealthScoring removed
|
|
78
71
|
}
|
|
79
72
|
catch (healthError) {
|
|
80
73
|
// Silently handle health scoring errors
|
|
@@ -105,16 +98,23 @@ No staged files found. Use \`git add\` to stage files before pushing.
|
|
|
105
98
|
- **Goal Progress**: ${kgAnalysis.projectGoalProgress.overallProgress}%
|
|
106
99
|
- **Task Dependencies**: ${kgAnalysis.taskDependencies.completed.length} completed, ${kgAnalysis.taskDependencies.pending.length} pending
|
|
107
100
|
|
|
108
|
-
${kgAnalysis.activeIntents.length > 0
|
|
101
|
+
${kgAnalysis.activeIntents.length > 0
|
|
102
|
+
? `
|
|
109
103
|
### Active Intents
|
|
110
104
|
${kgAnalysis.activeIntents.map(intent => `- **${intent.currentStatus}**: ${jsonSafeUserInput(intent.humanRequest.substring(0, 80))}...`).join('\n')}
|
|
111
|
-
`
|
|
105
|
+
`
|
|
106
|
+
: ''}
|
|
112
107
|
|
|
113
|
-
${kgAnalysis.taskDependencies.pending.length > 0
|
|
108
|
+
${kgAnalysis.taskDependencies.pending.length > 0
|
|
109
|
+
? `
|
|
114
110
|
### Pending Tasks
|
|
115
111
|
Consider working on these tasks before your next push:
|
|
116
|
-
${kgAnalysis.taskDependencies.pending
|
|
117
|
-
|
|
112
|
+
${kgAnalysis.taskDependencies.pending
|
|
113
|
+
.slice(0, 5)
|
|
114
|
+
.map(task => `- ${jsonSafeUserInput(task)}`)
|
|
115
|
+
.join('\n')}
|
|
116
|
+
`
|
|
117
|
+
: ''}
|
|
118
118
|
`;
|
|
119
119
|
}
|
|
120
120
|
// Add release readiness info if checked
|
|
@@ -127,16 +127,18 @@ ${jsonSafeUserInput(releaseReadinessResult.summary)}
|
|
|
127
127
|
### Recommendations
|
|
128
128
|
${jsonSafeMarkdownList(releaseReadinessResult.recommendations)}
|
|
129
129
|
|
|
130
|
-
${releaseReadinessResult.isReady
|
|
131
|
-
'✅ **Project is ready for release!** Consider creating a release after staging files.'
|
|
132
|
-
'❌ **Project is not ready for release.** Address blockers before proceeding.'}
|
|
130
|
+
${releaseReadinessResult.isReady
|
|
131
|
+
? '✅ **Project is ready for release!** Consider creating a release after staging files.'
|
|
132
|
+
: '❌ **Project is not ready for release.** Address blockers before proceeding.'}
|
|
133
133
|
`;
|
|
134
134
|
}
|
|
135
135
|
return {
|
|
136
|
-
content: [
|
|
136
|
+
content: [
|
|
137
|
+
{
|
|
137
138
|
type: 'text',
|
|
138
|
-
text: responseText
|
|
139
|
-
}
|
|
139
|
+
text: responseText,
|
|
140
|
+
},
|
|
141
|
+
],
|
|
140
142
|
};
|
|
141
143
|
}
|
|
142
144
|
// Step 3: Analyze staged files if validation is enabled
|
|
@@ -145,7 +147,7 @@ ${releaseReadinessResult.isReady ?
|
|
|
145
147
|
validationResults = await validateStagedFiles(stagedFiles, {
|
|
146
148
|
sensitivityLevel,
|
|
147
149
|
allowedArtifacts,
|
|
148
|
-
projectPath
|
|
150
|
+
projectPath,
|
|
149
151
|
});
|
|
150
152
|
}
|
|
151
153
|
// Step 4: Check for blocking conditions (Enhanced with Knowledge Graph)
|
|
@@ -174,14 +176,16 @@ ${releaseReadinessResult.isReady ?
|
|
|
174
176
|
Push blocked due to critical issues that must be resolved.
|
|
175
177
|
|
|
176
178
|
## Issues Found
|
|
177
|
-
${issues
|
|
179
|
+
${issues
|
|
180
|
+
.map(issue => `
|
|
178
181
|
|
|
179
182
|
### ${jsonSafeFilePath(issue.file)}
|
|
180
183
|
${issue.issues.map(i => `- **${i.severity.toUpperCase()}**: ${jsonSafeUserInput(i.message)}`).join('\n')}
|
|
181
184
|
|
|
182
185
|
**Suggestions:**
|
|
183
186
|
${jsonSafeMarkdownList(issue.suggestions)}
|
|
184
|
-
`)
|
|
187
|
+
`)
|
|
188
|
+
.join('\n')}
|
|
185
189
|
`;
|
|
186
190
|
// Add release readiness info if checked and blocked
|
|
187
191
|
if (releaseReadinessResult && releaseReadinessBlocked) {
|
|
@@ -191,7 +195,10 @@ ${jsonSafeMarkdownList(issue.suggestions)}
|
|
|
191
195
|
${jsonSafeUserInput(releaseReadinessResult.summary)}
|
|
192
196
|
|
|
193
197
|
### Critical Blockers
|
|
194
|
-
${releaseReadinessResult.blockers
|
|
198
|
+
${releaseReadinessResult.blockers
|
|
199
|
+
.filter(b => b.severity === 'error')
|
|
200
|
+
.map(b => `- **${b.type}**: ${jsonSafeUserInput(b.message)}`)
|
|
201
|
+
.join('\n')}
|
|
195
202
|
|
|
196
203
|
### Recommendations
|
|
197
204
|
${jsonSafeMarkdownList(releaseReadinessResult.recommendations)}
|
|
@@ -228,14 +235,19 @@ ${kgBlockingConditions.map(bc => `- ${jsonSafeUserInput(bc.recommendation)}`).jo
|
|
|
228
235
|
- **Goal Progress**: ${kgAnalysis.projectGoalProgress.overallProgress}%
|
|
229
236
|
|
|
230
237
|
### Warnings
|
|
231
|
-
${kgAnalysis.blockingConditions
|
|
238
|
+
${kgAnalysis.blockingConditions
|
|
239
|
+
.filter(bc => bc.severity === 'warning')
|
|
240
|
+
.map(bc => `- **${bc.type}**: ${jsonSafeUserInput(bc.message)}`)
|
|
241
|
+
.join('\n')}
|
|
232
242
|
`;
|
|
233
243
|
}
|
|
234
244
|
return {
|
|
235
|
-
content: [
|
|
245
|
+
content: [
|
|
246
|
+
{
|
|
236
247
|
type: 'text',
|
|
237
|
-
text: cancelText
|
|
238
|
-
}
|
|
248
|
+
text: cancelText,
|
|
249
|
+
},
|
|
250
|
+
],
|
|
239
251
|
};
|
|
240
252
|
}
|
|
241
253
|
// Step 5: Execute git push if not dry run
|
|
@@ -244,9 +256,9 @@ ${kgAnalysis.blockingConditions.filter(bc => bc.severity === 'warning').map(bc =
|
|
|
244
256
|
// Update TODO tasks with KG integration
|
|
245
257
|
if (kgAnalysis) {
|
|
246
258
|
try {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
259
|
+
// TodoJsonManager removed - skipping todo validation
|
|
260
|
+
console.warn('⚠️ TodoJsonManager is deprecated and was removed in memory-centric transformation');
|
|
261
|
+
// Skip todo task update - TodoJsonManager removed
|
|
250
262
|
}
|
|
251
263
|
catch (todoError) {
|
|
252
264
|
console.error('Error updating TODO tasks with KG:', todoError);
|
|
@@ -266,7 +278,8 @@ ${kgAnalysis ? `- **Knowledge Graph Analysis**: ✅ Completed` : ''}
|
|
|
266
278
|
## Files Pushed
|
|
267
279
|
${stagedFiles.map(f => `- ${jsonSafeFilePath(f.path)} (${f.status})`).join('\n')}
|
|
268
280
|
|
|
269
|
-
${kgAnalysis
|
|
281
|
+
${kgAnalysis
|
|
282
|
+
? `
|
|
270
283
|
## Knowledge Graph Analysis
|
|
271
284
|
### Project Context
|
|
272
285
|
- **Active Intents**: ${kgAnalysis.activeIntents.length}
|
|
@@ -277,28 +290,41 @@ ${kgAnalysis ? `
|
|
|
277
290
|
### Architectural Insights
|
|
278
291
|
${kgAnalysis.architecturalAlignment.details.map(detail => `- ${jsonSafeUserInput(detail)}`).join('\n')}
|
|
279
292
|
|
|
280
|
-
${kgAnalysis.blockingConditions.length > 0
|
|
293
|
+
${kgAnalysis.blockingConditions.length > 0
|
|
294
|
+
? `
|
|
281
295
|
### Warnings & Recommendations
|
|
282
|
-
${kgAnalysis.blockingConditions
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
296
|
+
${kgAnalysis.blockingConditions
|
|
297
|
+
.filter(bc => bc.severity === 'warning')
|
|
298
|
+
.map(bc => `- **${bc.type}**: ${jsonSafeUserInput(bc.message)}`)
|
|
299
|
+
.join('\n')}
|
|
300
|
+
`
|
|
301
|
+
: ''}
|
|
302
|
+
|
|
303
|
+
${kgAnalysis.projectGoalProgress.intentProgress.length > 0
|
|
304
|
+
? `
|
|
286
305
|
### Intent Progress
|
|
287
306
|
${kgAnalysis.projectGoalProgress.intentProgress.map(intent => `- **${intent.status}**: ${jsonSafeUserInput(intent.humanRequest.substring(0, 60))}... (${intent.progress}%)`).join('\n')}
|
|
288
|
-
`
|
|
289
|
-
|
|
307
|
+
`
|
|
308
|
+
: ''}
|
|
309
|
+
`
|
|
310
|
+
: ''}
|
|
290
311
|
|
|
291
|
-
${issues.length > 0
|
|
312
|
+
${issues.length > 0
|
|
313
|
+
? `
|
|
292
314
|
|
|
293
315
|
## Validation Issues (Auto-Approved)
|
|
294
|
-
${issues
|
|
316
|
+
${issues
|
|
317
|
+
.map(issue => `
|
|
295
318
|
|
|
296
319
|
### ${jsonSafeFilePath(issue.file)}
|
|
297
320
|
${issue.issues.map(i => `- **${i.severity.toUpperCase()}**: ${jsonSafeUserInput(i.message)}`).join('\n')}
|
|
298
|
-
`)
|
|
299
|
-
|
|
321
|
+
`)
|
|
322
|
+
.join('\n')}
|
|
323
|
+
`
|
|
324
|
+
: ''}
|
|
300
325
|
|
|
301
|
-
${releaseReadinessResult
|
|
326
|
+
${releaseReadinessResult
|
|
327
|
+
? `
|
|
302
328
|
|
|
303
329
|
## Release Readiness Analysis
|
|
304
330
|
${jsonSafeUserInput(releaseReadinessResult.summary)}
|
|
@@ -306,10 +332,11 @@ ${jsonSafeUserInput(releaseReadinessResult.summary)}
|
|
|
306
332
|
### Post-Push Recommendations
|
|
307
333
|
${jsonSafeMarkdownList(releaseReadinessResult.recommendations)}
|
|
308
334
|
|
|
309
|
-
${releaseReadinessResult.isReady
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
`
|
|
335
|
+
${releaseReadinessResult.isReady
|
|
336
|
+
? '🎉 **Congratulations!** This push completed a release-ready state. Consider creating a release tag.'
|
|
337
|
+
: '📋 **Next Steps**: Address remaining blockers to achieve release readiness.'}
|
|
338
|
+
`
|
|
339
|
+
: ''}
|
|
313
340
|
|
|
314
341
|
## Git Output
|
|
315
342
|
\`\`\`
|
|
@@ -324,10 +351,12 @@ ${releaseReadinessResult?.isReady ? '- Consider creating a release tag or publis
|
|
|
324
351
|
${kgAnalysis ? '- Review knowledge graph insights for follow-up tasks' : ''}
|
|
325
352
|
`;
|
|
326
353
|
return {
|
|
327
|
-
content: [
|
|
354
|
+
content: [
|
|
355
|
+
{
|
|
328
356
|
type: 'text',
|
|
329
|
-
text: successText
|
|
330
|
-
}
|
|
357
|
+
text: successText,
|
|
358
|
+
},
|
|
359
|
+
],
|
|
331
360
|
};
|
|
332
361
|
}
|
|
333
362
|
else {
|
|
@@ -345,7 +374,8 @@ ${kgAnalysis ? `- **Knowledge Graph Analysis**: ✅ Completed` : ''}
|
|
|
345
374
|
## Staged Files
|
|
346
375
|
${stagedFiles.map(f => `- ${jsonSafeFilePath(f.path)} (${f.status}) - ${f.size} bytes`).join('\n')}
|
|
347
376
|
|
|
348
|
-
${kgAnalysis
|
|
377
|
+
${kgAnalysis
|
|
378
|
+
? `
|
|
349
379
|
## Knowledge Graph Analysis Preview
|
|
350
380
|
### Project Context
|
|
351
381
|
- **Active Intents**: ${kgAnalysis.activeIntents.length}
|
|
@@ -356,31 +386,41 @@ ${kgAnalysis ? `
|
|
|
356
386
|
### Architectural Assessment
|
|
357
387
|
${kgAnalysis.architecturalAlignment.details.map(detail => `- ${jsonSafeUserInput(detail)}`).join('\n')}
|
|
358
388
|
|
|
359
|
-
${kgAnalysis.blockingConditions.length > 0
|
|
389
|
+
${kgAnalysis.blockingConditions.length > 0
|
|
390
|
+
? `
|
|
360
391
|
### Potential Issues
|
|
361
392
|
${kgAnalysis.blockingConditions.map(bc => `- **${bc.type}** (${bc.severity}): ${jsonSafeUserInput(bc.message)}`).join('\n')}
|
|
362
|
-
`
|
|
393
|
+
`
|
|
394
|
+
: ''}
|
|
363
395
|
|
|
364
|
-
${kgAnalysis.projectGoalProgress.intentProgress.length > 0
|
|
396
|
+
${kgAnalysis.projectGoalProgress.intentProgress.length > 0
|
|
397
|
+
? `
|
|
365
398
|
### Intent Progress Impact
|
|
366
399
|
${kgAnalysis.projectGoalProgress.intentProgress.map(intent => `- **${intent.status}**: ${jsonSafeUserInput(intent.humanRequest.substring(0, 60))}... (${intent.progress}%)`).join('\n')}
|
|
367
|
-
`
|
|
368
|
-
|
|
400
|
+
`
|
|
401
|
+
: ''}
|
|
402
|
+
`
|
|
403
|
+
: ''}
|
|
369
404
|
|
|
370
|
-
${issues.length > 0
|
|
405
|
+
${issues.length > 0
|
|
406
|
+
? `
|
|
371
407
|
|
|
372
408
|
## Validation Issues Found
|
|
373
|
-
${issues
|
|
409
|
+
${issues
|
|
410
|
+
.map(issue => `
|
|
374
411
|
|
|
375
412
|
### ${jsonSafeFilePath(issue.file)}
|
|
376
413
|
${issue.issues.map(i => `- **${i.severity.toUpperCase()}**: ${jsonSafeUserInput(i.message)}`).join('\n')}
|
|
377
414
|
|
|
378
415
|
**Suggestions:**
|
|
379
416
|
${jsonSafeMarkdownList(issue.suggestions)}
|
|
380
|
-
`)
|
|
381
|
-
|
|
417
|
+
`)
|
|
418
|
+
.join('\n')}
|
|
419
|
+
`
|
|
420
|
+
: '## ✅ No Validation Issues Found'}
|
|
382
421
|
|
|
383
|
-
${releaseReadinessResult
|
|
422
|
+
${releaseReadinessResult
|
|
423
|
+
? `
|
|
384
424
|
|
|
385
425
|
## Release Readiness Analysis
|
|
386
426
|
${jsonSafeUserInput(releaseReadinessResult.summary)}
|
|
@@ -388,10 +428,11 @@ ${jsonSafeUserInput(releaseReadinessResult.summary)}
|
|
|
388
428
|
### Pre-Push Recommendations
|
|
389
429
|
${jsonSafeMarkdownList(releaseReadinessResult.recommendations)}
|
|
390
430
|
|
|
391
|
-
${releaseReadinessResult.isReady
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
`
|
|
431
|
+
${releaseReadinessResult.isReady
|
|
432
|
+
? '🎉 **Ready for Release!** This push would complete all release requirements.'
|
|
433
|
+
: '📋 **Release Blockers**: Address these issues before considering this a release.'}
|
|
434
|
+
`
|
|
435
|
+
: ''}
|
|
395
436
|
|
|
396
437
|
## Command to Execute
|
|
397
438
|
\`\`\`bash
|
|
@@ -402,10 +443,12 @@ git push${branch ? ` origin ${branch}` : ''}
|
|
|
402
443
|
**Note:** This was a dry run. No files were actually pushed.
|
|
403
444
|
`;
|
|
404
445
|
return {
|
|
405
|
-
content: [
|
|
446
|
+
content: [
|
|
447
|
+
{
|
|
406
448
|
type: 'text',
|
|
407
|
-
text: dryRunText
|
|
408
|
-
}
|
|
449
|
+
text: dryRunText,
|
|
450
|
+
},
|
|
451
|
+
],
|
|
409
452
|
};
|
|
410
453
|
}
|
|
411
454
|
}
|
|
@@ -421,7 +464,7 @@ async function getStagedFiles(projectPath) {
|
|
|
421
464
|
// Get staged files with status
|
|
422
465
|
const gitOutput = execSync('git diff --cached --name-status', {
|
|
423
466
|
cwd: projectPath,
|
|
424
|
-
encoding: 'utf8'
|
|
467
|
+
encoding: 'utf8',
|
|
425
468
|
});
|
|
426
469
|
if (!gitOutput.trim()) {
|
|
427
470
|
return [];
|
|
@@ -452,7 +495,7 @@ async function getStagedFiles(projectPath) {
|
|
|
452
495
|
path,
|
|
453
496
|
status: mapGitStatus(status || 'M'),
|
|
454
497
|
content: content || '',
|
|
455
|
-
size
|
|
498
|
+
size,
|
|
456
499
|
});
|
|
457
500
|
}
|
|
458
501
|
return files;
|
|
@@ -466,11 +509,16 @@ async function getStagedFiles(projectPath) {
|
|
|
466
509
|
*/
|
|
467
510
|
function mapGitStatus(status) {
|
|
468
511
|
switch (status) {
|
|
469
|
-
case 'A':
|
|
470
|
-
|
|
471
|
-
case '
|
|
472
|
-
|
|
473
|
-
|
|
512
|
+
case 'A':
|
|
513
|
+
return 'added';
|
|
514
|
+
case 'M':
|
|
515
|
+
return 'modified';
|
|
516
|
+
case 'D':
|
|
517
|
+
return 'deleted';
|
|
518
|
+
case 'R':
|
|
519
|
+
return 'renamed';
|
|
520
|
+
default:
|
|
521
|
+
return 'modified';
|
|
474
522
|
}
|
|
475
523
|
}
|
|
476
524
|
/**
|
|
@@ -504,7 +552,7 @@ async function validateStagedFiles(files, options) {
|
|
|
504
552
|
file: file.path,
|
|
505
553
|
issues,
|
|
506
554
|
suggestions,
|
|
507
|
-
approved: issues.length === 0 || issues.every(i => i.severity === 'info')
|
|
555
|
+
approved: issues.length === 0 || issues.every(i => i.severity === 'info'),
|
|
508
556
|
});
|
|
509
557
|
}
|
|
510
558
|
return results;
|
|
@@ -522,12 +570,16 @@ async function checkSensitiveContent(content, filePath) {
|
|
|
522
570
|
for (const match of result.matches) {
|
|
523
571
|
issues.push({
|
|
524
572
|
type: 'sensitive-content',
|
|
525
|
-
severity: match.pattern.severity === 'critical'
|
|
526
|
-
|
|
527
|
-
|
|
573
|
+
severity: match.pattern.severity === 'critical'
|
|
574
|
+
? 'error'
|
|
575
|
+
: match.pattern.severity === 'high'
|
|
576
|
+
? 'error'
|
|
577
|
+
: match.pattern.severity === 'medium'
|
|
578
|
+
? 'warning'
|
|
579
|
+
: 'info',
|
|
528
580
|
message: `${match.pattern.description}: ${match.match}`,
|
|
529
581
|
pattern: match.pattern.name,
|
|
530
|
-
line: match.line
|
|
582
|
+
line: match.line,
|
|
531
583
|
});
|
|
532
584
|
}
|
|
533
585
|
return issues;
|
|
@@ -550,10 +602,13 @@ async function checkLLMArtifacts(filePath, content) {
|
|
|
550
602
|
for (const match of result.matches) {
|
|
551
603
|
const issue = {
|
|
552
604
|
type: 'llm-artifact',
|
|
553
|
-
severity: match.pattern.severity === 'error'
|
|
554
|
-
|
|
605
|
+
severity: match.pattern.severity === 'error'
|
|
606
|
+
? 'error'
|
|
607
|
+
: match.pattern.severity === 'warning'
|
|
608
|
+
? 'warning'
|
|
609
|
+
: 'info',
|
|
555
610
|
message: `${match.pattern.description}: ${match.match}`,
|
|
556
|
-
pattern: match.pattern.name
|
|
611
|
+
pattern: match.pattern.name,
|
|
557
612
|
};
|
|
558
613
|
if (match.line !== undefined) {
|
|
559
614
|
issue.line = match.line;
|
|
@@ -580,13 +635,18 @@ async function checkLocationRules(filePath, allowedArtifacts) {
|
|
|
580
635
|
}
|
|
581
636
|
const result = validateFileLocation(filePath);
|
|
582
637
|
if (!result.isValid) {
|
|
583
|
-
return [
|
|
638
|
+
return [
|
|
639
|
+
{
|
|
584
640
|
type: 'wrong-location',
|
|
585
|
-
severity: result.severity === 'error'
|
|
586
|
-
|
|
641
|
+
severity: result.severity === 'error'
|
|
642
|
+
? 'error'
|
|
643
|
+
: result.severity === 'warning'
|
|
644
|
+
? 'warning'
|
|
645
|
+
: 'info',
|
|
587
646
|
message: result.message,
|
|
588
|
-
pattern: result.rule?.name || 'location-rule'
|
|
589
|
-
}
|
|
647
|
+
pattern: result.rule?.name || 'location-rule',
|
|
648
|
+
},
|
|
649
|
+
];
|
|
590
650
|
}
|
|
591
651
|
return [];
|
|
592
652
|
}
|
|
@@ -633,7 +693,7 @@ async function executePush(projectPath, branch, message) {
|
|
|
633
693
|
if (message) {
|
|
634
694
|
const commitOutput = execSync(`git commit -m "${message}"`, {
|
|
635
695
|
cwd: projectPath,
|
|
636
|
-
encoding: 'utf8'
|
|
696
|
+
encoding: 'utf8',
|
|
637
697
|
});
|
|
638
698
|
output += `Commit:\n${commitOutput}\n\n`;
|
|
639
699
|
}
|
|
@@ -641,7 +701,7 @@ async function executePush(projectPath, branch, message) {
|
|
|
641
701
|
const pushCommand = branch ? `git push origin ${branch}` : 'git push';
|
|
642
702
|
const pushOutput = execSync(pushCommand, {
|
|
643
703
|
cwd: projectPath,
|
|
644
|
-
encoding: 'utf8'
|
|
704
|
+
encoding: 'utf8',
|
|
645
705
|
});
|
|
646
706
|
output += `Push:\n${pushOutput}`;
|
|
647
707
|
return { output, success: true };
|
|
@@ -668,11 +728,13 @@ export async function smartGitPushMcpSafe(args) {
|
|
|
668
728
|
catch (error) {
|
|
669
729
|
// Always return a safe MCP response, never throw
|
|
670
730
|
const errorResponse = {
|
|
671
|
-
content: [
|
|
731
|
+
content: [
|
|
732
|
+
{
|
|
672
733
|
type: 'text',
|
|
673
|
-
text: `# Smart Git Push - Error\n\n**Error**: ${jsonSafeError(error)}\n\nPlease check your git configuration and try again
|
|
674
|
-
}
|
|
675
|
-
|
|
734
|
+
text: `# Smart Git Push - Error\n\n**Error**: ${jsonSafeError(error)}\n\nPlease check your git configuration and try again.`,
|
|
735
|
+
},
|
|
736
|
+
],
|
|
737
|
+
isError: true,
|
|
676
738
|
};
|
|
677
739
|
return validateMcpResponse(errorResponse);
|
|
678
740
|
}
|
|
@@ -683,11 +745,12 @@ export async function smartGitPushMcpSafe(args) {
|
|
|
683
745
|
*/
|
|
684
746
|
async function analyzeKnowledgeGraphContext(projectPath, stagedFiles) {
|
|
685
747
|
const kgManager = new KnowledgeGraphManager();
|
|
686
|
-
|
|
687
|
-
|
|
748
|
+
// TodoJsonManager removed - use mcp-shrimp-task-manager for task management
|
|
749
|
+
console.warn('⚠️ TodoJsonManager is deprecated and was removed in memory-centric transformation');
|
|
688
750
|
// Load knowledge graph and TODO data
|
|
689
751
|
const kg = await kgManager.loadKnowledgeGraph();
|
|
690
|
-
|
|
752
|
+
// Skip todo data loading - TodoJsonManager removed
|
|
753
|
+
const todoData = { tasks: {}, metadata: { totalTasks: 0, completedTasks: 0 } };
|
|
691
754
|
// Get active intents
|
|
692
755
|
const activeIntents = kg.intents.filter(i => i.currentStatus === 'executing' || i.currentStatus === 'planning');
|
|
693
756
|
// Analyze file changes against project context
|
|
@@ -708,7 +771,7 @@ async function analyzeKnowledgeGraphContext(projectPath, stagedFiles) {
|
|
|
708
771
|
blockingConditions,
|
|
709
772
|
architecturalAlignment,
|
|
710
773
|
taskDependencies,
|
|
711
|
-
projectGoalProgress
|
|
774
|
+
projectGoalProgress,
|
|
712
775
|
};
|
|
713
776
|
}
|
|
714
777
|
/**
|
|
@@ -717,7 +780,7 @@ async function analyzeKnowledgeGraphContext(projectPath, stagedFiles) {
|
|
|
717
780
|
async function analyzeFileChangesContext(stagedFiles, activeIntents, todoData) {
|
|
718
781
|
const fileAnalysis = {
|
|
719
782
|
intentAlignment: [],
|
|
720
|
-
todoTaskProgress: []
|
|
783
|
+
todoTaskProgress: [],
|
|
721
784
|
};
|
|
722
785
|
// Check how files relate to active intents
|
|
723
786
|
for (const intent of activeIntents) {
|
|
@@ -735,7 +798,7 @@ async function analyzeFileChangesContext(stagedFiles, activeIntents, todoData) {
|
|
|
735
798
|
fileAnalysis.intentAlignment.push({
|
|
736
799
|
intentId: intent.intentId,
|
|
737
800
|
alignedFiles,
|
|
738
|
-
conflictingFiles
|
|
801
|
+
conflictingFiles,
|
|
739
802
|
});
|
|
740
803
|
}
|
|
741
804
|
// Check how files relate to TODO tasks
|
|
@@ -743,15 +806,15 @@ async function analyzeFileChangesContext(stagedFiles, activeIntents, todoData) {
|
|
|
743
806
|
for (const task of tasks) {
|
|
744
807
|
const relatedFiles = stagedFiles.filter(file => {
|
|
745
808
|
const fileName = basename(file.path);
|
|
746
|
-
return task.title.toLowerCase().includes(fileName.toLowerCase()) ||
|
|
809
|
+
return (task.title.toLowerCase().includes(fileName.toLowerCase()) ||
|
|
747
810
|
task.description?.toLowerCase().includes(fileName.toLowerCase()) ||
|
|
748
|
-
task.title.toLowerCase().includes(file.path.toLowerCase());
|
|
811
|
+
task.title.toLowerCase().includes(file.path.toLowerCase()));
|
|
749
812
|
});
|
|
750
813
|
if (relatedFiles.length > 0) {
|
|
751
814
|
fileAnalysis.todoTaskProgress.push({
|
|
752
815
|
taskId: task.id,
|
|
753
816
|
relatedFiles: relatedFiles.map(f => f.path),
|
|
754
|
-
progressImpact: 'positive' // Assume file changes indicate progress
|
|
817
|
+
progressImpact: 'positive', // Assume file changes indicate progress
|
|
755
818
|
});
|
|
756
819
|
}
|
|
757
820
|
}
|
|
@@ -800,7 +863,7 @@ async function analyzeArchitecturalAlignment(stagedFiles, activeIntents, _projec
|
|
|
800
863
|
return {
|
|
801
864
|
score: Math.max(0, Math.min(100, alignmentScore)),
|
|
802
865
|
details,
|
|
803
|
-
recommendations
|
|
866
|
+
recommendations,
|
|
804
867
|
};
|
|
805
868
|
}
|
|
806
869
|
/**
|
|
@@ -834,7 +897,7 @@ async function analyzeProjectGoalProgress(_kg, _todoData, activeIntents) {
|
|
|
834
897
|
intentId: intent.intentId,
|
|
835
898
|
humanRequest: intent.humanRequest,
|
|
836
899
|
progress,
|
|
837
|
-
status: intent.currentStatus
|
|
900
|
+
status: intent.currentStatus,
|
|
838
901
|
};
|
|
839
902
|
});
|
|
840
903
|
const overallProgress = intentProgress.length > 0
|
|
@@ -842,7 +905,7 @@ async function analyzeProjectGoalProgress(_kg, _todoData, activeIntents) {
|
|
|
842
905
|
: 0;
|
|
843
906
|
return {
|
|
844
907
|
overallProgress,
|
|
845
|
-
intentProgress
|
|
908
|
+
intentProgress,
|
|
846
909
|
};
|
|
847
910
|
}
|
|
848
911
|
/**
|
|
@@ -857,7 +920,7 @@ async function determineBlockingConditions(_fileAnalysis, architecturalAlignment
|
|
|
857
920
|
severity: 'error',
|
|
858
921
|
message: `${taskDependencies.blocking.length} critical tasks are blocking this push`,
|
|
859
922
|
recommendation: 'Complete or unblock critical tasks before pushing',
|
|
860
|
-
affectedFiles: stagedFiles.map(f => f.path)
|
|
923
|
+
affectedFiles: stagedFiles.map(f => f.path),
|
|
861
924
|
});
|
|
862
925
|
}
|
|
863
926
|
// Check architectural alignment
|
|
@@ -867,7 +930,7 @@ async function determineBlockingConditions(_fileAnalysis, architecturalAlignment
|
|
|
867
930
|
severity: 'warning',
|
|
868
931
|
message: `Low architectural alignment score: ${architecturalAlignment.score}%`,
|
|
869
932
|
recommendation: 'Review architectural compliance of changes',
|
|
870
|
-
affectedFiles: stagedFiles.map(f => f.path)
|
|
933
|
+
affectedFiles: stagedFiles.map(f => f.path),
|
|
871
934
|
});
|
|
872
935
|
}
|
|
873
936
|
// Check goal regression
|
|
@@ -877,7 +940,7 @@ async function determineBlockingConditions(_fileAnalysis, architecturalAlignment
|
|
|
877
940
|
severity: 'warning',
|
|
878
941
|
message: `Low project goal progress: ${projectGoalProgress.overallProgress}%`,
|
|
879
942
|
recommendation: 'Focus on completing active project goals',
|
|
880
|
-
affectedFiles: stagedFiles.map(f => f.path)
|
|
943
|
+
affectedFiles: stagedFiles.map(f => f.path),
|
|
881
944
|
});
|
|
882
945
|
}
|
|
883
946
|
return blockingConditions;
|
|
@@ -893,113 +956,4 @@ async function findRelevantAdrs(_stagedFiles, _projectPath) {
|
|
|
893
956
|
/**
|
|
894
957
|
* Update TODO tasks based on successful git push with Knowledge Graph integration
|
|
895
958
|
*/
|
|
896
|
-
async function updateTodoTasksFromGitPushWithKG(todoManager, stagedFiles, kgAnalysis, releaseReadinessResult) {
|
|
897
|
-
try {
|
|
898
|
-
// Create intent for this git push
|
|
899
|
-
const kgManager = new KnowledgeGraphManager();
|
|
900
|
-
const intentId = await kgManager.createIntent(`Git push: ${stagedFiles.length} files`, [`Push ${stagedFiles.map(f => f.path).join(', ')}`], 'medium');
|
|
901
|
-
// Record tool execution
|
|
902
|
-
await kgManager.addToolExecution(intentId, 'smart_git_push', {
|
|
903
|
-
files: stagedFiles.map(f => f.path),
|
|
904
|
-
branch: 'current',
|
|
905
|
-
knowledgeGraphAnalysis: true
|
|
906
|
-
}, {
|
|
907
|
-
success: true,
|
|
908
|
-
filesProcessed: stagedFiles.length,
|
|
909
|
-
architecturalAlignment: kgAnalysis.architecturalAlignment.score
|
|
910
|
-
}, true, [], // todoTasksCreated
|
|
911
|
-
kgAnalysis.taskDependencies.completed // todoTasksModified
|
|
912
|
-
);
|
|
913
|
-
// Update intent status
|
|
914
|
-
await kgManager.updateIntentStatus(intentId, 'completed');
|
|
915
|
-
// Update TODO tasks
|
|
916
|
-
await updateTodoTasksFromGitPush(todoManager, stagedFiles, releaseReadinessResult);
|
|
917
|
-
}
|
|
918
|
-
catch (error) {
|
|
919
|
-
console.error('Error updating TODO tasks with KG:', error);
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
/**
|
|
923
|
-
* Update TODO tasks based on successful git push
|
|
924
|
-
*/
|
|
925
|
-
async function updateTodoTasksFromGitPush(todoManager, stagedFiles, releaseReadinessResult) {
|
|
926
|
-
try {
|
|
927
|
-
const data = await todoManager.loadTodoData();
|
|
928
|
-
const tasks = Object.values(data.tasks);
|
|
929
|
-
// 1. Auto-update tasks based on file changes
|
|
930
|
-
for (const file of stagedFiles) {
|
|
931
|
-
// Look for tasks that mention this file in their title or description
|
|
932
|
-
const relatedTasks = tasks.filter(task => task.title.toLowerCase().includes(basename(file.path).toLowerCase()) ||
|
|
933
|
-
task.description?.toLowerCase().includes(basename(file.path).toLowerCase()) ||
|
|
934
|
-
task.title.toLowerCase().includes(file.path.toLowerCase()));
|
|
935
|
-
for (const task of relatedTasks) {
|
|
936
|
-
if (task.status === 'pending' || task.status === 'in_progress') {
|
|
937
|
-
// Update to in_progress if pending, or completed if already in_progress
|
|
938
|
-
const newStatus = task.status === 'pending' ? 'in_progress' : 'completed';
|
|
939
|
-
await todoManager.updateTask({
|
|
940
|
-
taskId: task.id,
|
|
941
|
-
updates: {
|
|
942
|
-
status: newStatus,
|
|
943
|
-
notes: `Auto-updated: ${file.path} was ${file.status} in git push`
|
|
944
|
-
},
|
|
945
|
-
reason: `Git push: ${file.path} ${file.status}`,
|
|
946
|
-
triggeredBy: 'tool'
|
|
947
|
-
});
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
// 2. Create follow-up tasks based on what was pushed
|
|
952
|
-
const followUpTasks = [];
|
|
953
|
-
// If documentation files were changed, create review tasks
|
|
954
|
-
const docFiles = stagedFiles.filter(f => f.path.match(/\.(md|txt|rst)$/i) &&
|
|
955
|
-
!f.path.includes('TODO.md'));
|
|
956
|
-
if (docFiles.length > 0) {
|
|
957
|
-
followUpTasks.push({
|
|
958
|
-
title: `Review updated documentation`,
|
|
959
|
-
description: `Review changes to: ${docFiles.map(f => f.path).join(', ')}`,
|
|
960
|
-
priority: 'medium',
|
|
961
|
-
category: 'documentation',
|
|
962
|
-
tags: ['review', 'documentation']
|
|
963
|
-
});
|
|
964
|
-
}
|
|
965
|
-
// If source code was changed, create testing tasks
|
|
966
|
-
const codeFiles = stagedFiles.filter(f => f.path.match(/\.(ts|js|py|java|cs|go|rb|php|swift|kt|rs|cpp|c|h)$/i));
|
|
967
|
-
if (codeFiles.length > 0) {
|
|
968
|
-
followUpTasks.push({
|
|
969
|
-
title: `Test changes in ${codeFiles.length} code files`,
|
|
970
|
-
description: `Verify functionality of: ${codeFiles.map(f => f.path).join(', ')}`,
|
|
971
|
-
priority: 'high',
|
|
972
|
-
category: 'testing',
|
|
973
|
-
tags: ['testing', 'verification']
|
|
974
|
-
});
|
|
975
|
-
}
|
|
976
|
-
// If release readiness improved, create release tasks
|
|
977
|
-
if (releaseReadinessResult?.isReady) {
|
|
978
|
-
const existingReleaseTasks = tasks.filter(task => task.title.toLowerCase().includes('release') ||
|
|
979
|
-
task.tags?.includes('release'));
|
|
980
|
-
if (existingReleaseTasks.length === 0) {
|
|
981
|
-
followUpTasks.push({
|
|
982
|
-
title: `Prepare release - all requirements met`,
|
|
983
|
-
description: `Project is now release-ready. Create release tag and publish.`,
|
|
984
|
-
priority: 'critical',
|
|
985
|
-
category: 'release',
|
|
986
|
-
tags: ['release', 'deployment']
|
|
987
|
-
});
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
// Create follow-up tasks
|
|
991
|
-
for (const taskData of followUpTasks) {
|
|
992
|
-
await todoManager.createTask(taskData);
|
|
993
|
-
}
|
|
994
|
-
// 3. Update task metadata with git information
|
|
995
|
-
const now = new Date().toISOString();
|
|
996
|
-
data.metadata.lastGitPush = now;
|
|
997
|
-
data.metadata.lastPushFiles = stagedFiles.map(f => f.path);
|
|
998
|
-
await todoManager.saveTodoData(data);
|
|
999
|
-
}
|
|
1000
|
-
catch (error) {
|
|
1001
|
-
// Silently handle errors to avoid breaking git push
|
|
1002
|
-
console.error('Error updating TODO tasks from git push:', error);
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
959
|
//# sourceMappingURL=smart-git-push-tool.js.map
|