Custom Skills (ourdigital-custom-skills/): - 00-ourdigital-visual-storytelling: Blog featured image prompt generator - 01-ourdigital-research-publisher: Research-to-publication workflow - 02-notion-organizer: Notion workspace management - 03-research-to-presentation: Notion research to PPT/Figma - 04-seo-gateway-strategist: SEO gateway page strategy planning - 05-gateway-page-content-builder: Gateway page content generation - 20-jamie-brand-editor: Jamie Clinic branded content GENERATION - 21-jamie-brand-guardian: Jamie Clinic content REVIEW & evaluation Refinements applied: - All skills converted to SKILL.md format with YAML frontmatter - Added version fields to all skills - Flattened nested folder structures - Removed packaging artifacts (.zip, .skill files) - Reorganized file structures (scripts/, references/, etc.) - Differentiated Jamie skills with clear roles 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
234 lines
6.4 KiB
Markdown
234 lines
6.4 KiB
Markdown
# Example: Technical Investigation
|
|
|
|
## User Request
|
|
|
|
> "Research our current caching strategy and create a technical summary"
|
|
|
|
## Workflow Execution
|
|
|
|
### Step 1: Search for Caching Information
|
|
|
|
```
|
|
Notion:notion-search
|
|
query: "caching strategy architecture"
|
|
query_type: "internal"
|
|
teamspace_id: "engineering-teamspace-id"
|
|
```
|
|
|
|
**Results Found:**
|
|
- "System Architecture Overview" (Engineering)
|
|
- "Redis Implementation Guide" (Backend Docs)
|
|
- "Performance Optimization - Q3 2024" (Engineering)
|
|
- "API Caching Decision Record" (Architecture)
|
|
|
|
### Step 2: Fetch Relevant Pages
|
|
|
|
```
|
|
Notion:notion-fetch
|
|
id: "system-architecture-page-url"
|
|
```
|
|
|
|
Extracted: Current caching architecture uses Redis for API responses, Memcached for session storage.
|
|
|
|
```
|
|
Notion:notion-fetch
|
|
id: "redis-implementation-guide-url"
|
|
```
|
|
|
|
Extracted: Implementation details, TTL settings, invalidation strategies.
|
|
|
|
```
|
|
Notion:notion-fetch
|
|
id: "api-caching-decision-record-url"
|
|
```
|
|
|
|
Extracted: Why Redis was chosen over alternatives, trade-offs considered.
|
|
|
|
### Step 3: Synthesize Findings
|
|
|
|
**Key findings identified:**
|
|
- Two-tier caching: Redis (API responses) + Memcached (sessions)
|
|
- TTL strategy: 5 minutes for dynamic data, 1 hour for static
|
|
- Invalidation: Event-driven for critical updates
|
|
- Performance impact: 75% reduction in database load
|
|
- Known issues: Cache stampede on popular endpoints
|
|
|
|
### Step 4: Create Technical Summary
|
|
|
|
```
|
|
Notion:notion-create-pages
|
|
|
|
parent: { page_id: "engineering-docs-parent-id" }
|
|
|
|
pages: [{
|
|
properties: {
|
|
"title": "Technical Summary: Caching Strategy - Oct 2025"
|
|
},
|
|
content: "[Structured technical summary using template]"
|
|
}]
|
|
```
|
|
|
|
## Output Document
|
|
|
|
```markdown
|
|
# Technical Summary: Caching Strategy - Oct 2025
|
|
|
|
## Executive Summary
|
|
|
|
Our caching infrastructure uses a two-tier approach with Redis for API response caching and Memcached for session management. This strategy has reduced database load by 75% and improved API response times from 200ms to 50ms average.
|
|
|
|
## Architecture Overview
|
|
|
|
### Layer 1: API Response Caching (Redis)
|
|
**Technology**: Redis 7.0 cluster (3 nodes)
|
|
**Purpose**: Cache GET endpoint responses
|
|
**TTL Strategy**:
|
|
- Dynamic content: 5 minutes
|
|
- Static content: 1 hour
|
|
- User-specific: 15 minutes
|
|
|
|
**Source**: <mention-page url="...">System Architecture Overview</mention-page>
|
|
|
|
### Layer 2: Session Storage (Memcached)
|
|
**Technology**: Memcached 1.6
|
|
**Purpose**: User session data, temporary state
|
|
**TTL**: 24 hours (session lifetime)
|
|
|
|
## Implementation Details
|
|
|
|
### Cache Key Format
|
|
```
|
|
api:v1:{endpoint}:{params_hash}
|
|
session:{user_id}:{session_id}
|
|
```
|
|
|
|
### Invalidation Strategy
|
|
- **Event-driven**: Critical data changes trigger immediate invalidation
|
|
- **Time-based**: TTL expiration for non-critical data
|
|
- **Manual**: Admin tools for emergency cache clear
|
|
|
|
**Source**: <mention-page url="...">Redis Implementation Guide</mention-page>
|
|
|
|
## Decision Rationale
|
|
|
|
### Why Redis for API Caching?
|
|
|
|
**Pros**:
|
|
- Advanced data structures (sorted sets, hashes)
|
|
- Built-in TTL with automatic eviction
|
|
- Pub/sub for cache invalidation events
|
|
- Persistence options for durability
|
|
|
|
**Cons**:
|
|
- Higher memory usage than Memcached
|
|
- More complex cluster management
|
|
|
|
**Decision**: Chosen for flexibility and rich feature set needed for API caching.
|
|
|
|
**Source**: <mention-page url="...">API Caching Decision Record</mention-page>
|
|
|
|
### Why Memcached for Sessions?
|
|
|
|
**Pros**:
|
|
- Simpler, lighter weight
|
|
- Excellent for key-value storage
|
|
- Lower memory footprint
|
|
|
|
**Cons**:
|
|
- No persistence
|
|
- Limited data structures
|
|
|
|
**Decision**: Perfect fit for ephemeral session data where simplicity is valued.
|
|
|
|
## Performance Impact
|
|
|
|
| Metric | Before Caching | After Caching | Improvement |
|
|
|--------|----------------|---------------|-------------|
|
|
| Avg Response Time | 200ms | 50ms | 75% faster |
|
|
| Database Load | 100% | 25% | 75% reduction |
|
|
| Cache Hit Rate | - | 85% | - |
|
|
| Peak RPS Handled | 1,000 | 4,000 | 4x increase |
|
|
|
|
**Source**: <mention-page url="...">Performance Optimization - Q3 2024</mention-page>
|
|
|
|
## Known Issues & Limitations
|
|
|
|
### Cache Stampede
|
|
**Issue**: When popular cache entries expire, multiple requests hit database simultaneously
|
|
|
|
**Mitigation**: Implemented probabilistic early expiration and request coalescing
|
|
|
|
**Status**: Reduced by 90% but not eliminated
|
|
|
|
### Stale Data Risk
|
|
**Issue**: Cached data can be up to TTL duration stale
|
|
|
|
**Mitigation**: Event-driven invalidation for critical data paths
|
|
|
|
**Status**: Acceptable trade-off for performance gains
|
|
|
|
## Monitoring & Observability
|
|
|
|
**Metrics tracked**:
|
|
- Cache hit/miss rates per endpoint
|
|
- Memory usage and eviction rates
|
|
- Response time distributions
|
|
- Invalidation event frequency
|
|
|
|
**Tools**: DataDog dashboards, CloudWatch alarms
|
|
|
|
## Future Considerations
|
|
|
|
1. **Edge Caching**: Evaluate CDN integration for static assets
|
|
2. **Cache Warming**: Pre-populate cache for predictable traffic spikes
|
|
3. **Adaptive TTLs**: Adjust TTLs based on data change frequency
|
|
4. **Regional Caching**: Multi-region cache replication for global performance
|
|
|
|
## Related Documentation
|
|
|
|
- <mention-page url="...">System Architecture Overview</mention-page>
|
|
- <mention-page url="...">Redis Implementation Guide</mention-page>
|
|
- <mention-page url="...">API Caching Decision Record</mention-page>
|
|
- <mention-page url="...">Performance Optimization - Q3 2024</mention-page>
|
|
|
|
## Appendix: Configuration Examples
|
|
|
|
### Redis Configuration
|
|
```yaml
|
|
maxmemory: 8gb
|
|
maxmemory-policy: allkeys-lru
|
|
tcp-keepalive: 60
|
|
```
|
|
|
|
### Common Cache Operations
|
|
```python
|
|
# Set with TTL
|
|
cache.set(key, value, ttl=300)
|
|
|
|
# Get with fallback
|
|
value = cache.get(key) or fetch_from_db(key)
|
|
|
|
# Invalidate pattern
|
|
cache.delete_pattern("api:v1:users:*")
|
|
```
|
|
```
|
|
|
|
## Key Success Factors
|
|
|
|
1. **Multiple source integration**: Combined architecture docs, implementation guides, and decision records
|
|
2. **Technical depth**: Included configuration, code examples, metrics
|
|
3. **Decision context**: Explained why choices were made, not just what
|
|
4. **Practical focus**: Real performance numbers and known issues
|
|
5. **Future-looking**: Noted areas for improvement
|
|
6. **Well-cited**: Every major point links back to source material
|
|
|
|
## Workflow Pattern Demonstrated
|
|
|
|
This example shows the complete research workflow:
|
|
- **Scoped search** (teamspace filter for engineering)
|
|
- **Multi-page synthesis** (4 different sources)
|
|
- **Technical template** (architecture-focused format)
|
|
- **Proper placement** (under engineering docs)
|
|
- **Comprehensive citations** (links to all sources)
|
|
|