midas-mcp 3.9.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +70 -22
- package/dist/analyzer.js.map +1 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +183 -1
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +38 -0
- package/dist/config.js.map +1 -1
- package/dist/docs/WHY.md +168 -0
- package/dist/docs/examples/brainlift-example.md +87 -0
- package/dist/docs/examples/gameplan-example.md +230 -0
- package/dist/docs/examples/prd-example.md +170 -0
- package/dist/providers.d.ts +1 -0
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +61 -18
- package/dist/providers.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +32 -2
- package/dist/server.js.map +1 -1
- package/dist/state/phase.d.ts +32 -0
- package/dist/state/phase.d.ts.map +1 -1
- package/dist/state/phase.js +25 -21
- package/dist/state/phase.js.map +1 -1
- package/dist/tools/analyze.d.ts +5 -0
- package/dist/tools/analyze.d.ts.map +1 -1
- package/dist/tools/analyze.js +21 -0
- package/dist/tools/analyze.js.map +1 -1
- package/dist/tools/cleanup.d.ts +53 -0
- package/dist/tools/cleanup.d.ts.map +1 -0
- package/dist/tools/cleanup.js +170 -0
- package/dist/tools/cleanup.js.map +1 -0
- package/dist/tools/examples.d.ts +30 -0
- package/dist/tools/examples.d.ts.map +1 -0
- package/dist/tools/examples.js +65 -0
- package/dist/tools/examples.js.map +1 -0
- package/dist/tools/hotfix.d.ts +69 -0
- package/dist/tools/hotfix.d.ts.map +1 -0
- package/dist/tools/hotfix.js +174 -0
- package/dist/tools/hotfix.js.map +1 -0
- package/dist/tools/index.d.ts +6 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +11 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/scope.d.ts +50 -0
- package/dist/tools/scope.d.ts.map +1 -0
- package/dist/tools/scope.js +278 -0
- package/dist/tools/scope.js.map +1 -0
- package/dist/tools/validate-docs.d.ts +65 -0
- package/dist/tools/validate-docs.d.ts.map +1 -0
- package/dist/tools/validate-docs.js +196 -0
- package/dist/tools/validate-docs.js.map +1 -0
- package/dist/tools/verify.d.ts +22 -0
- package/dist/tools/verify.d.ts.map +1 -1
- package/dist/tools/verify.js +66 -0
- package/dist/tools/verify.js.map +1 -1
- package/dist/tracker.d.ts +36 -0
- package/dist/tracker.d.ts.map +1 -1
- package/dist/tracker.js +134 -0
- package/dist/tracker.js.map +1 -1
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +184 -42
- package/dist/tui.js.map +1 -1
- package/docs/WHY.md +168 -0
- package/docs/examples/brainlift-example.md +87 -0
- package/docs/examples/gameplan-example.md +230 -0
- package/docs/examples/prd-example.md +170 -0
- package/package.json +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const startHotfixSchema: z.ZodObject<{
|
|
3
|
+
projectPath: z.ZodOptional<z.ZodString>;
|
|
4
|
+
description: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
description: string;
|
|
7
|
+
projectPath?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
description: string;
|
|
10
|
+
projectPath?: string | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export type StartHotfixInput = z.infer<typeof startHotfixSchema>;
|
|
13
|
+
export interface StartHotfixResult {
|
|
14
|
+
success: boolean;
|
|
15
|
+
previousPhase: string;
|
|
16
|
+
message: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Start hotfix mode - saves current phase and jumps to BUILD/DEBUG
|
|
20
|
+
*/
|
|
21
|
+
export declare function startHotfix(input: StartHotfixInput): StartHotfixResult;
|
|
22
|
+
export declare const completeHotfixSchema: z.ZodObject<{
|
|
23
|
+
projectPath: z.ZodOptional<z.ZodString>;
|
|
24
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
projectPath?: string | undefined;
|
|
27
|
+
summary?: string | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
projectPath?: string | undefined;
|
|
30
|
+
summary?: string | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export type CompleteHotfixInput = z.infer<typeof completeHotfixSchema>;
|
|
33
|
+
export interface CompleteHotfixResult {
|
|
34
|
+
success: boolean;
|
|
35
|
+
returnedTo: string;
|
|
36
|
+
message: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Complete hotfix mode - return to previous phase
|
|
40
|
+
*/
|
|
41
|
+
export declare function completeHotfix(input: CompleteHotfixInput): CompleteHotfixResult;
|
|
42
|
+
export declare const cancelHotfixSchema: z.ZodObject<{
|
|
43
|
+
projectPath: z.ZodOptional<z.ZodString>;
|
|
44
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
projectPath?: string | undefined;
|
|
47
|
+
reason?: string | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
projectPath?: string | undefined;
|
|
50
|
+
reason?: string | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
export type CancelHotfixInput = z.infer<typeof cancelHotfixSchema>;
|
|
53
|
+
export declare function cancelHotfix(input: CancelHotfixInput): CompleteHotfixResult;
|
|
54
|
+
export declare const getHotfixStatusSchema: z.ZodObject<{
|
|
55
|
+
projectPath: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
projectPath?: string | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
projectPath?: string | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
export type GetHotfixStatusInput = z.infer<typeof getHotfixStatusSchema>;
|
|
62
|
+
export interface HotfixStatus {
|
|
63
|
+
active: boolean;
|
|
64
|
+
description?: string;
|
|
65
|
+
previousPhase?: string;
|
|
66
|
+
duration?: string;
|
|
67
|
+
}
|
|
68
|
+
export declare function getHotfixStatus(input: GetHotfixStatusInput): HotfixStatus;
|
|
69
|
+
//# sourceMappingURL=hotfix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hotfix.d.ts","sourceRoot":"","sources":["../../src/tools/hotfix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEjE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,iBAAiB,CA8CtE;AAMD,eAAO,MAAM,oBAAoB;;;;;;;;;EAG/B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEvE,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,oBAAoB,CAwC/E;AAMD,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEnE,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,oBAAoB,CA8B3E;AAMD,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEzE,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CA4BzE"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { loadState, saveState } from '../state/phase.js';
|
|
3
|
+
import { saveToJournal } from './journal.js';
|
|
4
|
+
import { sanitizePath } from '../security.js';
|
|
5
|
+
import { logEvent } from '../events.js';
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// Hotfix Mode - Emergency bug fixes without disrupting normal workflow
|
|
8
|
+
// ============================================================================
|
|
9
|
+
export const startHotfixSchema = z.object({
|
|
10
|
+
projectPath: z.string().optional().describe('Path to project root'),
|
|
11
|
+
description: z.string().describe('Brief description of the bug being fixed'),
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* Start hotfix mode - saves current phase and jumps to BUILD/DEBUG
|
|
15
|
+
*/
|
|
16
|
+
export function startHotfix(input) {
|
|
17
|
+
const projectPath = sanitizePath(input.projectPath);
|
|
18
|
+
const state = loadState(projectPath);
|
|
19
|
+
// Check if already in hotfix mode
|
|
20
|
+
if (state.hotfix?.active) {
|
|
21
|
+
return {
|
|
22
|
+
success: false,
|
|
23
|
+
previousPhase: formatPhase(state.current),
|
|
24
|
+
message: 'Already in hotfix mode. Complete or cancel the current hotfix first.',
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
// Save current phase and enter hotfix mode
|
|
28
|
+
const previousPhase = state.current;
|
|
29
|
+
state.hotfix = {
|
|
30
|
+
active: true,
|
|
31
|
+
description: input.description,
|
|
32
|
+
previousPhase,
|
|
33
|
+
startedAt: new Date().toISOString(),
|
|
34
|
+
};
|
|
35
|
+
// Jump to BUILD/DEBUG step
|
|
36
|
+
state.current = { phase: 'BUILD', step: 'DEBUG' };
|
|
37
|
+
state.history.push(previousPhase);
|
|
38
|
+
saveState(projectPath, state);
|
|
39
|
+
// Auto-create minimal journal entry
|
|
40
|
+
saveToJournal({
|
|
41
|
+
projectPath,
|
|
42
|
+
title: `HOTFIX: ${input.description}`,
|
|
43
|
+
conversation: `Starting hotfix for: ${input.description}\n\nPrevious phase: ${formatPhase(previousPhase)}\nJumping to BUILD/DEBUG mode.`,
|
|
44
|
+
tags: ['hotfix', 'bug'],
|
|
45
|
+
});
|
|
46
|
+
logEvent(projectPath, {
|
|
47
|
+
type: 'tool_called',
|
|
48
|
+
tool: 'midas_start_hotfix',
|
|
49
|
+
data: { description: input.description, previousPhase: formatPhase(previousPhase) },
|
|
50
|
+
});
|
|
51
|
+
return {
|
|
52
|
+
success: true,
|
|
53
|
+
previousPhase: formatPhase(previousPhase),
|
|
54
|
+
message: `Hotfix mode started. Jumped to BUILD/DEBUG. When complete, use midas_complete_hotfix to return to ${formatPhase(previousPhase)}.`,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
// ============================================================================
|
|
58
|
+
// Complete Hotfix - Return to previous phase
|
|
59
|
+
// ============================================================================
|
|
60
|
+
export const completeHotfixSchema = z.object({
|
|
61
|
+
projectPath: z.string().optional().describe('Path to project root'),
|
|
62
|
+
summary: z.string().optional().describe('Brief summary of what was fixed'),
|
|
63
|
+
});
|
|
64
|
+
/**
|
|
65
|
+
* Complete hotfix mode - return to previous phase
|
|
66
|
+
*/
|
|
67
|
+
export function completeHotfix(input) {
|
|
68
|
+
const projectPath = sanitizePath(input.projectPath);
|
|
69
|
+
const state = loadState(projectPath);
|
|
70
|
+
// Check if in hotfix mode
|
|
71
|
+
if (!state.hotfix?.active) {
|
|
72
|
+
return {
|
|
73
|
+
success: false,
|
|
74
|
+
returnedTo: formatPhase(state.current),
|
|
75
|
+
message: 'Not in hotfix mode.',
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const hotfixDescription = state.hotfix.description || 'Unknown hotfix';
|
|
79
|
+
const previousPhase = state.hotfix.previousPhase || { phase: 'IDLE' };
|
|
80
|
+
// Return to previous phase
|
|
81
|
+
state.current = previousPhase;
|
|
82
|
+
state.hotfix = { active: false };
|
|
83
|
+
saveState(projectPath, state);
|
|
84
|
+
// Log completion in journal
|
|
85
|
+
saveToJournal({
|
|
86
|
+
projectPath,
|
|
87
|
+
title: `HOTFIX COMPLETE: ${hotfixDescription}`,
|
|
88
|
+
conversation: `Hotfix completed: ${hotfixDescription}\n\nSummary: ${input.summary || 'No summary provided'}\n\nReturning to: ${formatPhase(previousPhase)}`,
|
|
89
|
+
tags: ['hotfix', 'complete'],
|
|
90
|
+
});
|
|
91
|
+
logEvent(projectPath, {
|
|
92
|
+
type: 'tool_called',
|
|
93
|
+
tool: 'midas_complete_hotfix',
|
|
94
|
+
data: { summary: input.summary, returnedTo: formatPhase(previousPhase) },
|
|
95
|
+
});
|
|
96
|
+
return {
|
|
97
|
+
success: true,
|
|
98
|
+
returnedTo: formatPhase(previousPhase),
|
|
99
|
+
message: `Hotfix complete! Returned to ${formatPhase(previousPhase)}.`,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
// ============================================================================
|
|
103
|
+
// Cancel Hotfix - Abandon hotfix and return to previous phase
|
|
104
|
+
// ============================================================================
|
|
105
|
+
export const cancelHotfixSchema = z.object({
|
|
106
|
+
projectPath: z.string().optional().describe('Path to project root'),
|
|
107
|
+
reason: z.string().optional().describe('Why the hotfix was cancelled'),
|
|
108
|
+
});
|
|
109
|
+
export function cancelHotfix(input) {
|
|
110
|
+
const projectPath = sanitizePath(input.projectPath);
|
|
111
|
+
const state = loadState(projectPath);
|
|
112
|
+
if (!state.hotfix?.active) {
|
|
113
|
+
return {
|
|
114
|
+
success: false,
|
|
115
|
+
returnedTo: formatPhase(state.current),
|
|
116
|
+
message: 'Not in hotfix mode.',
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
const previousPhase = state.hotfix.previousPhase || { phase: 'IDLE' };
|
|
120
|
+
// Return to previous phase without completion
|
|
121
|
+
state.current = previousPhase;
|
|
122
|
+
state.hotfix = { active: false };
|
|
123
|
+
saveState(projectPath, state);
|
|
124
|
+
logEvent(projectPath, {
|
|
125
|
+
type: 'tool_called',
|
|
126
|
+
tool: 'midas_cancel_hotfix',
|
|
127
|
+
data: { reason: input.reason, returnedTo: formatPhase(previousPhase) },
|
|
128
|
+
});
|
|
129
|
+
return {
|
|
130
|
+
success: true,
|
|
131
|
+
returnedTo: formatPhase(previousPhase),
|
|
132
|
+
message: `Hotfix cancelled. Returned to ${formatPhase(previousPhase)}.`,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
// ============================================================================
|
|
136
|
+
// Get Hotfix Status
|
|
137
|
+
// ============================================================================
|
|
138
|
+
export const getHotfixStatusSchema = z.object({
|
|
139
|
+
projectPath: z.string().optional().describe('Path to project root'),
|
|
140
|
+
});
|
|
141
|
+
export function getHotfixStatus(input) {
|
|
142
|
+
const projectPath = sanitizePath(input.projectPath);
|
|
143
|
+
const state = loadState(projectPath);
|
|
144
|
+
if (!state.hotfix?.active) {
|
|
145
|
+
return { active: false };
|
|
146
|
+
}
|
|
147
|
+
// Calculate duration
|
|
148
|
+
let duration;
|
|
149
|
+
if (state.hotfix.startedAt) {
|
|
150
|
+
const started = new Date(state.hotfix.startedAt).getTime();
|
|
151
|
+
const now = Date.now();
|
|
152
|
+
const minutes = Math.floor((now - started) / (1000 * 60));
|
|
153
|
+
if (minutes < 60) {
|
|
154
|
+
duration = `${minutes}m`;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
const hours = Math.floor(minutes / 60);
|
|
158
|
+
duration = `${hours}h ${minutes % 60}m`;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
active: true,
|
|
163
|
+
description: state.hotfix.description,
|
|
164
|
+
previousPhase: state.hotfix.previousPhase ? formatPhase(state.hotfix.previousPhase) : undefined,
|
|
165
|
+
duration,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
// Helper function
|
|
169
|
+
function formatPhase(phase) {
|
|
170
|
+
if (phase.phase === 'IDLE')
|
|
171
|
+
return 'IDLE';
|
|
172
|
+
return `${phase.phase}:${phase.step}`;
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=hotfix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hotfix.js","sourceRoot":"","sources":["../../src/tools/hotfix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAc,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,+EAA+E;AAC/E,uEAAuE;AACvE,+EAA+E;AAE/E,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IACnE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;CAC7E,CAAC,CAAC;AAUH;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,WAAW,GAAG,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;IAErC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AAE,CAAC;QAC3D,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;QAC1D,IAAI,OAAO,GAAG,EAAE,EAAE,CAAC;YACjB,QAAQ,GAAG,GAAG,OAAO,GAAG,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;YACvC,QAAQ,GAAG,GAAG,KAAK,KAAK,OAAO,GAAG,EAAE,GAAG,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,OAAO;QACL,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW;QACrC,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS;QAC/F,QAAQ;KACT,CAAC;AACJ,CAAC;AAED,kBAAkB;AAClB,SAAS,WAAW,CAAC,KAAY;IAC/B,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1C,OAAO,GAAG,KAAK,CAAC,KAAK,IAAK,KAA0B,CAAC,IAAI,EAAE,CAAC;AAC9D,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -6,9 +6,14 @@ export { triggerTornado, tornadoSchema } from './tornado.js';
|
|
|
6
6
|
export { expandHorizon, horizonSchema } from './horizon.js';
|
|
7
7
|
export { analyze, analyzeSchema, suggestPrompt, suggestPromptSchema, advancePhase, advancePhaseSchema, } from './analyze.js';
|
|
8
8
|
export { saveToJournal, saveJournalSchema, getJournalEntries, getJournalSchema, searchJournal, searchJournalSchema, } from './journal.js';
|
|
9
|
-
export { verify, verifySchema, smartSuggest, smartSuggestSchema, setTask, setTaskSchema, updateTask, updateTaskSchema, clearTask, clearTaskSchema, recordErrorTool, recordErrorSchema, recordFix, recordFixSchema, getStuck, getStuckSchema, } from './verify.js';
|
|
9
|
+
export { verify, verifySchema, smartSuggest, smartSuggestSchema, setTask, setTaskSchema, updateTask, updateTaskSchema, clearTask, clearTaskSchema, recordErrorTool, recordErrorSchema, recordFix, recordFixSchema, getStuck, getStuckSchema, unstuck, unstuckSchema, } from './verify.js';
|
|
10
10
|
export { getProvider, getProviderSchema, setProvider, setProviderSchema, setApiKey, setApiKeySchema, listProviders, listProvidersSchema, } from './config.js';
|
|
11
11
|
export { verifyDeploy, verifyDeploySchema, generateChangelog, changelogSchema, saveRetrospective, retrospectiveSchema, startNextCycle, nextCycleSchema, archiveCycle, archiveCycleSchema, getCostReport, costReportSchema, recordCost, } from './grow.js';
|
|
12
12
|
export { checkCompleteness, completenessSchema, } from './completeness.js';
|
|
13
13
|
export { validateGates, validateGatesSchema, enforceGatesAndAdvance, enforceGatesSchema, } from './validate.js';
|
|
14
|
+
export { showExample, showExampleSchema, listExamples, } from './examples.js';
|
|
15
|
+
export { validateBrainlift, validateBrainliftSchema, validatePRD, validatePRDSchema, validateGameplan, validateGameplanSchema, validatePlanningDocs, validatePlanningDocsSchema, } from './validate-docs.js';
|
|
16
|
+
export { startHotfix, startHotfixSchema, completeHotfix, completeHotfixSchema, cancelHotfix, cancelHotfixSchema, getHotfixStatus, getHotfixStatusSchema, } from './hotfix.js';
|
|
17
|
+
export { scanDebt, scanDebtSchema, getCleanupSuggestion, getCleanupSuggestionSchema, } from './cleanup.js';
|
|
18
|
+
export { detectProjectType, detectProjectTypeSchema, checkScopeCreep, checkScopeCreepSchema, setScopeBaseline, setScopeBaselineSchema, } from './scope.js';
|
|
14
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGvD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG/D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG5D,OAAO,EACL,OAAO,EACP,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,QAAQ,EACR,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGvD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc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ACjB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,YAAY,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -15,7 +15,7 @@ export { analyze, analyzeSchema, suggestPrompt, suggestPromptSchema, advancePhas
|
|
|
15
15
|
// Journal tools - save full conversations for context
|
|
16
16
|
export { saveToJournal, saveJournalSchema, getJournalEntries, getJournalSchema, searchJournal, searchJournalSchema, } from './journal.js';
|
|
17
17
|
// Verification and smart suggestion tools
|
|
18
|
-
export { verify, verifySchema, smartSuggest, smartSuggestSchema, setTask, setTaskSchema, updateTask, updateTaskSchema, clearTask, clearTaskSchema, recordErrorTool, recordErrorSchema, recordFix, recordFixSchema, getStuck, getStuckSchema, } from './verify.js';
|
|
18
|
+
export { verify, verifySchema, smartSuggest, smartSuggestSchema, setTask, setTaskSchema, updateTask, updateTaskSchema, clearTask, clearTaskSchema, recordErrorTool, recordErrorSchema, recordFix, recordFixSchema, getStuck, getStuckSchema, unstuck, unstuckSchema, } from './verify.js';
|
|
19
19
|
// Provider/config tools
|
|
20
20
|
export { getProvider, getProviderSchema, setProvider, setProviderSchema, setApiKey, setApiKeySchema, listProviders, listProvidersSchema, } from './config.js';
|
|
21
21
|
// GROW phase tools - deployment, retrospectives, cycles
|
|
@@ -24,4 +24,14 @@ export { verifyDeploy, verifyDeploySchema, generateChangelog, changelogSchema, s
|
|
|
24
24
|
export { checkCompleteness, completenessSchema, } from './completeness.js';
|
|
25
25
|
// Validation pipeline - enforce gates before phase advance
|
|
26
26
|
export { validateGates, validateGatesSchema, enforceGatesAndAdvance, enforceGatesSchema, } from './validate.js';
|
|
27
|
+
// Example documents for coaching
|
|
28
|
+
export { showExample, showExampleSchema, listExamples, } from './examples.js';
|
|
29
|
+
// Document validation - quality gates for planning docs
|
|
30
|
+
export { validateBrainlift, validateBrainliftSchema, validatePRD, validatePRDSchema, validateGameplan, validateGameplanSchema, validatePlanningDocs, validatePlanningDocsSchema, } from './validate-docs.js';
|
|
31
|
+
// Hotfix mode - emergency bug fixes
|
|
32
|
+
export { startHotfix, startHotfixSchema, completeHotfix, completeHotfixSchema, cancelHotfix, cancelHotfixSchema, getHotfixStatus, getHotfixStatusSchema, } from './hotfix.js';
|
|
33
|
+
// Tech debt cleanup
|
|
34
|
+
export { scanDebt, scanDebtSchema, getCleanupSuggestion, getCleanupSuggestionSchema, } from './cleanup.js';
|
|
35
|
+
// Project type detection and scope tracking
|
|
36
|
+
export { detectProjectType, detectProjectTypeSchema, checkScopeCreep, checkScopeCreepSchema, setScopeBaseline, setScopeBaselineSchema, } from './scope.js';
|
|
27
37
|
//# sourceMappingURL=index.js.map
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,aAAa;AACb,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEhD,kBAAkB;AAClB,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEvD,eAAe;AACf,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE/D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AC3B,MAAM,oBAAoB,CAAC;AAE5B,oCAAoC;AACpC,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAErB,oBAAoB;AACpB,OAAO,EACL,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AAEtB,4CAA4C;AAC5C,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type ProjectType = 'cli' | 'library' | 'web-app' | 'api' | 'mobile' | 'monorepo' | 'unknown';
|
|
3
|
+
export interface ProjectTypeResult {
|
|
4
|
+
type: ProjectType;
|
|
5
|
+
confidence: number;
|
|
6
|
+
indicators: string[];
|
|
7
|
+
framework?: string;
|
|
8
|
+
irrelevantSteps: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare const detectProjectTypeSchema: z.ZodObject<{
|
|
11
|
+
projectPath: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
projectPath?: string | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
projectPath?: string | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
export type DetectProjectTypeInput = z.infer<typeof detectProjectTypeSchema>;
|
|
18
|
+
export declare function detectProjectType(input: DetectProjectTypeInput): ProjectTypeResult;
|
|
19
|
+
export interface ScopeMetrics {
|
|
20
|
+
initialFileCount: number;
|
|
21
|
+
currentFileCount: number;
|
|
22
|
+
initialComplexity: number;
|
|
23
|
+
currentComplexity: number;
|
|
24
|
+
driftPercentage: number;
|
|
25
|
+
featuresAdded: string[];
|
|
26
|
+
warning: boolean;
|
|
27
|
+
message: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const checkScopeCreepSchema: z.ZodObject<{
|
|
30
|
+
projectPath: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
projectPath?: string | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
projectPath?: string | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
export type CheckScopeCreepInput = z.infer<typeof checkScopeCreepSchema>;
|
|
37
|
+
export declare function checkScopeCreep(input: CheckScopeCreepInput): ScopeMetrics;
|
|
38
|
+
export declare const setScopeBaselineSchema: z.ZodObject<{
|
|
39
|
+
projectPath: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
projectPath?: string | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
projectPath?: string | undefined;
|
|
44
|
+
}>;
|
|
45
|
+
export type SetScopeBaselineInput = z.infer<typeof setScopeBaselineSchema>;
|
|
46
|
+
export declare function setScopeBaseline(input: SetScopeBaselineInput): {
|
|
47
|
+
success: boolean;
|
|
48
|
+
message: string;
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/tools/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAEpG,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,eAAO,MAAM,uBAAuB;;;;;;EAElC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE7E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,iBAAiB,CAwHlF;AAMD,MAAM,WAAW,YAAY;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAsFzE,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CAuCzE;AAMD,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE3E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAyBpG"}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { existsSync, readFileSync, readdirSync } from 'fs';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
import { execSync } from 'child_process';
|
|
5
|
+
import { logger } from '../logger.js';
|
|
6
|
+
import { sanitizePath } from '../security.js';
|
|
7
|
+
import { getJournalEntries } from './journal.js';
|
|
8
|
+
export const detectProjectTypeSchema = z.object({
|
|
9
|
+
projectPath: z.string().optional().describe('Path to project root'),
|
|
10
|
+
});
|
|
11
|
+
export function detectProjectType(input) {
|
|
12
|
+
const projectPath = sanitizePath(input.projectPath);
|
|
13
|
+
const indicators = [];
|
|
14
|
+
let type = 'unknown';
|
|
15
|
+
let confidence = 0;
|
|
16
|
+
let framework;
|
|
17
|
+
const irrelevantSteps = [];
|
|
18
|
+
// Check package.json
|
|
19
|
+
const pkgPath = join(projectPath, 'package.json');
|
|
20
|
+
if (existsSync(pkgPath)) {
|
|
21
|
+
try {
|
|
22
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
23
|
+
// CLI tool detection
|
|
24
|
+
if (pkg.bin) {
|
|
25
|
+
type = 'cli';
|
|
26
|
+
confidence = 90;
|
|
27
|
+
indicators.push('Has "bin" field in package.json');
|
|
28
|
+
irrelevantSteps.push('API endpoints', 'UI components', 'Mobile layouts');
|
|
29
|
+
}
|
|
30
|
+
// Library detection
|
|
31
|
+
if (!pkg.bin && (pkg.main || pkg.exports) && !pkg.dependencies?.react && !pkg.dependencies?.express) {
|
|
32
|
+
type = 'library';
|
|
33
|
+
confidence = 80;
|
|
34
|
+
indicators.push('Has "main" or "exports" field, no app framework');
|
|
35
|
+
irrelevantSteps.push('Deployment configuration', 'Monitoring setup', 'UI testing');
|
|
36
|
+
}
|
|
37
|
+
// Web app detection
|
|
38
|
+
const webFrameworks = ['react', 'vue', 'angular', 'svelte', 'next', 'nuxt', 'remix'];
|
|
39
|
+
for (const fw of webFrameworks) {
|
|
40
|
+
if (pkg.dependencies?.[fw] || pkg.devDependencies?.[fw]) {
|
|
41
|
+
type = 'web-app';
|
|
42
|
+
framework = fw;
|
|
43
|
+
confidence = 85;
|
|
44
|
+
indicators.push(`Uses ${fw} framework`);
|
|
45
|
+
irrelevantSteps.push('CLI arguments', 'Package publishing');
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
// API detection
|
|
50
|
+
const apiFrameworks = ['express', 'fastify', 'koa', 'hapi', 'nestjs'];
|
|
51
|
+
for (const fw of apiFrameworks) {
|
|
52
|
+
if (pkg.dependencies?.[fw] || pkg.devDependencies?.[fw]) {
|
|
53
|
+
type = 'api';
|
|
54
|
+
framework = fw;
|
|
55
|
+
confidence = 85;
|
|
56
|
+
indicators.push(`Uses ${fw} for API`);
|
|
57
|
+
irrelevantSteps.push('UI components', 'Mobile layouts', 'Package publishing');
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// Mobile detection
|
|
62
|
+
const mobileFrameworks = ['react-native', 'expo', 'ionic', 'capacitor'];
|
|
63
|
+
for (const fw of mobileFrameworks) {
|
|
64
|
+
if (pkg.dependencies?.[fw] || pkg.devDependencies?.[fw]) {
|
|
65
|
+
type = 'mobile';
|
|
66
|
+
framework = fw;
|
|
67
|
+
confidence = 85;
|
|
68
|
+
indicators.push(`Uses ${fw} for mobile`);
|
|
69
|
+
irrelevantSteps.push('Server deployment', 'Docker configuration');
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// Monorepo detection
|
|
74
|
+
if (pkg.workspaces || existsSync(join(projectPath, 'lerna.json')) || existsSync(join(projectPath, 'pnpm-workspace.yaml'))) {
|
|
75
|
+
type = 'monorepo';
|
|
76
|
+
confidence = 90;
|
|
77
|
+
indicators.push('Has workspaces or monorepo config');
|
|
78
|
+
irrelevantSteps.push('Single package deployment');
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
logger.debug('Error parsing package.json for project type detection', { error: String(error) });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// Check Cargo.toml for Rust projects
|
|
86
|
+
const cargoPath = join(projectPath, 'Cargo.toml');
|
|
87
|
+
if (existsSync(cargoPath)) {
|
|
88
|
+
try {
|
|
89
|
+
const cargo = readFileSync(cargoPath, 'utf8');
|
|
90
|
+
if (cargo.includes('[[bin]]') || cargo.includes('[package]') && cargo.includes('name')) {
|
|
91
|
+
type = 'cli';
|
|
92
|
+
confidence = 85;
|
|
93
|
+
indicators.push('Rust binary project (Cargo.toml)');
|
|
94
|
+
irrelevantSteps.push('npm publish', 'Web deployment');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
logger.debug('Error reading Cargo.toml', { error: String(error) });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// Check pyproject.toml for Python projects
|
|
102
|
+
const pyprojectPath = join(projectPath, 'pyproject.toml');
|
|
103
|
+
if (existsSync(pyprojectPath)) {
|
|
104
|
+
try {
|
|
105
|
+
const pyproject = readFileSync(pyprojectPath, 'utf8');
|
|
106
|
+
if (pyproject.includes('[project.scripts]') || pyproject.includes('[tool.poetry.scripts]')) {
|
|
107
|
+
type = 'cli';
|
|
108
|
+
confidence = 85;
|
|
109
|
+
indicators.push('Python CLI project (pyproject.toml scripts)');
|
|
110
|
+
irrelevantSteps.push('npm publish', 'Web deployment');
|
|
111
|
+
}
|
|
112
|
+
else if (pyproject.includes('django') || pyproject.includes('flask') || pyproject.includes('fastapi')) {
|
|
113
|
+
type = 'api';
|
|
114
|
+
confidence = 80;
|
|
115
|
+
indicators.push('Python web framework detected');
|
|
116
|
+
irrelevantSteps.push('Package publishing');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
logger.debug('Error reading pyproject.toml', { error: String(error) });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return { type, confidence, indicators, framework, irrelevantSteps };
|
|
124
|
+
}
|
|
125
|
+
export const checkScopeCreepSchema = z.object({
|
|
126
|
+
projectPath: z.string().optional().describe('Path to project root'),
|
|
127
|
+
});
|
|
128
|
+
/**
|
|
129
|
+
* Estimate code complexity by counting files and lines
|
|
130
|
+
*/
|
|
131
|
+
function countCodeMetrics(projectPath) {
|
|
132
|
+
let files = 0;
|
|
133
|
+
let lines = 0;
|
|
134
|
+
function walk(dir, depth) {
|
|
135
|
+
if (depth > 5)
|
|
136
|
+
return;
|
|
137
|
+
try {
|
|
138
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
139
|
+
const fullPath = join(dir, entry.name);
|
|
140
|
+
if (entry.isDirectory()) {
|
|
141
|
+
if (!['node_modules', '.git', '.midas', 'dist', 'build', 'coverage'].includes(entry.name)) {
|
|
142
|
+
walk(fullPath, depth + 1);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
else if (entry.isFile() && /\.(ts|js|tsx|jsx|py|rs|go|java|c|cpp|h|hpp)$/.test(entry.name)) {
|
|
146
|
+
files++;
|
|
147
|
+
try {
|
|
148
|
+
const content = readFileSync(fullPath, 'utf8');
|
|
149
|
+
lines += content.split('\n').length;
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
// Skip unreadable files
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
logger.debug('Error walking directory', { dir, error: String(error) });
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
walk(projectPath, 0);
|
|
162
|
+
return { files, lines };
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Get initial scope from PRD or first journal entry
|
|
166
|
+
*/
|
|
167
|
+
function getInitialScope(projectPath) {
|
|
168
|
+
// Check for scope baseline in .midas/scope-baseline.json
|
|
169
|
+
const baselinePath = join(projectPath, '.midas', 'scope-baseline.json');
|
|
170
|
+
if (existsSync(baselinePath)) {
|
|
171
|
+
try {
|
|
172
|
+
const baseline = JSON.parse(readFileSync(baselinePath, 'utf8'));
|
|
173
|
+
return { fileCount: baseline.fileCount || 0, complexity: baseline.complexity || 0 };
|
|
174
|
+
}
|
|
175
|
+
catch {
|
|
176
|
+
// Fall through
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
// Try to infer from git history (first commit)
|
|
180
|
+
try {
|
|
181
|
+
const firstCommit = execSync('git rev-list --max-parents=0 HEAD', { cwd: projectPath, encoding: 'utf8' }).trim();
|
|
182
|
+
if (firstCommit) {
|
|
183
|
+
const filesAtStart = execSync(`git ls-tree -r --name-only ${firstCommit}`, { cwd: projectPath, encoding: 'utf8' })
|
|
184
|
+
.split('\n')
|
|
185
|
+
.filter(f => /\.(ts|js|tsx|jsx|py|rs|go|java|c|cpp|h|hpp)$/.test(f));
|
|
186
|
+
return { fileCount: filesAtStart.length, complexity: filesAtStart.length * 50 }; // Rough estimate
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
catch {
|
|
190
|
+
// No git history
|
|
191
|
+
}
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Extract features mentioned in journal entries
|
|
196
|
+
*/
|
|
197
|
+
function getAddedFeatures(projectPath) {
|
|
198
|
+
const entries = getJournalEntries({ projectPath, limit: 50 });
|
|
199
|
+
const features = [];
|
|
200
|
+
for (const entry of entries) {
|
|
201
|
+
// Look for feature-related keywords in journal titles
|
|
202
|
+
const title = entry.title.toLowerCase();
|
|
203
|
+
if (title.includes('add') || title.includes('implement') || title.includes('feat') || title.includes('new')) {
|
|
204
|
+
features.push(entry.title);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return features.slice(0, 10); // Limit to 10 recent features
|
|
208
|
+
}
|
|
209
|
+
export function checkScopeCreep(input) {
|
|
210
|
+
const projectPath = sanitizePath(input.projectPath);
|
|
211
|
+
const currentMetrics = countCodeMetrics(projectPath);
|
|
212
|
+
const initialScope = getInitialScope(projectPath);
|
|
213
|
+
const featuresAdded = getAddedFeatures(projectPath);
|
|
214
|
+
let driftPercentage = 0;
|
|
215
|
+
let warning = false;
|
|
216
|
+
let message = '';
|
|
217
|
+
if (initialScope && initialScope.fileCount > 0) {
|
|
218
|
+
driftPercentage = Math.round(((currentMetrics.files - initialScope.fileCount) / initialScope.fileCount) * 100);
|
|
219
|
+
if (driftPercentage > 100) {
|
|
220
|
+
warning = true;
|
|
221
|
+
message = `Scope has grown ${driftPercentage}% (${initialScope.fileCount} → ${currentMetrics.files} files). Consider: split project, defer features, or update PRD.`;
|
|
222
|
+
}
|
|
223
|
+
else if (driftPercentage > 50) {
|
|
224
|
+
warning = true;
|
|
225
|
+
message = `Scope growing: ${driftPercentage}% increase. Review if all features are in PRD.`;
|
|
226
|
+
}
|
|
227
|
+
else if (driftPercentage > 0) {
|
|
228
|
+
message = `Healthy growth: ${driftPercentage}% increase since baseline.`;
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
message = 'Project size stable or reduced.';
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
message = 'No baseline found. Run midas_set_scope_baseline to track growth.';
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
initialFileCount: initialScope?.fileCount || 0,
|
|
239
|
+
currentFileCount: currentMetrics.files,
|
|
240
|
+
initialComplexity: initialScope?.complexity || 0,
|
|
241
|
+
currentComplexity: currentMetrics.lines,
|
|
242
|
+
driftPercentage,
|
|
243
|
+
featuresAdded,
|
|
244
|
+
warning,
|
|
245
|
+
message,
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
// ============================================================================
|
|
249
|
+
// Set Scope Baseline
|
|
250
|
+
// ============================================================================
|
|
251
|
+
export const setScopeBaselineSchema = z.object({
|
|
252
|
+
projectPath: z.string().optional().describe('Path to project root'),
|
|
253
|
+
});
|
|
254
|
+
export function setScopeBaseline(input) {
|
|
255
|
+
const projectPath = sanitizePath(input.projectPath);
|
|
256
|
+
const { mkdirSync, writeFileSync } = require('fs');
|
|
257
|
+
const metrics = countCodeMetrics(projectPath);
|
|
258
|
+
const baselinePath = join(projectPath, '.midas', 'scope-baseline.json');
|
|
259
|
+
try {
|
|
260
|
+
mkdirSync(join(projectPath, '.midas'), { recursive: true });
|
|
261
|
+
writeFileSync(baselinePath, JSON.stringify({
|
|
262
|
+
fileCount: metrics.files,
|
|
263
|
+
complexity: metrics.lines,
|
|
264
|
+
createdAt: new Date().toISOString(),
|
|
265
|
+
}, null, 2));
|
|
266
|
+
return {
|
|
267
|
+
success: true,
|
|
268
|
+
message: `Baseline set: ${metrics.files} files, ${metrics.lines} lines.`,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
catch (error) {
|
|
272
|
+
return {
|
|
273
|
+
success: false,
|
|
274
|
+
message: `Failed to save baseline: ${String(error)}`,
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
//# sourceMappingURL=scope.js.map
|