Skip to content

Commit e2d4cd9

Browse files
committed
release: v0.5.0
1 parent f408c19 commit e2d4cd9

12 files changed

Lines changed: 237 additions & 28 deletions

File tree

‎.agents/plugins/marketplace.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"authentication": "ON_USE"
1717
},
1818
"category": "Developer Tools",
19-
"version": "0.4.0",
19+
"version": "0.5.0",
2020
"description": "Cross-language code lint enforcement for AI coding assistants (ZCode, Claude Code, Codex CLI, Kimi Code): Java, Rust, TypeScript, Python. PostToolUse hook auto-runs the native linter on every AI-written file and blocks on failure in strict mode.",
2121
"icon": "https://raw.githubusercontent.com/partme-ai/partme-codeguard-plugin/main/assets/official-logo.png",
2222
"interface": {

‎.codex-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codeguard",
3-
"version": "0.4.0+codex.20260919",
3+
"version": "0.5.0+codex.20260919",
44
"description": "Cross-language code lint enforcement for AI coding assistants (ZCode, Claude Code, Codex CLI, Kimi Code): Java, Rust, TypeScript, Python. PostToolUse hook auto-runs the native linter on every AI-written file and blocks on failure in strict mode.",
55
"author": {
66
"name": "Full Stack Skills / PartMe.AI",

‎.github/workflows/skills-sync.yml‎

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ on:
66
schedule:
77
- cron: "41 3 * * *"
88
workflow_dispatch:
9+
inputs:
10+
ref:
11+
description: Optional immutable codeguard-skills release tag
12+
required: false
13+
type: string
14+
sha:
15+
description: Required peeled commit SHA when ref is provided
16+
required: false
17+
type: string
918

1019
permissions:
1120
contents: write
@@ -16,6 +25,8 @@ jobs:
1625
runs-on: ubuntu-latest
1726
env:
1827
GH_TOKEN: ${{ secrets.SKILLS_SYNC_TOKEN || secrets.GITHUB_TOKEN }}
28+
REQUESTED_REF: ${{ github.event.client_payload.ref || inputs.ref }}
29+
REQUESTED_SHA: ${{ github.event.client_payload.sha || inputs.sha }}
1930
steps:
2031
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
2132
with:
@@ -24,7 +35,18 @@ jobs:
2435
with:
2536
python-version: "3.12"
2637
- name: Vendor skills from pinned sources
27-
run: python3 scripts/vendor/skill_vendor.py update
38+
shell: bash
39+
run: |
40+
arguments=(update)
41+
if [[ -n "$REQUESTED_REF" || -n "$REQUESTED_SHA" ]]; then
42+
if [[ -z "$REQUESTED_REF" || -z "$REQUESTED_SHA" ]]; then
43+
echo "::error::Both ref and sha are required for a release upgrade"
44+
exit 1
45+
fi
46+
arguments+=(--source-ref "codeguard-skills=$REQUESTED_REF")
47+
arguments+=(--expected-sha "codeguard-skills=$REQUESTED_SHA")
48+
fi
49+
python3 scripts/vendor/skill_vendor.py "${arguments[@]}"
2850
- name: Verify the fresh snapshot
2951
run: python3 scripts/vendor/skill_vendor.py check
3052
- name: Push a sync branch when the snapshot changed
@@ -39,7 +61,7 @@ jobs:
3961
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
4062
git checkout -B chore/skills-sync
4163
git add skills/ skills.lock.json
42-
git commit -m "chore: sync vendored skills from codeguard-skills"
64+
git commit -m "chore: sync vendored skills from codeguard-skills ${REQUESTED_REF:-current-lock}"
4365
git push --force-with-lease origin chore/skills-sync
4466
echo "changed=true" >> "$GITHUB_OUTPUT"
4567
- name: Open the sync PR if none exists
@@ -50,7 +72,7 @@ jobs:
5072
exit 0
5173
fi
5274
gh pr create \
53-
--title "chore: sync vendored Codeguard skills" \
54-
--body "Automated refresh of the checksummed skill snapshot from skills.lock.json. Externally managed skills come from full-stack-skills/codeguard-skills; unlisted plugin-local skills are preserved." \
75+
--title "chore: sync vendored Codeguard skills ${REQUESTED_REF:-current-lock}" \
76+
--body "Automated refresh of the checksummed skill snapshot from skills.lock.json. Requested release: ${REQUESTED_REF:-current lock}; expected commit: ${REQUESTED_SHA:-already pinned}. Externally managed skills come from full-stack-skills/codeguard-skills; plugin-local exceptions must be declared in plugin-local-skills.json." \
5577
--head chore/skills-sync --base main \
5678
--label skills-sync

‎.zcode-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"en": "CodeGuard",
66
"zh-CN": "代码规范检查"
77
},
8-
"version": "0.4.0",
8+
"version": "0.5.0",
99
"description": "Cross-language code lint enforcement for AI coding assistants (ZCode, Claude Code, Codex CLI, Kimi Code): Java, Rust, TypeScript, Python. PostToolUse hook auto-runs the native linter on every AI-written file and blocks on failure in strict mode.",
1010
"description_i18n": {
1111
"en": "Cross-language code lint enforcement. PostToolUse hook auto-runs the language-specific linter on every AI-written file; failed lint blocks further writes when strict_mode is on. Ships ready-to-go .pre-commit-config.yaml templates for Java/Rust/TypeScript/Python.",

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- `skills.lock.json` 中列出的技能以 `full-stack-skills/codeguard-skills` 为事实源;不得直接编辑插件内对应目录。
66
- 更新受管技能时,先在外部技能仓完成修改、TRACE 评估和不可变 tag,再更新 lock ref,执行 `python3 scripts/vendor/skill_vendor.py update`。
77
- 提交前必须执行 `python3 scripts/vendor/skill_vendor.py check --offline` 和在线 `check`。
8-
- 只有插件内部定制技能可以在本仓 `skills/` 直接维护,并且必须不出现在 `skills.lock.json` 中;vendor 工具会保留这些目录。
8+
- 只有插件内部定制技能可以在本仓 `skills/` 直接维护,并且必须不出现在 `skills.lock.json` 中、必须显式登记到 `plugin-local-skills.json`;vendor 工具会保留这些目录并拒绝未声明目录。
99
- Hooks、linters、commands、MCP 配置和可执行脚本仍由插件仓维护。
1010

1111
## 版本升级要求(强制,AI 必须遵守)

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ AI code that passes lint on first try
6565
|---|---|
6666
| Plugin ID | `partme-codeguard-plugin` |
6767
| Hosts | ZCode, Claude Code, Codex CLI, Kimi Code |
68-
| Current version | `0.4.0` |
68+
| Current version | `0.5.0` |
6969
| ZCode manifest | `.zcode-plugin/plugin.json` |
7070
| Codex manifest | `.codex-plugin/plugin.json` |
7171
| MCP server | `python3 scripts/run_check.py --mcp` (stdio JSON-RPC) |
@@ -103,7 +103,7 @@ The 68 portable skills are authored in [full-stack-skills/codeguard-skills](http
103103
- `python3 scripts/vendor/skill_vendor.py update` refreshes only the skill names listed in the lock.
104104
- `python3 scripts/vendor/skill_vendor.py check --offline` verifies the packaged snapshot; omit `--offline` to verify the upstream ref and content too.
105105
- Do not directly edit a locked skill directory. Change and release `codeguard-skills`, update the lock ref, then run the vendor update.
106-
- Plugin-specific skills may remain under `skills/` only when they are intentionally absent from `skills.lock.json`; the vendor leaves those directories untouched.
106+
- Plugin-specific skills may remain under `skills/` only when they are intentionally absent from `skills.lock.json` and explicitly listed in `plugin-local-skills.json`; the vendor preserves declared directories and rejects undeclared exceptions.
107107

108108
Hooks, linters, commands, MCP wiring, and executable scripts remain plugin-owned. The authoring standard is documented in [docs/CODEGUARD_SKILLS_SPEC.md](docs/CODEGUARD_SKILLS_SPEC.md).
109109

@@ -222,6 +222,7 @@ partme-codeguard-plugin/
222222
│ ├── fix.py # auto-fix CLI
223223
│ └── vendor/skill_vendor.py # lock-driven external skill vendor/check
224224
├── skills.lock.json # upstream tag/commit + managed skills + SHA-256 digests
225+
├── plugin-local-skills.json # explicit plugin-only skill exceptions (currently empty)
225226
├── skills/ # 68 vendored skills from codeguard-skills v0.1.0
226227
│ ├── codeguard/ # main entry
227228
│ ├── codeguard-init/ # one-line bootstrap

‎README.zh-CN.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ AI 一次写出就过 lint 的代码
6565
|---|---|
6666
| 插件 ID | `partme-codeguard-plugin` |
6767
| 宿主 | ZCode、Claude Code、Codex CLI、Kimi Code |
68-
| 当前版本 | `0.4.0` |
68+
| 当前版本 | `0.5.0` |
6969
| ZCode manifest | `.zcode-plugin/plugin.json` |
7070
| Codex manifest | `.codex-plugin/plugin.json` |
7171
| MCP 服务 | `python3 scripts/run_check.py --mcp`(stdio JSON-RPC) |
@@ -89,7 +89,7 @@ AI 一次写出就过 lint 的代码
8989
- `python3 scripts/vendor/skill_vendor.py update` 只刷新 lock 中列出的技能。
9090
- `python3 scripts/vendor/skill_vendor.py check --offline` 校验插件内快照;去掉 `--offline` 还会校验上游 ref 与内容。
9191
- 不得直接修改 lock 管理的技能目录。应先在 `codeguard-skills` 修改并发布,再更新 lock ref 并执行 vendor update。
92-
- 只有插件内部定制技能可以直接保留在 `skills/`,且必须明确不列入 `skills.lock.json`;vendor 不会删除或覆盖这些目录。
92+
- 只有插件内部定制技能可以直接保留在 `skills/`,且必须明确不列入 `skills.lock.json`、显式登记到 `plugin-local-skills.json`;vendor 会保留已声明目录并拒绝未声明例外。
9393

9494
Hooks、linters、commands、MCP 接线和可执行脚本仍由插件仓负责。
9595

@@ -207,6 +207,7 @@ partme-codeguard-plugin/
207207
│ ├── fix.py # 自动修复 CLI
208208
│ └── vendor/skill_vendor.py # lock 驱动的外部技能 vendor/check
209209
├── skills.lock.json # 上游 tag/commit + 受管技能 + SHA-256
210+
├── plugin-local-skills.json # 插件专属技能显式例外清单(当前为空)
210211
├── skills/ # 从 codeguard-skills v0.1.0 vendor 的 68 个技能
211212
│ ├── codeguard/ # 主入口
212213
│ ├── codeguard-init/ # 一行接入

‎docs/CODEGUARD_SKILLS_SPEC.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ skills/codeguard-java/
2727
|---|---|---|
2828
| 可复用 Codeguard 技能 | `full-stack-skills/codeguard-skills` | 在外部仓修改、评估、发布新 tag,再更新插件 lock |
2929
| 插件离线技能快照 | 本仓 `skills/` 中被 lock 列出的目录 | 只允许由 `scripts/vendor/skill_vendor.py update` 生成 |
30-
| 插件内部定制技能 | 本仓 `skills/` 中未被 lock 列出的目录 | 可在插件仓直接维护,vendor 会保留 |
30+
| 插件内部定制技能 | 本仓 `skills/` 中未被 lock 列出、但在 `plugin-local-skills.json` 显式登记的目录 | 可在插件仓直接维护,vendor 会保留;未登记目录会被拒绝 |
3131
| Hooks、linters、commands、MCP、运行脚本 | `codeguard-plugin` | 在插件仓开发、测试和发布 |
3232

3333
禁止直接修改 lock 管理的技能目录,否则离线/在线 vendor check 会失败。

‎kimi.plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codeguard",
3-
"version": "0.4.0",
3+
"version": "0.5.0",
44
"description": "Cross-language code lint enforcement for AI coding assistants (ZCode, Claude Code, Codex CLI, Kimi Code): Java, Rust, TypeScript, Python. PostToolUse hook auto-runs the native linter on every AI-written file and blocks on failure in strict mode.",
55
"author": {
66
"name": "Full Stack Skills / PartMe.AI"

‎plugin-local-skills.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"version": 1,
3+
"dest": "skills/",
4+
"skills": []
5+
}

0 commit comments

Comments
 (0)