fix: correct installation method to project-local plugin

**Problem:**
- Previous commit (a302ca7) added `make install-plugin` that copied to ~/.claude/plugins/
- This breaks path references - plugins are designed to be project-local
- Wasted effort with install/uninstall commands

**Root Cause:**
- Misunderstood Claude Code plugin architecture
- Plugins use project-local `.claude-plugin/` directory
- Claude Code auto-detects when started in project directory
- No copying or installation needed

**Solution:**
- Remove `make install-plugin`, `uninstall-plugin`, `reinstall-plugin`
- Update README.md: Just `cd SuperClaude_Framework && claude`
- Remove ~/.claude/plugins/pm-agent/ (incorrect location)
- Simplify to zero-install approach

**Correct Usage:**
```bash
git clone https://github.com/SuperClaude-Org/SuperClaude_Framework.git
cd SuperClaude_Framework
claude  # .claude-plugin/ auto-detected
```

**Benefits:**
- Zero install: No file copying
- Hot reload: Edit TypeScript → Save → Instant reflection
- Safe development: Separate from global Claude Code
- Auto-activation: SessionStart hook runs /pm automatically

**Changes:**
- Makefile: Remove install-plugin, uninstall-plugin, reinstall-plugin targets
- README.md: Replace `make install-plugin` with `cd + claude`
- Cleanup: Remove ~/.claude/plugins/pm-agent/ directory

**Acknowledgment:**
Thanks to user for explaining Local Installer architecture:
- ~/.claude/local = separate sandbox from npm global version
- Project-local plugins = safe experimentation
- Hot reload more stable in local environment

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kazuki
2025-10-21 14:45:15 +09:00
parent a302ca7e86
commit fbc74e4670
2 changed files with 40 additions and 87 deletions

View File

