DELETION_RATIONALE.md
PR Target Branch: next
Base Branch: master
Date: 2025-10-24
| Category | Deleted Files | Deleted Lines | Reason Category |
|---|---|---|---|
| setup/ directory | 40 | 12,289 | Architecture renovation |
| superclaude/ (old structure) | 86 | ~8,000 | PEP 517 migration |
| TypeScript implementation | 14 | 2,633 | Preserved in branch |
| Plugin files | 9 | 494 | Repository separation |
| bin/ + scripts/ | 8 | ~800 | CLI modernization |
| Total | ~157 | ~22,507 | - |
setup/
āāā cli/ # Old CLI commands (backup, install, uninstall, update)
āāā components/ # Installers for agents, modes, commands
āāā core/ # Installer, registry, validator
āāā services/ # claude_md, config, files, settings
āāā utils/ # logger, paths, security, symbols, ui, updater
Evidence 1: Commit Message
commit eb37591
refactor: remove legacy setup/ system and dependent tests
Remove old installation system (setup/) that caused heavy token consumption
Evidence 2: PHASE_2_COMPLETE.md
New architecture (src/superclaude/) is self-contained and doesn't need setup/.
Evidence 3: Architecture Migration Rationale
~/.claude/superclaude/ ā Polluted user environmentsite-packages/ ā Standard Python packageEvidence 4: Token Efficiency
uv pip install -e ".[dev]"Logical Conclusion:
~/.claude/ pollutionsuperclaude/
āāā agents/ # 20 agent definitions
āāā commands/ # 27 slash commands
āāā modes/ # 7 behavior modes
āāā framework/ # PRINCIPLES, RULES, FLAGS
āāā business/ # Business panel
āāā cli/ # Old CLI tools
Evidence 1: Python Package Directory Layout Research
File: docs/research/python_src_layout_research_20251021.md
## Recommendation
Use src/ layout for SuperClaude:
- Clear separation between package code and tests
- Prevents accidental imports from development directory
- Modern Python best practice
Evidence 2: Migration Completion Proof
# Old structure
superclaude/pm_agent/confidence.py
# New structure (PEP 517 compliant)
src/superclaude/pm_agent/confidence.py
Evidence 3: pytest plugin auto-discovery
$ uv run python -m pytest --trace-config 2>&1 | grep "registered third-party plugins:"
registered third-party plugins:
superclaude-0.4.0 at /Users/kazuki/github/superclaude/src/superclaude/pytest_plugin.py
Logical Conclusion:
~/.claude/commands/sc/ (27 commands):
- analyze, brainstorm, build, business-panel, cleanup
- design, document, estimate, explain, git, help
- implement, improve, index, load, pm, reflect
- research, save, select-tool, spawn, spec-panel
- task, test, troubleshoot, workflow
Evidence 1: Commit Message
commit 06e7c00
feat: migrate research and index-repo to plugin, delete all slash commands
## Architecture Change
Strategy: Minimal start with PM Agent orchestration
- PM Agent = orchestrator (command coordinator)
- Task tool (general-purpose, Explore) = execution
- Plugin commands = specialized tasks when needed
- Avoid reinventing the wheel (use official tools first)
## Benefits
ā
Minimal footprint (3 commands vs 27)
ā
Plugin-based distribution
ā
Version control
ā
Easy to extend when needed
Evidence 2: Claude Code Official Tools Priority Policy
Evidence 3: PM Agent Orchestration Strategy
File: commands/agent.md (SuperClaude_Plugin)
## Task Protocol
1. Clarify scope
2. Plan investigation
- @confidence-check skill (pre-implementation score ā„0.90 required)
- @deep-research agent (web/MCP research)
- @repo-index agent (repository structure + file shortlist)
- @self-review agent (post-implementation validation)
3. Iterate until confident
4. Implementation wave
5. Self-review and reflexion
Evidence 4: Performance Data
Logical Conclusion:
pm/
āāā index.ts
āāā confidence.ts
āāā self-check.ts
āāā reflexion.ts
āāā __tests__/
research/
āāā index.ts
index/
āāā index.ts
Evidence 1: Commit Message
commit f511e04
chore: remove TypeScript implementation (saved in typescript-impl branch)
- TypeScript implementation preserved in typescript-impl branch for future reference
Evidence 2: Branch Preservation Confirmation
$ git branch --all | grep typescript-impl
typescript-impl
Evidence 3: Avoiding Dual Implementation
Evidence 4: Markdown-based Command Superiority
File: commands/agent.md
# SC Agent Activation
š **SC Agent online** ā this plugin launches `/sc:agent` automatically at session start.
Logical Conclusion:
typescript-impl branch.claude-plugin/
āāā plugin.json
āāā marketplace.json
agents/
āāā deep-research.md
āāā repo-index.md
āāā self-review.md
commands/
āāā pm.md
āāā research.md
āāā index-repo.md
hooks/
āāā hooks.json
Evidence 1: Commit Message
commit 87c80d0
refactor: move plugin files to SuperClaude_Plugin repository
Plugin files now maintained in SuperClaude_Plugin repository.
This repository focuses on Python package implementation.
Evidence 2: Repository Separation Rationale
SuperClaude_Framework (this repository):
superclaude command)SuperClaude_Plugin (separate repository):
Evidence 3: Clear Responsibility Separation
SuperClaude_Framework:
Purpose: Distributed as Python library
Install: `uv pip install superclaude`
Target: pytest + CLI users
SuperClaude_Plugin:
Purpose: Distributed as Claude Code plugin
Install: `/plugin install sc@SuperClaude-Org`
Target: Claude Code users
Logical Conclusion:
bin/
āāā cli.js
āāā check_env.js
āāā check_update.js
āāā install.js
āāā update.js
scripts/
āāā build_and_upload.py
āāā validate_pypi_ready.py
āāā verify_research_integration.sh
Evidence 1: CLI Modernization Commit
commit b23c9ce
feat: migrate CLI to typer + rich for modern UX
Evidence 2: Old CLI vs New CLI
Old CLI (bin/cli.js):
New CLI (src/superclaude/cli/main.py):
# Modern Python CLI with typer + rich
@app.command()
def doctor(verbose: bool = False):
"""Run health checks"""
# Simple, readable, maintainable
Evidence 3: Obsolete Scripts
build_and_upload.py ā Replaced by uv build + uv publishvalidate_pypi_ready.py ā Replaced by uv build --checkverify_research_integration.sh ā Replaced by uv run pytestLogical Conclusion:
setup/ systemuv pip install -e ".[dev]"All deletions were performed based on the following principles:
Review Focus: