Skip to content

実装: オーケストレーション skill 内 bash を scripts/ 集約 + .claude/settings allowlist 整備で permission prompt を削減する #31

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "オーケストレーション skill 内 bash を scripts/ 集約 + .claude/settings allowlist 整備で permission prompt を削減する"
change_kind: workflow

Parent Issue

なし(単独改善)

Parent Goal Ref

  • Goal: オーケストレーション skill(edit-issue / post-merge-cleanup / create-issue)の実行中に発生する permission prompt を削減し、自律ループの中断を最小化する
  • Desired Destination: 各 skill の inline bash が .py / .sh script に集約され、uv run python3 .claude/skills/<name>/scripts/*.py * パターン 1 つで approve 完結する状態

Current Validated Scope

  • .claude/skills/edit-issue/scripts/backup-and-parse-issue.py 新規作成(gh view --json + jq + redirect 集約、subprocess 配列形式・入力 validation 必須)
  • .claude/skills/edit-issue/scripts/guard-issue-body.py 新規作成(Template Guard / Outcome Guard / diff threshold / AC-VC alignment 集約)
  • .claude/skills/edit-issue/SKILL.md 修正(inline gh / jq / grep / awk / heredoc / redirect を削除し、scripts entrypoint 経由に統一)
  • .claude/skills/post-merge-cleanup/scripts/classify-git-state.py 新規作成(git status / git stash / git branch -vv の YAML 出力集約)
  • .claude/skills/post-merge-cleanup/SKILL.md 修正(scripts entrypoint 経由統一)
  • .claude/skills/create-issue/scripts/verify-anchors.sh 新規作成(anchor preflight 集約)
  • .claude/skills/create-issue/SKILL.md 修正(scripts entrypoint 経由統一)
  • .claude/settings.json(repo-tracked / 共有)に最小限の共有 allowlist エントリ(scripts entrypoint パターン + safe read-only git 系)を追加し、ask / deny の境界を明示
  • docs/dev/github-ops.md に「scripts 集約による permission 削減パターン」+「.claude/settings.local.json 個人用推奨設定例」を追記

Remaining Parent Gaps

  • SubAgent definition file の tools / permissionMode 分離(read-only 系 / write 系 / cleanup 系)→ 別 Issue で起票予定
  • .claude/settings.local.json の各開発者ローカル更新(成果物ではなくドキュメント例として誘導)
  • fewer-permission-prompts skill の改修(別 Issue 候補)
  • background subagent 導入時の allowlist 整備(別 Issue 候補)

Background

Issue #14 コメント(#issuecomment-4488167427、人間指摘)において、edit-issue / post-merge-cleanup 等のオーケストレーション skill 実行中に gh / grep / awk / cat > heredoc 等の bash コマンドが .claude/settings.json / .claude/settings.local.json の allowlist に未登録のため、毎回 permission prompt が発生することが報告された。

現状調査結果(codebase-investigator が gemini-cli-headless-delegation で実施済み)

  • .claude/settings.json: deny のみ、allow は空
  • .claude/settings.local.json: 4 エントリのみ(pnpm build / Read gemini config / env / gemini --version)
  • SubAgent(issue-author / codebase-investigator / pr-reviewer / implementation-worker / post-merge-cleanup-worker)は全て tools: [Bash, Read] で粒度の細かい制限なし
  • create_issue_txn.py / open_pr.py / match-ssot.sh は集約済みで approve 1 回パターンの参考実装
  • edit-issue Step 1-4 / post-merge-cleanup Step 1-3 は bash inline のため集約未済

推奨方針

scripts 集約 + allowlist 短縮(プロファイル 2):

  1. inline bash を .py / .sh script に集約する
  2. .claude/settings.json(共有)の permissions.allow を scripts entrypoint パターンで更新する
  3. .claude/settings.local.json は成果物に含めず、docs/dev/github-ops.md に個人用推奨設定例として記載する

削減効果想定

  • edit-issue 1 ループ 3-5 prompt → 1 prompt

関連

参考: 集約後の allowlist 案(.claude/settings.json 共有設定)

"allow": [
  "Bash(pnpm build *)", "Bash(pnpm typecheck)", "Bash(pnpm lint)", "Bash(pnpm test)",
  "Bash(uv run python3 .claude/skills/edit-issue/scripts/*.py *)",
  "Bash(uv run python3 .claude/skills/post-merge-cleanup/scripts/*.py *)",
  "Bash(uv run python3 .claude/skills/create-issue/scripts/*.py *)",
  "Bash(uv run python3 .claude/skills/open-pr/scripts/*.py *)",
  "Bash(.claude/skills/ssot-discovery/scripts/*.sh *)"
]

Outcome

edit-issue / post-merge-cleanup / create-issue の Step 内 inline bash が .py / .sh script に集約され、各 script は subprocess.run([...]) の配列形式で固定コマンドのみを実行し、外部入力は allowlist validation される実装になっている。.claude/settings.json(共有設定)に scripts entrypoint パターンと safe read-only 系の最小 allow / ask / deny が追加され、docs/dev/github-ops.md に scripts 集約パターンと .claude/settings.local.json 個人用設定例が記載されたコミットが main にマージされ、pnpm typecheck && pnpm lint && pnpm test && pnpm build が PASS している状態。

In Scope

  • .claude/skills/edit-issue/scripts/backup-and-parse-issue.py 新規作成
  • .claude/skills/edit-issue/scripts/guard-issue-body.py 新規作成
  • .claude/skills/edit-issue/SKILL.md 修正(inline bash 削除・scripts entrypoint 統一)
  • .claude/skills/post-merge-cleanup/scripts/classify-git-state.py 新規作成
  • .claude/skills/post-merge-cleanup/SKILL.md 修正
  • .claude/skills/create-issue/scripts/verify-anchors.sh 新規作成
  • .claude/skills/create-issue/SKILL.md 修正
  • .claude/settings.json(共有)の最小 permissions.allow / ask / deny 更新
  • docs/dev/github-ops.md 追記(scripts 集約パターン + .claude/settings.local.json 個人用設定例)

Out of Scope

  • .claude/settings.local.json のコミット(個人用ローカル設定のため成果物に含めない。代わりに docs/dev/github-ops.md に推奨例として記載)
  • SubAgent definition file(issue-author / codebase-investigator / implementation-worker / pr-reviewer / post-merge-cleanup-worker)の tools / permissionMode 分離(別 Issue で起票予定)
  • fewer-permission-prompts skill の改修
  • create_issue_txn.py / open_pr.py の再改修(既存集約参考実装はそのまま)
  • background subagent モードへの移行
  • permissionMode: bypassPermissions / auto 採用(公式は隔離環境推奨のためこのプロジェクトでは非採用)

Acceptance Criteria

  • AC1: test -f .claude/skills/edit-issue/scripts/backup-and-parse-issue.py が exit 0 を返す
  • AC2: test -f .claude/skills/edit-issue/scripts/guard-issue-body.py が exit 0 を返す
  • AC3: test -f .claude/skills/post-merge-cleanup/scripts/classify-git-state.py が exit 0 を返す
  • AC4: test -f .claude/skills/create-issue/scripts/verify-anchors.sh が exit 0 を返す
  • AC5: .claude/settings.json の permissions.allow に uv run python3 .claude/skills/edit-issue/scripts パターンが含まれる
  • AC6: 既存全 pytest PASS
  • AC7: scripts は subprocess.run([...]) の配列形式で固定コマンドのみ実行し、任意 shell command 文字列を引数で受け取らない(grep -n "shell=True" .claude/skills/*/scripts/ がヒット 0 件)
  • AC8: scripts の外部入力(issue number / path / branch 等)は allowlist validation を通している(issue number は ^\d+$、branch 名は ^[A-Za-z0-9._/-]+$ 等の regex で検証)
  • AC9: edit-issue / post-merge-cleanup / create-issue の SKILL.md から inline の gh / jq / grep / awk / heredoc / redirect が削除され、scripts entrypoint 経由に統一されている
  • AC10: .claude/settings.local.json は .gitignore で除外され、docs/dev/github-ops.md に個人用設定例セクションが存在する

