BIZ-17: QMD和Wiki工具链测试报告与检索指南

- docs/qmd-verification-report.md: QMD功能验证(技能可用,CLI需修复Node.js原生模块兼容性)
- docs/wiki-toolchain-test-report.md: Wiki 5工具完整测试(4通过/1需注意前置条件)
- docs/agent-kb-retrieval-guide.md: Agent知识库检索决策指南(含工具选择/查询构造/缺口上报)
- scripts/wiki-lint-check.sh: Wiki质量自动化检查脚本

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
2026-06-22 20:20:59 +08:00
parent 0dee611e31
commit dc00661a34
4 changed files with 521 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
#!/bin/bash
# wiki-lint-check.sh — Wiki 知识库质量检查脚本
#
# 用途: 定期运行 wiki_lint 检查知识库质量,生成报告
# 用法: ./scripts/wiki-lint-check.sh [--report-dir <dir>]
#
# 建议通过 cron 定期执行,例如每日凌晨:
# 0 2 * * * cd /path/to/EnterpriseArchitect && ./scripts/wiki-lint-check.sh
set -euo pipefail
REPORT_DIR="${REPORT_DIR:-/tmp/wiki-lint-reports}"
TIMESTAMP=$(date '+%Y-%m-%d_%H%M%S')
REPORT_FILE="${REPORT_DIR}/wiki-lint-${TIMESTAMP}.md"
mkdir -p "$REPORT_DIR"
echo "=== Wiki Lint Check ==="
echo "时间: $(date '+%Y-%m-%d %H:%M:%S %Z')"
echo "报告路径: $REPORT_FILE"
echo ""
# 运行 wiki_lint(通过 OpenClaw CLI
# 注意: 此脚本需在 OpenClaw 环境中执行
LINT_RESULT=$(openclaw skill wiki-lint 2>&1) || true
# 生成报告
cat > "$REPORT_FILE" << EOF
# Wiki Lint 检查报告
**检查时间**: $(date '+%Y-%m-%d %H:%M:%S %Z')
**执行主机**: $(hostname)
**执行用户**: $(whoami)
---
## 检查结果
\`\`\`
${LINT_RESULT:-No output from wiki_lint}
\`\`\`
---
## 状态
EOF
if echo "$LINT_RESULT" | grep -qi "error\|fail\|issue"; then
echo "**状态**: ⚠️ 发现问题,需处理" >> "$REPORT_FILE"
echo ""
echo "⚠️ Wiki Lint 发现问题,请检查: $REPORT_FILE"
else
echo "**状态**: ✅ 无问题" >> "$REPORT_FILE"
echo ""
echo "✅ Wiki Lint 检查通过"
fi
echo "报告已生成: $REPORT_FILE"
# 清理 30 天以前的旧报告
find "$REPORT_DIR" -name "wiki-lint-*.md" -mtime +30 -delete 2>/dev/null || true