fix(blog): raise word target to 1200-1600, fix power-budget false positive in validateArticle

This commit is contained in:
Rene Fichtmueller 2026-04-05 20:49:22 +02:00
parent 1434037d29
commit 438225cf7c
2 changed files with 13 additions and 11 deletions

View File

@ -2351,8 +2351,8 @@ Article:
export const STEP8b_REDUCTION = `You are running the FLEXOPTIX REDUCTION ENGINE on this article.
Target length: 7001,000 words. This is the gold zone for a Flexoptix technical blog post.
DO NOT go below 600 words. DO NOT exceed 1,300 words (warning threshold).
Target length: 1,2001,600 words. This is the gold zone for a Flexoptix technical blog post.
DO NOT go below 1,000 words. DO NOT exceed 2,000 words (warning threshold).
This is a 5-pass refinement. Apply all passes in sequence:
@ -2408,10 +2408,11 @@ Read the final text out loud (mentally). Fix anything that sounds like it was ge
LENGTH TARGETS (apply after all 5 passes):
Short article: 600700 words (opinion piece, market note)
Standard article: 7001,000 words (technical analysis, guide) DEFAULT TARGET
Long article: 1,0001,300 words (deep-dive, migration tutorial) only if content demands it
Warning zone: 1,300+ words something wasn't cut enough, revisit Pass 1.
Short article: 1,0001,200 words (opinion piece, market note)
Standard article: 1,2001,600 words (technical analysis, guide) DEFAULT TARGET
Long article: 1,6002,000 words (deep-dive, migration tutorial) only if content demands it
Warning zone: 2,000+ words something wasn't cut enough, revisit Pass 1.
HARD MINIMUM: 1,000 words. If below 1,000 words expand Pass 3 bridges, do not submit.
DO NOT add section headers. DO NOT add new facts. DO NOT change the writing voice.

View File

@ -333,11 +333,12 @@ function validateArticle(content: string): string[] {
}
// Check minimum depth
const wordCount = content.split(/\s+/).length;
if (wordCount < 800) {
issues.push(`Too short: ${wordCount} words (minimum 800 for template, 1200 for LLM)`);
if (wordCount < 1200) {
issues.push(`Too short: ${wordCount} words (minimum 1200)`);
}
// Check for power budget section in troubleshooting articles
if (content.toLowerCase().includes("troubleshoot") && !content.toLowerCase().includes("power budget")) {
// Check for power budget only in articles primarily about troubleshooting (title contains it)
const titleLine = content.split("\n")[0]?.toLowerCase() || "";
if (titleLine.includes("troubleshoot") && !content.toLowerCase().includes("power budget")) {
issues.push("Missing power budget section");
}
@ -1208,7 +1209,7 @@ async function runLlmPipeline(
const wordsAfter = step8b.text.split(/\s+/).length;
const wordsBefore = step8.text.split(/\s+/).length;
const pctChange = Math.round((1 - wordsAfter / wordsBefore) * 100);
console.log(` After reduction: ${wordsAfter} words (was ${wordsBefore}, ${pctChange}%) ${wordsAfter > 1300 ? "⚠ WARNING: >1300 words" : wordsAfter < 600 ? "⚠ WARNING: <600 words" : "✓ in target range"}`);
console.log(` After reduction: ${wordsAfter} words (was ${wordsBefore}, ${pctChange}%) ${wordsAfter > 2000 ? "⚠ WARNING: >2000 words" : wordsAfter < 1000 ? "⚠ WARNING: <1000 words" : "✓ in target range"}`);
// ═══ STEP AEM: Auto-Editor Mode (Senior Engineer voice polish) ═══
console.log(" Step 12/16: Auto-Editor Mode (senior engineer voice polish)...");