8000 Update to match master by NomenAK · Pull Request #43 · NomenAK/SuperClaude · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update to match master #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .claude/commands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
@include shared/universal-constants.yml#Universal_Legend

## Ultra-Compressed Reference
Commands: `/cmd --flags` | 18 total | Universal flags available
Commands: `/cmd --flags` | 19 total | Universal flags available

@include shared/flag-inheritance.yml#Universal_Always

## Command Categories
**Analysis**: `/analyze` `/scan` `/explain`
**Analysis**: `/analyze` `/scan` `/explain` `/review`
**Build**: `/build` `/deploy` `/migrate`
**Manage**: `/task` `/load` `/cleanup`
**Dev**: `/test` `/troubleshoot` `/improve`
**Utils**: `/design` `/document` `/estimate` `/dev-setup` `/git` `/spawn`

## Commands w/ Primary Flags
**Dev**: `/build` --init|feature|react | `/dev-setup` --install|ci | `/test` --coverage|e2e
**Analysis**: `/analyze` --code|arch | `/troubleshoot` --fix|prod | `/improve` --perf|quality | `/explain` --depth
**Analysis**: `/analyze` --code|arch | `/review` --files|commit|pr | `/troubleshoot` --fix|prod | `/improve` --perf|quality | `/explain` --depth
**Ops**: `/deploy` --env|rollback | `/migrate` --dry-run | `/scan` --security | `/estimate` --detailed | `/cleanup` --all | `/git` --commit|sync
**Design**: `/design` --api|ddd | `/document` --api|user | `/spawn` --task
**Manage**: `/task` --create|status | `/load` --context
## Workflow Patterns
**Setup**: `/load` → `/dev-setup --install` → `/build --init` → `/test`
**Feature**: `/analyze` → `/design --api` → `/build --tdd` → `/test --e2e` → `/deploy`
**Debug**: `/troubleshoot --fix` → `/test` → `/git --commit`
**Quality**: `/analyze --code --think` → `/improve --quality` → `/scan --validate`
**Quality**: `/review --quality --evidence` → `/improve --quality` → `/scan --validate`
**Security**: `/scan --security --owasp` → `/improve` → `/scan --validate`

### Advanced Flag Combinations
Expand Down
75 changes: 75 additions & 0 deletions .claude/commands/review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
**Purpose**: AI-powered code review and quality analysis

---

@include shared/universal-constants.yml#Universal_Legend

## Command Execution
Execute: immediate. --plan→show plan first
Legend: Generated based on symbols used in command
Purpose: "[Action][Subject] in $ARGUMENTS"

Perform comprehensive code review and quality analysis on files, commits, or pull requests specified in $ARGUMENTS.

@include shared/flag-inheritance.yml#Universal_Always

Examples:
- `/review --files src/auth.ts --persona-security` - Security-focused file review
- `/review --commit HEAD --quality --evidence` - Quality review with sources
- `/review --pr 123 --all --interactive` - Comprehensive PR review
- `/review --files src/ --persona-performance --think` - Performance analysis

## Command-Specific Flags
--files: "Review specific files or directories"
--commit: "Review changes in specified commit (HEAD, hash, range)"
--pr: "Review pull request changes (git diff main..branch)"
--quality: "Focus on code quality issues (DRY, SOLID, complexity)"
--evidence: "Include sources and documentation for all suggestions"
--fix: "Suggest specific fixes for identified issues"
--summary: "Generate executive summary of review findings"

@include shared/quality-patterns.yml#Code_Quality_Metrics

@include shared/security-patterns.yml#OWASP_Top_10

@include shared/compression-performance-patterns.yml#Performance_Baselines

@include shared/architecture-patterns.yml#DDD_Building_Blocks

## Review Process & Methodology

**1. Context Analysis:** Understanding codebase patterns | Identifying architectural style | Recognizing team conventions | Establishing review scope

**2. Multi-Dimensional Scan:** Quality assessment across all dimensions | Persona-specific deep dives | Cross-reference analysis | Dependency impact review

**3. Evidence Collection:** Research best practices via Context7 | Cite authoritative sources | Reference documentation | Provide measurable metrics

**4. Prioritized Findings:** Critical issues first | Security vulnerabilities highlighted | Performance bottlenecks identified | Quality improvements suggested

**5. Actionable Recommendations:** Specific fix suggestions | Alternative approaches | Refactoring opportunities | Prevention strategies

**Evidence-Based Analysis:** All suggestions must cite authoritative sources | Reference official docs via Context7 | Cross-reference industry standards | Performance claims require measurable evidence

**Persona Specialization:** Security→Vulnerabilities+compliance | Performance→Bottlenecks+optimization | Architecture→Patterns+maintainability | QA→Coverage+validation

@include shared/research-patterns.yml#Mandatory_Research_Flows

