pattern
Curated code patterns that work
50+ battle-tested patterns for error handling, API design, authentication, and more. Select by task, inject into code, and get coaching feedback on your implementations.
Problems This Solves
"AI reinvents the wheel badly"
Every time you ask for error handling, you get a different approach. AI doesn't know your team's established patterns.
"Inconsistent code across the team"
Five developers, five different ways to handle the same problem. Code reviews become debates about style.
"Best practices are scattered"
Knowledge lives in docs, Slack threads, and senior engineers' heads. No single source of truth for "how we do things."
"New devs don't know the conventions"
Onboarding takes weeks. Junior devs submit PRs that don't match established patterns.
Pattern Library
Organized by language and domain. Each pattern includes rationale, examples, and anti-patterns to avoid.
TypeScript
- • Result type error handling
- • Discriminated unions
- • Type guards
- • Builder patterns
- • Dependency injection
Python
- • Context managers
- • Dataclasses
- • Async patterns
- • Protocol types
- • Pydantic validation
React
- • Custom hooks
- • Compound components
- • Render props
- • Error boundaries
- • Optimistic updates
API Design
- • REST conventions
- • Error responses
- • Pagination
- • Rate limiting
- • Versioning
Universal
- • Input validation
- • Logging
- • Configuration
- • Retry logic
- • Feature flags
Go
- • Error wrapping
- • Context handling
- • Interface design
- • Concurrency
- • Testing patterns
How It Works
Select by Task
Describe what you're building. Get matching patterns ranked by relevance.
pattern({ action: 'select', task: 'add authentication to API' })
// Returns: JWT auth, session management, middleware patternsInject Pattern
Apply a pattern to your existing code with context-aware modifications.
pattern({
action: 'inject',
patternId: 'TS-ERR-001',
code: '...'
})Get Coaching
Submit code for pattern review. Get scored on adherence with specific suggestions.
pattern({
action: 'coach',
code: '...',
filePath: 'src/auth.ts'
})
// Returns: { score: 85, suggestions: [...], praise: [...] }Learns From Your Team
Pattern discovery finds new patterns from your team's code corrections and preferences.
Feedback Loop
- 1AI suggests a pattern
- 2You modify or reject it
- 3System learns from your correction
- 4New patterns emerge from repeated behaviors
Team Metrics
Track which patterns your team uses most, acceptance rates, and adoption across projects.
pattern({
action: 'metrics',
teamId: 'platform-team'
})Consistent patterns, better code
Stop debating style. Start using proven patterns your whole team can follow.