generate-prd
Create and save project PRDs (Product Requirements Documents) directly within your project structure using AI-driven dialogue. Designed for rapid MVP and POC development within the VibeCoding System.
Instructions
Generate a project PRD and save it to the project structure
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"required": [],
"type": "object"
}
Implementation Reference
- Core handler function that loads the current project, reads the PRD template from a prompt file, replaces the project name placeholder, creates the necessary directory, writes the PRD to '0_discovery/requirements/PRODUCT_REQUIREMENTS_DOCUMENT.md', and returns a success message.async generateProjectPRD(): Promise<string> { const project = this.loadCurrentProject(); if (!project) { throw new Error('No active project found. Please start clarification first.'); } const promptPath = resolve(__dirname, '../../../.vibecoding/prompts/workflows/discovery-phase.md'); let prdContent = `Failed to load PRD template.`; if (existsSync(promptPath)) { prdContent = readFileSync(promptPath, 'utf-8'); } prdContent = prdContent.replace(/{{projectName}}/g, project.name); const outputPath = join(project.path, '0_discovery', 'requirements', 'PRODUCT_REQUIREMENTS_DOCUMENT.md'); mkdirSync(path.dirname(outputPath), { recursive: true }); writeFileSync(outputPath, prdContent); return `✅ PRD document generated and saved to: ${outputPath}`; }
- vibe-services/context-manager/index.ts:211-219 (registration)Tool registration in the ListTools response, including name, description, and empty input schema.{ name: 'generate-prd', description: 'Generate a project PRD and save it to the project structure', inputSchema: { type: 'object', properties: {}, required: [] } },
- Dispatch handler in the CallToolRequestSchema that invokes the generateProjectPRD method and formats the response.case 'generate-prd': { const resultMessage = await contextManager.generateProjectPRD(); return { content: [ { type: 'text', text: resultMessage } ] }; }
- Input schema for the tool, which is an empty object (no required parameters).inputSchema: { type: 'object', properties: {}, required: [] }