You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 70db212
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# partme-codeguard-plugin Plugin
2
2
3
+
> Parity note: `README.md` and `README.zh-CN.md` must stay structurally aligned (heading levels, local links, version strings) — enforced by `tests/test_readme_parity.py`; mirror any structural edit into both files in the same commit.
4
+
3
5
<palign="center">
4
6
<imgsrc="assets/banner.svg"alt="partme-codeguard-plugin — Make AI-written code pass lint on first try. Supports ZCode, Claude Code, Codex CLI, and Kimi Code."width="100%">
@@ -40,7 +42,7 @@ It is a **constraint-type plugin** for AI assistants, not a productivity-type pl
40
42
| AI uses `unwrap()` in Rust business code |`cargo clippy -- -D warnings` runs on each `.rs` file |[Architecture §2.1](docs/partme-codeguard-plugin-Architecture.zh_CN.md)|
41
43
| AI introduces `any` and unused vars in TypeScript |`eslint --max-warnings 0` blocks the AI |`linters/eslint/recommended.cjs`|
42
44
| "did it pass lint?" is asked manually after every AI session | Stop hook summarizes lint pass/fail counts |`hooks/stop_summary.py`|
43
-
| pre-commit and CI catch issues 30s+5min late, by then the AI has moved on | Three-layer defense: hook (<2s) → pre-commit (30s) → CI (5min) |[Technical roadmap §1](docs/5、partme-codeguard-plugin-技术方案与路线.md)|
45
+
| pre-commit and CI catch issues 30s+5min late, by then the AI has moved on | Three-layer defense: hook (<2s) → pre-commit (30s) → CI (5min) |[Technical roadmap §1](docs/technical-roadmap.zh_CN.md)|
44
46
45
47
## At a glance
46
48
@@ -65,7 +67,7 @@ AI code that passes lint on first try
65
67
|---|---|
66
68
| Plugin ID |`partme-codeguard-plugin`|
67
69
| Hosts | ZCode, Claude Code, Codex CLI, Kimi Code |
68
-
| Current version |`0.5.4`|
70
+
| Current version |`0.6.7`|
69
71
| ZCode manifest |`.zcode-plugin/plugin.json`|
70
72
| Codex manifest |`.codex-plugin/plugin.json`|
71
73
| MCP server | Not published until the SDK-backed protocol implementation is ready; use the CLI and hooks |
@@ -104,7 +106,7 @@ The commit gate is pre-wired in the pre-commit template (`stages: [commit-msg]`)
104
106
105
107
### External skill source
106
108
107
-
The 68 portable skills are authored in [full-stack-skills/codeguard-skills](https://github.com/full-stack-skills/codeguard-skills), not independently inside this plugin. This repository vendors the complete `v0.1.0` snapshot so installed plugins work offline:
109
+
The 68 portable skills are authored in [full-stack-skills/codeguard-skills](https://github.com/full-stack-skills/codeguard-skills), not independently inside this plugin. This repository vendors the complete `v0.1.2` snapshot so installed plugins work offline:
108
110
109
111
-`skills.lock.json` pins the upstream repository, immutable tag, resolved commit, managed skill names, and per-skill SHA-256 digests.
110
112
-`python3 scripts/vendor/skill_vendor.py update` refreshes only the skill names listed in the lock.
@@ -151,6 +153,8 @@ PostToolUse is the **highest-ROI** layer because it gives the AI feedback **whil
151
153
152
154
### CLI (codeguard)
153
155
156
+
`bin/codeguard` is a bash dispatcher: each subcommand (`check` / `fix` / `cve` / `dockerfile` / `detect`) routes to the matching `scripts/*.py` implementation.
### Requirement: README structural parity SHALL be enforced by tests/test_readme_parity.py
4
+
5
+
`tests/test_readme_parity.py` SHALL assert that `README.md` and `README.zh-CN.md` have: (1) identical heading-level sequences outside fenced code blocks, (2) identical sets of local link targets, and (3) identical sets of `x.y.z` version strings. Any single-sided edit to one README SHALL fail this test.
6
+
7
+
#### Scenario: The technical roadmap doc is renamed
8
+
9
+
-**WHEN**`docs/5、partme-codeguard-plugin-技术方案与路线.md` is renamed and only `README.md` links are updated
10
+
-**THEN**`test_readme_parity` fails on the local-link-target set difference
11
+
12
+
#### Scenario: The current version row is bumped in one language only
13
+
14
+
-**WHEN**`| Current version | 0.6.7 |` is updated in `README.md` but `README.zh-CN.md` still says `0.5.4`
15
+
-**THEN**`test_readme_parity` fails on the version-string set difference
16
+
17
+
### Requirement: README mirror edits SHALL land in the same commit
18
+
19
+
Any change to one README's structure, links, or version strings SHALL be mirrored into the other README in the same commit. Both files SHALL carry a parity note near the top pointing at `tests/test_readme_parity.py`.
20
+
21
+
#### Scenario: A contributor adds a new section to README.md
22
+
23
+
-**WHEN** a new `## Section` is added to `README.md` with links and version strings
24
+
-**THEN** the same commit adds the translated `## 章节` to `README.zh-CN.md` at the same position, and CI passes
0 commit comments