/**
* Content Plan Builder - AI Prompts
*
* System and user prompts for generating project plans from content.
*/
import type { CreativityLevel } from './types.js';
/**
* System prompt for project plan generation
*/
export const PLAN_GENERATION_SYSTEM_PROMPT = `You are an expert Project Management Consultant specializing in breaking down complex projects into actionable, detailed task hierarchies.
Your task is to analyze the provided content and create a comprehensive project plan with:
1. A clear project goal (3-5 sentences)
2. Exactly 5 top-level tasks
3. 5-10 subtasks for each top-level task (aim for 7-8 per task for robustness)
4. Detailed task dependencies and blocking relationships
5. Realistic time estimates based on task complexity
6. Specific role/assignee recommendations
7. Key data points and metrics
8. Keywords and phrases capturing main themes
9. Thought-provoking questions for team consideration
10. 5 SMART (Specific, Measurable, Achievable, Relevant, Time-bound) goals
11. Additional reference materials needed
CRITICAL REQUIREMENTS:
- Each subtask description must be 3 sentences minimum
- Dependencies must reference actual task/subtask names
- Time estimates must be realistic (e.g., "2 weeks", "10 days", "3 months")
- Assignees should be generic roles (e.g., "Project Manager", "Senior Developer", "QA Lead")
- Include specific examples and metrics where applicable
- Ensure task dependencies create a logical workflow
- Mark dependencies as "N/A" only when truly independent
Return ONLY valid JSON in the exact format specified. No additional text.`;
/**
* System prompt for summarizing large transcripts/content
*/
export const SUMMARIZATION_SYSTEM_PROMPT = `You are a meeting transcript analyst. Extract the KEY THEMES, DECISIONS, ACTION ITEMS, and DISCUSSION POINTS from this content. Preserve all important details and context.`;
/**
* Get the user prompt for plan generation
*/
export function getPlanGenerationUserPrompt(
inputType: string,
combinedContext: string,
projectName?: string,
creativity: CreativityLevel = 'balanced'
): string {
const creativityGuidance = getCreativityGuidance(creativity);
return `Analyze this ${inputType} and create a comprehensive project plan:
${combinedContext}
${projectName ? `Project Name: ${projectName}` : ''}
${creativityGuidance}
Generate a detailed project plan in this exact JSON format:
{
"projectGoal": "3-5 sentence statement of main objective",
"topLevelTasks": [
{
"name": "Task name",
"description": "Detailed description with examples",
"assignedTo": "Generic role",
"estimate": "Time estimate",
"blockedBy": "Dependent task names or N/A",
"subtasks": [
{
"name": "Subtask name",
"description": "3+ sentence description with specifics",
"assignedTo": "Generic role",
"estimate": "Time estimate",
"blockedBy": "Dependent subtask names or N/A"
}
]
}
],
"keyDataPoints": ["data point 1", "data point 2", ...],
"keywordsAndPhrases": ["keyword 1", "keyword 2", ...],
"questionsAndExercises": ["question 1", "question 2", ...],
"smartGoals": ["SMART goal 1", "SMART goal 2", ...],
"additionalMaterials": ["material 1", "material 2", ...],
"notes": "Optional notes"
}`;
}
/**
* Get the user prompt for summarizing large content
*/
export function getSummarizationUserPrompt(content: string): string {
return `Extract the KEY THEMES, DECISIONS, ACTION ITEMS, and DISCUSSION POINTS from this content.
${content}
Provide a structured summary with:
1. Main Goals/Objectives discussed
2. Key Decisions Made
3. Action Items and Owners
4. Technical/Project Details
5. Dependencies and Blockers
6. Timeline/Estimates mentioned
7. Team Members and Roles
8. Next Steps
Be comprehensive - include all specific numbers, names, and technical details mentioned.`;
}
/**
* Get creativity-specific guidance for the prompt
*/
function getCreativityGuidance(creativity: CreativityLevel): string {
switch (creativity) {
case 'conservative':
return `CREATIVITY LEVEL: Conservative
- Stick closely to what is explicitly mentioned in the content
- Only include tasks that are directly derived from the source material
- Avoid inferring or adding tasks that aren't clearly implied
- Keep estimates conservative and well-justified`;
case 'expansive':
return `CREATIVITY LEVEL: Expansive
- Feel free to infer additional tasks that would logically be needed
- Consider edge cases, testing, documentation, and deployment tasks
- Add tasks for risk mitigation and contingency planning
- Include tasks for stakeholder communication and change management
- Think about what a thorough project manager would add`;
case 'balanced':
default:
return `CREATIVITY LEVEL: Balanced
- Include tasks that are mentioned or strongly implied
- Add essential supporting tasks (e.g., testing, documentation) where appropriate
- Balance thoroughness with staying relevant to the source content`;
}
}
/**
* Expected JSON schema for validation
*/
export const PLAN_JSON_SCHEMA = {
type: 'object',
required: [
'projectGoal',
'topLevelTasks',
'keyDataPoints',
'keywordsAndPhrases',
'questionsAndExercises',
'smartGoals',
'additionalMaterials'
],
properties: {
projectGoal: { type: 'string' },
topLevelTasks: {
type: 'array',
items: {
type: 'object',
required: ['name', 'description', 'assignedTo', 'estimate', 'blockedBy', 'subtasks'],
properties: {
name: { type: 'string' },
description: { type: 'string' },
assignedTo: { type: 'string' },
estimate: { type: 'string' },
blockedBy: { type: 'string' },
subtasks: {
type: 'array',
items: {
type: 'object',
required: ['name', 'description', 'assignedTo', 'estimate', 'blockedBy'],
properties: {
name: { type: 'string' },
description: { type: 'string' },
assignedTo: { type: 'string' },
estimate: { type: 'string' },
blockedBy: { type: 'string' }
}
}
}
}
}
},
keyDataPoints: { type: 'array', items: { type: 'string' } },
keywordsAndPhrases: { type: 'array', items: { type: 'string' } },
questionsAndExercises: { type: 'array', items: { type: 'string' } },
smartGoals: { type: 'array', items: { type: 'string' } },
additionalMaterials: { type: 'array', items: { type: 'string' } },
notes: { type: 'string' }
}
};