Sets up or updates Knowledge Distillery in a project. Creates vault, workflows, directive sections, and permissions — always converging to the latest expected state. Safe to re-run after plugin upgrades. Use when setting up, updating, or troubleshooting a Knowledge Distillery installation — any mention of 'initialize', 'set up', 'install', 'bootstrap', or 'update' knowledge distillery should trigger this.
Run /knowledge-distillery:setup to set up a new project, update an existing installation after a plugin upgrade, or verify configuration state. Safe to re-run — always converges to the latest expected state.
.knowledge/vault.db — SQLite vault initialized from the plugin's schema.knowledge/reports/ — Directory for batch report files.knowledge/changesets/ — Directory for batch changeset files.github/workflows/mark-evidence.yml — Stage A workflow (merge-time marking).github/workflows/batch-refine.yml — Stage B workflow (batch collection + refinement).github/workflows/curate-report.yml — Report PR curation workflow (comment-triggered).github/workflows/apply-changeset.yml — Post-merge workflow (applies changeset to vault.db).knowledge/ entries in .gitignore.claude/settings.jsonmkdir -p .knowledge
If .knowledge/vault.db does not exist, initialize it:
<knowledge-gate> init-db .knowledge/vault.db
If .knowledge/vault.db already exists, verify its health:
sqlite3 .knowledge/vault.db "PRAGMA user_version;"
Expected: 1 or higher. If 0 or empty, report the problem and stop.
sqlite3 .knowledge/vault.db "SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name IN ('entries','entry_domains','domain_registry','domain_paths','evidence');"
Expected: 5. If less, report the problem and stop.
mkdir -p .knowledge/reports
mkdir -p .knowledge/changesets
Create .github/workflows/ directory if it doesn't exist. Write each workflow file below. If the file already exists, overwrite it with the latest template.
.github/workflows/mark-evidence.yml