> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ainomos.ch/llms.txt
> Use this file to discover all available pages before exploring further.

# Documents

> Understand how Ainomos reads a document, keep its details right, and know when answers quote it.

A document is a file you bring into a room, such as a policy or a handbook. Ainomos reads the text out of it and splits it into passages it can search, so answers in that room can quote it. A document also carries details that decide how it is cited and when: its reference, version, issuer, owner and validity dates.

To bring documents in, use [Import](https://docs.ainomos.ch/import/documents.md). This page explains what happens afterwards.

## Who can do what

| Task | Who can do it |
| - | - |
| See the **Documents** list and read documents | Members of the room. If your organisation hides documents from standard users, only people with a responsibility (owner, decider or curator) see them. Everyone else reads "Documents are shown to curators." See [visibility](https://docs.ainomos.ch/privacy/visibility.md). |
| Import, edit details, accept details, **Read again** | Room owners and curators, including a curator named for the room's memory. |
| Download the original file | Everyone who can read the document, when Ainomos kept the original. |

## Supported file types

| File | What Ainomos reads |
| - | - |
| PDF | The text of every page. Pages without a text layer, such as scans, are read with text recognition (OCR) in German, French, Italian and English, for up to 60 pages per file unless your installation sets another limit. A password-protected PDF cannot be read. |
| Word (.docx) | The paragraphs and the text in tables. |
| Markdown (.md) | The text as written. A Markdown file in OKF, the format Ainomos reads best, can also state the document's details and its rules itself. |
| Plain text | The text as written. |
| ZIP archive | Each file inside, as if you had uploaded it on its own. |

A Markdown file that describes a decision (an ADR, BDR or SDR file) becomes a draft decision, not a document. When one folder holds the same document in several formats, Ainomos reads it once, from the richest format.

## How Ainomos reads a document

**1. Takes the text out**

Ainomos reads the text from the file. For a PDF it also tidies the text: page numbers, running headers and footers go, and words broken at a line end are joined. It keeps the document's numbering and changes no word.

**2. Removes secrets and checks for personal data**

Passwords, keys and similar secrets are removed before anything else reads the text. In a room that keeps personal data out, personal data is masked.

**3. Reads what the document says about itself**

A model that the room's data class allows reads the reference, version, issuer, owner and validity dates the text states, each with the words it came from, as suggestions. It also finds the rules and exceptions the text states. Those wait for approval on the [Rules](https://docs.ainomos.ch/knowledge/rules.md) and [Exceptions](https://docs.ainomos.ch/knowledge/exceptions.md) pages.

**4. Makes it searchable**

Ainomos splits the text into passages that a search finds by meaning and by words. The passages can answer questions as soon as the document is added.

## Statuses along the way

While an import runs, the **Import** page shows **Reading** (reading the files), **Sorting** (deciding what each part is) and **Filing** (writing it into the room). It ends as **Done**, **Done with notes**, **Failed**, **Cancelled** or, if someone took it back, **Undone**. See [Import](https://docs.ainomos.ch/import/documents.md).

Once added, the document itself has a state:

| State | What it means |
| - | - |
| **In force** | Answers quote it. A document without dates is always in force. |
| **Not yet in force** | Its **Valid from** date lies ahead. Answers do not quote it yet. |
| **Expired** | Its **Valid until** date has passed. Answers no longer quote it. |
| **Details to accept** | Ainomos read details from the file that nobody has accepted yet. |

## The Documents page

Open **Knowledge**, then **Documents**. The heading says how many documents the room has and how many answers can quote today. The columns are **Name**, **Version**, **Issued by**, **State**, **Owner** and **Valid until**.

Use the search box, the **State** menu (with the statuses above), the **Owner** menu and the **Issued by** menu to narrow the list. For owners and curators, **Create** opens **Import**.

## Open a document

Select a document to open it. The top shows its state, its title and its facts: **Reference**, **Version**, **Issued by**, **Owner** and **Valid**. A document without an owner shows a dash, which is a gap worth closing.

The tabs are **Content** (the text), **Relations** (for example the rules found in it) and **Details** (all facts, including the room and the source).

## Accept details read from the file

When Ainomos read details from the file, a card above the document says how many it found. They apply only once you accept them. Until then the document keeps the details it has.

The card shows each **Detail**, what was **Read from the PDF**, and **Where it says so**, quoted from the text. Then:

* Select **Accept** (for example **Accept 4 details**) to apply them all. An owner is applied only when the name matches exactly one member of the room.
* Select **Edit details** to correct them first.

## Edit details

Select **Edit details**. Saving writes an evidence entry.

| Field | What it does |
| - | - |
| **Title** | The document's name. Required. |
| **Reference** | How people and answers name it, for example a policy number. |
| **Version** | The edition. Answers name the version they quote. |
| **Issued by** | Who enacted it: a board, an office, a parliament. |
| **Owner** | The person in the room who answers for it. Must be a member of the room. |
| **Valid from** | Before this date the document is not yet in force and answers do not quote it. |
| **Valid until** | After this date the document is expired and answers do not quote it. Must not lie before **Valid from**. |

Select **Save details**, or **Cancel** to keep things as they were.

## Read again

PDF documents imported before Ainomos tidied PDF text may read badly, with page numbers, headers and line breaks in mid-sentence. **Read again** lays out the stored text the way new imports are, without changing a word. A model then reads the details as suggestions, and the document is made searchable again.

The button appears only where it applies: not on documents that did not come from a PDF, were already read again, or whose text was changed after the import. If no model is approved for the room's data class, the text is tidied but no details are read.

## The original file

When your organisation has set up [file storage](https://docs.ainomos.ch/admin/file-storage.md), Ainomos keeps the uploaded file there. **Original PDF** on the document downloads it. Ainomos does not keep the original when:

* no file storage is set up, or it could not be reached during the import,
* a secret was removed from the file,
* the room masks personal data,
* the file came inside a ZIP archive.

## Change or remove a document

Change a document's details with **Edit details**. To take a document out of the room, open **Import** and select **Undo** on that import in the **Import history**. Undo removes everything that import added. It works only while nothing from it has been decided or changed since. See [Import](https://docs.ainomos.ch/import/documents.md).

## Related

* [Bring in documents](https://docs.ainomos.ch/import/documents.md)
* [Knowledge overview](https://docs.ainomos.ch/knowledge/overview.md)
* [File storage](https://docs.ainomos.ch/admin/file-storage.md)
* [Personal data](https://docs.ainomos.ch/privacy/personal-data.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.