fix(worklog): 避免 Codex stop hook 執行 Claude 專用路徑

This commit is contained in:
Jeffery
2026-07-27 16:44:57 +08:00
parent 9fa1abbb6f
commit 2abe236c35
6 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -37,7 +37,7 @@ doc/
│ └── marketplace.json # Codex marketplacename: "doc"url source 指向本 repo
├── plugin.json # Antigravity 外掛定義(name: "jsc"skills: "./skills/"
├── hooks/
│ └── hooks.json # Claude Code hooksStop → worklog;其他助理不吃此檔)
│ └── hooks.json # Stop → worklog;只有 Claude Code 環境實際執行,其他助理 no-op
├── scripts/
│ └── worklog/ # worklog 自動記錄的可執行元件(skill 與 hook 共用)
│ ├── worklog.sh # 主流程:抽本輪 → 濃縮成六欄 → 遮蔽 → 追加到 wiki
@@ -62,10 +62,10 @@ doc/
| 功能 | Claude Code | Codex | Antigravity | OpenCode | GitHub Copilot |
| --- | --- | --- | --- | --- | --- |
| `Stop` hook 自動記錄 | ✅ | ❌ 不讀 `hooks/hooks.json` | ❌ | ❌ | ❌ |
| `Stop` hook 自動記錄 | ✅ | ⚠️ 會載入但 no-op | ❌ | ❌ | ❌ |
| `worklog` 手動模式 | ✅ | ⚠️ 需安裝後保留 `scripts/` | ⚠️ 同左 | ❌ | ❌ |
`worklog` 自動記錄依賴 Claude Code 的 Stop hook 與 transcript JSONL 結構;Copilot 可讀本 repo 的指示檔與 `SKILL.md` 作為工作方式參考,但不能執行此 hook
`worklog` 自動記錄依賴 Claude Code 的 Stop hook 與 transcript JSONL 結構;Codex 會載入 plugin hook 定義,因此 hook command 會先檢查 `CLAUDE_PLUGIN_ROOT`,非 Claude Code 環境直接 no-op
---
@@ -184,7 +184,7 @@ copilot plugin marketplace remove doc
- 安裝 token `jsc@doc` = plugin 名(plugin manifest 的 `name`@ marketplace 名。
- `copilot plugin marketplace add` 支援 GitHub `owner/repo`、git URL 與本地路徑;Gitea repo 可用上方 HTTPS URL。
- **呼叫**:在 Copilot CLI 中用自然語言描述需求,例如 `copilot -i "請使用 doc-docker 整理 docker-compose 註解"`
- `worklog` Claude Code `Stop` hook 自動記錄仍只有 Claude Code 會讀取Copilot CLI 可安裝 skill,但不會執行 Claude Code hook。
- `worklog``Stop` hook 自動記錄仍只有 Claude Code 環境會實際執行Copilot CLI 可安裝 skill,但不會執行 Claude Code hook。
---