All notable changes to AI Knowledge Engine will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
instructions_version field in deployed kb.config.yml should match this VERSION.
On mismatch, kb_upgrade.py (Phase 4) helps migrate.
🤖 Note for AI agents reading this file: the entries below are historical and may reference scripts/files that no longer exist by those names (e.g.,
install.shwas renamed tofinalize.shin 0.9.1). For the current canonical state, always rely on what is actually present inknowledge-base/shell/and the live instruction modules, not on CHANGELOG history. The## [Unreleased]section reflects pending work only; the latest released version is the source of truth.
- Out-of-the-box media processing (transcription, OCR, archives).
knowledge-base/scripts/kb_stt.py— speech-to-text for audio/video. Default backend isfaster-whisper, which decodes audio via bundled PyAV, so no systemffmpegis required on macOS/Windows/Linux. Fixes the common macOS Homebrew PATH failure ("ffmpeg not found"). Falls back toopenai-whisperwhen configured. Graceful degradation: missing backend → review queue with an OS-specific install hint.knowledge-base/scripts/kb_ocr.py— OCR for images/scans. Default backendrapidocr-onnxruntime(no system deps); Tesseract optional.- Archive unpacking (
.zip,.tar,.tar.gz) intoraw/unsorted/for re-ingestion, with a zip-bomb safety cap. knowledge-base/templates/requirements-media.txt— optional media deps.media:section inkb.config.yml(stt / ocr / archives).knowledge-base/15_MEDIA_PROCESSING.md— contract module.kb_doctor.pynow reports STT/OCR/ffmpeg readiness.
knowledge-base/scripts/kb_reindex.py— cross-platform (pure-Python) reindex orchestrator so the pipeline runs on Windows without Git Bash/WSL. The watcher now uses it;reindex.batdelegates to it.kb_common.find_ffmpeg()(cross-platform, probes/opt/homebrew/binetc.) andos_install_hint()..cursor/rules/— repo rules for AI agents (architecture/privacy/ cross-platform + media handling).docs/ROADMAP.md— phased roadmap with task checklistsVERSIONfile (semver of instructions)CHANGELOG.mddocs/MAINTENANCE.md— contributor rules for keeping instructions/scripts/translations in sync- Role templates:
knowledge-base/examples/psychologist-gestalt.ymlknowledge-base/examples/music-video-director.ymlknowledge-base/examples/battle-rap-producer.ymlknowledge-base/examples/viral-short-form-veo.ymlknowledge-base/examples/russian-software-engineering-student.ymlknowledge-base/examples/startup-opportunity-explorer.yml
- Agent instructions now route chat-uploaded files into
raw/*/unsorted/only after user confirmation and require a user question before low-signal files are extracted intoknowledge/. kb_ingest.pynow mechanically handles thestt,ocr, andarchivestrategies (previously declared but unimplemented), and recognizes many more audio/video/image/archive extensions. Silentexcept: passblocks in NLP enrichment replaced with debug logging (--verbose).03_PIPELINE.mdand01_PREREQUISITES.mdupdated:ffmpeg/tesseractare now genuinely optional (only for alternative backends); the defaults need no system tools.- CI remains intentionally disabled: this repo is a download-only template that
is never deployed, so
.github/workflows/ci.yml.disabledstays off and is documented as such (runpytestlocally instead). scripts/kb_upgrade.pysyncs the new scripts (kb_stt,kb_ocr,kb_reindex) and the previously-missingkb_populate.
README.mdrole-template table updated;i18n/ru/README.mdupdated alongside with the same new templates.i18n/ru/knowledge-base/06_AGENTS_TEMPLATE.mdupdated for the new chat-attached file rule.i18n/ru/knowledge-base/03_PIPELINE.mdupdated for the chat attachment staging rule.
- Initial public structure:
knowledge-base/(13 instruction modules),quick-start/INIT_GUIDE.md,examples/(3 role templates) - Bilingual
README.md/README.ru.md - MIT License
Phase 1 (reference implementations) complete.
knowledge-base/templates/directory with all configuration templates:kb.config.yml.template(with fullmode_profilesfor default/super)repomix.config.json.templateAGENTS.md.templateKNOWLEDGE_STRUCTURE.md.templateDATA_PLACEMENT_EXAMPLES.md.templaterequirements.txt,requirements-dev.txt.gitignore.template
knowledge-base/scripts/directory with reference Python implementations:kb_common.py— shared utilities (frontmatter, hashing, logging, wikilinks)kb_doctor.py— post-deploy smoke test (env, deps, structure, spaCy)kb_ingest.py— full pipeline (raw → processed → metadata, NLP, routing)kb_lint.py— Level 1 health check (11 rules, lifecycle-aware, auto-fix)kb_watch.py— watchdog-based file watcher with polling fallbackkb_reflect.py— reflection trigger logic (importance threshold + weekly)kb_nlp_batch.py— incremental NLP re-enrichment
knowledge-base/scripts/tests/— pytest suite (59 tests) covering common, lint, ingest, and reflect logicknowledge-base/shell/directory with POSIX-safe wrappers:reindex.sh(with daily consolidation block)watcher.sh(start/stop/status/daemon)lint.sh,doctor.sh
knowledge-base/00_OVERVIEW.md— agent's deployment map: what to read, what to copy, in what orderdocs/ARCHITECTURE.md— contributor-oriented architecture overview
- Instruction modules now point to reference implementations:
01_PREREQUISITES.md,02_INIT.md,03_PIPELINE.md,05_INDEX.md,06_AGENTS_TEMPLATE.md,09_LINT.md,13_AUTORUN.md knowledge-base/README.md— updated reading order, mentionstemplates/,scripts/,shell/09_LINT.md—--onlyflag added to the kb_lint contract
- All instruction modules touched in this release will need re-translation
in Phase 2. Russian counterparts in
i18n/ru/(to be created) should be marked as stale until updated.
Phase 3 (Initial Population Helper) complete.
knowledge-base/14_INITIAL_POPULATION.md— new module describing role-aware generation ofDATA_PLACEMENT_EXAMPLES.mdplacement_examples:section in all three role templates:examples/programmer-senior.yml(7 artifacts + quickstart + don't-drop)examples/marketing-director.yml(8 artifacts)examples/creative-hybrid.yml(8 artifacts)
02_INIT.md— Phase 3 hook directing the agent to14_INITIAL_POPULATION.mdafter structure creationtemplates/DATA_PLACEMENT_EXAMPLES.md.template— clarified its role as a starting skeleton replaced during deploymentknowledge-base/README.md,00_OVERVIEW.md— reading order includes module 14
02_INIT.md,14_INITIAL_POPULATION.md, README, and 00_OVERVIEW need new Russian translations once Phase 2 begins.
Phase 2 (localization infrastructure) partially complete: framework + critical entry-point translations. Modules 03–13 and
INIT_GUIDE.mdremain in Russian (with a "pending English translation" banner) for incremental translation.
i18n/ru/directory with all 17 Russian instruction files copied from the canonical sources, each carrying frontmatter:translation_of,source_commit,source_version,translated_at,translatorscripts/check_translations.py— drift report generatori18n/TRANSLATION_STATUS.md— auto-generated drift report (currently all in-sync, will mark stale as canonical EN files evolve)docs/TRANSLATING.md— contributor guide for adding/maintaining translations
- Translated to English (canonical):
knowledge-base/README.mdknowledge-base/01_PREREQUISITES.mdknowledge-base/02_INIT.mdknowledge-base/14_INITIAL_POPULATION.md
- Modules 03–13 and
quick-start/INIT_GUIDE.mdnow display a "Pending English translation" banner at the top, with a pointer to the Russian copy ini18n/ru/. Technical contracts inside (file names, code, command names) are language-agnostic and remain usable. README.mdlink now points toi18n/ru/README.mdREADME.ru.mdis now a redirect page toi18n/ru/README.md
- Once the canonical EN versions of modules 03–13 are written, the existing
i18n/ru/copies will be automatically marked as stale bycheck_translations.py(theirsource_commitwill fall behind HEAD). This is the intended workflow.
Phase 2 fully complete: every canonical instruction module is now in English.
- Translated to English (replacing Russian originals):
knowledge-base/03_PIPELINE.mdknowledge-base/04_REVIEW.mdknowledge-base/05_INDEX.mdknowledge-base/06_AGENTS_TEMPLATE.mdknowledge-base/07_INTERACTION_LOOP.mdknowledge-base/08_PORTABLE.mdknowledge-base/09_LINT.mdknowledge-base/10_LOG.mdknowledge-base/11_PROVENANCE.mdknowledge-base/12_NLP_PREPROCESS.mdknowledge-base/13_AUTORUN.mdquick-start/INIT_GUIDE.md
- All "Pending English translation" banners removed; English is now the unambiguous canonical version.
- Russian copies under
i18n/ru/still carry their originalsource_commitvalues. After this release,python3 scripts/check_translations.pywill flag every RU file as stale (their commit lags the canonical EN sources). Re-translation is tracked via Phase 4 / future commits. i18n/ru/files remain functional (they continue to describe the same system); the divergence is structural (English wording vs Russian wording), not semantic.
Phase 4 baseline: upgrade tooling, troubleshooting docs, contributor guide, drift hook.
scripts/kb_upgrade.py— upgrade tool for deployed KBs:- Diffs deployed scripts against the source repo
- Detects user customizations via SHA-256 against the previous git tag
- Writes
.newsidecars for customized files instead of overwriting - Bumps
instructions_versionafter a clean upgrade - Modes:
--dry-run,--diff,--force
docs/UPGRADING.md— step-by-step upgrade guide for KB ownersdocs/TROUBLESHOOTING.md— common installation, pipeline, lint, watcher, repomix, reflection, and translation problems with solutionsdocs/CONTRIBUTING.md— contributor onboardingscripts/hooks/pre-commit-translation-drift.sh— opt-in git pre-commit hook that warns (without blocking) when canonical files are committed without matching translation updates
- New EN documents in
docs/(TROUBLESHOOTING, UPGRADING, CONTRIBUTING) are EN-only by design (contributor-facing). They are not part of the user-facing knowledge-base/ instructions and don't needi18n/ru/mirrors.
Phase 4 expanded: more role templates, KB health metrics, edge-case tests, top-level scripts coverage, GitHub Actions CI, badges.
- Four new role templates with full
placement_examples(artifacts + quickstart + don't-drop):examples/founder.yml(startup founder)examples/researcher.yml(researcher / analyst)examples/product-manager.ymlexamples/content-creator.yml
kb_lint --metricsflag — KB health metrics:- Lifecycle distribution (permanent / evolving / temporal / unset)
- Pages per subfolder
- Importance avg, median, distribution
- Freshness buckets (≤30d / 30–90d / >90d / no date)
- Wikilink density, orphan rate, entity coverage
- Routing depth, insight ratio, annotation overflow count
- Test fixtures in
knowledge-base/scripts/tests/fixtures/:with-frontmatter.md,no-frontmatter.md,empty.md,broken-frontmatter.md,sample.txt
- Edge-case tests
test_edge_cases.py(16 tests) covering empty files, Unicode filenames, broken frontmatter, idempotency under churn, scaling to 50 pages - Tests for
scripts/check_translations.py(10 tests) - Tests for
scripts/kb_upgrade.py(14 tests) pyproject.tomlwith pytest config (importlib mode, dual testpaths).github/workflows/ci.ymlwith five jobs:- Tests (Python 3.11, 3.12, macOS-latest)
- Coverage upload to Codecov
- kb_doctor self-test
- Shell-script syntax + shellcheck
- YAML config and role-example validation
- Translation drift report
README.md— updated badges (tests, coverage, version), expanded role templates table (7 roles), added module 00 and 14 to instruction list
- 108 tests passing (was 67)
- ~69% overall coverage; kb_common 91%, kb_lint 84%, kb_reflect 70%
- The new role templates and updated
README.mdneed re-translation ini18n/ru/.check_translations.pywill mark them stale automatically.
Patch release: Russian translations synchronized with current canonical EN.
i18n/ru/knowledge-base/00_OVERVIEW.md— Russian translation of the deployment-overview modulei18n/ru/knowledge-base/14_INITIAL_POPULATION.md— Russian translation of the initial-population module (was an EN copy in the previous release)scripts/sync_translations.py— utility that bumpssource_commit,source_version, andtranslated_atin translated frontmatter after manual re-verification (modes:--to-head,--to-version,--lang,--files,--dry-run)
i18n/ru/README.md— refreshed to mirror canonical EN: badges, 7-role table, 15 instruction modules (00–14),kb_lint --metricsmention,kb_upgrade.pycallout, links todocs/TRANSLATING.mdanddocs/CONTRIBUTING.mdi18n/ru/knowledge-base/README.md— reading order now includes modules 00 and 14; pointer to canonical EN added- All 18 RU translation files bumped to
source_version: 0.7.0andtranslated_at: 2026-05-16 docs/TRANSLATING.md— documented the post-commit workflow:git commit → sync_translations.py --to-head → check_translations.py --update-status
- After this release lands and is committed,
check_translations.pywill flag the 18 RU files as stale (theirsource_commitwill lag the new HEAD). Runpython3 scripts/sync_translations.py --to-head --lang ruimmediately after committing to reset the markers.
Adds deterministic generation of
DATA_PLACEMENT_EXAMPLES.mdand a custom-role workflow.
scripts/kb_populate.py— pure-templating yaml → markdown generator:- Reads
placement_examplesfromexamples/<role>.yml - Emits a structured
DATA_PLACEMENT_EXAMPLES.mdwith all sections (intro, generic table, role-specific quick map, detailed examples, quickstart, do-not-drop, footer) --from <path>for custom role files--create-sampleswritesraw/_samples/<artifact>.example.mdplaceholders--dry-run,--json,--output <name>flags- 0 tokens to generate; deterministic across all AI agents
- Reads
knowledge-base/templates/role.yml.template— scaffold for the custom-role flow (Path B). The agent now must saveexamples/<slug>.ymlbefore invokingkb_populate.py.scripts/tests/test_kb_populate.py— 25 tests covering YAML parsing, markdown rendering, edge cases, all CLI flags, and a parametrized integration test that runs against every shipped role template.
knowledge-base/14_INITIAL_POPULATION.mdrewritten around the two-path workflow:- Path A (built-in role):
kb_populate.py --role <role>directly - Path B (custom role): build YAML from
role.yml.templatefirst, then Path A - Added an explicit "AI review pass" step where the agent appends a
## Project notessection with project-specific tips (not capturable in YAML) - Updated the agent checklist to enforce the new ordering
- Path A (built-in role):
knowledge-base/02_INIT.mdPhase 3 section now points to the populate-script-first workflow
- 133 tests passing (was 108)
- New parametrized tests catch placement_examples regressions in any role template before they ship
i18n/ru/knowledge-base/14_INITIAL_POPULATION.mdandi18n/ru/knowledge-base/02_INIT.mdneed re-translation. After committing, run:python3 scripts/sync_translations.py --to-head --lang ru python3 scripts/check_translations.py --update-status
examples/fiction-writer.yml— role template for fiction writers. Pillars:- Craft theory entities (story structure, dialogue, POV, scene mechanics, show-don't-tell)
- Influences entity (excerpts from books the writer loves, dissected for why they work — the AI's voice anchor)
- Genre conventions entity (tropes, comp titles, reader expectations)
- Project hierarchy (current WIP with outline, characters, worldbuilding subfolders)
- 11-artifact
placement_examplescovering excerpts, drafts, outlines, character bibles, worldbuilding, beta feedback, voice memos, genre research, queries, anti-patterns ai_assistant_tasksfocused on analytical critique — pacing audits, voice checks, POV slip detection, show-vs-tell passes, structural mapping
README.mdandi18n/ru/README.md— added the new role to the templates table
- 134 tests passing (one new parametrized integration entry for fiction-writer)
- CI workflows disabled. The repo is currently local-only with no public
GitHub Actions instance, so the workflow file was renamed to prevent
unintended runs:
.github/workflows/ci.yml→.github/workflows/ci.yml.disabled- GitHub Actions only picks up
*.yml/*.yamlfiles in this directory, so the.disabledsuffix turns the workflow into a no-op. - Re-enabling is a single
git mvaway (see.github/workflows/README.md).
- Added
.github/workflows/README.mdwith explicit "do not enable without the project owner's request" note + re-enable instructions.
.github/workflows/README.md— disabled-state documentationexamples/fiction-writer.yml(released earlier this day, expanded with the long-form-book artifact entry)kb_ingest.pyheuristic_looks_like_long_book— detects PDF/EPUB/DOCX with ≥25 000 words and adds a "long-form reference book" warning block to the generated review package, advising the agent to keep prose inassets/and write a takeaways note instead. Metadata now recordslong_book_hint: true/false.03_PIPELINE.md— new section "Handling long reference materials" with the asset-as-reference + notes-as-knowledge pattern and an explicit decision tree.- 8 new tests in
test_kb_ingest.pyfor the long-book detection and review- package wording.
i18n/ru/knowledge-base/templates/— empty leftover folder. Templates, scripts, and shell wrappers are language-agnostic and live only in the canonicalknowledge-base/.
- 142 tests passing (was 134)
- After committing, all 18 RU files become stale (HEAD moved). Run:
python3 scripts/sync_translations.py --to-head --lang ru python3 scripts/check_translations.py --update-status
Real-world feedback round: deployed on macOS, found six UX issues, fixed all of them.
knowledge-base/shell/install.sh— flattens thesetup/payload into the project root and removes the emptysetup/folder afterward. Eliminates the nested-knowledge-base/problem reported from a real macOS deployment.- macOS double-click launchers (Finder-friendly, no terminal navigation needed):
shell/watcher-start.command— opens a Terminal window with the watcher runningshell/watcher-stop.command— stops a daemonized watchershell/reindex.command— one-shot manual reindex
- Windows equivalents:
shell/watcher-start.bat,shell/reindex.bat templates/START_HERE.md.template— auto-generated post-deployment cheat sheet that reminds the user to start every new chat with the "Read AGENTS.md…" line!reviewcommand — drains the review queue, processes each item with explicit reporting, honors the long-form-book hint, asks the user one question per item when input is required!populatecommand — regeneratesDATA_PLACEMENT_EXAMPLES.mdafter a role YAML edit
- Deployment flow rewritten in
02_INIT.mdand00_OVERVIEW.md:- User copies
knowledge-base/to their project assetup/ - Agent runs
bash setup/shell/install.shto flatten the payload into the project root - No more nested
knowledge-base/inside the project — files live at the project root
- User copies
kb_populate.pymoved fromscripts/→knowledge-base/scripts/(it's a deployment-time tool, not a maintainer tool); path resolution updated to findexamples/in either layouttemplates/AGENTS.md.template— explicit "Read AGENTS.md first" workflow callout at the top, plus!reviewand!populaterows in the commands table04_REVIEW.md— added a full!reviewcommand spec with long-form-book guard, defer-to-user pattern, batched questions- Main
README.mdandi18n/ru/README.md— new "Running the watcher" section with platform-specific instructions, updated commands table with!review/!populate, project-root layout reflecting the new deployment flow, explicit "Read AGENTS.md first" warning
- 142 tests still passing (the kb_populate move didn't change behavior)
- After committing, the 18 RU files become stale (HEAD moved). Run:
python3 scripts/sync_translations.py --to-head --lang ru python3 scripts/check_translations.py --update-status
Hotfix: deployment flow direction reversed. The 0.9.0
install.shwas pre-deploy (flatten before agent works), which mixed source instructions with build artifacts and left the project messy. Replaced withfinalize.shwhich runs at the very end.
knowledge-base/shell/install.sh→knowledge-base/shell/finalize.sh- Old behavior (pre-deploy): flatten
setup/into project root, agent builds the base on top → mixed instructions and artifacts at the root,setup/deleted before deployment finished. - New behavior (post-deploy): agent builds the base inside
<project>/knowledge-base/whilesetup/stays put as the source. Afterkb_doctor.pypasses andSTART_HERE.mdis generated, the agent runsbash setup/shell/finalize.shwhich:- Validates required files (
AGENTS.md,kb.config.yml,scripts/kb_ingest.py) - Refuses if anything in
knowledge-base/would overwrite a file at the project root (without--force) - Promotes every entry to the project root
- Removes the empty
knowledge-base/ - Removes
setup/(use--keep-setupto retain)
- Validates required files (
- Flags:
--dry-run,--keep-setup,--force,--kb-dir <path>
- Old behavior (pre-deploy): flatten
02_INIT.md,00_OVERVIEW.md,14_INITIAL_POPULATION.mdupdated to reflect the corrected flow:- Agent works inside
knowledge-base/during deployment --kb-root knowledge-baseforkb_populate.pyinvocations during buildfinalize.shis the final step in Phase 3
- Agent works inside
knowledge-base/scripts/tests/test_finalize_sh.py— 8 tests covering happy path, refusal scenarios (missing kb, missing required files, conflicts),--keep-setup,--dry-run,--force, idempotency
- 150 tests passing (was 142)
- After committing, the 18 RU files become stale (HEAD moved). Run:
python3 scripts/sync_translations.py --to-head --lang ru python3 scripts/check_translations.py --update-status
Hotfix: shell wrappers and macOS launchers were resolving paths relative to their own folder instead of the project root, so they couldn't find
scripts/kb_watch.py. Reported from a real macOS deployment.
shell/watcher.sh,shell/reindex.sh,shell/lint.sh,shell/doctor.shnow resolve the project root (parent ofshell/) andcdthere before locatingscripts/. Previously they didcd "$(dirname "$0")"and ended up insideshell/, wherescripts/kb_*.pydoes not exist.shell/watcher-start.command,shell/watcher-stop.command,shell/reindex.command(macOS launchers) now detect the project root whether the launcher lives inshell/or at the project root, with a clear error message ifscripts/cannot be found.shell/watcher-start.bat,shell/reindex.bat(Windows launchers) — same resolution logic.- All wrappers now report where they looked when a script is missing, pointing at the resolved project root path.
knowledge-base/scripts/tests/test_shell_wrappers.py— 8 regression tests covering:- Wrappers called from project root
- Wrappers called via absolute path from arbitrary CWD
- Helpful error message when
scripts/is missing .commandlauncher located inshell/(default).commandlauncher copied to project root (alternative layout)
- 158 tests passing (was 150)
- After committing, the 18 RU files become stale (HEAD moved). Run:
python3 scripts/sync_translations.py --to-head --lang ru python3 scripts/check_translations.py --update-status
Polish: cleaner final layout.
*.shwrappers live only inshell/, while*.command/*.batlaunchers are promoted to the project root byfinalize.shso they're discoverable for double-clicking.
shell/finalize.shnow performs two extra cleanup steps after promotingknowledge-base/to the project root:- Promotes launchers — moves every
*.commandand*.batfromshell/up to the project root so Finder / Explorer can launch them. Skips files that already exist at the root (preserves user customizations). - Deduplicates
*.sh— if a*.shexists both at the root and inshell/and they are byte-identical, removes the root copy. Different content (user customization) is preserved untouched.
- Promotes launchers — moves every
- Documentation updated to reflect the cleaner layout:
README.md,i18n/ru/README.md— Linux invocation now shown as./shell/watcher.shetc.; project-root tree no longer lists*.shat the top level.00_OVERVIEW.md,02_INIT.md— same.templates/START_HERE.md.template— Linux instructions point at./shell/..., troubleshooting tips updated.
- 4 new regression tests in
test_finalize_sh.py:test_finalize_promotes_command_launchers_to_roottest_finalize_keeps_sh_in_shell_onlytest_finalize_preserves_root_sh_when_differenttest_finalize_promotion_does_not_overwrite_existing_root_launcher
- 162 tests passing (was 158)