Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | 17x 17x 17x 17x 6x 6x 5x 5x 30x 30x 30x 30x 13x 13x 13x 13x 13x 3x 13x 3x 13x 13x 13x | /**
* Prompt templates for AI content generation (based on blog-spec.md Appendix B)
*/
export interface DraftPromptParams {
title: string;
/** Optional — used as a hint to the model. Quick Draft skips it. */
primaryKeyword?: string;
blogType: "general" | "project_spotlight" | "hybrid";
/** Optional — Quick Draft submits a blank outline; the model infers structure from the title. */
outline?: string;
proContext?: string;
wordCount?: number;
}
export interface RewritePromptParams {
currentContent: string;
feedback: string;
sectionToRewrite?: string;
}
export interface MetaPromptParams {
content: string;
primaryKeyword: string;
}
export interface TopicSuggestionPromptParams {
proId?: string;
proCity?: string;
category?: string;
recentBlogs?: string[];
context?: string;
/** Formatted research context from the research aggregator */
researchContext?: string;
}
/**
* Build prompt for generating a full blog draft
*/
export function buildDraftPrompt(params: DraftPromptParams): string {
const {
title,
primaryKeyword,
blogType,
outline,
proContext,
wordCount = 800,
} = params;
const trimmedKeyword = primaryKeyword?.trim();
const trimmedOutline = outline?.trim();
return `You are writing a blog post for Decor Rocket, an Indian home décor marketplace connecting clients with interior design professionals.
**Blog Details:**
- Title: ${title}
${trimmedKeyword ? `- Target Keyword: ${trimmedKeyword}\n` : ""}- Blog Type: ${blogType}
- Target Audience: Indian clients looking for décor inspiration and solutions
${trimmedOutline ? `**Outline:**\n${trimmedOutline}\n` : "**Outline:**\nNo explicit outline was provided — infer a sensible structure from the title and the guidelines below.\n"}
${proContext ? `**Professional Context:**\n${proContext}\n` : ""}
**Guidelines:**
1. Write in a friendly, helpful, and conversational tone
2. Use Indian context throughout (apartment sizes in BHK format, materials commonly used in India, budget ranges in ₹)
3. Include practical, actionable tips that clients can implement
${trimmedKeyword ? `4. Naturally incorporate the target keyword "${trimmedKeyword}" 3-5 times throughout the content` : "4. Naturally use the most relevant SEO keywords for the topic 3-5 times throughout the content"}
5. Use one H2 (##) per major section. Use H3 (###) sparingly. Keep sections short — 2-3 paragraphs each.
6. Aim for approximately ${wordCount} words. Keep it concise and scannable — shorter blogs perform better.
7. End with a soft call-to-action encouraging readers to explore Decor Rocket professionals
8. Include specific budget ranges when relevant (e.g., "₹2-4 lakhs for a modular kitchen", "₹50,000-1 lakh for bedroom furniture")
9. Reference Indian festivals, seasons, and cultural context when appropriate (e.g., "Diwali home makeover", "monsoon-proofing tips")
10. Focus on practical solutions for common Indian home challenges (small spaces, joint families, climate considerations)
11. Use short, punchy paragraphs (2-3 sentences max). Use bullet lists and numbered lists for scanability.
**Content Structure:**
- Do NOT repeat the title as a heading in the body. Start directly with the introduction paragraph.
- Start with an engaging introduction that addresses a common client pain point
- Use clear section headings that match the outline
- Include specific examples and details
- Do NOT include image placeholders like [Image: ...] — these render as raw text
- If professional context is provided, naturally weave in expert quotes or project references
- Conclude with actionable next steps
Write the blog post in markdown format. Do not include a meta description or title tag - only the body content starting from the introduction.`;
}
/**
* Build prompt for rewriting a section based on professional feedback
*/
export function buildRewritePrompt(params: RewritePromptParams): string {
const { currentContent, feedback, sectionToRewrite } = params;
return `You are revising ${sectionToRewrite ? "a specific section" : "content"} of a blog post for Decor Rocket based on professional feedback.
**${sectionToRewrite ? "Section to Revise" : "Current Content"}:**
${currentContent}
**Professional Feedback:**
${feedback}
**Guidelines:**
1. Address the professional's specific requests and concerns
2. Maintain the overall friendly, helpful tone of Decor Rocket content
3. Preserve SEO optimization and keyword usage
4. Keep approximately the same length unless the feedback requests otherwise
5. Preserve any factual accuracy and Indian context (budget ranges in ₹, BHK sizes, local materials)
6. Ensure the revised content flows naturally with the rest of the blog
7. If the professional requests adding expertise or credentials, incorporate it naturally without sounding promotional
**Important:**
- The revision should feel authentic and maintain editorial quality
- Balance professional preferences with SEO best practices
- Keep the content helpful for clients, not just promotional for the professional
Provide only the revised ${sectionToRewrite ? "section" : "content"} in markdown format. Do not include explanations or commentary about the changes.`;
}
/**
* Build prompt for generating SEO metadata
*/
export function buildMetaPrompt(params: MetaPromptParams): string {
const { content, primaryKeyword } = params;
return `You are creating SEO metadata for a blog post on Decor Rocket, an Indian home décor marketplace.
**Blog Content:**
${content.substring(0, 1000)}...
**Primary Keyword:** ${primaryKeyword}
**Task:**
Generate the following metadata in JSON format:
1. **title**: A compelling page title (50-60 characters) that:
- Includes the primary keyword naturally
- Is click-worthy and descriptive
- Uses Indian English spelling and context
- Example format: "How to [Action] in [Context] | Decor Rocket"
2. **meta_description**: A meta description (150-160 characters) that:
- Summarizes the blog value proposition
- Includes the primary keyword
- Encourages clicks with a benefit-driven message
- Uses Indian English and ₹ for budget ranges if relevant
3. **suggested_slug**: A URL-friendly slug (lowercase, hyphens, no special characters) that:
- Is concise and descriptive
- Includes the primary keyword
- Is under 60 characters
- Example: "arrange-sofas-small-living-room"
Return ONLY valid JSON in this exact format:
{
"title": "Your title here",
"meta_description": "Your meta description here",
"suggested_slug": "your-slug-here"
}`;
}
/**
* Build prompt for suggesting blog topics
*/
export function buildTopicSuggestionPrompt(
params: TopicSuggestionPromptParams,
): string {
const { proId, proCity, category, recentBlogs, context, researchContext } = params;
const recentBlogsText = recentBlogs?.length
? `\n**Recent Published Blogs (to avoid duplication):**\n${recentBlogs.join("\n")}`
: "";
const researchSection = researchContext
? `\n**Research Data (use this to make suggestions timely and relevant):**\n${researchContext}\n`
: "";
return `You are suggesting blog topics for Decor Rocket, an Indian home décor marketplace.
**Context:**
${context || "Suggest topics that will help Indian clients with interior design decisions and attract organic search traffic."}
${proId ? "This request is for a specific professional who wants to be featured or share expertise.\n" : ""}
${proCity ? `**Pro's City:** ${proCity}\nIMPORTANT: All suggestions MUST use "${proCity}" as the city context — never suggest topics for other cities.\n` : ""}
${category ? `**Focus Category:** ${category}\n` : ""}
${recentBlogsText}
${researchSection}
**Blog Topic Strategy:**
Decor Rocket blogs serve two purposes:
1. **SEO/Traffic**: Capture clients in research phase with long-tail keywords
2. **Pro Value**: Provide tangible marketing value to professionals ("your work featured")
**Target Keywords (examples):**
- "[room type] + [city]" → "modular kitchen Hyderabad"
- "[room type] + designs + [qualifier]" → "small pooja room designs modern"
- "how to + [décor task]" → "how to arrange furniture small room"
- "best + [material] + for + [use]" → "best plywood for wardrobes"
- "[service] + cost + [city]" → "carpenter rates Pune"
**Indian Context Requirements:**
- Budget ranges in ₹ (e.g., "under ₹4 lakhs", "₹50k-1L")
- BHK apartment sizes (1BHK, 2BHK, 3BHK)
- Indian cities: Hyderabad, Pune, Bangalore, Mumbai, Chennai, Delhi
- Cultural elements: pooja room, joint family considerations, festival decorating
- Climate: monsoon-proofing, heat-resistant materials
- Common pain points: small spaces, storage, multi-functional furniture
**Task:**
Suggest 5 blog topics in JSON format. For each topic provide:
1. **title**: Working title (compelling and keyword-rich)
2. **blog_type**: "general", "project_spotlight", or "hybrid"
3. **primary_keyword**: Main SEO keyword to target
4. **secondary_keywords**: Array of 2-3 related keywords
5. **outline**: Brief 4-6 point outline of article structure
6. **seo_value**: One sentence explaining why this will rank well
7. **pro_angle**: One sentence on how professionals can be featured (if applicable)
CRITICAL: Your response must be ONLY a valid JSON array. Do not include any explanatory text before or after. Do not wrap in markdown code blocks. Start immediately with [ and end with ].
Example format (return 5 topics):
[
{
"title": "How to Arrange Sofas in a Small Living Room",
"blog_type": "general",
"primary_keyword": "arrange sofa small living room",
"secondary_keywords": ["small hall furniture", "compact living room ideas", "space saving sofa arrangement"],
"outline": "1. Introduction - small apartment challenge\n2. L-shaped sofa strategy\n3. Floating furniture placement\n4. Multi-functional pieces\n5. Visual tricks\n6. Conclusion with pro CTA",
"seo_value": "Targets high-volume 'how to' query with local context, low competition",
"pro_angle": "Feature furniture professionals with small-space expertise and real project photos"
}
]`;
}
export interface EditorialTopicSuggestionPromptParams {
focus: string;
targetAudience: "homeowners" | "pros" | "both";
category?: string;
proCity?: string;
proSpecialties?: string[];
recentBlogs?: string[];
/** Top inquiry types with counts — shows what customers are asking for */
demandSignals?: Array<{ projectType: string; count: number }>;
/** Top-performing blog titles by views — shows what content resonates */
topPerformingBlogs?: Array<{ title: string; views: number }>;
}
export function buildEditorialTopicSuggestionPrompt(
params: EditorialTopicSuggestionPromptParams,
): string {
const {
focus,
targetAudience,
category,
proCity,
proSpecialties,
recentBlogs,
demandSignals,
topPerformingBlogs,
} = params;
const currentDate = new Date().toLocaleDateString("en-IN", {
year: "numeric",
month: "long",
day: "numeric",
});
const currentYear = new Date().getFullYear();
const recentBlogsText = recentBlogs?.length
? `\n**Recent Published Blogs (avoid duplication):**\n${recentBlogs.join("\n")}`
: "";
const demandSection = demandSignals?.length
? `\n**Customer Demand Signals (recent inquiry data — what homeowners are actively looking for):**\n${demandSignals.map((d) => `- ${d.projectType.replace(/_/g, " ")}: ${d.count} inquiries`).join("\n")}\nUse these demand signals to suggest topics that match what customers are actually searching for.\n`
: "";
const topBlogsSection = topPerformingBlogs?.length
? `\n**Top-Performing Blog Content (by views — what resonates with readers):**\n${topPerformingBlogs.map((b) => `- "${b.title}" (${b.views} views)`).join("\n")}\nSuggest topics in similar veins or that complement these high-performers.\n`
: "";
const proContext =
proCity || proSpecialties?.length
? `\n**Featured Pro Context:**${proCity ? `\nCity: ${proCity}` : ""}${proSpecialties?.length ? `\nSpecialties: ${proSpecialties.join(", ")}` : ""}\nIncorporate this pro's location and expertise into relevant suggestions.\n`
: "";
const audienceGuide: Record<string, string> = {
homeowners: `**Target: Homeowners**
Focus on: design inspiration, material guides, budget planning, trend reports, room makeover ideas, hiring tips.
Tone: Friendly, helpful, practical. Use ₹ for budgets, BHK for apartment sizes.`,
pros: `**Target: Interior Design Professionals**
Focus on: business growth, client acquisition, pricing strategies, marketing tips, portfolio building, industry trends.
Tone: Professional, strategic, actionable. Address business challenges Indian designers face.`,
both: `**Target: Both Homeowners & Professionals**
Focus on: topics with dual value — design knowledge that educates homeowners AND positions pros as experts.
Tone: Accessible yet authoritative. Bridge the gap between client education and professional credibility.`,
};
return `You are suggesting editorial blog topics for Interioring, an Indian interior design marketplace.
**Today's Date:** ${currentDate}
**IMPORTANT:** All suggestions must reference the current year (${currentYear}) when mentioning years, trends, or timeframes. Never reference past years like 2024 or 2025 as current.
**Editorial Focus:** ${focus}
${category ? `**Category:** ${category}\n` : ""}
${audienceGuide[targetAudience]}
${proContext}${demandSection}${topBlogsSection}${recentBlogsText}
**Blog Topic Strategy:**
Interioring editorial blogs serve two purposes:
1. **SEO/Traffic**: Capture users in research phase with long-tail keywords
2. **Platform Value**: Position Interioring as the go-to resource for Indian interior design
**Indian Context Requirements:**
- Budget ranges in ₹ (e.g., "under ₹4 lakhs", "₹50k-1L")
- BHK apartment sizes (1BHK, 2BHK, 3BHK)
- Indian cities: Hyderabad, Pune, Bangalore, Mumbai, Chennai, Delhi
- Cultural elements: pooja room, joint family considerations, festival decorating
- Climate: monsoon-proofing, heat-resistant materials
- Common pain points: small spaces, storage, multi-functional furniture
**Task:**
Suggest 5 blog topics in JSON format. For each topic provide:
1. **title**: Working title (compelling and keyword-rich)
2. **blog_type**: "general", "project_spotlight", or "hybrid"
3. **primary_keyword**: Main SEO keyword to target
4. **secondary_keywords**: Array of 2-3 related keywords
5. **outline**: Brief 4-6 point outline of article structure
6. **seo_value**: One sentence explaining why this will rank well
7. **pro_angle**: One sentence on how professionals can be featured
CRITICAL: Your response must be ONLY a valid JSON array. Do not include any explanatory text before or after. Do not wrap in markdown code blocks. Start immediately with [ and end with ].
Example format (return 5 topics):
[
{
"title": "How to Arrange Sofas in a Small Living Room",
"blog_type": "general",
"primary_keyword": "arrange sofa small living room",
"secondary_keywords": ["small hall furniture", "compact living room ideas"],
"outline": "1. Introduction\\n2. L-shaped sofa strategy\\n3. Floating furniture\\n4. Multi-functional pieces\\n5. Visual tricks\\n6. Conclusion",
"seo_value": "Targets high-volume 'how to' query with local context",
"pro_angle": "Feature furniture professionals with small-space expertise"
}
]`;
}
|