Skip to content

v0.18.0

Choose a tag to compare

@github-actions github-actions released this 06 Sep 18:02
· 30 commits to main since this release

What's Changed

Features

  • lk init --no-import skips the @.knowledge/lk-instructions.md import in CLAUDE.md, and removes it when it is already there. An agent connected to the lk-knowledge MCP server already receives these instructions in the initialize response — the same bytes the import points at, verified as an identical 7528-byte file against a real store — so on those setups the import is a second copy loaded into every session. Deleting the line by hand never held, because writing it is part of what lk init guarantees; this makes "the instructions arrive over MCP here" something the tool can be told.
  • The choice is recorded as claude_md_import = false in .knowledge/config.toml, so later lk init runs leave the import out instead of putting it back. lk init --global --no-import does the same for ~/.claude/CLAUDE.md, recording it in ~/.config/lk/config.toml. Setting the key back to true and re-running lk init restores the import — the config is the setting, and the flag is a shortcut for writing it.
  • Removal is careful about what it takes out. A CLAUDE.md holding nothing but the import is deleted rather than left as an empty file, matching what the AGENTS.md migration in v0.17.0 already did; one with your own content keeps all of it. The CommonMark handling from that migration is reused, so an import shown inside a fenced code block, or indented past the three-space limit, is documentation and is left alone.
  • The line lk init prints names whichever of the two actually turned the import off — --no-import or claude_md_import = false. On a flag run the config still reads true at that point, since it is written afterwards, so reporting the config value would have pointed at the wrong thing while troubleshooting.

Internal

  • detect_newline moved from cmd/init.rs to util.rs so the config writer can use it. Rewriting a file lk only partly owns without preserving its line endings or its trailing newline was already something the markdown paths avoided; the config writer now follows the same rule, which matters because config.toml is git-tracked and a CRLF checkout rewritten to LF turns one changed setting into a whole-file diff.

Upgrading

  • No schema migration, and nothing changes unless you ask for it: claude_md_import defaults to true, so lk init behaves exactly as it did in v0.17.0.
  • Before using --no-import, make sure the lk-knowledge MCP server is actually connected wherever the project is worked on. Registering it in user scope (claude mcp add -s user lk-knowledge lk mcp) covers every project at once; a per-project registration does not. Without the connection, removing the import leaves the agent with no instructions at all.
  • Keep the import if the repository is used somewhere MCP is not configured — a teammate who clones without setting it up, or CI. It is the only path that carries the instructions through the repository itself, which is the reason it stays the default.
  • lk init --no-import rewrites AGENTS.md-style files in place and can delete a CLAUDE.md that held only the import. There is no dry run and no undo beyond git, so run it in a clean working tree.

Notes

  • There is no --import counterpart. Turning the import back on is a config edit plus lk init, which seemed like enough rather than adding a second way to say the same thing; it can be added later if that turns out to be awkward.
  • lk install-mcp still writes agent config files directly, which is the thing lk setup was introduced to avoid. Unchanged here — whether it gets deprecated is its own decision.

Full Changelog: v0.17.0...v0.18.0