Escalation path when stuck on pattern development. Use when encountering TypeScript errors, framework confusion, unexpected behavior, or blocked progress...
CRITICAL: Don't spin your wheels when stuck. Follow this escalation path AGGRESSIVELY.
When encountering any difficulty with pattern development - whether it's TypeScript errors, unexpected behavior, or uncertainty about framework features - immediately begin this recovery sequence. Do NOT:
If you find yourself stuck for more than 1-2 attempts, MOVE TO THE NEXT STEP.
Use this escalation path:
ALWAYS start here when encountering pattern development issues:
"Use the pattern-dev skill to refresh your understanding of framework patterns"
The pattern-dev skill reads all latest pattern documentation from labs. Pay particular attention to:
~/Code/labs/docs/common/DEBUGGING.md - Common pitfalls and anti-patterns~/Code/labs/docs/common/PATTERNS.md - Pattern examples and best
practices~/Code/labs/docs/common/CELLS_AND_REACTIVITY.md - Reactivity system
details~/Code/labs/docs/common/TYPES_AND_SCHEMAS.md - Type system rulesWhen to use:
When to move to Step 2:
After refreshing documentation, look at existing working patterns in this priority order:
1. Labs patterns (highest priority - canonical examples):
$PARENT_DIR/labs/packages/patterns/
# These are the most up-to-date, authoritative examples
# If a pattern exists here, it's the gold standard
2. Patterns repository (if available - well-tested real-world examples):
$PARENT_DIR/patterns/
# These are well-tested real-world patterns
# Skip this if patterns repo not cloned
3. Community patterns - examples (curated examples):
patterns/examples/
# These are specifically chosen as good examples
4. Community patterns - jkomoros (user patterns):
patterns/jkomoros/
# Prefer root-level (stable) over WIP/
# These may be more complex/experimental
Within each directory:
How to find similar patterns:
# Get parent directory for relative paths
PARENT_DIR="$(git rev-parse --show-toplevel)/.."
# Search for patterns using specific features
grep -r "generateObject" $PARENT_DIR/labs/packages/patterns/
grep -r "computed(" patterns/examples/
grep -r "handler<" $PARENT_DIR/labs/packages/patterns/
# List available patterns
ls $PARENT_DIR/labs/packages/patterns/
ls $PARENT_DIR/patterns/ 2>/dev/null || echo "patterns repo not cloned"
ls patterns/examples/
ls patterns/jkomoros/
When to move to Step 2.5:
After 1-2 failed attempts, STOP trying variations. Enter plan mode and investigate properly.
Use the strategic-investigation skill to:
This step is critical. Don't skip it thinking "I'll just try one more thing." Systematic investigation often reveals the idiomatic solution faster than trial-and-error.
When to move to Step 3:
If still stuck after Steps 1-2:
git reset --hard HEADWhen to move to Step 4:
If Steps 1-3 don't resolve the issue:
After exhausting Steps 1-4, consider:
community-docs/superstitions/ for
empirical knowledge (treat with skepticism)Remember: This recovery strategy is your safety net. Follow it systematically to avoid spinning your wheels!