ewan-kb-git
Commit and version knowledge base layers (source, knowledgeBase, graph) to git.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Commit and version knowledge base layers (source, knowledgeBase, graph) to git.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
跨系统知识库查询枢纽。强制指定知识库名称查询,支持列出已有知识库。用法:/ewankb-hub list 列出知识库,/ewankb-hub <库名> [graph|kb|deep] <问题> 查询。
查询 ewankb 知识库。默认图谱查询,也可指定 kb 或 deep 双路对比模式。查询结果自动穿透到源代码层,验证规格与实现的一致性。
从 Java 后端代码 + Confluence 文档构建结构化业务知识库。
| name | Ewan-kb-git |
| description | Commit and version knowledge base layers (source, knowledgeBase, graph) to git. |
Version-control your knowledge base in four git-committed layers.
After running ewankb build, you want to commit the results to git. This skill handles:
Each layer has its own commit history and commit message convention:
Raw source material — documents and code snapshots. Append-only — never overwrite historical commits.
# After fetching new docs or updating repos
ewankb-git commit-source "chore: pull docs 2026-04-13"
Auto-discovered domain definitions (README.md, PROCESSES.md, domains.json). Overwritable — re-discovery creates new commits.
# After discover or knowledgebase
ewankb-git commit-domains "feat: re-discover domains after code update"
AI-refined knowledge files (flat by doc type, domain in frontmatter). Overwritable — each build creates a new commit.
# After extract or enrich
ewankb-git commit-kb "refactor: re-extract 订单管理 domain"
Graph data and analysis results. Overwritable — rebuilds are new commits.
# After build-graph
ewankb-git commit-graph "feat: add surprising connections for 订单管理"
# Full cycle: build then commit all layers
ewankb build
ewankb-git commit-all
This creates four separate commits (one per layer) with auto-generated messages.
<type>(<layer>): <description>
<optional body with details>
[skip-ci]
Types: feat, refactor, fix, chore, docs
Layers: source, domains, kb, graph, all
For a shared knowledge base (team collaboration):
main # Latest approved knowledge base
├── kb/
│ ├── proposal/ # WIP domain proposals
│ └── review/ # Under review
└── ...
Use feature branches for domain-level changes:
git checkout -b domain/订单管理
# make changes
git push -u origin domain/订单管理
# open PR to main
ewankb-git push
Pushes all layers to the configured remote.
Recommended .git/hooks/pre-commit:
#!/bin/sh
# Reject commits to graph/ if knowledgeBase/ is not committed
KB_HASH=$(git log -1 --format="%H" -- knowledgeBase/)
GRAPH_HASH=$(git log -1 --format="%H" -- graph/)
# Ensure graph is not ahead of kb
| Command | Description |
|---|---|
ewankb-git status | Show unstaged changes per layer |
ewankb-git log --layer kb | Show kb commit history |
ewankb-git diff <layer> | Show changes since last commit |
ewankb-git rollback <layer> | Revert last commit on layer |