feat(parse-prd): Add research flag to parse-prd command for enhanced PRD analysis. Significantly improves parse PRD system prompt when used with research.

This commit is contained in:
Eyal Toledano
2025-05-22 02:57:51 -04:00
parent 34c769bcd0
commit 70f4054f26
5 changed files with 72 additions and 19 deletions

View File

@@ -31,6 +31,7 @@ export async function parsePRDDirect(args, log, context = {}) {
numTasks: numTasksArg,
force,
append,
research,
projectRoot
} = args;
@@ -114,8 +115,12 @@ export async function parsePRDDirect(args, log, context = {}) {
}
}
if (research) {
logWrapper.info('Research mode enabled. Using Perplexity AI for enhanced PRD analysis.');
}
logWrapper.info(
`Parsing PRD via direct function. Input: ${inputPath}, Output: ${outputPath}, NumTasks: ${numTasks}, Force: ${force}, Append: ${append}, ProjectRoot: ${projectRoot}`
`Parsing PRD via direct function. Input: ${inputPath}, Output: ${outputPath}, NumTasks: ${numTasks}, Force: ${force}, Append: ${append}, Research: ${research}, ProjectRoot: ${projectRoot}`
);
const wasSilent = isSilentMode();
@@ -135,6 +140,7 @@ export async function parsePRDDirect(args, log, context = {}) {
projectRoot,
force,
append,
research,
commandName: 'parse-prd',
outputType: 'mcp'
},

View File

@@ -49,6 +49,11 @@ export function registerParsePRDTool(server) {
.optional()
.default(false)
.describe('Append generated tasks to existing file.'),
research: z
.boolean()
.optional()
.default(false)
.describe('Use the research model for research-backed task generation, providing more comprehensive, accurate and up-to-date task details.'),
projectRoot: z
.string()
.describe('The directory of the project. Must be an absolute path.')
@@ -68,6 +73,7 @@ export function registerParsePRDTool(server) {
numTasks: args.numTasks,
force: args.force,
append: args.append,
research: args.research,
projectRoot: args.projectRoot
},
log,