Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:20:28 +08:00
commit b727790a9e
65 changed files with 16412 additions and 0 deletions

View File

@@ -0,0 +1,105 @@
#!/usr/bin/env bash
# ============================================================================
# Target Detector Script
# ============================================================================
# Purpose: Auto-detect if target is a marketplace, plugin, or both
# Version: 1.0.0
# Usage: ./target-detector.sh <path>
# Returns: 0=success, 1=error, 2=unknown_target
# ============================================================================
set -euo pipefail
# ====================
# Configuration
# ====================
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
readonly TARGET_PATH="${1:-.}"
# ====================
# Output Functions
# ====================
print_json() {
local target_type="$1"
local confidence="$2"
shift 2
local files=("$@")
cat <<EOF
{
"target_type": "${target_type}",
"path": "$(cd "${TARGET_PATH}" && pwd)",
"files_found": [$(printf '"%s",' "${files[@]}" | sed 's/,$//')],
"confidence": "${confidence}"
}
EOF
}
# ====================
# Detection Logic
# ====================
detect_target() {
local path="$1"
# Verify path exists
if [[ ! -d "${path}" ]]; then
echo "Error: Path does not exist: ${path}" >&2
return 1
fi
# Check for .claude-plugin directory
if [[ ! -d "${path}/.claude-plugin" ]]; then
echo "Error: No .claude-plugin directory found at ${path}" >&2
echo "This does not appear to be a plugin or marketplace." >&2
return 2
fi
# Detect manifest files
local marketplace_json="${path}/.claude-plugin/marketplace.json"
local plugin_json="${path}/plugin.json"
local has_marketplace=false
local has_plugin=false
local files_found=()
if [[ -f "${marketplace_json}" ]]; then
has_marketplace=true
files_found+=("marketplace.json")
fi
if [[ -f "${plugin_json}" ]]; then
has_plugin=true
files_found+=("plugin.json")
fi
# Determine target type
if [[ "${has_marketplace}" == "true" ]] && [[ "${has_plugin}" == "true" ]]; then
print_json "multi-target" "high" "${files_found[@]}"
return 0
elif [[ "${has_marketplace}" == "true" ]]; then
print_json "marketplace" "high" "${files_found[@]}"
return 0
elif [[ "${has_plugin}" == "true" ]]; then
print_json "plugin" "high" "${files_found[@]}"
return 0
else
print_json "unknown" "low" "${files_found[@]}"
echo "Error: .claude-plugin directory exists but no manifest files found" >&2
return 2
fi
}
# ====================
# Main Execution
# ====================
main() {
detect_target "${TARGET_PATH}"
}
# Run main function
main "$@"

View File

