# Getting Started

The following example provides the minimum setup for defining and running a single Konsist test.

{% hint style="info" %}
Check the [starter projects](https://github.com/LemonAppDev/konsist/tree/main/samples/starter-projects) containing Konsist tests or review the [Konsist API reference](https://reference.konsist.lemonappdev.com).
{% endhint %}

At a high-level Konsist check is a Unit test following multiple implicit steps.

3 steps are required for a *declaration check* and 4 steps are required for an *architecture check*:

{% @mermaid/diagram content="%%{init: {'theme':'forest'}}%%
flowchart TB
Step1\["1. Create The Scope"]-->StepD2
Step1\["1. Create The Scope"]-->StepA2
StepD2\["2. Query and Filter The Declarations"]-->StepD3
StepD3\["3. Assert"]
StepA2\["2. Assert Architecture"]-->StepA3
StepA3\["2a. Define Layers"]-->StepA4
StepA4\["2b. Define Architecture Assertions"]
style Step1 fill:#52B523,stroke:#666,stroke-width:2px,color:#fff" %}

{% hint style="info" %}
The declaration represents Kotlin declaration eg. Kotlin class is represented by `KoClassDeclaration` allowing to access class name (`koClassDeclaration.name`), methods (`koClassDeclaration.functions()`), etc. See [declaration](https://docs.konsist.lemonappdev.com/features/declaration "mention").
{% endhint %}


---

# 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://docs.konsist.lemonappdev.com/getting-started/getting-started.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.
