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

# Event rules

> Choose what Stratos writes to each flight's log and PIREP, and when. Edit Flight Tracking's event rules, write your own or describe one and let AI draft it, then publish them to your pilots.

Event rules decide which flight events Stratos logs into the PIREP: engines starting, flaps moving, stalls, phase changes and so on. Flight Tracking comes with a full set. You can change any of them, add your own, or describe a rule in plain English and have it drafted with AI.

Open them from **Plugins → Flight Tracking → Event rules**.

> [!NOTE]
>
> **At a glance**
>
> * Each rule logs a message when its conditions become true.
> * Your edits are a draft until you **Save** and **Publish changes**.
> * Pilots get published rules from their next flight. A flight in progress keeps the rules it started with.
> * **Edit with AI** drafts a rule from a description. Every plan gets a monthly allowance of drafts.

![Flight Tracking's Event rules tab: each rule, when it fires and what it logs, with New rule](https://mintcdn.com/skyvexsoftware/Hz6HvysXK9kok6qr/images/screenshots/va/event-rules-light.webp?fit=max\&auto=format\&n=Hz6HvysXK9kok6qr\&q=85\&s=0627f6dcdef2661a319665143ad555fe)

## Edit a rule

Click a rule to open it. Each rule has:

* A name.
* **When**: one or more conditions on the flight's data, such as **Gear Control** equals `true`. **Condition** adds another, and **Log when all/any of these are true** decides how they combine.
* **Log**: the message written to the flight log. It can include live values, such as the airspeed, and **Preview** shows how it reads.
* **Hold true for**: how long, in milliseconds, the conditions must stay true before the message is logged.
* **Skip if true when tracking starts**: ignores a condition that's already true when tracking starts until it changes, so a cold and dark start doesn't log "Engine 1 shut down" before the engine has ever run.

**Builder** and **JSON** switch between the form and the rule as JSON. **Duplicate** copies the rule and **Delete** removes it. Drag a rule by its handle to reorder the list.

## Add a rule

Click **New rule** at the top of the list. The toolbar beside it also has:

* **Defaults**: the rules that come with Flight Tracking. Add any you don't have; they go to the end of your list.
* **Import** and **Export**: your rules as JSON, to bring rules in or keep a copy.

## Write a rule with AI

**Edit with AI** on an open rule drafts it for you from a description.

1. Open a rule, or click **New rule**, which opens on the prompt.
2. Click **Edit with AI** and describe what the rule should do, such as "Warn when faster than 250 knots below 10,000 feet".
3. Click **Write rule**. The draft shows under the box, with anything it changes marked **Changed**.
4. Click **Apply** to put it in place of the rule, **Rewrite** to try again with a new description, or **Discard**.

![A rule open on the Event rules tab with Edit with AI showing the box to describe what the rule should do](https://mintcdn.com/skyvexsoftware/Hz6HvysXK9kok6qr/images/screenshots/va/event-rules-ai-light.webp?fit=max\&auto=format\&n=Hz6HvysXK9kok6qr\&q=85\&s=192be90645f6d35c5866c21677336cc9)

An applied draft is an ordinary edit: check it, then save and publish it like any other change.

Each airline gets a monthly allowance of drafts: 25 on Free, 250 on Pro and 1,000 on Pro+ (see [pricing](https://skyvexsoftware.com/pricing)). The count of AI drafts left, at the right of the toolbar beside **New rule**, shows how many are left this month. They reset on the 1st.

## Publish your changes

Your edits stay a draft until you publish them, so you can change several rules at once.

1. When you've made changes, a bar at the foot of the list shows what changed. Click **Save**, or **Discard** to go back to what pilots have now.
2. **Review changes** shows each change before and after.
3. Click **Publish changes**.

Pilots get the new rules from their next flight. A flight in progress keeps the rules it started with.

## Related

* [Flight Tracking](/console/flight-tracking.md)
* [Additional fields](/guide/additionalfields.md)
* [Flight phases](/guide/flight-phases.md)
* [Plugins](/console/plugins.md), where **Reset settings to defaults** also resets the event rules


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