Skip to content

Instantly share code, notes, and snippets.

Copilot Instructions: Design Patterns

General Guidance

  • Use established software design patterns when they improve clarity, flexibility, or maintainability.
  • Do not introduce patterns unnecessarily; prefer the simplest solution that satisfies requirements.

Preferred Patterns

  • Factory: Use for complex object creation or when instantiation logic may change.
  • Strategy: Use when multiple interchangeable behaviors are needed.
  • Observer: Use for event-driven or reactive systems.