> For the complete documentation index, see [llms.txt](https://docs.sail.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sail.fun/sail-protocol/smart-contracts/sail-contract-architecture.md).

# Sail Contract Architecture

The most important contract to recognize in the repo is the Ship Module contract. All logic is contained in this contract for each ship. They are separated in the repo to ensure clarity and add specific functions to the Gnosis Zodiac ecosystem.

![image](https://user-images.githubusercontent.com/37888654/213544410-926363a9-9d34-4ee0-97b6-e1abfec2d065.png)

Smart contracts developed for Sail can be broken into the following categories:

**Sail Specific Contracts** - these contracts are built for Sail but do not follow the Zodiac module requirements.

**Gnosis Zodiac Modules** - these contracts are built for specific functions within Sail and do follow the Zodiac module requirements.

**Contract Interfaces** - these interfaces act as a logic check as contracts compile.

**Third Party Integrations** - Sail interacts with third party smart contracts such as OpenSea's SeaPort to facilitate the needs of ships and their crew.

The Ship Module stands alone in it's importance and complexity, so it gets its own section.


---

# 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 dynamically by asking a question.

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

```
GET https://docs.sail.fun/sail-protocol/smart-contracts/sail-contract-architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
