Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .claude/skills/impl-review-loop/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ implementation child issue を **実装 → 検証 → PR レビュー** の 3
## Inputs

- `issue_number`(必須): implementation child issue 番号
- `contract_snapshot_url`(任意、省略時は preparation ステップで自動取得): `issue-contract-review` で `status: go` を返したコメントの URL。未提供の場合は preparation ステップが Issue コメントから `CONTRACT_REVIEW_RESULT_V1 status: go` コメントを自動検出する(存在すれば採用、なければ `issue-contract-review` を自動呼び出し)
- `contract_snapshot_url`(任意、省略時は preparation ステップで検出): `issue-contract-review` で `status: go` を返したコメントの URL。未提供の場合は preparation ステップが Issue コメントから `CONTRACT_REVIEW_RESULT_V1 status: go` コメントを自動検出する(存在すれば採用)。`status: go` コメントが見つからない場合は `intake_gate_failed: missing_contract_go` として停止し、人間に contract-review の実行を依頼する(fail-only gate — 自動実行・自動 materialization は行わない)
- `max_iterations`(任意、デフォルト 3): 上限回数。超過時は fail-close で人間判断を仰ぐ

## Loop Structure
Expand Down Expand Up @@ -57,7 +57,7 @@ implementation child issue を **実装 → 検証 → PR レビュー** の 3
LOOP_STATE:
issue_number: <int>
contract_snapshot_url: <URL>
contract_snapshot_source: provided | detected_existing | materialized_by_issue_contract_review
contract_snapshot_source: provided | detected_existing
iteration: <int, 0-indexed>
max_iterations: 3
worktree: .claude/worktrees/issue-<番号>-<slug>
Expand Down Expand Up @@ -102,13 +102,15 @@ preparation step で取得した contract snapshot 内の以下の情報を Step

`checks.product_spec_check` を contract snapshot から読み取り、Step 1 delegation 前に `LOOP_STATE.product_spec_preflight` に正規化して格納する。以下のルールに従う:

- `checks.product_spec_check` が snapshot に存在しない場合は stale / incomplete snapshot として `refresh_contract_snapshot` へ route(`issue-contract-review` 再実行)
> **注意**: `refresh_contract_snapshot` へ route する場合は **route only; no auto-run** — AI が `issue-contract-review` を自動実行してはならない。停止して人間に `issue-contract-review` の再実行を依頼する。

- `checks.product_spec_check` が snapshot に存在しない場合は stale / incomplete snapshot として `refresh_contract_snapshot` へ route する(route only; no auto-run — 停止して人間に `issue-contract-review` の再実行を依頼する)
- `applicability == not_applicable && decision == pass` の場合のみ、無関係 Issue として `continue` へ継続
- `applicability == not_applicable && decision != pass` は inconsistent snapshot として `refresh_contract_snapshot` へ route
- `applicability == not_applicable && decision != pass` は inconsistent snapshot として `refresh_contract_snapshot` へ route する(route only; no auto-run)
- `decision == fail` → fail-closed で停止、`routing_action: stop_human`
- `decision == human_judgment` → 人間判断へ escalate、`routing_action: stop_human`
- `decision == pass` かつ `applicability == applicable` → 続行、`routing_action: continue`
- 不正な enum 値 → stale / invalid snapshot として `refresh_contract_snapshot` へ route
- 不正な enum 値 → stale / invalid snapshot として `refresh_contract_snapshot` へ route する(route only; no auto-run)

**実装例**: `.claude/skills/impl-review-loop/scripts/evaluate_product_spec_gate.py` が mutation-free CLI として `PRODUCT_SPEC_GATE_DECISION_V1` を出力する(routing_action: continue | stop_human | refresh_contract_snapshot)。

Expand Down
Loading