@include shared/quality-patterns.yml#Validation_Sequence

## Persona Integration

**--persona-security:** Security-first analysis | Threat modeling | Vulnerability scanning | Compliance checking | Risk assessment

**--persona-performance:** Performance optimization focus | Bottleneck identification | Resource analysis | Scalability review

**--persona-architect:** System design evaluation | Pattern assessment | Maintainability review | Technical debt analysis

**--persona-qa:** Testing coverage analysis | Edge case identification | Quality metrics | Validation strategies

**--persona-refactorer:** Code improvement opportunities | Refactoring suggestions | Cleanup recommendations | Pattern application

@include shared/execution-patterns.yml#Servers

@include shared/docs-patterns.yml#Standard_Notifications

@include shared/universal-constants.yml#Standard_Messages_Templates
6 changes: 6 additions & 0 deletions .claude/commands/shared/compression-performance-patterns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ Performance_Baselines:
CPU_Utilization: "Track intensive operations"
Network_Usage: "MCP server communication overhead"
Disk_I_O: "File operations efficiency"

Review_Scope_Limits:
Single_File: "Files >1000 lines flagged for review scope"
Directory: "Directories >50 files require batch processing"
Repository: "Repos >10K files get incremental analysis"
Large_File_Warning: "Files >5MB may require streaming analysis"
```

## MCP Performance Integration
Expand Down
31 changes: 30 additions & 1 deletion COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

**Example Commands**:
```bash
/review --files src/ --quality --evidence # Comprehensive code review with evidence
/analyze --code --persona-architect # Code analysis with architect mindset
/build --react --magic --tdd # Build React app with AI components
/troubleshoot --prod --five-whys --seq # Production debugging with reasoning
Expand Down Expand Up @@ -154,7 +155,27 @@ Create, run, and maintain testing strategies across the stack.
/test --mutation --strict # Test quality validation
```

### 🔍 Analysis & Improvement Commands (4)
### 🔍 Analysis & Improvement Commands (5)

#### `/review` - AI-Powered Code Review
Comprehensive code review and quality analysis with evidence-based recommendations.

**Command-Specific Flags:**
- `--files` - Review specific files or directories
- `--commit` - Review changes in specified commit (HEAD, hash, range)
- `--pr` - Review pull request changes (git diff main..branch)
- `--quality` - Focus on code quality issues (DRY, SOLID, complexity)
- `--evidence` - Include sources and documentation for all suggestions
- `--fix` - Suggest specific fixes for identified issues
- `--summary` - Generate executive summary of review findings

**Examples:**
```bash
/review --files src/auth.ts --persona-security # Security-focused file review
/review --commit HEAD --quality --evidence # Quality review with sources
/review --pr 123 --all --interactive # Comprehensive PR review
/review --files src/ --persona-performance --think # Performance analysis
```

#### `/analyze` - Multi-Dimensional Analysis
Comprehensive analysis of code, architecture, performance, and security.
Expand Down Expand Up @@ -442,6 +463,14 @@ Load and analyze project context.
/test --performance --load
```

**Quality Assurance**
```bash
/review --quality --evidence --persona-qa
/improve --quality --refactor --strict
/scan --validate --quality
/test --coverage --mutation
```

### 💡 Best Practices

1. **Always validate risky operations**
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Switch between different approaches with persona flags:

**v2.0.1 Update**: All 9 personas are now universal flags, available on every command for consistent access to specialized approaches.

### ⚡ **18 Commands**
### ⚡ **19 Commands**
Development lifecycle coverage:

**Development Commands**
Expand All @@ -97,6 +97,7 @@ Development lifecycle coverage:

