docs: symlink CLAUDE.md to AGENTS.md and refresh agent guide

Claude Code and Codex now read identical guidance through a single source
of truth. AGENTS.md absorbs the only CLAUDE.md-unique rule (README
brevity), merges the Skill Vs Script decision table into Skill Design
Rules, and refreshes the validator description after the verify_skills.sh
to verify_skills.py migration.
This commit is contained in:
Tw93
2026-05-21 11:40:59 +08:00
parent 010de7ed96
commit 8d301ec0ce
3 changed files with 9 additions and 46 deletions
+8 -11
View File
@@ -1,6 +1,6 @@
# Waza Agent Guide # Waza Agent Guide
> 全局规则在 `~/.claude/CLAUDE.md`。本文件只放仓库地图、Skill vs Script 判定、Skill Design Rules、Distribution Rules、Adding/Changing 流程、Verification、Commit And Release。 This file is the canonical agent guide for the Waza repository. `CLAUDE.md` is a symlink to it, so Claude Code and Codex see identical content. Edit this file; do not edit `CLAUDE.md`.
## Project ## Project
@@ -19,7 +19,7 @@ Waza is a skill collection for engineering workflows. The repository contains ei
- `packaging.allowlist` - default-deny list of paths that ship in `waza.zip`. New shippable assets must be added here explicitly; everything else is excluded. - `packaging.allowlist` - default-deny list of paths that ship in `waza.zip`. New shippable assets must be added here explicitly; everything else is excluded.
- `.github/workflows/` - public test and release automation. `release.yml` runs `make test` before `make package` so the tagged commit is gated by the same suite as PRs. - `.github/workflows/` - public test and release automation. `release.yml` runs `make test` before `make package` so the tagged commit is gated by the same suite as PRs.
- `scripts/build_metadata.py` - codegen for marketplace.json, README install URLs, and installer-script `WAZA_REF` defaults. Run via `make regenerate`; CI checks drift via `make verify-generated`. - `scripts/build_metadata.py` - codegen for marketplace.json, README install URLs, and installer-script `WAZA_REF` defaults. Run via `make regenerate`; CI checks drift via `make verify-generated`.
- `scripts/verify_skills.py` - frontmatter, reference, marketplace, resolver, link, and trigger-overlap validation. `scripts/verify-skills.sh` is a thin shell wrapper that adds a few grep checks (README install string, rule-file integrity, attribution leaks). - `scripts/verify_skills.py` - the only validator entrypoint. Covers frontmatter, references, marketplace, resolver, links, table pipes, trigger overlap, rule-file presence, README install string, English coaching guard, and AI-attribution leak detection.
- `scripts/package-skill.sh` + `scripts/packaging_filter.py` - build `dist/waza.zip` from `packaging.allowlist`. - `scripts/package-skill.sh` + `scripts/packaging_filter.py` - build `dist/waza.zip` from `packaging.allowlist`.
- `scripts/setup-rule.sh` + `scripts/setup-statusline.sh` - public install helpers; `WAZA_REF` defaults are codegen-pinned to the current release tag. - `scripts/setup-rule.sh` + `scripts/setup-statusline.sh` - public install helpers; `WAZA_REF` defaults are codegen-pinned to the current release tag.
- `Makefile` - smoke discovery and packaging entrypoints. Adding a `tests/test_<name>.sh` file is enough to create a `smoke-<name>` target automatically. - `Makefile` - smoke discovery and packaging entrypoints. Adding a `tests/test_<name>.sh` file is enough to create a `smoke-<name>` target automatically.
@@ -36,7 +36,7 @@ make package # build dist/waza.zip from packaging.allowlist
Run `make test` before meaningful changes to skill behavior, packaging, scripts, marketplace metadata, or anything generated. If you edited only frontmatter or VERSION, also run `make regenerate` and commit the resulting `.claude-plugin/marketplace.json` / `README.md` / installer changes together with your source edits. Run `make test` before meaningful changes to skill behavior, packaging, scripts, marketplace metadata, or anything generated. If you edited only frontmatter or VERSION, also run `make regenerate` and commit the resulting `.claude-plugin/marketplace.json` / `README.md` / installer changes together with your source edits.
## Skill Vs Script ## Skill Design Rules
Before adding a capability, decide the layer deliberately: Before adding a capability, decide the layer deliberately:
@@ -47,15 +47,11 @@ Before adding a capability, decide the layer deliberately:
| Is it a lookup, list, status check, or invariant check? | Script or rule | Skill | | Is it a lookup, list, status check, or invariant check? | Script or rule | Skill |
| Does behavior shift with conversation context? | Skill | Script or rule | | Does behavior shift with conversation context? | Skill | Script or rule |
Examples: `verify-skills.sh` is a script; `rules/english.md` and `rules/chinese.md` are rules; `/think`, `/hunt`, `/check`, and `/health` are skills. Examples: `verify_skills.py` is a script; `rules/english.md` and `rules/chinese.md` are rules; `/think`, `/hunt`, `/check`, and `/health` are skills.
- `rules/anti-patterns.md` owns cross-skill always-on behavioral guardrails (AI failure modes that apply regardless of active skill).
- Per-skill gotchas stay in each `skills/*/SKILL.md` Gotchas table. A gotcha belongs in `rules/anti-patterns.md` only when it applies identically across all eight skills.
## Skill Design Rules
- Put adaptive, judgment-heavy workflows in skills. - Put adaptive, judgment-heavy workflows in skills.
- Put deterministic checks, lookups, and table-driven validation in scripts. - Put deterministic checks, lookups, and table-driven validation in scripts.
- `rules/anti-patterns.md` owns cross-skill always-on behavioral guardrails (AI failure modes that apply regardless of active skill). Per-skill gotchas stay in each `skills/*/SKILL.md` Gotchas table; a gotcha belongs in `rules/anti-patterns.md` only when it applies identically across all eight skills.
- Keep `skills/RESOLVER.md` in sync when a skill description, trigger, or scope changes. - Keep `skills/RESOLVER.md` in sync when a skill description, trigger, or scope changes.
- Keep each `description` concrete enough for automatic routing. - Keep each `description` concrete enough for automatic routing.
- Avoid broad skills that mix unrelated workflows. - Avoid broad skills that mix unrelated workflows.
@@ -64,6 +60,7 @@ Examples: `verify-skills.sh` is a script; `rules/english.md` and `rules/chinese.
- Waza `check` must remain project-aware without depending on unpublished local files. It extracts commands, generated artifacts, risk areas, and release rules from the target diff, public docs, manifests, CI config, and user-provided context. - Waza `check` must remain project-aware without depending on unpublished local files. It extracts commands, generated artifacts, risk areas, and release rules from the target diff, public docs, manifests, CI config, and user-provided context.
- Keep distribution files self-contained for Claude Desktop and plugin installs. The release ZIP may inline sub-skill bodies into a generated root `SKILL.md`; source-of-truth skill content remains under `skills/*/SKILL.md`. - Keep distribution files self-contained for Claude Desktop and plugin installs. The release ZIP may inline sub-skill bodies into a generated root `SKILL.md`; source-of-truth skill content remains under `skills/*/SKILL.md`.
- If a `templates/` directory is added, keep reusable public scaffolds there and include it in packaging/validation rules deliberately. - If a `templates/` directory is added, keep reusable public scaffolds there and include it in packaging/validation rules deliberately.
- Keep the README short: a new reader should understand Waza in 30 seconds. Detailed rules belong in `skills/<name>/SKILL.md`, `rules/*.md`, or this file. Do not stack promotional sections at the top.
## Adding Or Changing A Skill ## Adding Or Changing A Skill
@@ -99,9 +96,9 @@ Use this path for any new skill or meaningful behavior change:
## Verification ## Verification
- Skill behavior changes: run `./scripts/verify-skills.sh` and the relevant smoke target. - Skill behavior changes: run `python3 scripts/verify_skills.py` and the relevant smoke target.
- Packaging changes: run `make package` and inspect the generated archive. - Packaging changes: run `make package` and inspect the generated archive.
- Marketplace, resolver, or root dispatcher changes: run `./scripts/verify-skills.sh` and confirm every marketplace source points at an existing skill directory. - Marketplace, resolver, or root dispatcher changes: run `python3 scripts/verify_skills.py` and confirm every marketplace source points at an existing skill directory.
- Non-trivial diffs: run the review workflow before release handoff. - Non-trivial diffs: run the review workflow before release handoff.
- Documentation-only changes: check internal links and command names. - Documentation-only changes: check internal links and command names.
-29
View File
@@ -1,29 +0,0 @@
# Waza
Skill collection for engineering workflows. 8 skills: `think` / `design` / `check` / `hunt` / `write` / `learn` / `read` / `health`.
## 启动前
- 全局规则在 `~/.claude/CLAUDE.md`(写作 / 提交 / 安全 / 验证 / 响应风格)。
- 仓库地图、Skill vs Script 判定、Skill Design Rules、Distribution Rules、Adding Or Changing A Skill、Verification、Commit And Release 全在 `AGENTS.md`
- 改 skill 前先看 `skills/RESOLVER.md` 的路由表。
## 常用命令
```bash
make test # 改 skill 行为 / packaging / scripts / marketplace 前必跑
make package # 构建 Claude Desktop 分发 ZIP
./scripts/verify-skills.sh # 验证 skill 元数据一致性
```
## 项目独有硬规则
- 改任何 skill 的 description / trigger / scope 时,**同步更新** `skills/RESOLVER.md``.claude-plugin/marketplace.json`,三个地方必须一致。
- 保持 Waza 通用:不要硬编个人 home 路径、私有凭证或本机工作流。项目特异性应当从公开 repo context 在运行时提取。
- 加新 skill 不要在仓库根添加 `SKILL.md`,会阻止嵌套 skill 发现。
- 大段实现不要塞在 Makefile heredoc 或 shell heredoc 里;放到 `tests/test_*.sh` 或可导入的 `.py` 文件,再用薄 shell wrapper 调用。
- 一次性的 review 报告不要直接进仓库长期文档;只把稳定规则沉淀到 `AGENTS.md``rules/``skills/*/references/` 或校验脚本。
- 从具体项目复盘 Waza 时,只抽象可迁移的工作流规则;项目命令、路径、安全边界和 release 细节留在该项目自己的公开上下文。
- 本地未跟踪的 agent 指令只能做私有 overlay需要未来 agent 或贡献者遵守的规则必须进入已跟踪、可分发的文档或 skill/rule 文件。
- 发版完成后给 GitHub release 加 6 个正向反应(`+1` / `laugh` / `heart` / `hooray` / `rocket` / `eyes`),通过 `gh api` 操作。**永远不加** `-1` / `confused`
- README 顶部不堆长文English Coaching 等推广段。README 的目的是让人 30 秒读完知道 Waza 是什么,详细规则归到对应 `skills/<name>/SKILL.md``rules/*.md`
Symlink
+1
View File
@@ -0,0 +1 @@
AGENTS.md
-6
View File
@@ -1,6 +0,0 @@
#!/usr/bin/env bash
# Verify dispatcher routing table and RESOLVER.md cover every skill.
# Thin shell wrapper; logic lives in scripts/check_routing_drift.py.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
exec python3 "$ROOT/scripts/check_routing_drift.py" --root "$ROOT" "$@"