kb
Write and keep the project knowledge base — decisions, failures, module notes, runbooks, calls; validate, fix drift, find gaps. Use for "запиши решение", "обнови заметку", "record a decision", "kb".
- License 许可
- MIT
- 最近更新
- 2026-11-08
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- kb
- description
- Write and keep the project knowledge base — decisions, failures, module notes, runbooks, calls; validate, fix drift, find gaps. Use for "запиши решение", "обнови заметку", "record a decision", "kb".
03 SKILL.md 正文
The knowledge base
One store for all projects: ~/projects-memory-bank/<project>/, a local git repository
(D023). Notes are English, the owner hears about them in Russian (D025).
Triggers
- RU: «запиши решение», «зафиксируй», «обнови заметку», «что в базе устарело»
- EN: "record a decision", "write it down", "update the note", "what is stale"
What goes in
Only what the code cannot tell: decisions and their why, failures, call outcomes, domain pitfalls, people, external constraints (D024). A note that restates code is not written. Day logs, raw transcripts and edit history stay out. A decision note is written only when the choice was contested, the obvious option was wrong for a reason that is not obvious, or a later session could plausibly undo it. Project facts never go to Claude's memory, even on «запомни» (D027). That memory holds facts about the owner only.
0. A project without a folder
bedrock kb init --code ACME creates the minimal folder: entry, summary, status and the
indexes. The code is the prefix of every decision and failure code (ACME-D12).
Done when: bedrock kb validate prints [].
1. Write a note
- Pick the template from
templates/kb/: decision, failure, module, runbook, call, faq, status, handoff. - One topic per note. Split it when it grows past the validator's limit.
- Every fact carries its source (file:line, commit, call time, a message link) and an evidence mark: verified at the source, secondary, hypothesis, or needs a third party.
- Link it from its index (
decisions.md,architecture.md, …). An unlinked note is an orphan. - A module note sets
covers:(the paths), optionalanchors:(symbols) andverified_at:(the commit it was checked at). Done when:bedrock kb validateis clean.
2. Decisions are never edited
A changed decision is a new note. The old one gets status: superseded and a link to its
successor. A link that treats a superseded decision as current is flagged by the validator.
Done when: the new note validates and the old one says status: superseded.
3. Keep it fresh (D026)
The session start hook does the detection. The session does the fix.
- Session start lists stale module notes (
bedrock kb drift) and modules without a note (bedrock kb uncovered, when the project setskb.roots). - Before closing a block, run
bedrock kb driftfor the touched modules. Fix a stale note in one of two ways:- update the note's Boundaries, Rules or Pitfalls;
- add one line: "verified, nothing to change, because …".
Then set
verified_atto the new commit. A newverified_atalone is never a verification: drift compares the note's content, not its stamp.
- Every two weeks, with the architecture review: delete dead notes, re-check orphans and
notes long untouched.
Done when:
bedrock kb driftlists nothing for the touched modules.
4. Commit the store
git -C ~/projects-memory-bank add <project> && git -C ~/projects-memory-bank commit -m "docs(<project>): <what>". Stop treats uncommitted notes as an unclosed phase. The store is
never pushed. Only the encrypted backup leaves the machine (bedrock backup, D030).
Done when: git -C ~/projects-memory-bank status --short prints nothing.
Finding things
bedrock kb backlinks <note>: what links to a note.grep -rl <word> ~/projects-memory-bank/<project>: no vector search (D023).
04 同仓库更多 Skills
writing
Write or rewrite skills, agent definitions, briefs and rule files by the D013 rules, then check them. Use for "напиши скилл", "поправь агента", "write a skill", "edit this brief".
triage
Bug triage — reproduce each report on the current version, group duplicates, set priority, decide fix, defer or decline. Use for "разбери баги", "что с репортами QA", "triage", "new bug reports".
start
Start a project with bedrock — a new one by interview, or an existing one by onboarding; writes the base, AGENTS.md, workspace settings and verified commands. Use for "новый проект", "подключи проект", "start a project".
review
Review gate for a finished block — deterministic checks, code review, plan-compliance review, silent fixes, rounds until clean. Use for "проверь", "ревью", "review this", before any PR.
retro
Weekly retro — read the week's logs, agents, reviews and failures, find what repeats, tune the system, plan a realistic next week. Use for "ретро", "итоги недели", "retro", "how did the week go".
night
Autonomous work until morning — a pre-sleep check, the allowed list, auto-continue with fuses, a watchdog, a morning report. Use for "автономно до утра", "поработай ночью", "work overnight".