Repository navigation
Closed
Labels
agent/researchHandled by research agentphase/researchResearch phase issuestate/queuedQueued for implementation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: research
parent_issue: "#776"
goal_ref: "Codex repo-shared skill entrypoint は `.agents/skills/*/SKILL.md`、Claude project skill entrypoint は `.claude/skills/*/SKILL.md` とし、shared body / thin wrapper / symlink の portable policy を ADR で確定して #776 / #780 の後続実装判断を固定する"
change_kind: research-onlyParent Issue
Outcome
docs/adr/agent-skill-surface-sharing.md に、Codex/Claude の skill surface 境界、.codex/skills を repo-shared surface にしない理由、portable shared-body policy、#381 非前例性が明文化され、#776 / #780 の後続 implementation issue が同じ前提で起票・実装できる状態。
In Scope
- Codex repo-shared skill entrypoint を
.agents/skills/*/SKILL.md、Claude project skill entrypoint を.claude/skills/*/SKILL.mdとする surface policy を ADR に整理する .codex/skills/を第二の repo-shared skill surface として導入しない理由を ADR に明記する- shared skill body で許可する portable subset と、platform wrapper / companion file に残す metadata 境界を定義する
- directory symlink /
SKILL.mdfile symlink / thin wrapper を分けて扱い、portable 性が未証明な場合の default policy を整理する #381が session-recording-policy 固有 concern であり、general precedent ではないことを明記する- 実装: Codex custom agent の repo-local skill surface を .agents/skills に統一する #776 / 実装: .codex/agents の check-codex-agents.mjs 既存 failure を解消する #780 が後続実装で参照できる decision record にする
Out of Scope
.agents/skills/**の実装追加.codex/agents/*.tomlの thin runtime contract 実装変更.claude/skills/**の本文移設や大規模 rewrite.codex/skills/を実ディレクトリとして導入すること- session-recording-policy の実装変更
Acceptance Criteria
- AC1:
docs/adr/agent-skill-surface-sharing.mdが作成されている - AC2: ADR に Codex repo-shared skill entrypoint は
.agents/skills/*/SKILL.md、Claude project skill entrypoint は.claude/skills/*/SKILL.mdであることと、.codex/skills/を第二の repo-shared skill surface として導入しない方針が書かれている - AC3: ADR に directory symlink /
SKILL.mdfile symlink / thin wrapper を区別した portability policy と、portable 性未証明時は thin wrapper default とする方針が書かれている - AC4: ADR に shared skill body の portable subset と、Claude-only / Codex-only metadata を shared body へ入れない boundary が書かれている
- AC5: ADR に
#381が session-recording-policy 固有の separate concern であり、本方針の precedent ではないことが書かれている - AC6: ADR に 実装: Codex custom agent の repo-local skill surface を .agents/skills に統一する #776 / 実装: .codex/agents の check-codex-agents.mjs 既存 failure を解消する #780 の後続実装が参照すべき validator / runtime contract 連携方針が書かれている
Verification Commands
# AC1
$ test -f docs/adr/agent-skill-surface-sharing.md
# AC2
$ rg -n "\\.agents/skills/\\*/SKILL\\.md|\\.claude/skills/\\*/SKILL\\.md|\\.codex/skills/.*repo-shared.*(not|禁止|使わない)" docs/adr/agent-skill-surface-sharing.md
# AC3
$ rg -n "directory symlink|file symlink|thin wrapper|Windows|WSL|GitHub Actions|worktree" docs/adr/agent-skill-surface-sharing.md
# AC4
$ rg -n "portable subset|Claude-only|Codex-only|allowed-tools|dynamic context|agents/openai.yaml|platform-specific" docs/adr/agent-skill-surface-sharing.md
# AC5
$ rg -n "#381.*(separate concern|precedent ではない|precedentではない)|session-recording-policy.*(別 concern|separate concern)" docs/adr/agent-skill-surface-sharing.md
# AC6
$ rg -n "#776|#780|validator|runtime contract|runtime_dependency_status: codex_skill_required" docs/adr/agent-skill-surface-sharing.mdAllowed Paths
- docs/adr/agent-skill-surface-sharing.md
Stop Conditions
- Outcome / Scope / AC が検索可能な形で記載されていない場合は即停止
- Allowed Paths 外への書き込みを試みた場合は即停止
- 権限不足(permission denied)により操作が完了できない場合は即停止
- 成果物の書き込みに失敗した場合(I/O エラー等)は即停止
.codex/skills/を repo-shared skill surface として導入しないと成立しない結論しか得られない場合は即停止- symlink portability の結論に実機検証が必須で、本 issue の research-only 契約だけでは decision を閉じられない場合は follow-up 分離で停止
Handoff Contract
- Current Objective
- Codex/Claude の skill surface 境界と shared-body portable policy を ADR に固定し、実装: Codex custom agent の repo-local skill surface を .agents/skills に統一する #776 / 実装: .codex/agents の check-codex-agents.mjs 既存 failure を解消する #780 の implementation 前提をそろえる
- Bounded Current Context
- 実装: Codex custom agent の repo-local skill surface を .agents/skills に統一する #776 は Codex repo-local skill surface を
.agents/skills/に統一する implementation issue - 実装: .codex/agents の check-codex-agents.mjs 既存 failure を解消する #780 は
.codex/agents/*.tomlの thin runtime contract 化を扱う implementation issue .codex/skills/は repo-shared skill surface として current repo reality / current official docs の正本ではない#381は session-recording-policy 固有 concern であり、general skill surface policy の precedent ではない
- 実装: Codex custom agent の repo-local skill surface を .agents/skills に統一する #776 は Codex repo-local skill surface を
- Open Questions
- directory symlink を許容する場合の portability 証明をどこまで要求するか
SKILL.mdfile symlink を default 禁止にするか、follow-up 実証でのみ解禁するか
- Next Action
- ADR を根拠に、実装: Codex custom agent の repo-local skill surface を .agents/skills に統一する #776 / 実装: .codex/agents の check-codex-agents.mjs 既存 failure を解消する #780 の implementation issue と follow-up validator issue が同じ surface policy を参照できる状態にする
- Artifact Refs
- 実装: Codex custom agent の repo-local skill surface を .agents/skills に統一する #776
- 実装: .codex/agents の check-codex-agents.mjs 既存 failure を解消する #780
- 実装: Codex CLI 用 session-recording-policy Skill (.agents/skills/) を Claude 版と SSOT 重複なく整備する #381
- 調査: Claude/Codex agent skill surface の shared-body policy を ADR 化する #779 (comment)
Runtime Verification Applicability
- decision: not_applicable
- reason: 本 issue は ADR による research / decision record の固定が成果物であり、必要な検証は文書の静的整合確認のみで完結するため
Metadata
Metadata
Assignees
Labels
agent/researchHandled by research agentphase/researchResearch phase issuestate/queuedQueued for implementation
Activity
squne121 commentedon Jun 11, 2026
判定
REQUEST CHANGES。#779 は、このまま実装させると誤った surface を正本化する危険が高いです。
最大の問題は、#779 が
.codex/skills/*/SKILL.mdを shared skill body の symlink/thin wrapper として扱う方針を ADR 化しようとしている点です。#779 の goal/outcome/AC はすべて.codex/skills/*/SKILL.md前提ですが、親 Issue #776 は Codex 側の repo-local skill surface を.agents/skills/に統一し、.codex/skills/を第二の repo-shared surface として導入しないことを明記しています。([GitHub]1)公式ドキュメント上も、Codex の repo skill discovery は
.agents/skillsであり、Claude Code の project skill は.claude/skills/<skill-name>/SKILL.mdです。.codex/skillsは少なくとも今回確認した Codex 公式 skill discovery surface ではありません。([OpenAI Developer]2)確認できた関連状況
#779 自体は research-only で、Allowed Paths は
docs/adr/agent-skill-surface-sharing.mdのみです。現時点で #779 に linked branch / PR / relationship は表示されていません。([GitHub]1)親の #776 は、Codex custom agent が
.claude/skills依存のまま残っている状態を解消し、.agents/skills/を repo-shared skill surface として扱う設計です。AC でも.agents/skills/*/SKILL.mdの存在、.codex/agents/*.tomlのruntime_dependency_status: codex_skill_required、.gitignoreから/.codex/skillsignore ルールを残さないこと、docs に.agents/skillsと.claude/skillsの役割分離を書くことが要求されています。([GitHub]3)#780 は
.codex/agents/*.tomlを thin runtime contract 化し、不要コンテキスト混入を validator で拒否する後続 Issue です。つまり #779 の ADR は、#780 の lint 設計に使えるほど明確でなければ意味がありません。([GitHub]4)#781 / PR #787 では、
rg -F "python3 ..."がuv run python3 ...に部分一致してしまうという Verification Command 設計不備が明示されています。#779 のrgだけで「symlink」「thin wrapper」「#381」があるかを見る AC も同種の弱さがあります。([GitHub]5)重大指摘
1.
.codex/skillsを主語にした ADR は、親 Issue と公式仕様の両方に反する#779 の current objective は
.codex/skills/*/SKILL.mdを shared surface として扱うことですが、#776 は repo-shared skill surface を.agents/skills/に統一する方針です。さらに #776 は.codex/skills/を第二の repo-shared surface として導入することを Out of Scope にしています。([GitHub]1)修正方針:
#779 は次のように言い換えるべきです。
AC2 も
.codex/skills/*/SKILL.mdではなく、少なくとも次に変えるべきです。.codex/skillsは ADR 内で 「repo-shared surface として使わない」 と明示する対象です。2. symlink 方針が雑すぎる
Codex 公式 docs は「symlinked skill folders」をサポートすると書いていますが、
SKILL.md単体の file symlink を同等に保証しているとは読めません。([OpenAI Developer]2)したがって、ADR で「symlink」とだけ書くのは不十分です。最低限、次を分ける必要があります。
Windows / WSL / GitHub Actions checkout / worktree での挙動も決定対象に入れるべきです。特にこのリポジトリは WSL + Windows 前提の運用が多く、symlink は環境差分を生みやすいです。
3. shared SKILL.md は安全な共通形式に制限しないと危険
Claude Code skills は open standard に加えて、invocation control、subagent execution、dynamic context injection などの Claude-specific extension を持ちます。([Claude API Docs]6)
特に Claude の project skill は
allowed-toolsで tool pre-approval を付与でき、repository trust 後に broad tool access を与え得ます。さらに!command による dynamic context injection は、skill content が Claude に渡る前に shell command を実行します。([Claude API Docs]6)一方、Codex skills は
SKILL.mdにname/descriptionが必要で、optional にscripts/,references/,assets/,agents/openai.yamlを持つ構造です。([OpenAI Developer]2)したがって、ADR には次の制約を入れるべきです。
この制約がないと、Claude 用の便利機能を Codex 側がただのプロンプト文字列として読む、または Codex 用の前提を Claude 側が無視する、といった drift が起きます。
4. description budget と implicit invocation を ADR に入れるべき
Codex は skill の name / description / path を最初に context に入れ、description に基づいて implicit invocation します。ただし skill list は context budget で短縮・省略される可能性があり、description は key use case と trigger words を前方に置くべきとされています。([OpenAI Developer]2)
Claude も skill description を context に載せ、skill 本文は invocation 時に入ります。Claude docs は description が cut short される問題にも触れています。([Claude API Docs]6)
#779 の目的が「トークン消費・コンテキスト汚染の削減」なら、ADR には以下を必ず入れるべきです。
5. #381 を「例外」として扱うだけでは弱い
#779 は #381 を別 concern として切り分けると書いていますが、現在の AC では「#381」「separate concern」という文字列が ADR にあるだけで通ります。([GitHub]1)
#381 は
.agents/skills/session-recording-policyを扱う既存の特殊ケースであり、#779 の一般方針に流用してはいけません。ADR には次のような明示が必要です。6. Verification Commands が ADR 品質を検査していない
#779 の現在の VC は、単語が含まれているかを見るだけです。これでは「symlink と thin wrapper のどちらもあり得る。#381 は別。」程度の曖昧な ADR でも通ります。([GitHub]1)
PR #787 で既に Verification Command の部分一致問題が露呈しているため、#779 はより厳格にすべきです。([GitHub]5)
置き換え案:
ADR に入れるべき決定文
この ADR は、少なくとも次のレベルまで踏み込むべきです。
配布物としての実装方針
Codex 公式 docs は、direct skill folders は local authoring / repo-scoped workflows 向けで、単一 repo を超えて再利用配布したい場合は plugins を使う、と説明しています。([OpenAI Developer]2)
Claude Code も project skill だけでなく plugin として skill folder を扱える設計です。([Claude API Docs]6)
したがって、ADR には「repo 内共有」と「外部配布」を分けて書くべきです。
最終提案
#779 は 実装前に Issue 本文を修正してください。特に次の 4 点は必須です。
goal_ref,Outcome,AC2,Handoff Contractから.codex/skills/*/SKILL.mdを shared surface とする表現を削除する。.agents/skills= Codex repo-shared surface、.claude/skills= Claude project surface、.codex/skills= repo-shared surface として禁止、に変更する。この修正なしに #779 を進めると、#776 の「
.agents/skillsに統一する」目的と逆向きの ADR が作られ、後続 #780 の thin runtime contract 化も曖昧になります。[-]調査: Claude/Codex agent skill surface を分離せず共有する運用方針を ADR 化する[/-][+]調査: Claude/Codex agent skill surface の shared-body policy を ADR 化する[/+]squne121 commentedon Jun 11, 2026
Refinement Loop: Approved
The issue has been approved and is ready for implementation.
approvedsqune121 commentedon Jun 11, 2026
CodexCLI作業ログ