DEC-AIC-0065: Migrate the knowledge base to the Reasonry npm package
Accepted
Status: accepted · 2026-12-04 · supersedes DEC-AIC-0049
Context
DEC-AIC-0049 placed the decision records in kb/ as a kb-kit / docs-mcp v3 workspace. At the time (observed: 2026-11-15), docs-mcp v3 was not published to npm, so contributors needed a private binary on PATH and CI could not run workspace checks.
The former private kb-template / docs-mcp project has now been released publicly under the MIT license as Reasonry (https://github.com/push-based/reasonry) with @push-based/reasonry@2.0.0 published on npm (observed: 2026-12-04). Reasonry v2 auto-discovers an embedded knowledge base only under <repo-root>/reasonry/ and provides reasonry migrate to upgrade legacy docs-mcp workspaces.
Decision
- Move the knowledge base from
kb/toreasonry/so@push-based/reasonryauto-discovers it from the repository root without shell wrappers. This replaces DEC-AIC-0049 Decisions 1, 6, 7, 8, and 9. - Install
@push-based/reasonry@^2.0.0as a rootdevDependencyand exposenpm run kb:check(reasonry check). CI runsnpm run kb:checkon every push and pull request. - Adopt the Reasonry v2 workspace contract via
reasonry migrate:reasonry.config.json(version 3), strictprefixininitiative.json, plain document types (decision/DEC-*andquestion/Q-*, replacingADR-*andRFC-*), Open Knowledge Format v0.3 wiki concepts, and the preset workspaceAGENTS.md. - Serve the knowledge base to agents via
reasonry-keeper(npx -y @push-based/reasonry@2 serve) in.mcp.example.json, replacing the legacyai-coach-kbshell wrapper. - Keep the three small vault files adapted from
kb-templatein place (libs/vault/domain/src/lib/note/md.ts,libs/vault/adapter-markdown/src/lib/markdown.ts,apps/vault-mcp-server/src/mcp/tool-types.ts, andapps/vault-mcp-server/src/main.ts). Do not import@push-based/reasonry-coreor@push-based/reasonry-mcpinto the vault runtime:vault-domainstays dependency-free, andvault-mcp-serverremains on MCP SDK v1. Updatelibs/vault/adapter-fsprotected-root detection to recognizereasonry.config.jsonalongsidedocs-mcp.config.json. - Build the docs site from
reasonry/source/initiatives/ai-coach/decisions/(DEC-AIC-NNNN) and keep/reasonryin.prettierignore.
Consequences
- Contributors and CI no longer need a private
docs-mcpbinary onPATH;npm installprovidesreasonrydeterministically. reasonry checknow runs in CI on every pull request and push tomain.- All 80 existing records were migrated from
ADR-*/RFC-*toDEC-*/Q-*andkb/links across docs, package READMEs, andapps/docswere updated. - The vault server keeps its small local helpers without taking on
@push-based/reasonry-*runtime dependencies.
Alternatives Considered
- Keep the folder named
kb/with a wrapper script. Reasonry v2's plugin and CLI only auto-discover<repo-root>/reasonry/, so keepingkb/would require custom wrappers for every command and harness. - Replace
apps/vault-mcp-server/src/mcp/tool-types.tswith@push-based/reasonry-mcp. Pulling in@push-based/reasonry-mcpfor 35 lines of types would bring@modelcontextprotocol/serverv2 and@push-based/reasonry-coreinto a v1 MCP server.