Skip to content

Instantly share code, notes, and snippets.

@pksorensen
Created August 11, 2025 18:48
Show Gist options
  • Save pksorensen/e8cf2caaff66eb02b4b8c7fd1f331642 to your computer and use it in GitHub Desktop.
Save pksorensen/e8cf2caaff66eb02b4b8c7fd1f331642 to your computer and use it in GitHub Desktop.
[McpServerPrompt(Name = "create-prd.md"), Description("Generate a comprehensive PRD from product description")]
public static IEnumerable<ChatMessage> CreatePrdFromDescription(
IHttpContextAccessor httpContextAccessor,
ILogger<CreatePrdPrompt> logger,
[Description("Product or feature name")] string productName,
[Description("Detailed product description")] string productDescription,
[Description("Target users or personas")] string? targetUsers = null,
[Description("Key features (comma-separated)")] string? keyFeatures = null,
[Description("Success metrics")] string? successMetrics = null)
{
logger.LogUserContext(httpContextAccessor.HttpContext?.User, "CreatePrdFromDescription");
var systemPrompt = @"You are an experienced Product Manager creating a comprehensive Product Requirements Document (PRD).
Your PRD should be well-structured, clear, and actionable. Include the following sections:
1. Executive Summary
2. Problem Statement
3. Solution Overview
4. User Personas
5. User Stories and Requirements
6. Functional Requirements
7. Non-Functional Requirements
8. Success Metrics
9. Risks and Mitigation
10. Timeline and Milestones
Make the PRD specific, measurable, and implementation-ready.";
var userPrompt = $@"Create a comprehensive PRD for the following product:
**Product Name:** {productName}
**Description:** {productDescription}
{(string.IsNullOrEmpty(targetUsers) ? "" : $"**Target Users:** {targetUsers}")}
{(string.IsNullOrEmpty(keyFeatures) ? "" : $"**Key Features:** {keyFeatures}")}
{(string.IsNullOrEmpty(successMetrics) ? "" : $"**Success Metrics:** {successMetrics}")}
Please generate a complete PRD following the structure outlined in your instructions.";
return new[]
{
new ChatMessage(ChatRole.System, systemPrompt),
new ChatMessage(ChatRole.User, userPrompt)
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment