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>
This commit is contained in:
18
.claude/commands/kb-check.md
Executable file
18
.claude/commands/kb-check.md
Executable file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
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` 为准。
|
||||
Reference in New Issue
Block a user