@@ -1,4 +1,4 @@
.PHONY: dev install test test-plugin doctor verify clean lint format install-plugin uninstall-plugin reinstall-plugin help .PHONY: dev install test test-plugin doctor verify clean lint format help
# Development installation (local source, editable) - RECOMMENDED # Development installation (local source, editable) - RECOMMENDED
dev: dev:
@@ -64,46 +64,6 @@ clean:
find . -type d -name .pytest_cache -exec rm -rf {} + find . -type d -name .pytest_cache -exec rm -rf {} +
find . -type d -name .ruff_cache -exec rm -rf {} + find . -type d -name .ruff_cache -exec rm -rf {} +
# Install Claude Code plugin
install-plugin:
@echo "🔌 Installing SuperClaude plugin to Claude Code..."
@if [ -d ~/.claude/plugins/pm-agent ]; then \
echo "⚠️ Plugin already exists at ~/.claude/plugins/pm-agent"; \
echo " Run 'make reinstall-plugin' to update"; \
exit 1; \
fi
@mkdir -p ~/.claude/plugins/pm-agent
@cp -r .claude-plugin/* ~/.claude/plugins/pm-agent/
@echo ""
@echo "✅ Plugin installed successfully!"
@echo ""
@echo "📋 Installed components:"
@echo " - PM Agent: Auto-activation orchestrator (SessionStart hook)"
@echo " - Research: Deep web search with adaptive planning"
@echo " - Index: Repository indexing (94% token reduction)"
@echo ""
@echo "🔄 Restart Claude Code or run /plugin to verify installation"
@echo " Available commands: /pm, /research, /index-repo"
# Uninstall Claude Code plugin
uninstall-plugin:
@echo "🗑️ Uninstalling SuperClaude plugin..."
@if [ ! -d ~/.claude/plugins/pm-agent ]; then \
echo "❌ Plugin not found at ~/.claude/plugins/pm-agent"; \
exit 1; \
fi
@rm -rf ~/.claude/plugins/pm-agent
@echo "✅ Plugin uninstalled successfully"
# Reinstall Claude Code plugin (uninstall + install)
reinstall-plugin:
@echo "🔄 Reinstalling SuperClaude plugin..."
@rm -rf ~/.claude/plugins/pm-agent 2>/dev/null || true
@mkdir -p ~/.claude/plugins/pm-agent
@cp -r .claude-plugin/* ~/.claude/plugins/pm-agent/
@echo "✅ Plugin reinstalled successfully"
@echo "🔄 Restart Claude Code to apply changes"
# Translate README to multiple languages using Neural CLI # Translate README to multiple languages using Neural CLI
translate: translate:
@echo "🌐 Translating README using Neural CLI (Ollama + qwen2.5:3b)..." @echo "🌐 Translating README using Neural CLI (Ollama + qwen2.5:3b)..."
@@ -130,7 +90,6 @@ help:
@echo "🚀 Quick Start:" @echo "🚀 Quick Start:"
@echo " make dev - Install in development mode (RECOMMENDED)" @echo " make dev - Install in development mode (RECOMMENDED)"
@echo " make verify - Verify installation is working" @echo " make verify - Verify installation is working"
@echo " make install-plugin - Install plugin to Claude Code (~/.claude/plugins/)"
@echo "" @echo ""
@echo "🔧 Development:" @echo "🔧 Development:"
@echo " make test - Run test suite" @echo " make test - Run test suite"
@@ -140,14 +99,13 @@ help:
@echo " make format - Format code (ruff format)" @echo " make format - Format code (ruff format)"
@echo " make clean - Clean build artifacts" @echo " make clean - Clean build artifacts"
@echo "" @echo ""
@echo "🔌 Plugin Management:"
@echo " make install-plugin - Install plugin to Claude Code"
@echo " make uninstall-plugin - Remove plugin from Claude Code"
@echo " make reinstall-plugin - Update existing plugin installation"
@echo ""
@echo "📚 Documentation:" @echo "📚 Documentation:"
@echo " make translate - Translate README to Chinese and Japanese" @echo " make translate - Translate README to Chinese and Japanese"
@echo " make help - Show this help message" @echo " make help - Show this help message"
@echo "" @echo ""
@echo "💡 Plugin Usage:"
@echo " cd /path/to/SuperClaude_Framework && claude"
@echo " → .claude-plugin/ auto-detected (project-local plugin)"
@echo ""
@echo "💡 Legacy (backward compatibility):" @echo "💡 Legacy (backward compatibility):"
@echo " make install - Alias for 'make dev'" @echo " make install - Alias for 'make dev'"

View File

@@ -100,33 +100,26 @@ Claude Code is a product built and maintained by [Anthropic](https://www.anthrop
## ⚡ **Quick Installation** ## ⚡ **Quick Installation**
### **One-Command Plugin Installation** ### **Project-Local Plugin (Recommended)**
SuperClaude v2.0+ uses **TypeScript plugins** with automated installer: SuperClaude v2.0+ uses **TypeScript plugins** with project-local auto-detection:
```bash ```bash
# Clone repository # Clone repository
git clone https://github.com/SuperClaude-Org/SuperClaude_Framework.git git clone https://github.com/SuperClaude-Org/SuperClaude_Framework.git
cd SuperClaude_Framework cd SuperClaude_Framework
# Install plugin (one command) # Start Claude Code in this directory
make install-plugin claude
``` ```
**That's it!** Restart Claude Code and the plugin auto-activates. **That's it!** `.claude-plugin/` is auto-detected and PM Agent activates on session start.
**Plugin Management Commands**:
```bash
make install-plugin # Install plugin to ~/.claude/plugins/
make uninstall-plugin # Remove plugin
make reinstall-plugin # Update existing installation
```
**Key Features**: **Key Features**:
-**One-Command Install**: No manual configuration needed -**Zero Install**: No copying, no configuration
-**Hot Reload**: Edit TypeScript → Save → Instant reflection (no restart) -**Hot Reload**: Edit TypeScript → Save → Instant reflection
-**Auto-Activation**: PM Agent starts automatically on session start -**Auto-Activation**: PM Agent starts automatically (SessionStart hook)
-**Zero Configuration**: Works out of the box after `make install-plugin` -**Safe Development**: Separate sandbox from global Claude Code
### **Enhanced Performance (Optional MCPs)** ### **Enhanced Performance (Optional MCPs)**
@@ -158,14 +151,14 @@ For **2-3x faster** execution and **30-50% fewer tokens**, optionally install MC
# 1. Remove old slash commands (if installed) # 1. Remove old slash commands (if installed)
rm -rf ~/.claude/commands/sc/ rm -rf ~/.claude/commands/sc/
# 2. Install new plugin (one command) # 2. Use new plugin (project-local)
cd SuperClaude_Framework cd SuperClaude_Framework
make install-plugin claude # .claude-plugin/ auto-detected
``` ```
**What's New in V2.0:** **What's New in V2.0:**
- ✅ TypeScript plugins (hot reload support) - ✅ TypeScript plugins (hot reload support)
-One-command installation (no manual config) -Project-local detection (zero install)
- ✅ Auto-activation via SessionStart hook - ✅ Auto-activation via SessionStart hook
- ✅ 3 core plugins: PM Agent, Research, Index - ✅ 3 core plugins: PM Agent, Research, Index
- ✅ Confidence-driven workflow (≥90% threshold, Precision/Recall 1.0) - ✅ Confidence-driven workflow (≥90% threshold, Precision/Recall 1.0)
@@ -173,33 +166,35 @@ make install-plugin
**Migration Notes:** **Migration Notes:**
- Old: `/sc:pm`, `/sc:research`, `/sc:index-repo` (27 commands) - Old: `/sc:pm`, `/sc:research`, `/sc:index-repo` (27 commands)
- New: `/pm`, `/research`, `/index-repo` (3 plugin commands) - New: `/pm`, `/research`, `/index-repo` (3 plugin commands)
- Functionality improved with hot reload and auto-activation - Installation: Global `~/.claude/commands/` → Project-local `.claude-plugin/`
- Installation: Manual file copying → `make install-plugin` - Just `cd` to project directory and run `claude`
</details> </details>
<details> <details>
<summary><b>💡 Installation Troubleshooting</b></summary> <summary><b>💡 Troubleshooting</b></summary>
**Plugin installation failed?**
```bash
# Check if Claude Code is installed
which claude
# Verify plugin directory exists
ls ~/.claude/plugins/
# Reinstall plugin
make reinstall-plugin
# Check installation
ls ~/.claude/plugins/pm-agent/
```
**Plugin not loading?** **Plugin not loading?**
- Restart Claude Code completely ```bash
- Run `/plugin` in Claude Code to verify installation # Verify you're in the project directory
- Check that `.claude-plugin/plugin.json` exists in repository pwd # Should show: /path/to/SuperClaude_Framework
# Check .claude-plugin/ exists
ls .claude-plugin/plugin.json
# Restart Claude Code in this directory
claude
```
**Commands not working (/pm, /research, /index-repo)?**
- Ensure you started `claude` from the SuperClaude_Framework directory
- Check for errors in Claude Code output
- Verify `.claude-plugin/plugin.json` has correct structure
**Hot reload not working?**
- Edit `.claude-plugin/pm/index.ts`
- Save file
- Changes should reflect immediately (no restart needed)
**Development mode (for contributors):** **Development mode (for contributors):**
```bash ```bash