> For the complete documentation index, see [llms.txt](https://docs.goharrier.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goharrier.com/technical/architecture-and-design-patterns.md).

# Architecture and Design Patterns

This section documents architectural and design patterns and principles that guide the structure and organization of Salesforce implementations at Harrier. These patterns represent proven solutions to recurring problems and provide standardized approaches to common development challenges.

## When to Use Design Patterns

Design patterns should be applied when:

* You encounter recurring problems with established solutions
* You need consistency across the codebase
* The pattern simplifies complex logic
* The benefits outweigh the implementation overhead

## Pattern Selection Criteria

Choose patterns based on:

1. **Problem fit** - Does the pattern address your specific challenge?
2. **Team familiarity** - Can the team maintain pattern-based code?
3. **Performance impact** - Does the pattern meet performance requirements?
4. **Maintenance burden** - Will the pattern simplify long-term maintenance?

When making architectural decisions, consider:

* Business domain boundaries
* Team structure and ownership
* Deployment cadence requirements
* Integration points
* Performance requirements
* Compliance and security needs

## Evolution Strategy

Architecture should evolve through:

* Regular architectural reviews
* Proof of concepts for new patterns
* Incremental improvements
* Documentation of decisions and rationale
* Team education and knowledge sharing

## Contributing New Patterns

When documenting new patterns:

1. Base documentation on actual implementations in production code
2. Include concrete examples with proper Apex syntax
3. Explain the problem context and why the pattern matters
4. Provide implementation guidelines and best practices
5. Document common pitfalls and how to avoid them


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.goharrier.com/technical/architecture-and-design-patterns.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
