Skip to content

quality: Glama评分优化 + 错误模式统一 + 文档修复 + CLAUDE.md 认知锚点#56

Merged
juice094 merged 14 commits into
mainfrom
docs/claude-cognitive-anchor
Jun 3, 2026
Merged

quality: Glama评分优化 + 错误模式统一 + 文档修复 + CLAUDE.md 认知锚点#56
juice094 merged 14 commits into
mainfrom
docs/claude-cognitive-anchor

Conversation

@juice094
Copy link
Copy Markdown
Owner

@juice094 juice094 commented May 18, 2026

变更摘要

Glama 评分优化(准备重新提交 awesome-mcp-servers)

  • server.json — 修复 JSON 语法错误,更正 License 为 AGPL-3.0-or-later,工具数 19→69,补全 69 个工具的完整列表
  • 新增 glama.json — Glama 平台归属认领
  • 6 个工具补全 JSON Schema 参数级 description(brief / impact / relations / workflow / known_limit / session)
  • 5 个工具补全 "Use this when / Do NOT use" 使用指南
  • MCP 初始化响应版本号从硬编码 "0.1.0"env!("CARGO_PKG_VERSION")
  • MCP 初始化增加客户端协议版本兼容性检查

错误处理统一

  • 所有 MCP 工具验证/业务错误从 Ok({"success": false, ...})anyhow::bail!()(涉及 6 个模块)
  • 修复 oplog 每次 MCP 调用重复打开文件 → OnceLock<Mutex<File>> 长生命周期句柄
  • index_health 静默错误丢弃 → tracing::warn 日志记录

代码卫生

  • 移除 src/search.rs 全局 #![allow(dead_code)],删除 3 处死代码常量

文档修复

  • README 断链修复、集成指南工具数量更新(38 → 69)、mcp-tools.md 重复条目移除

CLAUDE.md 认知锚点

  • 新增 .claude/CLAUDE.md 防失忆锚点文件,包含不可变事实、架构红线、已知架构 Gaps、会话启动校验清单

测试

476 passed, 0 failed, 5 ignored, 0 warnings

关联

juice094 and others added 12 commits May 18, 2026 13:48
Create `.claude/CLAUDE.md` as an anti-amnesia anchor for AI sessions.
This file is designed to survive context compression and contains:

- Immutable Facts table (version, tests, tools, schema, etc.)
- Architecture Guardrails (RF-1 through RF-7)
- Current Context (phase, gaps, active work)
- Known Architecture Gaps (distinguishing "not yet implemented" from "broken")
- Anti-amnesia Checklist for session startup
- Quick Reference commands and key file mappings

This addresses the systematic information loss problem identified in
context-compressed AI long-range work.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
project_context previously returned repo metadata, relations, and workflows
but omitted two high-signal fields: unmitigated known limits (risk layer) and
available skills. This meant AI callers had to make separate tool calls to
assess project health or discover capabilities.

- Add known_limits: top 20 unmitigated entries from L3 risk layer
- Add skills: top 20 registered skills with type/tags
- Update stale tool-count comment: 37 → 68
- Refresh CLAUDE.md gap tracker to reflect completed items

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Stable tier requires "unit-tested" per architecture guardrails.
query_repos, vault_search, and vault_read previously lacked
dedicated JSON-RPC-level tests, relying only on indirect scenario
coverage. This commit adds independent tests for each.

- test_tools_call_devkit_query_repos: empty registry + seeded repo
- test_tools_call_devkit_vault_search: keyword search with scan
- test_tools_call_devkit_vault_read: existing note + not-found error
- seed_repo() helper for lightweight entity insertion

Total tests: 485 → 488 (3 new)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
mcp-tools.md was severely outdated:
- Tool count said 40, actual is 68
- 4 tools mislabeled Experimental→Beta (code_metrics, module_graph, call_graph, dead_code)
- 3 tools mislabeled Stable→Beta (hybrid_search, project_brief)
- 1 tool mislabeled Stable→Experimental (session_recall)
- Missing categories: Index (3), Workflow (3), Relation (3), KnownLimit (2)
- Missing Vault tools: daily, graph, export, history
- Missing Session tools: 12 of 13 not listed

stable-tools/README.md also listed Beta/Experimental tools as Stable.
Deleted incorrect docs (project_brief.md, hybrid_search.md, session_recall.md)
and updated README to reflect the actual 5 Stable tools with test coverage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Centralized record of known issues, test coverage gaps, and
architectural debt. Includes 28 tools lacking invocation tests,
repo.rs 730-line remainder, vault search linear scan performance,
and missing document_convert tool. Resolved items archived with
version/commit references.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add JSON-RPC-level tests for high-frequency Beta tools:
- devkit_status: empty registry returns "fresh" overall
- devkit_workflow_list: empty registry returns count=0
- devkit_index: empty registry returns indexed=0

These tools are called frequently in real-world usage but previously
lacked dedicated test coverage, relying only on indirect exercise.

Total tests: 488 → 491 (3 new)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add Experimental-tier PDF/PPTX → Markdown conversion tool
(pdftotext / python-pptx pipeline). Includes:
- devkit_document_convert implementation with quality heuristics
- Registration in McpToolEnum (69 tools total)
- JSON-RPC invocation tests for 6 key tools (query_repos, vault_search,
  vault_read, status, workflow_list, index) plus document_convert error path
- README/AGENTS/CHANGELOG/KNOWN_ISSUES/mcp-tools.md/CLAUDE.md updates
- Cargo fmt pass

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Merge individual registry-* crates into unified devbase-registry crate
- Add edge/node/node_type types to devbase-core-types
- Add candle/ollama embedding backends
- Add field_parsers and frontmatter to skill-runtime-parser
- Add execution/params/skill_type to skill-runtime-types
- Add co_located/similarity to symbol-links
- Add index/version_vector to sync-protocol
- Add parser to vault-frontmatter and vault-wikilink
- Add resolver to workflow-interpolate
- Add definition/execution/step_type to workflow-model
- Update registry.rs and all registry submodules
- Add phase1 vault semantic index script
- server.json: 修复JSON语法,更新license为AGPL-3.0,工具数19→69,完整工具列表
- 新增 glama.json 用于Glama平台认领
- 6个工具补全JSON Schema参数级描述(brief/impact/relations/workflow/known_limit/session)
- 5个工具补全 "Use this when/Do NOT use" 使用指南
- MCP初始化响应版本号从硬编码"0.1.0" → env!("CARGO_PKG_VERSION")
- MCP初始化增加客户端协议版本兼容性检查
- 统一错误返回模式:所有验证/业务错误从 Ok({"success":false}) → anyhow::bail!
- 修复 oplog 每次MCP调用重复打开文件 → OnceLock<Mutex<File>> 长生命周期句柄
- 移除 src/search.rs 全局 #![allow(dead_code)],删除2处死代码常量
- index_health 静默错误丢弃 → tracing::warn 记录
- 修复 README 断链、集成指南过期工具数(38→69)、mcp-tools.md重复条目

476 passed, 0 failed, 0 warnings
@juice094 juice094 changed the title docs(claude): add project-level CLAUDE.md cognitive anchor quality: Glama评分优化 + 错误模式统一 + 文档修复 + CLAUDE.md 认知锚点 Jun 3, 2026
juice094 added 2 commits June 3, 2026 20:41
- frontmatter.rs: replace 4 .expect() calls with if-let patterns
- resolver.rs: replace .expect() with match-based fallback chain
- cargo fmt applied to all modified files

All invariant checks pass: G5, T11, T12, Module drill.
@juice094 juice094 merged commit 1c57f09 into main Jun 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant