Editing and Review Chains
Drafts need refinement. Editing chains systematically improve content through multiple review passes, each focusing on different aspects.
The Editing Pipeline
Draft → Structure Edit → Content Edit → Style Edit → Proofread → Final
Each pass has a specific focus, preventing overwhelming changes.
Multi-Pass Editing
Pass 1: Structural Edit
Focus on organization and flow:
Loading Prompt Playground...
Pass 2: Content Edit
Focus on substance and accuracy:
const contentEditPrompt = `
Review this content for substance. Check:
1. ACCURACY
- Are all facts correct?
- Are statistics properly attributed?
- Are claims supported?
2. COMPLETENESS
- Is the topic thoroughly covered?
- Are there gaps in the argument?
- Is context sufficient?
3. DEPTH
- Is there enough detail?
- Are examples specific enough?
- Is expert perspective included?
4. RELEVANCE
- Does everything serve the main point?
- Is there tangential content to cut?
Content to review:
${content}
Provide specific suggestions with locations.
`;
Pass 3: Style Edit
Focus on voice and readability:
Loading Prompt Playground...
Pass 4: Line Edit / Proofread
Focus on sentence-level polish:
const lineEditChecks = [
'Spelling errors',
'Grammar mistakes',
'Punctuation issues',
'Word choice improvements',
'Sentence variety',
'Paragraph length variation',
'Repeated words nearby',
'Awkward phrasing'
];
async function lineEdit(content) {
const issues = [];
for (const check of lineEditChecks) {
const found = await detectIssue(content, check);
if (found.length > 0) {
issues.push({ type: check, instances: found });
}
}
return issues;
}
Specialized Review Chains
SEO Review
async function seoReview(content, targetKeywords) {
return {
titleOptimization: checkTitleSEO(content.title, targetKeywords),
keywordDensity: calculateKeywordDensity(content.body, targetKeywords),
headingStructure: analyzeHeadings(content),
metaDescription: checkMetaDescription(content.meta),
internalLinks: checkInternalLinking(content),
readability: calculateReadabilityScore(content.body),
suggestions: generateSEOSuggestions(content, targetKeywords)
};
}
Brand Voice Review
Loading Prompt Playground...
Fact-Check Review
async function factCheckReview(content) {
const claims = extractFactualClaims(content);
const results = [];
for (const claim of claims) {
const verification = await verifyClaim(claim);
results.push({
claim: claim.text,
location: claim.position,
status: verification.status,
source: verification.source,
correction: verification.correction
});
}
return {
totalClaims: claims.length,
verified: results.filter(r => r.status === 'verified').length,
issues: results.filter(r => r.status !== 'verified')
};
}
Revision Implementation
Applying Edits
async function applyEdits(content, editSuggestions) {
let revised = content;
// Sort by position (end to start) to preserve positions
const sorted = editSuggestions.sort((a, b) => b.position - a.position);
for (const edit of sorted) {
if (edit.type === 'replace') {
revised = replaceAt(revised, edit.position, edit.original, edit.replacement);
} else if (edit.type === 'insert') {
revised = insertAt(revised, edit.position, edit.text);
} else if (edit.type === 'delete') {
revised = deleteAt(revised, edit.position, edit.length);
}
}
return revised;
}
Iterative Refinement
async function iterativeEdit(content, maxIterations = 3) {
let current = content;
let iteration = 0;
while (iteration < maxIterations) {
const review = await fullReview(current);
if (review.issues.length === 0 || review.score >= 0.9) {
break; // Good enough
}
current = await applyEdits(current, review.suggestions);
iteration++;
}
return { final: current, iterations: iteration };
}
Exercise: Build an Editing Chain
Loading Prompt Playground...
Key Takeaways
- Multiple editing passes, each with specific focus
- Structural edits before content before style before line edits
- Specialized reviews for SEO, brand voice, facts
- Apply edits systematically to preserve positions
- Iterate until quality threshold met
- Different content types need different review chains
Next, we'll explore multi-format content adaptation.

