> For the complete documentation index, see [llms.txt](https://docs.gomboc.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gomboc.ai/orl/concepts/rules.md).

# Rule / Ruleset

Rules are the single unit of work for ORL. Rulesets organize multiple rules so they are guaranteed to be executed together.

## Rule

A rule performs a single [audit](/orl/concepts/audit.md), and remediates those findings.

```yaml
type: Rule
version: v1
metadata:
  name: my-sample-rule
spec:
  language: terraform
  audit_language: ast

  audit: |
    {{ aResource("aws_s3_bucket" ) }}

  remediation:
    - command: remove
      path: resource
```

### Ruleset

A Ruleset is a collection of rules and an optional rule template.

```yaml
type: Ruleset
version: v1
metadata:
  name: my-sample-ruleset
spec:
  template:
    language: terraform
    audit_language: ast

  rules:
    - name: first rule
      audit: |
        {{ aResource("aws_s3_bucket" ) }}

      remediation:
        - command: remove
          path: resource
```