**Analysis & Quality**
```bash
/review --quality --evidence --persona-qa # AI-powered code review
/analyze --architecture --seq # System analysis
/troubleshoot --prod --five-whys # Issue resolution
/improve --performance --iterate # Optimization
Expand Down Expand Up @@ -223,7 +224,8 @@ SuperClaude encourages:
- `/dev-setup` - Development environment setup
- `/test` - Testing framework

### Analysis & Improvement (4 Commands)
### Analysis & Improvement (5 Commands)
- `/review` - AI-powered code review with evidence-based recommendations
- `/analyze` - Code and system analysis
- `/troubleshoot` - Debugging and issue resolution
- `/improve` - Enhancement and optimization
Expand Down Expand Up @@ -255,7 +257,7 @@ SuperClaude v2's architecture enables extensibility:
- **@include System** – Template engine for configuration

**🎯 Unified Command System**
- **18 Commands** – Development lifecycle coverage
- **19 Commands** – Development lifecycle coverage
- **Flag Inheritance** – Universal flags on all commands
- **Persona Integration** – 9 cognitive modes as flags
- **Template Validation** – Reference integrity checking
Expand Down Expand Up @@ -370,7 +372,7 @@ Join the community: [Discussions](https://github.com/NomenAK/SuperClaude/discuss
- **Maintenance**: Centralized configuration

**📊 Framework Details:**
- **Commands**: 18 specialized commands
- **Commands**: 19 specialized commands
- **Personas**: 9 cognitive approaches
- **MCP Servers**: 4 integrations
- **Methodology**: Evidence-based approach
Expand Down
33 changes: 11 additions & 22 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Installs SuperClaude configuration framework to enhance Claude Code
# Version: 2.0.0
# License: MIT
# Repository: https://github.com/nshkrdotcom/SuperClaude
# Repository: https://github.com/NomenAK/SuperClaude

set -e # Exit on error
set -o pipefail # Exit on pipe failure
Expand Down Expand Up @@ -201,15 +201,9 @@ compare_versions() {
fi

# Split versions into arrays
local v1_parts v2_parts
IFS='.' read -ra v1_parts <<< "$version1" || {
log_error "compare_versions: Failed to parse version1: $version1"
return 1
}
IFS='.' read -ra v2_parts <<< "$version2" || {
log_error "compare_versions: Failed to parse version2: $version2"
return 1
}
local v1_parts=() v2_parts=()
IFS='.' read -ra v1_parts <<< "$version1"
IFS='.' read -ra v2_parts <<< "$version2"

# Compare each part
for i in {0..2}; do
Expand Down Expand Up @@ -646,6 +640,7 @@ get_source_files() {
-not -name "*.log" \
-not -name "*.logs" \
-not -name "settings.local.json" \
-not -name "CLAUDE.md" \
2>/dev/null | sed 's|^\.claude/||' | sort); then
log_error "get_source_files: Failed to enumerate files in .claude directory"
return 1
Expand Down Expand Up @@ -1090,12 +1085,10 @@ if [[ "$UNINSTALL_MODE" = true ]]; then
fi

# Only remove files that we know we installed
if [[ -f ".claude/$installed_file" ]] || \
[[ "$installed_file" == "CLAUDE.md" && -f "CLAUDE.md" ]] || \
[[ "$installed_file" == "VERSION" ]] || \
[[ "$installed_file" == ".checksums" ]] || \
[[ "$installed_file" =~ ^commands/ ]] || \
[[ "$installed_file" =~ ^shared/ ]]; then
if [[ -f "$current_dir/.claude/$installed_file" ]] ||
[[ "$installed_file" == "CLAUDE.md" && -f "$current_dir/CLAUDE.md" ]] ||
[[ "$installed_file" == "VERSION" && -f "$current_dir/VERSION" ]] ||
[[ "$installed_file" == ".checksums" && -f "$current_dir/.checksums" ]]; then
if [[ "$DRY_RUN" = true ]]; then
echo " Would remove: $installed_file"
else
Expand All @@ -1105,7 +1098,7 @@ if [[ "$UNINSTALL_MODE" = true ]]; then
((removed_count++))
fi
fi
done < <(find . -type f)
done < <(get_installed_files "$INSTALL_DIR")

# Remove empty directories, but not the main directory if it contains preserved files
if [[ "$DRY_RUN" != true ]]; then
Expand Down Expand Up @@ -1538,7 +1531,6 @@ copy_with_update_check() {
# Retry copy operation with error capture
while [[ $retry_count -lt $max_retries ]]; do
if cp_error=$(cp "$src_file" "$dest_file.new" 2>&1); then
sync 2>/dev/null || true # Ensure file is written
target_file="$dest_file.new"
copy_performed=true
break
Expa A3A8 nd All @@ -1559,7 +1551,6 @@ copy_with_update_check() {
# Retry copy operation with error capture
while [[ $retry_count -lt $max_retries ]]; do
if cp_error=$(cp "$src_file" "$dest_file" 2>&1); then
sync 2>/dev/null || true # Ensure file is written
copy_performed=true
break
else
Expand All @@ -1579,7 +1570,6 @@ copy_with_update_check() {
if [[ "$DRY_RUN" != true ]]; then
# File is identical, still copy to ensure permissions are correct
if cp_error=$(cp "$src_file" "$dest_file" 2>&1); then
sync 2>/dev/null || true # Ensure file is written
copy_performed=true
else
log_warning "Failed to update identical file $basename_file: $cp_error"
Expand Down Expand Up @@ -1618,7 +1608,6 @@ copy_with_update_check() {

# Try to re-copy the file once more
if cp_error=$(cp "$src_file" "$target_file" 2>&1); then
sync 2>/dev/null || true # Ensure file is written
sleep 0.1 # Brief pause before verification
if verify_file_integrity "$src_file" "$target_file"; then
log_verbose "Recovery successful: integrity verified for $basename_file"
Expand Down Expand Up @@ -1853,4 +1842,4 @@ else
echo ""
echo "For manual installation, see README.md"
exit 1
fi
fi
0