refactor: rename CoreComponent to FrameworkDocsComponent and add PM token tracking

## Changes

### Component Renaming (setup/components/)
- Renamed CoreComponent → FrameworkDocsComponent for clarity
- Updated all imports in __init__.py, agents.py, commands.py, mcp_docs.py, modes.py
- Better reflects the actual purpose (framework documentation files)

### PM Agent Enhancement (superclaude/commands/pm.md)
- Added token usage tracking instructions
- PM Agent now reports:
  1. Current token usage from system warnings
  2. Percentage used (e.g., "27% used" for 54K/200K)
  3. Status zone: 🟢 <75% | 🟡 75-85% | 🔴 >85%
- Helps prevent token exhaustion during long sessions

### UI Utilities (setup/utils/ui.py)
- Added new UI utility module for installer
- Provides consistent user interface components

## Benefits
-  Clearer component naming (FrameworkDocs vs Core)
-  PM Agent token awareness for efficiency
-  Better visual feedback with status zones

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kazuki
2025-10-17 05:28:23 +09:00
parent 7c3d95cc46
commit bf1fd50ca8
7 changed files with 217 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
"""Component implementations for SuperClaude installation system"""
from .core import CoreComponent
from .framework_docs import FrameworkDocsComponent
from .commands import CommandsComponent
from .mcp import MCPComponent
from .agents import AgentsComponent
@@ -8,7 +8,7 @@ from .modes import ModesComponent
from .mcp_docs import MCPDocsComponent
__all__ = [
"CoreComponent",
"FrameworkDocsComponent",
"CommandsComponent",
"MCPComponent",
"AgentsComponent",

View File

@@ -126,7 +126,7 @@ class AgentsComponent(Component):
def get_dependencies(self) -> List[str]:
"""Get component dependencies"""
return ["core"]
return ["framework_docs"]
def update(self, config: Dict[str, Any]) -> bool:
"""Update agents component"""

View File

@@ -153,7 +153,7 @@ class CommandsComponent(Component):
def get_dependencies(self) -> List[str]:
"""Get dependencies"""
return ["core"]
return ["framework_docs"]
def update(self, config: Dict[str, Any]) -> bool:
"""Update commands component"""

View File

@@ -340,7 +340,7 @@ class MCPDocsComponent(Component):
def get_dependencies(self) -> List[str]:
"""Get dependencies"""
return ["core"]
return ["framework_docs"]
def _get_source_dir(self) -> Optional[Path]:
"""Get source directory for MCP documentation files"""

View File

@@ -140,7 +140,7 @@ class ModesComponent(Component):
def get_dependencies(self) -> List[str]:
"""Get dependencies"""
return ["core"]
return ["framework_docs"]
def _get_source_dir(self) -> Optional[Path]:
"""Get source directory for mode files"""