# 七大原则

- [开闭原则(OCP)](https://www.selinux.tech/designpattern/seven-principle/open-closed-principle.md)
- [依赖倒置原则(DIP)](https://www.selinux.tech/designpattern/seven-principle/dependence-inversion-principle.md)
- [单一职责原则(SRP)](https://www.selinux.tech/designpattern/seven-principle/single-responsibility-principle.md)
- [接口隔离原则(ISP)](https://www.selinux.tech/designpattern/seven-principle/interface-segregation-principle.md)
- [迪米特法则(LoD)](https://www.selinux.tech/designpattern/seven-principle/law-of-demeter.md)
- [里氏代换原则(LSP)](https://www.selinux.tech/designpattern/seven-principle/liskov-substitution-principle.md)
- [合成复用原则(CRP)](https://www.selinux.tech/designpattern/seven-principle/composite-reuse-principle.md)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.selinux.tech/designpattern/seven-principle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
