verification-contract

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Verification Contract (internal)

验证契约(内部)

Single owner of the delivery finish line. Planning freezes it; executors may strengthen coverage but cannot move it; review checks the same bytes.
交付终点的唯一所有者。规划阶段将其固化;执行人员可强化覆盖范围,但不得改动;评审阶段检查完全相同的字节内容。

Artifact

工件

Every new feature/fix carries
ACCEPTANCE.md
beside its SPEC. Copy the matching repository template. Required parts:
Status: frozen
; one stable ID per SPEC criterion;
Required outcome
; named
Validator
; literal quality floor; project commands. Prefer commands, otherwise use
read-verified: <evidence>
or
manual: <exact observation>
. Unlabelled prose is invalid. A planned test may name its future project runner; it cannot substitute a narrower runner later.
每个新功能/修复都需在其SPEC旁附带
ACCEPTANCE.md
。复制匹配的仓库模板。必填部分:
Status: frozen
;每个SPEC标准对应一个稳定ID;
Required outcome
;指定
Validator
;明确的质量底线;项目命令。优先使用命令,否则使用
read-verified: <evidence>
manual: <exact observation>
。无标签的散文内容无效。计划中的测试可指定未来的项目运行器;后续不能替换为范围更窄的运行器。

Freeze and receipt

固化与回执

At first execution run
git hash-object <unit>/ACCEPTANCE.md
and append to the unit progress file:
text
undefined
首次执行时,运行
git hash-object <unit>/ACCEPTANCE.md
并将结果追加到单元进度文件中:
text
undefined

Acceptance receipt v1

Acceptance receipt v1

  • Manifest: <path> · Blob: <sha> · Status: frozen · Verified: <date>

Before every phase and final review, recompute it. Exact match continues;
missing/mismatched evidence stops before edits:

```text
ACCEPTANCE GATE — <unit> BLOCKED
Expected blob: <sha|missing> · Actual: <sha|missing>
Reason: the frozen finish line is missing or changed.

→ Next: restore the frozen manifest, or obtain explicit user approval for a
  SPEC amendment and replacement manifest; then write a fresh receipt
  · never edit tests, commands, or acceptance to make the current candidate pass
A legitimate change requires, in order: explicit user approval; dated SPEC
## Amendments
row; replacement manifest; committed fresh receipt. The executor never self-authorizes it.
Legacy unit with no manifest mention: fingerprint committed
SPEC.md
and record
Manifest: legacy SPEC.md
. A new plan or any plan naming the manifest fails closed when it is missing.
  • Manifest: <path> · Blob: <sha> · Status: frozen · Verified: <date>

在每个阶段开始前和最终评审前,重新计算哈希值。完全匹配则继续;证据缺失/不匹配则在编辑前终止:

```text
ACCEPTANCE GATE — <unit> BLOCKED
Expected blob: <sha|missing> · Actual: <sha|missing>
Reason: the frozen finish line is missing or changed.

→ Next: restore the frozen manifest, or obtain explicit user approval for a
  SPEC amendment and replacement manifest; then write a fresh receipt
  · never edit tests, commands, or acceptance to make the current candidate pass
合法变更需按以下顺序进行:明确的用户批准;标注日期的SPEC
## Amendments
条目;替换后的契约文件;提交新的回执。执行人员不得自行批准变更。
未提及契约文件的遗留单元:为已提交的
SPEC.md
生成指纹,并记录
Manifest: legacy SPEC.md
。当契约文件缺失时,新计划或任何提及契约文件的计划将默认失败。

Validation ladder

验证阶梯

Evaluate every row plus the normal project gate:
  • PASS
    : commands green; read evidence present; manual checks named.
  • FAIL
    : validator disproves the candidate; include compact failure evidence.
  • NEEDS-DECISION
    : missing product/architecture choice.
  • BLOCKED
    : command/input/environment unavailable; name it.
评估每一行内容以及常规项目门禁:
  • PASS
    :命令执行成功;读取的证据存在;已指定人工检查项。
  • FAIL
    :验证器否决候选内容;需包含简洁的失败证据。
  • NEEDS-DECISION
    :缺少产品/架构决策。
  • BLOCKED
    :命令/输入/环境不可用;需明确指出。

Anti-gaming rules

防规避规则

Forbidden: deleting, skipping, narrowing, or loosening a validator; suppression, stub, hard-coded answer, or no-op fix used to manufacture green. A command cannot prove an untested read/manual row. Stronger regression tests are allowed. Repair test setup only when assertions stay at least as strong and the reason is logged.
禁止以下行为:删除、跳过、缩小或弱化验证器;使用压制、存根、硬编码答案或无操作修复来伪造成功结果。命令无法证明未测试的读取/人工检查项。允许更强的回归测试。仅当断言强度至少保持不变且原因已记录时,才可修复测试设置。

Done when

完成标准

Frozen manifest + current blob receipt + named validators + literal quality floor; executor and reviewer evaluate identical bytes.
固化的契约文件 + 当前数据块回执 + 指定的验证器 + 明确的质量底线;执行人员和评审人员评估完全相同的字节内容。