assay
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseassay — Mutation Review & Adversarial Quality Engine
assay —— 变异审查与对抗性质量引擎
Domain Rubric
领域评分标准
1. Review Dimensions
1. 审查维度
Inspect mutation artifacts against 4 structural dimensions:
- Scope Integrity (Blast Radius & Anti-Bloat): Verify that every planned or modified file is strictly load-bearing. Flag accidental formatting, cosmetic churn, unrelated refactoring, or speculative files.
- Contract & Spec Fidelity (Anti-Drift): Reconcile changes against governing specifications, SSOT documents, and established interfaces. Flag undocumented behavioral changes or broken contracts.
- Structural Cohesion & Slicing: Verify modular encapsulation without leaky abstractions. For tasks, verify true vertical slicing (end-to-end capability) over horizontal layer fragmentation.
- Operational Hygiene & Safety: Expose unhandled edge cases, resource leaks, lingering debug probes (), or unredacted secrets.
[DEBUG-<hex>]
从4个结构维度检查变异工件:
- 范围完整性(爆炸半径与防膨胀):验证每个计划中或已修改的文件是否严格承担必要职责。标记意外的格式调整、无意义改动、无关重构或推测性文件。
- 契约与规格保真度(防漂移):将变更与治理规范、单一事实来源(SSOT)文档及既有接口进行核对。标记未记录的行为变更或破坏的契约。
- 结构内聚性与切片:验证模块化封装,避免泄漏抽象。对于任务,验证真正的垂直切片(端到端能力),避免水平分层碎片化。
- 运维卫生与安全性:暴露未处理的边界情况、资源泄漏、残留调试探针()或未脱敏的机密信息。
[DEBUG-<hex>]
2. Review Verdicts
2. 审查结论
- : Zero structural or contract defects; blast radius is minimal and strictly load-bearing; ready for execution or commit.
PASS - : Minor defects observed (accidental churn, missing edge test, localized bloat); actionable remediation provided to unblock.
CONDITIONAL - : Critical defects detected (contract violation, unauthorized blast radius, fake vertical slice, regression risk); reject and halt.
FAIL
- :零结构或契约缺陷;爆炸半径最小且严格必要;可执行或提交。
PASS - :发现轻微缺陷(意外改动、缺失边界测试、局部膨胀);提供可操作的修复建议以解除阻塞。
CONDITIONAL - :检测到严重缺陷(契约违反、未授权的爆炸半径、伪垂直切片、回归风险);拒绝并中止。
FAIL
3. Anti-Hallucination & Grounding Guardrails
3. 反幻觉与落地护栏
- Dual-Citation Rule: Every reported defect must explicitly cite both the offending code pointer (
Contract & Spec Fidelity) and the violated specification or interface contract (file:///path/to/code#L<N>). Forbid claiming drift without contract citation.file:///path/to/spec#L<M> - Multi-Layer Contract Grounding: Ground mutations against 3 authoritative layers: explicit specifications/tasks, structural code interfaces/schemas, and baseline test invariants. Mark Contract Fidelity as only when no governing specs or code contracts exist across the repository; evaluate strictly on Scope Integrity and Hygiene. Forbid inventing imaginary requirements.
UNGROUNDED
- 双重引用规则:每个报告的缺陷必须同时引用违规代码位置(
契约与规格保真度)和被违反的规范或接口契约(file:///path/to/code#L<N>)。禁止在没有契约引用的情况下宣称漂移。file:///path/to/spec#L<M> - 多层契约落地:将变更对接到3个权威层:显式规范/任务、结构代码接口/模式、基线测试不变量。仅当仓库中不存在任何治理规范或代码契约时,才将契约保真度标记为;此时仅按范围完整性和运维卫生进行评估。禁止虚构需求。
UNGROUNDED
Canonical Output Contract
规范输出契约
markdown
undefinedmarkdown
undefinedAssay Report: <Target / Scope Name>
Assay Report: <Target / Scope Name>
1. Executive Verdict
1. Executive Verdict
- Verdict: <PASS | CONDITIONAL | FAIL>
- Target Inspected: <Working Tree Diff | Staged Changeset | Task Breakdown | Commit <hash>>
- Governing Contracts: <Cited specification file pointers or 'UNGROUNDED (No governing spec found)'>
- Summary: <Single-sentence technical judgment>
- Verdict: <PASS | CONDITIONAL | FAIL>
- Target Inspected: <Working Tree Diff | Staged Changeset | Task Breakdown | Commit <hash>>
- Governing Contracts: <Cited specification file pointers or 'UNGROUNDED (No governing spec found)'>
- Summary: <Single-sentence technical judgment>
2. Findings & Actionable Remediations
2. Findings & Actionable Remediations
(If PASS: 'No defects observed across scope integrity, contract fidelity, structural cohesion, and operational hygiene.')
- [<Dimension>] <Defect Title>: <Concise technical description of defect and failure risk>
- Offending Code: <file>#L<N>
- Violated Contract: <spec_or_interface>#L<M>
- Remediation: <Exact minimal correction needed>
(If PASS: 'No defects observed across scope integrity, contract fidelity, structural cohesion, and operational hygiene.')
- [<Dimension>] <Defect Title>: <Concise technical description of defect and failure risk>
- Offending Code: <file>#L<N>
- Violated Contract: <spec_or_interface>#L<M>
- Remediation: <Exact minimal correction needed>
3. Pipeline Routing
3. Pipeline Routing
- ── Target is PASS; proceed to implementation or commit handoff.
/forge - ── Blast radius bloat or structural defects require re-planning.
/changeset - ── Contract drift or ungrounded architectural tensions detected.
/clarify
undefined- ── Target is PASS; proceed to implementation or commit handoff.
/forge - ── Blast radius bloat or structural defects require re-planning.
/changeset - ── Contract drift or ungrounded architectural tensions detected.
/clarify
undefinedExecution Protocol
执行协议
Phase 1: Scope & Contract Grounding
阶段1:范围与契约落地
- Ingest target mutation artifact (uncommitted diff, staged changeset, , or commit range).
.agents/tasks/ - Trace and ground governing boundaries across the codebase per Multi-Layer Contract Grounding guardrails.
- 摄取目标变更工件(未提交的diff、已暂存的变更集、或提交范围)。
.agents/tasks/ - 按照多层契约落地护栏,在代码库中追踪并确定治理边界。
Phase 2: Scale-Adaptive Adversarial Review
阶段2:规模自适应的对抗性审查
- Evaluate mutation scope scale:
- In-Turn Review (localized diff, 1–5 files, or single task card): Audit mutations directly in-turn against review dimensions.
- Subagent Fan-Out (multi-package changesets or broad PR diffs): Launch 2–3 subagents (Role:
research). Seed each with target diff slice, discovered contracts, and Canonical Output Contract.Mutation Reviewer (<Slice>)
- Seed each subagent with:
- Its allocated diff slice and target file pointers.
- Discovered governing contracts and invariant baselines.
- The Dual-Citation Rule and Canonical Output Contract as the mandatory output contract.
- Assign subagent role: .
Mutation & Architecture Reviewer (<Target Slice/Subsystem>)
- 评估变更范围规模:
- 回合内审查(局部diff,1–5个文件,或单个任务卡片):在回合内直接按审查维度审计变更。
- 子代理扇出(多包变更集或大型PR diff):启动2–3个子代理(角色:
research)。为每个子代理提供目标diff切片、已发现的契约和规范输出契约。Mutation Reviewer (<Slice>)
- 为每个子代理提供:
- 分配的diff切片和目标文件指针。
- 已发现的治理契约和不变量基线。
- 双重引用规则和规范输出契约作为强制输出契约。
- 分配子代理角色:。
Mutation & Architecture Reviewer (<Target Slice/Subsystem>)
Phase 3: Synthesis & Turn-Halt Gate (Fan-in)
阶段3:汇总与回合暂停门(扇入)
- Reconcile and deduplicate subagent findings into the Canonical Output Contract.
- Compute the definitive Executive Verdict (only if all slices pass; downgrade to
PASSorCONDITIONALbased on highest defect severity).FAIL - Emit the report into the conversation stream and halt turn immediately.
- 将子代理发现汇总并去重到规范输出契约中。
- 计算最终执行结论(仅当所有切片通过时才是;根据最高缺陷严重性降级为
PASS或CONDITIONAL)。FAIL - 将报告输出到对话流中,并立即暂停回合。