Repository navigation
Conversation
… を限定付与する (#1734) issue-author の tools に Skill を追加し、frontmatter の skills: フィールド({create-issue, edit-issue} の exact set)を Claude Code 実行系ネイティブの Agent-local deterministic dispatcher として使う。 Agent 本文から create/edit Skill と重複する transaction helper の 直接呼び出し手順・schema 列挙を削除し、authoring role・入力契約・ Create/Edit 選択条件・許可 Skill・failure routing・compact output の みを残す thin 化を行った。nested Skill invocation 禁止と nested SubAgent invocation(#998 issue-contract-fixer 等)が別概念である ことを明記し、#995 の FAIL_CLOSED_REWRITE_CONSTRAINTS_V1 と #1909 の context_bundle_path 由来の input/output contract は保持した。 AC1/AC2/AC5/AC6/AC8/AC10/AC11 は .claude/agents/tests に追加した 静的 pytest で検証済み。AC4 は既存の scripts/agent-guards/tests/test_issue_content_update_guard_parity.py で確認済み(新規実装なし)。AC3/AC7/AC9 の runtime smoke は scripts/agent-ops/run_worktree_agent_runtime_smoke.py を worktree 内で実行したが、インストール済み claude CLI(2.1.220)が runner の 必須フラグ `--max-turns` を `-p` モードでサポートしておらず、 preflight が SKIP(exit 77)を返した。SKIP は PASS ではないため 昇格せず、runner 側の pre-existing 非互換として PR 本文に記録する。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
Preview URLPreview removed (PR #1961 closed). |
…する (#1734) - issue-author.md の raw gh issue mutation 説明を非リテラル表現へ書き換え、 edit-issue の cross-file contract test(forbidden substring 集合)を満たす - test_issue_author_skill_gate.py の AC8 negative test を同じ非リテラル方針に 合わせ、cross-file contract との矛盾を解消する - .github/ci/python-test-plan.json の targets へ .claude/agents/tests/ を 登録する(Scope Delta: node-backed-hook-tests の uncovered_changed_test_files gate 解消のための registration-only 追加)
PR Body Japanese Check が docs/dev/agent-skill-boundaries.md の新設見出し 「Skill capability gate(Agent-local deterministic dispatcher)」で 日本語比率不足(ratio=0.021)により FAIL していたため、見出しを 「Skill 能力ゲート(Agent ローカルな決定論的ディスパッチャー)」に 言い換えて比率を閾値以上(ratio=0.605)に引き上げる。意味は変更しない。 Closes #1734
thin 化で issue-refinement-loop の cross-file contract test (test_issue_author_consumes_readiness_forwarding_payload) が要求する 必須文字列が issue-author.md から欠落し CI python-test-core が FAIL していた。 #995/#1909 由来の caller-input contract と同様、READINESS_FORWARDING_PAYLOAD_V1 の消費契約は Outcome が保持を求める input contract のため復元する。 見出しは AC5 が禁ずる旧見出し文字列と衝突しないよう言い換えた。 Closes #1734
impl-review-loop 最終判定Mergeability: mergeable=MERGEABLE, merge_state_status=CLEAN
Blockers: なし verdict: APPROVE
reviewed_head_sha: "151bf8233f98b799e3294dfc38c9ac413308a48d"
blockers: []
warnings:
- "ALLOWED_PATHS_GATE: .github/ci/python-test-plan.json は Issue #1734 本文の Allowed Paths 外。Scope Delta(Issue comment)で解消済み。"impl-review-loop ルーティング: |
you askedmessage time: 2026-08-02 13:49:41 #1961 chatgpt responsePR本文・差分・レビュー履歴・関連Issue/PR・CI・リポジトリ内契約を照合し、実装の前提を外部一次資料で検証します。最終的に、重大度順の指摘とマージ可否を分けて提示します。 現時点で、PR本文自身が AC3・AC7・AC9 未達を明示し、head SHA の更新後も本文中の検証 SHA が古い状態です。次に、変更後ファイル実体とレビュー・CIを突き合わせ、単なる報告不備か設計上の欠陥かを切り分けます。 一次資料で中心設計の誤りを確認しました。Claude Code 公式仕様では 判定REQUEST_CHANGES。現状のままマージ不可です。 P0-1.
|
* feat(agents): issue-author を issue-creator/issue-editor に分割する (#1734) `issue-author` に `Skill` tool + `skills:` allowlist を実行時アクセス制御として 追加する当初設計(PR #1961)は Claude Code 公式ドキュメントにより preload 専用と 判明し破棄された。代わりに `issue-author` を `issue-creator`(create-issue のみ preload)と `issue-editor`(edit-issue のみ preload)に分割し、両 Agent とも `Skill` tool 自体を持たない(`tools: [Read, Bash]`)ことで nested Skill invocation の不可能性を frontmatter の静的検証だけで技術的に証明可能にする。 - `.claude/agents/issue-creator.md` / `issue-editor.md` を新設 - `.claude/agents/issue-author.md` を薄い deprecated stub に変換(完全削除は Sibling Child #1952 マージ後の follow-up。tests/fixtures/codex-agent-config/ expected-runtime-contract.json は不変のため test_agent_parity.py:: TestB4RealRepoParity は無改修で継続 green) - `issue-refinement-loop` Step 4 の invoke_issue_author 系 action を invoke_issue_editor に改名、`post-merge-cleanup` / `impl-review-loop` Step 5 の follow-up Issue 起票委譲先を issue-creator に repoint - `docs/dev/agent-skill-boundaries.md` の issue-author 参照を issue-creator / issue-editor に更新 - `tests/fixtures/agent-parity/ok-claude-issue-author.md` を ok-claude-issue-creator.md / ok-claude-issue-editor.md に分割 - `.claude/agents/tests/` に AC1-AC12 相当の frontmatter/契約/runtime smoke テストを追加(AC7 runtime smoke は claude CLI 2.1.220 の --max-turns 未対応 により SKIP exit 77 を実証、PASS への昇格なし) - Scope Delta: issue-author.md の内容移動に伴い壊れる既存テスト 3 本 (test_readiness_forwarding_contract.py / test_fail_closed_override_rewrite.py / test_edit_issue_txn.py)を同一 skill ディレクトリ内で追従修正 Closes #1734 Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix(ci): PR #1974 の required CI 2 件を修正する(Issue #1734 fix_delta) - PR Body Japanese Check: `.claude/agents/issue-author.md` の `## DEPRECATED` 見出しが日本語比率 0 で per-block 判定に fail していたため `## 廃止(DEPRECATED)` に改訂(意味は不変)。同時に、この修正で初めて Japanese Check の走査対象になった `tests/fixtures/agent-parity/ ok-claude-issue-creator.md` / `ok-claude-issue-editor.md` (未参照の agent-parity fixture、`tests/test_agent_parity.py` からは 参照されない)にも同様に日本語併記を追加。 - node-backed-hook-tests: `.claude/agents/tests/` が `.github/ci/python-test-plan.json` の `targets` に未登録で `uncovered_changed_test_files` として fail していたため、既存 entry のスタイルに合わせてディレクトリを追加登録(Scope Delta: Issue #1734 の Allowed Paths 外だが、同一パターンの既存運用に倣う ルーチン修正)。 Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: post-merge-cleanup-boundary checker の hardcoded issue-author 文字列を issue-creator に追従 main の post-merge-cleanup orchestrator/executor 分割(#1733/#1947)が `issue-author SubAgent に委譲して create-issue skill 経由で起票` を follow-up materialization ownership の hardcoded marker としてテストしていたが、 本 PR(#1974, Issue #1734)の issue-creator/issue-editor split により post-merge-cleanup/SKILL.md 側の文言は `issue-creator` へ改名済み。 checker のマーカー文字列を追従させ、両立させる。 Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: PR #1974 REQUEST_CHANGES 対応(Issue #1734 fix_delta 3) AC7 の runtime smoke が issue-editor を実際の Agent persona として起動して いなかった不備を修正する。run_worktree_agent_runtime_smoke.py に後方互換の 追加専用フラグ --claude-agent-name を新設し、指定時のみ claude サブプロセス に --agent <name> を挿入する(未指定時の既存呼び出しは無変更、56件の既存 テスト全pass で確認済み)。test_issue_editor_runtime_smoke.py はこのフラグを issue-editor で使うよう更新した。 AC9・disposition matrix #998 行が「nested SubAgent invocation は妨げない」 と誤って主張していた問題を修正する。issue-creator.md / issue-editor.md は どちらも disallowedTools: [Agent, ...] を持つため、nested Skill invocation と nested SubAgent invocation の両方が構造的に不可能であることを本文に明記 し、対応する pytest assertion を修正後の主張に合わせて更新した。 AC13: agent_ops_inventory.py の issue-refinement / issue-refinement-ops-review エントリを issue-author.md から issue-creator.md / issue-editor.md へ更新する。 AC14: follow-up-materialization.md の child materialization 委譲先を issue-author から issue-creator へ更新する。 AC1-AC4: exact-set frontmatter テストを bare set() 比較から sorted() 比較 + 重複検知(len(tools) == len(set(tools)))へ強化する。 Closes #1734 * fix(issue-refinement-loop): follow-up-materialization.md の見出しを日本語併記化 PR Body Japanese Check の per-block しきい値(0.1)を満たさない4見出し (英語のみの Markdown heading)を、既存の日本語+英語括弧併記の慣例に 合わせて修正する。見出し文言のみの変更であり、本文の意味・手順は 変更しない。 Refs #1734 --------- Co-authored-by: Claude Sonnet 5 <[email protected]>
Summary
issue-author(Claude Code)にSkilltool を追加し、Agent frontmatter のskills:フィールド({create-issue, edit-issue}の exact set)を、Claude Code 実行系がネイティブに評価する Agent-local deterministic dispatcher として使う。宣言されていない Skill 名(未知 Skill・nested Skill invocation を含む)への Skill tool 呼び出しは実行時に拒否される。Agent 本文からは create-issue / edit-issue Skill と重複する transaction helper 直接呼び出し手順・schema 列挙(旧edit_issue_txn.py直接呼び出しフロー、readiness_forwarding_payloadの全フィールド列挙、helper result の terminal routing 詳細)を削除し、authoring role・入力契約・Create/Edit 選択条件・許可 Skill・failure routing・compact output のみを残す thin 化を行った。本 PR は Issue #1734 の実装であり、Closes #1734 とする。
受け入れ条件の達成状況
toolsがBash/Read/Skillの exact set であることを、.claude/agents/tests/test_issue_author_skill_gate.py::test_frontmatter_tools_exact_set(strict YAML frontmatter parser、yaml.safe_load)で確認し、PASS した。skills:フィールド、Claude Code 実行系ネイティブの Skill tool allowlist gate)の許可 Skill 集合が{create-issue, edit-issue}の exact set であることを、test_dispatcher_allows_only_create_and_edit_skillで確認し、PASS した。scripts/agent-ops/run_worktree_agent_runtime_smoke.pyを実行して確認しようとしたが、インストール済みclaudeCLI(2.1.220)が runner のpreflight_claude_flags()が要求する--max-turnsフラグを-p構造化モードでサポートしておらず、SKIP(exit 77)で終了した。SKIP は PASS に昇格していない(Runtime Verification Applicability のfallback_success_is_pass: false/ skip_conditions に従う)。runner 側の CLI バージョン非互換は本 Issue の Allowed Paths(runner script は対象外)の外にあるため本 PR では修正していない。下記「Runtime Smoke 実行結果(正直な報告)」を参照。gh issue create/gh issue editが既存の controlled executor/PreToolUse hookchain で拒否されることを、既存のscripts/agent-guards/tests/test_issue_content_update_guard_parity.py::test_shared_classifier_allows_executor_and_denies_raw_title_edit(新規実装なし)で確認し、PASS した。## 既存Issue更新フロー・## readiness_forwarding_payload 契約・## fail-closed terminal result の確認項目セクション)が削除されていることを、test_agent_body_removes_duplicated_skill_proceduresで確認し、PASS した。## Create/Edit 選択条件見出し配下に明記されていることを、rg -n "^## Create/Edit 選択条件" .claude/agents/issue-author.mdで確認し、PASS した。SKIP(exit 77)。詳細は下記参照。test_unknown_skill_nested_skill_raw_cli_negative_expectations_documented(-k "unknown_skill or nested_skill_invocation or raw_cli_mutation"で 1 件マッチ)で確認し、PASS した。SKIP(exit 77)。詳細は下記参照。FAIL_CLOSED_REWRITE_CONSTRAINTS_V1転送)と 実装: SubAgent 発火前に bounded local context bundle を生成し Claude/Codex の両 loop で consume する #1909(context_bundle_path由来の input/output contract の forward-compat 保持)を保持していることを、test_body_retains_fail_closed_rewrite_and_context_bundle_contractsで確認し、PASS した。issue-contract-fixer呼び出しを妨げないことが Agent 本文に明記されていることを、test_nested_skill_vs_nested_subagent_invocation_distinguishedとrg -n "nested SubAgent invocation" .claude/agents/issue-author.mdで確認し、PASS した。Runtime Smoke 実行結果(正直な報告、AC3/AC7/AC9)
3 本の runtime smoke prompt(
tmp/runtime-smoke/issue-author-unknown-skill-negative.md/issue-author-validator-smoke.md/issue-author-create-edit-positive.md、いずれも untracked)を用意し、worktree 内でscripts/agent-ops/run_worktree_agent_runtime_smoke.py --runtime claude --mode structuredを 3 回実行した。いずれも同一の preflight 結果になった。同一の SKIP を
issue-author-validator-smoke.md(AC7)、issue-author-create-edit-positive.md(AC9、--inspect-session-log-metadata付与)でも確認した。原因はインストール済みclaudeCLI(claude --version=2.1.220 (Claude Code))の-p構造化モードが--max-turnsフラグを提供していないこと(claude --helpに該当フラグが存在しない)で、runner 側preflight_claude_flags()の pre-existing 前提と実行系バージョンの不整合である。SKIP は PASS へ昇格させていない。runner script(scripts/agent-ops/run_worktree_agent_runtime_smoke.py)は Issue #1734 の Allowed Paths 外であり、本 PR では修正しない。CLI バージョン互換性の是正またはフラグ要件緩和は follow-up 課題として人間判断を要する。Schema Change Applicability
本変更の分類は以下の通りである。
.claude/agents/issue-author.mdの frontmatter(tools/skills/disallowedTools等)は Claude Code 実行系が直接解釈するネイティブ設定であり、本 repo が定義・バージョニングする JSON/YAML スキーマ(docs/dev/agent-skill-boundaries.mdに列挙される*_V1系スキーマ群)には該当しない。skills:フィールドの追加は Agent 定義ファイル単体のフィールド追加であり、他の consumer が消費する構造化スキーマの変更ではない。Schema Consumer Inventory
not_schema_changeのため対象なし)Safety Claim Matrix
validate_pr_body.pyの safety-sensitive パスパターンにはauthが含まれ、.claude/agents/issue-author.mdのファイル名(issue-author)が部分一致するため safety-sensitive PR として扱う(実際の認証・認可システムの変更ではない)。issue-authorが呼び出せる Skill は{create-issue, edit-issue}の exact set に限定される(Agent-local deterministic dispatcher).claude/agents/tests/test_issue_author_skill_gate.py::test_dispatcher_allows_only_create_and_edit_skillPASSissue-authorのtoolsは{Bash, Read, Skill}の exact set であり、Agent/Edit/MultiEdit/Writeは disallowedTools のまま維持されるtest_frontmatter_tools_exact_set/test_disallowed_tools_still_blocks_agent_edit_multiedit_writePASSgh issue create/gh issue editの production use は本 dispatcher の対象外で、既存 controlled executor/PreToolUse hookchain(別レイヤー)が拒否するscripts/agent-guards/tests/test_issue_content_update_guard_parity.py::test_shared_classifier_allows_executor_and_denies_raw_title_editPASS(新規実装なし)run_worktree_agent_runtime_smoke.pyがSKIP(exit 77、--max-turns未サポート)。SKIP は PASS に昇格させていない検証コマンド結果
すべて current code head
ebc18a5fで独立実行した。Checks
テスト・lint・diff check の実行結果は上記「検証コマンド結果」に集約した。
Allowed Paths 遵守
.claude/agents/issue-author.md.claude/agents/tests/test_issue_author_skill_gate.py(新規)docs/dev/agent-skill-boundaries.md.github/ci/python-test-plan.json(コミットf67dcf89)。targets配列へ.claude/agents/tests/を1行追加する registration-only な変更であり、CI のnode-backed-hook-testsjob のuncovered_changed_test_filesgate(新規テストディレクトリの登録が必須)を満たすために必要だった。Scope Delta の詳細は Issue 実装: issue-author を issue-creator/issue-editor に分割し実行時に真である Skill 権限境界を実装する #1734 のコメントを参照: 実装: issue-author を issue-creator/issue-editor に分割し実行時に真である Skill 権限境界を実装する #1734 (comment)tmp/runtime-smoke/*.md)と evidence 出力先(artifacts/runtime-smoke/*)は repo-untracked の worktree-local 作業領域(.gitignoreの/tmp//artifacts/ルールに従う)であり、commit に含めていない。Notes
.github/ci/python-test-plan.jsonへの.claude/agents/tests/登録(コミットf67dcf89)は Scope Delta として Issue 実装: issue-author を issue-creator/issue-editor に分割し実行時に真である Skill 権限境界を実装する #1734 のコメント(上記リンク)で明記した上で実施済みである。新規追加した AC1/AC2/AC5/AC6/AC8/AC10/AC11 検証テストを CI required job の対象集合に含めるための registration-only な追加であり、他フィールド・他ターゲットへの変更は含まない。--max-turns要件と現行claudeCLI の実際のフラグ互換性の是正は follow-up 実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を --help 非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する #1960 で追跡する。