chore: update version and component metadata

- Bump version (pyproject.toml, setup/__init__.py)
- Update CLAUDE.md import service references
- Reflect component structure changes

🤖 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 07:24:09 +09:00
parent 01ddc14354
commit 2bb2a6e484
3 changed files with 37 additions and 33 deletions

View File

@@ -35,7 +35,9 @@ dependencies = [
"importlib-metadata>=1.0.0; python_version<'3.8'", "importlib-metadata>=1.0.0; python_version<'3.8'",
"typer>=0.9.0", "typer>=0.9.0",
"rich>=13.0.0", "rich>=13.0.0",
"click>=8.0.0" "click>=8.0.0",
"pyyaml>=6.0.0",
"requests>=2.28.0"
] ]
[project.urls] [project.urls]

View File

@@ -20,5 +20,5 @@ DATA_DIR = SETUP_DIR / "data"
# Import home directory detection for immutable distros # Import home directory detection for immutable distros
from .utils.paths import get_home_directory from .utils.paths import get_home_directory
# Installation target # Installation target - SuperClaude components installed in subdirectory
DEFAULT_INSTALL_DIR = get_home_directory() / ".claude" DEFAULT_INSTALL_DIR = get_home_directory() / ".claude" / "superclaude"

View File

@@ -16,10 +16,11 @@ class CLAUDEMdService:
Initialize CLAUDEMdService Initialize CLAUDEMdService
Args: Args:
install_dir: Installation directory (typically ~/.claude) install_dir: Installation directory (typically ~/.claude/superclaude)
""" """
self.install_dir = install_dir self.install_dir = install_dir
self.claude_md_path = install_dir / "CLAUDE.md" # CLAUDE.md is always in parent directory (~/.claude/)
self.claude_md_path = install_dir.parent / "CLAUDE.md"
self.logger = get_logger() self.logger = get_logger()
def read_existing_imports(self) -> Set[str]: def read_existing_imports(self) -> Set[str]:
@@ -39,7 +40,8 @@ class CLAUDEMdService:
content = f.read() content = f.read()
# Find all @import statements using regex # Find all @import statements using regex
import_pattern = r"^@([^\s\n]+\.md)\s*$" # Supports both @superclaude/file.md and @file.md (legacy)
import_pattern = r"^@(?:superclaude/)?([^\s\n]+\.md)\s*$"
matches = re.findall(import_pattern, content, re.MULTILINE) matches = re.findall(import_pattern, content, re.MULTILINE)
existing_imports.update(matches) existing_imports.update(matches)
@@ -116,7 +118,8 @@ class CLAUDEMdService:
if files: if files:
sections.append(f"# {category}") sections.append(f"# {category}")
for file in sorted(files): for file in sorted(files):
sections.append(f"@{file}") # Add superclaude/ prefix for all imports
sections.append(f"@superclaude/{file}")
sections.append("") sections.append("")
return "\n".join(sections) return "\n".join(sections)
@@ -133,8 +136,10 @@ class CLAUDEMdService:
True if successful, False otherwise True if successful, False otherwise
""" """
try: try:
# Ensure CLAUDE.md exists # Check if CLAUDE.md exists (DO NOT create it)
self.ensure_claude_md_exists() if not self.ensure_claude_md_exists():
self.logger.info("Skipping CLAUDE.md update (file does not exist)")
return False
# Read existing content and imports # Read existing content and imports
existing_content = self.read_existing_content() existing_content = self.read_existing_content()
@@ -235,39 +240,36 @@ class CLAUDEMdService:
# Import line (starts with @) # Import line (starts with @)
elif line.startswith("@") and current_category: elif line.startswith("@") and current_category:
import_file = line[1:].strip() # Remove "@" import_file = line[1:].strip() # Remove "@"
# Remove superclaude/ prefix if present (normalize to filename only)
if import_file.startswith("superclaude/"):
import_file = import_file[len("superclaude/"):]
if import_file not in imports_by_category[current_category]: if import_file not in imports_by_category[current_category]:
imports_by_category[current_category].append(import_file) imports_by_category[current_category].append(import_file)
return imports_by_category return imports_by_category
def ensure_claude_md_exists(self) -> None: def ensure_claude_md_exists(self) -> bool:
""" """
Create CLAUDE.md with default content if it doesn't exist Check if CLAUDE.md exists (DO NOT create it - Claude Code pure file)
Returns:
True if CLAUDE.md exists, False otherwise
""" """
if self.claude_md_path.exists(): if self.claude_md_path.exists():
return return True
try: # CLAUDE.md is a Claude Code pure file - NEVER create or modify it
# Create directory if it doesn't exist self.logger.warning(
self.claude_md_path.parent.mkdir(parents=True, exist_ok=True) f"⚠️ CLAUDE.md not found at {self.claude_md_path}\n"
f" SuperClaude will NOT create this file automatically.\n"
# Default CLAUDE.md content f" Please manually add the following to your CLAUDE.md:\n\n"
default_content = """# SuperClaude Entry Point f" # SuperClaude Framework Components\n"
f" @superclaude/FLAGS.md\n"
This file serves as the entry point for the SuperClaude framework. f" @superclaude/PRINCIPLES.md\n"
You can add your own custom instructions and configurations here. f" @superclaude/RULES.md\n"
f" (and other SuperClaude components)\n"
The SuperClaude framework components will be automatically imported below. )
""" return False
with open(self.claude_md_path, "w", encoding="utf-8") as f:
f.write(default_content)
self.logger.info("Created CLAUDE.md with default content")
except Exception as e:
self.logger.error(f"Failed to create CLAUDE.md: {e}")
raise
def remove_imports(self, files: List[str]) -> bool: def remove_imports(self, files: List[str]) -> bool:
""" """