Files
freemo d9e5668cec fix(skills): comprehensive final audit pass for programming-patterns skill
Fixes and improvements from exhaustive audit:

Consistency fixes in SKILL.md:
- 'Pipe & Filter' → 'Pipe and Filter' (one stray '&' found and corrected)
- 'Singleton for factory instance' → clarified to 'register factory as
  singleton-scoped via DI container' (less misleading wording)
- Documentation Format section updated with note that SKILL.md itself is the
  authoritative source for related-pattern combinations

Coverage fix — Related Patterns sections:
- Added '## Related Patterns' to ALL 94 pattern files (was 0/94)
- Each section lists 3–6 related patterns with relationship descriptions
- Covers: why they're related, when to prefer one vs the other,
  and which are often confused

SOLID principles → Creational → Structural → Behavioral → Architectural →
Concurrency → Functional → Resilience → Data Access → Messaging →
Testing → Error Handling → Microservice — all 13 categories covered

Code verification:
- Python: 0 failures (all 85 testable blocks pass)
- Go: 0 failures (all 76 testable blocks pass)
- JavaScript: 0 failures (all 78 testable blocks pass)
- All 239 code blocks verified correct after edits

Final skill state:
- 108 files, 36,524 lines across 13 reference categories
- 94/94 pattern files have Related Patterns sections
- 2,815-line SKILL.md with 67 decision trees, 23 scenarios,
  0 broken references, 0 naming inconsistencies
2026-04-15 13:22:13 -04:00
..

Architectural Patterns Reference

This directory contains detailed references for 14 architectural patterns used in software design. Each pattern document includes the problem it solves, the solution approach, when to use it, when to avoid it, pseudocode, and runnable code examples in multiple languages.

Patterns

# Pattern File Summary
1 Repository repository.md Abstract data access behind a collection-like interface
2 Unit of Work unit-of-work.md Track and commit changes atomically
3 Service Layer service-layer.md Define application boundaries with a service API
4 MVC mvc.md Model-View-Controller separation
5 MVVM mvvm.md Model-View-ViewModel with data binding
6 MVP mvp.md Model-View-Presenter with passive view
7 CQRS cqrs.md Separate read and write models
8 Event Sourcing event-sourcing.md Store state as a sequence of events
9 Specification specification.md Composable business rules as objects
10 Hexagonal / Ports & Adapters hexagonal.md Isolate core logic from external concerns
11 Clean Architecture clean-architecture.md Enforce the dependency rule across concentric layers
12 Microkernel microkernel.md Minimal core with plug-in extensions
13 Layered Architecture layered.md Horizontal layer separation
14 Pipe and Filter pipe-and-filter.md Chained transformation stages

How to Use These References

Each file follows a consistent structure:

  1. Problem - What design challenge the pattern addresses
  2. Solution - How the pattern solves it
  3. When to Use - Scenarios where this pattern excels
  4. When to Avoid - Scenarios where this pattern adds unnecessary complexity
  5. Pseudocode - Language-agnostic algorithm sketch
  6. Code Examples - Runnable implementations in Python plus Go or JavaScript

Categorization

Data Access Patterns

  • Repository, Unit of Work

Application Structure Patterns

  • Service Layer, Layered Architecture, Clean Architecture, Hexagonal

UI Separation Patterns

  • MVC, MVVM, MVP

Domain Logic Patterns

  • CQRS, Event Sourcing, Specification

System Composition Patterns

  • Microkernel, Pipe and Filter