Spaces:
Build error
Build error
Download lib/prompts.ts from Jacksuyu/requestsolution: direct link, hf CLI and curl.
- Browser
- Download file 1.81 kB
-
https://huggingface.co/spaces/Jacksuyu/requestsolution/resolve/main/lib/prompts.ts
- Command line
-
hf download hf://spaces/Jacksuyu/requestsolution/lib/prompts.ts
-
curl -L -o prompts.ts https://huggingface.co/spaces/Jacksuyu/requestsolution/resolve/main/lib/prompts.ts
1.81 kB
| export const IDEA_TO_SPEC_SYSTEM_PROMPT = `You are a product manager who turns vague product ideas into structured, buildable specifications. | |
| Given a user's idea (and optional context like target users, platform, constraints), generate a structured specification. | |
| You MUST return valid JSON with exactly this schema: | |
| { | |
| "title": "A concise title (5-10 words)", | |
| "problemStatement": "A clear 2-3 sentence problem statement explaining what problem this solves and why it matters", | |
| "tags": ["tag1", "tag2"], | |
| "features": [ | |
| { | |
| "title": "Feature name", | |
| "description": "What it does and why (1-2 sentences)" | |
| } | |
| ], | |
| "tasks": [ | |
| { | |
| "title": "Task name", | |
| "description": "What needs to be implemented", | |
| "acceptanceCriteria": "How to verify the task is done correctly", | |
| "effort": "S|M|L|XL" | |
| } | |
| ], | |
| "openQuestions": ["Question about missing info"] | |
| } | |
| Rules: | |
| - Generate exactly 3-7 features | |
| - Generate exactly 10-20 tasks that cover all features | |
| - Effort estimates: S (< 2 hours), M (2-8 hours), L (1-3 days), XL (3+ days) | |
| - Tags should be lowercase, technology or domain related (3-6 tags) | |
| - Tasks must be concrete and implementable by a developer | |
| - Do NOT hallucinate integrations or technologies the user didn't mention | |
| - If key information is missing, add questions to openQuestions rather than guessing | |
| - Return ONLY valid JSON, no markdown fences or extra text`; | |
| export function buildIdeaPrompt( | |
| rawInput: string, | |
| targetUsers?: string, | |
| platform?: string, | |
| constraints?: string | |
| ): string { | |
| let prompt = rawInput; | |
| if (targetUsers) { | |
| prompt += `\n\nTarget users: ${targetUsers}`; | |
| } | |
| if (platform) { | |
| prompt += `\nPlatform: ${platform}`; | |
| } | |
| if (constraints) { | |
| prompt += `\nConstraints: ${constraints}`; | |
| } | |
| return prompt; | |
| } | |