workbench-closeout-validator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Workbench Closeout Validator

Workbench收尾验证器

Use this skill when reviewing or automating status-changing closeout comments for Workbench, Multica, Capy, Conductor, Hermes, Codex, Linear, Slack, or PR surfaces.
The validator is anti-LGTM infrastructure: it preserves the literal verdict and stops adapters from turning a
FLAG
closeout into
PASS
or
Done
.
当你需要审核或自动化处理Workbench、Multica、Capy、Conductor、Hermes、Codex、Linear、Slack或PR界面中更改状态的收尾评论时,可使用此技能。
该验证器是反LGTM的基础架构:它保留字面裁决结果,阻止适配器将
FLAG
收尾状态转换为
PASS
Done

Required Input Shape

必填输入格式

Status-changing closeout must contain these headings in this order:
text
CHANGED:
VERIFIED:
REMAINING:
PRS / LINKS:
VERDICT: PASS | FLAG | BLOCK
REMAINING:
is mandatory even when
(none)
.
更改状态的收尾评论必须按以下顺序包含这些标题:
text
CHANGED:
VERIFIED:
REMAINING:
PRS / LINKS:
VERDICT: PASS | FLAG | BLOCK
即使内容为
(none)
REMAINING:
也是必填项。

Local Validator

本地验证器

Use the strict parser, not free-form prose matching:
bash
node scripts/workbench-closeout-validator.mjs \
  --comment-file <closeout.md> \
  --target-status "Done" \
  --references-json <references.json> \
  --affected-issues-json <affected-issues.json>

node scripts/test-workbench-closeout-validator.mjs
For Linear webhook or adapter events, use the audit-only wrapper:
bash
node scripts/workbench-closeout-audit-linear-adapter.mjs \
  --event-file <linear-closeout-event.json>

node scripts/test-workbench-closeout-audit-linear-adapter.mjs
The adapter emits
WORKBENCH_CLOSEOUT_AUDIT
and a sanitized follow-up payload. It must not block, revert, or rewrite Linear status transitions.
Reference records use this public-safe shape:
json
[
  { "type": "contains", "id": "#24", "state": "merged" },
  { "type": "dogfood-platform", "id": "#25" },
  { "type": "discovered-via", "id": "#26" },
  { "type": "cross-issue-side-effect", "id": "SYN-40" }
]
Affected issue records use:
json
[
  { "id": "SYN-39", "remaining_synced": true },
  { "id": "SYN-40", "remaining_synced": false }
]
请使用严格解析器,而非自由格式文本匹配:
bash
node scripts/workbench-closeout-validator.mjs \
  --comment-file <closeout.md> \
  --target-status "Done" \
  --references-json <references.json> \
  --affected-issues-json <affected-issues.json>

node scripts/test-workbench-closeout-validator.mjs
对于Linear webhook或适配器事件,请使用仅审计包装器:
bash
node scripts/workbench-closeout-audit-linear-adapter.mjs \
  --event-file <linear-closeout-event.json>

node scripts/test-workbench-closeout-audit-linear-adapter.mjs
适配器会发送
WORKBENCH_CLOSEOUT_AUDIT
事件以及经过清理的后续负载。它不得阻止、回退或重写Linear状态转换。
引用记录采用以下公开安全格式:
json
[
  { "type": "contains", "id": "#24", "state": "merged" },
  { "type": "dogfood-platform", "id": "#25" },
  { "type": "discovered-via", "id": "#26" },
  { "type": "cross-issue-side-effect", "id": "SYN-40" }
]
受影响问题记录格式如下:
json
[
  { "id": "SYN-39", "remaining_synced": true },
  { "id": "SYN-40", "remaining_synced": false }
]

Validation Rules

验证规则

  • Done
    requires
    VERDICT: PASS
    ;
    FLAG
    or
    BLOCK
    cannot move to Done.
  • Blocked
    requires
    VERDICT: BLOCK
    .
  • Ready for Merge
    may carry
    PASS
    or
    FLAG
    , but not
    BLOCK
    .
  • contains
    references require merged or head-on-main proof.
  • dogfood-platform
    ,
    discovered-via
    , and
    cross-issue-side-effect
    references do not require merge proof by themselves.
  • If one closeout affects multiple issues and
    REMAINING:
    is not
    (none)
    , relevant remaining lines must be synced to every affected issue description or comment.
  • Done
    状态要求
    VERDICT: PASS
    FLAG
    BLOCK
    无法转换为Done状态。
  • Blocked
    状态要求
    VERDICT: BLOCK
  • Ready for Merge
    状态可携带
    PASS
    FLAG
    ,但不能是
    BLOCK
  • contains
    类型的引用需要已合并或主分支头部的证明。
  • dogfood-platform
    discovered-via
    cross-issue-side-effect
    类型的引用本身不需要合并证明。
  • 如果一个收尾操作影响多个问题且
    REMAINING:
    内容不为
    (none)
    ,相关剩余内容行必须同步到每个受影响问题的描述或评论中。

Failure Handling

故障处理

Validator failures do not silently rewrite the issue status. They emit
WORKBENCH_CLOSEOUT_VALIDATION
with:
  • validator_verdict: BLOCK
    for malformed fields, verdict/status mismatch, or invalid
    contains
    references;
  • validator_verdict: FLAG
    for missing cross-issue sync proof or missing reference-state proof;
  • follow_up_required: true
    when audit trail work must be spawned.
Live adapters should create a
FLAG
follow-up issue and notify Supervisor instead of hiding the failure.
验证器故障不会静默重写问题状态。它会发送
WORKBENCH_CLOSEOUT_VALIDATION
事件,包含:
  • validator_verdict: BLOCK
    :用于格式错误的字段、裁决/状态不匹配或无效的
    contains
    引用;
  • validator_verdict: FLAG
    :用于缺失跨问题同步证明或缺失引用状态证明;
  • follow_up_required: true
    :当需要生成审计跟踪任务时。
实时适配器应创建一个
FLAG
后续问题并通知Supervisor,而非隐藏故障。