Files
company-kb/.claude/commands/kb-check.md
yangqianqian 84f7950589 Initial commit: company-kb framework
- 完整的知识库框架(P0-P5 路线图)
- 12篇治理文档
- 工具脚本(kb-init.sh, kb-lint-fm.py, feishu-sync.py, kb-bot)
- 7个 Claude 命令
- 示例项目和测试项目(wanniu-l1)
- 契约文件(meta/kb-contract.yaml)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 18:24:39 +08:00

19 lines
855 B
Markdown
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: frontmatter 校验 + lint 体检
argument-hint: [可选:路径,默认全库]
---
跑知识库健康体检。
1. 执行:`python3 tools/kb-lint-fm.py $ARGUMENTS`(无参数则扫全库)。
2. 解读退出码:
- `0`:全绿,简报"检查 N 页0 错误"。
- `1`:有 frontmatter 错误(缺硬必填 / 未激活 type / enum 非法 / 派生必填缺失)。
- `2`:环境问题(缺 PyYAML → 提示 `pip install pyyaml`;缺契约文件)。
3. 对每条错误:
- **安全项**(补 title、补可推导字段、加 wikilink→ 你直接自动修,修完重跑确认。
- **有损项**(删页、合并、改 type、解决矛盾→ 列出来交用户拍板,**不擅自改**。
4. 简报修了什么、还剩什么需人处理。
校验规则一律以 `meta/kb-contract.yaml` 为准。