@@ -0,0 +1,245 @@
#!/usr/bin/env python3
"""
============================================================================
Validation Dispatcher Script
============================================================================
Purpose: Route validation requests and aggregate results from multiple layers
Version: 1.0.0
Usage: ./validation-dispatcher.py --mode=<mode> [options]
Returns: 0=success, 1=error
============================================================================
"""
import sys
import json
import argparse
from pathlib import Path
from typing import Dict, List, Any
from enum import Enum
class ValidationMode(Enum):
"""Validation dispatch modes"""
ROUTE = "route" # Route to appropriate validator
AGGREGATE = "aggregate" # Aggregate results from multiple validators
class ValidationResult:
"""Validation result structure"""
def __init__(self):
self.layers: Dict[str, Dict[str, Any]] = {}
self.overall_score = 0
self.critical_issues = 0
self.warnings = 0
self.recommendations = 0
def add_layer(self, name: str, result: Dict[str, Any]):
"""Add a validation layer result"""
self.layers[name] = result
# Aggregate counts
if 'critical_issues' in result:
self.critical_issues += result['critical_issues']
if 'warnings' in result:
self.warnings += result['warnings']
if 'recommendations' in result:
self.recommendations += result['recommendations']
def calculate_overall_score(self):
"""Calculate overall quality score from all layers"""
if not self.layers:
return 0
total_score = 0
layer_count = 0
for layer, result in self.layers.items():
if 'score' in result:
total_score += result['score']
layer_count += 1
if layer_count > 0:
self.overall_score = total_score // layer_count
else:
# Fallback calculation based on issues
self.overall_score = max(0, 100 - (self.critical_issues * 20) -
(self.warnings * 10) - (self.recommendations * 5))
return self.overall_score
def get_rating(self) -> str:
"""Get quality rating based on score"""
score = self.overall_score
if score >= 90:
return "Excellent"
elif score >= 75:
return "Good"
elif score >= 60:
return "Fair"
elif score >= 40:
return "Needs Improvement"
else:
return "Poor"
def get_stars(self) -> str:
"""Get star rating"""
score = self.overall_score
if score >= 90:
return "⭐⭐⭐⭐⭐"
elif score >= 75:
return "⭐⭐⭐⭐"
elif score >= 60:
return "⭐⭐⭐"
elif score >= 40:
return "⭐⭐"
else:
return ""
def is_publication_ready(self) -> str:
"""Determine publication readiness"""
if self.critical_issues > 0:
return "Not Ready"
elif self.overall_score >= 75:
return "Ready"
else:
return "Needs Work"
def to_dict(self) -> Dict[str, Any]:
"""Convert to dictionary"""
return {
"overall_score": self.overall_score,
"rating": self.get_rating(),
"stars": self.get_stars(),
"publication_ready": self.is_publication_ready(),
"critical_issues": self.critical_issues,
"warnings": self.warnings,
"recommendations": self.recommendations,
"layers": self.layers
}
class ValidationDispatcher:
"""Dispatcher for validation routing and aggregation"""
def __init__(self, mode: ValidationMode):
self.mode = mode
self.result = ValidationResult()
def route(self, target_type: str, target_path: str, level: str) -> Dict[str, Any]:
"""Route to appropriate validator based on target type"""
routing = {
"marketplace": {
"quick": "/validate-quick",
"comprehensive": "/validate-marketplace"
},
"plugin": {
"quick": "/validate-quick",
"comprehensive": "/validate-plugin"
}
}
if target_type not in routing:
return {
"error": f"Unknown target type: {target_type}",
"supported": list(routing.keys())
}
command = routing[target_type].get(level, routing[target_type]["comprehensive"])
return {
"target_type": target_type,
"target_path": target_path,
"validation_level": level,
"command": command,
"invocation": f"{command} {target_path}"
}
def aggregate(self, layer_results: List[Dict[str, Any]]) -> Dict[str, Any]:
"""Aggregate results from multiple validation layers"""
for layer_data in layer_results:
layer_name = layer_data.get('layer', 'unknown')
self.result.add_layer(layer_name, layer_data)
self.result.calculate_overall_score()
return self.result.to_dict()
def format_output(self, data: Dict[str, Any]) -> str:
"""Format output for console display"""
if self.mode == ValidationMode.ROUTE:
return json.dumps(data, indent=2)
elif self.mode == ValidationMode.AGGREGATE:
# Pretty print aggregated results
lines = []
lines.append("=" * 60)
lines.append("AGGREGATED VALIDATION RESULTS")
lines.append("=" * 60)
lines.append(f"Overall Score: {data['overall_score']}/100 {data['stars']}")
lines.append(f"Rating: {data['rating']}")
lines.append(f"Publication Ready: {data['publication_ready']}")
lines.append("")
lines.append(f"Critical Issues: {data['critical_issues']}")
lines.append(f"Warnings: {data['warnings']}")
lines.append(f"Recommendations: {data['recommendations']}")
lines.append("")
lines.append("Layer Results:")
for layer, result in data['layers'].items():
status = result.get('status', 'unknown')
lines.append(f" - {layer}: {status}")
lines.append("=" * 60)
return "\n".join(lines)
def main():
"""Main execution"""
parser = argparse.ArgumentParser(description="Validation dispatcher")
parser.add_argument("--mode", required=True, choices=["route", "aggregate"],
help="Dispatch mode")
parser.add_argument("--target-type", help="Target type for routing")
parser.add_argument("--target-path", default=".", help="Target path")
parser.add_argument("--level", default="comprehensive",
choices=["quick", "comprehensive"],
help="Validation level")
parser.add_argument("--results", help="JSON file with layer results for aggregation")
parser.add_argument("--json", action="store_true", help="Output JSON format")
args = parser.parse_args()
mode = ValidationMode(args.mode)
dispatcher = ValidationDispatcher(mode)
try:
if mode == ValidationMode.ROUTE:
if not args.target_type:
print("Error: --target-type required for route mode", file=sys.stderr)
return 1
result = dispatcher.route(args.target_type, args.target_path, args.level)
elif mode == ValidationMode.AGGREGATE:
if not args.results:
print("Error: --results required for aggregate mode", file=sys.stderr)
return 1
with open(args.results, 'r') as f:
layer_results = json.load(f)
result = dispatcher.aggregate(layer_results)
# Output results
if args.json:
print(json.dumps(result, indent=2))
else:
print(dispatcher.format_output(result))
return 0
except Exception as e:
print(f"Error: {e}", file=sys.stderr)
return 1
if __name__ == "__main__":
sys.exit(main())

View File

@@ -0,0 +1,249 @@
## Operation: Auto-Validate (Intelligent Detection + Validation)
Automatically detect target type and execute the most appropriate validation workflow.
### Parameters from $ARGUMENTS
- **path**: Path to validation target (required)
- Format: `path:/path/to/target` or `path:.`
- Default: `.` (current directory)
- **level**: Validation depth (optional)
- Format: `level:quick|comprehensive`
- Default: `comprehensive`
- Options:
- `quick`: Fast critical checks only
- `comprehensive`: Full quality audit
### Auto-Validation Workflow
This operation provides the most intelligent, hands-off validation experience by:
1. Automatically detecting what needs to be validated
2. Choosing the appropriate validation commands
3. Executing the optimal validation workflow
4. Providing actionable results
### Detailed Workflow
1. **Target Detection Phase**
```
Execute .scripts/target-detector.sh "$path"
IF marketplace.json found:
target_type = "marketplace"
recommended_command = "/validate-marketplace"
ELSE IF plugin.json found:
target_type = "plugin"
recommended_command = "/validate-plugin"
ELSE IF both found:
target_type = "multi-target"
recommended_command = "validate both separately"
ELSE:
target_type = "unknown"
REPORT error and exit
```
2. **Validation Level Selection**
```
IF level == "quick" OR user requested quick:
validation_mode = "quick"
Execute fast critical checks
ELSE IF level == "comprehensive" OR default:
validation_mode = "comprehensive"
Execute full validation suite
```
3. **Execute Appropriate Validation**
```
CASE target_type:
"marketplace":
IF validation_mode == "quick":
Invoke /validate-quick (marketplace mode)
ELSE:
Invoke /validate-marketplace full-analysis
"plugin":
IF validation_mode == "quick":
Invoke /validate-quick (plugin mode)
ELSE:
Invoke /validate-plugin full-analysis
"multi-target":
Validate marketplace first
Then validate plugin
Aggregate results
"unknown":
Report detection failure
Provide troubleshooting guidance
```
4. **Post-Validation Actions**
```
Aggregate all validation results
Calculate overall quality assessment
Provide publication readiness determination
Offer next steps and guidance
```
### Intelligence Features
**Smart Defaults**:
- Defaults to comprehensive validation (thoroughness over speed)
- Automatically selects correct validation command
- Handles edge cases gracefully
**Context Awareness**:
- Recognizes marketplace vs plugin automatically
- Adjusts validation criteria accordingly
- Provides context-specific recommendations
**User Guidance**:
- Explains what was detected
- Shows which validation ran
- Provides clear next steps
### Examples
**Auto-validate current directory (comprehensive):**
```bash
/validation-orchestrator auto path:.
```
**Auto-validate with quick mode:**
```bash
/validation-orchestrator auto path:. level:quick
```
**Auto-validate specific plugin:**
```bash
/validation-orchestrator auto path:/path/to/my-plugin
```
**Auto-validate marketplace:**
```bash
/validation-orchestrator auto path:/path/to/marketplace
```
### Typical User Journey
```
User: "Is my plugin ready to submit?"
Agent detects this as validation request
→ Invokes /validation-orchestrator auto path:.
Orchestrator:
1. Detects plugin.json in current directory
2. Determines target is a plugin
3. Executes comprehensive plugin validation
4. Returns quality score and readiness assessment
Agent interprets results and guides user
```
### Error Handling
**Detection Failures**:
```
❌ Unable to detect target type at path: <path>
Troubleshooting:
- Ensure path contains .claude-plugin directory
- Verify plugin.json or marketplace.json exists
- Check file permissions
- Try specifying the path explicitly
Example:
/validation-orchestrator auto path:/correct/path
```
**Validation Failures**:
```
⚠️ Validation completed with errors
Target: <path>
Type: <detected-type>
Status: FAIL
See detailed output above for specific issues.
Next steps:
1. Fix critical errors (❌)
2. Address important warnings (⚠️)
3. Re-run validation: /validation-orchestrator auto path:.
```
**Ambiguous Structure**:
```
⚠️ Multiple targets detected
Found:
- marketplace.json at <path>
- plugin.json at <path>
Validating both...
Marketplace Results:
<marketplace validation output>
Plugin Results:
<plugin validation output>
```
### Output Format
```
Auto-Validation Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Detection Phase
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Target detected: <marketplace|plugin>
📁 Path: <absolute-path>
📄 Manifest: <file-found>
🎯 Validation mode: <quick|comprehensive>
Validation Phase
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
<Full validation output from appropriate command>
Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Quality Score: <0-100>/100 <⭐⭐⭐⭐⭐>
Rating: <Excellent|Good|Fair|Needs Improvement|Poor>
Publication Ready: <Yes|No|With Changes>
Critical Issues: <count>
Warnings: <count>
Recommendations: <count>
Next Steps:
<prioritized action items>
```
### Performance
- **Quick mode**: < 2 seconds (detection + quick validation)
- **Comprehensive mode**: 5-10 seconds (detection + full validation)
### Integration with Agent
This operation is ideal for agent invocation because:
- Single command, automatic behavior
- No user decision required (smart defaults)
- Comprehensive results
- Clear publication readiness assessment
The marketplace-validator agent can simply invoke:
```
/validation-orchestrator auto path:.
```
And get complete validation with no additional parameters needed.
**Request**: $ARGUMENTS

