QA Gate
Final release gate for any artifact before human review. Every document, skill, blog post, PRD, or code output should pass this gate before the principal sees it.
This is not a code review skill. It is a read-only release gate that determines whether an artifact is ready to move forward. QA Gate inspects artifacts but does not modify them.
When to Use
- - After any ralphy loop completes a PRD
- Before presenting any deliverable to the principal
- When self-reviewing documents, code, skills, or blog posts
- As the final step before publishing to ClawHub or Gumroad
- When asked to "QA gate this," "validate before publish," "final check," or run a "quality gate"
Optional Mode
- -
--dual: Use cross-model QA validation when the artifact is high-stakes, ambiguous, or worth the extra cost/latency for a second independent quality pass.
Process
Step 1: Read the artifact completely
Read the entire file. Do not skim. Understand the structure, voice, and intent.
Step 2: Validate against 6 dimensions
1. Factual Accuracy (Sequential Claim Verification)
Extract every verifiable claim from the artifact into a mental checklist. Then verify each independently — do not batch-assess. For each claim:
- - Is it verifiable from a known source or self-evident from context?
- If it references a citation (paper title, arXiv ID, finding), does the citation match?
- If it describes a technical procedure, is the procedure feasible as described?
- If it references a tool, API, or version, is the reference accurate and current?
Score: count of verified claims / total claims. If verification rate < 90%, flag for revision.
2. Tone & Voice Consistency
- - Does the document maintain its intended voice throughout?
- No tonal drift between sections?
- No marketing fluff, tutorial-speak, or filler?
- Appropriate for the target audience (agent, human, or both)?
3. Completeness
- - No placeholders (TODO, TBD, FIXME, PLACEHOLDER, [FILL IN])?
- All sections referenced in TOC/structure are present?
- All promised content is delivered?
- No orphaned references or dead links?
4. Structural Integrity
- - Heading hierarchy is clean (no skipped levels)?
- Code blocks are properly fenced and syntactically valid?
- Section anchors work?
- Back-links resolve to valid targets?
- Markdown renders correctly?
5. Operational Soundness (for technical documents)
- - Procedures are implementable as described?
- Configuration formats match the actual system?
- Commands and scripts are executable?
- Edge cases are addressed?
6. Sensitive Data Check
- - No personal information (real names, schedules, addresses)?
- No API keys, tokens, or secrets?
- No internal-only references that shouldn't be public?
- Examples use fictional/generic data?
Step 3: Produce gate verdict
Output must include a clear gate result:
CODEBLOCK0
or
PASS WITH FIXES
- MINOR [location]: issue description
or
CODEBLOCK2
Step 4: If FAIL, fix and re-validate
Fix all CRITICAL and MAJOR issues. Re-run the gate. Only present to principal after PASS or PASS WITH FIXES.
Integration with PRD Workflows
Add to any PRD as a verification step:
CODEBLOCK3
Output Format
Write validation report to: qa-gate/YYYY-MM-DD-<artifact-slug>.md (relative to your workspace or evidence directory)
Use this structure:
CODEBLOCK4
Quality Standards
- - CRITICAL: Blocks release. Factual errors, security issues, broken functionality.
- MAJOR: Should fix before release. Missing sections, tone drift, incomplete content.
- MINOR: Nice to fix. Typos, formatting inconsistencies, style preferences.
A PASS with only MINOR issues is acceptable. CRITICAL or MAJOR = must fix first.
QA 门控
在人工审查之前,任何工件(文档、技能、博客文章、PRD 或代码输出)的最终发布门控。所有工件在负责人查看之前必须通过此门控。
这不是代码审查技能。它是一个只读的发布门控,用于判断工件是否准备好进入下一阶段。QA 门控检查工件但不修改它们。
何时使用
- - 在任何 ralphy 循环完成 PRD 之后
- 在向负责人提交任何可交付成果之前
- 在自我审查文档、代码、技能或博客文章时
- 作为发布到 ClawHub 或 Gumroad 之前的最后一步
- 当被要求进行“QA 门控”、“发布前验证”、“最终检查”或运行“质量门控”时
可选模式
- - --dual:当工件风险高、存在歧义或值得为第二次独立质量检查付出额外成本/延迟时,使用跨模型 QA 验证。
流程
步骤 1:完整阅读工件
通读整个文件。不要略读。理解其结构、语气和意图。
步骤 2:按 6 个维度进行验证
1. 事实准确性(顺序声明验证)
从工件中提取每个可验证的声明,形成心理清单。然后独立验证每个声明——不要批量评估。对于每个声明:
- - 它是否可以从已知来源验证,或从上下文中不言自明?
- 如果它引用了引用(论文标题、arXiv ID、发现),引用是否匹配?
- 如果它描述了技术流程,该流程是否按描述可行?
- 如果它引用了工具、API 或版本,引用是否准确且最新?
评分:已验证声明数 / 总声明数。如果验证率 < 90%,标记为需要修订。
2. 语气与风格一致性
- - 文档是否始终保持其预期的语气?
- 各部分之间是否有语气偏差?
- 是否有营销废话、教程式语言或填充内容?
- 是否适合目标受众(智能体、人类或两者)?
3. 完整性
- - 是否有占位符(TODO、TBD、FIXME、PLACEHOLDER、[FILL IN])?
- 目录/结构中引用的所有部分是否都存在?
- 所有承诺的内容是否都已交付?
- 是否有孤立的引用或死链接?
4. 结构完整性
- - 标题层级是否清晰(无跳级)?
- 代码块是否正确围栏且语法有效?
- 章节锚点是否有效?
- 反向链接是否解析到有效目标?
- Markdown 是否正确渲染?
5. 操作合理性(针对技术文档)
- - 流程是否按描述可实现?
- 配置格式是否与实际系统匹配?
- 命令和脚本是否可执行?
- 是否处理了边缘情况?
6. 敏感数据检查
- - 是否没有个人信息(真实姓名、日程安排、地址)?
- 是否没有 API 密钥、令牌或机密?
- 是否没有不应公开的内部引用?
- 示例是否使用虚构/通用数据?
步骤 3:生成门控裁决
输出必须包含清晰的门控结果:
text
通过 — 可进行人工审查
或
text
通过但需修复
或
text
未通过
- - 严重 [位置]:问题描述
- 主要 [位置]:问题描述
- 次要 [位置]:问题描述
步骤 4:如果未通过,修复并重新验证
修复所有严重和主要问题。重新运行门控。仅在通过或通过但需修复后提交给负责人。
与 PRD 工作流的集成
作为验证步骤添加到任何 PRD 中:
markdown
D) QA 门控
- - [ ] 对 PRD 中生成的所有主要工件运行 QA 门控
- [ ] 所有工件必须在标记 PRD 完成前通过
- [ ] 修复所有发现的严重或主要问题
输出格式
将验证报告写入:qa-gate/YYYY-MM-DD-<工件别名>.md(相对于工作区或证据目录)
使用以下结构:
markdown
QA 门控报告:<工件名称>
门控结果
通过 | 通过但需修复 | 未通过
工件类型
文档 | 技能 | PRD | 博客文章 | 代码工件 | 其他
发现
总结
简要说明工件通过、通过但需修复或未通过的原因。
质量标准
- - 严重:阻止发布。事实错误、安全问题、功能损坏。
- 主要:应在发布前修复。缺失部分、语气偏差、内容不完整。
- 次要:最好修复。拼写错误、格式不一致、风格偏好。
仅包含次要问题的通过是可接受的。严重或主要问题 = 必须先修复。