Repository navigation
feat: align codex skill surface with .agents - #807
Conversation
Preview URLPreview removed (PR #807 closed). |
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
Mergeability
- mergeable=MERGEABLE, merge_state_status=BLOCKED, is_draft=true
Evidence Check
- AC coverage: PR本文上は AC1-AC7 と Allowed Paths / Schema / Safety の自己申告あり
- Allowed Paths: changed paths は Issue #776 の Allowed Paths 内に収まっている
- CI Verification:
PR Body Japanese Checkが failure、python-testが pending のため required checks 未成立 - 検証コマンド結果: PR本文の self-report はあるが、
TEST_VERDICT_MACHINEコメントがなく、Issue VC に対応する外部証跡が不足
Blockers
mergeStateStatus=BLOCKEDかつ Draft PR のため merge-ready ではない- required checks が未成立(
PR Body Japanese Checkfailure、python-testpending) TEST_VERDICT_MACHINE不在かつ CI_CHECK_RUN_SCOPED で Issue #776 の VC を十分に裏付ける証跡がないため、PR body self-report 単独では APPROVE 不可
Non-blockers
- なし
LOOP_VERDICT_V2
verdict: REQUEST_CHANGES
reviewed_head_sha: e6300e0940c5294fca2691c66ca290c211958b79
merge_ready: false
mergeability:
mergeable: MERGEABLE
merge_state_status: BLOCKED
blockers:
- severity: high
summary: mergeStateStatus が BLOCKED のままで Draft PR でもある
evidence_refs:
- https://github.com/squne121/loop-protocol/pull/807
next_action: Draft を解除し、merge_state_status が CLEAN か UNSTABLE になる条件を満たしてから再レビューする
- severity: high
summary: required checks が未成立(PR Body Japanese Check failure、python-test pending)
evidence_refs:
- https://github.com/squne121/loop-protocol/actions/runs/27368036368/job/80872618636
- https://github.com/squne121/loop-protocol/actions/runs/27368034841/job/80872611029
next_action: PR本文の日本語比率チェックを通し、python-test 完了後に check suite を再確認する
- severity: high
summary: TEST_VERDICT_MACHINE が存在せず、Issue #776 の Verification Commands を head SHA で裏付ける外部証跡が不足している
evidence_refs:
- https://github.com/squne121/loop-protocol/pull/807
- https://github.com/squne121/loop-protocol/issues/776
next_action: test-runner の TEST_VERDICT_MACHINE か、head SHA 一致の CI_CHECK_RUN_SCOPED 証跡で各 VC を裏付けてから再レビューする
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: UNSTABLE
branch_behind_main: false
baseline_only: false
verification_commands_pass: 7
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results: []
head_sha: e6300e0940c5294fca2691c66ca290c211958b79
notes: "Issue #776 の VC 7件と追加の標準ゲート(typecheck/lint/test/build)を確認済み。lint は初回 ENOENT 後に再実行で PASS。" |
判定: REQUEST_CHANGES 相当GitHub には投稿していません。レビュー結果としては、PR #807 は方向性は妥当だが、現状のまま “Codex runtime dependency を 特に、PR は ブロッカー1.
|
TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: BLOCKED
branch_behind_main: false
baseline_only: false
verification_commands_pass: 7
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results: []
head_sha: 7fd07f4d14f698c68bb21e3ad1c62aae0d65fce5
notes: "Issue #776 の owner comment 反映後、VC 7件に対応する validator/doc/skill-surface 修正を確認。local gates は typecheck/lint/test/build と Python contract validator が PASS。PR body は thin bridge / discovery surface alignment 表現へ更新済み。" |
|
人間コメント。 |
you askedmessage time: 2026-06-12 22:11:41 #807 chatgpt responsePR本文・差分・関連Issue/コメントを確認し、その上で公式ドキュメントと英語/中国語/日本語圏の運用知見を照合します。論点は「symlinkで十分か」「thin bridgeが発見性・互換性・保守性に寄与するか」「コンテキスト汚染のコストが正当化されるか」に絞ります。 公式ドキュメント上は、Codex 側が 結論:あなたの指摘はかなり妥当です。PR #807 は「 判断PR #807 の代表例では、 Codex 公式は、repo-local skill の場所として ただし、thin bridge が「初期コンテキストを大きく浪費する」という点は少し違います。Codex は最初から全 Claude Code 側は project skill の正規配置を PR #807 の有用部分全部が不要ではありません。 validator も route token から ただし thin bridge は弱い現在の bridge は「正本はここにある」と書くだけで、実行前に必ずその正本を読むという runtime imperative になっていません。Codex 側 custom agent / subagent まわりは、公式仕様と実挙動のズレや未成熟さが GitHub issue として複数報告されています。たとえば skill 内に subagent 使用を書いても prompt で再度明示しないと spawn しない報告、 この状況で「bridge を読めば、agent がさらに正本を読むはず」と期待するのは脆いです。Codex 公式が symlink folder をサポートしている以上、同じ正本を読ませたいなら symlink の方が決定論的です。(OpenAI Developer) 例外:symlink を避ける理由はあるWindows / FAT / 一部 checkout 環境では Git の ただしその場合でも、現在の bridge は薄すぎます。残すなら最低限こうするべきです。 Before executing this skill, read `../../../.claude/skills/implement-issue/SKILL.md`.
Treat that file as the canonical runtime instruction body.
If the canonical file cannot be read, stop with FAIL_CLOSED.そして validator で「canonical target が存在する」だけでなく、「bridge が実行前 read を命令している」ことまで検証する必要があります。 推奨コメント案REQUEST_CHANGES 寄りです。
`.agents/skills` を Codex 側 repo-local discovery surface に揃える方針と、route / surface / canonical target / `.codex/skills` negative guard を validator で fail-closed にする点は有用です。
ただし、現在の `.agents/skills/*/SKILL.md` thin bridge は不要な間接層に見えます。Codex 公式 docs は `.agents/skills` を repo skill surface として扱うだけでなく、symlinked skill folders をサポートし scan 時に target を追うと明記しています。canonical body を `.claude/skills/*/SKILL.md` に残すなら、`.agents/skills/<name>` を `.claude/skills/<name>` への directory symlink にする方が、description drift と「bridge だけ読んで正本を読まない」リスクを避けられます。
現実装の bridge は「正本はここにある」と説明するだけで、Codex に実行前 read を fail-closed に義務付けていません。Codex custom agent / subagent まわりは、skill 内 instruction が実行戦略に反映されない、custom agent TOML が runtime で期待通り効かない、といった upstream issue もあるため、追加の自然言語 indirection に依存する設計は弱いです。
対応案はどちらかにしてください。
1. 推奨: `.agents/skills/<skill>` を `.claude/skills/<skill>` への directory symlink にし、validator は symlink target / `SKILL.md` / frontmatter / `.codex/skills` 不在を検証する。
2. symlink portability を避けるなら、bridge を残す代わりに「実行前に canonical `.claude/skills/*/SKILL.md` を必ず read し、読めなければ fail closed」と明記し、validator でもその imperative を検証する。
現状の thin bridge は、Codex discovery surface alignment という目的に対しては symlink で十分であり、runtime instruction surface としては弱いです。日本語・中国語圏については、今回確認できた公開検索範囲では、この exact な「 |
|
調査しました。結論からいうと、 事実として確認できたこと
PR #807 に引きつけた評価良い点
弱い点
upstream の不安定さCodex 側は skills / subagents / custom agent まわりに runtime と docs のズレがまだあります。今回の論点に近いものとして、少なくとも以下は確認できました。
この意味でも、追加の自然言語 indirection に runtime を依存させるより、filesystem level で同じ正本を見せる symlink の方が決定論的です。 日本語・中国語圏の公開知見exact に「
これは公式根拠ではなく community pattern ですが、少なくとも「bridge が一般解として支持されている」傾向は見えませんでした。 推奨結論現時点の判断は次です。
私の提案としては、今回 PR は「contract / validator / docs 整合」の価値で評価しつつ、thin bridge 実体については follow-up で symlink 移行 or fail-closed bridge 強化 を切り出すのが一番整理しやすいです。 |
|
CodexCLI作業ログ |
Summary
この PR は、Codex custom agent が参照する repo-local discovery surface を
.agents/skills/に揃え、thin bridge entrypoint・validator・docs の契約を current repo reality に合わせて同期する変更です。.agents/skills/*/SKILL.mdentrypoint を整備した.claude/skills/*/SKILL.mdにあり、この PR は runtime instruction body の全面移植ではないruntime_followup_routeとrepo_local_skill_surfaceの exact 対応、canonical target existence、.codex/skills非許容を validator で fail-closed に固定したChecks
Issue #776 の VC と追加品質ゲートを、今回の stronger validation に合わせて確認しています。
uv run python3 scripts/check_codex_agent_config.py --assert-required-fields --assert-runtime-contractfor f in .agents/skills/*/SKILL.md; do rg -n "^name:|^description:" "$f" | wc -l | grep -q '^2$' || exit 1; donefor f in .agents/skills/*/SKILL.md; do python3 - "$f" <<'PY' from pathlib import Path import re import sys text = Path(sys.argv[1]).read_text(encoding='utf-8') m = re.search(r'([^]+/SKILL.md)', text) assert m, sys.argv[1] assert (Path(sys.argv[1]).parent / m.group(1)).resolve().is_file(), m.group(1) PY donetest ! -e .codex/skillsrtk pnpm typecheckrtk pnpm lintrtk pnpm testrtk pnpm buildSchema Change Applicability
schema_changeruntime_followup_routeとrepo_local_skill_surfaceの exact 対応、canonical target existence、.codex/skillsnegative guard を validator contract に追加したためSchema Consumer Inventory
変更対象 schema:
codex-agent-runtime-contract-fixture/v1before/after 差分:
Consumer 列挙:
scripts/check_codex_agent_config.py.agents/skills/<token>/SKILL.mdの exact match、canonical.claude/skillstarget existence、.codex/skillsnegative guard を追加scripts/check-codex-agents.mjs.agents/skills/*/SKILL.md.claude/skills/*/SKILL.mdにあることを明記docs/dev/agent-runtime-ops.md.agents/skillsは discovery surface alignment であり full migration ではないことを明記docs/dev/workflow.md.claude/skillsが thin bridge の canonical body source と残る現状を明記.gitignore.codex/skillsを repo-shared skill surface と見なさない注記を追加Compatibility Decision
behavioral_validation_tighteningintentional_fail_closednoN/A.codex/skills依存を通さない方向へ validator を強化した repo-local contract change のためSafety Claim Matrix
安全主張は discovery surface 整合と validator 強化に限定します。
.agents/skillsを Codex の repo-local discovery surface として固定するuv run python3 scripts/check_codex_agent_config.py --assert-required-fields --assert-runtime-contractとscripts/check-codex-agents.mjsの route/surface guard diffruntime_followup_routeとrepo_local_skill_surfaceのズレを fail-closed に検出するuv run python3 scripts/check_codex_agent_config.py --assert-required-fields --assert-runtime-contract.claude/skillstarget を必ず指すことを固定する.agents/skills/*/SKILL.mdループ検証.codex/skillsを repo-shared skill surface として誤使用しないtest ! -e .codex/skillsNotes
claude_skill_requiredを validator allowed set から外しているため、repo-local contract に対する intentional fail-closed change です