Skip to content

Commit 5d2800e

Browse files
committed
add imupdate release knowledge skill
1 parent eefe646 commit 5d2800e

14 files changed

Lines changed: 218 additions & 27 deletions

File tree

‎.claude-plugin/marketplace.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{
1010
"name": "infermatrix-copilot",
1111
"source": "./plugins/infermatrix-copilot",
12-
"description": "Maintainer-grounded vLLM-Omni review knowledge over MCP."
12+
"description": "InferMatrixCopilot — governed PR review and release-driven knowledge maintenance over MCP and skills."
1313
}
1414
]
1515
}

‎.cursor-plugin/marketplace.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"name": "infermatrix-copilot",
1212
"source": "plugins/infermatrix-copilot",
13-
"description": "Maintainer-grounded vLLM-Omni review knowledge over MCP."
13+
"description": "Maintainer-grounded vLLM-Omni review and release knowledge updates."
1414
}
1515
]
1616
}

‎.github/workflows/vllm-omni-release-audit.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- adapters/vllm_omni/manifest.yaml
88
- adapters/vllm_omni/release_baseline.yaml
99
- doc/VLLM_OMNI_RELEASE_MAINTENANCE.md
10+
- plugins/infermatrix-copilot/skills/imupdate/**
1011
- knowledge/repos/vllm-omni/**
1112
- tools/audit_vllm_omni_release.py
1213
- tools/vllm_omni_release_audit.py

‎README.md‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ vLLM-Omni 的兼容性、正确性和性能问题。
1515
## 快速开始
1616

1717
私有仓库过渡期,克隆后运行一个入口。脚本会自动识别本机的 Codex、Claude Code
18-
和 Cursor,并同时安装 MCP 与 `imreview` Skill。
18+
和 Cursor,并同时安装 MCP、`imreview` 和 `imupdate` Skill。
1919

2020
```text
2121
git clone git@github.com:JiusiServe/InferMatrixCopilot.git
@@ -35,9 +35,13 @@ install.cmd
3535

3636
```text
3737
/imreview https://github.com/vllm-project/vllm-omni/pull/5172
38+
/imupdate D:\path\to\vllm-omni
39+
/imupdate vllmomni
3840
```
3941

4042
不带地址时,`/imreview` 会审查当前 PR 或本地工作区。
43+
`/imupdate` 接受本地 Git 路径,也接受仓库名、别名或 URL。本地路径直接走机器审计;
44+
名字或别名先由 Agent 找到权威仓库和目标版本,再尽量获取临时 checkout 运行机器审计。
4145

4246
公共市场上线后的安装方法和通用 MCP 配置见 [`doc/MCP.md`](doc/MCP.md)。
4347

@@ -49,6 +53,13 @@ install.cmd
4953
→ InferMatrixCopilot 返回知识库入口
5054
→ Agent 按改动选择相关模型、组件和通用规则
5155
→ Agent 输出带文件和行号的审查结论
56+
57+
你发起 /imupdate <仓库>
58+
→ 本地路径:直接读取 baseline 和目标仓库 HEAD
59+
→ 仓库名/别名:Agent 先解析权威仓库、版本和可用 checkout
60+
→ 只读审计器对比 Git 对象、注册表、pipeline、deploy 和路径路由
61+
→ Agent 根据报告更新结构事实,不自动生成 owner 规则
62+
→ enforce、知识检查和相关测试确认更新完整
5263
```
5364

5465
代码理解和推理由 Agent 当前模型完成。InferMatrixCopilot 只负责提供知识地图和维护者

‎doc/MCP.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
InferMatrixCopilot 的核心发布物保持一份:
44

55
- `plugins/infermatrix-copilot/.mcp.json`:标准 stdio MCP 描述;
6-
- `plugins/infermatrix-copilot/skills/imreview/SKILL.md`:开放 Agent Skills;
6+
- `plugins/infermatrix-copilot/skills/`:开放 Agent Skills;
77
- Claude、Codex、Cursor 的市场文件只负责把同一个插件展示出来,不包含各自的安装逻辑。
88

99
## 私有仓库过渡安装
@@ -32,6 +32,7 @@ install.cmd
3232

3333
```text
3434
/imreview <PR URL>
35+
/imupdate <local path, repository name, alias, or URL>
3536
```
3637

3738
市场只安装同一份 MCP 与 Skill;不会把逐 Agent 逻辑带回核心包。
@@ -44,6 +45,7 @@ install.cmd
4445

4546
```text
4647
plugins/infermatrix-copilot/skills/imreview/SKILL.md
48+
plugins/infermatrix-copilot/skills/imupdate/SKILL.md
4749
```
4850

4951
核心 MCP 配置:
@@ -71,6 +73,8 @@ plugins/infermatrix-copilot/skills/imreview/SKILL.md
7173

7274
```text
7375
/imreview https://github.com/vllm-project/vllm-omni/pull/5172
76+
/imupdate D:\path\to\vllm-omni
77+
/imupdate vllmomni
7478
```
7579

7680
默认 Direct 模式只提供知识库,由 Agent 当前模型完成审查;不会自动评论或推送代码。

‎doc/VLLM_OMNI_RELEASE_MAINTENANCE.md‎

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,29 @@ InferMatrixCopilot 的模型清单、代码 owner 路由和源码引用会随着
44
vLLM-Omni 发版而过期。这个审计只读取两个 Git 提交和本仓库声明,不会 checkout
55
目标版本,也不会自动修改知识规则。
66

7-
## 本地运行
7+
## 用户入口
8+
9+
安装 InferMatrixCopilot 后,在 Codex、Claude Code 或 Cursor 中运行:
10+
11+
```text
12+
/imupdate D:\path\to\vllm-omni
13+
/imupdate vllm-omni
14+
/imupdate vllmomni
15+
```
16+
17+
支持三种用法:
18+
19+
1. 本地 Git 路径:直接用 baseline 的 `audited_sha` 对比仓库 `HEAD`,机器审计后
20+
由 Agent 更新知识。
21+
2. 仓库名、别名或 URL:Agent 先解析权威仓库与目标版本,寻找已配置 checkout
22+
或建立临时 clone,再尽量进入同一机器审计流程;无法运行机器审计时必须明确标记
23+
为模型分析,不能宣称 `CLEAN`。选择版本时不得因为 GitHub “latest release”
24+
忽略预发布版本而退回到比当前 baseline 更旧的版本。
25+
3. 下方完整 Python 命令:纯机器规则对比,不调用 LLM,也不修改文件。
26+
27+
`/imupdate` 的可选第二个参数可以指定目标 tag 或 SHA。
28+
29+
## 底层命令
830

931
先在 vLLM-Omni checkout 中 fetch 需要比较的 tag 或 SHA,然后运行:
1032

@@ -30,6 +52,13 @@ python tools/audit_vllm_omni_release.py `
3052
默认 `--mode enforce`:存在未解释漂移时退出 1,输入或 Git 失败时退出 2。
3153
`--mode report-only` 仍报告 `DRIFT`,但退出 0,供定时巡检使用。
3254

55+
底层实现不 checkout 版本:它用 `git rev-parse` 固定两个提交,用
56+
`git diff --name-status -M` 找新增、修改、删除和重命名,再用
57+
`git show <sha>:<path>` 直接读取 Git 对象。Python AST 负责提取模型和
58+
pipeline registry,deploy YAML 直接按提交列举;结果做排序和哈希后与 baseline、
59+
owner 路由、manifest、知识 `sources:` 和 pin 对账,最后输出稳定 JSON。
60+
这个命令只报告证据,不编辑任何文件。
61+
3362
## 更新一个 release
3463

3564
1. 用当前 `release_baseline.yaml` 的 audited SHA 作为 `--from`,新 tag 作为

‎plugins/infermatrix-copilot/.claude-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "infermatrix-copilot",
33
"version": "0.1.0",
4-
"description": "Maintainer-grounded vLLM-Omni review knowledge over MCP.",
4+
"description": "Maintainer-grounded vLLM-Omni review and release knowledge updates.",
55
"author": {
66
"name": "JiusiServe",
77
"url": "https://github.com/JiusiServe"

‎plugins/infermatrix-copilot/.codex-plugin/plugin.json‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "infermatrix-copilot",
33
"version": "0.1.0",
4-
"description": "Maintainer-grounded vLLM-Omni review knowledge over MCP.",
4+
"description": "Maintainer-grounded vLLM-Omni review and release knowledge updates.",
55
"author": {
66
"name": "JiusiServe",
77
"url": "https://github.com/JiusiServe"
@@ -18,17 +18,19 @@
1818
"mcpServers": "./.mcp.json",
1919
"interface": {
2020
"displayName": "InferMatrixCopilot",
21-
"shortDescription": "Review vLLM-Omni changes with maintainer knowledge",
22-
"longDescription": "Use maintainer-grounded vLLM-Omni knowledge to review pull requests and local changes.",
21+
"shortDescription": "Review and update vLLM-Omni knowledge",
22+
"longDescription": "Use maintainer-grounded vLLM-Omni knowledge to review changes and update release-driven facts.",
2323
"developerName": "JiusiServe",
2424
"category": "Developer Tools",
2525
"capabilities": [
2626
"MCP",
27-
"Code review"
27+
"Code review",
28+
"Knowledge maintenance"
2829
],
2930
"websiteURL": "https://github.com/JiusiServe/InferMatrixCopilot",
3031
"defaultPrompt": [
31-
"Review this PR with InferMatrixCopilot."
32+
"Review this PR with InferMatrixCopilot.",
33+
"Update InferMatrixCopilot knowledge from this repository."
3234
]
3335
}
3436
}

‎plugins/infermatrix-copilot/.cursor-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "infermatrix-copilot",
33
"displayName": "InferMatrixCopilot",
44
"version": "0.1.0",
5-
"description": "Maintainer-grounded vLLM-Omni review knowledge over MCP.",
5+
"description": "Maintainer-grounded vLLM-Omni review and release knowledge updates.",
66
"author": {
77
"name": "JiusiServe"
88
},
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
name: imupdate
3+
description: Resolve an upstream repository from a local path, repository name, alias, or URL, then update InferMatrixCopilot's release-driven knowledge. Use when the user invokes /imupdate or $imupdate, asks to sync knowledge after an upstream release, compare vLLM-Omni tags or SHAs, or refresh the release baseline, model catalog, source maps, and manifests.
4+
---
5+
6+
# InferMatrix update
7+
8+
```text
9+
/imupdate <path-or-repository> [target-tag-or-sha]
10+
```
11+
12+
The installed InferMatrixCopilot root is:
13+
14+
```text
15+
{{INFERMATRIX_COPILOT_ROOT}}
16+
```
17+
18+
If that placeholder was not replaced, locate or temporarily clone the
19+
InferMatrixCopilot checkout containing `tools/audit_vllm_omni_release.py`.
20+
21+
## Select the input mode
22+
23+
### Local Git path
24+
25+
When the argument exists and is a Git checkout, use the deterministic audit.
26+
Read `adapters/vllm_omni/release_baseline.yaml`; use
27+
`upstream.audited_sha` as the old revision and the optional target or checkout
28+
`HEAD` as the new revision. Refuse an accidental downgrade when the target is
29+
older than the audited revision. Do not fetch or checkout unless explicitly
30+
asked.
31+
32+
### Repository name, alias, or URL
33+
34+
When the argument is not a local path, use the host model to resolve it:
35+
36+
1. Treat `vllm-omni`, `vllmomni`, `vllm omni`, and
37+
`vllm-project/vllm-omni` as `https://github.com/vllm-project/vllm-omni`.
38+
2. Check the configured repo map and current workspace for a matching checkout.
39+
If found, continue as the local-path mode.
40+
3. Otherwise verify the canonical repository from authoritative GitHub
41+
metadata. Choose the supplied target, otherwise the newest release or tag
42+
that is not older than the audited revision, otherwise the default-branch
43+
HEAD; state that choice. Never silently downgrade because GitHub's "latest
44+
release" can exclude newer prereleases.
45+
4. Prefer a temporary clone and run the deterministic audit. If repository
46+
access or cloning is unavailable, inspect the authoritative source with the
47+
host model, update only source-backed facts, and clearly report that machine
48+
audit/enforce validation was unavailable. Never call that result `CLEAN`.
49+
5. Ask for clarification only when multiple plausible canonical repositories
50+
remain after resolution.
51+
52+
## Audit and update
53+
54+
1. Resolve old and new revisions to full SHAs.
55+
2. Create a temporary JSON path and run the read-only audit in report mode when
56+
a local or temporary Git checkout is available:
57+
58+
```text
59+
python <infermatrix-root>/tools/audit_vllm_omni_release.py \
60+
--from <audited-sha> \
61+
--to <target-sha> \
62+
--repo <upstream-repo> \
63+
--mode report-only \
64+
--json-output <temporary-json>
65+
```
66+
67+
3. Explain the registry, pipeline, deploy, path-routing, source, and pin drift.
68+
Read the relevant upstream diff before changing InferMatrixCopilot.
69+
4. Update only facts proven by the report and source: the release baseline,
70+
model catalog, component source maps, pins, or adapter manifest. Never
71+
generate or rewrite owner rules automatically; report semantic-rule
72+
candidates for human review.
73+
5. When machine audit is available, run the same command with `--mode enforce`,
74+
then run:
75+
76+
```text
77+
python knowledge/tools/check_knowledge_tree.py
78+
python knowledge/tools/check_wiki_lint.py
79+
python -m pytest test/test_release_audit.py test/test_adapters.py \
80+
test/test_routing.py test/test_knowledge_source.py \
81+
test/test_skills_scope.py test/test_capabilities.py -q
82+
```
83+
84+
6. Delete temporary reports and clones. Return the canonical repository, input
85+
mode, old and new SHAs, structural deltas, files changed, validation
86+
results, and any unresolved or model-only findings.
87+
88+
The audit is evidence collection, not the updater. Codex performs the bounded
89+
knowledge edits and must not commit, push, or open a PR unless asked.

0 commit comments

Comments
 (0)