Pattern Transfer
Pattern Recognition Process
1. Identify the Problem Class
Ask: "What CATEGORY of problem is this?"
| Surface Symptom |
Core Problem Class |
| Notify components when data changes |
State observation |
| Multiple async operations need coordination |
Async orchestration |
| Expensive computation called repeatedly |
Caching |
| Too many requests overload system |
Rate limiting |
| Operation fails sometimes |
Retry/resilience |
| Transform collection of data |
Data transformation |
2. Recall Prior Implementations
Ask: "Where have I encountered this problem class before?"
Map all known manifestations across languages, frameworks, and infrastructure layers.
3. Extract Canonical Solution
Ask: "What's the ESSENCE?" Strip language-specific syntax down to core steps.
Example -- State Management ESSENCE:
1. Central state container
2. Controlled mutation mechanism
3. Change notification system
4. Subscriber registration/unregistration
4. Map to Local Idioms
Ask: "How is this done HERE?" Translate essence into target domain's conventions, best practices, libraries, and naming.
Common Pattern Classes
| Pattern Class |
Problem |
Key Implementations |
| State Management |
Shared changing data |
Redux, databases, event sourcing |
| Async Coordination |
Multiple async operations |
Promises, asyncio, goroutines |
| Caching |
Expensive repeated operations |
Memoization, Redis, HTTP cache |
| Rate Limiting |
Prevent resource exhaustion |
Token bucket, sliding window |
| Retry/Resilience |
Handle transient failures |
Backoff, circuit breaker |
| Data Transformation |
Reshape data |
Map/filter/reduce, pipes, LINQ |
See references/pattern-catalog.md for detailed essence, manifestations, and transfer examples.
Transfer Protocol
Step 1: Extract ESSENCE
Remove language-specific details. Find core idea as numbered steps.
Step 2: Find IDIOMS
How does target language/framework express this? What libraries exist? What conventions apply?
Step 3: REIFY
Implement using local conventions. Verify it solves the original problem, not a distorted version.
Pattern Recognition Checklist
Classification:
Recall:
Extraction:
Adaptation:
Verification:
Anti-Patterns
| Anti-Pattern |
Symptom |
Instead |
| Pattern obsession |
SingletonFactoryStrategyAdapter |
Solve the actual problem simply |
| Inappropriate transfer |
OOP patterns in functional languages |
Use target paradigm's strengths |
| Cargo cult |
"Saw Redux in tutorial, using everywhere" |
Match tool to actual complexity |
| Premature abstraction |
Extracting pattern from 1 use case |
Wait for 2+ use cases |
Quick Reference: Pattern Mapping
| When You See |
Pattern |
Implementations |
| Notify on change |
Observer |
Events, hooks, pub/sub, triggers |
| Swap behavior |
Strategy |
Polymorphism, functions, DI |
| Add features |
Decorator |
@decorator, HOC, annotations |
| Expensive operation |
Memoization |
Cache, React.memo, materialized views |
| Too many requests |
Rate Limit |
Token bucket, throttle, semaphore |
| Transient failures |
Retry |
Backoff, circuit breaker, timeout |
| Object creation |
Builder |
Fluent API, config object |
| Single access |
Singleton |
Module pattern, DI, constants |
| Undo/redo |
Command |
Event sourcing, action history |
| Transform pipeline |
Chain |
Streams, LINQ, pipes, map/reduce |
Integration with Other Skills
| Skill |
Integration |
| Code Reading |
Recognize patterns in unfamiliar codebases faster |
| Estimation |
Known patterns have known complexity |
| Language Learning |
Map known patterns to new language idioms |
| Debugging |
Pattern violations often indicate bugs |
See references/transfer-examples.md for multi-scale examples and practice exercises.
1---2name: pattern-transfer3description: Recognizes problem classes and transfers proven solutions across domains. ALWAYS trigger on "I've seen this before", "this is like X but in Y", "there must be a pattern", "how do I do X in Y", "equivalent of", "similar to", "same concept", "translate this approach", "port this to", "cross-language", "idiomatic way". Use when encountering familiar problems in unfamiliar contexts or applying concepts across languages/frameworks. Different from code-reading which builds mental models of existing code -- this skill maps known solutions to new domains.4---5<!-- Last reviewed: 2026-03 -->67# Pattern Transfer89## Pattern Recognition Process1011### 1. Identify the Problem Class1213Ask: "What CATEGORY of problem is this?"1415| Surface Symptom | Core Problem Class |16|-----------------|-------------------|17| Notify components when data changes | State observation |18| Multiple async operations need coordination | Async orchestration |19| Expensive computation called repeatedly | Caching |20| Too many requests overload system | Rate limiting |21| Operation fails sometimes | Retry/resilience |22| Transform collection of data | Data transformation |2324### 2. Recall Prior Implementations2526Ask: "Where have I encountered this problem class before?"2728Map all known manifestations across languages, frameworks, and infrastructure layers.2930### 3. Extract Canonical Solution3132Ask: "What's the ESSENCE?" Strip language-specific syntax down to core steps.3334```35Example -- State Management ESSENCE:361. Central state container372. Controlled mutation mechanism383. Change notification system394. Subscriber registration/unregistration40```4142### 4. Map to Local Idioms4344Ask: "How is this done HERE?" Translate essence into target domain's conventions, best practices, libraries, and naming.4546## Common Pattern Classes4748| Pattern Class | Problem | Key Implementations |49|--------------|---------|---------------------|50| State Management | Shared changing data | Redux, databases, event sourcing |51| Async Coordination | Multiple async operations | Promises, asyncio, goroutines |52| Caching | Expensive repeated operations | Memoization, Redis, HTTP cache |53| Rate Limiting | Prevent resource exhaustion | Token bucket, sliding window |54| Retry/Resilience | Handle transient failures | Backoff, circuit breaker |55| Data Transformation | Reshape data | Map/filter/reduce, pipes, LINQ |5657See `references/pattern-catalog.md` for detailed essence, manifestations, and transfer examples.5859## Transfer Protocol6061### Step 1: Extract ESSENCE6263Remove language-specific details. Find core idea as numbered steps.6465### Step 2: Find IDIOMS6667How does target language/framework express this? What libraries exist? What conventions apply?6869### Step 3: REIFY7071Implement using local conventions. Verify it solves the original problem, not a distorted version.7273## Pattern Recognition Checklist7475**Classification:**76- [ ] What CATEGORY is this problem?77- [ ] Have I seen this before?78- [ ] What's it called in different contexts?7980**Recall:**81- [ ] Where have I solved this?82- [ ] What solutions exist elsewhere?83- [ ] What's the canonical implementation?8485**Extraction:**86- [ ] What's the CORE idea?87- [ ] What's language-specific syntax vs essence?88- [ ] What constraints shaped the original?8990**Adaptation:**91- [ ] What are idioms HERE?92- [ ] What conventions should I follow?93- [ ] What libraries/tools exist?9495**Verification:**96- [ ] Does this solve the RIGHT problem?97- [ ] Is this the SIMPLEST solution?98- [ ] Have I introduced new problems?99100## Anti-Patterns101102| Anti-Pattern | Symptom | Instead |103|-------------|---------|---------|104| Pattern obsession | SingletonFactoryStrategyAdapter | Solve the actual problem simply |105| Inappropriate transfer | OOP patterns in functional languages | Use target paradigm's strengths |106| Cargo cult | "Saw Redux in tutorial, using everywhere" | Match tool to actual complexity |107| Premature abstraction | Extracting pattern from 1 use case | Wait for 2+ use cases |108109## Quick Reference: Pattern Mapping110111| When You See | Pattern | Implementations |112|--------------|---------|----------------|113| Notify on change | Observer | Events, hooks, pub/sub, triggers |114| Swap behavior | Strategy | Polymorphism, functions, DI |115| Add features | Decorator | @decorator, HOC, annotations |116| Expensive operation | Memoization | Cache, React.memo, materialized views |117| Too many requests | Rate Limit | Token bucket, throttle, semaphore |118| Transient failures | Retry | Backoff, circuit breaker, timeout |119| Object creation | Builder | Fluent API, config object |120| Single access | Singleton | Module pattern, DI, constants |121| Undo/redo | Command | Event sourcing, action history |122| Transform pipeline | Chain | Streams, LINQ, pipes, map/reduce |123124## Integration with Other Skills125126| Skill | Integration |127|-------|------------|128| Code Reading | Recognize patterns in unfamiliar codebases faster |129| Estimation | Known patterns have known complexity |130| Language Learning | Map known patterns to new language idioms |131| Debugging | Pattern violations often indicate bugs |132133See `references/transfer-examples.md` for multi-scale examples and practice exercises.