Skip to content

docs(solutions): how one plugin runs another plugin's CLI (core/ops split learning) - #39

Merged
Lingelo merged 1 commit into
mainfrom
ccr-8ab01603-apdrcp
Oct 20, 2026
Merged

Lingelo merged 1 commit into
mainfrom
ccr-8ab01603-apdrcp

Conversation

@Lingelo

@Lingelo Lingelo commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Summary

Learning from the Kaizen core/ops split (#36, #37, #38), in docs/solutions/architecture-patterns/plugin-reaching-another-plugins-cli.md, same format as the two existing solutions:

  • Problem: ${CLAUDE_PLUGIN_ROOT} is per plugin and there is no declared plugin dependency, so moved skills lose the CLI, references and config docs they used.
  • Solution: a resolver shim at the path the skills already use — resolution order (git config kaizen.cli → $KAIZEN_CLI → sibling checkout → newest cache semver, each checked by name), a wrong explicit pointer refused rather than replaced, version gate from requires.json, full forwarding, core-root for shared docs, every gate kept with the CLI and hooks (contract-enforced), doctor as the migration signal.
  • Pitfalls hit: macOS /var → /private/var (realpath on both sides), cross-plugin contract rules for old names, stubs defeating git rename detection (commit the pure git mv first), allowed-tools in stubs, repeatable --plugin-dir.
  • The split plan's definition of done marks the learning captured (the Kaizen review item stays open).

Docs only: no plugin file changes, so the Kaizen workflow does not run.

Test plan

  • node plugins/kaizen/scripts/kaizen.mjs plan check docs/plans/2026-10-20-1515-refactor-kaizen-core-ops-split-plan.md — green.
  • Facts cross-checked against the merged code and PRs (resolver order, requires.json, ops_plugin, 1,549-line diff before splitting the commits, 74–100 % rename similarity).

Generated by Claude Code

Learning from the Kaizen core/ops split (PRs #36-#38): a resolver shim at
the path the moved skills already use, its resolution order and refusals,
the version gate, core-root for shared docs, gates kept with the CLI and
hooks, doctor as the migration signal; pitfalls hit (macOS realpath,
cross-plugin contracts, stubs vs git rename detection, allowed-tools in
stubs, repeatable --plugin-dir). Plan definition of done updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012iZk6aQ3fhJy4jrZhfWtaf
@Lingelo
Lingelo merged commit 85336ba into main Oct 20, 2026
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.

2 participants