Skip to content

Implement PRD Generator: AI-assisted Product Requirements Document creation workflow #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: next
Choose a base branch
from

Conversation

Zyra-V23
Copy link

@Zyra-V23 Zyra-V23 commented Apr 3, 2025

PR Title

"Implement PRD Generator: AI-assisted Product Requirements Document creation workflow"

PR Notes

🚀 Overview

This PR introduces a complete PRD (Product Requirements Document) generation workflow powered by AI models like Claude and Perplexity. The system transforms basic product ideas into comprehensive, professional requirement documents through a guided, multi-stage process that simulates expert input and discussion.

🧩 Key Components

New Core Services

  • Ideation Service: Generates structured product concepts from simple ideas
  • Discussion Service: Simulates round-table discussions between expert roles
  • PRD Service: Creates final PRD documents with customizable formatting

New Data Models

  • Idea: Represents initial product concepts with metadata
  • Discussion: Captures expert discussions and key insights
  • PRD: Structures the final document with proper versioning

Workflow Integration

  • All commands can be chained for a seamless document creation process
  • Interactive user prompts guide users through each step
  • Consistent file management in the prd/ directory

🔄 PRD Generation Workflow

The complete workflow consists of four main commands:

  1. Ideation

    node scripts/dev.js ideate --idea="Product idea description" [--research]

    Transforms an initial idea into a structured concept document.

  2. Round Table

    node scripts/dev.js round-table --concept-file=prd/concept.txt [--participants="..."]

    Simulates a discussion between expert roles about the concept.

  3. Concept Refinement

    node scripts/dev.js refine-concept --concept-file=prd/concept.txt [--discussion-file=prd/discussion.txt]

    Improves the concept using insights from the expert discussion.

  4. PRD Generation

    node scripts/dev.js generate-prd --concept-file=prd/concept_refined.txt [--template=...] [--format=...]

    Creates the final PRD document based on the refined concept.

💡 UI Improvements

  • Added ora for loading indicators during AI operations
  • Enhanced user feedback with color-coded status messages
  • Interactive prompts at each step to guide workflow
  • Clear next-step suggestions after each command

🧪 Testing Status

  • 257 total tests (increase from ~126 original tests)
  • 204 tests passing
  • 49 tests skipped (primarily AI-dependent tests)
  • 4 tests failing in commands.test.js (CONFIG.projectVersion issues)

📋 Cursor Rules Updates

Updated .cursor/rules/ files with documentation about:

  • New architecture components
  • PRD generation workflow
  • New feature integration
  • External dependency justification

🔍 Implementation Notes

This feature creates a bridge between initial product ideation and structured task generation, allowing teams to:

  1. Start with just a basic product idea
  2. Generate professional PRD documentation
  3. Parse the PRD into executable tasks
  4. Track implementation progress

This completes the full circle of the Task Master CLI, from idea to implementation tracking.

Copy link

changeset-bot bot commented Apr 3, 2025

⚠️ No Changeset found

Latest commit: 64cf5d8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Author

@Zyra-V23 Zyra-V23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oupsy

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a patch for inquires dependency, not activated atm

Copy link
Author

@Zyra-V23 Zyra-V23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just /ignore the .cursor/rules :'D sorry abouut the language, sometimes it rebels against me

@Zyra-V23
Copy link
Author

Zyra-V23 commented Apr 5, 2025

@eyaltoledano this is the good one, rest you can delete, forget the .txt an .cursor etc, was late and didnt payed so much attention sorry sir

@Crunchyman-ralph Crunchyman-ralph linked an issue Apr 5, 2025 that may be closed by this pull request
@eyaltoledano eyaltoledano moved this from Triage to Review in Taskmaster Core Apr 5, 2025
@eyaltoledano eyaltoledano added the enhancement New feature or request label Apr 5, 2025
@eyaltoledano
Copy link
Owner

LMK if you need help with the merge conflicts. We dont want to overwrite the new work that was done.

@Zyra-V23
Copy link
Author

Zyra-V23 commented Apr 9, 2025

LMK if you need help with the merge conflicts. We dont want to overwrite the new work that was done.

AS LONG AS I REMEMBER, there were not merge conflicts, corefunctionality has been uploaded isolated, so it was 100% working when I did PR'd (Well, didnt check for user bugs etc...).

The difference between this 92 issue and last one was just regarding the isolation of the functionalities.

@eyaltoledano
Copy link
Owner

That's nearly impossible, as my update touched like 250 files which is p much the whole project lol

i.e. scripts/modules/commands.s and dev.js and the rules

@Zyra-V23
Copy link
Author

Zyra-V23 commented Apr 9, 2025

Ok yes, @eyaltoledano now I get what you mean. I was about to go sleep, if it's not done when I'm back, I'll give an eye :)

@Zyra-V23
Copy link
Author

Zyra-V23 commented Apr 9, 2025

I think you were talking about if I was having problem during my merge tests (i did a commit bout that and mocked one test lmao)

@Crunchyman-ralph
Copy link
Collaborator

@Zyra-V23 please resolve conflicts, will be reviewing asap

Copy link
Collaborator

@Crunchyman-ralph Crunchyman-ralph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial review done.

Will do a deeper one.

Comment on lines 4 to 5
// Mock the storage provider if ContextManager uses one internally
// jest.mock('../storage/some-storage-provider.js');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup ?

Comment on lines 11 to 15
// Reset or create a new instance for each test
contextManager = new ContextManager();
// Clear any potentially persisted context from previous tests
// This might involve mocking storage or using an internal reset method if available
// Example: contextManager.resetAllContexts();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup

prd/prd.txt Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably needs to be removed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure we already have an error handler ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! we do have one in mcp-server/src/logger.js :) removing it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have a logger, find it and use that instead.

Remove this, unless this is a refactor.

@Zyra-V23
Copy link
Author

@Crunchyman-ralph
I've reviewed the PRD generation services and addressed your feedback by removing the error-handler.js and prd.txt files. The ServiceInterface is a simple base class for the new services rather than an MCP implementation.
One important integration point remains: the services (Ideation, Discussion, PRD) are fully implemented with complete functionality but aren't yet connected to the command-line interface in commands.js.

For the services to be accessible via task-master ideate or similar commands, we need to:

Register the commands in commands.js
Connect them to the service implementations
Add appropriate help text and parameter definitions

Would you like me to add the command registration to commands.js in a follow-up PR, or would you prefer to integrate them differently into the MCP architecture? I was told to just do the logic and leave the mcp connection part to you guys @eyaltoledano , let me know :)

@Crunchyman-ralph
Copy link
Collaborator

Seems like it is failing the format-check and test. Please fix those failing unit tests

@Zyra-V23
Copy link
Author

Zyra-V23 commented Apr 15, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Review
Development

Successfully merging this pull request may close these issues.

Implement a method to generate PRD
3 participants