Conversation
## Intent
The `Option.docsets[]` field on Option was a second, parallel way to
declare knowledge sources — distinct from the recipe-based provision
writers that everything else uses. This made the model inconsistent and
added a separate confirmation step in `setup` for docsets. Collapsing
docsets into a `docset` provision writer (already how skills work) makes
the catalog model uniform and removes unnecessary per-item opt-out UX.
## Key changes
- Added `docset` provision writer (core/src/writers/docset.ts) that maps
`{ id, label, origin, description }` config to a `KnowledgeSource`
- Registered `docsetWriter` in `createDefaultRegistry()`
- Exported `docsetWriter` from core public API
- Migrated all catalog options (architecture: tanstack/nodejs-backend/
java-backend; practices: conventional-commits) from `docsets:[]` to
`{ writer: "docset", config: {...} }` recipe entries
- Removed dead `knowledge` provision writer and its tests
- Removed `collectDocsets()` from resolver and `Option.docsets?` /
`excluded_docsets` from types
- Removed docset confirmation multiselect block from CLI setup command
- Wired `installKnowledge()` into both setup and install commands so
`.knowledge/config.yaml` is written on every run
- Updated all tests to use the new recipe-entry model
## Dependencies and side effects
- `ProvisionWriter` union type now includes `"docset"` (was already
present from a prior WIP commit); `"knowledge"` is removed
- `UserConfig.excluded_docsets` removed — existing config files that
happen to have this field will silently ignore it (unknown field)
- Setup command now has one fewer multiselect prompt step for harnesses
users who previously selected/deselected individual docsets
## Intent Skills have an opt-in confirmation prompt during setup; knowledge sources were silently configured and the user had to discover the manual init command on their own. Parity with the skills UX makes the flow consistent and surfaces the initialization step at the right moment. ## Key changes - Added a clack.confirm prompt after knowledge sources are resolved, listing each source name (matching the skills prompt style) - Default answer is false (defer) — initializing large doc repos is slow and network-dependent, so opt-in is the right default - On "No": shows the existing deferred hint (npx @codemcp/knowledge init) - On "Yes": calls installKnowledge immediately - Updated knowledge-docset.integration.spec.ts to supply explicit confirm mock values for skills and knowledge prompts separately
## Intent
Two small UX fixes to the knowledge source initialization prompt:
the deferred hint was missing the docset name so users could not
copy-paste individual init commands, and confirming yes did not force
re-initialization for docsets that were already partially set up.
## Key changes
- Deferred hint now lists one command per source:
npx @codemcp/knowledge init <name>
- Same per-source command list shown inside the confirm prompt
- installKnowledge() accepts an options.force flag; setup passes
force: true when the user explicitly confirms
…fix createDocset idempotency ## Intent Two bugs in knowledge source initialization: (1) createDocset always used preset "git-repo" even for archive or local-folder sources; (2) createDocset threw on re-run because the docset was already registered, blocking the force re-init that the user explicitly requested. ## Key changes - Added DocsetPreset type alias and optional preset field to KnowledgeSource - docsetWriter passes preset from config through to the KnowledgeSource - installKnowledge uses source.preset ?? "git-repo" for the createDocset call - "already exists" errors from createDocset are swallowed so initDocset (with force: true) still runs — enabling re-initialization - Updated knowledge-installer.spec.ts: renamed the "real failure" test to use a non-ambiguous error message; added new test for the already-exists → proceed-to-init path; added preset passthrough test - DocsetPreset exported from core public API
…ter refactor Remove all references to Option.docsets[], DocsetDef, excluded_docsets, collectDocsets, and the knowledge provision writer. Replace with the docset provision writer model throughout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.