Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "issue-refinement-loop が live title に implementation consumer prefix が無いまま title_prefix_ready: true / refinement_approved を発行し、直後の impl-review-loop が metadata_not_ready で停止する cross-loop false-ready を再発防止する"
change_kind: workflow
dedupe_key: "follow-up:issue-refinement-loop:title-prefix-live-readback-false-ready"Source / Reproducer
Issue #2771 の refinement 完了時に、最新の終了コメントは以下を報告した。
termination_reason: approvedLOOP_HANDOFF_RESULT_V1.status: refinement_approvedmetadata.title_prefix_ready: trueauto_fixes.required: []blockers: []
Source comment:
#2771 (comment)
一方、同コメント投稿後の live Issue #2771 title は:
再発防止: Runtime Verification profile の全 assertion を Issue VC に binding して readiness で検証する
であり、実装: / implement: prefix を持たない。
current .claude/skills/impl-review-loop/steps/preparation.md と
.claude/skills/impl-review-loop/scripts/build_intake_capsule.py は title prefix を
implementation consumer の authoritative readiness 条件として扱い、prefix 欠落時は
metadata_not_ready / title_prefix_ok: false となる。なお
phase/implementation label は #2084 以降 presentation-only であり代替 authority ではない。
これは #626 / #628 が意図した「issue-refinement-loop 成功後、追加の人間 Y なしで
impl-review-loop intake ready に到達する」契約の回帰である。#628 は closed 済みで、
repository-wide issue/PR search ではこの live-title false-ready を扱う open duplicate は
確認できなかった。
Outcome
issue-refinement-loop の approved termination / handoff が、
live Issue title と矛盾する metadata.title_prefix_ready: true を発行できないようにする。
implementation Issue の title prefix が不足している場合は、既存の controlled mutation /
metadata hygiene repair lane を再利用して 実装: または implement: へ決定論的に正規化し、
mutation 後の live readback で prefix を確認してからだけ
refinement_approved / title_prefix_ready: true を発行する。
mutation が permission / transport / readback failure で完了しない場合は false-ready にせず、
bounded retry 後に machine-readable blocker を返す。phase label の存在だけで
title_prefix_ready を true にしてはならない。
In Scope
- approved termination 直前の live title readback と consumer-ready prefix 判定を deterministic にする。
metadata.title_prefix_readyを live title または成功済み metadata-hygiene mutation + readback からのみ導出する。- prefix 欠落時は既存 repair executor / controlled GitHub mutation lane を再利用し、新しい broad write path を追加しない。
- repair 成功後に live title を再取得し、実際の title が
実装:/implement:で始まることを確認する。 - repair 失敗・readback mismatch 時は
refinement_approvedを禁止し、明示的 reason code を返す。 - 実装: 再発防止: Runtime Verification profile の全 assertion を Issue VC に binding して readiness で検証する #2771 型 regression fixture を追加する:
- implementation body +
phase/implementationlabel + prefix 欠落 - stale/inaccurate
title_prefix_ready: trueを許可しない - repair 成功後のみ handoff success
- implementation body +
- issue-refinement-loop terminal producer と impl-review-loop intake consumer の cross-loop parity regression を追加する。
- 実装: issue-refinement-loop の terminal contract を LOOP_HANDOFF_RESULT_V1.status: impl_ready に固定する #628 の no-extra-human-approval goal を維持する。
Out of Scope
phase/implementationlabel を readiness authority に戻すこと。- title prefix requirement 自体を削除すること。
- semantic Issue contract / AC / scope の rewrite。
- 新規の汎用 GitHub mutation executor の追加。
- 実装: 再発防止: Runtime Verification profile の全 assertion を Issue VC に binding して readiness で検証する #2771 の Runtime Verification assertion binding 実装そのもの。
Acceptance Criteria
- AC1: live title が
実装:/implement:で始まらない implementation Issue について、repair 未実施のままLOOP_HANDOFF_RESULT_V1.metadata.title_prefix_ready: trueを発行できない。 - AC2: prefix 欠落時、既存 controlled metadata-hygiene route を用いて prefix を補正し、mutation 後の live readback が一致した場合のみ
title_prefix_ready: true/refinement_approvedへ進める。 - AC3:
phase/implementationlabel が存在しても title prefix 欠落を隠蔽しない regression test が PASS する。 - AC4: mutation permission failure / transport failure / readback mismatch は bounded retry 後に machine-readable blocker となり、false-ready を発行しない。
- AC5: 実装: 再発防止: Runtime Verification profile の全 assertion を Issue VC に binding して readiness で検証する #2771 の観測状態(implementation label あり、title prefix なし、refinement result が ready と自己申告)を fixture 化し、fix 前 failure / fix 後 pass を再現する。
- AC6: issue-refinement-loop の success output を impl-review-loop intake の title-prefix predicate に渡した cross-loop contract test で、producer success なら consumer が
metadata_not_readyにならないことを確認する。 - AC7: 導入: issue-refinement-loop → impl-review-loop 遷移の自動化(スキル間 handoff contract 欠落の統合修正) #626 / 実装: issue-refinement-loop の terminal contract を LOOP_HANDOFF_RESULT_V1.status: impl_ready に固定する #628 の「機械的 metadata hygiene では追加人間承認を要求しない」方針を維持し、semantic rewrite や permission boundary change は導入しない。
Verification Commands
実装時に current test layout を確認して最小の focused tests を選ぶこと。少なくとも以下の領域を含める。
uv run --locked pytest .claude/skills/issue-refinement-loop/tests/ -q
uv run --locked pytest .claude/skills/impl-review-loop/tests/test_intake_gate.py -q新規 cross-loop regression test を追加した場合は、その test file を明示的に実行する VC を追加する。
Allowed Paths
- .claude/skills/issue-refinement-loop/SKILL.md
- .claude/skills/issue-refinement-loop/references/termination-policy.md
- .claude/skills/issue-refinement-loop/scripts/**
- .claude/skills/issue-refinement-loop/tests/**
- .claude/skills/impl-review-loop/tests/**
- docs/dev/workflow.md
Stop Conditions
- title prefix 正規化に新規 broad GitHub write permission / permission-mode 変更が必要になる場合。
- semantic Issue contract の意味変更が必要になる場合。
- impl-review-loop 側の title prefix requirement 自体を変更しないと解決できない場合。
- 上記 Allowed Paths 外の production authority を変更する必要が判明した場合。
Required Design References
- Issue 導入: issue-refinement-loop → impl-review-loop 遷移の自動化(スキル間 handoff contract 欠落の統合修正) #626
- Issue 実装: issue-refinement-loop の terminal contract を LOOP_HANDOFF_RESULT_V1.status: impl_ready に固定する #628
- Issue 実装: issue-refinement-loop の approved 終了時に triage-required ラベル遷移を実行する #2084
- Issue 実装: 再発防止: Runtime Verification profile の全 assertion を Issue VC に binding して readiness で検証する #2771
- 実装: 再発防止: Runtime Verification profile の全 assertion を Issue VC に binding して readiness で検証する #2771 (comment)
.claude/skills/issue-refinement-loop/references/termination-policy.md.claude/skills/impl-review-loop/steps/preparation.md.claude/skills/impl-review-loop/scripts/build_intake_capsule.pydocs/dev/workflow.md
Notes for Reviewer
本件は label sync の問題ではない。#2084 の方針どおり label は presentation-only のままとし、
producer の terminal claim を consumer が実際に読む live title predicate と一致させることが目的。
body hash freshness だけでは title drift / title omission を検出できないため、approved termination の
metadata readiness は body-only fingerprint と分離して live title を直接 readback する。
Activity
squne121 commentedon Oct 10, 2026
追加再現例: Issue #3004(2026-10-10)
#2776 と同じ cross-loop false-ready が #3004 の refinement 終端でも観測されました。
LOOP_HANDOFF_RESULT_V1: 実装: 再発防止 — contract snapshot 自己投稿直後の updatedAt 時差による false-stale を防ぐ #3004 (comment)metadata.title_prefix_ready: true/status: refinement_approved/blockers: []を報告。再発防止: contract snapshot 自己投稿直後の updatedAt 時差による false-stale を防ぐであり、consumer の必須 prefix実装:/implement:を満たしません。.claude/skills/impl-review-loop/steps/preparation.mdは、prefix 欠落をintake_gate_failed: metadata_not_readyとして扱います。したがって終了 marker 単独では Step 1 を authorize できず、refinement approved が implementation-ready metadata を保証していません。#3004 の通常実装着手前には既存 metadata-hygiene route でタイトルを
実装: ...に正規化し、live title readback を確認してください。Issue body / AC / VC をこのために再書換えする必要はありません。#2776 の回帰テストには #2771 に加えて #3004 型のrefinement_approved + false title_prefix_readyを追加し、修正はこの Issue の既存スコープで扱うのが適切です。重複する新規 Issue は不要です。