Skip to content

Make the knowledge directory configurable through package.json - #18

Merged
emafriedrich merged 3 commits into
mainfrom
configurable-knowledge-dir
Oct 28, 2026
Merged

emafriedrich merged 3 commits into
mainfrom
configurable-knowledge-dir

Conversation

@emafriedrich

Copy link
Copy Markdown
Owner

What

Adopters can put the canonical knowledge tree somewhere other than knowledge/ (for example docs/knowledge).

  • package.json kde.knowledge (default knowledge) is the single source of truth. Read by knowledge, knowledge-check and the hook.
  • install.sh accepts KDE_KNOWLEDGE_DIR=<dir>, scaffolds there, writes the key, and refuses dot-directories, absolute paths and ... If a catalog already exists under another dir, the variable is ignored with a warning.
  • Hook regex and catalog path are built from the configured dir.
  • Docs: ADOPTING.md and HANDBOOK.md describe the option. The framework's own tree stays at knowledge/.
  • DR-021 drafted (drafted_by: agent, status draft) for human promotion.

Testing

  • npm test: 75 pass.
  • End-to-end in a scratch repo with KDE_KNOWLEDGE_DIR=docs/knowledge: install, knowledge:check, domain add, new, promote, knowledge:context (--write, --check), hook PostToolUse/Stop exit codes, and the drift gate (fails on code-only commit with an accepted spec, passes with no-behavior-change).

…owledge

Adopters can relocate the catalog (default knowledge/) with
KDE_KNOWLEDGE_DIR at install time or by setting package.json
kde.knowledge. Dot-directories and paths outside the repo are refused.
knowledge, knowledge-check and the hook read the key; install.sh
scaffolds, validates and persists it. Adds DR-021 (draft).
@emafriedrich
emafriedrich force-pushed the configurable-knowledge-dir branch from da47974 to 3a21cbe Compare October 28, 2026 15:01
@emafriedrich
emafriedrich merged commit c269eee into main Oct 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant