Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"name": "llmdoc",
"source": "./",
"description": "Persistent engineering context powered by the llmdoc CLI and progressive MDX knowledge retrieval",
"version": "3.5.0"
"version": "3.5.1"
}
]
}
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "llmdoc",
"description": "Persistent engineering context powered by the llmdoc CLI and progressive MDX knowledge retrieval",
"version": "3.5.0",
"version": "3.5.1",
"author": {
"name": "DJJ & Danniel"
}
Expand Down
2 changes: 1 addition & 1 deletion .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "llmdoc",
"version": "3.5.0",
"version": "3.5.1",
"description": "Persistent engineering context powered by the llmdoc CLI and progressive MDX knowledge retrieval",
"skills": "./.agents/skills/"
}
3 changes: 3 additions & 0 deletions .github/workflows/codex-plugin-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.2.2

- name: Install scanner dependencies
run: npm ci --ignore-scripts

- name: Run scanner
# 上游 hashgraph-online/codex-plugin-scanner 迁库后暂无可用 action;
# 用仓库内建校验覆盖 manifest schema、skills frontmatter 与 hooks 约定,
Expand Down
4 changes: 2 additions & 2 deletions cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tokenroll/llmdoc",
"version": "3.5.0",
"version": "3.5.1",
"description": "V3 runtime CLI for llmdoc repositories",
"homepage": "https://github.com/TokenRollAI/llmdoc",
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions llmdoc/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"documents": {
"architecture.mdx": {
"validatedRevision": "61ef5822ec305f61ebf41bb826e143a889c31e5e"
"validatedRevision": "0157d17e0cca2eb0ed0aaf20da41b80035be3a2e"
},
"cli-runtime/state-and-validation.mdx": {
"validatedRevision": "61ef5822ec305f61ebf41bb826e143a889c31e5e"
Expand All @@ -15,10 +15,10 @@
"validatedRevision": "61ef5822ec305f61ebf41bb826e143a889c31e5e"
},
"plugin-packaging/claude-and-codex.mdx": {
"validatedRevision": "61ef5822ec305f61ebf41bb826e143a889c31e5e"
"validatedRevision": "0157d17e0cca2eb0ed0aaf20da41b80035be3a2e"
},
"plugin-packaging/development-and-release.mdx": {
"validatedRevision": "61ef5822ec305f61ebf41bb826e143a889c31e5e"
"validatedRevision": "832bcf943c10528b60f01a02a7d8ce607ea44699"
},
"workflows/init-and-update.mdx": {
"validatedRevision": "61ef5822ec305f61ebf41bb826e143a889c31e5e"
Expand Down
2 changes: 1 addition & 1 deletion llmdoc/plugin-packaging/claude-and-codex.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ Claude 根插件是手工维护的 canonical surface:skills 定义 Retrieval/R

转换必须在临时副本生成后替换式同步,因为生成器不保证清除陈旧输出。Codex 角色文本不手工维护;宿主特有 front matter/TOML 可以不同,实际 skill 与 agent 指令正文必须与 Claude canonical 一致。

`scripts/check-codex-surface.mjs` 在 CI 中机械校验版本/marketplace 身份、五个 skill 与三个 agent 的正文一致性、Reflection Gate 约束和 hook 调用。人工 checklist 只补宿主 UI policy 与信任模型等无法从正文等价判断的部分。
`scripts/check-codex-surface.mjs` 在 CI 中机械校验版本/marketplace 身份、五个 skill 与三个 agent 的正文一致性、Reflection Gate 约束和 hook 调用。它还分别遍历 `skills/` 与 `.agents/skills/`,用 `gray-matter` 解析每份 `SKILL.md` 的 YAML front matter,并要求 `name`、`description` 是非空字符串;这是两侧各自的语法门槛,不替代跨宿主正文 parity。人工 checklist 只补宿主 UI policy 与信任模型等无法从正文等价判断的部分。

hooks 位于共享插件根,一份配置供两种宿主使用;它们保持 fail-open、只读,且由安装宿主按自己的信任模型启用。
2 changes: 1 addition & 1 deletion llmdoc/plugin-packaging/development-and-release.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ code:

## 消费与开发边界

公开产物是 `@tokenroll/llmdoc` CLI;仓库根 package 只是私有开发工作区。消费项目通过外部 npx/global 安装使用 CLI,不把 llmdoc 写进自己的依赖和 lockfile。
公开产物是 `@tokenroll/llmdoc` CLI;仓库根 package 只是私有开发工作区。消费项目通过外部 npx/global 安装使用 CLI,不把 llmdoc 写进自己的依赖和 lockfile。根工作区直接声明的 `gray-matter` 只供 `scripts/check-codex-surface.mjs` 解析 skill front matter,不是消费方依赖,也没有为 CLI 新增 runtime 依赖。

## 非平凡编辑前先同步

Expand Down
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tokenroll/llmdoc-repository",
"version": "3.5.0",
"version": "3.5.1",
"private": true,
"description": "Development workspace for the llmdoc V3 CLI and plugin surfaces",
"scripts": {
Expand All @@ -12,7 +12,8 @@
"check:prompts": "node scripts/check-prompt-budget.mjs"
},
"devDependencies": {
"@tokenroll/llmdoc": "file:cli"
"@tokenroll/llmdoc": "file:cli",
"gray-matter": "^4.0.3"
},
"overrides": {
"vite": "6.4.3"
Expand Down
46 changes: 36 additions & 10 deletions scripts/check-codex-surface.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import matter from "gray-matter";

const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
const errors = [];
Expand Down Expand Up @@ -78,22 +79,47 @@ for (const [label, version] of versionSurfaces) {
}
}

// 3) Codex skills:每个 SKILL.md 有 frontmatter name + description
const skillsRoot = path.join(root, ".agents/skills");
if (fs.existsSync(skillsRoot)) {
for (const dir of fs.readdirSync(skillsRoot)) {
const skillFile = path.join(skillsRoot, dir, "SKILL.md");
// 3) Claude/Codex skills:每个 SKILL.md 的 YAML frontmatter 可解析且有 name + description
function validateSkills(skillsDir) {
const skillsRoot = path.join(root, skillsDir);
if (!fs.existsSync(skillsRoot)) return;

for (const entry of fs.readdirSync(skillsRoot, { withFileTypes: true })) {
if (!entry.isDirectory()) continue;

const rel = path.posix.join(skillsDir, entry.name, "SKILL.md");
const skillFile = path.join(root, rel);
if (!fs.existsSync(skillFile)) {
errors.push(`.agents/skills/${dir}: 缺少 SKILL.md`);
errors.push(`${path.posix.join(skillsDir, entry.name)}: 缺少 SKILL.md`);
continue;
}

const source = fs.readFileSync(skillFile, "utf8");
if (!source.startsWith("---\n") && !source.startsWith("---\r\n")) {
errors.push(`${rel}: 缺少 frontmatter`);
continue;
}

let data;
try {
data = matter(source).data;
} catch (error) {
errors.push(`${rel}: frontmatter YAML 无法解析 — ${error.message}`);
continue;
}
const head = fs.readFileSync(skillFile, "utf8").split("\n---")[0];
if (!/^---/.test(head)) errors.push(`.agents/skills/${dir}/SKILL.md: 缺少 frontmatter`);
if (!/\bname:/.test(head)) errors.push(`.agents/skills/${dir}/SKILL.md: frontmatter 缺少 name`);
if (!/\bdescription:/.test(head)) errors.push(`.agents/skills/${dir}/SKILL.md: frontmatter 缺少 description`);

if (typeof data.name !== "string" || data.name.trim() === "") {
errors.push(`${rel}: frontmatter 缺少有效 name`);
}
if (typeof data.description !== "string" || data.description.trim() === "") {
errors.push(`${rel}: frontmatter 缺少有效 description`);
}
}
}

validateSkills("skills");
validateSkills(".agents/skills");

// 4) 三个角色跨宿主齐备;Reflector 只能写临时候选,不恢复 tracked reflection 树。
for (const agent of ["investigator", "reflector", "recorder"]) {
for (const rel of [`agents/${agent}.md`, `.codex/agents/${agent}.toml`]) {
Expand Down
Loading