View File

@@ -0,0 +1,182 @@
## Operation: Compare Quality Across Multiple Targets
Compare validation quality metrics across multiple plugins or marketplaces for relative analysis.
### Parameters from $ARGUMENTS
- **paths**: Comma-separated list of target paths (required)
- Format: `paths:"./plugin1,./plugin2,./plugin3"`
- Minimum: 2 targets
- Maximum: 10 targets (performance consideration)
- **metrics**: Specific metrics to compare (optional)
- Format: `metrics:"score,security,documentation"`
- Default: All metrics
- Available: `score`, `security`, `documentation`, `schema`, `best-practices`
### Comparison Workflow
1. **Parse Target Paths**
```
Split paths parameter by comma
Validate each path exists
Detect type for each target (marketplace or plugin)
Filter invalid paths with warning
```
2. **Execute Validation for Each Target**
```
FOR each target IN paths:
Run comprehensive validation
Capture quality score
Capture issue counts (critical, warnings, recommendations)
Capture layer results
Store in comparison matrix
```
3. **Calculate Comparative Metrics**
```
FOR each metric:
Rank targets (best to worst)
Calculate average score
Identify outliers
Note significant differences
```
4. **Generate Comparison Report**
```
Create side-by-side comparison table
Highlight best performers (green)
Highlight needs improvement (red)
Show relative rankings
Provide improvement suggestions
```
### Comparison Dimensions
**Overall Quality Score**
- Numeric score (0-100)
- Star rating
- Ranking position
**Security Posture**
- Critical security issues count
- Security warnings count
- Security score
**Documentation Quality**
- README completeness
- CHANGELOG presence
- Documentation score
**Schema Compliance**
- Required fields status
- Format compliance
- Schema score
**Best Practices**
- Standards compliance
- Convention adherence
- Best practices score
### Examples
**Compare two plugins:**
```bash
/validation-orchestrator compare paths:"./plugin1,./plugin2"
```
**Compare with specific metrics:**
```bash
/validation-orchestrator compare paths:"./p1,./p2,./p3" metrics:"score,security"
```
**Compare marketplaces:**
```bash
/validation-orchestrator compare paths:"./marketplace-a,./marketplace-b"
```
### Performance Considerations
- Each target requires full validation (5-10 seconds each)
- Total time = (number of targets) × (validation time)
- Validations can run in parallel for performance
- Limit to 10 targets to prevent excessive runtime
### Error Handling
- **Invalid path**: Skip and warn, continue with valid paths
- **Minimum targets not met**: Require at least 2 valid targets
- **Validation failure**: Include in report with status "Failed to validate"
- **Timeout on target**: Mark as "Validation timeout" and continue
### Output Format
```
Quality Comparison Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Comparing <N> targets
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Overall Rankings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🥇 1st: <target-name> - <score>/100 ⭐⭐⭐⭐⭐
🥈 2nd: <target-name> - <score>/100 ⭐⭐⭐⭐
🥉 3rd: <target-name> - <score>/100 ⭐⭐⭐
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Detailed Comparison
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
| Metric | Target 1 | Target 2 | Target 3 | Best |
|-----------------|----------|----------|----------|--------|
| Quality Score | 92/100 | 78/100 | 65/100 | Target 1 |
| Security | ✅ Pass | ⚠️ Warnings | ❌ Fail | Target 1 |
| Documentation | ✅ Complete | ⚠️ Partial | ⚠️ Partial | Target 1 |
| Schema | ✅ Valid | ✅ Valid | ❌ Invalid | Target 1 |
| Best Practices | ✅ Compliant | ⚠️ Minor | ⚠️ Multiple | Target 1 |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Key Insights
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Top Performer: Target 1 (92/100)
- Strengths: Excellent security, complete docs
- Areas to maintain: All aspects well-executed
Needs Most Improvement: Target 3 (65/100)
- Critical Issues: Schema validation, security
- Priority Actions:
1. Fix schema validation errors
2. Address security vulnerabilities
3. Complete documentation
Average Score: <calculated>/100
Score Range: <min> - <max>
Standard Deviation: <calculated>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Recommendations
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
For Target 2:
- Add CHANGELOG.md for better version tracking
- Expand README with more examples
- Review security warnings
For Target 3:
- Fix critical schema validation errors (blocking)
- Address all security issues (blocking)
- Complete missing documentation sections
```
### Use Cases
1. **Pre-submission Review**: Compare your plugin against reference plugins
2. **Quality Benchmarking**: Understand where you stand relative to others
3. **Marketplace Curation**: Compare plugins for marketplace inclusion
4. **Team Standards**: Ensure all team plugins meet minimum bar
5. **Continuous Improvement**: Track quality improvements over time
**Request**: $ARGUMENTS

