mirror of
https://github.com/SuperClaude-Org/SuperClaude_Framework.git
synced 2025-12-29 16:16:08 +00:00
refactor: Standardize @include reference system across all command files
- Fix @include references to use underscore format (Universal_Legend, Standard_Messages_Templates) - Add missing ultracompressed.yml shared pattern file - Update broken reference paths in all 18 command files - Ensure consistent template naming across command system - Optimize command file structure with standardized includes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -322,5 +322,183 @@ Maintainability_Patterns:
|
||||
Documentation: ["Living documentation", "Architecture decision records", "API documentation"]
|
||||
```
|
||||
|
||||
## PRD Templates
|
||||
|
||||
```yaml
|
||||
PRD_Templates:
|
||||
Executive_Overview:
|
||||
Problem_Statement: "Clear description of problem being solved"
|
||||
Solution_Overview: "High-level approach to solution"
|
||||
Expected_Impact: "Business value & measurable outcomes"
|
||||
Key_Stakeholders: "Primary users, decision makers, affected teams"
|
||||
|
||||
Goals_Success_Metrics:
|
||||
Primary_Objectives: "Must-have goals for success"
|
||||
Secondary_Goals: "Nice-to-have improvements"
|
||||
Success_KPIs: "Measurable key performance indicators"
|
||||
Measurement_Plan: "How & when metrics will be tracked"
|
||||
|
||||
User_Stories_Requirements:
|
||||
User_Personas: "Target user profiles & characteristics"
|
||||
User_Journeys: "Key user workflows & interactions"
|
||||
Functional_Requirements: "Core system capabilities"
|
||||
Non_Functional_Requirements: "Performance, security, scalability needs"
|
||||
Acceptance_Criteria: "Definition of done for features"
|
||||
|
||||
Technical_Specifications:
|
||||
Architecture_Overview: "High-level system design"
|
||||
Technology_Choices: "Selected frameworks, languages, tools"
|
||||
Integration_Points: "External systems & APIs"
|
||||
Security_Requirements: "Auth, data protection, compliance needs"
|
||||
Performance_Targets: "Response times, throughput, availability"
|
||||
|
||||
Timeline_Risks:
|
||||
Development_Phases: "Major milestones & deliverables"
|
||||
Dependencies_Blockers: "External dependencies & potential blockers"
|
||||
Risk_Assessment: "Technical, resource & timeline risks"
|
||||
Mitigation_Strategies: "Plans to address identified risks"
|
||||
|
||||
Templates_By_Type:
|
||||
Feature_PRD: "New feature development template"
|
||||
API_PRD: "API product requirements template"
|
||||
Integration_PRD: "System integration requirements"
|
||||
Migration_PRD: "System migration & modernization"
|
||||
```
|
||||
|
||||
## API Design Patterns
|
||||
|
||||
```yaml
|
||||
API_Design_Patterns:
|
||||
REST_Design:
|
||||
Resource_Identification:
|
||||
URI_Design: "Nouns not verbs | /users/123 not /getUser/123"
|
||||
Hierarchy: "Logical resource relationships | /users/123/orders/456"
|
||||
Consistency: "Consistent naming conventions | plural nouns"
|
||||
|
||||
HTTP_Methods:
|
||||
GET: "Retrieve resources | Safe & idempotent | No side effects"
|
||||
POST: "Create new resources | Non-idempotent | Returns 201 Created"
|
||||
PUT: "Update entire resource | Idempotent | Returns 200 or 204"
|
||||
PATCH: "Partial resource update | May be idempotent | Returns 200"
|
||||
DELETE: "Remove resources | Idempotent | Returns 204 No Content"
|
||||
|
||||
Response_Patterns:
|
||||
Status_Codes: "200 OK | 201 Created | 400 Bad Request | 401 Unauthorized | 404 Not Found | 500 Internal Error"
|
||||
Error_Format: "Consistent error structure | Code, message, details"
|
||||
Pagination: "Offset/limit or cursor-based | Include metadata"
|
||||
|
||||
Content_Negotiation:
|
||||
Accept_Headers: "application/json | application/xml | text/html"
|
||||
Versioning: "URI path (/v1/) | Header (Accept: application/vnd.api+json;version=1)"
|
||||
|
||||
GraphQL_Design:
|
||||
Schema_Design:
|
||||
Types: "Strong typing | Scalar, Object, Interface, Union, Enum"
|
||||
Queries: "Read operations | Nested field selection | Efficient data fetching"
|
||||
Mutations: "Write operations | Input types | Clear return types"
|
||||
Subscriptions: "Real-time updates | Event-driven | Resource efficient"
|
||||
|
||||
Performance_Patterns:
|
||||
DataLoader: "Batch & cache database queries | Solve N+1 problem"
|
||||
Query_Complexity: "Depth limiting | Cost analysis | Rate limiting"
|
||||
Caching: "Field-level caching | Query result caching"
|
||||
|
||||
Authentication_Authorization:
|
||||
JWT_Patterns:
|
||||
Structure: "Header.Payload.Signature | Stateless tokens"
|
||||
Claims: "Standard (iss, exp, aud) | Custom business claims"
|
||||
Security: "Strong secrets | Token rotation | Expiry management"
|
||||
|
||||
OAuth2_Flow:
|
||||
Authorization_Code: "Web applications | Server-side token exchange"
|
||||
Client_Credentials: "Service-to-service | Machine authentication"
|
||||
Resource_Owner: "Username/password | Not recommended for new APIs"
|
||||
|
||||
API_Keys:
|
||||
Usage: "Simple authentication | Rate limiting | Usage tracking"
|
||||
Security: "Rotate regularly | Environment-specific | Never in code"
|
||||
|
||||
Rate_Limiting:
|
||||
Strategies:
|
||||
Fixed_Window: "Simple implementation | Reset at fixed intervals"
|
||||
Sliding_Window: "More accurate | Higher memory usage"
|
||||
Token_Bucket: "Burst handling | Smooth rate limiting"
|
||||
|
||||
Implementation:
|
||||
Headers: "X-RateLimit-Limit | X-RateLimit-Remaining | X-RateLimit-Reset"
|
||||
Response: "429 Too Many Requests | Retry-After header"
|
||||
|
||||
API_Documentation:
|
||||
OpenAPI_Specification:
|
||||
Structure: "Paths, components, security, info"
|
||||
Examples: "Request/response examples | Error scenarios"
|
||||
Validation: "Schema validation | Parameter constraints"
|
||||
|
||||
Documentation_Standards:
|
||||
Completeness: "All endpoints documented | Examples provided"
|
||||
Clarity: "Clear descriptions | Use cases explained"
|
||||
Maintenance: "Keep docs synchronized with code"
|
||||
```
|
||||
|
||||
## DDD Patterns
|
||||
|
||||
```yaml
|
||||
DDD_Patterns:
|
||||
Strategic_Design:
|
||||
Domain_Modeling:
|
||||
Ubiquitous_Language: "Shared vocabulary between domain experts & developers"
|
||||
Bounded_Context: "Explicit boundaries where model is defined & applicable"
|
||||
Context_Mapping: "Relationships between bounded contexts"
|
||||
|
||||
Context_Boundaries:
|
||||
Identification: "Language changes | Team ownership | Data ownership"
|
||||
Integration_Patterns: "Shared kernel | Customer/supplier | Conformist"
|
||||
Anti_Corruption_Layer: "Protect domain from external influences"
|
||||
|
||||
Tactical_Design:
|
||||
Building_Blocks:
|
||||
Entities: "Objects with unique identity | Mutable | Business behavior"
|
||||
Value_Objects: "Immutable objects defined by attributes | No identity"
|
||||
Aggregates: "Consistency boundaries | Transaction boundaries | Access via root"
|
||||
Domain_Services: "Business logic that doesn't belong in entities"
|
||||
|
||||
Aggregate_Design:
|
||||
Root_Entity: "Single entry point | Maintains invariants"
|
||||
Size_Guidelines: "Small aggregates | Minimize transaction scope"
|
||||
Reference_Style: "Reference by ID across aggregates"
|
||||
|
||||
Repository_Pattern:
|
||||
Purpose: "Encapsulate data access logic | Domain-focused interface"
|
||||
Interface: "Domain layer defines interface | Infrastructure implements"
|
||||
Collections: "Act like in-memory collections | Hide persistence details"
|
||||
|
||||
Event_Driven_DDD:
|
||||
Domain_Events:
|
||||
Definition: "Something important that happened in the domain"
|
||||
Characteristics: "Immutable | Past tense | Rich with business context"
|
||||
Publishing: "Aggregate publishes events | Infrastructure handles delivery"
|
||||
|
||||
Event_Sourcing:
|
||||
Concept: "Store events, not current state | Rebuild state from events"
|
||||
Benefits: "Audit trail | Temporal queries | Replay capabilities"
|
||||
Challenges: "Event versioning | Snapshot strategies | Query complexity"
|
||||
|
||||
CQRS_Pattern:
|
||||
Separation: "Command side (writes) separate from query side (reads)"
|
||||
Benefits: "Optimized models | Independent scaling | Clear responsibility"
|
||||
Implementation: "Separate models | Event synchronization | Eventual consistency"
|
||||
|
||||
Implementation_Patterns:
|
||||
Layered_Architecture:
|
||||
Domain_Layer: "Core business logic | No dependencies on other layers"
|
||||
Application_Layer: "Use cases | Orchestrates domain objects"
|
||||
Infrastructure_Layer: "External concerns | Database, web, messaging"
|
||||
|
||||
Hexagonal_Architecture:
|
||||
Core_Principle: "Domain at center | Adapters for external concerns"
|
||||
Ports: "Interfaces defined by domain | Input/output boundaries"
|
||||
Adapters: "Implementations of ports | Framework-specific code"
|
||||
```
|
||||
|
||||
---
|
||||
*Architecture Patterns v4.0.0 - Comprehensive architectural knowledge patterns for SuperClaude design commands*
|
||||
|
||||
@@ -133,8 +133,8 @@ Instead_Of_Repeating:
|
||||
MCP_Explanations: "@see shared/flag-inheritance.yml#MCP_Control"
|
||||
Thinking_Modes: "@see shared/flag-inheritance.yml#Thinking_Modes"
|
||||
Persona_Behaviors: "@see shared/persona-patterns.yml"
|
||||
Research_Standards: "@see shared/research-flow-templates.yml"
|
||||
Validation_Rules: "@see shared/validation.yml"
|
||||
Research_Standards: "@see shared/research-patterns.yml#Mandatory_Research_Flows"
|
||||
Validation_Rules: "@see shared/quality-patterns.yml#Pre_Execution_Validation"
|
||||
Performance_Patterns: "@see shared/performance.yml"
|
||||
|
||||
Template_Usage:
|
||||
|
||||
@@ -199,7 +199,7 @@ Operational_Reports:
|
||||
- "Plain text for logs"
|
||||
```
|
||||
|
||||
## Standard Notifications
|
||||
## Standard_Notifications
|
||||
|
||||
```yaml
|
||||
Standard_Notifications:
|
||||
|
||||
@@ -166,6 +166,81 @@ Intelligent_MCP_Selection:
|
||||
Complex_Debugging: "→ Sequential thinking"
|
||||
UI_Requests: "→ Magic builder"
|
||||
E2E_Testing: "→ Puppeteer automation"
|
||||
|
||||
## Automatic MCP Context Detection
|
||||
|
||||
```yaml
|
||||
Context_Detection_Patterns:
|
||||
Library_References:
|
||||
Triggers:
|
||||
- "import .* from ['\"][^./].*['\"]" # Non-relative imports
|
||||
- "require\\(['\"][^./].*['\"]\\)" # CommonJS external
|
||||
- "from \\w+ import" # Python external
|
||||
- "@\\w+/" # Scoped packages
|
||||
Action: "→ C7 resolve-library-id REQUIRED"
|
||||
Blocking: "Implementation blocked until documentation found"
|
||||
|
||||
Complex_Problem_Indicators:
|
||||
Keywords: ["architecture", "design", "system", "complex", "debug", "investigate", "root cause", "bottleneck"]
|
||||
Error_Patterns: ["multiple errors", "cascading failures", "performance degradation"]
|
||||
Scope_Indicators: ["multi-file", "cross-component", "system-wide"]
|
||||
Action: "→ Sequential thinking RECOMMENDED"
|
||||
|
||||
UI_Component_Requests:
|
||||
Keywords: ["button", "form", "modal", "dialog", "dropdown", "table", "chart", "dashboard", "component"]
|
||||
Framework_Mentions: ["react", "vue", "svelte", "angular"]
|
||||
File_Types: ["*.tsx", "*.jsx", "*.vue", "*.svelte"]
|
||||
Action: "→ Magic builder RECOMMENDED"
|
||||
|
||||
Browser_Automation_Needs:
|
||||
Keywords: ["screenshot", "e2e", "integration test", "browser", "selenium", "automation"]
|
||||
Test_Patterns: ["cypress", "playwright", "puppeteer", "webdriver"]
|
||||
Action: "→ Puppeteer automation RECOMMENDED"
|
||||
|
||||
Research_Requirements:
|
||||
External_Library_Detection:
|
||||
Pattern: "Any import/require from non-relative path"
|
||||
Rule: "CRITICAL → Research REQUIRED before implementation"
|
||||
Process:
|
||||
1: "C7 resolve-library-id with detected library name"
|
||||
2: "If not found → WebSearch '[library] official documentation'"
|
||||
3: "Extract: Installation, basic usage, common patterns"
|
||||
4: "Block implementation if confidence < 90%"
|
||||
|
||||
Unknown_Pattern_Detection:
|
||||
Triggers: ["unfamiliar syntax", "new framework", "unknown API"]
|
||||
Phrases_To_Block: ["might work", "probably", "I think", "typical pattern"]
|
||||
Required_Instead: "Documentation confirms", "Official source states"
|
||||
Action: "Research → Verify → Document source → Implement"
|
||||
|
||||
Low_Confidence_Indicators:
|
||||
Uncertainty_Language: ["maybe", "should", "typically", "usually"]
|
||||
Missing_Evidence: "No source citation available"
|
||||
Action: "BLOCK implementation until research complete"
|
||||
|
||||
Auto_Activation_Rules:
|
||||
Command_Based:
|
||||
/build + UI_keywords: "Suggest --magic for component generation"
|
||||
/analyze + complexity_indicators: "Suggest --seq for deep analysis"
|
||||
/test + browser_keywords: "Suggest --pup for automation"
|
||||
/explain + library_name: "Suggest --c7 for documentation"
|
||||
|
||||
File_Based:
|
||||
"*.tsx|*.jsx": "Frontend context → --magic available"
|
||||
"*.test.*|*.spec.*": "Testing context → --pup available"
|
||||
"*api*|*server*": "Backend context → --seq for design"
|
||||
|
||||
Error_Based:
|
||||
"ModuleNotFoundError": "→ C7 lookup REQUIRED"
|
||||
"TypeError": "→ Sequential analysis RECOMMENDED"
|
||||
"Build failures": "→ Sequential troubleshooting"
|
||||
|
||||
Override_Controls:
|
||||
User_Flags_Priority: "Explicit flags > Auto-detection > Defaults"
|
||||
Disable_All: "--no-mcp overrides all auto-detection"
|
||||
Selective_Disable: "--no-c7, --no-seq, --no-magic, --no-pup"
|
||||
Force_Enable: "--c7, --seq, --magic, --pup override context detection"
|
||||
```
|
||||
|
||||
Synergistic_Patterns:
|
||||
--magic + --pup: "Generate UI components and test immediately"
|
||||
@@ -427,5 +502,59 @@ Command_Hooks:
|
||||
Post: ["Verify deployment", "Run health checks", "Update docs", "Generate deployment report"]
|
||||
```
|
||||
|
||||
## Estimation Methodology
|
||||
|
||||
```yaml
|
||||
Estimation_Methodology:
|
||||
Time_Estimation_Framework:
|
||||
Development_Phases:
|
||||
Planning: "Requirements analysis & design: 10-15% of total"
|
||||
Implementation: "Core development work: 50-60% of total"
|
||||
Testing: "Unit, integration & system testing: 15-25% of total"
|
||||
Integration: "System integration & deployment: 5-10% of total"
|
||||
Buffer: "Unknown unknowns & contingency: 10-20% of total"
|
||||
|
||||
Complexity_Scoring:
|
||||
Low_Complexity: "Well-understood, established patterns: 1-3 days"
|
||||
Medium_Complexity: "Some unknowns, moderate integration: 3-10 days"
|
||||
High_Complexity: "Research required, complex integration: 1-4 weeks"
|
||||
Very_High_Complexity: "New technology, architectural changes: 1-3 months"
|
||||
|
||||
Team_Velocity_Factors:
|
||||
Solo_Developer: "Multiplier: 1.0 (baseline)"
|
||||
Small_Team_2_3: "Multiplier: 0.8 (coordination overhead)"
|
||||
Medium_Team_4_8: "Multiplier: 0.6 (communication overhead)"
|
||||
Large_Team_9Plus: "Multiplier: 0.4 (significant coordination)"
|
||||
|
||||
Risk_Assessment_Framework:
|
||||
Technical_Risks:
|
||||
New_Technology: "Learning curve impact: +25-50% time"
|
||||
Complex_Integration: "Multiple system touchpoints: +20-40% time"
|
||||
Performance_Requirements: "Optimization needs: +15-30% time"
|
||||
Legacy_System_Integration: "Technical debt impact: +30-60% time"
|
||||
|
||||
Resource_Risks:
|
||||
Key_Person_Dependency: "Single expert required: +20-40% time"
|
||||
External_Dependencies: "Third-party deliverables: +10-30% time"
|
||||
Skill_Gap: "Team learning required: +25-50% time"
|
||||
|
||||
Estimation_Output_Format:
|
||||
Three_Point_Estimation:
|
||||
Optimistic: "Best case scenario (10% probability)"
|
||||
Realistic: "Most likely outcome (50% probability)"
|
||||
Pessimistic: "Worst case scenario (90% probability)"
|
||||
|
||||
Confidence_Levels:
|
||||
High_Confidence: "Well-understood requirements: ±10%"
|
||||
Medium_Confidence: "Some unknowns present: ±25%"
|
||||
Low_Confidence: "Significant uncertainties: ±50%"
|
||||
|
||||
Resource_Planning:
|
||||
Developer_Hours: "Total development effort"
|
||||
QA_Hours: "Testing & quality assurance effort"
|
||||
DevOps_Hours: "Deployment & infrastructure setup"
|
||||
Project_Management: "Coordination & communication overhead"
|
||||
```
|
||||
|
||||
---
|
||||
*Execution Patterns v4.0.0 - Unified workflow system, MCP orchestration, git operations, and execution lifecycle*
|
||||
|
||||
@@ -71,3 +71,85 @@ Adaptive Optimization:
|
||||
Cache Misses: Adjust caching strategy based on usage patterns
|
||||
Performance Degradation: Fall back to minimal loading mode
|
||||
```
|
||||
|
||||
## Loading Strategies
|
||||
|
||||
```yaml
|
||||
Loading_Strategies:
|
||||
Core_Loading:
|
||||
Essential_Files:
|
||||
Always_Load: ["CLAUDE.md", "RULES.md", "PERSONAS.md", "MCP.md"]
|
||||
Token_Budget: "~4600 tokens base cost"
|
||||
Load_Order: "CLAUDE.md → RULES.md → PERSONAS.md → MCP.md"
|
||||
Validation: "Ensure all files exist and are valid before proceeding"
|
||||
|
||||
Command_Loading:
|
||||
Discovery_Method: "Scan .claude/commands/ directory for .md files"
|
||||
Index_Creation: "Build lightweight index with command names and flags"
|
||||
Lazy_Loading: "Load full command content only when invoked"
|
||||
Cache_Strategy: "Keep last 5 used commands in memory"
|
||||
|
||||
Progressive_Loading:
|
||||
Minimal_Start:
|
||||
Initial_Load: "Core files + command index only"
|
||||
Token_Cost: "~4650 tokens (base + command index)"
|
||||
Expansion_Triggers: "Command invocation, flag usage, complexity detection"
|
||||
|
||||
Context_Expansion:
|
||||
Shared_Resources: "Load .yml files from shared/ when referenced"
|
||||
Pattern_Files: "Load specific pattern files based on command needs"
|
||||
MCP_Resources: "Load MCP-specific patterns when MCP flags used"
|
||||
Research_Resources: "Load research patterns when external libs detected"
|
||||
|
||||
Intelligent_Caching:
|
||||
Usage_Patterns:
|
||||
Frequency_Based: "Cache most frequently used commands permanently"
|
||||
Sequence_Based: "Preload resources for common command chains"
|
||||
Context_Based: "Cache resources relevant to current project type"
|
||||
Time_Based: "Cache recently used resources for quick access"
|
||||
|
||||
Cache_Management:
|
||||
Size_Limits: "Maximum cache size to prevent memory bloat"
|
||||
Eviction_Policy: "LRU (Least Recently Used) for cache cleanup"
|
||||
Preemptive_Loading: "Load likely-needed resources during idle time"
|
||||
Cache_Warming: "Pre-populate cache with common patterns on startup"
|
||||
|
||||
Context_Optimization:
|
||||
Token_Management:
|
||||
Budget_Tracking: "Monitor total context token usage continuously"
|
||||
Threshold_Alerts: "Warning at 70%, critical at 85% capacity"
|
||||
Auto_Compression: "Enable UltraCompressed mode when approaching limits"
|
||||
Cleanup_Triggers: "Remove unused resources when space needed"
|
||||
|
||||
Smart_Compression:
|
||||
Selective_Detail: "Keep summaries, load details on demand"
|
||||
Result_Caching: "Store expensive analysis results for reuse"
|
||||
Pattern_Recognition: "Learn user patterns to optimize loading"
|
||||
Adaptive_Strategies: "Adjust loading based on session characteristics"
|
||||
|
||||
Performance_Optimization:
|
||||
Loading_Speed:
|
||||
Parallel_Loading: "Load independent resources concurrently"
|
||||
Streaming_Parse: "Process large files incrementally"
|
||||
Incremental_Updates: "Update cache without full reload"
|
||||
Background_Refresh: "Update cached resources during idle periods"
|
||||
|
||||
Memory_Efficiency:
|
||||
Lazy_Initialization: "Create objects only when needed"
|
||||
Resource_Pooling: "Reuse common objects across commands"
|
||||
Garbage_Collection: "Clean up unused resources periodically"
|
||||
Memory_Profiling: "Track memory usage patterns for optimization"
|
||||
|
||||
Failure_Handling:
|
||||
Resource_Unavailable:
|
||||
Missing_Files: "Continue with degraded functionality, warn user"
|
||||
Parse_Errors: "Skip corrupted files, use fallback patterns"
|
||||
Permission_Issues: "Graceful degradation with user notification"
|
||||
Network_Failures: "Use cached versions when available"
|
||||
|
||||
Fallback_Strategies:
|
||||
Minimal_Mode: "Operate with core files only when resources unavailable"
|
||||
Alternative_Sources: "Use backup locations or embedded defaults"
|
||||
Graceful_Degradation: "Reduce functionality rather than complete failure"
|
||||
Recovery_Attempts: "Retry failed loads with exponential backoff"
|
||||
```
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Planning Mode Config
|
||||
|
||||
## Flag-Based Planning Control
|
||||
## Universal Planning Control
|
||||
|
||||
```yaml
|
||||
Planning_Flags:
|
||||
--plan: "Force planning mode for any command"
|
||||
@@ -10,6 +11,75 @@ Planning_Flags:
|
||||
Risk_Assessment:
|
||||
description: "Users control planning through explicit flags"
|
||||
recommendation: "Use --plan for risky ops that modify system state"
|
||||
|
||||
Universal_Planning_Behavior:
|
||||
All_Commands: "Support --plan flag for user-controlled planning"
|
||||
Planning_Output: "Use exit_plan_mode tool to present structured plan"
|
||||
User_Approval: "Wait for user confirmation before executing plan"
|
||||
Execution_Flow: "Parse → Plan (if requested) → Execute → Report"
|
||||
```
|
||||
|
||||
## Command-Specific Planning Patterns
|
||||
|
||||
```yaml
|
||||
Analysis_Commands:
|
||||
Commands: ["analyze", "scan", "troubleshoot", "explain"]
|
||||
Planning_Focus:
|
||||
- "Analysis scope & methodology"
|
||||
- "Tools & techniques to be used"
|
||||
- "Expected output format & location"
|
||||
- "Time estimate for analysis"
|
||||
Planning_Template: |
|
||||
## Analysis Plan
|
||||
**Scope:** {analysis_target}
|
||||
**Method:** {analysis_approach}
|
||||
**Tools:** {tools_to_use}
|
||||
**Output:** {expected_deliverables}
|
||||
**Duration:** {time_estimate}
|
||||
|
||||
Build_Commands:
|
||||
Commands: ["build", "spawn", "design"]
|
||||
Planning_Focus:
|
||||
- "Components to be created/modified"
|
||||
- "Technology choices & dependencies"
|
||||
- "Integration points & requirements"
|
||||
- "Testing strategy & validation"
|
||||
Planning_Template: |
|
||||
## Build Plan
|
||||
**Target:** {build_target}
|
||||
**Stack:** {technology_choices}
|
||||
**Components:** {components_to_create}
|
||||
**Dependencies:** {required_dependencies}
|
||||
**Testing:** {testing_approach}
|
||||
|
||||
Operations_Commands:
|
||||
Commands: ["deploy", "migrate", "cleanup", "git"]
|
||||
Planning_Focus:
|
||||
- "Operations to be performed"
|
||||
- "Risk assessment & mitigation"
|
||||
- "Rollback procedures"
|
||||
- "Validation & monitoring"
|
||||
Planning_Template: |
|
||||
## Operations Plan
|
||||
**Operation:** {operation_type}
|
||||
**Target:** {operation_target}
|
||||
**Risks:** {identified_risks}
|
||||
**Mitigation:** {risk_mitigation}
|
||||
**Rollback:** {rollback_procedure}
|
||||
|
||||
Quality_Commands:
|
||||
Commands: ["test", "improve", "document"]
|
||||
Planning_Focus:
|
||||
- "Quality improvements to implement"
|
||||
- "Metrics & targets"
|
||||
- "Validation criteria"
|
||||
- "Success measurement"
|
||||
Planning_Template: |
|
||||
## Quality Plan
|
||||
**Objective:** {quality_goal}
|
||||
**Metrics:** {success_metrics}
|
||||
**Approach:** {improvement_method}
|
||||
**Validation:** {validation_criteria}
|
||||
```
|
||||
|
||||
## Risk Assessment Patterns
|
||||
@@ -31,21 +101,81 @@ Safety Overrides:
|
||||
--dry-run: Safe preview mode, skip planning
|
||||
```
|
||||
|
||||
## Planning Workflow
|
||||
```yaml
|
||||
Pre-Execution Check:
|
||||
1. Parse command name and flags
|
||||
2. Check REQUIRED_PLANNING list
|
||||
3. Check special conditions (build --init)
|
||||
4. If planning required → exit_plan_mode → await approval
|
||||
5. Create checkpoint if risky
|
||||
6. Proceed with execution
|
||||
## Planning Workflow Integration
|
||||
|
||||
Planning Content:
|
||||
Required: Command intent, affected resources, risks, rollback plan
|
||||
Optional: Time estimate, dependencies, validation steps
|
||||
Format: Structured plan using exit_plan_mode tool
|
||||
```yaml
|
||||
Pre-Execution_Check:
|
||||
1: "Parse command name and flags"
|
||||
2: "Check user --plan flag request"
|
||||
3: "Assess operation complexity & risk"
|
||||
4: "If planning requested → generate plan → exit_plan_mode"
|
||||
5: "Await user approval before execution"
|
||||
6: "Create checkpoint if risky operation"
|
||||
7: "Proceed with execution"
|
||||
|
||||
Planning_Content_Requirements:
|
||||
Always_Include:
|
||||
- "Command intent & objective"
|
||||
- "Resources to be affected/modified"
|
||||
- "Risk assessment & mitigation"
|
||||
- "Expected outcomes & deliverables"
|
||||
|
||||
Conditionally_Include:
|
||||
- "Time estimate (for complex operations)"
|
||||
- "Dependencies & prerequisites"
|
||||
- "Validation steps & success criteria"
|
||||
- "Rollback procedures (for risky operations)"
|
||||
|
||||
Format_Requirements:
|
||||
- "Use exit_plan_mode tool for plan presentation"
|
||||
- "Structured markdown format"
|
||||
- "Clear sections & bullet points"
|
||||
- "Actionable & specific details"
|
||||
|
||||
Claude_Code_Compliance:
|
||||
Planning_Mode_Support:
|
||||
- "All commands must support --plan flag"
|
||||
- "Planning behavior must be consistent"
|
||||
- "User controls when planning occurs"
|
||||
- "No automatic forced planning"
|
||||
|
||||
Plan_Quality_Standards:
|
||||
- "Plans must be comprehensive & actionable"
|
||||
- "Risk assessment required for risky operations"
|
||||
- "Clear success criteria defined"
|
||||
- "User can make informed approval decision"
|
||||
|
||||
Execution_Patterns:
|
||||
- "Immediate execution by default"
|
||||
- "--plan flag forces planning mode"
|
||||
- "User approval required after planning"
|
||||
- "Graceful handling of plan rejection"
|
||||
```
|
||||
|
||||
## Integration with Command Files
|
||||
|
||||
```yaml
|
||||
Command_Header_Pattern:
|
||||
Standard_Text: "Execute: immediate. --plan→show plan first"
|
||||
Enhanced_Documentation: "@include shared/planning-mode.yml#Planning_Behavior"
|
||||
|
||||
Planning_Behavior:
|
||||
Default_Execution: "Commands execute immediately without planning"
|
||||
Plan_Flag_Behavior: "--plan flag shows detailed execution plan first"
|
||||
User_Control: "User decides when to use planning mode"
|
||||
Plan_Approval: "User must approve plan before execution"
|
||||
|
||||
Example_Usage:
|
||||
Basic_Planning: "/command --plan"
|
||||
Complex_Operation: "/deploy --env prod --plan"
|
||||
Risk_Assessment: "/cleanup --all --plan"
|
||||
|
||||
Planning_Benefits:
|
||||
Risk_Mitigation: "Preview operations before execution"
|
||||
Resource_Planning: "Understand impact & requirements"
|
||||
Decision_Making: "Make informed choices about operations"
|
||||
Learning_Tool: "Understand what commands will do"
|
||||
```
|
||||
|
||||
---
|
||||
*Planning mode configuration for systematic risk management*
|
||||
*Planning mode configuration v4.0.0 - Comprehensive planning patterns for Claude Code compliance*
|
||||
|
||||
@@ -274,5 +274,98 @@ Usage_Examples:
|
||||
Report: "create_validation_report()"
|
||||
```
|
||||
|
||||
## Code Quality Metrics
|
||||
|
||||
```yaml
|
||||
Code_Quality_Metrics:
|
||||
Complexity_Metrics:
|
||||
Cyclomatic_Complexity: "Target: <10 per function | Warning: >15 | Critical: >20"
|
||||
Cognitive_Complexity: "Target: <15 per function | Warning: >25 | Critical: >30"
|
||||
Nesting_Depth: "Target: <4 levels | Warning: >5 | Critical: >6"
|
||||
Function_Length: "Target: <50 lines | Warning: >100 | Critical: >150"
|
||||
|
||||
Maintainability_Metrics:
|
||||
DRY_Score: "Target: >90% | Warning: <80% | Critical: <70%"
|
||||
Code_Duplication: "Target: <5% | Warning: >10% | Critical: >15%"
|
||||
Technical_Debt: "Target: <A rating | Warning: B rating | Critical: C+ rating"
|
||||
|
||||
Quality_Gates:
|
||||
Coverage: "Minimum 80% line coverage | 75% branch coverage"
|
||||
Linting: "Zero errors | Max 5 warnings per file"
|
||||
Type_Safety: "100% type coverage for TypeScript"
|
||||
Security: "Zero high/critical vulnerabilities"
|
||||
```
|
||||
|
||||
## Test Quality Standards
|
||||
|
||||
```yaml
|
||||
Test_Quality_Standards:
|
||||
Coverage_Requirements:
|
||||
Statement_Coverage: "Minimum: 80% | Target: 90% | Excellent: 95%+"
|
||||
Branch_Coverage: "Minimum: 75% | Target: 85% | Excellent: 90%+"
|
||||
Function_Coverage: "Minimum: 90% | Target: 95% | Excellent: 100%"
|
||||
Line_Coverage: "Minimum: 80% | Target: 90% | Excellent: 95%+"
|
||||
|
||||
Test_Organization:
|
||||
Structure: "AAA (Arrange-Act-Assert) | Given-When-Then (BDD)"
|
||||
Naming: "Descriptive test names | should_[expected_behavior]_when_[condition]"
|
||||
Isolation: "Independent tests | No shared state | Fresh setup/teardown"
|
||||
|
||||
Test_Types:
|
||||
Unit_Tests: "Fast (<1ms) | Isolated | Mock dependencies | 70-80% of total"
|
||||
Integration_Tests: "Component interaction | Real dependencies | 15-20% of total"
|
||||
E2E_Tests: "Full workflows | Browser automation | 5-10% of total"
|
||||
|
||||
Quality_Indicators:
|
||||
Test_Reliability: "Flaky test rate <2% | Consistent results"
|
||||
Execution_Speed: "Unit test suite <10s | Full suite <5min"
|
||||
Mutation_Testing: "Mutation score >75% for critical components"
|
||||
```
|
||||
|
||||
## Root Cause Analysis
|
||||
|
||||
```yaml
|
||||
Root_Cause_Analysis:
|
||||
Investigation_Framework:
|
||||
Five_Whys:
|
||||
Process: "Ask 'why' 5 times to drill down to root cause"
|
||||
Example: "Bug→Why?→Logic error→Why?→Missing validation→Why?→No requirements→Why?→Rushed timeline→Why?→Poor planning"
|
||||
|
||||
Fishbone_Analysis:
|
||||
Categories: ["People", "Process", "Technology", "Environment", "Materials", "Measurement"]
|
||||
Application: "Systematic categorization of potential causes"
|
||||
|
||||
Timeline_Analysis:
|
||||
Sequence: "When did issue start | What changed | Correlation analysis"
|
||||
Events: "Code changes | Deployments | Configuration updates | External factors"
|
||||
|
||||
Evidence_Collection:
|
||||
System_State:
|
||||
Logs: "Error logs | Application logs | System logs | Network logs"
|
||||
Metrics: "Performance metrics | Resource usage | Error rates"
|
||||
Configuration: "Environment variables | Feature flags | Database state"
|
||||
|
||||
Change_History:
|
||||
Code_Changes: "Git commits | PR history | Deployment history"
|
||||
Infrastructure: "Server changes | Database migrations | Third-party updates"
|
||||
Process_Changes: "Team changes | Process updates | Tool updates"
|
||||
|
||||
Resolution_Framework:
|
||||
Immediate_Fix:
|
||||
Stabilize: "Stop the bleeding | Rollback if necessary"
|
||||
Workaround: "Temporary solution to restore service"
|
||||
Monitor: "Verify fix effectiveness | Watch for recurrence"
|
||||
|
||||
Permanent_Solution:
|
||||
Root_Fix: "Address underlying cause | Not just symptoms"
|
||||
Prevention: "Add safeguards | Improve processes | Update documentation"
|
||||
Validation: "Test fix thoroughly | Verify no new issues introduced"
|
||||
|
||||
Learning_Integration:
|
||||
Documentation: "RCA report | Lessons learned | Knowledge sharing"
|
||||
Process_Improvement: "Update procedures | Add checks | Training needs"
|
||||
Monitoring: "Add alerts | Improve observability | Early warning systems"
|
||||
```
|
||||
|
||||
---
|
||||
*Quality Patterns v4.0.0 - Unified validation, severity response, error handling, and quality control framework*
|
||||
|
||||
@@ -362,5 +362,107 @@ Example:
|
||||
Result: "<before>ms → <after>ms (<delta>% faster)"
|
||||
```
|
||||
|
||||
## Explanation Methodology
|
||||
|
||||
```yaml
|
||||
Explanation_Methodology:
|
||||
Explanation_Structure:
|
||||
Overview_Section:
|
||||
What: "Clear definition of concept/topic"
|
||||
Why: "Why it matters & when to use"
|
||||
Context: "Where it fits in larger picture"
|
||||
|
||||
Core_Concepts:
|
||||
Building_Blocks: "Fundamental components"
|
||||
Key_Principles: "Governing rules & patterns"
|
||||
Relationships: "How components interact"
|
||||
|
||||
Deep_Dive:
|
||||
How_It_Works: "Step-by-step mechanics"
|
||||
Implementation_Details: "Practical implementation"
|
||||
Edge_Cases: "Limitations & special scenarios"
|
||||
|
||||
Practical_Examples:
|
||||
Basic_Example: "Simple, clear illustration"
|
||||
Real_World_Usage: "Production scenarios"
|
||||
Code_Samples: "Working implementations"
|
||||
|
||||
Common_Pitfalls:
|
||||
Gotchas: "Frequent misunderstandings"
|
||||
Anti_Patterns: "What not to do"
|
||||
Debugging_Tips: "How to troubleshoot"
|
||||
|
||||
Further_Learning:
|
||||
Next_Steps: "Natural progression path"
|
||||
Related_Concepts: "Connected topics"
|
||||
Resources: "Documentation & tutorials"
|
||||
|
||||
Depth_Level_Guidelines:
|
||||
Beginner:
|
||||
Language: "Simple, non-technical terms"
|
||||
Examples: "Relatable analogies"
|
||||
Scope: "Core concepts only"
|
||||
Format: "Step-by-step tutorials"
|
||||
|
||||
Intermediate:
|
||||
Language: "Standard technical terminology"
|
||||
Examples: "Practical use cases"
|
||||
Scope: "Common patterns & variations"
|
||||
Format: "Balanced explanation & examples"
|
||||
|
||||
Advanced:
|
||||
Language: "Precise technical language"
|
||||
Examples: "Complex scenarios"
|
||||
Scope: "Edge cases & optimizations"
|
||||
Format: "In-depth analysis"
|
||||
|
||||
Expert:
|
||||
Language: "Domain-specific terminology"
|
||||
Examples: "Cutting-edge applications"
|
||||
Scope: "Implementation internals"
|
||||
Format: "Research-level depth"
|
||||
|
||||
Explanation_Techniques:
|
||||
Analogies:
|
||||
Purpose: "Make complex concepts accessible"
|
||||
Guidelines: "Use familiar domains"
|
||||
Examples: "Network protocols as postal system"
|
||||
|
||||
Progressive_Complexity:
|
||||
Start: "Simple foundation"
|
||||
Build: "Layer complexity gradually"
|
||||
Connect: "Link new to previous concepts"
|
||||
|
||||
Visual_Aids:
|
||||
Diagrams: "System architecture & relationships"
|
||||
Flowcharts: "Process flows & decision trees"
|
||||
Code_Annotation: "Inline explanations"
|
||||
Sequence_Diagrams: "Interaction patterns"
|
||||
|
||||
Interactive_Elements:
|
||||
Examples: "Runnable code samples"
|
||||
Exercises: "Hands-on practice"
|
||||
Thought_Experiments: "Conceptual exploration"
|
||||
|
||||
Quality_Standards:
|
||||
Clarity_Metrics:
|
||||
Terminology: "Define before use"
|
||||
Consistency: "Same terms throughout"
|
||||
Context: "Sufficient background"
|
||||
Summary: "Key points recap"
|
||||
|
||||
Engagement_Patterns:
|
||||
Hook: "Start with compelling reason"
|
||||
Examples: "Concrete before abstract"
|
||||
Questions: "Address common queries"
|
||||
Practice: "Apply knowledge immediately"
|
||||
|
||||
Accuracy_Requirements:
|
||||
Facts: "Verify technical details"
|
||||
Examples: "Test code samples"
|
||||
Sources: "Cite authoritative references"
|
||||
Updates: "Keep current with changes"
|
||||
```
|
||||
|
||||
---
|
||||
*Research Flow Templates v4.0.0 - Ensuring evidence-based professional implementations with consolidated research and evidence patterns*
|
||||
|
||||
@@ -142,3 +142,73 @@ conflict_resolution:
|
||||
- dependency overlaps
|
||||
- resource constraints
|
||||
```
|
||||
|
||||
## Recovery Patterns
|
||||
|
||||
```yaml
|
||||
Recovery_Patterns:
|
||||
Session_Detection:
|
||||
Startup_Scan:
|
||||
Locations: [".claudedocs/tasks/in-progress/", ".claudedocs/tasks/pending/"]
|
||||
Parse_Metadata: "Extract task ID, title, status, branch, progress"
|
||||
Git_Validation: "Check branch exists, clean working tree, remote sync"
|
||||
Context_Restoration: "Load session state, key variables, decisions"
|
||||
|
||||
Recovery_Decision_Matrix:
|
||||
Active_Tasks_Found: "Auto-resume most recent or highest priority"
|
||||
Multiple_Tasks: "Present selection menu with progress summary"
|
||||
Stale_Tasks: "Tasks >7 days old require confirmation"
|
||||
Corrupted_State: "Fallback to manual recovery prompts"
|
||||
|
||||
Context_Recovery:
|
||||
State_Reconstruction:
|
||||
File_Context: "Restore working file list and modification tracking"
|
||||
Variable_Context: "Reload important session variables and configurations"
|
||||
Decision_Context: "Restore architectural and implementation decisions"
|
||||
Progress_Context: "Rebuild todo list from task breakdown and current phase"
|
||||
|
||||
Integrity_Validation:
|
||||
File_Existence: "Verify all referenced files still exist"
|
||||
Git_Consistency: "Check branch state matches task expectations"
|
||||
Dependency_Check: "Validate required tools and services available"
|
||||
Context_Completeness: "Ensure all critical context elements present"
|
||||
|
||||
Automatic_Recovery:
|
||||
Seamless_Resume:
|
||||
No_User_Prompts: "Silent recovery for single active task"
|
||||
Progress_Display: "Show task progress and current focus"
|
||||
Context_Summary: "Brief summary of previous work and decisions"
|
||||
Immediate_Action: "Continue with next logical step"
|
||||
|
||||
Smart_Restoration:
|
||||
Todo_Regeneration: "Rebuild TodoWrite from task state and progress"
|
||||
Priority_Reordering: "Adjust todo priorities based on new context"
|
||||
Blocker_Detection: "Identify and surface any previous blockers"
|
||||
Next_Step_Identification: "Determine optimal next action"
|
||||
|
||||
Error_Recovery:
|
||||
Partial_State_Recovery:
|
||||
Task_Only: "Task file exists but todos missing - regenerate todos"
|
||||
Todos_Only: "Todos exist but task missing - continue with warning"
|
||||
Corrupted_Task: "Parse what's possible, prompt for missing info"
|
||||
Git_Mismatch: "Task branch doesn't exist - offer branch creation"
|
||||
|
||||
Fallback_Strategies:
|
||||
Manual_Recovery: "Present recovery options to user"
|
||||
Fresh_Start: "Option to abandon recovery and start fresh"
|
||||
Partial_Import: "Import what's recoverable, start new for rest"
|
||||
Checkpoint_Rollback: "Restore from last known good checkpoint"
|
||||
|
||||
Recovery_Communication:
|
||||
Status_Messages:
|
||||
Starting_Recovery: "🔄 Detecting previous session state..."
|
||||
Task_Found: "📋 Found active task: {title} ({progress}% complete)"
|
||||
Context_Restored: "✅ Session context restored - continuing work"
|
||||
Recovery_Failed: "⚠ Could not fully restore context - manual recovery needed"
|
||||
|
||||
Progress_Indicators:
|
||||
Task_Progress: "{completed_todos}/{total_todos} steps completed"
|
||||
Time_Estimates: "~{estimated_remaining} remaining"
|
||||
Current_Focus: "Working on: {current_todo_description}"
|
||||
Recent_Activity: "Last worked on {time_ago}"
|
||||
```
|
||||
|
||||
@@ -376,5 +376,77 @@ Example_4_Medium_Complexity:
|
||||
User_Experience: "Brief notification, then immediate work start"
|
||||
```
|
||||
|
||||
## Task Structure
|
||||
|
||||
```yaml
|
||||
Task_Structure:
|
||||
File_Format:
|
||||
Location: ".claudedocs/tasks/{status}/{type}-{id}-{slug}.md"
|
||||
Status_Directories: ["pending", "in-progress", "completed", "cancelled"]
|
||||
ID_Format: "YYYYMMDD-HHMMSS (timestamp-based unique identifier)"
|
||||
|
||||
Task_File_Header:
|
||||
Metadata:
|
||||
ID: "Unique timestamp identifier"
|
||||
Title: "Human-readable task description"
|
||||
Type: "feature|bugfix|refactor|docs|test|analysis"
|
||||
Status: "pending|in_progress|completed|cancelled"
|
||||
Priority: "critical|high|medium|low"
|
||||
Created: "ISO 8601 timestamp"
|
||||
Updated: "ISO 8601 timestamp"
|
||||
Branch: "Git branch name (task/{id}-{slug})"
|
||||
|
||||
Content_Structure:
|
||||
Overview:
|
||||
Description: "Detailed task description and context"
|
||||
Objectives: "What needs to be accomplished"
|
||||
Success_Criteria: "Definition of done"
|
||||
|
||||
Implementation_Plan:
|
||||
Phases: "Major development phases"
|
||||
Dependencies: "Other tasks or external dependencies"
|
||||
Risks: "Potential blockers or challenges"
|
||||
|
||||
Progress_Tracking:
|
||||
Current_Phase: "Which phase is currently active"
|
||||
Completed_Steps: "List of finished work items"
|
||||
Next_Steps: "Immediate next actions"
|
||||
Blockers: "Current obstacles and workarounds"
|
||||
|
||||
Technical_Context:
|
||||
Architecture_Decisions: "Key design choices made"
|
||||
Files_Modified: "Tracked file changes"
|
||||
Git_Commits: "Related commit history"
|
||||
Testing_Strategy: "How the work will be verified"
|
||||
|
||||
State_Management:
|
||||
Status_Transitions:
|
||||
pending → in_progress: "Task started, branch created"
|
||||
in_progress → completed: "All objectives met, PR merged"
|
||||
in_progress → cancelled: "Task abandoned or deprioritized"
|
||||
completed → in_progress: "Reopened for additional work"
|
||||
|
||||
Automatic_Updates:
|
||||
Progress_Calculation: "Based on completed todos vs total"
|
||||
Git_Integration: "Commit references and branch status"
|
||||
Time_Tracking: "Session time spent on task"
|
||||
|
||||
Integration_Points:
|
||||
Todo_System:
|
||||
Generation: "Create todos from task breakdown"
|
||||
Synchronization: "Todo completion updates task progress"
|
||||
Context_Sharing: "Shared state between systems"
|
||||
|
||||
Git_Integration:
|
||||
Branch_Creation: "Automatic feature branch creation"
|
||||
Commit_Linking: "Commits reference task ID"
|
||||
Merge_Tracking: "PR completion triggers task completion"
|
||||
|
||||
Command_System:
|
||||
Auto_Creation: "Complex operations trigger task creation"
|
||||
Status_Updates: "Commands update task progress"
|
||||
Recovery: "Resume interrupted tasks automatically"
|
||||
```
|
||||
|
||||
---
|
||||
*Task System v4.0.0 - Seamless integration of persistent tasks with dynamic todos for SuperClaude*
|
||||
|
||||
262
.claude/commands/shared/ultracompressed.yml
Normal file
262
.claude/commands/shared/ultracompressed.yml
Normal file
@@ -0,0 +1,262 @@
|
||||
# UltraCompressed Mode Patterns
|
||||
# Systematic token reduction & compressed communication patterns
|
||||
|
||||
## Legend (Auto-Generated Based on Usage)
|
||||
| Symbol | Meaning | | Abbrev | Meaning |
|
||||
|--------|---------|---|--------|---------|
|
||||
| → | leads to | | cfg | configuration |
|
||||
| & | and/with | | impl | implementation |
|
||||
| > | greater than | | ops | operations |
|
||||
| » | sequence flow | | perf | performance |
|
||||
| : | define/specify | | req | required |
|
||||
| ✓ | verified/confirmed | | opt | optional |
|
||||
| ⚠ | warning/risk | | temp | temporary |
|
||||
| 🔧 | tool/utility | | std | standard |
|
||||
|
||||
## Activation Patterns
|
||||
|
||||
```yaml
|
||||
Activation_Triggers:
|
||||
Explicit_Flag:
|
||||
Primary: "--uc (UltraCompressed mode)"
|
||||
Command_Integration: "All commands support --uc flag"
|
||||
Override: "Explicit flag overrides all other triggers"
|
||||
|
||||
Natural_Language:
|
||||
Keywords: ["compress", "concise", "brief", "minimal", "telegram style", "ultra compressed"]
|
||||
Phrases: ["make it shorter", "reduce tokens", "compress output", "telegram format"]
|
||||
Context: "User explicitly requests compressed communication"
|
||||
|
||||
Automatic_Triggers:
|
||||
High_Context_Usage: "Context usage >75% → Auto-activate"
|
||||
Token_Budget_Pressure: "Approaching token limits → Auto-activate"
|
||||
Large_Codebases: "Project >10k files → Recommend --uc"
|
||||
Long_Sessions: "Session >2 hours → Suggest --uc"
|
||||
|
||||
Command_Combinations:
|
||||
--uc + --think: "Compressed thinking output"
|
||||
--uc + --seq: "Compressed sequential analysis"
|
||||
--uc + --magic: "Compressed component descriptions"
|
||||
--uc + --c7: "Compressed documentation summaries"
|
||||
|
||||
Detection_Patterns:
|
||||
Context_Analysis:
|
||||
File_Count: ">5k files → High complexity"
|
||||
Response_Length: "Previous responses >2k tokens → Candidate"
|
||||
Session_Duration: ">90 minutes → Token conservation mode"
|
||||
|
||||
User_Behavior:
|
||||
Repeated_Commands: "Same command >3 times → Suggest --uc"
|
||||
Large_Requests: "Multi-part requests → Recommend --uc"
|
||||
Time_Pressure: "Keywords: quick, fast, urgent → Auto-suggest --uc"
|
||||
```
|
||||
|
||||
## Token Reduction Strategies
|
||||
|
||||
```yaml
|
||||
Systematic_Compression:
|
||||
Remove_Filler_Words:
|
||||
Articles: ["the", "a", "an"] → Remove unless critical
|
||||
Qualifiers: ["very", "really", "quite", "rather"] → Remove
|
||||
Verbal_Padding: ["in order to" → "to", "due to the fact that" → "because"]
|
||||
Redundancy: ["and also" → "&", "as well as" → "&"]
|
||||
|
||||
Symbol_Substitution:
|
||||
Logical_Operators:
|
||||
"and" → "&"
|
||||
"or" → "|"
|
||||
"leads to" → "→"
|
||||
"greater than" → ">"
|
||||
"less than" → "<"
|
||||
"define/specify" → ":"
|
||||
"sequence" → "»"
|
||||
|
||||
Abbreviation_System:
|
||||
Technical_Terms:
|
||||
"configuration" → "cfg"
|
||||
"implementation" → "impl"
|
||||
"operations" → "ops"
|
||||
"performance" → "perf"
|
||||
"required" → "req"
|
||||
"optional" → "opt"
|
||||
"temporary" → "temp"
|
||||
"standard" → "std"
|
||||
"development" → "dev"
|
||||
"production" → "prod"
|
||||
|
||||
Format_Optimization:
|
||||
Lists: "Bullets > prose paragraphs"
|
||||
Structure: "YAML > narrative text"
|
||||
Headers: "Symbolic prefixes > full sentences"
|
||||
Examples: "Code > explanatory text"
|
||||
|
||||
Output_Formatting:
|
||||
Documentation_Style:
|
||||
Headers: "Minimal → Essential info only"
|
||||
Sections: "Compressed → Key points only"
|
||||
Examples: "Compact → Working code without verbose explanation"
|
||||
|
||||
Response_Structure:
|
||||
Introduction: "Skip → Direct to content"
|
||||
Conclusion: "Skip → End at completion"
|
||||
Transitions: "Minimal → Essential flow only"
|
||||
|
||||
Code_Documentation:
|
||||
Comments: "Essential only → Remove explanatory"
|
||||
Variable_Names: "Short but clear → No verbosity"
|
||||
Function_Names: "Concise → Core purpose only"
|
||||
```
|
||||
|
||||
## Auto-Legend Generation
|
||||
|
||||
```yaml
|
||||
Legend_Management:
|
||||
Symbol_Tracking:
|
||||
Usage_Detection: "Scan output for symbols used"
|
||||
Frequency_Analysis: "Track symbol frequency in session"
|
||||
Auto_Generation: "Generate legend with used symbols only"
|
||||
|
||||
Legend_Placement:
|
||||
Document_Start: "Legend at beginning of compressed docs"
|
||||
Section_Headers: "Mini-legend for section-specific symbols"
|
||||
Context_Sensitive: "Show relevant symbols only"
|
||||
|
||||
Symbol_Categories:
|
||||
Flow_Control: ["→", "»", "&", "|"]
|
||||
Status_Indicators: ["✓", "⚠", "🔧", "📝"]
|
||||
Relationships: [">", "<", ":", "="]
|
||||
Operations: ["🔄", "🔀", "⚡", "🎯"]
|
||||
|
||||
Abbreviation_Categories:
|
||||
Technical: ["cfg", "impl", "ops", "perf"]
|
||||
Status: ["req", "opt", "temp", "std"]
|
||||
Context: ["dev", "prod", "test", "doc"]
|
||||
Domain: ["UI", "API", "DB", "CLI"]
|
||||
|
||||
Dynamic_Adaptation:
|
||||
Context_Awareness:
|
||||
First_Use: "Full term w/ abbreviation introduction"
|
||||
Subsequent: "Abbreviation only after definition"
|
||||
Technical_Context: "Higher abbreviation density allowed"
|
||||
User_Familiarity: "Adapt to user's technical level"
|
||||
|
||||
Clarity_Preservation:
|
||||
Critical_Information: "Never compress safety-critical details"
|
||||
Error_Messages: "Maintain clarity for debugging"
|
||||
Instructions: "Preserve step clarity for complex operations"
|
||||
Code_Logic: "Keep code readable despite compression"
|
||||
```
|
||||
|
||||
## Integration Patterns
|
||||
|
||||
```yaml
|
||||
Command_Integration:
|
||||
Flag_Support:
|
||||
All_Commands: "Support --uc flag universally"
|
||||
Help_Text: "Include --uc in flag documentation"
|
||||
Validation: "Validate --uc compatibility with other flags"
|
||||
|
||||
Output_Adaptation:
|
||||
Analysis_Commands: "Compress findings → Key insights only"
|
||||
Build_Commands: "Compress logs → Essential status only"
|
||||
Documentation_Commands: "Compress docs → Core facts only"
|
||||
|
||||
Error_Handling:
|
||||
Compressed_Errors: "Essential error info only"
|
||||
Debug_Information: "Minimal debug output"
|
||||
Recovery_Instructions: "Concise fix guidance"
|
||||
|
||||
Persona_Integration:
|
||||
Architect: "Compressed system diagrams & decisions"
|
||||
Frontend: "Compressed component specs & patterns"
|
||||
Backend: "Compressed API docs & data flows"
|
||||
Analyzer: "Compressed findings & evidence"
|
||||
Security: "Compressed threat assessments"
|
||||
|
||||
MCP_Integration:
|
||||
Context7: "Compressed documentation summaries"
|
||||
Sequential: "Compressed thinking steps"
|
||||
Magic: "Compressed component descriptions"
|
||||
Puppeteer: "Compressed test results"
|
||||
|
||||
Session_Management:
|
||||
State_Tracking:
|
||||
Compression_Level: "Track user preference for compression depth"
|
||||
Symbol_Usage: "Track symbols used in session"
|
||||
Effectiveness: "Monitor token savings achieved"
|
||||
|
||||
Progressive_Compression:
|
||||
Session_Start: "Standard compression level"
|
||||
High_Usage: "Increase compression automatically"
|
||||
User_Feedback: "Adjust based on user responses"
|
||||
|
||||
Quality_Control:
|
||||
Clarity_Metrics: "Ensure comprehensibility maintained"
|
||||
Information_Preservation: "Critical details not lost"
|
||||
User_Satisfaction: "Monitor for compression complaints"
|
||||
```
|
||||
|
||||
## Quality Assurance
|
||||
|
||||
```yaml
|
||||
Compression_Validation:
|
||||
Information_Integrity:
|
||||
Essential_Facts: "Never compress critical information"
|
||||
Accuracy_Check: "Verify compressed output maintains accuracy"
|
||||
Completeness: "Ensure no essential details lost"
|
||||
|
||||
Readability_Standards:
|
||||
Technical_Accuracy: "Maintain technical precision"
|
||||
Logical_Flow: "Preserve logical progression"
|
||||
Context_Clarity: "Ensure context remains clear"
|
||||
|
||||
User_Experience:
|
||||
Learning_Curve: "Minimize cognitive load from symbols"
|
||||
Consistency: "Use symbols consistently throughout"
|
||||
Progressive_Disclosure: "Introduce complexity gradually"
|
||||
|
||||
Fallback_Mechanisms:
|
||||
Clarity_Issues:
|
||||
User_Confusion: "Expand explanation if user indicates confusion"
|
||||
Critical_Operations: "Full detail for safety-critical operations"
|
||||
First_Time_Users: "Less aggressive compression initially"
|
||||
|
||||
Technical_Complexity:
|
||||
High_Complexity: "Reduce compression for complex technical topics"
|
||||
Debugging_Context: "Full detail for troubleshooting"
|
||||
Learning_Context: "Balance compression with educational value"
|
||||
```
|
||||
|
||||
## Performance Metrics
|
||||
|
||||
```yaml
|
||||
Token_Efficiency:
|
||||
Measurement:
|
||||
Baseline: "Standard output token count"
|
||||
Compressed: "UltraCompressed output token count"
|
||||
Savings: "Calculate percentage reduction"
|
||||
|
||||
Targets:
|
||||
Documentation: "30-50% token reduction"
|
||||
Responses: "20-40% token reduction"
|
||||
Code_Comments: "40-60% token reduction"
|
||||
|
||||
Monitoring:
|
||||
Session_Tracking: "Track cumulative savings"
|
||||
Command_Analysis: "Per-command efficiency metrics"
|
||||
User_Satisfaction: "Balance efficiency with usability"
|
||||
|
||||
Quality_Metrics:
|
||||
Comprehension:
|
||||
User_Questions: "Track clarification requests"
|
||||
Task_Completion: "Monitor successful outcomes"
|
||||
Error_Rates: "Track mistakes from compression"
|
||||
|
||||
Effectiveness:
|
||||
Time_Savings: "Measure reduced reading time"
|
||||
Cognitive_Load: "Assess user mental effort"
|
||||
Information_Density: "Measure info per token"
|
||||
```
|
||||
|
||||
---
|
||||
*UltraCompressed Mode v4.0.0 - Systematic token reduction patterns for efficient communication*
|
||||
@@ -1,7 +1,7 @@
|
||||
# Universal Constants & Shared Values
|
||||
# Single source of truth for all legends, symbols, paths, and common constants
|
||||
|
||||
## Universal Legend
|
||||
## Universal_Legend
|
||||
| Symbol | Meaning | | Abbrev | Meaning |
|
||||
|--------|---------|---|--------|---------|
|
||||
| → | leads to | | cfg | configuration |
|
||||
@@ -251,7 +251,7 @@ Common_Commands:
|
||||
Package_Commands: ["install", "update", "audit", "outdated"]
|
||||
```
|
||||
|
||||
## Standard Messages & Templates
|
||||
## Standard_Messages_Templates
|
||||
|
||||
```yaml
|
||||
Success_Messages:
|
||||
|
||||
Reference in New Issue
Block a user