popeye-cli 1.9.5 → 1.10.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/cheatsheet.md +65 -0
- package/dist/cli/commands/debug-context.d.ts +64 -0
- package/dist/cli/commands/debug-context.d.ts.map +1 -0
- package/dist/cli/commands/debug-context.js +221 -0
- package/dist/cli/commands/debug-context.js.map +1 -0
- package/dist/cli/commands/debug-prompts.d.ts +25 -0
- package/dist/cli/commands/debug-prompts.d.ts.map +1 -0
- package/dist/cli/commands/debug-prompts.js +80 -0
- package/dist/cli/commands/debug-prompts.js.map +1 -0
- package/dist/cli/commands/debug.d.ts +68 -0
- package/dist/cli/commands/debug.d.ts.map +1 -0
- package/dist/cli/commands/debug.js +543 -0
- package/dist/cli/commands/debug.js.map +1 -0
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/interactive.d.ts.map +1 -1
- package/dist/cli/interactive.js +25 -0
- package/dist/cli/interactive.js.map +1 -1
- package/dist/generators/all.d.ts.map +1 -1
- package/dist/generators/all.js +2 -0
- package/dist/generators/all.js.map +1 -1
- package/dist/generators/templates/database-docker.d.ts.map +1 -1
- package/dist/generators/templates/database-docker.js +10 -0
- package/dist/generators/templates/database-docker.js.map +1 -1
- package/dist/generators/templates/fullstack.d.ts +4 -1
- package/dist/generators/templates/fullstack.d.ts.map +1 -1
- package/dist/generators/templates/fullstack.js +6 -2
- package/dist/generators/templates/fullstack.js.map +1 -1
- package/package.json +1 -1
- package/skills/ARBITRATOR.md +137 -0
- package/skills/ARCHITECT.md +167 -0
- package/skills/AUDITOR.md +128 -0
- package/skills/AUDIT_REPORT_SCHEMA.md +20 -0
- package/skills/BACKEND_PROGRAMMER.md +95 -0
- package/skills/CONSENSUS_PACKET_SCHEMA.md +166 -0
- package/skills/DB_EXPERT.md +106 -0
- package/skills/DEBUGGER.md +286 -0
- package/skills/DISPATCHER.md +157 -0
- package/skills/FRONTEND_PROGRAMMER.md +84 -0
- package/skills/JOURNALIST.md +247 -0
- package/skills/MARKETING_EXPERT.md +23 -0
- package/skills/PHASE_GATE_ENGINE_SPEC.md +78 -0
- package/skills/PLAN_PACKET_SCHEMA.md +222 -0
- package/skills/POPEYE_CONSTITUTION.md +177 -0
- package/skills/POPEYE_FULL_AUTONOMY_PIPELINE.md +484 -0
- package/skills/PRODUCTION_READINESS_SCHEMA.md +19 -0
- package/skills/QA_TESTER.md +40 -0
- package/skills/RCA_PACKET_SCHEMA.md +22 -0
- package/skills/RELEASE_MANAGER.md +60 -0
- package/skills/REVIEWER.md +133 -0
- package/skills/SOCIAL_EXPERT.md +22 -0
- package/skills/UI_UX_SPECIALIST.md +22 -0
- package/skills/WEBSITE_PROGRAMMER.md +37 -0
- package/src/cli/commands/debug-context.ts +265 -0
- package/src/cli/commands/debug-prompts.ts +91 -0
- package/src/cli/commands/debug.ts +662 -0
- package/src/cli/commands/index.ts +1 -0
- package/src/cli/index.ts +2 -0
- package/src/cli/interactive.ts +27 -0
- package/src/generators/all.ts +2 -0
- package/src/generators/templates/database-docker.ts +10 -0
- package/src/generators/templates/fullstack.ts +6 -2
- package/tests/cli/commands/debug.test.ts +376 -0
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debug command
|
|
3
|
+
* Interactive debugging session that primes Claude with project context
|
|
4
|
+
* and lets users paste errors for AI-assisted diagnosis and fixes.
|
|
5
|
+
*/
|
|
6
|
+
import { Command } from 'commander';
|
|
7
|
+
import * as readline from 'node:readline';
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
import { promises as fs } from 'node:fs';
|
|
10
|
+
import { printHeader, printSuccess, printError, printWarning, printInfo, printKeyValue, printListItem, startSpinner, succeedSpinner, failSpinner, theme, } from '../output.js';
|
|
11
|
+
import { getProjectStructureSummary } from '../../workflow/project-structure.js';
|
|
12
|
+
import { readPriorityDocs } from '../../workflow/audit-scanner.js';
|
|
13
|
+
import { executePrompt, DEFAULT_ALLOWED_TOOLS } from '../../adapters/claude.js';
|
|
14
|
+
import { extractPathsFromError, detectTechFromError, selectRelevantFiles, isConfigFile, extractImagePaths, } from './debug-context.js';
|
|
15
|
+
import { getDebugSystemPrompt, formatConversationHistory, } from './debug-prompts.js';
|
|
16
|
+
/** Directories to skip when building the file index */
|
|
17
|
+
const SKIP_DIRS = new Set([
|
|
18
|
+
'node_modules', 'dist', 'build', '.git', '__pycache__', '.venv', 'venv',
|
|
19
|
+
'.next', '.turbo', '.cache', 'coverage', 'out', '.vercel', '.tox',
|
|
20
|
+
]);
|
|
21
|
+
/** Max file content size to include per file (chars) */
|
|
22
|
+
const MAX_FILE_CONTENT = 8000;
|
|
23
|
+
/** Max conversation history exchanges to keep */
|
|
24
|
+
const MAX_HISTORY_EXCHANGES = 20;
|
|
25
|
+
/** Max length of a single history message (chars) */
|
|
26
|
+
const MAX_HISTORY_MESSAGE_LENGTH = 2000;
|
|
27
|
+
/**
|
|
28
|
+
* Build a lightweight file index of the project (paths + metadata, no content).
|
|
29
|
+
*
|
|
30
|
+
* @param dir - Directory to scan.
|
|
31
|
+
* @param baseDir - Project root for computing relative paths.
|
|
32
|
+
* @param index - Accumulator array.
|
|
33
|
+
* @param depth - Current recursion depth.
|
|
34
|
+
*/
|
|
35
|
+
async function buildFileIndex(dir, baseDir, index, depth = 0) {
|
|
36
|
+
if (depth > 8)
|
|
37
|
+
return;
|
|
38
|
+
let entries;
|
|
39
|
+
try {
|
|
40
|
+
entries = await fs.readdir(dir, { withFileTypes: true });
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
for (const entry of entries) {
|
|
46
|
+
if (entry.name.startsWith('.') && entry.name !== '.env.example')
|
|
47
|
+
continue;
|
|
48
|
+
const fullPath = path.join(dir, entry.name);
|
|
49
|
+
const relativePath = path.relative(baseDir, fullPath);
|
|
50
|
+
if (entry.isDirectory()) {
|
|
51
|
+
if (!SKIP_DIRS.has(entry.name)) {
|
|
52
|
+
await buildFileIndex(fullPath, baseDir, index, depth + 1);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else if (entry.isFile()) {
|
|
56
|
+
try {
|
|
57
|
+
const stat = await fs.stat(fullPath);
|
|
58
|
+
index.push({
|
|
59
|
+
relativePath,
|
|
60
|
+
size: stat.size,
|
|
61
|
+
mtime: stat.mtimeMs,
|
|
62
|
+
isConfig: isConfigFile(relativePath),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
// Skip files we can't stat
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Read an anchor config file, returning its content or undefined.
|
|
73
|
+
*
|
|
74
|
+
* @param projectDir - Project root directory.
|
|
75
|
+
* @param filename - File name to read.
|
|
76
|
+
* @returns File content or undefined if not found.
|
|
77
|
+
*/
|
|
78
|
+
async function readAnchorFile(projectDir, filename) {
|
|
79
|
+
try {
|
|
80
|
+
const content = await fs.readFile(path.join(projectDir, filename), 'utf-8');
|
|
81
|
+
return content.slice(0, MAX_FILE_CONTENT);
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Gather debug context for the project. Builds a lightweight index and
|
|
89
|
+
* reads anchor documents (CLAUDE.md, README, config files).
|
|
90
|
+
*
|
|
91
|
+
* @param projectDir - Project root directory.
|
|
92
|
+
* @param language - Project language/type.
|
|
93
|
+
* @returns DebugContext with project metadata and file index.
|
|
94
|
+
*/
|
|
95
|
+
export async function gatherDebugContext(projectDir, language) {
|
|
96
|
+
// Get project structure summary
|
|
97
|
+
let structureSummary = '';
|
|
98
|
+
try {
|
|
99
|
+
const summary = await getProjectStructureSummary(projectDir, language);
|
|
100
|
+
structureSummary = summary.formatted;
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
structureSummary = '(Could not scan project structure)';
|
|
104
|
+
}
|
|
105
|
+
// Read priority docs (CLAUDE.md, README)
|
|
106
|
+
let claudeMd;
|
|
107
|
+
let readme;
|
|
108
|
+
try {
|
|
109
|
+
const docs = await readPriorityDocs(projectDir);
|
|
110
|
+
claudeMd = docs.claudeMd;
|
|
111
|
+
readme = docs.readme;
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
// Non-fatal
|
|
115
|
+
}
|
|
116
|
+
// Extract purpose from README or CLAUDE.md
|
|
117
|
+
let purpose = '';
|
|
118
|
+
if (readme) {
|
|
119
|
+
const firstParagraph = readme.split('\n\n')[0] || '';
|
|
120
|
+
purpose = firstParagraph.replace(/^#.*\n?/, '').trim().slice(0, 300);
|
|
121
|
+
}
|
|
122
|
+
if (!purpose && claudeMd) {
|
|
123
|
+
purpose = claudeMd.slice(0, 300);
|
|
124
|
+
}
|
|
125
|
+
// Read anchor config files
|
|
126
|
+
const anchorFileNames = [
|
|
127
|
+
'package.json', 'pyproject.toml', 'docker-compose.yml',
|
|
128
|
+
'docker-compose.yaml', '.env.example', 'tsconfig.json',
|
|
129
|
+
'alembic.ini', 'requirements.txt',
|
|
130
|
+
];
|
|
131
|
+
const anchorFiles = {};
|
|
132
|
+
for (const name of anchorFileNames) {
|
|
133
|
+
const content = await readAnchorFile(projectDir, name);
|
|
134
|
+
if (content) {
|
|
135
|
+
anchorFiles[name] = content;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
// Build lightweight file index
|
|
139
|
+
const fileIndex = [];
|
|
140
|
+
await buildFileIndex(projectDir, projectDir, fileIndex);
|
|
141
|
+
return {
|
|
142
|
+
projectDir,
|
|
143
|
+
structureSummary,
|
|
144
|
+
purpose,
|
|
145
|
+
claudeMd: claudeMd?.slice(0, MAX_FILE_CONTENT),
|
|
146
|
+
readme: readme?.slice(0, MAX_FILE_CONTENT),
|
|
147
|
+
anchorFiles,
|
|
148
|
+
fileIndex,
|
|
149
|
+
language,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Display project summary to the user at the start of a debug session.
|
|
154
|
+
*
|
|
155
|
+
* @param context - The gathered debug context.
|
|
156
|
+
*/
|
|
157
|
+
export function displayProjectSummary(context) {
|
|
158
|
+
console.log();
|
|
159
|
+
printHeader('Debug Session');
|
|
160
|
+
console.log();
|
|
161
|
+
if (context.purpose) {
|
|
162
|
+
printKeyValue('Project', context.purpose);
|
|
163
|
+
}
|
|
164
|
+
printKeyValue('Language', context.language);
|
|
165
|
+
printKeyValue('Files indexed', String(context.fileIndex.length));
|
|
166
|
+
const configCount = context.fileIndex.filter((f) => f.isConfig).length;
|
|
167
|
+
printKeyValue('Config files', String(configCount));
|
|
168
|
+
if (Object.keys(context.anchorFiles).length > 0) {
|
|
169
|
+
console.log();
|
|
170
|
+
printInfo('Anchor files loaded:');
|
|
171
|
+
for (const name of Object.keys(context.anchorFiles)) {
|
|
172
|
+
printListItem(name);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (context.claudeMd)
|
|
176
|
+
printListItem('CLAUDE.md');
|
|
177
|
+
if (context.readme)
|
|
178
|
+
printListItem('README.md');
|
|
179
|
+
console.log();
|
|
180
|
+
printInfo('Paste an error, describe a bug, or include a screenshot path. Sub-commands:');
|
|
181
|
+
printListItem('/back - Return to main Popeye session');
|
|
182
|
+
printListItem('/clear - Reset conversation history');
|
|
183
|
+
printListItem('/context - Re-display project summary');
|
|
184
|
+
printListItem('/fix - Apply last proposed fix via Popeye pipeline');
|
|
185
|
+
console.log();
|
|
186
|
+
printInfo('Tip: Include screenshot paths and Claude will read them visually.');
|
|
187
|
+
console.log();
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Build the full debug prompt for Claude, combining project context,
|
|
191
|
+
* relevant file contents, conversation history, and the current message.
|
|
192
|
+
*
|
|
193
|
+
* @param context - Debug context with project metadata.
|
|
194
|
+
* @param history - Conversation history.
|
|
195
|
+
* @param userMessage - Current user message/error.
|
|
196
|
+
* @param relevantFileContents - Map of file path -> content for relevant files.
|
|
197
|
+
* @param imagePaths - Optional array of image/screenshot paths to read.
|
|
198
|
+
* @returns Assembled prompt string.
|
|
199
|
+
*/
|
|
200
|
+
export function buildDebugPrompt(context, history, userMessage, relevantFileContents, imagePaths = []) {
|
|
201
|
+
const sections = [];
|
|
202
|
+
// Project overview (always included, small)
|
|
203
|
+
sections.push('## Project Context');
|
|
204
|
+
if (context.purpose) {
|
|
205
|
+
sections.push(`**Purpose:** ${context.purpose}`);
|
|
206
|
+
}
|
|
207
|
+
sections.push(`**Language/Type:** ${context.language}`);
|
|
208
|
+
sections.push(`**Structure:**\n${context.structureSummary}`);
|
|
209
|
+
// Anchor configs (always included)
|
|
210
|
+
if (Object.keys(context.anchorFiles).length > 0) {
|
|
211
|
+
sections.push('## Anchor Config Files');
|
|
212
|
+
for (const [name, content] of Object.entries(context.anchorFiles)) {
|
|
213
|
+
sections.push(`### ${name}\n\`\`\`\n${content}\n\`\`\``);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
// CLAUDE.md (always included if present)
|
|
217
|
+
if (context.claudeMd) {
|
|
218
|
+
sections.push(`## CLAUDE.md\n\`\`\`\n${context.claudeMd}\n\`\`\``);
|
|
219
|
+
}
|
|
220
|
+
// Relevant files (loaded on-demand per error)
|
|
221
|
+
if (Object.keys(relevantFileContents).length > 0) {
|
|
222
|
+
sections.push('## Relevant Source Files');
|
|
223
|
+
for (const [filePath, content] of Object.entries(relevantFileContents)) {
|
|
224
|
+
sections.push(`### ${filePath}\n\`\`\`\n${content}\n\`\`\``);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
// Conversation history
|
|
228
|
+
const historyText = formatConversationHistory(history);
|
|
229
|
+
if (historyText) {
|
|
230
|
+
sections.push(historyText);
|
|
231
|
+
}
|
|
232
|
+
// Screenshot/image instructions
|
|
233
|
+
if (imagePaths.length > 0) {
|
|
234
|
+
const imageList = imagePaths.map((p) => `- \`${p}\``).join('\n');
|
|
235
|
+
sections.push(`## Screenshots Attached\n\nThe user referenced these image files. ` +
|
|
236
|
+
`Use the Read tool to view each one and include visual findings in your diagnosis:\n${imageList}`);
|
|
237
|
+
}
|
|
238
|
+
// Current user message
|
|
239
|
+
sections.push(`## Current Error / Question\n\n${userMessage}`);
|
|
240
|
+
return sections.join('\n\n');
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Read file contents for the selected relevant files.
|
|
244
|
+
*
|
|
245
|
+
* @param projectDir - Project root directory.
|
|
246
|
+
* @param filePaths - Relative paths to read.
|
|
247
|
+
* @returns Map of relative path -> file content.
|
|
248
|
+
*/
|
|
249
|
+
async function loadRelevantFileContents(projectDir, filePaths) {
|
|
250
|
+
const contents = {};
|
|
251
|
+
for (const relPath of filePaths) {
|
|
252
|
+
try {
|
|
253
|
+
const fullPath = path.join(projectDir, relPath);
|
|
254
|
+
const content = await fs.readFile(fullPath, 'utf-8');
|
|
255
|
+
contents[relPath] = content.slice(0, MAX_FILE_CONTENT);
|
|
256
|
+
}
|
|
257
|
+
catch {
|
|
258
|
+
// Skip unreadable files
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return contents;
|
|
262
|
+
}
|
|
263
|
+
/** Timeout (ms) for single-line input (typing). Feels instant. */
|
|
264
|
+
const SINGLE_LINE_TIMEOUT_MS = 150;
|
|
265
|
+
/** Timeout (ms) after paste is detected (2+ lines). Generous for large pastes. */
|
|
266
|
+
const PASTE_TIMEOUT_MS = 2000;
|
|
267
|
+
/** Maximum input size (chars) to prevent terminal lockup on extremely large pastes. */
|
|
268
|
+
const MAX_INPUT_SIZE = 50000;
|
|
269
|
+
/**
|
|
270
|
+
* Collect input from the user. Creates a fresh readline per call to avoid
|
|
271
|
+
* stdin corruption after executePrompt subprocess usage.
|
|
272
|
+
*
|
|
273
|
+
* Uses adaptive timeout:
|
|
274
|
+
* - Single line (typing): 150ms wait after Enter -> submit (feels instant)
|
|
275
|
+
* - Multi-line (paste detected): 2s wait after last line -> submit (handles large logs)
|
|
276
|
+
*
|
|
277
|
+
* @returns The collected input string, or null on EOF.
|
|
278
|
+
*/
|
|
279
|
+
function collectInput() {
|
|
280
|
+
return new Promise((resolve) => {
|
|
281
|
+
const lines = [];
|
|
282
|
+
let submitTimer = null;
|
|
283
|
+
let totalChars = 0;
|
|
284
|
+
let resolved = false;
|
|
285
|
+
// Reason: Create a fresh readline per input to avoid stdin corruption.
|
|
286
|
+
// executePrompt spawns a Claude subprocess that can disrupt a persistent
|
|
287
|
+
// readline's stdin stream, causing silent exit on the next read.
|
|
288
|
+
const rl = readline.createInterface({
|
|
289
|
+
input: process.stdin,
|
|
290
|
+
output: process.stdout,
|
|
291
|
+
terminal: false,
|
|
292
|
+
});
|
|
293
|
+
const prompt = theme.dim('| ') + theme.primary('debug') + theme.dim(' > ');
|
|
294
|
+
process.stdout.write(prompt);
|
|
295
|
+
const cleanup = () => {
|
|
296
|
+
if (submitTimer)
|
|
297
|
+
clearTimeout(submitTimer);
|
|
298
|
+
rl.removeListener('line', onLine);
|
|
299
|
+
rl.removeListener('close', onClose);
|
|
300
|
+
rl.close();
|
|
301
|
+
};
|
|
302
|
+
const finish = (value) => {
|
|
303
|
+
if (resolved)
|
|
304
|
+
return;
|
|
305
|
+
resolved = true;
|
|
306
|
+
cleanup();
|
|
307
|
+
resolve(value);
|
|
308
|
+
};
|
|
309
|
+
const submit = () => {
|
|
310
|
+
finish(lines.join('\n').trim());
|
|
311
|
+
};
|
|
312
|
+
const onLine = (line) => {
|
|
313
|
+
lines.push(line);
|
|
314
|
+
totalChars += line.length + 1;
|
|
315
|
+
// Reason: Adaptive timeout. First line uses short timeout (typing feels instant).
|
|
316
|
+
// Once 2+ lines arrive (paste detected), use long timeout so the terminal has
|
|
317
|
+
// time to deliver all chunks of a large paste without mid-paste submission.
|
|
318
|
+
const isPaste = lines.length > 1;
|
|
319
|
+
const timeout = isPaste ? PASTE_TIMEOUT_MS : SINGLE_LINE_TIMEOUT_MS;
|
|
320
|
+
if (submitTimer)
|
|
321
|
+
clearTimeout(submitTimer);
|
|
322
|
+
submitTimer = setTimeout(submit, timeout);
|
|
323
|
+
// Safety: cap input size to prevent terminal lockup
|
|
324
|
+
if (totalChars > MAX_INPUT_SIZE) {
|
|
325
|
+
printWarning(`Input truncated at ${MAX_INPUT_SIZE} chars. Submitting what we have.`);
|
|
326
|
+
submit();
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
const onClose = () => {
|
|
330
|
+
// Reason: If stdin closes unexpectedly, submit whatever we have
|
|
331
|
+
// rather than returning null (which exits the session).
|
|
332
|
+
if (lines.length > 0) {
|
|
333
|
+
finish(lines.join('\n').trim());
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
finish(null);
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
rl.on('line', onLine);
|
|
340
|
+
rl.once('close', onClose);
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Run the interactive debug session sub-REPL.
|
|
345
|
+
*
|
|
346
|
+
* @param options - Debug session options (projectDir, language).
|
|
347
|
+
*/
|
|
348
|
+
export async function runDebugSession(options) {
|
|
349
|
+
const { projectDir, language } = options;
|
|
350
|
+
// Phase 1: Gather context
|
|
351
|
+
startSpinner('Scanning project for debug context...');
|
|
352
|
+
let context;
|
|
353
|
+
try {
|
|
354
|
+
context = await gatherDebugContext(projectDir, language);
|
|
355
|
+
succeedSpinner(`Indexed ${context.fileIndex.length} files`);
|
|
356
|
+
}
|
|
357
|
+
catch (err) {
|
|
358
|
+
failSpinner('Failed to scan project');
|
|
359
|
+
throw err;
|
|
360
|
+
}
|
|
361
|
+
// Phase 2: Display summary
|
|
362
|
+
displayProjectSummary(context);
|
|
363
|
+
// Phase 3: Sub-REPL
|
|
364
|
+
const history = [];
|
|
365
|
+
let lastAssistantResponse = '';
|
|
366
|
+
let running = true;
|
|
367
|
+
while (running) {
|
|
368
|
+
const input = await collectInput();
|
|
369
|
+
if (input === null) {
|
|
370
|
+
// EOF / stream closed
|
|
371
|
+
running = false;
|
|
372
|
+
break;
|
|
373
|
+
}
|
|
374
|
+
if (!input)
|
|
375
|
+
continue;
|
|
376
|
+
const trimmed = input.trim();
|
|
377
|
+
// Handle sub-commands
|
|
378
|
+
if (trimmed.startsWith('/')) {
|
|
379
|
+
const subCmd = trimmed.toLowerCase().split(/\s+/)[0];
|
|
380
|
+
switch (subCmd) {
|
|
381
|
+
case '/back':
|
|
382
|
+
case '/done':
|
|
383
|
+
running = false;
|
|
384
|
+
continue;
|
|
385
|
+
case '/clear':
|
|
386
|
+
history.length = 0;
|
|
387
|
+
lastAssistantResponse = '';
|
|
388
|
+
printSuccess('Conversation history cleared.');
|
|
389
|
+
console.log();
|
|
390
|
+
continue;
|
|
391
|
+
case '/context':
|
|
392
|
+
displayProjectSummary(context);
|
|
393
|
+
continue;
|
|
394
|
+
case '/fix':
|
|
395
|
+
if (!lastAssistantResponse) {
|
|
396
|
+
printWarning('No diagnosis to apply. Paste an error first.');
|
|
397
|
+
console.log();
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
printInfo('Bridging to Popeye execution pipeline...');
|
|
401
|
+
await bridgeToExecution(context, lastAssistantResponse);
|
|
402
|
+
continue;
|
|
403
|
+
default:
|
|
404
|
+
printWarning(`Unknown debug sub-command: ${subCmd}`);
|
|
405
|
+
printInfo('Available: /back, /clear, /context, /fix');
|
|
406
|
+
console.log();
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
// Phase 3a: Analyze the error text
|
|
411
|
+
const errorPaths = extractPathsFromError(trimmed);
|
|
412
|
+
const { tags } = detectTechFromError(trimmed);
|
|
413
|
+
const imagePaths = extractImagePaths(trimmed);
|
|
414
|
+
// Phase 3b: Select and load relevant files
|
|
415
|
+
const relevantPaths = selectRelevantFiles(context.fileIndex, errorPaths, tags);
|
|
416
|
+
const relevantContents = await loadRelevantFileContents(projectDir, relevantPaths);
|
|
417
|
+
if (relevantPaths.length > 0) {
|
|
418
|
+
printInfo(`Loaded ${relevantPaths.length} relevant file(s) for analysis`);
|
|
419
|
+
}
|
|
420
|
+
if (imagePaths.length > 0) {
|
|
421
|
+
printInfo(`Detected ${imagePaths.length} screenshot(s) -- Claude will read them`);
|
|
422
|
+
}
|
|
423
|
+
// Phase 3c: Build prompt
|
|
424
|
+
const prompt = buildDebugPrompt(context, history, trimmed, relevantContents, imagePaths);
|
|
425
|
+
const systemPrompt = getDebugSystemPrompt();
|
|
426
|
+
// Phase 3d: Execute
|
|
427
|
+
startSpinner('Analyzing...');
|
|
428
|
+
try {
|
|
429
|
+
const result = await executePrompt(prompt, {
|
|
430
|
+
cwd: projectDir,
|
|
431
|
+
systemPrompt,
|
|
432
|
+
allowedTools: DEFAULT_ALLOWED_TOOLS,
|
|
433
|
+
permissionMode: 'default',
|
|
434
|
+
});
|
|
435
|
+
if (result.success && result.response) {
|
|
436
|
+
succeedSpinner('Analysis complete');
|
|
437
|
+
console.log();
|
|
438
|
+
console.log(result.response);
|
|
439
|
+
console.log();
|
|
440
|
+
// Update history
|
|
441
|
+
lastAssistantResponse = result.response;
|
|
442
|
+
history.push({ role: 'user', content: truncateForHistory(trimmed) });
|
|
443
|
+
history.push({ role: 'assistant', content: truncateForHistory(result.response) });
|
|
444
|
+
// Trim history if too long
|
|
445
|
+
while (history.length > MAX_HISTORY_EXCHANGES * 2) {
|
|
446
|
+
history.shift();
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
failSpinner('Analysis failed');
|
|
451
|
+
if (result.error) {
|
|
452
|
+
printError(result.error);
|
|
453
|
+
}
|
|
454
|
+
console.log();
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
catch (err) {
|
|
458
|
+
failSpinner('Analysis failed');
|
|
459
|
+
printError(err instanceof Error ? err.message : 'Unknown error during analysis');
|
|
460
|
+
console.log();
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Bridge the last debug proposal to the Popeye execution pipeline.
|
|
466
|
+
* Converts the diagnosis into a task for consensus/execution.
|
|
467
|
+
*
|
|
468
|
+
* @param context - Debug context.
|
|
469
|
+
* @param proposal - Last assistant response with the proposed fix.
|
|
470
|
+
*/
|
|
471
|
+
async function bridgeToExecution(context, proposal) {
|
|
472
|
+
const fixPrompt = `Apply the following fix to the project at ${context.projectDir}:\n\n${proposal}`;
|
|
473
|
+
console.log();
|
|
474
|
+
startSpinner('Applying fix...');
|
|
475
|
+
try {
|
|
476
|
+
const result = await executePrompt(fixPrompt, {
|
|
477
|
+
cwd: context.projectDir,
|
|
478
|
+
allowedTools: DEFAULT_ALLOWED_TOOLS,
|
|
479
|
+
permissionMode: 'default',
|
|
480
|
+
});
|
|
481
|
+
if (result.success) {
|
|
482
|
+
succeedSpinner('Fix applied');
|
|
483
|
+
if (result.response) {
|
|
484
|
+
console.log();
|
|
485
|
+
console.log(result.response);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
failSpinner('Fix failed');
|
|
490
|
+
if (result.error) {
|
|
491
|
+
printError(result.error);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
catch (err) {
|
|
496
|
+
failSpinner('Fix failed');
|
|
497
|
+
printError(err instanceof Error ? err.message : 'Unknown error applying fix');
|
|
498
|
+
}
|
|
499
|
+
console.log();
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Truncate a message for conversation history storage.
|
|
503
|
+
*
|
|
504
|
+
* @param text - Message text.
|
|
505
|
+
* @returns Truncated text.
|
|
506
|
+
*/
|
|
507
|
+
function truncateForHistory(text) {
|
|
508
|
+
if (text.length <= MAX_HISTORY_MESSAGE_LENGTH)
|
|
509
|
+
return text;
|
|
510
|
+
return text.slice(0, MAX_HISTORY_MESSAGE_LENGTH) + '\n... (truncated)';
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Create the Commander.js debug command for CLI usage.
|
|
514
|
+
*
|
|
515
|
+
* @returns Commander Command instance.
|
|
516
|
+
*/
|
|
517
|
+
export function createDebugCommand() {
|
|
518
|
+
return new Command('debug')
|
|
519
|
+
.description('Start interactive debugging session for a Popeye project')
|
|
520
|
+
.argument('[projectDir]', 'Project directory to debug', '.')
|
|
521
|
+
.option('-l, --language <lang>', 'Project language/type', 'backend')
|
|
522
|
+
.action(async (projectDir, opts) => {
|
|
523
|
+
const resolvedDir = path.resolve(projectDir);
|
|
524
|
+
try {
|
|
525
|
+
await fs.access(resolvedDir);
|
|
526
|
+
}
|
|
527
|
+
catch {
|
|
528
|
+
printError(`Directory not found: ${resolvedDir}`);
|
|
529
|
+
process.exit(1);
|
|
530
|
+
}
|
|
531
|
+
try {
|
|
532
|
+
await runDebugSession({
|
|
533
|
+
projectDir: resolvedDir,
|
|
534
|
+
language: opts.language,
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
catch (err) {
|
|
538
|
+
printError(err instanceof Error ? err.message : 'Debug session failed');
|
|
539
|
+
process.exit(1);
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
//# sourceMappingURL=debug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../src/cli/commands/debug.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,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AClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -10,4 +10,5 @@ export { createConfigCommand } from './config.js';
|
|
|
10
10
|
export { createDbCommand } from './db.js';
|
|
11
11
|
export { createDoctorCommand } from './doctor.js';
|
|
12
12
|
export { createReviewCommand } from './review.js';
|
|
13
|
+
export { createDebugCommand } from './debug.js';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -10,4 +10,5 @@ export { createConfigCommand } from './config.js';
|
|
|
10
10
|
export { createDbCommand } from './db.js';
|
|
11
11
|
export { createDoctorCommand } from './doctor.js';
|
|
12
12
|
export { createReviewCommand } from './review.js';
|
|
13
|
+
export { createDebugCommand } from './debug.js';
|
|
13
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBpC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AAOpC,eAAO,MAAM,OAAO,EAAE,MAA4B,CAAC;AAEnD;;GAEG;AACH,wBAAgB,aAAa,IAAI,OAAO,CA2CvC;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CASzE"}
|
package/dist/cli/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Command } from 'commander';
|
|
6
6
|
import { createRequire } from 'node:module';
|
|
7
|
-
import { createAuthCommand, createCreateCommand, createStatusCommand, createValidateCommand, createSummaryCommand, createResumeCommand, createResetCommand, createCancelCommand, createConfigCommand, createDbCommand, createDoctorCommand, createReviewCommand, } from './commands/index.js';
|
|
7
|
+
import { createAuthCommand, createCreateCommand, createStatusCommand, createValidateCommand, createSummaryCommand, createResumeCommand, createResetCommand, createCancelCommand, createConfigCommand, createDbCommand, createDoctorCommand, createReviewCommand, createDebugCommand, } from './commands/index.js';
|
|
8
8
|
import { startInteractiveMode } from './interactive.js';
|
|
9
9
|
import { printError } from './output.js';
|
|
10
10
|
// Re-export
|
|
@@ -41,6 +41,7 @@ export function createProgram() {
|
|
|
41
41
|
program.addCommand(createDbCommand());
|
|
42
42
|
program.addCommand(createDoctorCommand());
|
|
43
43
|
program.addCommand(createReviewCommand());
|
|
44
|
+
program.addCommand(createDebugCommand());
|
|
44
45
|
// Interactive mode command
|
|
45
46
|
program
|
|
46
47
|
.command('interactive')
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,mB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1
|
-
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../../src/cli/interactive.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../../src/cli/interactive.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAm6EH;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA2B7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BrF;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA4EhE;AAiVD;;GAEG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CA4E1D"}
|