View File

@@ -0,0 +1,80 @@
## Operation: Detect Target Type
Automatically detect whether the validation target is a marketplace or plugin based on file structure.
### Parameters from $ARGUMENTS
- **path**: Path to the target directory (required)
- Format: `path:/path/to/target` or `path:.` for current directory
- Default: `.` (current directory)
### Detection Logic
Execute the target detection algorithm:
```bash
# Run the target detector script
bash .scripts/target-detector.sh "$TARGET_PATH"
```
The detection script will:
1. Check for `.claude-plugin/marketplace.json`**Marketplace**
2. Check for `plugin.json`**Plugin**
3. Check for both → **Multi-target**
4. Check for neither → **Unknown**
### Workflow
1. **Extract Path Parameter**
```
Parse $ARGUMENTS for path parameter
IF path not provided:
SET path="."
```
2. **Execute Detection**
```
RUN .scripts/target-detector.sh "$path"
CAPTURE output and exit code
```
3. **Report Results**
```
Output format:
{
"target_type": "marketplace|plugin|multi-target|unknown",
"path": "/absolute/path/to/target",
"files_found": ["marketplace.json", "plugin.json"],
"confidence": "high|medium|low"
}
```
### Examples
**Detect current directory:**
```bash
/validation-orchestrator detect path:.
```
**Detect specific path:**
```bash
/validation-orchestrator detect path:/path/to/plugin
```
### Error Handling
- **Path does not exist**: Report error with clear message
- **No .claude-plugin directory**: Suggest target may not be a plugin/marketplace
- **Ambiguous structure**: List all potential targets found
- **Permission denied**: Report access issue with remediation steps
### Output Format
Return a structured detection report with:
- Target type identified
- Confidence level
- Files found
- Recommended validation command
- Next steps
**Request**: $ARGUMENTS

View File

