# Instructions

## Prerequisites

* [x] [Install Soar](https://soar.qaidvoid.dev/installation)
* [x] Read the [Spec](https://docs.pkgforge.dev/sbuild/specification)
* [x] View [examples](https://github.com/pkgforge/soarpkgs/tree/main/packages)

***

## Write

1. Copy the [template](https://github.com/pkgforge/soarpkgs/blob/main/templates/generic.SBUILD.yaml)
2. Fill in the fields following the [spec](https://docs.pkgforge.dev/sbuild/specification) and [examples](https://docs.pkgforge.dev/sbuild/instructions/examples)
3. Validate with [sbuild-linter](https://github.com/pkgforge/sbuilder):

```bash
soar add "sbuild-linter"
sbuild-linter "./example.SBUILD"

# To test pkgver fetching
sbuild-linter "./example.SBUILD" --pkgver
```

4. Submit a [Pull Request](https://github.com/pkgforge/soarpkgs/compare) or [Issue](https://github.com/pkgforge/soarpkgs/issues/new/choose) with the `.validated` version

***

## Build

{% hint style="warning" %}
Use a sandbox or container when running untested SBUILDs.
{% endhint %}

```bash
soar add "sbuild"
sbuild "./example.SBUILD" --log-level "verbose" --keep --outdir "./SBUILD-TEST"
```


---

# 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.pkgforge.dev/sbuild/instructions.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.
