guidly/bot/prompts/step-generation.ts
laruevin d5ed7fdcf9 Initial commit: Guidly project with CI/CD pipeline
Telegram Bot + Mini App for city walking quests.
- React 19 + TypeScript + Vite 6 frontend
- Express 5 + PostgreSQL backend
- grammY Telegram bot with DeepSeek AI
- GitLab CI/CD: lint, build, deploy to production

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 11:42:42 +07:00

49 lines
1.6 KiB
TypeScript

export function getStepGenerationPrompt(params: {
city: string
dayNumber: number
totalDays: number
dayTheme: string
pace: string
companions: string
userComment?: string
previousPoints: string[]
lang: string
}): string {
const langInstruction = params.lang === 'ru'
? 'Write title and teaserText in Russian.'
: 'Write title and teaserText in English.'
return `Given quest context:
- City: ${params.city}
- Day: ${params.dayNumber} of ${params.totalDays}
- Day theme: ${params.dayTheme}
- Pace: ${params.pace}
- Companions: ${params.companions}
${params.userComment ? `- User wishes: ${params.userComment}` : ''}
- Points already visited today: ${params.previousPoints.length > 0 ? params.previousPoints.join(', ') : 'none (this is the first point)'}
Generate the NEXT point for today's route.
${langInstruction}
Return ONLY a valid JSON object:
{
"title": "Location name",
"teaserText": "1-2 sentences teasing what awaits, creating curiosity",
"locationLat": <number>,
"locationLon": <number>,
"isLastPointOfDay": <boolean>
}
Requirements:
- Must be a REAL location in ${params.city} with accurate coordinates
- Must be geographically close to the previous point (walkable)
- Must not repeat any visited location
- Teaser should create curiosity without spoiling
- Consider the narrative arc of the day
- For ${params.pace} pace: ${{slow: '4-5 points per day', normal: '5-7 points per day', active: '7-9 points per day'}[params.pace] || '5-7 points per day'}
- Set isLastPointOfDay=true when it makes sense to end the day
Return ONLY valid JSON, no markdown, no extra text.`
}