Verification Commands

  • test -f .claude/skills/edit-issue/scripts/backup-and-parse-issue.py && echo PASS || echo FAIL — AC1
  • test -f .claude/skills/edit-issue/scripts/guard-issue-body.py && echo PASS || echo FAIL — AC2
  • test -f .claude/skills/post-merge-cleanup/scripts/classify-git-state.py && echo PASS || echo FAIL — AC3
  • test -f .claude/skills/create-issue/scripts/verify-anchors.sh && echo PASS || echo FAIL — AC4
  • uv run python3 -c "import json; d=json.load(open('.claude/settings.json')); allows=' '.join(d.get('permissions',{}).get('allow',[])); print('PASS' if 'uv run python3 .claude/skills/edit-issue/scripts' in allows else 'FAIL')" — AC5
  • cd .claude && python3 -m pytest tests/ -q && echo PASS || echo FAIL — AC6
  • ! grep -rn "shell=True" .claude/skills/edit-issue/scripts/ .claude/skills/post-merge-cleanup/scripts/ .claude/skills/create-issue/scripts/ && echo PASS || echo FAIL — AC7
  • grep -rnE "re\.fullmatch|re\.match|^\^\\\\d|allowlist" .claude/skills/edit-issue/scripts/ .claude/skills/post-merge-cleanup/scripts/ .claude/skills/create-issue/scripts/ && echo PASS || echo FAIL — AC8
  • ! grep -nE "^[^#]*\b(jq |awk |<<EOF|<<'EOF')" .claude/skills/edit-issue/SKILL.md .claude/skills/post-merge-cleanup/SKILL.md .claude/skills/create-issue/SKILL.md && echo PASS || echo FAIL — AC9
  • grep -q "settings.local.json" .gitignore && grep -q "個人用" docs/dev/github-ops.md && echo PASS || echo FAIL — AC10

