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

# Writing Reliable Conditions

> Write condition text that produces stable yes/no decisions

## Why This Matters

Condition quality is the biggest controllable factor for reliable trigger behavior.

## Rule 1: Ask a Yes/No Question

Use binary wording that can be answered from visible evidence.

Good:

* `Is it snowing?`
* `Are there people visible near the entrance?`
* `Is a vehicle stopped in the lane?`

Avoid:

* `How many cars are there?`
* `Describe what is happening.`
* `What might happen next?`

## Rule 2: Define Visible Evidence

Specify what should count as a match.

Example:

* Weak: `Is there smoke?`
* Better: `Is there smoke visible rising from the building roof?`

## Rule 3: Keep One Intent per Condition

Avoid combining multiple checks in one sentence.

* Avoid: `Is there an accident or heavy traffic?`
* Better: `Is there a visible traffic accident?`

## Rule 4: Use Positive Language

Positive phrasing is easier to evaluate than negations.

* Avoid: `Is the lot not empty?`
* Better: `Are any vehicles visible in the lot?`

## Rule 5: Validate Before Long Jobs

Use `check-once` first, then promote to `live-monitor` only after wording is stable.

## Practical Iteration Loop

1. Draft condition with concrete visual criteria.
2. Test with [Check Once](/api-reference/check-once).
3. Review `triggered` and `explanation`.
4. Refine and retest.
5. Launch [Live Monitor](/api-reference/live-monitor).

## Example Patterns

### Weather

* `Is it actively raining? Look for visible rain streaks or wet pavement.`
* `Is there dense fog reducing visibility of distant objects?`

### Traffic

* `Is there a stopped vehicle blocking a travel lane?`
* `Is there visible bumper-to-bumper congestion?`

### Site Monitoring

* `Is anyone inside the fenced zone?`
* `Is equipment being moved by a person?`

## Next Steps

* Pick endpoint + delivery mode: [Choose Your Workflow](/start-here/choose-workflow)
* Debug missed triggers: [Debugging Playbook](/guides/debugging)
* Endpoint request details: [Check Once](/api-reference/check-once)
