chore: memory-sync — 归档 Codex 插件骨架/bearer_token_env_var/不做Antigravity兼容等决策
新增 3 条 decisions.md 条目:Codex/ChatGPT 桌面应用插件骨架设计(三插件 共享 skills/、memcore 独立目录的原因)、Codex 侧 MCP Token 用 bearer_token_env_var 字段的踩坑与本地缓存刷新方法、调研后决定不做 Google Antigravity(agy)兼容。project_overview.md 已发布插件表格补 Codex 支持列,CLAUDE.md 补 Codex plugin.json 硬约束小节与并行结构说明。 memory-lint 顺带修了本机 shell 环境下 Phase 3C 快扫自引用排除逻辑失效 的问题(grep -r 输出不带 ./ 前缀导致误判),修复 1 处断链 + 1 处双链 缺失反向链接。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LVyxoP4cDXeoQ3uAqLcEd2
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
a64c64667c
commit
1606d73c41
@@ -1,4 +1,4 @@
|
||||
<!-- Last updated: 2026-07-10 | Commit: a13898b -->
|
||||
<!-- Last updated: 2026-08-22 | Commit: a64c646 -->
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
@@ -22,6 +22,8 @@ plugins/
|
||||
└── SKILL.md # 技能实现(frontmatter + Markdown 指令)
|
||||
```
|
||||
|
||||
本仓库同时是 Codex/ChatGPT 桌面应用的插件市场,独立索引在 `.agents/plugins/marketplace.json`。huanxi/huanxi-admin/obsidian 在各自插件目录下再放一份 `.codex-plugin/plugin.json`(与 `.claude-plugin/plugin.json` 并列),共用同一份 `skills/`;`memcore` 因架构差异(见下方「Codex plugin.json」与「memcore 技能调用关系」两节)走独立目录 `plugins/memcore-codex/`。
|
||||
|
||||
## 核心文件格式
|
||||
|
||||
### marketplace.json(市场索引)
|
||||
@@ -65,6 +67,16 @@ description: 一句话说明该技能的用途(Claude 用此判断何时触发
|
||||
|
||||
`description` 字段是触发判据,务必精确描述使用场景,避免与其他技能产生歧义。
|
||||
|
||||
### Codex plugin.json(Codex 侧插件元数据)
|
||||
|
||||
用本机 `~/.codex/skills/.system/plugin-creator/scripts/validate_plugin.py <plugin-path>` 校验后确认的硬性约束(与 Claude 侧 plugin.json 不通用,不要照抄):
|
||||
|
||||
- `skills` 字段规整化后必须精确等于 `"skills"`,不能指向自定义子路径
|
||||
- `mcpServers` 若为字符串路径,必须精确等于 `"./.mcp.json"`,且该文件在**插件根目录**(不能嵌套进 `.codex-plugin/`);HTTP 类型 MCP server 的 Bearer Token 用专用字段 `bearer_token_env_var: "ENV_VAR_NAME"`,不支持 `${VAR}` 模板插值(见 [[decisions.md#Codex 侧 MCP Token 用 bearer_token_env_var,不用 ${VAR} 模板(2026-08-22)]])
|
||||
- 顶层 `interface` 块必填:`displayName`/`shortDescription`/`longDescription`/`developerName`/`category`/`capabilities`/`defaultPrompt`
|
||||
- 不支持 `hooks` 字段
|
||||
- 技能 frontmatter 的 `disable-model-invocation` 只能是 `false` 或不写;技能"内部 include 不给用户直接调用"要用该技能 `agents/openai.yaml` 里的 `policy.allow_implicit_invocation: false` + description 措辞实现
|
||||
|
||||
## 新增插件流程
|
||||
|
||||
1. 在 `plugins/` 下创建目录 `plugins/<plugin-name>/`
|
||||
@@ -81,6 +93,8 @@ description: 一句话说明该技能的用途(Claude 用此判断何时触发
|
||||
| `memcore` | `/memory-sync` `/memory-update` `/memory-lint` `/memcore-shared`(内部 include) | 项目记忆体系核心引擎 |
|
||||
| `obsidian` | `/obsidian` `/obsidian-bases` `/obsidian-canvas` `/obsidian-daily` `/obsidian-history` `/obsidian-meta` `/obsidian-plugins` `/obsidian-search` `/obsidian-tasks` `/obsidian-workflow-pkm` | Obsidian 知识库完整工作流(10 个技能;对标 kepano/obsidian-skills 31.8k★ 与 AgriciDaniel/claude-obsidian) |
|
||||
|
||||
四个插件均有 Codex/ChatGPT 桌面应用版本(见上方「Codex plugin.json」一节)。huanxi/huanxi-admin/obsidian 的 Codex 版共用本表里的同一份 `skills/`;`memcore` 的 Codex 版是独立目录 `plugins/memcore-codex/`(内容与下方 Claude 版 memcore 不同,改动时两边分别维护,不要假设同步)。已调研并确认不做 Google Antigravity(agy)兼容——其官方文档目前没有 marketplace 概念。
|
||||
|
||||
### memcore 技能调用关系
|
||||
|
||||
```
|
||||
@@ -114,8 +128,8 @@ description: 一句话说明该技能的用途(Claude 用此判断何时触发
|
||||
```
|
||||
.claude/memory/
|
||||
├── MEMORY.md # 索引(入口)
|
||||
├── decisions.md # 关键架构决策(含 memcore-shared/lint_report 保活/Base commit 兜底/obsidian 社区对标审查/memory-lint 速度分档过期检测等 13 项)
|
||||
├── project_overview.md # 项目定位与结构(huanxi/memcore/obsidian 10 技能 已发布插件)
|
||||
├── decisions.md # 关键架构决策(含 memcore-shared/lint_report 保活/Base commit 兜底/obsidian 社区对标审查/memory-lint 速度分档过期检测/Codex 插件骨架与 memcore-codex 独立目录/bearer_token_env_var/不做 Antigravity 兼容等 16 项)
|
||||
├── project_overview.md # 项目定位与结构(huanxi/huanxi-admin/memcore/obsidian 已发布插件,均含 Codex 支持情况)
|
||||
├── feedback_plugin_dev.md # 插件开发协作规范(含 MCP docstring 单一真相、签名变更全量扫描)
|
||||
└── lint_report.md # 记忆健康检查报告(按需)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user