Allowed Paths

  • .claude/skills/edit-issue/scripts/backup-and-parse-issue.py
  • .claude/skills/edit-issue/scripts/guard-issue-body.py
  • .claude/skills/edit-issue/SKILL.md
  • .claude/skills/post-merge-cleanup/scripts/classify-git-state.py
  • .claude/skills/post-merge-cleanup/SKILL.md
  • .claude/skills/create-issue/scripts/verify-anchors.sh
  • .claude/skills/create-issue/SKILL.md
  • .claude/settings.json(共有設定の最小 allow / ask / deny 追加)
  • .gitignore(.claude/settings.local.json 除外行追加)
  • docs/dev/github-ops.md

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • scripts 集約により既存 skill の動作互換が失われた場合(SKILL.md の手順と script の挙動が食い違う、または既存 pytest が失敗に転じた場合)

Required Skills

  • Python 3 / uv
  • bash scripting
  • Claude Code permission model(allowlist ワイルドカード構文)

Scope Delta(任意)

N/A

Delivery Rule

1 Issue = 1 PR。feature ブランチ feat/skill-scripts-allowlist で作業し、Draft PR として開始する。

Notes

Activity

  1. added
    enhancement
    phase/implementation
    state/queued
    agent/implementer
    on May 19, 2026
  2. squne121 commented on May 19, 2026

    @squne121
    OwnerAuthor

    以下の推奨に従って .claude/settings.json での修正を成果物にする。
    最終提案 を採用してissueを修正して。

    you asked

    message time: 2026-05-19 23:00:00

    #31
    ClaudeCodeの仕様について調べて。
    エージェントスキル実行中、サブエージェント作業中の人間承認を最小限化する方法を英語・中国語・日本語から検索して教えて。


    chatgpt response

    調査します。まずIssue #31の内容を確認し、その上でClaude Codeの公式仕様を優先し、英語・中国語・日本語圏の運用知見は補助資料として扱います。

    Issue #31の方向性は概ね妥当ですが、すでに1点だけ仕様上のリスクが見えています。.claude/settings.local.json は公式には個人ローカル用・非共有の設定なので、PR成果物として扱うなら設計を少し分けた方が安全です。

    結論

    Issue #31 の「inline bash を scripts/ に集約し、permissions.allow を短い script 実行パターンに寄せる」方針は、Claude Code の仕様上かなり筋が良いです。Issue本文でも、目的は edit-issue / post-merge-cleanup / create-issue の実行中に出る gh / grep / awk / cat > heredoc 等の permission prompt を減らすことだと整理されています。(GitHub)

    ただし、修正すべき点があります。

    .claude/settings.local.json をPR成果物にする設計は避けるべきです。 公式仕様では .claude/settings.local.json は「このリポジトリ内のあなたのみ」に効くローカル設定で、チェックインされない個人設定用です。共有・PR成果物にするなら .claude/settings.json、個人最適化なら .claude/settings.local.json と docs/dev/... の例示に分けるのが正しいです。(Claude)


    Claude Code の仕様確認

    Claude Code の権限は、モデルの指示ではなく Claude Code 側で強制されます。CLAUDE.md やプロンプトで「承認なしでやって」と書いても権限は変わらず、/permissions、settings の permissions、permission mode、PreToolUse hook などで制御します。(Claude)

    基本挙動は以下です。Read / Grep などの読み取り系は原則承認不要、Bash は承認が必要、Edit / Write は承認が必要です。allow は確認なしで許可、ask は確認要求、deny は拒否で、評価順は deny -> ask -> allow です。(Claude)

    Bash allowlist は glob の * を使えますが、* はスペースを含む任意列にマッチします。たとえば Bash(git * main) は git push origin main にもマッチし得るため、GitHub / Git / script interpreter 周辺で雑な wildcard を置くのは危険です。compound command は &&, ;, |, 改行などで分解され、各サブコマンドが個別に許可される必要があります。(Claude)

    Skill については、現行公式仕様では SKILL.md の allowed-tools は「その skill が active な間、指定ツールを承認なしで使えるようにする」機能です。ただし、これはその skill の実行中に限った許可で、未記載のツールは通常の permission settings に従います。また、project skill の allowed-tools は workspace trust 後に効くため、信頼していないリポジトリで broad な allowed-tools を持つ skill を受け入れるのはリスクです。(Claude)

    Subagent は独立した context window で動作し、デフォルトでは親会話のツールを継承します。tools で許可ツールを限定でき、disallowedTools で拒否ツールを外せます。さらに subagent ごとに permissionMode を設定でき、default, acceptEdits, auto, dontAsk, bypassPermissions, plan が指定可能です。(Claude)

    重要なのは background subagent です。foreground subagent は permission prompt を人間に渡しますが、background subagent は既に許可済みの権限だけで動き、prompt が必要な tool call は自動拒否されます。したがって、background subagent の承認負荷を減らすには「事前 allowlist」が必須で、未整備のまま background 化すると、静かに失敗しやすくなります。(Claude)


    Issue #31 に対する評価

    Issue #31 の scripts 集約は、承認回数削減には有効です。gh view, jq, grep, awk, heredoc, redirect などを SKILL.md の inline bash から消し、.claude/skills/<skill>/scripts/*.py や .sh に寄せれば、Claude Code から見える Bash call は「決まった script を呼ぶ1コマンド」になります。これは permission prompt の削減に直結します。

    ただし、これはセキュリティ境界を「Claude Code のコマンドごとの承認」から「script 自体のコードレビュー」に移します。公式仕様上、Read/Edit deny は Claude Code が認識する built-in file tools や一部 Bash file commands には効きますが、Python / Node などの subprocess が内部で読む・書くファイルまでは一般に制御できません。つまり Bash(uv run python3 .claude/skills/.../*.py *) を許可すると、その Python script の実装品質が安全境界になります。(Claude)

    したがって、Issue #31 はこの形に修正するのがよいです。

    {
      "permissions": {
        "defaultMode": "acceptEdits",
        "allow": [
          "Skill(edit-issue *)",
          "Skill(post-merge-cleanup *)",
          "Skill(create-issue *)",
    
          "Bash(uv run python3 .claude/skills/edit-issue/scripts/*.py *)",
          "Bash(uv run python3 .claude/skills/post-merge-cleanup/scripts/*.py *)",
          "Bash(.claude/skills/create-issue/scripts/*.sh *)",
    
          "Bash(pnpm typecheck)",
          "Bash(pnpm lint)",
          "Bash(pnpm test)",
          "Bash(pnpm build)",
    
          "Bash(git status *)",
          "Bash(git diff *)",
          "Bash(git branch *)"
        ],
        "ask": [
          "Bash(git commit *)",
          "Bash(git push *)",
          "Bash(gh pr merge *)",
          "Bash(gh issue edit *)"
        ],
        "deny": [
          "Read(.env)",
          "Read(**/.env)",
          "Read(//**/.env)",
          "Read(./secrets/**)",
          "Bash(curl *)",
          "Bash(wget *)",
          "Bash(rm -rf *)",
          "Bash(git push origin main)",
          "Bash(gh repo delete *)"
        ]
      }
    }

    ただし、上記を .claude/settings.local.json に置くなら個人運用、.claude/settings.json に置くならリポジトリ共有運用です。Issue #31 のPRで .claude/settings.local.json 更新をACにするのは不自然なので、次のどちらかに寄せるべきです。

    1. 個人運用案
      .claude/settings.local.json はPR対象から外す。代わりに docs/dev/github-ops.md に推奨設定例を書く。

    2. 共有運用案
      .claude/settings.json に最小 allow / ask / deny を置く。ただし project skill が tool access を持つため、workspace trust 前提で危険な broad permission は避ける。


    scripts 集約時の実装ルール

    script 側では以下を必須にしてください。

    まず、shell=True や任意コマンド文字列の連結を禁止します。subprocess.run([...], check=True) の配列形式に固定します。issue_number は ^\d+$、branch 名は ^[A-Za-z0-9._/-]+$ のように validation します。

    次に、script の引数を「業務パラメータ」に限定します。たとえば backup-and-parse-issue.py 31 は許可しても、backup-and-parse-issue.py --cmd "gh ..." のような escape hatch は作らない方がよいです。

    また、script 内で実行する gh, git, jq 相当の処理は固定化します。gh issue edit のような破壊的・外部状態変更系は、script 内でも「対象Issue番号」「変更対象フィールド」「差分サイズ」「テンプレート整合性」を検証してから実行する形にしてください。

    最後に、SKILL.md には「inline bash禁止」「複数コマンドを && で繋がない」「必ず scripts/ の entrypoint を呼ぶ」「script 失敗時は修正せず停止条件に従う」をMUSTとして明記するべきです。日本語圏の実践記事でも、SKILL.md は人間向け説明ではなくエージェント実行制御の設計書として、禁止パターンを具体例付きで書くのが有効だとされています。(Adsholoko)


    Subagent 作業中の承認最小化

    Subagent は Issue #31 の Out of Scope になっていますが、承認削減の本丸です。次の役割分離がよいです。

    codebase-investigator / pr-reviewer / issue-author は基本的に read-only に寄せます。

    ---
    name: codebase-investigator
    description: Investigates codebase context and returns concise findings.
    tools: Read, Grep, Glob, Bash
    permissionMode: dontAsk
    ---
    Use Bash only for pre-approved read-only commands such as git status, git diff, and test listing.
    Never edit files.

    implementation-worker だけ Edit, Write, Bash を持たせます。ただし、自由な Bash ではなく、pnpm typecheck/lint/test/build と skill scripts のみを通す構造にします。

    ---
    name: implementation-worker
    description: Implements a fixed GitHub Issue contract within allowed paths.
    tools: Read, Grep, Glob, Edit, Write, Bash
    permissionMode: acceptEdits
    disallowedTools: Agent
    ---
    Only modify files listed in the issue contract.
    Use project scripts for orchestration. Do not run ad-hoc gh/git destructive commands.

    post-merge-cleanup-worker は Git 状態確認や cleanup が必要なので Bash が必要ですが、git stash, git branch -D, gh pr merge, git push などを直接許可しない方がよいです。cleanup 判定は script 化し、実際の破壊的操作は ask に残すのが安全です。

    Background subagent を使う場合、許可不足は prompt ではなく auto-deny になります。したがって、最初は foreground で不足 allowlist を洗い出し、安定後に background にする運用がよいです。(Claude)


    Auto mode / bypassPermissions は採用すべきか

    bypassPermissions は承認をほぼ全スキップしますが、公式は container / VM のような隔離環境でのみ使うべきだとしています。.git, .claude, .vscode, .husky への書き込みも通るため、通常のWSL2プロジェクトで常用するのは推奨しません。(Claude)

    auto mode は中間案です。Anthropic は file reads, grep, code navigation などの安全系を built-in allowlist に置き、危険性のある shell / external tool / protected write などを classifier に回す設計を説明しています。ただし auto mode に入ると、任意コード実行に近い broad shell access、wildcarded script interpreters、package manager run commands などの permission rules は落とされる場合があります。つまり、Issue #31 の uv run python3 .../*.py * パターンを auto mode 前提にすると不安定になり得ます。(Anthropic)

    したがって、このプロジェクトでは auto / bypassPermissions に依存せず、default または acceptEdits + narrow allowlist + scripts 集約 + deny + hooks が妥当です。


    最終提案

    Issue #31 は実装価値があります。ただし、以下のように直すべきです。

    変更するべき点

    • .claude/settings.local.json をPR成果物にしない。
    • PR成果物は scripts/、SKILL.md、docs/dev/github-ops.md、必要なら .claude/settings.json の最小共有設定に限定する。
    • .claude/settings.local.json は docs/dev/github-ops.md に「個人用推奨設定例」として記載する。
    • script 集約は維持する。
    • script 内 validation を Acceptance Criteria に追加する。
    • Subagent は別Issueでよいが、read-only系 / write系 / cleanup系に tools と permissionMode を分離する。

    Issue #31 のAC追加案

    - AC7: scripts は任意 shell command 文字列を受け取らず、subprocess.run([...]) の配列形式で固定コマンドのみ実行する。
    - AC8: issue number / path / branch 等の外部入力は allowlist validation される。
    - AC9: SKILL.md から inline gh / jq / grep / awk / heredoc / redirect を削除し、scripts entrypoint 経由に統一する。
    - AC10: `.claude/settings.local.json` はコミット対象にせず、docs/dev/github-ops.md に個人用設定例として記載する。

    この方針なら、人間承認は「初回 skill 実行」「script entrypoint」「危険なGitHub/Git操作」だけに残り、日常の調査・編集・検証ループはかなり止まりにくくなります。

  3. squne121 commented on May 19, 2026

    @squne121
    OwnerAuthor

    edit-issue: 本文更新ログ (2026-05-19T14:21:02Z)

    変更されたセクション

    • Current Validated Scope: subprocess 配列形式・入力 validation 必須の記述を追加、settings.json(共有)への変更方針を明記
    • Remaining Parent Gaps: SubAgent tools/permissionMode 分離(別 Issue 予定)、settings.local.json ドキュメント誘導、background subagent 整備を追記
    • 推奨方針: settings.json(共有)を使う方針に更新
    • Outcome: script 安全性要件(subprocess 配列形式 + validation)と settings.json 共有設定更新を明記
    • In Scope: settings.local.json → settings.json(共有)に変更、.gitignore 追加
    • Out of Scope: settings.local.json のコミット除外を明示、background subagent / permissionMode 採用除外を追加
    • Acceptance Criteria: AC1-6 を維持し AC7-10(script 安全性 / 共有性)を追加(6 → 10 件)
    • Verification Commands: AC7-10 に対応する VC を追加(6 → 10 行)
    • Allowed Paths: settings.local.json を除外し settings.json と .gitignore を追加
    • Notes(新規): 採用方針の出典・設計根拠・follow-up 起票予定を記載

    変更理由

    Issue #31 #issuecomment-4488579930(人間指摘)の最終提案を採用。.claude/settings.local.json は公式仕様では個人ローカル用・非共有設定であり PR 成果物として不適切であるため、共有設定 .claude/settings.json へ変更し、個人用設定例は docs/dev/github-ops.md に記載する方針に更新。

    検証結果

    • Template Guard: PASS
    • Outcome Quality Guard: PASS
    • 差分閾値: ORIG=158 行 / NEW=176 行(増加のため PASS)
    • AC/VC 番号一致: PASS(AC=10, VC注記=10)
  4. squne121 commented on May 19, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop: 完了 (2026-05-19T15:30:00Z)

    • iteration: 0 (Iter 0 で即 approve)
    • verdict: approve
    • termination_reason: approved
    • 採用方針: #issuecomment-4488579930 chatgpt 「最終提案」

    主要な変更

    領域 変更
    Allowed Paths .claude/settings.local.json を削除し、共有設定 .claude/settings.json と .gitignore を追加
    Out of Scope settings.local.json のコミット / SubAgent tools 分離 / bypassPermissions / auto を明示的に除外
    Outcome scripts は subprocess.run([...]) 配列形式 + 外部入力 allowlist validation 必須を要求
    AC 6 件 → 10 件(AC7: shell=True 禁止 / AC8: 入力 validation / AC9: SKILL.md から inline bash 除去 / AC10: settings.local.json gitignore + docs 個人用例)
    VC AC7-10 に対応する - prefix 形式 grep ベース VC を追加
    Notes 公式仕様根拠(code.claude.com/docs/ja/settings)と最終提案出典を明記

    review-issue 結果

    • C1〜C8 全 pass、blocking 0 件
    • AC7 VC の baseline 0 ヒット FAIL は Critical Guard により誤検知扱い(実装後に PASS する設計)

    派生起票

    次アクション

    • 着手前に issue-contract-review skill で preflight
    • 実装は 1 Issue = 1 PR で feature ブランチ作成 → Draft PR

    🤖 issue-refinement-loop (no-human-approval mode)

  5. squne121 commented on May 19, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-05-19T16:05:00Z)

    • Outcome: edit-issue / post-merge-cleanup / create-issue の inline bash が scripts に集約され、subprocess.run([...]) 配列形式 + 外部入力 allowlist validation、.claude/settings.json 共有 allow、docs/dev/github-ops.md 個人用例まで揃った状態
    • Acceptance Criteria: AC1〜AC10(10 件)
    • Verification Commands: AC1〜AC10 に対応する 10 行(- prefix)
    • Allowed Paths:
      • .claude/skills/edit-issue/scripts/backup-and-parse-issue.py
      • .claude/skills/edit-issue/scripts/guard-issue-body.py
      • .claude/skills/edit-issue/SKILL.md
      • .claude/skills/post-merge-cleanup/scripts/classify-git-state.py
      • .claude/skills/post-merge-cleanup/SKILL.md
      • .claude/skills/create-issue/scripts/verify-anchors.sh
      • .claude/skills/create-issue/SKILL.md
      • .claude/settings.json
      • .gitignore
      • docs/dev/github-ops.md
    • Worktree: .claude/worktrees/issue-31-skill-bash-scripts-claude-settings-allow
    • Branch: worktree-issue-31-skill-bash-scripts-claude-settings-allow

    VC preflight 結果

    • baseline fail = 8 (AC1, AC2, AC3, AC4, AC5, AC7 dir 不在, AC9 inline bash 残存, AC10 docs 未追記)
    • 想定外 pass = 0
    • 実行不可 = 1 (AC6: pytest 未インストール + .claude/tests/ 不在)

    Warnings

    • AC6 VC は実行不可: cd .claude && python3 -m pytest tests/ は (a) .claude/tests/ 不在、(b) base python に pytest なし、で baseline 実行不可。実装フェーズで以下のいずれかが必要:
      • .claude/skills/gemini-cli-headless-delegation/tests 等 既存 skill 内 pytest を回す形に VC を修正
      • uv run --with pytest python -m pytest 形式で uv に揃える
      • VC を make test / 専用 runner script に置き換える
    • 上記は contract 上の軽微な欠陥のため、implementation-worker に「AC6 VC を実行可能な形式へ補修すること」を申し送り

    開発フロー適合性

    項目 判定
    Template compliance pass (必須 13 セクション揃い)
    state label pass (state/queued)
    Allowed Paths present pass
    VC present pass (10 行)
    Stop conditions complete pass (7 項目)
    AC verifiability pass (10 件 - [ ] 形式)
    AC ⇔ VC 番号一致 pass (10 = 10)
    Worktree/branch collision clear

    判定

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      next_action: implement_issue
      blocked_reasons: []
      warnings:
        - "AC6 VC は実行不可(pytest 未インストール + .claude/tests/ 不在)。implementation-worker が VC を実行可能な形式に補修すること。Stop Conditions の『既存テスト大規模改変』には該当しない軽微な VC 修正の範囲。"

    → implement-issue / impl-review-loop への handoff 可能。

  6. squne121 commented on May 19, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-05-19T14:44:51Z)

    • PR: feat: オーケストレーション skill bash を scripts/ 集約 + allowlist 整備 #37
    • Worktree: .claude/worktrees/issue-31-skill-bash-scripts-claude-settings-allow
    • Branch: worktree-issue-31-skill-bash-scripts-claude-settings-allow
    • Verification: pnpm typecheck/lint/test/build PASS, AC1-AC5/AC7-AC8/AC10 PASS, AC6/AC9 は VC 品質問題による PARTIAL(PR Notes 参照)
    • 後続: PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup
  7. squne121 commented on May 19, 2026

    @squne121
    OwnerAuthor

    edit-issue: 本文更新ログ (2026-05-19T15:07:42Z)

    変更されたセクション

    • Verification Commands — AC5 VC、AC9 VC の 2 行を書き換え
    • Notes — 末尾に追記

    変更理由

    人間追加指示 (#issuecomment-4489050087): python3 → uv run python3 統一方針の確定と、AC9 VC の過広問題(gh 単体捕捉)を pr-reviewer 指摘に基づき tighten。

    検証結果

    • Template Guard: PASS
    • Outcome Quality Guard: PASS
    • 差分閾値: ORIG=177 行 / NEW=178 行(+1 行)
    • AC/VC 番号一致: PASS(AC=10 / VC=10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/implementerenhancementphase/implementationstate/queued

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions