knowledge-base
/knowledge-base
Use when adding, moving, archiving, or auditing documentation in any workspace that uses the kb protocol — including questions like "is this doc current?", "where did spec X go?", "archive the old specs", or when the docs tree looks messy. Also use before writing a new spec/plan, and when a session needs the authoritative status of a design document.
- Author
- HalloFei ↗
- Repository
- Knowledge-Base-Management ↗
- Licence
- MIT
- Last repository change
- 03.11.2026
Assessment and security
- Files in this package
- 6
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 03.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when adding, moving, archiving, or auditing documentation in any workspace that uses the kb protocol — including questions like "is this doc current?", "where did spec X go?", "archive the old specs", or when the docs tree looks messy. Also use before writing a new spec/plan, and when a session needs the authoritative status of a design document.
Triggers from the description
Original author description
Use when adding, moving, archiving, or auditing documentation in any workspace that uses the kb protocol — including questions like "is this doc current?", "where did spec X go?", "archive the old specs", or when the docs tree looks messy. Also use before writing a new spec/plan, and when a session needs the authoritative status of a design document.
How it works
- Non-negotiables
- Commands
- New document
- Archiving
- When kb check fails
- Reporting
SKILL.md preview
---
name: knowledge-base
description: Use when adding, moving, archiving, or auditing documentation in any workspace that uses the kb protocol — including questions like "is this doc current?", "where did spec X go?", "archive the old specs", or when the docs tree looks messy. Also use before writing a new spec/plan, and when a session needs the authoritative status of a design document.
---
# Knowledge base protocol (kb)
One engine, one schema, many workspaces. **The rules live in this skill directory;
a workspace holds only paths.**
- Engine: `scripts/kb.py` (stdlib only, Python 3.8+)
- Rules: `schema.yaml` (status vocabulary, per-type lifecycle, transitions, index columns)
- Decisions: `decisions.md` (why index-as-truth, why superseded/historical is a field, why final is type-scoped)
## Non-negotiables
1. **Never hand-edit the indexed state.** Change status via `kb set-status` or `kb archive`;
the tables in `docs/INDEX.md` and `docs/archive/INDEX.md` are generated.
2. **Archived content is frozen.** Only the retrieval flow may reopen it: move back with
`kb`/git, mark a new revision, then edit.
3. **Workspaces never copy the schema.** If a workspace needs different paths it writes
`docs/kb.yaml` (paths only, no rules).
4. **Status vocabulary** (closed set): draft / active / final / archived.
- `final` is allowed **only** for plans and reviews (terminal records).
- living docs (framework, specs, knowledge, ops) go draft → active → archived.
- `superseded` vs `historical` is the `superseded_by` column of an archived row,
not a status.
## Commands
```bash
KB=~/.dsh/skills/knowledge-base/scripts/kb.py
python $KB check # validate: index<->tree, statuses, sha256 freeze, links
python $KB index # regenerate both tables (preserves statuses/reasons)
python $KB status docs/specs/x.md # what is it?
python $KB set-status docs/specs/x.md final
python $KB archive docs/plans/y.md --superseded-by docs/specs/z.md --reason superseded
python $KB hook --install # install the git pre-commit gate (runs check)
```
Run from the workspace root (or pass `--root DIR`). No config? `kb` walks up looking
for `docs/kb.yaml`.
## New document
1. Put it in the type directory (`docs/specs/`, `docs/knowledge/`, ...).
2. `python $KB index` — it appears with the type's default status.
3. Set the real status with `kb set-status`; for a new spec the default is `draft`.
## Archiving
1. `python $KB archive <path> [--superseded-by <successor>] [--reason <vocab>]`
(uses git mv when tracked, then rebuilds both tables and records the sha256).
2. Never edit the file after archiving; `kb check` fails on any byte change.
## When `kb check` fails
- "missing from active index" → run `kb index`, then set the intended status.
- "invalid status" → set-status to a value allowed for that type.
- "frozen archive changed" → you edited an archived file; retrieve it properly.
- "broken link" → fix the referring document (active docs only; archived links may dangle).
## Reporting
After any change, run `kb check` and paste its one-line result. Do not claim the docs
tree is consistent without that line.
Files in this package (6)
- .gitignore 1 KB
- LICENSE 1 KB
- README.md 4 KB
- SKILL.md 3 KB
- decisions.md 5 KB
- schema.yaml 2 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · HalloFei/Knowledge-Base-Management | 95 | MIT |
| FrancoStino/opencode-skills-collection | 100 | MIT |
| bis-med-it/marco-BIS | 100 | Apache-2.0 |
| HG-ha/Argusai | 100 | GPL-3.0 |
| rommapp/romm | 100 | AGPL-3.0 |
| AI-Business-Tools/claude-code | 100 | MIT |
| sickn33/agentic-awesome-skills | 100 | MIT |
| wonderwhy-er/DesktopCommanderMCP | 100 | MIT |
| mkurman/zorai | 100 | MIT |
Database snapshot: 13.11.2026 · package version 42680fb7a977 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90rpi-spec-sync
Detect spec drift and sync .rpi/specs/ to the current codebase — rewrite, rename, merge, or archive obsolete specs. Use when user says 'sync the specs', 'the spec is stale', 'specs need updating', or 'clean up old specs'. - 100create-specs
Specification-driven workflow with human approval gates for new analysis features. Use when starting a feature, or when asked to write a spec, plan, task list, or status file. Provides templates for spec.md, plan.md, tasks.md, and status.md. - 95knowledge-base-builder
Build my project knowledge base, document this project, write the PRD and architecture notes from my calls, make a docs pack for AI, what did we decide and when. Ingests one project's meetings, threads, on-screen artifacts and documents from Littlebird capture and produces a… - 100spec
Drives interactive requirement discovery to produce spec files. Use when the user says "spec this", "write specs", "create specs", or "run the spec skill". - 100ctx-spec
Scaffold a feature spec from the project template. Use when planning a new feature, writing a design document, or when a task references a missing spec. - 90writing-specs
Use when agent_specs is on (or the user asks for a spec) to write what done looks like and why before a plan or implementation.