Purpose and Responsibilities
- Parse and summarize the project idea.
- Extract key features and estimate complexity (
low|medium|high) and estimated_agents. - Generate 3–5 clarifying questions for the Intent step.
Input/Output
Input
idea: string— Raw idea from the user.sessionId: string— For logging/tracing.
Output (IdeaAnalysis in lib/openai.ts)
Prompt Engineering
- System: Instructs the model to act as an “expert idea analysis assistant (IdeaProcessor)” and to respond with valid JSON in the exact structure above. Asks for 3–5 thoughtful clarifying questions.
- User:
Session ID: ${sessionId}\n\nUser Idea: ${idea} - Options:
response_format: { type: "json_object" },temperature: 0.7. Model:DEFAULT_MODEL_TYPE(e.g. GROK).
processIdea(idea, sessionId, modelType?) in lib/openai.ts.
Examples
Request (via /api/idea)
Response (idea + analysis + questions)
Customization Options
- Model: Pass
modelTypetoprocessIdea(e.g.QWEN,GEMINI). - System prompt: Edit the
processIdeasystem string inlib/openai.tsto change tone, structure, or number of questions. - JSON schema: If you change
IdeaAnalysis, ensure the system prompt and any callers (e.g./api/idea) stay in sync.