Goal: Inspect the rendered DOM and network activity for content integrity and SEO completeness.
Run all checks and collect results. Do not stop on individual failures -- collect everything and report in Phase 4.
Check 1: Title Match (Severity: BLOCKER)
javascript
// Extract rendered title
const titleEl = document.querySelector('h1, .entry-title, .post-title');
titleEl ? titleEl.textContent.trim() : null;
If an expected title was provided, compare (case-insensitive, trimmed). Mark PASS if they match, BLOCKER if they differ or no title element is found.
If no expected title was provided, report the rendered title as INFO.
Check 2: H2 Structure (Severity: WARNING)
javascript
// Extract all H2 headings
const h2s = Array.from(document.querySelectorAll('h2')).map(h => h.textContent.trim());
JSON.stringify(h2s);
If an expected H2 count was provided, compare. Mark PASS if counts match, WARNING if they differ. Always report the rendered H2 texts for manual inspection.
Check 3: Image Loading (Severity: BLOCKER)
Use
and filter for image requests (URLs ending in common image extensions or with image MIME types). Check each response status:
- 2xx: loaded successfully
- 4xx/5xx: BLOCKER -- image is broken for readers
Report total images, loaded count, and failed count with URLs of any failures.
Check 4: JavaScript Console Errors (Severity: WARNING)
Use
and filter to
level. Exclude known benign patterns:
- Ad network errors (doubleclick, googlesyndication, adsbygoogle)
- Analytics warnings (gtag, analytics, fbevents)
- Consent manager noise (cookiebot, onetrust, quantcast)
- Browser extension artifacts
Report count of genuine errors and their messages.
Check 5: OG Tags (Severity: WARNING)
javascript
// Extract OG and social meta tags
const getMeta = (sel) => {
const el = document.querySelector(sel);
return el ? el.getAttribute('content') : null;
};
JSON.stringify({
'og:title': getMeta('meta[property="og:title"]'),
'og:description': getMeta('meta[property="og:description"]'),
'og:image': getMeta('meta[property="og:image"]'),
'og:url': getMeta('meta[property="og:url"]'),
'twitter:card': getMeta('meta[name="twitter:card"]')
});
Mark WARNING for any missing OG tag. Report each tag's value and character count.
Check 6: Meta Description (Severity: WARNING)
javascript
const desc = document.querySelector('meta[name="description"]');
desc ? desc.getAttribute('content') : null;
Mark PASS if present and non-empty, WARNING if missing or empty. Report value and character count.
Check 7: Placeholder/Draft Text (Severity: BLOCKER)
javascript
// Search visible text for placeholder patterns
const body = document.body.innerText;
const patterns = ['[TBD]', '[TODO]', 'PLACEHOLDER', 'Lorem ipsum', '[insert', '[FIXME]'];
const found = patterns.filter(p => body.toLowerCase().includes(p.toLowerCase()));
JSON.stringify(found);
Mark BLOCKER if any placeholder patterns are found in the visible page text. Mark PASS if none found.
GATE: All 7 checks executed. Each has a severity classification and evidence value. Proceed to Phase 3.
目标:检查渲染后的DOM和网络活动,确保内容完整性和SEO完整性。
运行所有检查并收集结果。不因单个失败而停止——收集所有结果并在阶段4中报告。
检查1:标题匹配(严重程度:BLOCKER)
javascript
// Extract rendered title
const titleEl = document.querySelector('h1, .entry-title, .post-title');
titleEl ? titleEl.textContent.trim() : null;
如果提供了预期标题,进行比较(不区分大小写,去除首尾空格)。匹配则标记为PASS,不匹配或未找到标题元素则标记为BLOCKER。
如果未提供预期标题,将渲染后的标题作为INFO报告。
检查2:H2结构(严重程度:WARNING)
javascript
// Extract all H2 headings
const h2s = Array.from(document.querySelectorAll('h2')).map(h => h.textContent.trim());
JSON.stringify(h2s);
如果提供了预期H2数量,进行比较。数量匹配则标记为PASS,不匹配则标记为WARNING。始终报告渲染后的H2文本供人工检查。
检查3:图片加载(严重程度:BLOCKER)
使用
并过滤图片请求(URL以常见图片扩展名结尾或带有图片MIME类型)。检查每个响应状态:
- 2xx:加载成功
- 4xx/5xx:BLOCKER——图片对读者来说已损坏
报告图片总数、加载成功数量、失败数量及任何失败图片的URL。
检查4:JavaScript控制台错误(严重程度:WARNING)
- 广告网络错误(doubleclick、googlesyndication、adsbygoogle)
- 分析警告(gtag、analytics、fbevents)
- 同意管理器噪音(cookiebot、onetrust、quantcast)
- 浏览器扩展 artifacts
报告真实错误的数量及其消息。
检查5:OG标签(严重程度:WARNING)
javascript
// Extract OG and social meta tags
const getMeta = (sel) => {
const el = document.querySelector(sel);
return el ? el.getAttribute('content') : null;
};
JSON.stringify({
'og:title': getMeta('meta[property="og:title"]'),
'og:description': getMeta('meta[property="og:description"]'),
'og:image': getMeta('meta[property="og:image"]'),
'og:url': getMeta('meta[property="og:url"]'),
'twitter:card': getMeta('meta[name="twitter:card"]')
});
任何缺失的OG标签标记为WARNING。报告每个标签的值和字符数。
检查6:元描述(严重程度:WARNING)
javascript
const desc = document.querySelector('meta[name="description"]');
desc ? desc.getAttribute('content') : null;
存在且非空则标记为PASS,缺失或为空则标记为WARNING。报告值和字符数。
检查7:占位符/草稿文本(严重程度:BLOCKER)
javascript
// Search visible text for placeholder patterns
const body = document.body.innerText;
const patterns = ['[TBD]', '[TODO]', 'PLACEHOLDER', 'Lorem ipsum', '[insert', '[FIXME]'];
const found = patterns.filter(p => body.toLowerCase().includes(p.toLowerCase()));
JSON.stringify(found);
如果在页面可见文本中找到任何占位符模式,标记为BLOCKER。未找到则标记为PASS。
关卡:完成所有7项检查。每项检查都有严重程度分类和证据值。进入阶段3。