meta-validate-context
Use when auditing the freshness of `.claude/rules/subsystem-*.md` files against current codebase state, or when a subsystem has undergone significant change.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 15
- Forks
- 1
01 前言 Front Matter
- name
- meta-validate-context
- triggers
- [ "validate context", "audit subsystem rules", "check subsystem rules", "freshness of rules" ]
- description
- Use when auditing the freshness of `.claude/rules/subsystem-*.md` files against current codebase state, or when a subsystem has undergone significant change.
- argument-hint
- all | subsystem-name
- user-invocable
- true
03 SKILL.md 正文
Validate Context Rules
Check .claude/rules/subsystem-*.md files match current codebase.
Workflow
For each subsystem-*.md rule file:
- Read the rule — Extract type names, module paths, function names, error variants
- Grep the codebase — Verify each reference exists
- Check for new additions — Find new public types/modules not in rule
- Report — List stale references + missing additions
Subsystem Rules to Check
| Rule | Key References to Verify |
|---|---|
subsystem-cli.md |
CLI context struct, command enum variants, output trait |
subsystem-cli-api.md |
Report data types, output trait conventions |
subsystem-cli-commands.md |
Documented command surface vs implemented commands |
subsystem-file-structure.md (+ its parts: subsystem-install-layout-*.md, subsystem-vendor-paths.md, subsystem-client-detection.md, subsystem-install-state.md, subsystem-path-anchors.md) |
Storage layout, data-root constraints; install layout, anchors and state in the parts |
subsystem-tests.md |
Fixture names in conftest.py, test file names, runner methods, helper params |
Subsystem rules are provisional placeholders while the implementation is
scaffolded — verify against current src/ as code lands.
Verification Commands
# Check if a type still exists
grep -r "pub struct TypeName" src/
grep -r "pub enum TypeName" src/
# Check if a module still exists
ls src/module_name/
# Check for new public types not in the rule
grep -rn "^pub struct\|^pub enum\|^pub trait" src/ | grep -v test
Output Format
## Context Validation Report
### subsystem-cli.md
- OK: [type] still present
- STALE: [type] — renamed to [new_name] or removed
- MISSING: [new_type] — not documented in rule
### subsystem-file-structure.md and its parts
...
When to Run
- After big refactors
- Before major feature branches
- Part of
/code-checkaudits - Monthly
04 同仓库更多 Skills
rca
Use when a bug ticket, GitHub issue or error report needs a root cause analysis before code is touched — "is this a bug", "why does this fail". Read-only. Gives a verdict (bug or not-a-bug kind), file:line evidence, ruled-out hypotheses, other affected sites, fix direction and size. A ticket, not a diff (hex-review).
fix
Use when a bug ticket or GitHub issue should go from report to an approved fix plan — "plan a fix", "fix this issue". Root-causes it via rca, then plans in plan mode with the failing regression test first. Routes to hex-plan instead when the fix is large or moves an interface contract.
p9-skill
Principle 9 differential fixture skill (v2).
p9-member
Bundle member skill for the Principle 9 fixture (v2).
p9-hookish
Hook-free skill carrying an ignored hook.toml (v2).
p9-skill
Principle 9 differential fixture skill (v1).