@@ -0,0 +1,191 @@
## Operation: Run Comprehensive Validation
Execute complete quality audit with detailed analysis, scoring, and recommendations.
### Parameters from $ARGUMENTS
- **path**: Path to validation target (required)
- Format: `path:/path/to/target`
- Default: `.` (current directory)
- **report**: Generate detailed report (optional)
- Format: `report:true|false`
- Default: `true`
### Comprehensive Validation Scope
Execute **all validation layers**:
1. **Schema Validation** (via `/schema-validation full-schema`)
- JSON syntax and structure
- Required and recommended fields
- Format compliance
- Type validation
2. **Security Scanning** (via `/security-scan full-security-audit`)
- Secret detection
- URL safety checks
- File permission validation
- Vulnerability scanning
3. **Quality Analysis** (via `/quality-analysis full-analysis`)
- Quality score calculation (0-100)
- Star rating generation
- Issue prioritization
- Improvement recommendations
4. **Documentation Validation** (via `/documentation-validation full-docs`)
- README completeness
- CHANGELOG format
- LICENSE presence
- Example quality
5. **Best Practices Enforcement** (via `/best-practices full-standards`)
- Naming conventions
- Versioning compliance
- Category validation
- Keyword quality
### Workflow
1. **Initialize Validation**
```
Detect target type using .scripts/target-detector.sh
Create validation context
Set up result aggregation
```
2. **Execute Validation Layers** (parallel where possible)
```
PARALLEL:
Layer 1: /schema-validation full-schema path:"$path"
Layer 2: /security-scan full-security-audit path:"$path"
Layer 3: /documentation-validation full-docs path:"$path"
Layer 4: /best-practices full-standards path:"$path"
AFTER all complete:
Layer 5: /quality-analysis full-analysis path:"$path" context:"$all_results"
```
3. **Aggregate Results**
```
Execute .scripts/validation-dispatcher.py --mode=aggregate
Compile all layer results
Calculate overall quality score
Prioritize issues (Critical → Important → Recommended)
Generate actionable recommendations
```
4. **Generate Report** (if requested)
```
IF report parameter is true:
Generate comprehensive markdown report
Include all findings with details
Add remediation guidance
Provide next steps
```
### Integration with Other Skills
This operation orchestrates multiple skills:
- **schema-validation**: Structure and format checks
- **security-scan**: Security vulnerability detection
- **documentation-validation**: Documentation quality
- **best-practices**: Standards compliance
- **quality-analysis**: Scoring and recommendations
### Examples
**Comprehensive validation with report:**
```bash
/validation-orchestrator comprehensive path:. report:true
```
**Comprehensive validation, results only:**
```bash
/validation-orchestrator comprehensive path:/my-plugin report:false
```
### Performance Expectations
Comprehensive validation typically takes **5-10 seconds** depending on:
- Target size and complexity
- Number of files to scan
- Documentation completeness
- Script execution time
### Error Handling
- **Validation layer failure**: Continue with other layers, report partial results
- **Aggregation failure**: Return individual layer results
- **Report generation failure**: Return console output
- **Timeout**: Cancel and report completed layers only
### Output Format
```
Comprehensive Validation Results
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Target: <path>
Type: <marketplace|plugin>
Quality Score: <0-100>/100 <⭐⭐⭐⭐⭐>
Rating: <Excellent|Good|Fair|Needs Improvement|Poor>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Validation Layers
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Schema Validation: <✅ PASS | ❌ FAIL>
- Required fields: <status>
- Format compliance: <status>
- <additional details>
Security Scan: <✅ PASS | ❌ FAIL>
- Secret detection: <status>
- URL safety: <status>
- <additional details>
Documentation: <✅ PASS | ⚠️ WARNINGS>
- README: <status>
- CHANGELOG: <status>
- <additional details>
Best Practices: <✅ PASS | ⚠️ WARNINGS>
- Naming: <status>
- Versioning: <status>
- <additional details>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Issues Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Critical Issues (must fix): <count>
❌ <issue 1>
❌ <issue 2>
Important Warnings (should fix): <count>
⚠️ <warning 1>
⚠️ <warning 2>
Recommendations (improve quality): <count>
💡 <recommendation 1>
💡 <recommendation 2>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Next Steps
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. <prioritized action 1>
2. <prioritized action 2>
3. <prioritized action 3>
Publication Readiness: <Ready | Needs Work | Not Ready>
```
### Report File Location
If report generation is enabled, save to:
```
<target-path>/validation-report-<timestamp>.md
```
**Request**: $ARGUMENTS

View File

