> For the complete documentation index, see [llms.txt](https://newmishka.gitbook.io/newmishka-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://newmishka.gitbook.io/newmishka-docs/razrabotka/tekhnicheskaya-arkhitektura.md).

# Техническая архитектура

Эта страница описывает **текущее состояние ветки `main`**. Последний stable release — **v1.3.0**; изменения Stage 4 после релиза относятся к **Unreleased**.

Проект сохраняет **single-file** поставку: базовая и корпоративная диагностика находятся в одном `arm_info.sh`.

## Базовый конвейер

Стандартный отчёт строится по схеме:

**collectors → normalized snapshot → checks/scoring → TXT/JSON**

Границы этапов разделены явно:

1. `collect_base_snapshot` собирает и нормализует факты, но не формирует рекомендации, диагностические статусы и score;
2. нормализованный снимок хранит данные системы, сети и накопителей, включая роль диска, SMART-факты, ресурс, температуру и NVMe spare/threshold;
3. `evaluate_base_disk_scores`, `evaluate_base_network_status` и `evaluate_base_snapshot` преобразуют факты в score/status/confidence и рекомендации;
4. `prepare_base_output_view` применяет представление и privacy;
5. `emit_base_text` и `emit_base_json` только отображают готовый снимок и не повторяют hardware/system probes.

Архитектурный тест Stage 4 запрещает возвращать scoring/checks внутрь collector и отдельно проверяет сохранение disk/network semantics.

## Корпоративный конвейер

Корпоративная часть строится по схеме:

**collect → normalized inventory → probe → checks → output**

Это разделяет:

1. обнаружение инфраструктурных объектов;
2. нормализацию и устранение дублей;
3. ограниченные по времени активные проверки;
4. расчёт статусов;
5. TXT/JSON-вывод и рекомендации.

## Принципы

* read-only диагностика по умолчанию;
* collectors собирают факты, а checks/scoring интерпретируют их;
* активные сетевые проверки ограничены timeout и общим бюджетом;
* `--probe-autofs` включается только явно;
* отсутствие утилиты/данных не трактуется автоматически как исправное состояние;
* корпоративные проверки не изменяют базовый health score;
* standard JSON сохраняет schema v1, корпоративные профили — schema v2;
* конфигурационный файл не выполняется через `source`: читается разрешённый список ключей;
* команды рекомендаций должны объяснять эффект и маркировать изменения состояния.


---

# 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://newmishka.gitbook.io/newmishka-docs/razrabotka/tekhnicheskaya-arkhitektura.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.
