refactor(agents): lazy-load claude templates via CLAUDE_PLUGIN_ROOT#201
Merged
refactor(agents): lazy-load claude templates via CLAUDE_PLUGIN_ROOT#201
Conversation
- Remove claude-templates/** from local-install.json includes so templates
are no longer copied to .codemie/ on every agent startup
- Update codemie-init, codemie-subagents, memory-refresh commands to
reference templates via \${CLAUDE_PLUGIN_ROOT}/claude-templates/ directly
- Move claude.extension.json version tracking from .codemie/ (cwd) to
~/.codemie/ so it is not written into project directories
- Simplify shouldUpdateLocal: remove stale actualFiles check now that the
version file is no longer in the local target directory
- Bump claude plugin version to 1.0.16
Generated with AI
Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
TarasSpashchenko
approved these changes
Mar 5, 2026
TarasSpashchenko
pushed a commit
that referenced
this pull request
Mar 9, 2026
…201) Co-authored-by: codemie-ai <codemie.ai@gmail.com>
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.
Summary
Templates (
claude-templates/) were previously copied into.codemie/in the project working directory on every agent startup, polluting repositories with ephemeral files. This refactor eliminates that — templates are now read directly from the globally-installed plugin path via the existing${CLAUDE_PLUGIN_ROOT}environment variable.Additionally, the
claude.extension.jsonversion-tracking file was being written to.codemie/(cwd) instead of~/.codemie/where it belongs alongside other CodeMie global state.Changes
local-install.json: removedclaude-templates/**fromincludes— templates are no longer copied to.codemie/on startupcodemie-init.md,codemie-subagents.md,memory-refresh.md: all template path references updated from.codemie/claude-templates/→${CLAUDE_PLUGIN_ROOT}/claude-templates/BaseExtensionInstaller.ts:writeVersionFileandshouldUpdateLocalnow usegetCodemiePath('claude.extension.json')(~/.codemie/) instead of the local target directory; removed staleactualFilesdirectory scanplugin.json: version bumped to1.0.16Impact
Before: Every
codemie claudestartup wroteclaude-templates/+claude.extension.jsoninto.codemie/in the user's project directory.After: No files written to the project directory on startup. Commands that need templates read them from
${CLAUDE_PLUGIN_ROOT}/claude-templates/directly. Version tracking lives in~/.codemie/claude.extension.json.Checklist