@@ -0,0 +1,112 @@
## Operation: Run Quick Validation
Execute fast essential validation checks for rapid feedback on critical issues only.
### Parameters from $ARGUMENTS
- **path**: Path to validation target (required)
- Format: `path:/path/to/target` or `path:.`
- Default: `.` (current directory)
### Quick Validation Scope
Focus on **critical issues only**:
- JSON syntax validation
- Required fields presence
- Basic format compliance
- Security red flags
**NOT included** (saves time):
- Comprehensive quality scoring
- Detailed documentation analysis
- Best practices enforcement
- Optional field checks
### Workflow
1. **Detect Target Type**
```
Execute .scripts/target-detector.sh "$path"
Determine if marketplace or plugin
```
2. **Route to Appropriate Quick Validator**
```
IF target_type == "marketplace":
Invoke existing /validate-quick for marketplace
ELSE IF target_type == "plugin":
Invoke existing /validate-quick for plugin
ELSE:
Report unable to determine target type
```
3. **Execute Quick Checks**
```
Run only critical validations:
- JSON syntax (MUST pass)
- Required fields (MUST be present)
- Format violations (MUST be valid)
- Security issues (MUST be clean)
```
4. **Aggregate Results**
```
Collect validation output
Count critical errors
Determine pass/fail status
```
### Integration with Existing Commands
This operation leverages the existing quick validation commands:
- `/validate-quick` (marketplace mode)
- `/validate-quick` (plugin mode)
The orchestrator adds:
- Automatic target detection
- Unified interface
- Consistent output format
- Progressive validation routing
### Examples
**Quick check current directory:**
```bash
/validation-orchestrator quick path:.
```
**Quick check specific plugin:**
```bash
/validation-orchestrator quick path:/path/to/my-plugin
```
### Performance Target
Quick validation should complete in **< 2 seconds** for typical targets.
### Error Handling
- **Target not found**: Clear error with path verification
- **Ambiguous target**: Ask user to specify marketplace or plugin
- **Invalid structure**: Report structural issues found
- **Validation script failure**: Fallback to manual checks
### Output Format
```
Quick Validation Results
━━━━━━━━━━━━━━━━━━━━━━
Target: <path>
Type: <marketplace|plugin>
Status: <PASS|FAIL>
Critical Issues: <count>
❌ <issue 1 if any>
❌ <issue 2 if any>
Result: <Ready for comprehensive validation | Fix critical issues first>
```
Return concise, actionable results focusing on blocking issues only.
**Request**: $ARGUMENTS

View File

@@ -0,0 +1,64 @@
---
description: Intelligent validation orchestrator with auto-detection and progressive validation workflows
---
You are the Validation Orchestrator, the central coordinator for all marketplace and plugin validation operations.
## Your Mission
Parse `$ARGUMENTS` to determine the requested validation operation and intelligently route to the appropriate sub-command for execution.
## Available Operations
Parse the first word of `$ARGUMENTS` to determine which operation to execute:
- **detect** → Read `.claude/commands/validation-orchestrator/detect-target.md`
- **quick** → Read `.claude/commands/validation-orchestrator/run-quick.md`
- **comprehensive** → Read `.claude/commands/validation-orchestrator/run-comprehensive.md`
- **compare** → Read `.claude/commands/validation-orchestrator/compare-quality.md`
- **auto** → Read `.claude/commands/validation-orchestrator/auto-validate.md`
## Argument Format
```
/validation-orchestrator <operation> [parameters]
```
### Examples
```bash
# Auto-detect target type and validate
/validation-orchestrator auto path:.
# Run quick validation checks
/validation-orchestrator quick path:/path/to/target
# Run comprehensive quality audit
/validation-orchestrator comprehensive path:/path/to/plugin
# Compare quality across multiple targets
/validation-orchestrator compare paths:"./plugin1,./plugin2"
# Detect target type only
/validation-orchestrator detect path:.
```
## Error Handling
If the operation is not recognized:
1. List all available operations with descriptions
2. Show example usage for each operation
3. Suggest the most likely intended operation based on context
## Base Directory
Base directory for this skill: `.claude/commands/validation-orchestrator/`
## Your Task
1. Parse `$ARGUMENTS` to extract the operation and parameters
2. Read the corresponding operation file from the base directory
3. Execute the instructions with the provided parameters
4. Return structured validation results
**Current Request**: $ARGUMENTS